« first day (1719 days earlier)      last day (3242 days later) » 

1:00 PM
but... actually... yoru error is on line 355
 
The moment, when you fix an error after spending hours. That's a releif
 
oh yes
or optimise that piece of code that took 5 seconds to run into 10ms
 
haha
 
Hey pals, I think our @feeds is leaking today
 
I'm having trouble with laravel these days... I'm so used making stuff from beginning to start... that having stuff being put out of my control and it "magically" works is very unsettling
that is where my experience is a huge distraction
 
1:04 PM
@BenjaminGruenbaum Sounds like a nice idea
 
Thanks, let's see what the ES community thinks.
@MichaelDibbets cool :)
 
Not sure about the format, but generally it would be very valuable to have some interaction between different languages on design questions
 
When people propose stuff they research implementations of other languages, but usually the details, which are all that is ever important, usually do not end up in any documentation ^^
 
@MichaelDibbets That's the ideal way to learn, but I have 40+ sites to do in a month. I'd rather have everything work, be secure, and not suck because it's the 40th time I've done it :p
 
1:06 PM
This morning I had a noob moment ... if (0) something was doing something ... anyone care to guess which language it is? ;-)
 
@Ja͢ck Well, it certainly wasn't PHP!
 
@NikiC Yeah, it certainly was not!
Hint ... the 0 was an object ;-)
 
@Ja͢ck ruby?
 
bingo
 
Well, sometimes you dont have the luxery to avoid it @Amelia ... my boss forces me to use all windows software... which means when you need a CMS you are very limited in options... and october CMS uses laravel... so I need to learn a lot in a very short time
 
1:09 PM
@Ja͢ck ... wut?
 
I have no idea how 0 can be an object....unless they've over-ridden if to take an object.
 
So in Ruby 0 is a truthy value or what?
 
@Danack 0.class => FixNum hehe
@NikiC Yeah, only false and nil are falsy values
 
And how was the if over-ridden?
 
hmm, overridden?
 
1:10 PM
why was it doing 0.class not just value 0 ?
 
isn't it in ruby the same as in r or something, where 0 is the root?
so its always there?
 
@Ja͢ck That's ... kinda weird
 
@Danack No, that's what I typed to illustrate that it is an object :)
 
@MichaelDibbets OctoberCMS isn't too great a use of laravel. If it wasn't being made for 90% of use cases (and to compete with wordpress), you'd see a far better codebase :p
 
I understand requiring a boolean in if, but making 0 a true value is ... weird. just weird
 
1:11 PM
yeah, a little odd
 
yea. But october is a nice clean slate for the very specialised software i have to code. you can literally go everywhere with it
 
but i've seen php, i know what odd is
 
@MichaelDibbets The idea is to write your application logic that actually does stuff separately from the framework and use controllers to hook it up. October is pretty nice though
Especially if you dont know jack about programming
(Sorry @Ja͢ck)
 
what i like about october is that you basically dont have to worry about ui :-) you just plugi in the yaml files and you have your form fields working
 
@Ja͢ck In English almost all composite words can be legitimately written with a hyphen. Arbitrary composites are an element of Germanic languages that we just never seemed to be comfortable with, it really a personal stylistic preference though, IMO both forms are equally valid.
 
1:13 PM
@NikiC exactly, like the fact we have a mistake in our generators you guys pretty much knew about before.
 
@DaveRandom Oh, I didn't mean to correct the writing style ;-)
@Amelia I would be surprised if you knew me, actually :)
 
YehbutIknowhowyouDutchiesliketorunyourwordstogetherintoonelong one.
 
Indeed,werecoollikethat
 
Thats a messed up class name
at least captialise each individual word :P
 
1:15 PM
If you write code in German/Dutch, you are screwed if you try to stick to an 80 char line length limit
 
@MichaelDibbets That's so german of you :P
 
Capitalise all ze zings?
 
als(WaardeHouder.extreemGoedeVariable === 'Een tekenreeks in Nederlands') { deponeer_variabele(WaardeHouder) ;
}
mwuah :P i'll manage :P
 
Dutch JavaScript?
 
1:18 PM
no, basically var dump but then all in dutch :P
 
doe { } totdat ();
 
do while :P
 
do until actually
 
if_you_wouldnt_mind {
    // code
} actually_i_do_mind(\Exception $e) {
    // handle exception
}
 
hehe
 
1:19 PM
now that would be cool
 
@BenjaminGruenbaum We have a somewhat different approach around that than JS though. There is no explicit cancellation, there is only a destructor which will run the (relevant) finally blocks in the generator, in which case we obviously can't allow another interrupt in the execution.
 
that is why we need preprocessor macros
 
and so much more fun than try catch :P
 
@NikiC what about async cleanup in coroutines?
 
(old but still good)
 
1:20 PM
@BenjaminGruenbaum Can you be more precise? ^^
 
announce 'Good morrow, fellow subjects of the Crown.'; <3
 
oh my dear british god
 
You have a coroutine like @rdlowrey's and you want to do cleanup in the finally block after an action has been cancelled
Or "destroyed"
 
@BenjaminGruenbaum The finally block will be run either if you throw into the coroutine, or if the coroutine object is destroyed
 
@NikiC You can't yield there to wait for async things, that's the problem.
 
1:22 PM
Yes, that's what I mean @kelunik
 
Yes, you won't be able to do async in finally if it's outside of normal or exceptional control flow
 
I once played around with a php version someone had hacked together where goto was hacked into it... now that was interesting :P it felt like cheating hehe.
 
Now I wonder what Hack did
 
goto is hacked into php since 5.3
 
In async
 
1:27 PM
@BenjaminGruenbaum Basically we use the Python approach without explicit close()
 
@MichaelDibbets goto is a PR from 2003 by sara that got merged. Funny story.
@NikiC what does that mean?
 
Where you also need to rethrow GeneratorExit if you catch it
 
I'm talking bout end 90's..
didn't know it actually got in a real release o_o
ah. this one is with labels. the one I fiddled with was with line numbers
 
@NikiC hmm, interesting.
 
But maybe I'm understanding the problem here wrong and thinking about something totally different ^^
 
1:30 PM
@NikiC GeneratorExit of a subgenerator or where can you catch that?
 
@NikiC ^ sorry forgot to ping
 
Anyone knows what's the replacement function of this woocommerce's depreciated function?
woocommerce:nonce_field()
 
@kelunik In Python if you close() a generator (or it gets destroyed) you essentially do a throw(GeneratorExit) with the additional requirement that you can't ignore this exception, if you catch it you must throw GeneratorExit again
 
Better ask on wordpress room I guess.
 
@BenjaminGruenbaum Yeah, so basically we have only the "coroutine termination" but not the "explicit resource desposal"
 
1:38 PM
I wonder if that's something you need
 
Maybe ^^ Nobody complained yet, but we can ask @bwoebi @rdlowrey @Trowski
 
Is Hack seeing adoption?
 
@BenjaminGruenbaum I see there's been a lot discussion about RegExp.escape wrt context
 
@NikiC yes, it's a lot harder than what I figured it'd be but I learned a lot from it so far so overall I'm pretty satisfied :)
 
Which direction do you currently lean?
 
1:42 PM
@NikiC About not being able to use yield in finally for terminated generators? I did, but probably not here. ^^
 
@BenjaminGruenbaum I didn't get the impression that it's being used much outside FB
 
@NikiC me neither.
@NikiC make it safe and allow an extra escape set.
 
@BenjaminGruenbaum Safe in all context?
 
@NikiC if it was up to me I'd make the code that stringifies a RegExp stricter and make that convert escaped numbers back to numbers.
So if you stringify the resulting RegExp it's readable but it's safe when it's the result of escape
@NikiC yes, that seems possible.
What do you think?
 
@BenjaminGruenbaum That sounds like a good idea
 
1:47 PM
I want to play devil's advocate in the GH for a bit though
 
I thourougly hate M$ sql server... I think someone who thought up their queries forms was like... how can we make this as hard as possible without any easy logic...
MERGE INTO REIS_FINANCIEEL_LAST_ACCESS WITH (HOLDLOCK) AS target
USING
(SELECT :id AS id, :lastaccess AS lastaccess, :ip as ip ) AS source
(id,lastaccess,ip)
ON
(target.id = source.id AND target.ip = source.ip)
WHEN MATCHED THEN UPDATE SET lastaccess = :lastaccess2
WHEN NOT MATCHED THEN INSERT (id, lastaccess,ip)
VALUES (:id2, :lastaccess3,:ip2);

That is on duplicate key update... don't ask me how it works.. it works but I fail to see proper logic in why variables are at the places they are .... I sorta ish grasp it, but not completely...
 
@bwoebi I stil owe you that gc bugs reproduction, but I'm currently outta time for anything :P I didn't forget that though. You will be pinged later.
 
2:02 PM
@bwoebi You don't have to move it's definition into a .c for things to be an abstraction. Just document it in the code saying "use these functions instead of directly accessing the struct members".
Though I admit that it may not work that well in Internals ^^
 
posted on July 01, 2015 by kbironneau

/* by migalo */

 
Okay... I assume the joke is the list gets fixed and not the software :P
 
@LeviMorrison having dived in internals recently, lol. There's no doc, so you quickly end up going to the source to know what to use.
 
> [...] after wasting years of fights about pointless subjects, the PHP community, and especially Zend, is so afraid of HHVM that they switched to panic mode and decided to propose something 'quick-and-dirty' as soon as possible. IMO, that's a wrong, defensive, strategy but the community was naive enough to approve a whitecard RFC.
> Actually, I don't even know if we can regain control someday from Zend. Hope we can but it will very hard because we've clearly switched from IT to politics and marketing. The biggest issue, IMO, is that I absolutely don't trust them to lead a strategy against HHVM and facebook.
 
@marcio link?
 
2:07 PM
WTF :D I thought there was some unwritten law to do not say these things out loud...
 
hmmmh... now I remember where i recognise hack from lol
 
@FlorianMargaine it's from the mailing list
 
@marcio ah
 
but back then it wouldnt run on the windows server I had to work with so we abandoned it
 
I unsubscribed a couple of weeks ago
 
2:08 PM
maybe I should reexamine hack some day
 
search for "panic" keyword ;)
 
oh, it's Francois
 
2:11 PM
 
just make sure you have your towel
 
Every rendering I see of the HHGTTG cover looks wrong to me. They are supposed to be "friendly" letters, people always seem to pick really imposing fonts for it, that doesn't seem right to me.
 
I know... but i couldnt find the bbc drama series one
 
I can't remember what the book looks like in that, I've not seen it for ages
tbh it's not that good IMO, just stick to the radio plays if you want that version
 
nah, i like it :P a bit of britisch nostalgia
Especially zaphod was fun in that one
 
2:18 PM
Yeh, I just mean that the radio version of the BBC thing is better than the TV one
 
the book is even better
 
Ahh yeh I remember
Turns out my internet upload bandwidth at home is decent enough to live-stream video, that's pretty cool
 
(230MB/30mins DivX in AVI)
 
right, i forget not everybody has 200mbit
 
2:21 PM
@MichaelDibbets Was just watching the HHGTTG to try and find a shot of the book so I could get a still of it
 
haha, yea, the nice shot of the book is hard to find... it actually doesnt show that often :9
 
@MichaelDibbets In UK, in cities at least, 80/20 VDSL is pretty common now, but everything is still heavily asymmetric
 
yea... assymmetry is still strong in the netherlands too
my download is 200mbit, but my upload is like 20mbit
 
Good morning
 
which sucks
 
2:22 PM
If you go out into the sticks you can end up stuck with 16/1 ADSL2 or even 8/0.8 ADSL
 
oh man... that brings back memories... like 16 year old memories lol
our first adsl after dialup
 
Or 5/0.7 like me in the city centre. ;_;
 
it seemed so fast back then
 
Even @Fabor lives in the middle of a large-ish city and is stuck on a shitty ADSL2+ service on a long a crappy quality copper tail
 
128kbs...
4x as fast as dialup on a good day
 
2:24 PM
And no hope in sight. :(
 
no fiber or cable?
 
It's a lottery, which @Fabor has not yet won
 
And will not win considering response from the chasing I have done.
 
that wouldnt survive in the netherlands lol
 
2:25 PM
"Not viable for upgrade".
 
We have a lot of dark fibre in weird places, and a lot of densely populated areas with nothing but copper (or worse)
 
everybody would simply switch over to other provider
dutchies are willing to pay big bucks for high speed heh
 
There's fibre available in every building around me @MichaelDibbets. Just mine which is a single cabinet got left out
 
There are only two physical networks in the UK, one of which is very limited coverage and not really expanding
 
cant you just pay the what, 350 to get it hooked up?
 
2:26 PM
Try £10000+
 
Requires man to come and dig up road
 
At least
 
here too.. but thats like 350
but we have all sidewalks here
I dont know how it is at your place of course
 
Must be nice. I'm gunna stop reading chat for a while. Too depressing.
 
2:27 PM
sorry :(
 
pay one of your neighbours to get a decent connection and buy a good router, or really long cables ... job done ...
 
@MichaelDibbets It's complicated. Every location is case-by-case, obviously, but chances are the blocked here is that there's a stretch of road that would need to be dug up to drop/repair a channel, and they aren't going to do that while there are still easy wins out there. It's historically complicated and highly politically motivated, I could tell you in painful detail but I won't because you wont care and I don't have the time
(I am a sort-of-ex telephone engineer, I still get roped into it sometimes)
 
hmmmh
well here int eh netherlands the local govt kinda says to providers
either you do EVERYONE, or no-one
so they kinda have no choice
 
well, we can't all be perfect @MichaelDibbets
 
I hate apps script
 
2:30 PM
makes it a big risk for the companies, because usually only 20-30% subscribes initially
 
yo @ircmaxell
 
When I'm getting a string (in zend_compile.c) from ast with zend_ast_get_str and I need to pass it to arg infos (and store it there), should I copy this string or should I just zend_string_addref on it?
I used to do addref, but now I see some code that instead copies this stuff
 
@MichaelDibbets Well we have a unified national network on the physical side of things, SPs are only responsible for DSLAMs upwards, so that means we're at the mercy of what's basically a public service, only it's run privately as a business, which in many cases results in the little guy getting screwed over
 
sup @JoeWatkins?
 
@nikita2206 copies how ?
with zend_string_copy ?
 
2:32 PM
yep
 
long time no talk, how are you doing?
 
@ircmaxell just waving ...
@nikita2206 look at what it really does ...
@ircmaxell not too shabby, yourself ?
 
Okay... so basically companies have more rights over certain public services than in the netherlands
good to know
 
ah...thanks^^
 
np :)
 
2:33 PM
@MichaelDibbets Yes and no. Like I say, it's really complicated.
 
Anyhows, I have to go. So long, and thanks for all the fish
 
@JoeWatkins doing quite well
will be able to tell why in the near future ;-)
 
oooh ... something juicy I hope ...
 
you can say that
a few things juicy even :-P
 
Bunch of grapes?
:-P
 
2:44 PM
@LeviMorrison hah :-P
 
Some guy just said "I am sorry" to me being involved in the PHP community. All I need to know...
3
joke was on him, since I got his date's number ;-)
 
@NikiC awesome stuff in the php-cfg repo. In the next week or two I should have time to start doing more with it
now, the question is, how do you do SSA with global variables and references...
 
Can anyone help me with conditional formatting? I'm looking to color text a certain color for one hour and then after that it turns to the color black.
 
@sambo613 Where are you stuck in specific>?
 
2:59 PM
Just how to implement this into my table that I have.
 
You want us to explain everything to you?
 
Don't do it in the table - do it as a separate function, that returns a variable that you can just use in the table?
 
Or do you have an specific problem?
 
No, you don't have to explain everything, I just want to know how I should start something like this off. What are the first steps?
And Danack, that's what I was thinking of doing. But I don't know how I should check to see if an hour has gone by yet in an if statement.
 
i) Think about it a bit ii) write some code. Repeat...
 
3:01 PM
The very first step would be to open your texteditor / ide
You see what happens when you aren't specific?
Nobody will be able to help you when you don't give specifics
 
if ($time_date <= $time_date('+1 hour'))


echo "<tr class=\"timeclass\"></tr>
 
Does your company have a timezone problem? #leadership http://t.co/xLgHgsSIiz
 
And then that brings up an error: Fatal error: Call to undefined function 2015-06-30 22:39:03() in F:\xampp\htdocs\LMCS Incident Manager\New\table.php on line 204.
 
@ircmaxell lol!
@sambo613 uhhu. And why do you think that happens?
 
I like that fcall!
 
3:05 PM
@sambo613 try 2015-06-30 22:39:02
 
@PeeHaa, I don't know that's why I'm asking for help.
 
@ircmaxell politics question - what do you do to get out of a pissing contest? There's this person that no matter how much empirical research I show that disproves his statement keeps on arguing - feels like a pissing contest. Anything except for "disengage" I can do?
 
just walk away
 
@PeeHaa, above that last piece of code is this: $time_date = $row['time_date'];
And then above that is this: <?php date_default_timezone_set('America/Chicago'); echo date("Y-m-d H:i:s"); ?>
 
Duh ... function($field) use ($_POST) { ... } --> Undefined variable: _POST
I don't even know why I wrote that.
 
3:14 PM
@sambo613 you have a $ in front of the function. You shouldn't have $ in front of functions.....
 
^ function($field, $array) and pass $_POST?
 
@ircmaxell but then it looks like he won, no?
 
@AlmaDo It's used in an array_map(); when I saw the notice I just hit my face.
 
@Ja͢ck loser
 
@FlorianMargaine it will only ever look like either he won, or you both lost
 
3:16 PM
(:
 
Yeah
 
@ircmaxell but duty calls :(
 
3:32 PM
UGH
PEOPLE PLEASE DON'T USE endif; IN PHP CODE
 
yes, use fi please
 
I'm working on a not-so-good codebase ;_;
 
there are different stages of "not-so-good", which one is yours?
 
Unlike most code bases which are awesome
 
@BenjaminGruenbaum I've worked on many codebases
this one is one of the worst
 
3:36 PM
:D Awesome
 
endif is the worst so far? -_- I've seen things... done things... you wouldn't forgive.
 
@Fabor no no, endif is a mild thing in this codebase
 
Anonymous
There's nothing wrong with endif; imo
 
I can't copy any code for obvious reason
but.. ugh
global variables, super-nested stuff, .. weird way to fetch data, etc.
fun stuff too
 
you can't and you shouldn't, for our sake and sanity.
 
3:40 PM
like, the frontpage had 2 millions sql queries, so they offloaded that to another system in a cron that displays the frontpage in cache
(yes, 2 millions.)
 
@FlorianMargaine To clients though... it falls under "Well it works..." :(
We had pages that took upwards of 20 minutes to load due to queries :P
We'd say "Load the page and then go to lunch"
 
except it's the frontpage :P
 
i've had something like that happen to me ... they were complaining that their sales reports were taking ages to update (i.e. half a day)
 
It's no fun working on such things unless you're completely rebuilding them
 
foreach ($results as $result) {
    switch ($result['foo']) {
        case 'bar':
            $bar = $result['baz'];
            break;
        case 'qux':
            $qux = $result['baz'];
            break;
    }
}
 
3:42 PM
turns out that the previous programmer had not heard of joins, so he was doing them manually ... over an SSH tunnel connection =S
 
they have this kind of code ^
except with dozens of cases
 
I need to find that link where a woman ranted about a college email verification system
Someone took the entire DB, loaded it into JS and then would iterate through that list in a loop to verify the address was valid
 
lol JAck
Florian, It is pretty amazing in a disbelief sense though.
Feb 9 '12 at 19:39, by Carrie Kendall
@tereško programming is like sex. One mistake and you have to support it for the rest of your life. hahaha
 
dirty :p
 
Of course, a lot of the time it's some other person who ends up doing support
 
3:49 PM
how so?
 
Look at @FlorianMargaine's case of the code he's working on now :P
 
Anonymous
I'm off o/
 
@FlorianMargaine Fuck dynamic programming languages. O(scary) ftw.
 
4:06 PM
posted on July 01, 2015 by kbironneau

/* by Thordax */

 
Found it. Was hard to find. Epic rant on bad coding
 
> I can store the valid emails in a data structure that allows O(1) membership testing
Probably not going to happen ;-)
 
4:23 PM
It's possible with an expected runtime of O(1) with hash tables with a perfect hash function. :)
 
s/possible/possible in theory, in practice it's not/
 
Yep. :)
 
because it requires an infinite sized array backing the hash table
 
and a guaranteed collision-free hash function.
 
@JoeWatkins
> Even if you never write $string = (string) $ustring, the engine will perform the same action all the time, whenever you pass a UString to anything expecting string.
except with scalar typing
 
4:30 PM
@ircmaxell But it will be (string) casted for weak scalar types, right?
 
@kelunik no. (Calculating the hash is O(length(string)))
 
@bwoebi i.e. O(n)
 
Unless your hash keys are as big as the number of elements, that's secondary
 
@bwoebi no, it's O(1), because length(string) is bounded by the RFC
@kelunik yes
 
Hah. Big constants are slow too...
 
4:40 PM
function strposa($haystack, $needle, $offset=0) {
	if(!is_array($needle)) $needle = array($needle);
	foreach($needle as $query) {
		if(strpos($haystack, $query, $offset) !== false) return true; // stop on first true result
	}
	return false;
}
I wonder if there's a better way for that
is there array_some in php?
 
No, I wanted to introduce it, but @DaveRandom said "eew yuck, not another fecking array_ function!"
I would have wanted to add array_some() and array_every().
 
yup, they're very useful
 
Every in-memory string op is O(1) because strings are bounded by memory size; right? @ircmaxell
 
@bwoebi O() is not about execution speed. It's about scalability with size.
@bwoebi no, they are bounded in a different way
however, that point is moot, because N is the number of emails. You can have a constant-time function (O(1)) over the set of emails that is not constant time over other sets/inputs
 
@Ja͢ck Make a class for stuff like that (or add it to ArrayObject or whatever). IMHO.
 
4:48 PM
@DaveRandom it's really weird to have array_map, array_filter, array_reduce, but not array_some/every
 
With the introduction of anonymous functions, the odd way in which array_map() works is kind of unfortunate as well.
but i suppose that can't be helped heh
 
@FlorianMargaine So give the class map/filter/reduce methods as well then.
I just feel that these are complex operations that are applied to complex collections, and so a complex collection container should be used for them.
But hey, what do I know, just because I don't like it doesn't mean it shouldn't be there ;-)
 
not that complex ... if (array_every($arr, 'is_int')) { ... } - I wouldn't want to use a container just for that.
anyhoo, gtg ... cya!
 

« first day (1719 days earlier)      last day (3242 days later) »