« first day (1703 days earlier)      last day (3471 days later) » 

00:26
Anyone doing page design with ludicrous legacy support requirements (>=IE7) I have a sweet Q/A; stackoverflow.com/questions/20179151/…
why this is not working $data = mysql_query("SELECT * FROM students WHERE name='santosh'") or die(mysql_error());
why this is not working $data = mysql_query("SELECT * FROM students WHERE name='santosh'") or die(mysql_error());
1 message moved from JavaScript
user406009
@santosh You have to provide people error messages.
@santosh please stop using the outdated mysql_* API
learn to use PDO or MySQLi with prepared statements
@tereško i have seen mysqli but it also executes statements like the same manner (in procedural statements of mysqli)
00:40
so, what you are saying is that you have no idea what "prepared statements" are
this should illuminate the issue
@tereško if i use mysqli_query and mysql_query what is difference?
@tereško thanks
@Worf so it's the best thing ever invented?
@marcio yeah, if you can live with the smell :D
you usually don't smell the methane, you just burn it.
methane is just the best you can get from a monumental pile of crap :D
00:57
the source is horrible, but the final product is useful, the issue is that we haven't seen any effort to modernize it.
"Collectible" or "Collectable"?
If you meant "able to be collected" -> Collectible
what kind of hash function would you use for object hash codes? example: return md5($this->a . '|' . $this->b . '|' . $this->c . '|' . SomeInterface::CLASS);
01:18
^ doesn't this serves your needs?
that's good for ref identity, not for value :P
I don't know what you're doing but md5 seems fine, generally speaking.
TIL you can override getHash in SplObjectStorage #love
3v4l.org/B1fu6 the result of the var_dump was misleading so i thought it wasn't possible. but it actually works, it's only doubly hashed
 
1 hour later…
02:53
does someone know if spl_object_hash() still reuses hashes of destroyed objects like it used to do in the past?
@Worf Yes, it does.
bummer. annoying
var_dump(spl_object_hash(new stdClass()));
var_dump(spl_object_hash(new stdClass()));
var_dump(spl_object_hash(new stdClass()));
@Worf Yep
:(
public function getHash() {
    return md5(print_r($this, true));
}
;-) ^^
02:58
lol :P
Though, for "value objects", that almost works
var_dump(md5(print_r(new stdclass, true)));
var_dump(md5(print_r(new stdclass, true)));
string(32) "6b328f51f47ecdb0c3ab3195cdeadea1"
string(32) "6b328f51f47ecdb0c3ab3195cdeadea1"
same issue, sadly
Well, yea
That's why I said value objects :-P
object(stdClass)#1 (0) {
}
object(stdClass)#1 (0) {
}
@DanLugg i wouldn't trust print_r's output :P
also iirc, it uses ob to capture the output, so it's probably slow as hell
Of course; you'd want to do something a bit more sensible
03:02
:D
But, it almost works as is.
yeah as a quick solution is not bad :D
03:26
What's the appropriate error for not being able to implement an interface? E_ERROR or E_CORE_ERROR?
the Bethesda showcase was actually really good
and the Fallout4 presentation made me want to play it
@Trowski not being able?
@Worf Not allowed to implement
Better way to put it :)
ah, the throwable. idk :P
have you guys considered introducing a keyword for stuff that can be called / implemented / extended only internally?
like internal interface Throwable{}
internal interface Traversable{}
Where would that keyword be used?
03:40
well, informally
in documentation, for example
and in reflection, also
$throwableReflection->isInternal() // true
I suppose, but then you have to explain what internal means.
ahaha, true
03:54
@Trowski The only thing I can think of that does this is Traversable.
Maybe look there?
That uses E_CORE_ERROR, so that's probably the one I should use.
is there a way to say "length changing" in one word, like shrinking and growing/expanding but in the two ways
@Trowski I'm pretty sure E_CORE_ERRORs are for when the engine completely fails before it even gets to the runtime. Things it can't recover from, like unable to allocate memory. Unable to implement interface sounds more like a runtime error, doesn't it?
@Worf elastic?
@Sherif progressive tense
@Worf oscillating?
Maybe more context
04:04
eheh :D
it's collections of objects
@Sherif I would agree. I originally used E_ERROR. The thing that made me question my choice is that Traversable uses E_CORE_ERROR.
So class Test implements Traversable results in an an E_CORE_ERROR.
@Trowski It does? I thought we said we weren't going to do that.
interface Changing extends Event{}
interface LengthChanging extends Changing{}
interface Adding extends LengthChanging{}
interface Removing extends LengthChanging{}
interface Replacing extends Changing{}
i guess i can't do better than this :P
@Sherif Do what exactly?
Use E_CORE_ERROR for stuff like that.
04:09
Could have just been overlooked.
I remember Sara saying something about that being a bad idea on the mailing list a few years back.
For the life of me I can't find it now and gmail search isn't helping.
I don't want to change it in this PR since I want to limit it to code dealing with the RFC.
@Sherif If you could find it I could submit another PR to change it.
meh, I can't really remember the reasoning behind it, but I don't care enough to dig deeper.
I'd say if it's already there then there's precedence :)
Honestly... it makes almost no difference.
I think the difference was mainly about how we handle the error. I think the constant was intended to signify errors that the engine had no way of recovering from safely, i.e. it couldn't clean up after itself (like memory corruption) and was forced to just bail.
That's my vague recollection of the differences between E_ERROR and E_CORE_ERROR, but I could be wrong.
Maybe ask on the mailing list?
Someone might know.
04:15
Yeah, I'll ask on the mailing list. Traversable might be special because it actually fiddles with the class entry table.
That sounds highly plausible.
Throwable isn't much different than a user defined interface.
04:34
Hi
I have a question about tracking users in PHP
I want to track the user that is comming from a mobile messenger and visit my website
I want to find out it is comming from what messenger
$_SERVER['HTTP_HTTP_REFERRER'] in not useful in this case
@MohammadZareMoghadam Maybe just use Google Analytics and spare yourself the pain of parsing Referer headers? There is a browser_cap.ini you could download for that, but last I looked it's very much outdated and poorly maintained. It's accuracy is pretty bad.
There are probably some more current versions out there if you Google around, but I can't recall off the top of my head.
@MohammadZareMoghadam This is the one I'm referring to browscap.org and the relevant PHP function is php.net/manual/en/function.get-browser.php
But honestly, Google Analytics is just so much more convenient if you don't need a PHP-specific solution. Plus you can query GA to pull the data into your db if need be.
05:00
Hi @Sherif
ello
please could you explain to me how php frameworks prevent reinvent the wheel?
I can make one php file for MySQL connections and other classes could extends that class without needing for a framework?
any idea?
@Sherif
@JavaFan You could, but wouldn't you just be building your own framework at that point? Not reinventing the wheel can be positively rephrased as "Reuse code that you know already works". So if someone wrote code that already does what you need you just spare yourself the time and effort of having to write it yourself. Same reason you don't rewrite your operating system or browser or interpreter every time you want to do something.
Instead you just focusing your time and effort on the thing that you actually need. This is why bloggers would rather use WordPress so they can spare themselves the time it takes to reinvent a CMS and focus instead of writing that awesome blog post that everyone will thank them for.
zan
zan
Good morning
@Sherif I asked this question because I am learning laravel and it difficult to learn for beginner so it would take time
05:10
@JavaFan While it's entirely possible that it will take you some time to break through the learning curve of harnessing a new piece of technology, do you honestly believe it will take you any less time to write your own framework?
You will likely make many mistakes along the way. Mistakes others have made before you. Learn from their humility. Take advantage of the collective wisdom of crowds. Stand on the shoulders of geniuses and call yourself tall.
Obviously, you aren't setting out to build a framework. Clearly you have some other goal in mind like build the next facebook/twitter/<insert popular site on the intrawebz here> :)
look I have to build simple php website (just to display records in MySQL database, enable visitors to search MySQL via this site, share images via facebook ,twitter.... in your opinion in what points my site need a framework, in connect to MySQL I think answer is no as I explained to you , might be there other points @Sherif
@JavaFan Well, yes. There is a lot the framework can help you with besides just connecting to your database. For one thing it makes your code easier to reuse, extend, and fix over time. If you just throw together a few PHP scripts now and stick them in your document root, you will likely suffer when it comes time to fix bugs you discover, add additional functionality you desire, or improve existing functionality you find lacking.
Many that have come before you have built websites in PHP large and small and what they've found in common are all of the things they screwed up. So they racked their brains and collectively came up with some reasonable solutions to many of those common problems. It's there for the taking.
Take it or leave it, just remember that the one constant you have here is that you WILL make mistakes. It's just a question of how many of them you're willing to avoid in order to accelerate your success to building this site.
okay thank you very much for your explaining effort.
Sure, no problem.
@JavaFan To put it to you a simpler way, if I told you that you could have this site up and running, with all of the aforementioned functionality you described, within the hour, would you say that would be more or less time than it would take you to get started now by just abandoning all PHP frameworks and starting off on your own?
05:27
I don't understand you
would you say that would be more or less time than it would take you to get started now by just abandoning all PHP frameworks and starting off on your own??
@JavaFan I'm asking if you think you could get this site up and running within the next hour or so without learning/using any framework? i.e. just write your own classes like you said.
@Sherif yes that is I meant, but as you said I would get mistakes in my mind like authentication, security mistakes,......etc
@JavaFan Well, regardless of how many mistakes you make, do you actually think it's possible that you will write all that code in the next 60 minutes?
OK then you have your answer :) Ditch the framework. Clearly not reusing code will be faster for you.
Hofstadter's law is a self-referential time-related adage, coined by Douglas Hofstadter and named after him. Hofstadter's law was a part of Douglas Hofstadter's 1979 book Gödel, Escher, Bach: An Eternal Golden Braid. The law is a statement regarding the difficulty of accurately estimating the time it will take to complete tasks of substantial complexity. It is often cited amongst programmers, especially in discussions of techniques to improve productivity, such as The Mythical Man-Month or extreme programming. The recursive nature of the law is a reflection of the widely experienced difficulty...
05:37
@Sherif Do I need a framework for security,users facebook sharing.... and that issues?
@JavaFan Probably, but I'd say your more urgent needs will come from things like actually using a package from composer that will help you talk to the facebook API and connect it to your application logic more quickly than it will likely take you to do it on your own.
I think you're just focused on seeking out very generic reasons for why you'd need a framework which is hindering you from being able to see more the specific ones.
Those are actually the ones you get the most immediate benefits from.
You'll always have security problems and you'll always have coding problems. What you want less of is the time you spend figuring out the solutions to the problems for your current needs.
Chances are someone out there figured out a solution to your same/similar problem and wrote pretty good code for it that you could reuse. It's just a matter of tweaking it to fit your specific needs at that point which is much easier to do than having to come up with the solution yourself.
Ideally anyway.
clear
thank you again
06:15
Morning
@Worf resizing ?
06:31
@kelunik Yes, I don't want to change router
@VeeeneX Why would you have to change the router then? As far as I know, without a colon, it's a class name, so it won't work, but I'm not that used to Auryn.
@kelunik Because router outputs variables in array without key with colon
@VeeeneX Ah, you want to use the results to fill your callable after routing. Although that's possible and may seem nice, note that Auryn wasn't built for speed. I would just use an array for your arguments and inject that into your callable.
@kelunik Yes, but someone said in this room that's better to use Auryn instead of Dice, yes that's true if we consider usability than speed and I'm thinking of calling callable without DI, but it's useful to access variables which are directly passed to function/method.
@VeeeneX Yes, I'm just saying, if you care about speed, don't do that. ;-)
06:45
@kelunik yes, I'll go with Auryn ;)
Morning
How can I specify return type on an internal interface? That is, one that I'm specifying in C, not in PHP.
07:27
@PeeHaa morning
is that a correct sequence ?
<?php
error_reporting(E_ALL);
ini_set("display_errors", 0);
session_start();
Adjective: correct (comparative more correct, superlative most correct)
  1. Free from error; true; the state of having an affirmed truth.
  2. correct (comparative correcter, superlative correctst)
  3. correct m (feminine correcte, masculine plural corrects, feminine plural correctes)
Verb: correct (third-person singular simple present corrects, present participle correcting, simple past and past participle corrected)
  1. (transitive) To make something that was not valid become right. To remove error.
  2. He corrected the position of the book on the mantle.
  3. (by extension, transitive) To grade (examination papers).
what do you mean by "correct" ?
I mean the ORDER
error displaying OR session start first ?
07:38
error-stuff should be configured in the php.ini
Yes thats correct but sometimes we need to display in development at runtime to fix possible issues
morning :)
I heave reached "learning new shit" stage in my unemployment
I have even written 12 lines of mostly-working code
07:47
moin
12 whole lines?
That's more code than one could fit in an entire tweet :)
export default class {

    bar() {
        alert(1);
    }
}
and
import WorldMap from '../lib/map';

let x =  new WorldMap;
x.bar();
.. it's actually 10, I think
8 if you don't count empty lines. 5 if you only count actual statements. 4 if you use constructor dereferencing on that instantiation.
Look we've already compressed your work down to 1/3rd. You're already 3 times more efficient!
well, I pasted only the ones that actually work
... you're 3 times as efficient where it counts?
Hey I think I'm getting the hang of this Go thing. Apparently the secret is you just write code and it Gos </learning Go>
07:55
Morning
Morning all
bleah, markdown always confuses me
Anonymous
08:07
Morning
php.net/function.hash#example-879 ... holy nested function calls
@kelunik "note that Auryn wasn't built for speed" - it was quite a bit......and if you think it's not fast, you should try some of the other DI libraries out there...
@salathe Wow. That is a horrible example
@salathe What do we do with comments like these just burninate them or add an editor note
@PeeHaa if the note has any useful information, incorporate it into the main docs... after that, or if there's nothing useful, throw it into the fiery pit of burnination
Me fires up the pit of burnination
BTW can I somehow see what user notes I have removed. I had some nice list of really stupid user notes, but I lost (part of) the list
08:30
@PeeHaa No once they're deleted they're gone from the database forever.
@Sherif :(
@Danack I know that it caches things etc., but that's what @rdlowrey says about his library. ;-)
Some people don't use DI, because they're concerned that it will slow down their application....
@PeeHaa You could use rsync to retain your own local copy though if you'd like. Just setup an hourly cron job or something and point it to rsync.php.net though
@Danack beauty fades, stupid is for life
08:35
@tereško To be fair to them, if they had tried Zend/DI before, apparently it is almost unusably slow, and so it's not that odd that they're associating DI with being slow...
@Danack I've not used the web sapi in the last 6 months and Aerys gives you everything you need, so there's no need for DI except for bootstrapping of a worker.
confusing DI container libraries/frameworks with dependency injection as a practice is stupid
@kelunik Are you using Aerys to serve APIs or full web pages?
Good morning
(if Monday morning can be good, of course)
@Danack The old code used to serve things as full web pages + chat via a websocket endpoint, the new version will just have login and logout as actual full web pages and everything else will be done with websockets.
08:49
Hi I know most of you here hate WordPress but has anyone ever written unit tests for any added functionality they have added to it?
@StephenWolfe In wordpress core? Impossible with all the global going on in there
Thats what I thought :(
I just had a client ask for a wordpress site, but they want it Unit tested
oh, but you wouldn't be editing the core
but what about the plugins
Just unit test your own plugins / code
08:52
@StephenWolfe Ask (in the nicest possible way) if they really mean unit tested, or whether they mean integration tested.
Would I not need to test them
@StephenWolfe Yes but that has nothing to do with WP core ;)
Testing your plugins is doable when you properly bootstrap your plugins
@PeeHaa I dont normally write them as plugins lol
@StephenWolfe Uhhhm how do you write it normally?
fuck fedora
08:54
@Danack I think this spec is way to customised for wordpress anyway
@PeeHaa I write separate PHP classes and make calls to them
Or just add things in to the function.php
@StephenWolfe Ah I see
@FlorianMargaine fuck mondays
I dont normally have to add a lot of functionality
Fuck you o/
08:56
Hey sexy
Hey good lookin'
for some reason when I read function.php there's a growing frustration inside me
@DaveRandom seriously. F20 (i.e. 2 releases ago) dropped support for microphone on bluetooth headsets. So my headset just spouts out sound, but I can't use the microphone on it. They haven't fixed it yet.
debian, here I come...
Come on, it's Linux. Be a man and just write the driver by yourself.
hehehe ^
08:58
Hmmm
I might do that
Although it's a pulseaudio patch that's required there
Audio on linux is a very very masochistic experience.
why? It's quite fine
@FlorianMargaine pulseaudio... I have heard some horror stories about that one
Under the hood, it's messy
@Amelia It's quite fine.
09:00
ah well... in win it's also messy, but there you just can not look "under the hood"
They can hide their mess :p
Well, it's fine as long as you don't try to install an equalizer for pulseaudio...
@FlorianMargaine Have you considered installing a proper desktop environment like windows? :)
@FlorianMargaine You do realize Fedora 20 is no longer supported, right?
so again, if you see a mess - be a man and fix it (:
09:01
@Sherif they introduced the bug in f20, still not fixed in 22
While music from Mulan is playing, I hope
@FlorianMargaine Oh, I thought you were using 20.
I'm listening youtube via mpsyt and have all the controls with alsa for the sound - so don't see any issues so far (:
@PeeHaa no, I haven't considered using a POS
You can also use it for other stuff instead of point of sale ;)
09:03
@FlorianMargaine Debian is not going to fix the fact that it's Monday
Basically it is great and does all the things
apt-get Tuesday doesn't work afaik
I have no apt-get eh..
@DaveRandom You have to use sudo and it's apt-get install BTW.
I'm pretty sure it's actually yum install
:-P
09:05
If you didn't say sudo you can't expect to be taken seriously by your operating system.
Besides, I made my own Debian repo and created a bunch of packages to install my environment...
sudo make me a sandwich
@Sherif I use X as root.
#AwesomeTweets ^
@DaveRandom so "target me was not found" or like that..
09:10
Hnnnnng. Fallout 4
I thought after Fallout 2 it's all pointless
Well it did change majorly, I started with Fallout 3 which I love
@Sherif Usually… sudo -i is the first thing I do after logging in… (on remote servers)
@bwoebi #Win
This guy gets it
@bwoebi working under root on remote servers?
09:15
@AlmaDo yeah
ThW
ThW
Morning
@AlmaDo well, especially on remote server, a large fraction of my commands anyway need sudo… and I'm seriously too lazy to add sudo all the time.
(I mean doing sysadmin things…)
@Fabor doom 4 looks like pure bullshit. nothing new except graphics
Some people like that though. Don't fix what isn't broke.
Seems like they're stepping back to their routes and away from jump-scare mechanics.
@Sherif point is… on my local machine I rarely need sudo… then I'm usually working under my own user… but having to go back and add sudo too often is annoying.
09:21
It looks pretty nice tbf.
09:43
@Sherif Nah, doesn't work on Windows
\o/ My site has a logo pieterhordijk.com
@PeeHaa it looks like an ass without js
(:
JS?
> I'm a huge fucking header, because fuck content that's why. Very deep text here because that's what websites are about nowadays...
@PeeHaa lol
09:54
@PeeHaa this :D
As I said - looks like an ass :p
@AlmaDo Ow yeah. Only the homepage is what I have stolen yet
homepage looks a little better, but still
Hey. It's the best designed site I have ever had :)
I just wonder, why all sites want js to "look fine"? Isn't it a css stuff?
And when I see a web-site like a piece of junk without js it's quite sad.. I can believe js may affect functionality, for sure, but the view.. doh
I don't use any js on that site regarding design
10:00
you do :p
?
no I don't
at least for images
What makes you think that?
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
	<script src="assets/js/retina-1.1.0.js"></script>
	<script src="assets/js/jquery.hoverdir.js"></script>
	<script src="assets/js/jquery.hoverex.min.js"></script>
	<script src="assets/js/jquery.prettyPhoto.js"></script>
  	<script src="assets/js/jquery.isotope.min.js"></script>
  	<script src="assets/js/custom.js"></script>
@PeeHaa when I disable js, I see no images. When I enable it, I see them. Simple (:
@FlorianMargaine a-ha! so the "ass" is hidden within "asset" :p
10:02
@AlmaDo You see images? That is strange because there are no images uploaded to the server :)
@PeeHaa they are there, yep
@AlmaDo Impossible? :P
 load resource: the server responded with a status of 404 (Not Found)
pieterhordijk.com/assets/img/portfolio/portfolio_05.jpg Failed to load resource: the server responded with a status of 404 (Not Found)
pieterhordijk.com/assets/img/portfolio/portfolio_04.jpg Failed to load resource: the server responded with a status of 404 (Not Found)
pieterhordijk.com/assets/img/portfolio/portfolio_06.jpg Failed to load resource: the server responded with a status of 404 (Not Found)
pieterhordijk.com/assets/img/portfolio/portfolio_07.jpg Failed to load resource: the serve
I don't think there's much issue in a site looking ass without JS.
to compile pulseaudio or not...
@PeeHaa everything is possible, impossible just takes a little more time
10:06
@AlmaDo lol Hello Aristotle :)
However: no js and with js
trololo (:
Oh wow. Didn't notice that.
STrange, because that is a font and not js
It's just font awesome :|
a font loaded by js? :D
10:07
I highly doubt it, but now I am not sure :)
I have no idea too. Well, just made two screenshots up there. So you see that without js its ass not so nice (:
Yeah yeah you are right. Investigating
Hey, no offense, you know me, I'm just a troll (:
No worries. Thanks for letting me know
However it is not the JS blocking that does that
hm, it's NoScript for FF
might be the deal, but I doubt
10:10
Let me check. I think it is either an non ssl issue or an external resources issue
Nice logo @PeeHaa
Actually, no problem, I will just "sigh" and enable js. It were reeeally a rare, rare cases when a site with complex view was looking same with and without js (and while visiting those sites I was thinking: "Hell! F*ng good work, designer!!")
in HTML / CSS / WebDesign, 2 days ago, by PeeHaa
1 hour ago, by PeeHaa
I was looking for a favicon for my personal site and somebody pointed out to me that pornhub uses my initials as their favicon. So I am going to use their favicon, but now I also want their logo only with my firstname[lastname] in it. Can somebody photoshop this for me?
lol
@AlmaDo Ugggghhh. Don't see the problem now and am going to a meeting. Will fix it later and ping you to test it
10:16
@PeeHaa just try to use FF with NoScript (same as disable scripts in the options menu of browser itself, I believe)
Will do ty
but you know
you can just forget it - as most probably your efforts now are for the sake of very few people. Normal users don't give a damn and don't even know that there is js
Weird 64MB favicon.ico turning out to be a TAR backup of the whole WP site, downloaded by every browser passing by... http://t.co/4U7412FYkM
@AlmaDo No no no. There is no reason for it not to work ;)
@FlorianMargaine lol!
10:29
YoJoe
I got a new toy ...
a trike ...
is fun ...
hi, @Joe
@JoeWatkins kewl
brb meeting
lata
hi alma
@AlmaDo No, it isn't. One of the things NoScript does is block @font-face, see the plugin options -> embedding tab. /cc@PeeHaa
10:36
@DaveRandom That is retarded
yay
So, it looks like my bad
Now I really need to go :P o/
@PeeHaa Yes it is, so retarded that it's the sort of thing you remember...
no idea why it blocks that..
Disabling JS break the web, I really have no sympathy for these people
10:38
hehe
I'm not a nice person :p
@AlmaDo I seem to remember it being something to do with it being possible to embed arbitrary data in SVG

« first day (1703 days earlier)      last day (3471 days later) »