« first day (961 days earlier)      last day (4213 days later) » 

15:00
@LightningDust You mean you actually like Windows 8?
How can you convert from linux to WIN8 :O
@NikiC - Yes, I have a convertible laptop/tablet though
As a professional whose profession does not involve drawing on a tablet?
@NikiC He likes the table tennis peddles sticking out from his behind ;-)
@igorw any way you can get composer issue 1714 more attention?
15:00
@HamZa - Get a Sony Vaio Duo 11 and run Linux. I give you a week. :P
also hai
Also new VS is awesome
@Lusitanian Where have you been :( I though they chased you from the PHP chatroom, it's been a long time !
Though I'm still using Komodo for PHP
You're intending to use VS for PHP ?
15:02
Doubt MS will ever fix VS for PHP so likely not.
@HamZa eh nah just busy, need summer
@LightningDust So then how is it awesome again in the context of this room? ;-)
@LightningDust MS never supported it. It was a 3pd dude
@Jack - I code in more than PHP.
use phpstorm
15:03
^- +1
@LightningDust What? Blasphpemy!
@Jack - Sometimes performance matters. All the rest of the time I use PHP. :P
My cron jobs are not written in PHP. :D
You write cron jobs with VS?
cool!
15:05
I only started using VS a week ago, I've been on Komodo for years
VS all the things
I wonder what PHP would be if it was more like .... Objective C ... heh
It would be horrible, like Objective C :P
@nikic: from our prior discussion on Security Through Obscurity:
@ircmaxell Hiding the key is all well and good, but only if the lock is hard to pick in the first place?
@NikiC I find this hard to believe. Windows hasn't changed in 13 years, it still sucks.
15:07
@LightningDust Nah, is not horrible ... it's misunderstood :)
@Jack I'd rather code in -_-
@Jack total crap? That is: Even more total crap than it already is
Or however you make those tags.
[tag:asm]
15:10
@NikiC hah .. out of curiosity .. when you say total crap, are you talking about the language itself or the underlying implementation ... well, or both :)
[tag:syntax]
^test\
[tag:asm]
@Jack My opinion there oscillates. Sometimes I think "uh, maybe the language is okay after all", then I hit yet another quirks and it's back to "php is total crap" :)
PHP is always total crap. The key is it's usefulness goes back and forth depending on what you're doing
I'm sure every language has its quirks; so what are PHP's "contemporaries" I wonder? Python, Ruby?
15:16
I disagree with PHP being total crap.
@HamZa An one-liner? okay...: base_convert(!($f = function ($s = "") use (&$f) { return strlen($s)>rand(76, 100)?$s:$f($s.crypt(rand() * microtime(1))); }).$f() , 10, 36);
With enough boilerplate, PHP isn't total crap. Otherwise though, yes, but I'd still disagree; PHP would be looking at total crap in the rear-view mirror.
@Jack Correction: Python, Ruby
@Bracketworks You can polish a turd to a bright shine. It can look really nice. But under that shine is still a piece of crap...
5
literally
lol
15:18
PHP would be total crap if it weren't for the fact that for what it does, everything else is worse. :/
@ircmaxell Yea, then you sell your shiny turd under the guise of a Wordpress site.
@LightningDust lolwut?
@NikiC I don't see why you put a strikethrough on ruby, as the question was about contemporaries, and php and ruby were begun in the same year.
@ircmaxell What's a better alternative for rapid application development on a web platform? I can't think of one.
@ircmaxell pic or didn't happen...
15:19
@ircmaxell I have a turd_polish repository.
@LightningDust Rails if you don't care about security.
C# if you don't care about compatibility.
@Bracketworks I do care about security. :P
@LightningDust first off, why the qualification on rapid? since when do good applications have to be written fast?
@Bracketworks s/security/security, performance and scalability/
C# is not better.
15:20
@LightningDust In obj-c you only use obj-c if you cannot write it as c.
@ircmaxell Because we want to complete them, otherwise we'd write instead.
I would like to keep Java and C# out of this though; I don't think they're relevant to this particular discussion.
Or better yet, why save ourselves that much effort? Just write machine code.
@LightningDust I'd contest that; I just finished a project in ASP.NET C# with Razor, and it was pretty solid; easy to work with.
15:20
@ircmaxell That's a nice shine :)
@Jack i don't think it's possible to keep Java out of a PHP discussion any longer.
Not to mention it inherently supports many features we'd like to see supported in PHP (accessors, primitive type-hints, etc)
@LightningDust ummm, no.
@dyelawn And why's that? Is Java really that easy now?
@ircmaxell Damn. Nice! :P
15:21
@ircmaxell Why don't we write our web applications in assembler or machine code?
@LightningDust Not maintainable
@Jack i guess my comment is out of context. i did not mean as a replacement for php, just as something that seems to be pervasively influencing the php development community
@Jack Sorry, I think I wandered in halfway, but C# is still a highly viable web-oriented language.
@LightningDust because it's not worth the time and is not maintainable
@ircmaxell The answer is, of course, because it would take forever. Hence the need for rapid development.
15:22
but rapid developed code isn't maintainable either
so maintainability is what exists between rapid and "asm-style" code
@ircmaxell You can pick up a PHP framework and make code quickly and in a maintainable fashion.
and no, it doesn't take forever
@LightningDust You can pick up a PHP framework, and kick yourself a month later too.
RAD (and hence Ruby-On-Rails) is good for exactly one use case: Rapid Prototyping
@ircmaxell put a nearly in there...
15:23
@Bracketworks :)
get it working quick, show it, then tear it apart and rebuild it once you need to change anything
@ircmaxell Rails is the only framework with a similar experience, that I've tried.
@ircmaxell and that has its own issues.
@dyelawn My whole point was to take technologies out there as easy as php and are not a "pile of crap" :)
Look at every major ROR site out there. Major parts of it are torn out and rewritten once it goes live
@Jack i like ruby
15:23
Twitter is only using ROR in very few parts of their stack
and i think it's pretty easy
@ircmaxell Same for ASP.NET MVC3/4
and they've suffered because of it
@Jack Ruby, Python, Perl, Java, C#.
@LightningDust Anyone who writes machine code / asm in this day and age had better be writing for embedded systems. Write it in C so it is portable.
15:24
Instead, use good architecture form the beginning, and you're not a slave to your framework
Perl?!
@ircmaxell Didn't Twitter pretty much port their whole stack to Java?
@LeviMorrison or operating systems
@LightningDust why?
@ircmaxell Performance
@LightningDust Scala I think.
15:24
@ircmaxell Perhaps, but even then I'd be wary because of portability reasons.
@LightningDust No. Maintainability
Which takes me back to my quote earlier: Sometimes performance matters, and the rest of the time I use PHP. :P
you can still write and get up to speed quickly using frameworks, but you make architecutral choices so that you can swap out the framework if it starts to become your bottleneck...
@ircmaxell They did also suffer from performance though.
i've particularly enjoyed ruby syntax and limited inheritance.
15:25
@Jack They suffered from scalability, which is a result of the lack of maintainability. The performance issues were a byproduct
Ah, fair enough.
instead of digging through eighteen files to find out where a method is defined (ahem, symfony)
@ircmaxell Scalability and performance are very closely linked.
Not as much as you think
it's a casual relationship
@ircmaxell It's the same reason that Facebook have gone to such great lengths to make PHP faster with HHVM etc.
15:26
@dyelawn Use a decent IDE and it will take you right to it. Code exploration is one of the few things where an IDE shines over a flat text editor.
You can have high performance without wide scalability. and you can have wide scalability without high performance
@LeviMorrison i don't want to need an IDE though.
You only really need both at near facebook levels (top 10 sites)
@LightningDust You can make it more scalable with stuff like ... custom tcp/ip stack, doing your own memory management and cpu allocation :)
and it seems silly to have so many interfaces and classes that contain only a couple methods or properties
15:27
@ircmaxell And Twitter is well up there
or sometimes no methods or properties at all
@dyelawn I did not say anything about requiring an IDE. I did say something about code exploration.
Of course, sometimes things are definitely over-engineered.
you said use a decent IDE to solve my problem though
@LightningDust but the point is that both are actually separate measures. One can improve the other, but it's a casual loose relationship between them...
15:29
@ircmaxell so does the performance difference not all come down to compiled versus uncompiled languages?
@dyelawn I think Facebook shows that it's a large part of it
@dyelawn That doesn't mean your project requires an IDE. I just tried to highlight one of the mundane tasks of programming that is eliminated by good, proper tooling.
@LightningDust Check out the video for c10m. It explains performance vs scalability quite well.
46
A: Why is PHP apt for high-traffic websites?

ircmaxellWhat you'll usually find is that it's not as slow as you think. The reason a lot of sites are slow is because the hosts are overloaded. But one primary benefit of PHP over a compiled language is ease of maintenance. Because PHP is designed from the ground up for HTTP traffic, there's less to b...

@dyelawn not at all, no. But it's not the significant factor in it
@Jack Will take a look later on
15:30
@dyelawn Compilation can be cached.
People give IDE's such crap in this room. If you depend on an IDE then you are doing it wrong, but IDE's can be the right tool for certain jobs. One such task is code exploration.
7
For example: Profile a typical web application. The majority of the time is spent in either network operations (cache and database transfers) or I/O operations (database queries, filesystem queries, etc)
@LeviMorrison Definitely agree with that!
@LeviMorrison Totally agree.
@ircmaxell that was a poorly constructed sentence. i was trying to ask if compilation was the most important factor
15:31
how can i prevent users from logging into my app via url' if they are not logged in?
@LeviMorrison i'm not giving them crap, i just prefer not to use one atm
@Duikboot NARQ
(elaborate please ;))
narq? :P
optimizing PHP to C++ or whatever for performance is really like putting racing fuel in your Ford sedan.
Can't say I've ever felt like I would be better off without an IDE
15:32
@ircmaxell well that seems to be more of an architectural issue than language-based; so it doesn't really explain the necessity for a switch from [x] to Java
?page=overview can only be cccess if there is a user id but sometimes i do headers to those pages and then the system goes in the mist.
Yes, there are plenty of cases where it will help, but typically you're not going to see the difference unless you're running on blistering scale and page-views
@LeviMorrison depends .. lately i have found that SublimeText is good enough for code explanation
@ircmaxell And scalability is putting a V12 inside the very same Sedan? :)
@Jack not quite, but I see where you're going :-P
15:32
@LightningDust I don't feel like I am. But I also don't currently want the financial/time commitment of working an IDE into my day-to-day
@tereško SublimeText is a great editor, but in my opinion it is borderline IDE.
@dyelawn Fair enough, I can empathise with that position as I'm currently changing from one to another.
And there's definitely a marked slowdown.
what's a ford sedan?
@dyelawn Please realize that the problems that Facebook and Twitter are solving are not your problems. And they're not problems that most developers will ever face. So looking to them as examples of what you should do or how you should do it is irresponsible at best...
sounds like a vegetable car
15:33
IDEs are dependent on workflow; if notepad.exe integrates all the necessary features for you to develop efficiently, it's an IDE.
Okay, so ehm, where's the "crap" inside the underlying implementation of PHP? Is it stuck somewhere? Unmaintainable? Is C the wrong language? Something else? @NikiC
@ircmaxell i'm not looking at them as examples of what i should be doing. i'm looking at them from an academic perspective as an opportunity to learn.
@dyelawn which is why it's worth discussing, but in the appropriate context
@ircmaxell is a discussion in a php chat about why a large company might switch to java not the appropriate context?
15:36
who is switching from php to java?
No, because there are tons of choices that go into choosing a platform, and this discussion thread makes it sound like performance is a significant one. And in most cases it's not (despite what people may say)
@Jack Few sane people.
@Jack Yes, both unmaintainable and wrong language are true ;)
Bah, I've tried doing the simplest stuff in Java ... it was horrendous!
I'll give you an example: I was given a project recently for a medium-scale site (think alexa top 40). The requirements were that edits go from the CMS to the edge in less than 1 second ("instantly"). I did the math and showed that going from 1 second cache TTL to 30 second cache TTL saved around $800,000 a year in hosting costs alone... Guess what decision was made?
15:38
high-availability, high-performance, web scale, share nothing architecture
Everyone wants everything, until you show how much it costs
@Jack - Java is definitely not that difficult.
@Jack i don't know about switching, but there's definitely a lot of java sensibility spilling over into php
Looks like this room is pretty active
@igorw shut up and take my money!
15:39
@Jack It's not on the C++ headache level, definitely.
@LightningDust Really? I tried to read a file into memory and turn it into a base64 encoded string. After 10 lines of code I just threw it out.
@LightningDust Yes, I know. Java causes a lot more headaches :P
8 mins ago, by dyelawn
@ircmaxell well that seems to be more of an architectural issue than language-based; so it doesn't really explain the necessity for a switch from [x] to Java
@dyelawn Yes, some oop concepts are moving across, I agree.
@igorw so stack is pretty cool.
15:41
@dyelawn The point being that requirements dictate architecture which dictate platform choice. Not the other way around.
@Jack

    byte fileChunk[] = new byte[3000];
    try (FileInputStream input = new FileInputStream(file)) {
        while(input.read(fileChunk) >= 0) {
             Base64.encodeBase64(fileChunk);
        }
    }
Something like that
@LightningDust fixed font
@ircmaxell I think comfort and experience really dictate architecture.
To ensure your code matches your team's specs, just tell your team to write the specs after they write the code.
@TheSnooker in practice? Yes. In optimum situations, no...
@NikiC Tried :(
15:43
@LightningDust there's a button on the right
@LightningDust echo base64_encode(file_get_contents($file));. I mean, dafuq, right? :)
@LightningDust Or just use ctrl+k
@ircmaxell I know I for one would be hessitant to switch to a new framework/pattern if I was used to using a different framework/pattern. But thats just because I'm lazy and don't want to.. lol
@Jack or just abstract that away
@dyelawn it would be if a) people understood what it's about and b) actually started making some middlewares ;-)
15:44
@TheSnooker being the key word
@ircmaxell hmm, base64 input filter .... :)
@igorw i'd like to think i understand what it's about. maybe one day i'll have some time to make middlewares
@ircmaxell yus.. though i will say I resisted MVC but I love it now.
@Jack I'd expect it could be done in an easier way than that, it's just the first thing I thought of. I don't use Java much. :P
@igorw I showed it to some Drupal guys that work here, and was walking them through the concept, and blew one of their minds with what could be put there... We actually came to an interesting conclusion based on where certain logic belonged...
15:45
anyhoo ,, that's just to show that for even the simplest of things, Java is making into something complex. can't stand it.
One really wanted to come to your talk about it, but was tied up
@Jack If I need performance I tend to bite the bullet and just use C.
Has anyone here done JQuery Validation with remote PHP file?
@LightningDust Bad approach. You should bite the bullet and use C++
@LightningDust except that C isn't that fast for a lot of things (you can get much faster than it depending on what you're doing)
15:45
@LightningDust I rarely needed C.
People don't respond in javascript room and I think my PHP code is messed up
@DemCodeLines Just make sure you're not relying on only client-side validation.
@DemCodeLines you need to start dumping some of those vars and doing it without ajax first.
It's very easy to bypass.
@Lusitanian not sure, it doesn't seem urgent enough to warrant special attention from jordi. at least it doesn't seem to affect that many users. patches always help I guess, but not sure I have a good answer for you, I'm afraid.
15:46
@ircmaxell those statements will just evoke more questions though ;-)
@ircmaxell Really? I've rarely found anything that C isn't fast for.
JIT compilers can produce operations that are much faster than C, because it can optimize code FAR better in certain cases
@igorw @Lusitanian don't know if this matters, but the one time i had a composer issue i went to irc, jordi responded immediately and patched like 20 min later.
Especially when it comes to memory allocation
15:47
@LightningDust Well, right now I am, but that will be fixed later. The problem right now is that I can't get the validation to work.
@ircmaxell Yeah okay, that sounds a lot easier to many :)
@ircmaxell In this example C is still faster, you just have to optimize it.
@ircmaxell emphasis on "carefully crafted" as in "convoluted" as in using a non-inline function for something that should definitely be inline
@NikiC absolutely :-P
@NikiC - Exactly.
15:47
@ircmaxell Compiler used is QUITE old.
So it's not that C isn't fast, it's that C when used wrong isn't fast.
@DemCodeLines have you looked in your web inspector to see what, if anything, is actually being returned from your ajax call?
@dyelawn always depends how urgent it is and how easy the fix.
@ircmaxell JITs aren't very well at memory allocation. A lot worse than code written manually in C/C++
They can be good at some other things, but allocation definitely is not one of them
In any case, the bottom line is that C shouldn't really be used as the "I need more performance" argument.
15:48
@ircmaxell It's like saying a Ferrari isn't very fast if you don't put fuel in it.
@ircmaxell Also, Intel's compilers can inline across file boundaries using -ipo.
@dyelawn No and I don't think I know how to do that either.
@NikiC Not when it comes to buffers. As in C you either have to dynamically allocate (heap - slow), or allocate large blocks. Where in a JIT environment can stack allocate the exact ammount
And your bicycle is faster.
@Jack It's the best argument for using C, it is blisteringly fast when used right.
@LightningDust not at all. It's like saying a ferrari isn't as fast as a Jeep when you're talking about a rock crawling course
15:49
@ircmaxell What sort of buffers?
@DemCodeLines right click anywhere in the page, click inspect element, then select that javascript tab
@NikiC Anything where the length isn't known ahead of time. String buffers for example
@dyelawn I have chrome, so I am guessing you mean "Console" ?
@ircmaxell Except that these rocks are artificially imposed, C is faster on this problem, just not on this implementation of this problem.
You can also do dynamic stack allocations in C, you know...
15:50
@DemCodeLines sure
That's why we have alloca
wherever the javascript things happen
@LightningDust the course is the problem
Well, it doesn't show anything
Its blank
15:50
keep it open and reload the page
@LightningDust I disagree; sure, it's fast, but in so many cases it's not even the right approach.
Still blank
did you try submitting the form?
@ircmaxell sweet :) let me know if they do something with it
@ircmaxell When defining a problem, you don't define the method of solving it. It's like saying 'Plane vs boat, which is faster to New York... oh but you cant fly.'
15:51
@ircmaxell I'd even venture as far as saying that common std::string implementations will do a stack allocation for short strings. But I'm not sure on that
Yes, I did and the console doesn't have any writing on it except for the little arrow
@ircmaxell As soon as you remove the artificial limitation, C is faster.
i'm guessing when you do, an error notification will pop up somewhere, in the form of a number and a little red x often used in UIs to indicate that there's been an oopsies
Nothing like that happens
@LightningDust The point is that it's often not an artifical limitation
15:52
I know what you're talking about, but that doesn't come up
@ircmaxell It is
And my point wasn't that C is slow. It's that treating C as the fastest possible implementation is a dangerous tunnel vision
@ircmaxell I can't think of any example where C is slower than alternatives when optimized.
@ircmaxell No, it's not
Symfony 2.3.0, the first LTS, is now available http://bit.ly/130TMPX
15:53
ok. if you are getting any response from your server, you should be able to see the raw content of that response somewhere in your web inspector.
woooooo LTS
Typically optimized C is the fastest possible implementation other than very refined asm (which most of us, including me, do not have the skill to implement).
Also, assembly, even more so than C, has to be tailored for various platforms.
@Jack Correct
Either I don't know what you mean or there is something seriously wrong
i think it's without question that there is something seriously wrong
15:54
@NikiC Yes, it is. Because it ignores a lot of what goes into "performance"
@ircmaxell I think your point about performance vs scalability is the better argument though.
@ircmaxell Enlighten us :)
Do you want me to give you the JQuery code and the PHP code?
Well, then something has to be wrong here
15:56
If you need raw performance, then C or C++ are your goto languages. Don't believe in the "dynamic languages can be just as fast with a good JIT" propaganda
4
@NikiC Widen your view. I'm not talking about the performance at the string manipulation level
i'm sorry, i don't think i'll be able to help you solve your problem. i recommend learning how to track the process from endpoint to endpoint. it will make your life a lot easier.
@NikiC Actually, Haskel and Erlang may be your goto languages as well, do to their implied parallelism...
@ircmaxell No. No. They. Are. Not.
15:58
ummm
Parallelism ... now you have two (concurrent) problems.
you do realize that erlang was designed for high performance situations where C was becoming untenable to maintain and write...?
If you ever did any actual benchmarking with Haskell code (especially idiomatic Haskell code), you will quickly see that it is not as fast as commonly portrayed
@ircmaxell I'm referring to Haskell. I have no idea what Erlang is
Erlang = Ericsson language :)
15:59
Also, now you are talking about a performance / maintainability tradeoff, which is a completely different thing

« first day (961 days earlier)      last day (4213 days later) »