« first day (1684 days earlier)      last day (3261 days later) » 

1:00 PM
people are still using mysql_* in 2015 there is no more hope..
 
posted on May 27, 2015 by rdlowrey

This is the initial v1.0.0 release tag. **v1.0.0 Roadmap** - May 27, 2015: v1.0.0-alpha - June 4, 2015: v1.0.0-beta - Jun 11, 2015: v1.0.0

 
Using sure, but I wonder how many new builds are using mysql vs legacy
 
0
Q: Last id not inserted in sub loop

Prashantmy insert query is like this. i am getting $lastaddressid but i can't insert that last inserted id in for loop, because it automatically takes the last inserted id for all records of addressgroup. What's wrong? if($insertgroupRes) { for($k=0; $k<count($_POST['address']); $k++) ...

 
@Jimbo so, controversial question. Why should i use DI? I just don't understand why.
 
@rdlowrey June 11th?
 
1:03 PM
@r3wt /cc @Jimbo
 
@Danack reveal.js (custom)
 
And @Danack
 
I use grunt to glue the slides together
 
@r3wt Have you heard of SOLID?
 
Our lord and savior
 
1:05 PM
nope, never heard of it
 
Anonymous
www.youtube.com/watch?v=IKD2-MAkXyQ
 
Anonymous
@r3wt ^^
 
ah, so its meant for big teams
 
Not at all.
:23536910 In short, you're passing in objects via constructor / methods. Your objects then have an 'API' for how they will function, and you can test each object you create in isolation on it's own merits and it's API (public methods). To do these tests, if you use DI, you can 'mock out' objects and pretend they are functioning as expected, so that this current object you're writing tests for you can focus on. You also de-couple your code.
 
1:08 PM
is it normal to think "wow, this is retarded". is that a stage you go through with this?
 
The D in SOLID emphasises depending on an abstraction (or a type hinted interface) for it's functionality - then you can swap what you pass in at any time and it'll still work
And no, I didn't go through "this is retarded", I went through "what in the shit is this!?", and then learned...
 
Anonymous
1159
Q: What is dependency injection?

AR.There have been several questions already posted with specific questions about dependency injection, such as when to use it and what frameworks are there for it. However, What is dependency injection and when/why should or shouldn't it be used?

 
i'll try to keep an open mind i guess. i could foresee some situations where it might be useful
 
Anonymous
> "Dependency Injection" is a 25-dollar term for a 5-cent concept. [...] Dependency injection means giving an object its instance variables. [...].
 
generally, i would rather just take the time to plan something out correctly instead of having to monkey patch later
but, i fuck up sometimes. there's a project in particular that i have to maintain that i really fucked up. maybe solid could fix it...
 
1:15 PM
@r3wt inject what?how?
 
@samaYo thanks for that link. it really summarized it well and i understand now.
@PeeHaa what are you using to replace placeholders in the text with your var? str_replace?
 
@r3wt I don't have placeholders
Why would I?
 
nevermind dude
 
@r3wt Are you testing your code?
 
what do you mean
you mean with a unit testing framework like PHPUnit?
 
1:21 PM
Well at least for properly unit testing your code it pretty hard when you tightly couple everything (i.e. don't do DI)
 
Anonymous
23 hours ago, by samaYo
I found the lyrics for the song "a whole new world" :p
 
Anonymous
@PeeHaa ^^
 
Anonymous
kinda makes me think if DI is really efficient sometimes :
 
@samaYo ?
 
22 mins ago, by r3wt
@Jimbo so, controversial question. Why should i use DI? I just don't understand why.
 
1:25 PM
@r3wt Let's say you were doing OOP, and you were going to write some code to read application config data from, say, a YAML file, then create an object that uses that configuration data. What would you do?
 
i would kill myself because i am retarded
 
lol, but seriously, how would you approach that
 
@r3wt You shouldn'. And also you should stick with the static oop, because static calls looks better. Oh, and Laravel is awesomest framework
 
I would read the array into my constructor and foreach($cfg as $k=>$v) $this->{$k}=$v
 
tnxbye
 
1:26 PM
@rdlowrey By the way, in a bit we should have Debian 8 up and running and should be able to beta test Artax.
 
Anonymous
@PeeHaa can DI really salvage the tightness in that class?
 
@r3wt Any OOP in there?
 
user895378
@LeviMorrison I was thinking about this the other day. I may pull a PHP7 and forego an Artax v1.0.0 altogether and skip straight to v2 ...
 
i'm confused
 
For PHP 7 features?
 
1:28 PM
Does PHP 7 support string in type signature? Older versions will throw an error on

function foo(string $x) {}
foo("foo")

"must be an instance of string, string given".
 
@Jimbo stop trying to save them. It will just burn you out faster. Been there, done that, wasnt impressed enough to buy the t-shirt
 
@MarceloCamargo Yes, PHP 7 supports that.
 
user895378
@LeviMorrison No, but there are a lot of people using the v1 RCs which only require PHP5.4 ... All new code will need 5.5+ to support the impending amp/v1.0.0 and the lib needs to be rewritten to not be terrible (and use generators)
 
@tereško You and many others had that opinion of me when I started out a few years back... ;)
 
@LeviMorrison can we define return types for functions???
like int foo()
 
1:29 PM
@r3wt No, like function foo(): int { return 1; }
 
user895378
@LeviMorrison what version of PHP does Debian 8 package?
 
Debian 8 has PHP version 5.6.7.
 
@r3wt Imo, you'd need an object to read from the files, that throws exceptions when it can't find one. A Configuration object that is essentially a "value object", containing specific variables for that configuration - that could also throw exceptions when invalid configuration variables are given (so a Validator object, or multiple Validators in a ValidatorComposite), and a Factory to build this Configuration.
Then, the object requiring the configuration would have __construct(Configuration $config) { } as it's requirement.
 
@samaYo Yes it can
 
@Jimbo and this is why I'm never as happy as I should be to see DI / SOLID code. It becomes quite hard to read very quickly due to all the indirections and abstractions. Yes, it's more testable, but that comes at a price. Not that you can't write it in a readable way, just that most implementations I've seen aren't very readable.
 
1:32 PM
@JoeriSebrechts Of course, on top of all that it's about documentation, clean code... that's a given.. and imho that sort of code is still nicer than spaghetti
 
Anonymous
@JoeriSebrechts +1
 
i'm not saying DI isn't a good thing, just that i'm pretty sure that in a few years we'll have new architectural styles to fix its shortcomings and look back at today's code with embarassment
then agian, old code is always embarassing, and if it isn't you're not trying hard enough :)
 
@JoeriSebrechts As we always do, sometimes a month or so after we've written it, such is our careers ;p
I'm saying DI even for the sake of DI is still better than global state, static calls everywhere and no definitive object API in the OO paradigm. Even if it's crap code, with DI you can still refactor it much more easily
DI for the sake of DI is *still* better than static calls and global mutable state #php
 
@tereško why le-sigh? Y U NO AGREE
 
1:39 PM
I am le tired of all the stupid on the internets
 
Hello
 
someone just now told me that R9 290x uses 300+ more watts than GTX 980 and that it would add 40GBP to my yearly power bill if I played just one hour per day
I'm just so fucking tired
 
I am just researching ORM databases and I wanted some more opinions before a settle on a database structure. My system will be looking at pulling in real time data from other apis and storing it. Then my system will be redisplaying that data and enchaining it. How do I go about planning this.
 
what are "ORM databases" ?
 
@teresko .. good question ;)
 
1:43 PM
Object ones
lol I think i mean document
 
@StephenWolfe Decide on what you want to do first, and not how. Looks like you've done that. Decide on a technology stack that best suits your problem - why even go into ORMs yet? Think higher - what sort of storage? Do you need a relational database? NoSQL? Pros, cons... Is PHP the best choice for this?
 
@Jimbo PHP is the only choice lol I dont know anything else
@Jimbo I also only currently know mysql
 
@StephenWolfe If it's just a personal project, maybe it'd be fun to try it in something else like Node? Then you'll have more broad deoth in the future, and you can always rewrite it in PHP if you decide you don't like it.. how else do you learn about new languages, you need a use-case first :)
 
i didn't know we were supposed to recommend to people here that they shouldn't use PHP?
;)
 
@StephenWolfe are you using Perst or db4o? because those are the only OODBMS systems that I know
 
1:46 PM
@Jimbo well i decided my project that I am doing it going to teach me Zend2 and Rest
 
@JoeriSebrechts I'm not, just encouraging people to think outside the box a little more :) probably everyone aiming their PHP bows and arrows at me now :D
 
if only we had node-php...
 
@tereško Im not using anything yet
My system will store lots of data.
Sports data
so think how much there is
 
Python is really good for web scraping
 
Im going to be querying the data for results, and other stats
 
1:48 PM
@StephenWolfe will you be using it with .NET or Java ?
 
none
PHP
 
.. or are you just stupid and have no idea what is the difference between ORM and OODBMS
 
Be nice :P
 
I can't
 
Im stupid :(
I was looking at Doctrine
for zend
 
1:49 PM
6 mins ago, by tereško
what are "ORM databases" ?
 
morning
 
morning
 
@tereško please. If he doesn't know what an ORM is, then such a question may obviously pop up. Don't confuse "being stupid" with "being a newbie" -.-
 
@Ocramius judging by his question, he started with "I need an ORM for this project"
 
Says the guy who likes factory statics....
trololol
 
1:51 PM
@tereško ORM databases is "Oh, really, Man?" databases
 
someone get Jimbo to the doctor. his brain is broken
 
@r3wt Is why I'm using PHP :D
 
Just Kidding.. mostly
 
@Jimbo I'm not in the mood.
 
.. I think every regular today is pissed off =(
 
1:52 PM
Ah come on guys, it's not exactly Monday, cheer up :-) he said singletons
 
@tereško yes, and he obviously has no clear idea of anything right now.
 
I use alot of singeltons.. so you can rip me for that i guess
 
Get him boys!
 
I use precisely one singleton in one of my applications
 
I give up
 
Anonymous
1:53 PM
:)
 
so, let's talk about something better
 
Anyone going to any conferences in the next few months?
 
beer?
 
no, can't travel :(
 
WHY DON'T YOU COME HANG OUT INSIDE MY HOUSE. WE CAN COOK BREAD AND CHAT ABOUT OUR INTERNAL SKELETONS.
 
1:55 PM
@DanLugg Dude, enough about your cactii and internal skeletons...
@ScottArciszewski disabled?
 
I feel like if I respond to some of the things you're all trying to say to make everything funnier it would be a buzzkill
no, I'm on probation for hax0ring the FBI a few years back
 
riiiiight
 
sorry im back
 
atleast you prefixed it with an apology
 
1:56 PM
@tereško sorry about my lack of understanding about this. I think I have become confused
 
Anyone who says they hax0red something didn't hax0r anything.
 
I meant it ironically
because it was stupid
 
@tereško I was reading up on how Facebook changed there data structure to orm
 
1337 h4xx0rs
 
That it was.
 
1:57 PM
and it was probably the least impressive thing I've ever done in my life
but a lot of script kiddies love to brag about being able to
 
25 secs ago, by Stephen Wolfe
@tereško I was reading up on how Facebook changed there data structure to orm
@Ocramius , please hold me back
 
it's not really any sort of accomplishment
 
@StephenWolfe can you share the link?
 
my sense of humor doesn't usually translate well to text unless you already know me :\
 
@tereško just play some luftrausers
 
1:58 PM
i ratted the IT guys computer in high school.
his password was the school mascot and year he graduated...
 
Anonymous
People stop spamming!!!
 
@JoeriSebrechts just ttrying to find it
 
I NEED A BEER !!
5
 
^this
 
1:59 PM
that word doesn't mean what you think it means
 
@r3wt Haha, I set up a mailbox rule on my first day of college to send the email back to it's sender, then did the same on my new friend's machine. Sent one email then went home for the day. Next day IT guy comes in and asks if I'm in the room - apparently a couple of hundred million e-mails had been duplicating overnight and when everyone tried to log on in the morning the servers all went down
 
i'm drawing muffins and smiley faces witha 4 year old
 
@r3wt sounds precious :)
 
FOO
 
BAR
 
2:01 PM
@r3wt you might be quite strong to hold a 4 year old still enough to draw with
 
BAZ
 
lol
 
ThW
@JoeriSebrechts Here are event loop implementations for PHP.
 
@PeeHaa screwed already (:
 
QUX
 
2:01 PM
posted on May 27, 2015 by kbironneau

/* by remzou */

7
 
@Feeds lol
 
@ThW i know, and i just found out node-php is a thing
 
what's that law again? anything you can think off already exists somewhere on the internet?
 
34
 
2:02 PM
rule 34?
 
43
 
that relates specifically to pornography though
 
shh don't tell him that
 
node-php
wow
the return of ?-dauto_prepend_file=http://
 
ThW
@JoeriSebrechts if you mean npmjs.com/package/node-php - this looks like cgi for node
 
2:05 PM
sssh, it's node, therefore it is magically cooler than just plain CGI
 
it uses magical amounts of ram too
 
downloadmoreram.com
If you want to download more RAM, just find a server vulnerable to heartbleed. rimshot
 
where did all the ram compressor tools go?
 
@JoeriSebrechts I cant find the link that I read but it was about how facebook had to move away from mysql and use other things
 
Anonymous
is there a button for doing tiny avatars in bulk?
 
2:13 PM
Stephen, facebook is still using MySQL.
just through a caching layer built in haskell and with like 9000 memcached servers
 
lol
needs to be 9001
 
at that scale 50ms is a win
 
just use mysql dude. if you manage to build something that needs to be scaled, you can cross the bridge later, preferably with help
 
2:15 PM
@StephenWolfe i'll make an attempt to unconfuse you without the article then: relational databases store data as tables of rows and columns, object databases store data as collections of objects, and ORM is a piece of code that lets you pretend a relational database is an object database, with doctrine being a well-known implementation for PHP
 
I use pgsql because I like concurrently refreshing materialized views
plus stored procedures are fun to write in it
 
wheres my tinfoil hat?
 
user895378
And because pqsql is just vastly superior to mysql
 
@JoeriSebrechts oh
 
mongodb is webscale bro
 
2:17 PM
so really I just need to read up on the benefits of noSQL and mySQL
 
This room really needs some sort of reverse star feature for some comments -_-
 
see which is best
 
it has the secret sauce
 
Does anyone know what stack overflow uses?
 
sql server
 
2:18 PM
got be2er
 
they use berkley db
 
So RDBMS
 
Anonymous
@DanLugg never saw that link before. I'm tempted to press it
 
@samaYo It should have CSRF so you can safely click it
 
2:19 PM
wow
 
Actually...
Meh.
 
Anonymous
useless button. I'm back again :/
 
@StephenWolfe have you ever designed a DB before ?
 
@tereško yea
 
@samaYo Yea, it really serves little purpose without persistence.
 
2:22 PM
@tereško only relational
 
@rdlowrey How about releasing the current Artax as 1.0.0, so that people can submit bug fixes to it if any are needed, and branch that off as the stable legacy version?
 
@StephenWolfe here is a hint: there is no such thing as "ORM database"
 
@tereško I realise that now
@tereško I was getting confused in all my reading
 
you know, people are much nicer here these days. when i was a noob no one answered stupid questions. they just made fun of you
 
Anonymous
you mean you are not a noob ?
 
2:28 PM
ignorance is not a crime, it only becomes one when it persists after education
 
Its the internet people will always make a comment or two, its how you take it :D
 
@samaYo lol
 
Also, @rdlowrey are you going to version the namespace that Artax sits in? It seems not doing that is a mistake that other libraries do (particularly guzzle ), which makes having different versions within the same project be a pain in the butt. I'm guessing they wouldn't be able to run concurrently, but being able to install different major versions of software side by side should be possible.
 
I am ready for the internet i.imgur.com/jd78L39.jpg
 
Is it that time already!
 
user895378
2:31 PM
@Danack This is why I'm going to skip releasing a final version 1 entirely and just go to v2.0.0 when there is a "final" release. IMO the namespace is part of the API and changing it is a BC break requiring a new major version
 
Anonymous
@tereško are you using some linux gui? or is that windows?
 
@tereško The question is: is the internet ready for you?
 
@samaYo it's windows
 
@rdlowrey I think I don't understand what you mean - I meant leaving the current stuff in the namespace Artax and version 2 would be in Artax2.
 
@samaYo the terminal there is cmder, with cygwin
 
2:35 PM
nice bud
 
user895378
@Danack No, fuck that.
 
^^ Fuck that indeed.
MS did that shit with some internal interfaces... when you reverse engineer and scour through the libs, you WTF time after time after time.
 
Anonymous
@tereško I use conemu, it's the best I've ever tried.
 
Not that you wouldn't WTF anyway, but you wanna drive a railroad tie through your forehead.
 
dudes, forgive me for what i'm about to ask, i knowit's not the right way, but it';s the way i have to work with. I have a simple site with a bespoke MVP (super basic). it makes use of GLOBALS though to keep the data between the various php files.
for some reason, $GLOBALS is unsetting itselfg
there isnt anything that would cause this (from what i can tell) and this is a brand new server
so i think it might be a PHP setting that i'm unsure about (this MVC* works on older versions of PHP [4-5] but not on 5.5.9]
<div id='page'>
<div id='wrapper'>
<?php include_once("includes/header.php");
print_r($GLOBALS);
?>
<div id='body'>
<h1><?php echo $h1; ?></h1>

<div id='mainbody'>
<?
print_r($GLOBALS);
if(isset($GLOBALS['content'])) {
echo $GLOBALS['content'];
} else {
 
2:38 PM
lol
this is a joke right?
 
the first GLOBALS is an array that is print_r'd, the second print_r is empoty
 
god this sounds so much like a legacy app that I was forbidden to refactor at a previous employer
 
sadly it isnt
 
forgiveness is asking too much
 
this is 8 years old and i have to quickly fix it
 
Anonymous
2:38 PM
hehe
 
TBH i could probably just take the static HTML, but that's too much hassle.
plus
this is a doozie that i havent come across before.
 
can you guys think of a reason why between the first proint_r and the second
the $GLOBALS is empty?
thanks for the link, thankfully that isnt news to me :) i know these things which is why i dont use them anymore
but, well, i do for this.
the previous server was 5.4.39 and this worked as expected, but 5.5.9 doesnt.
 
couldnt you just copy it to another variable and declare it a global
 
2:41 PM
:(
 
hmmm, i'll try that
good thinking
 
Anonymous
@Andy spammer what's the result of the print_r?
 
Anonymous
@tereško I'm ready for teh internet in my kitchen imgur.com/xdkxJ26
 
mooOOrnings
 
@samaYo well, the onmly var i need is GLOBALS['content'] the first priont_r renders this as expected, i.e. there is a bunch of HTML in there from a "view"
but $GLOBALS is magically unset() between then and when i need it, 10 lines later.
 
Anonymous
2:44 PM
just show us the output
 
found the issue
<? print_r($GLOBALS) ..... yadda yadda ?> results in am epty GLOBALS
 
<?php print_r($GLOBALS) ... yadda yadda ?> is fine
seems i have short tags turned off, which is good
yay legacy FTW
 
Anonymous
i love this room
 
Anonymous
Is there a way to check if form fields have been filled out BEFORE submission?
 
2:46 PM
@jay Javascript
@jay so yes
 
@Andy why are you using $GLOBALS??
 
@RonniSkansing because 8 years ago it seemed like a good diea
 
Anonymous
@Andy fuck sake, js is a bitch.
 
idea*
@jay i know :D
 
@Andy =]
 
2:46 PM
@RonniSkansing i do not touch them with a barge pole
but i need to atm
c'est a vie
 
I know how it is..
 
err
I was writing an antipattern :(
 
my senior developer, thought you guys would bitch at me for globals, he was right, but i think this was less painful than it could've been
thanks guys :D
 
@ScottArciszewski is this your answer to GLOBALS?
or is this from earlier
 
2:50 PM
lol
it's an antipattern
it's a global data cache (with less flexibility than $GLOBALS) but it hides from your IDE's sanity checks
 
@NikiC According to Anatol we still aren't in feature freeze.
 
:)
 
for PHP 7? :O
 
@LeviMorrison We aren't
 
@ScottArciszewski \Why \are \you \prepending \built \in \functions? ;)
 
2:52 PM
@NikiC That's not what was implied by the previous roadmap at all.
 
@tereško One can never have too many monitors
 
Well at least some of them
 
@LeviMorrison Which of them?
 
@PeeHaa I did it for the lulz, I would never write production quality lolphp code
 
@NikiC Zeev's, or any of the discussion around March 15th.
 
2:52 PM
@Jimbo hell no. I hate working with multi-monitor setups
 
@jay you could just use jQuery and use serialize and ajax.post
 
If that's the case I'm fine with adding void but hold a wiki vote.
 
if we're not in feature freeze
 
Minimal JS
 
can I push on an RFC? :D :D :D
 
2:53 PM
@tereško You can only say that because you have a 3.5k screen :P
 
@ScottArciszewski for 7.0?
 
lol yeah :P
 
Yeeeahnope
 
heh
all of my ideas are targeting 7.1 anyway
 
@Jimbo it's the other way around. I picked up a 3K screen because I hate multi-monitor
 
2:54 PM
@ScottArciszewski Rather than a string action, 3v4l.org/pIbhf
 
@LeviMorrison just to be clear, feature freeze is when new features no longer ought to land
 
@NikiC … okay.
 
@LeviMorrison Bts, did you see Marcio's suggestion to reserve enum as well?
 
@NikiC If it's okay to reserve void then sure, why not reserve enum.
If allowed then they need votes, imo.
 
2:55 PM
Do any of you use hipChat for anything?
 
@LeviMorrison Anything else you can think of?
 
unfortunately yes
$dayjob requires hipchat
 
we considered starting using it at work
atm we are demoing it out
 
@NikiC I'd prefer some kind of type or typedef or data word for type expressions. I think I'd rather wait for that one though.
 
@NikiC You mentioned elsewhere that 'Object' might be a thing one day.
 
2:58 PM
@Danack "object" I think is already soft-reserved.
(That was in Sara's RFC, yeah?)
 
@RonniSkansing I do.
 

« first day (1684 days earlier)      last day (3261 days later) »