|
I mean sure, but I kind of feel like once you reach a certain point as a programmer, you realize that you could either religiously memorize the non-transitive points of equality in your programming language, or you could... find a language that does the work it's supposed to, while you do the work you're supposed to. Gah, I don't know.
|
# ? May 10, 2012 21:01 |
|
|
# ? Apr 28, 2024 22:04 |
|
Janin posted:I never get tired of posting this. and to tef ps I'm not sure what you meant earlier when you said 'elided' braces. Elision is the omission of one or more sounds in a word such that it's easier for the speaker to pronounce. I'm not sure what the analog to this with regards to braces would be - maybe something like code:
|
# ? May 10, 2012 21:50 |
|
I can sorta understand 0 == null and "" == null but "php" == 0 is . Someone explain that to me.
|
# ? May 10, 2012 22:03 |
|
MEAT TREAT posted:I can sorta understand 0 == null and "" == null but "php" == 0 is . When one operand is a string and the other is an integer, it juggles the string to a number for comparison. If the string begins with numeric data (optional sign, number, optional exponent), it evaluates as that number. Otherwise, it evaluates as 0. From PHP.net: php:<? $foo = 1 + "10.5"; // $foo is float (11.5) $foo = 1 + "-1.3e3"; // $foo is float (-1299) $foo = 1 + "bob-1.3e3"; // $foo is integer (1) $foo = 1 + "bob3"; // $foo is integer (1) $foo = 1 + "10 Small Pigs"; // $foo is integer (11) $foo = 4 + "10.2 Little Piggies"; // $foo is float (14.2) $foo = "10.0 pigs " + 1; // $foo is float (11) $foo = "10.0 pigs " + 1.0; // $foo is float (11) ?> Golbez fucked around with this message at 22:18 on May 10, 2012 |
# ? May 10, 2012 22:14 |
|
I would say I'm pretty well seasoned in PHP, but 1) I never knew == was not transitive and 2) I never knew "php" == 0 is true, which is probably why I assumed == would be transitive. Man, that is truly horrible.
|
# ? May 10, 2012 22:28 |
|
Golbez posted:** Most people simply go for /[^A-Za-z ]/, without realizing the single space part of the instructions. unicode Otto Skorzeny posted:and to tef tef fucked around with this message at 22:50 on May 10, 2012 |
# ? May 10, 2012 22:44 |
|
Otto Skorzeny posted:ps I'm not sure what you meant earlier when you said 'elided' braces. Elision is the omission of one or more sounds in a word such that it's easier for the speaker to pronounce. I'm not sure what the analog to this with regards to braces would be - maybe something like Yes. tef posted:What happened to your old avatar? I liked that one.
|
# ? May 10, 2012 23:05 |
|
Otto Skorzeny posted:and to tef In the JVM there is the concept of lock elision where if the JVM detects it can remove a lock it will do so
|
# ? May 10, 2012 23:20 |
|
Zamujasa posted:Besides, I can't help but think that localization issues might cause problems, too. Does it always use "days"? (Then again, PHP in general seems to barf all over localization formatting.) If it's localization you're worried about, you already got yourself into trouble earlier... Zamujasa posted:The documentation says 0 == Sunday and 6 == Saturday. A number of countries (mostly in the Middle East) consider the weekend to be Friday and Saturday, and some consider it Thursday and Friday.
|
# ? May 10, 2012 23:21 |
|
ToxicFrog posted:What happened to your old avatar? I liked that one. So did I Some ie9 user got butthurt that my avatar crashes/slows down their browser
|
# ? May 11, 2012 00:04 |
|
Does anyone know anything about Modelica? Because I'm in a training seminar and it's looking like Modelica inheritance exists as a shorthand for composition rather than as a facility for any sort of substitutability semantics. Is that a horror? It feels like one.
|
# ? May 11, 2012 00:29 |
|
Zhentar posted:If it's localization you're worried about, you already got yourself into trouble earlier... I was operating under the assumption that getdate() always returned the same values (being numerical), while text-based functions like strtotime() and date() would be localized.
|
# ? May 11, 2012 00:42 |
|
MEAT TREAT posted:"php" == 0 is .
|
# ? May 11, 2012 01:30 |
|
Otto Skorzeny posted:ps I'm not sure what you meant earlier when you said 'elided' braces. Elision is the omission of one or more sounds in a word such that it's easier for the speaker to pronounce. I'm not sure what the analog to this with regards to braces would be - maybe something like
|
# ? May 11, 2012 01:40 |
|
Ps i love performing strength reduction when my crappy compiler won't it just brightens my day so much!
|
# ? May 11, 2012 02:05 |
|
Not to jump on the PHP bandwagon, but: Aspect Oriented Programming in PHP
|
# ? May 11, 2012 02:05 |
|
narbsy posted:Not to jump on the PHP bandwagon, but: Aspect Oriented Programming in PHP What the gently caress?
|
# ? May 11, 2012 03:28 |
|
Semantically significant comments. Hell loving yes.
|
# ? May 11, 2012 03:36 |
|
yaoi prophet posted:Semantically significant comments. Hell loving yes. I like how you actually have to 'compile' your php code if you use that framework. Just what php needs.
|
# ? May 11, 2012 03:39 |
|
Which of course raises the question, why have the directives in the comments?
|
# ? May 11, 2012 03:40 |
|
Extending the syntax generally breaks IDEs and such.
|
# ? May 11, 2012 04:07 |
|
Plorkyeran posted:Extending the syntax generally breaks IDEs and such. Hello attributes/annotations, nice to meet you!
|
# ? May 11, 2012 04:45 |
|
Plorkyeran posted:Extending the syntax generally breaks IDEs and such. As a C++ programmer I would argue that thats half fun!
|
# ? May 11, 2012 04:56 |
|
tef posted:So did I Break all the browsers!
|
# ? May 11, 2012 05:52 |
|
narbsy posted:Not to jump on the PHP bandwagon, but: Aspect Oriented Programming in PHP I wonder when colleges will start offering Underwater Aspect Weaving.
|
# ? May 11, 2012 05:57 |
|
Golbez posted:When one operand is a string and the other is an integer, it juggles the string to a number for comparison. If the string begins with numeric data (optional sign, number, optional exponent), it evaluates as that number. Otherwise, it evaluates as 0. just saying
|
# ? May 11, 2012 10:39 |
|
A horror by mine own hand:code:
|
# ? May 11, 2012 10:58 |
|
Zombywuf posted:26 year old bisexual. First, I'm a cachemaster. If you’re unfamiliar with that term, it means I'm a master of the proxy. You wouldn't last one hundred milliseconds in a query against me, I assure you.
|
# ? May 11, 2012 18:56 |
|
Gul Banana posted:26 year old bisexual. First, I'm a cachemaster. If you’re unfamiliar with that term, it means I'm a master of the proxy. You wouldn't last one hundred milliseconds in a query against me, I assure you. 30 year old straight white cis male. 100ms at the proxy? Last one I worked with had latencies in the single digits, unless there was some specific hack in there to fix some lovely backend bug or marketing wanted some lovely targeted redirect/splash screen.
|
# ? May 11, 2012 20:04 |
|
So I was going to revisit that "fractal of bad design" writeup to reference something to a coworker, and in doing so I found something of a (sad, depressing) horror when googling to get to it: Google => php fractal of bad design: It's not even on the first page. Every hit is a blog or forum or whatever TALKING about and relinking the original. One is in a forum for a small, out of the way piece of software that is used where I work and therefore I have it referenced a lot in my history, but their site sure as poo poo doesn't see the kind of traffic to merit it being front paged like that. The same search terms bring it up as the first hit in both DuckDuckGo and Bing. Google, man, what happened? I hear a lot of talk about how Google has started making GBS threads where it eats when it started to bring Social Networks into its search, but this is the first time where it's really struck home. EDIT: His blog isn't directly linked until page 12, and then it's just to the docroot, not directly to the article. Bhaal fucked around with this message at 21:29 on May 11, 2012 |
# ? May 11, 2012 21:16 |
|
Bhaal posted:I hear a lot of talk about how Google has started making GBS threads where it eats when it started to bring Social Networks into its search, but this is the first time where it's really struck home. I remember when Google removed/de-ranked blogs from their search rankings because they were too spammy.
|
# ? May 11, 2012 21:22 |
|
Zombywuf posted:I remember when Google removed/de-ranked blogs from their search rankings because they were too spammy. Can't be that, it's the first result for "php: a fractal of bad design".
|
# ? May 11, 2012 21:40 |
|
Yep. Including the "a" brings it to number one for me. I have no idea why.
|
# ? May 11, 2012 21:55 |
|
It's how Google is treating the keyword. The first guy's search it seems like they're treating 'php 'fractal' 'design' 'bad' etc. all separately. It looks like an exact match for the title though 'php: a fractal of bad design' which Google is probably treating as a granular, indivisible keyword. What's messing up the first query is probably because they're weighing 'php' (an enormous keyword) and 'design' more.
|
# ? May 11, 2012 21:58 |
|
Dont forget that Google customizes results based on your search history. I get a lot more programming based results for otherwise ambiguous terms, where I would get much more generic results from a non-customized search.
|
# ? May 11, 2012 23:09 |
|
Geekner posted:Dont forget that Google customizes results based on your search history. I get a lot more programming based results for otherwise ambiguous terms, where I would get much more generic results from a non-customized search. I search with my account logged in, and then in Private Mode, and I saw no differences.
|
# ? May 11, 2012 23:42 |
|
Suspicious Dish posted:I search with my account logged in, and then in Private Mode, and I saw no differences. Same browser and same IP? Google probably can infer it's you just from that, (or from some other long lived cookie you didn't wipe out, I'm just postulating)
|
# ? May 12, 2012 02:14 |
|
trex eaterofcadrs posted:Same browser and same IP? Google probably can infer it's you just from that, (or from some other long lived cookie you didn't wipe out, I'm just postulating)
|
# ? May 12, 2012 02:35 |
|
Guess what this evaluates to in JS:code:
|
# ? May 12, 2012 07:46 |
|
|
# ? Apr 28, 2024 22:04 |
|
A universal Turing machine.
|
# ? May 12, 2012 08:09 |