« first day (2460 days earlier)      last day (2713 days later) » 

user924016
00:52
@Leigh congrats
tee wy ronni
oi, aren't you a euro, get to bed!
user924016
Yes sir
user924016
nn
me too, nighty night, xx
 
3 hours later…
03:30
someone needs to get jeeves some badges to qualify for the next election
04:11
mornings
04:27
morn
@Leigh lol
morning
o/
any one want to see grumpiest cat in world?
05:06
moin
morning Joe o/
posted on July 11, 2017

New Cyanide and Happiness Comic

2
hahha
05:26
mornings2
i killed a mosquito yesterday
but in the process i've slapped myself in the face
that sums up my day pretty accurately
:P
05:57
Hi. Can anyone help me how to have 10 data per page in data table?
and copied the datatable as well as the script, the datatable template works but there is pages but only 1 page
return
06:53
o/
\o mornin @Patrick
Suppose I write some unit tests to test my object, and I mock out a third party SDK and fake what it's returning to see how my object responds. If their SDK is updated to have a different API or something, my unit tests will still pass because they're not integration tests. Is there something I'm missing or do I just need both
Integration/Acceptance tests .. Unit tests wont cover that case
Anyways.. its how we do it, we regularly ran into the same issue. Now we just run a suite of integration/acceptance tests on our "build" platform
@Jimbo what @DamienOvereem says. Unit just covers the Unit. Google Testing Pyramid for further info
morning all
07:02
does the third party sdk have interfaces? if you mock those you will get errors if the interface changes.
subtle changes are more hard to catch. this is why we need design by contract..
It's a PHP SDK, written by Microsoft. Of course it doesn't have interfaces.
like, if method is said to always return a positive integer and then suddenly returns a negative one, with design by contract you would be able to spot it immediately
I'm basically wrapping their 'sdk' in my own actual sdk
Because theirs is a complete and utter ballsack
07:05
@Jimbo wrap the thing into your own with your expectations
What the lol!? Up/down voting on externals.io? o_O
@WesStark Is what I'm doing, but if theirs changes, mine breaks
I guess this is why I need integration tests
I'm testing my own wrapper
you only want it to break fast @Jimbo i.e. when you are running the test suite
@WesStark Yep, and it'll only break if they're integration tests, because I'm mocking out everything their shitty sdk can return to mine so it'll never fail
you don't want to spot errors in production. if api changes you can't do much except trying to detect errors as soon as possible
you don't need integration tests
wrap their api including your stricter expectations
07:08
@Jimbo when you say integration tests - do you mean full end to end tests - or a half way between? i.e. testing a cluster of units at a time test? - in either case end to end would catch it
I'm wrapping their sdk with mine, yes. So I'm now writing tests for mine, and I'm mocking their sdk (the thing I'm wrapping). So theirs will never fail in my tests, therefore my tests will now always pass even if their api changes
@the_velour_fog I'm thinking I need to test my wrapper, and their sdk, and it appearing in their API, so end-to-end basically yeah
as well as unit tests
why are you testing the wrapper?
what kind of api change you are trying to anticipate?
how is their SDK delivered is it and HTTP end point or a composer library? if its composer you could freeze the package?
API change is just an example. They're the only vendor available and they don't have tags, interfaces etc. I'm anticipating they'll fuck things up
Yeah I'm using the current version in composer. But if they make changes in the next version I'd like to not have to read everything and for my tests to catch it, if possible :)
Just yesterday, I submitted a PR. For a missing exception class. Srsly.
function getValue(): string{ // enforces string
    return $this->sdk->getValue(); // wrappee
}
07:12
@Jimbo the wrap it into an adapter and put some failsafes into it
^
type declarations are ok but you can do also assert()s
@Gordon but how do you write some failsafes - for future breaking changes that you can't know in advance?
see link above
the main point is protecting against catastrophic failure in your app
you dont want an api change to cause your site to become unusable (as in 500 returned)
circuit breaker can help protect against that
so for instance: when the api doesnt respond as expected, you just notify the user about some specific feature being currently unavailable or put an alternative implementation if available or something like that. and also make sure to alert your team so you can investigate the issue if it persists
I get that, it's ideal. Their SDK makes soap calls. It returns a response with multiple keys, values, a specific format. Will my adapter with failsafes really need to check every single one of these and make sure they exist / in the format expected? I'm basically testing their code at this point, aren't I?
07:21
depends on how much pedantic you want to be about it :B
yeah, kinda… you can limit testing to the parts that you are interested in. if that's all the keys, then it's all the keys
Is a shed tonne of work -.-
so its basically a more sophisticated version of register_shutdown_function that does condition specific responses?
@Jimbo depends. if the responses are directly mapped to some object and that fails, you dont need to test their stuff, but just try/catch and alert. and after n consecutive failiures, you stop querying for a while until fixed.
@Jimbo you probably want to test things that would pass unnoticed. if you access a key that doesn't exist you would probably get an error already
of course you need to make sure you can rollback the whole thing if one of such errors happens..
07:28
@Jimbo as for shed tonne of work: compare against the loss of money when it doesnt work
your job to find the right balance :)
Yes is significant loss of money, many options, I'll have a think, thanks guys
another option would be to periodically run tests against the api and verify the results.
07:50
morning
morning, bitches ...
@JoeWatkins sup
\O
07:56
o/
libsodium extension was just merged into #PHP 7.2, enjoy your new shiny non-shit crypto API and thank @CiPHPerCoder and @jedisct1
@JoeWatkins ah, licensing got resolved?
@FlorianMargaine yeah everyone just agreed to change the license
08:00
cool
yeah, could have been much more complicated if we hadn't been able to make contact with some contributors ... worked itself out pretty quickly in the end
all that's left is someone needs to do a doc patch before 7.2 is GA
@salathe gets excited about big doc patches ... hint hint ... HINT HINT HINT ...
mornin
08:10
I'll file an RFC for a ull datatype in php… becuase I keep mistyping null
If adding \\ before constants and function/class names cause less work for VM how does it work with magic consts like __DIR__? Should I use \\__DIR__ instead?
@Gordon Maybe just add ull LiveTemplate in PHPStorm ?
@brzuchal not good enough. I want it to be part of the language!
nano optimization ... do whatever, the differences in performance are not your problem and won't accumulate to make real world problem in your code base either, no matter how large it becomes ... you would be better to spend your time optimizing code that could actually benefit from optimization in the real world ...
I also imagine it to be useful for other developers because it's one char less to type
@JoeWatkins Right, pragmatic approach - THX
@Gordon Just propose nil
08:15
ull has an implied meaning in C ...
unsigned long long ...
propose nada ...
nil doesnt work. I dont mistype null as nil. I only miss the n sometimes. so it has to be ull. if that interferes with unsigned long long, the unsigned long long has to go away
@Gordon It'll be less verbose
I have another solution ...
@JoeWatkins he'll mispell it as ada
you could just put more effort into typing ...
08:18
@JoeWatkins there there, PHP is the land of the lazy
@brzuchal it's not about verbosity. it's about accomodating the language to my typos
@JoeWatkins too hard :D
too lazy to learn how to write a real programming language, for example
:P
on a side note: linux should have an exot command natively. I am tired of setting up an alias for that
ah
for me it's xit
how to remove last two index from array in php?
08:19
I'm like C-c'ing to hell so the e is always missing
how to remove last two index from array in php?Is it possible?
no. you need to json encode the array, pass it to a nodejs server, remove the index and then pass it back to php
the best tool for typos: r-wos.org/hacks/gti
@Gordon is there any other way?
08:24
@abdul yes, you can xml encode it and use some sort of SOAP service
yes, you could also json encode the array and pass it to a enterprise java server, remove the index, then pass it back to php ...
@JoeWatkins enterprise java server… totally needs XML
[array_pop](http://php.net/manual/en/function.array-pop.php)

$a = ['gnu', 'yak', 'elephant', 'penguin'];
array_pop($a); array_pop($a);
print_r($a);
@the_velour_fog that's wrong. the entire php manual is fake news.
array pop just removing last array only...right? @the_velour_fog
08:25
my bad, definitely encode as XML, the stupider the better, SOAP is fine candidate ...
Serious business: routing.yml or annotations? Fight! :D
@DejanMarjanovic XML
@JoeWatkins lol
@Gordon after json encoded array how to pass it to a nodejs server in php?
@Gordon didn't you know php.net is fake on purpose? its to make the documentation more memorable
08:29
@Gordon :D
I'm gonna ping @Ocramius Spagetta
I know he loves XML
@abdul hes joking. array_pop will remove the last element from the array, call it twice to remove last two items - there make be a better way , idk
@Gordon never jokes, he's German ...
oh..k @the_velour_fog i'll try that method
@abdul you need to install pecl_http and make a POST request to the nodejs server
@the_velour_fog calling array_pop twice? dude, that's code duplication? What's wrong with you?
function pop_nth(&$array, $nth) {
    for ($i = 0; $i < $nth; $i++) {
        array_pop($array);
    }
}
feels dirty for using a reference
08:36
Is there 7.2 branch already created? I cannot find it on branches list :(
@FlorianMargaine I am sure Laravel has a Facade for that. But with a humane interface. Something like IndexRemoval with one method for each number 1 -n to remove
Array::pop_1(), Array::pop_2, and so on. Up to PHP_INT_MAX.
@brzuchal it's still master. AFAIK, it will branch of on the 20th
@gordon ok, how about this?

function doublepop($x) {
	array_pop($x);
	array_pop($x);
}
@the_velour_fog no. needs a closure
function pop_some_elements_from_an_array(array &$poppable, int $length) : array {
	$count = 0;

	do {
		if (!count($poppable))
			break;

		array_pop($poppable);

		if ($count + 1 >= $length)
			return $poppable;

		$count++;
	} while(1);

	throw new RuntimeException("the array provided does not have enough members, you idiot");
}
think you'll find it to be pretty top notch code ...
08:40
nice
but closures
08:52
@gordon

$a = ['gnu', 'penguin', 'elephant'];
function doublepop(Closure $cb) {
	$cb();
}

doublepop(function() {
	global $a;
	array_pop($a);
	array_pop($a);
});

print_r($a);
I think we need @rightfold to do that properly
user924016
roarNING
meow
09:08
@DejanMarjanovic if you have application logic/config in your comments, you deserve everything that is coming for you
Domain Driven Smiley
Anonymous
morn
Anonymous
09:23
I said... morn
:)
Morning
Anonymous
o/
Anonymous
the rest of you are pricks
09:38
@Gordon I think I might a solution for your null/ull problem - typing practice
http://zty.pe/?url=http://php.net/manual/en/language.types.null.php

* click `NEW GAME`
* and type the words you see
I am 40. I dont understand this
you kids and your weird internet things
:P
moin
@Gordon you need to type the words as they appear
<-1728 wave29
only defeated by kuzawinski
09:48
@bwoebi @Trowski Completely locked down github.com/amphp/thread now. Closed all issues and PRs, replaced the README and disabled issues.
We need @rdlowrey to mark it as dead on Packagist.
mornign, lads
@Jimbo clearly made by someone who has no kids
@Gordon How do you know this? I think it's just funny :-3
@Jimbo because I got a kid and it's like… wait for it
Anonymous
09:55
1 hour ago, by Joe Watkins
@Gordon never jokes, he's German ...
Nice timing @JayIsTooCommon
in fact, it's pretty much all like this: instagram.com/fowllanguagecomics
but never like in your comic
Anonymous
@Gordon You have completely ruined the joke.
so what? look at the link. much more fun. and all true.
Anonymous
10:07
!!wotd
Anonymous
!!uptime
PeeHaalicious, noun: a word to describe something cool, but only when it works. most of the time it doesnt. a shame.
Anonymous
@PeeHaa @DaveRandom he's working in other rooms
prodigal bot
user924016
ey, if I put a Content-Type: application/json , is it "legal" to have a empty body vs a {}
10:15
@RonniSkansing no, json cannot be completely empty - at its root must be one value (of any json type, not necessarily object)
having just null would be valid json
would just return 204
status code
user924016
10:27
@PaulCrovella thx
> Binod Lamsal has invited you to join Room for Binod Lamsal and Wes Stark
I've had some odd invites lately too. Not sure what's up.
@JayIsTooCommon Don't see anything wrong
Anonymous
@Jeeves yallo ?
Will reboot him
10:37
i want to append variable($i) into dmselect...i appended like this but error occurs $value['$dmselect'.$i]
Anonymous
mornin btw
\o
Just woke up. Don't feel like debugging beore I had coffee
how to append variable into index
> Kaori has invited you to join Psst... want some anime, kids?. See your invitations.
10:37
morning
!!uptime
╔══════════════════════════════════╗
║ [45 seconds] without an accident ║
║   since [2017-07-11 10:37:18]    ║
╚══════════════════════════════════╝
Anonymous
@Jeeves you big tease
@JayIsTooCommon An other question coming in your way!
morenin
Anonymous
tesco o/
10:40
o/
https://t.co/ghxofETiwp
i want to append variable($i) into dmselect...i appended like this but error occurs $value['$dmselect'.$i]...
how to append variable into index?
Anonymous
!!welcome abdul
Welcome @abdul, please read the Chat Guidelines
10:50
@Gordon Someone else who has a kid responded similarly
> once u have a baby if he/she says that arrays start at pos 1, that will become your new truth
@Jimbo s/1/-1
Anonymous
Have you been speaking to a chiropractor or something?
@kelunik yeah, they make sense in blocking contexts…
@Jimbo Wat, why does that say "1-5k people"? i.imgur.com/WXmqTdl.png
@bwoebi Even there. getMetadata as a method...
10:58
there are -4999 people
@bwoebi Or the pure thing that basically nothing is guaranteed to work by the type system. You can simply have a stream that is neither readable nor writable nor seekable.
@kelunik why can't you provide that one though? essentially it's just mapping ConnectionInfo back to the PHP array?
!!dad
I'm not addicated to brake fluid I can stop whenever I want
@bwoebi I could provide quite a few things, but most things would be missing.
@kelunik What would be missing then?
things like unread bytes? Which really shouldn't matter here…
@Jeeves i'm asking just my doubt right??
@abdul Okay but there is snow ;).
@Jeeves please help me how to append variable into array index this is correct or not $news = $value['printprocess'.$i];
@bwoebi It's the only thing that's guaranteed to be there.
11:07
@abdul It starts with an s.
@kelunik I mean, that value is meaningless … nobody says that you might not internally buffer … if you want, just set it to a dummy null.
sorry i didn't understand
@Jeeves It starts with an s. means?
@abdul My name.
Anonymous
@abdul Jeeves is a bot
@kelunik anyway, the contract requires that you return $key === null ? [] : null; then instead of throwing
Anonymous
11:09
@abdul what you're doing looks like but if you're getting an error, replicate it here 3v4l.org, then someone can help you
Anonymous
or just gist your code and tell us what the error is
Damn you to hell Jay! I was having fun ><
You totally spoiled it
@bwoebi I already changed it to not throw, returns an empty array now if key is null.
Anonymous
I know, I felt bad
:(
11:13
@kelunik ah, fine :-)
@kelunik I'm guessing they have "1000 - 5000 people" as a category..
@bwoebi Can I merge the Artax PR and release a bugfix version?
@JayIsTooCommon i want to append variable($i) into dmselect...i appended like this but error occurs $value['$dmselect'.$i]...
how to append variable into index?
Anonymous
@abdul Yes, i've seen you post that 4 times now. Like i said, replicate it here 3v4l.org or paste your code here gist.github.com with the error that you're getting
Anonymous
Also not sure why $dmselect is wrapped
11:21
who is good in java
Anonymous
Probably someone in the Java room.
looks like guys are asleep
Anonymous
Nov 17 '16 at 23:55, by Wes
asking jquery questions here because the js room is sleeping is like pooping in the kitchen because the toilet is occupied
45 mins ago, by Jeeves
╔══════════════════════════════════╗
║ [45 seconds] without an accident ║
║   since [2017-07-11 10:37:18]    ║
╚══════════════════════════════════╝
3 messages moved to Trash
11:24
@kelunik yes, LGTM.
!!wotd
perambulator: baby carriage.
11:51
posted on July 11, 2017 by kelunik

- Enforce body size limit also for compressed responses. This is a protection measure against malicious servers as described [here](https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html).

12:29
\o
Anonymous
o/
I was just removing viruses from a computer located in the reception area of a hotel, while nobody was looking pornographic pop-ups appeared, for all the guests to see ...
Random file not found on multiple processes – #74900
Anonymous
E_WINDOWS
I hate windows, and I would never normally do that sort of stuff for anyone, but wife asked ... and obviously already told people I'd fix it before she asked, so I couldn't say no ...
I did get a cooked breakfast though ...
12:34
BAH!!! you really removed the md5 from php.net/releases
blame @Sara
@Gordon why is that problematic?^^
and everyone that voted for it, including me ... but mostly Sara ...
now I can spend the remaining work day fixing my scripts depending on it
thank you @Sara and everyone that voted it -.-
Anonymous
nice, externals got a new skin
12:36
@bwoebi because I got scripts and Dockerfiles depending on the value to be there
that happened in the last couple of hours, I used it earlier today
12:53
I don't even remember that I did this. github.com/kelunik/regex
so what's the equivalent of md5sum on the shell for sha256?
sha256sum
hmm, that makes sense
Awesome tnx <3
13:01
I also used -1 before, but anything <= 0 worked before, so I set the validation just to >= 0 like other values.
If anyone is up for a laugh pastebin.com/q3pievyj
:P
@bassxzero you just lost your job security :D
@Patrick not sure i want to work here anymore anyway lol
after seeing that
13:12
hmm, that seemed like an easier fix than assumed… all scripts working again
Apr 28 at 12:14, by Jeeves
74265 still not fixed -- isfinite failure remains – #74507
I still get that on 7.1.7
Does anyone know how to remove a docker-machine ip setting? One of my colleagues has it set so his docker boxes come up on some weird ip address. And we can't figure out how to turn that off.
13:28
can anyone link good websocket library? php-5.6
@Linus client or server side?
server side
@kelunik does web-sockets are implemented on both client and server side?
@Linus With 5.6 you have to use Ratchet or something like that, as Aerys is 7.0+ only.
thanks
mhmm. make CC="gcc -std=gnu99" fixes it apparently
hmm, no. still getting that… narf
14:02
ok. ./buildconf --force and adding make CC="gcc -std=gnu99" did it. all four 7.1.7s build now.
Struggling to find the most efficient way to call a single function from a class...
All I need to do is call the function to verify a user's input and see if it returns with true and return it to the client, but it seems like a waste to make a new PHP file just to make an instance of the class and to call one function.
So all the php file is gonna have is $class = new Class(); $thing = $class->verify('stuff'); if ($thing) { echo "verified"; }
so? don't use a class but a function. why do you think you need a class for it?
@MinistryofChaps don't you use any routing in your application?
@Gordon Well, @DaveRandom controls the software and I control the virtualized hardware.
@LeviMorrison I see. I'd ping Dave now, but @Danack said he is a bird and doesn't approve.
Anonymous
14:12
We could just ping @Danack instead
@Jimbo just use maven
or v0.0.10
evenings o/
@Jimbo 9 + 1 = 10
I didn't ask that question
14:14
@bwoebi I have been very busy this last week and will continue to be busier than normal this week. We need to open the final RFC for arrow functions no later than Thursday. Can you update the preference RFC with either ^() => or \() => and submit it for voting with some sort of verbiage about how the one with the most votes will be put into a final RFC?
If you can't then maybe @NikiC can; it's just unfortunate that I had issues with the wiki and was unable to fix or update it in time.
And now that we're down-to-the-wire close I just don't have the time.
@Gordon Because it is associated with checking in my database so I am thinking that keeping the function in my PDO class is the best idea. If I had it as a function I would still have to make a new php file, require_once the file and call it.
If the three of us don't have time then it will sadly have to slip until 7.3
@Danack could you refer me to a link by what you mean about routing? It's not a concept I'm familiar with in PHP
@MinistryofChaps require_once? don't you use autoloading?
@Gordon never heard of autoloading before, but wow that's great to know now
14:19
@MinistryofChaps general idea - martinfowler.com/eaaCatalog/frontController.html . An example in PHP - slimframework.com/docs/objects/router.html However I strongly object to their using closures to define routes, rather than named functions.
:38067708 either you are still drunk or drunk already. in any case, you are drunk.
@Danack @Patrick thanks I'll have a look at these.
Does someone have experience with an windows 2012 r2 server and imagemagick, somehow the server resettet the permission and now the app does not work (cant run the imagemagick commands)
The webapp worked last week and this week until today ...
14:38
@PeeHaa You know that there's a forth parameter for http_build_query, right? github.com/PeeHaa/AsyncTwitter/blob/…
he does now
@kelunik mindblown.gif
3 messages moved to Trash
:<

« first day (2460 days earlier)      last day (2713 days later) »