« first day (2284 days earlier)      last day (2654 days later) » 

12:05 AM
@pinepain You should ask anatol
 
@NikiC on irc, i suppose, right?
 
@pinepain yeah
 
@NikiC thanks, will try
 
 
4 hours later…
4:03 AM
Morning
 
morning
 
I have some weird behaviour with javascript
if (Number(data) >= Number($('#amount_invested').html())) {
console.log('true');
}
never returns true ...
the data come from a json response but this shouldn't change the problem
 
4:21 AM
no idea, try js room probably
 
I will
my message got trashed instantly in the JS room
ahahahah
 
Hope this will help: @Valentincognito
if (Number(data) >= Number($.trim($('#amount_invested').html()))) {
console.log('true');
}
 
Wes
lol. it's a bot doing it automatically
caprica :P
mornings \o
 
Morning @wes ! ...well pleasure to meet you too caprica ^^
@Akshay I have tried to trim it before but no luck
 
Wes
 
4:33 AM
oooppss then no idea!
 
Wes
!!should i sleep a bit or pretend i'm not tired
 
You should pretend you'm not tired.
 
Wes
@PeeHaa bug ^
 
ha ... you'm
 
4:54 AM
mornin
 
Wes
\o
 
o/
 
5:13 AM
o/
 
 
1 hour later…
6:29 AM
Morning
 
hello ^^
 
'nin
 
6:55 AM
o/
 
\o
 
7:11 AM
posted on January 16, 2017 by remicollet

Bugfix release for **PHP 7** - fix #207 Segmentation fault in apc_sma_api_free() - fix #221 memory leak - update to apc dashboard (Tyson Andre)

 
7:33 AM
as of php 7.1 is completely relevant to use SessionHandler to secure sessions?
 
7:55 AM
moonin
 
@Trucy moin
 
o/ @Linus
 
\o
 
8:10 AM
gÍŽmoin
 
@Gordon You are believe Laravel framework isn't good, right?
 
@Shafizadeh I call it Laranotsowell
11
 
For some reasons, laravel sounds like a washing machine
 
Anonymous
Is there any better way to edit the php manual other than through edit.php.net?
 
8:15 AM
@samayo no
@Trucy it always conjures up images of larvae for me
 
Anonymous
@Gordon Shouldn't the doc be uploaded to Github? It makes a lot of sense that way
 
Larvael sounds me a like a pokemon..
 
@Gordon Larvae living in some creep yes, sounds like laravel living in PHP code
 
R.P
Morning, anyone knows if there is a way of removing encodingStyle attribute from SoapClient request?
 
Anonymous
try {
  throw new OverflowException;
} finally {
  // now what?
}
 
Anonymous
8:21 AM
Trying to understand why that is allowed..
 
Anonymous
Why should try be used with catch() but with finally
 
Try catching multiple exceptions... then something that you want to do in both, just do in finally instead...
 
@samayo they are and you can obviously check them out and edit them with your favorite docbook toolchain, but you asked whether there is a better way than edit.php.net and I don't think there is
 
Anonymous
@Gordon Ah, I found it.
 
Anonymous
The edit.php.net looks 98'-ish to me
 
Anonymous
8:28 AM
@Jimbo In that case, I would try catching with multiple exceptions and use finally for both :)
 
Anonymous
Anyway, this is not a big deal I guess
 
@samayo it's an ExtJs application, probably ExtJs v2, so 2005ish
 
Motnigninmorngins
 
Anonymous
\o
 
\Íœo/
 
8:35 AM
"alright, let's use this calendar js plugin developped by some company with a crap-tier documentation"
Worst way to start a week
Bonjour @PeeHaa o/
 
@samayo What?
 
Anonymous
You were saying that try/finally will be enough without the need for catch()
 
try {
     $somethingThatThrowsException1();
     $somethingThatThrowsException2();
} catch (\ExceptionOne $e) {
    // Something that specifically responds to ExceptionOne
} catch (\ExceptionTwo $e) {
    // Something that specifically responds to ExceptionTwo
} finally {
    // Something that you don't want to have to repeat in both of the above
}
 
Anonymous
mornin
 
Mornin!
 
Shafizadeh I call it Laranotsowell
 
Anonymous
@Jimbo So, you are saying try/finally is enough without catch() ?
 
@samayo How did you even get that from my message?
If you're not going to catch anything, why would you use a try?
 
Anonymous
That is my point when I asked the question
 
Anonymous
try {
  throw new OverflowException;
} finally {
  // now what?
}
 
Anonymous
8:46 AM
I said, why was that even allowed.
 
Anonymous
why wouldn't it be allowed?
 
Anonymous
48 secs ago, by Jimbo
If you're not going to catch anything, why would you use a try?
 
@Gordon ROTFL
 
Anonymous
@JayIsTooCommon It is possible though I still don't fully understand finally
 
morning
 
Anonymous
8:47 AM
I am revising php and never used finally before
 
does php Variadic functions accept type?
 
58
Q: Does it make sense to do "try-finally" without "catch"?

glandenI saw some code like this: try { db.store(mydata); } finally { db.cleanup(); } I thought try is supposed to have a catch? Why does this code do it this way?

 
@samayo it was added only recently. I didn't use it yet either
 
@samayo Okay, so if you finally, then even if your code in the try throws an exception, the finally will be executed before the exception can be handled by the parent
That's pretty useful, if you don't want to have to handle the exception right there, but want to do some cleaning up if one is thrown
 
@Gordon How much have you worked with Laravel? You know, I'm currently use it and to be honest it amazes me ..!
 
8:54 AM
 
@LeviMorrison choose one
 
Note the ordering
 
@Shafizadeh I never used it. I am judging based on the code snippets full of statics and docs full of misinformation about facades I saw.
 
@LeviMorrison in particular hub.docker.com/r/itszero/opengrok seems to be a good choice
 
8:58 AM
@Gordon ok, which framework is your recommendation?
 
> To start the OpenGrok, simply run:
>
> docker run -d -v [source to be indexed on host]:/src -p [public port]:8080 itszero/opengrok
>
> It may take a while for the indexer to finish the first-time indexing, after
> that, the search engine is available at http://host:[public port]/source/.
@Shafizadeh that depends on what you are building. In general, I favor libraries/components over full stacks. If you need a full stack, Symfony is okay'ish though it tends to have parts that are just a PITA to work with, like authentication.
 
Anonymous
@Shafizadeh github.com/PatrickLouys/no-framework-tutorial or if you have to use one, Symfony imo.
 
Ah I see. thx
 
ThW
morning
 
Anonymous
o/
 
9:01 AM
Am I the only one who anally aligns my `use` statements at the top of the class in length descending order???

use One\Of\The\Longer\Ones\Here,
    A\Shorter\One\Here,
    EvenShorter;
 
ThW
@Jimbo lol
 
Please tell me someone else does this
 
Anonymous
weirdo
 
Anonymous
and you smell funny.
 
@JayIsTooCommon Not my fault @PeeHaa's mom doesn't shower much
 
Anonymous
9:02 AM
@Sean Mine still yields the same result and I don't see the difference
 
Anonymous
:P
 
@Jimbo It's both beautiful and horrible at the same time
 
@Jimbo No
 
Beautiful because of the orgasm-inducing alignment, horrible because I like having one statement per line
 
@brzuchal Thank god
@J7mbo Always sorted alphabetically.
EURGH
 
Anonymous
9:06 AM
@samayo did you see the Q JImbo sent you? That should explain the use case
 
ThW
@Jimbo nope, they get added by PHPStorm so the order is mostly random :-)
 
@Jimbo most of the time my uses looks noisy and one class per one use without any group uses
 
@ThW Yep, and I have to go through them all manually and switch them. I've become a master at keyboard shortcuts to do it actually
I was wondering if I could write a macro to do it somehow in PHPStorm
 
ThW
hehe, write a plugin sort by name or alphabetically :-)
 
@ThW Yeah I'd love to do that. It's JAVA, right/
 
ThW
9:07 AM
think so
 
Anonymous
@JayIsTooCommon Ah, just saw it now. Answer #1 confused me but the second makes sense thanks @Jimbo
 
@Jimbo He's right
 
Anonymous
The use-cases are obviously edgy but good to know nevertheless
 
Yeah, plugin should handle that, but writing plugin for PHPStorm requires some Java knowledge and all that JAR-hell dealing with, I've tried this few time without any success
 
Anonymous
@samayo edgy?
 
Anonymous
9:08 AM
I meant 'rare'
 
please, don't mention Java at this time on a monday morning, you are making me feel unwell ...
 
:P
 
@JoeWatkins Use some expecto patronum or something like it
 
Fore reference to @JoeWatkins's message...
OH: "You know when dementors go near harry potter and start sucking the life from his face.... java does that to me..." #java
 
I do make me laugh ...
 
9:11 AM
@Jimbo doesnt phpstorm do that by default?
 
How does terminating tls before the server work with redirects? Requests will only come through to the server on port 80, so would the job of redirecting to https from http be the purpose of a device earlier in the chain, before it hits the server?
 
hello
0
Q: How to get gujarati or hindi data from php to javascript using ajax services

ankurI want to show hindi or gujarati data to the table using DataTable.js API. i have following javascript code : $(document).ready(function(){ // On page load: datatable var url = "<?php echo base_url();?>list?job=get_companies"; var table_companies = $('#table_companies').dataTable({ "aj...

 
"Why the dates doesn't appear on my 2017 calendar? incoherent rage oh because I put them in 2016."
 
@JoeWatkins i tweet that :P
 
anybody hear to resolve my problems
 
9:16 AM
@Gordon Nope
 
@Jimbo yeah, I just checked. Optimize Imports does it alphabetically
 
Oh nice, just found it
It's a shame I'm too anal retentive to do that and that I have to see a nice pretty inverse pyramid
I've done it for years
Took a lot for me to not enjoy loads of indented if's, that's @rdlowrey who convinced me not to do that
 
is phpstorm open source ?
 
no
 
The only non-OS software I use at home
@JoeWatkins and pretty expensive too, $150/year iirc
 
9:21 AM
well that makes it a bit harder, but you could still view the source of the method/plugin that does alpha sort ... not that I like the idea of sorting by length ...
 
@Sean If you use a TLS termination proxy, you can make it do the redirect for you.
 
Nice idea
 
@JoeWatkins Well, the community edition of the base software is.
 
I doubt that functionality will be in intellij though, right ?
 
9:25 AM
yeah, void of php things
 
PHP Storm is just IntelliJ Idea ultimate with a PHP plugin
I use IntelliJ with the PHP plugin to code PHP
 
moin
 
Anonymous
hoi chris
 
mornin
 
@ChrysUgwu holy wtf Batman
 
9:34 AM
@DaveRandom Have you not noticed this before? :P
 
moin yall
 
I've not been here in the last day :-P
 
@ThW phpstorm does it alphabetically
 
I just mean in general ^^
 
@PeeHaa s/alphabetically/correctly/
@Sean I was talking about that specific code sample...?
@Trucy o/
 
9:36 AM
@DaveRandom \o
 
\o/
 
the php plugin is very decompilable ... I won't share because ethics ... but doable ...
 
If ethics were a thing then Laravel wouldn't exist
 
maybe you're looking for something named cfr, maybe not ... who knows ... maybe you need to setup classpath, maybe you don't ... nobody knows ...
 
@Jimbo Would be cool to guess the tweet ID and make the OMG thing looping.
 
9:41 AM
maybe you're looking for this method ...
 public void processElements(@NotNull Collection<? extends PsiElement> originalElements, boolean withPhpDoc)
maybe you're not ...
 
@kelunik Tweet id is in the url isn't it?
Ohhh, you mean before posted :D
 
@JoeWatkins Maybe literally nobody here apart from you understands the Java eco-system which is why we are all terrified of agreeing to setup opengrok, nobody knows...
 
@Jimbo Yes :D
 
haha
 
btw @LeviMorrison have you got some VMs ready?
 
9:42 AM
@DaveRandom oh yeah ...
 
@DaveRandom You were a moody git on twitter the other day...
 
@DaveRandom Looking at the Docker file @Gordon posted it's rather easy.
 
they are ready ... I was hoping anybody else was going to do it ... if not I'll do it tomorrow/weds ...
 
@DaveRandom Yes, all four are ready.
 
I would actually be prepared to have a fuck around with it
I looked it over the other night, doesn't look that hard
 
9:43 AM
@DaveRandom docker run -d -v [source to be indexed on host]:/src -p [public port]:8080 itszero/opengrok
 
@Jimbo yeh, long story
 
you should do that, because if I have to do it, it will shorten my life considerably ...
 
Essentially I was a seething ball of rage over many things and that seemed like the least damaging way to vent it
 
@Gordon running vms inside crappy vms is probably not going to be best ...
 
@Gordon well thanks. I have literally no idea what that will do though, I don't really want to have to learn docker as a pre-requisite :-P
 
9:45 AM
/me makes note of that though
 
I have no issue with docker conceptually but only so much time/will to live available
 
@DaveRandom it will start a docker container in daemonized mode (-d) with a volume (-v) mounted to whatever source you provide and port 8080 exposed (-p) as whatever port you provided from the itszero/opengrok docker image, which it will download automatically from dockerhub. you will then have a running container with opengrok and your srcs in it
 
well I am only mildly terrified by that
"Learn how Docker works" is on my 2017 list, item 34, right after "learn Portuguese"
 
@DaveRandom pro-tip: it doesn't work
 
@DaveRandom well, all the other options would include more effort; as in setting up the tomcat with opengrok yourself and fiddling with jdks and stuff
 
9:49 AM
@DaveRandom also, see sysadmincasts.com/episodes/… - you can fix that with a ~1h video
 
but we only have crappy vms ...
 
Docker is just a stupid Golang wrapper for something that Linux had for ages
 
yeah, is fancy hat for vb
 
the rest is mostly interop effort and trying to break BC every week
 
@Gordon I will have to do that anyway unless the docker image includes the JSON api plugin thing
 
9:50 AM
@JoeWatkins doesnt matter much. docker will basically use the same resources as if it was running directly on the crappy vm
 
@Ocramius ty
@JoeWatkins What are the vms running on? Like, can I build a vm locally and we just replace the actual vm image?
 
Can someone recommend a DDD consultant/coach?
 
they may be crappy as in resources, but probably use hw hypervisor, the vms inside the vms will not
 
@DaveRandom dns dns dns dns dns dns dns dns dns
 
@Patrick matthias obviously. or @Ocramius, but you know, it's @Ocramius
 
9:52 AM
@PeeHaa yes yes yes
 
@Patrick matthias indeed
 
yes what? :)
 
No, I can teach DDD, but Matthias is on a different level
 
yes I am working on it as we speak right?
 
@DaveRandom don't actually know, haven't looked yet ... you do it, and I'll get involved if you fail, or it takes up too much of your time ...
 
9:53 AM
@Patrick verraes.net
 
@Patrick I can gladly brain-wash your dev team for a day about applied DDD via event-sourcing (from feature planning to implementation)
 
@Ocramius yeah, and you are @Ocramius. you will likely introduce black magic and all sorts of hoodoo
 
@Gordon Yeah those were my first 2 picks, was wondering if there are more :)
 
DDDWBHM
 
@Gordon I sealed all the magic of my projects behind the sacred gate of vendor/
 
9:54 AM
@DaveRandom how/where you do install that?
 
Been reading "Implementing DDD" and not too happy with some of the code examples since they use static calls to trigger events for example and lots of extend... I hope the PHP DDD coaches have a better solution for that? ^^
 
@Patrick there are better approaches in doctrine and in prooph, but it's mostly implementation
The problem is that you need to keep the time between domain event raising and persisting as tiny as possible, and transactional
 
@Ocramius I would like to keep the domain POPO
 
@Patrick yeah, then the doctrine listener approach kinda works
postFlush listener that simply collects all events and fires them
 
@Gordon Dunno. Last time I read about it was the same time I determined that such a thing exists, which is when I was writing the lxr plugin for Jeeves.
 
9:57 AM
@Ocramius But then static calls make even less sense since it gets persisted much later. What do you think of returning the event from a command method and then triggering it in the app service together with the persistence (or even pass it to the save method?)
@Ocramius hmm we started out with doctrine but these days it's almost only dbal. I don't really see the value of an ORM anymore after working with doctrine for the last couple years
 
I tried multiple approaches - so far, I like the event-sourced aggregate best
 
@PeeHaa yes I will do some work on it today. However what's the specific issue you are having? There are several issues and I will be doing some large scale work to fix all known issues, however if you are having one specific problem then I might be able to patch that quicker
 
returning events from command handlers is the functional approach, which works best if you use a functional language IMO
@Patrick same about ORM vs DBAL - using ORM mostly on small projects only now
Larger projects directly go the prooph + DBAL way
Scales MUCH better
 
@JoeWatkins I'm going to spin up a VM locally and just have a fuck around with it on there to learn a bit about how it works. Do you know what OS they are running?
 
@DaveRandom well, if you can find out how to do that, I can help you adapting the dockerfile
 
9:59 AM
@Gordon k cool, ty
 
I don't know @DaveRandom
 
we will definitely save the events since we need an audit log. but we need the db anyways for sql reports, so I'm not sure how deep we'll go into ES.
I'll have a look at prooph
 
@Patrick I always have an SQL DB anyway
@Patrick anyway, if you want a full-day workshop about it (on-location), poke me. I already did it a dozen times, and everyone seems to understand it well
</sales-pitch>
 
mornings
 
do you update the state when you trigger the event or do you trigger the event and then update the state after listening to the event?
I'll send you (and mathias) an email later this week :)
 
10:06 AM
@Patrick after listening. Events are the source, the DB can be reconstructed anytime with an iterative SQL query
You can even go wild and use stored procedures, TBH
 
Hmm that seems like it would suit the "return the event" approach really well? So instead of saving through a repository only the event is triggered
 
@Patrick I really suggest you to check prooph's approach instead of inventing your own
 
That's your fault? ^
 
it's a decent trade-off, and is very readable
 
10:10 AM
Hi there,

I have the following php script: mysqli_query($db, $queryInsertMember) or die (mysqli_error($db));

how can I reproduce the same thing with the mysqli extension. So ->execute() and how do i reproduce the or die(mysqli_error())
 
@Ocramius will do
 
Inventing your own will just lead you to months and months of pain and developing technical stuff that isn't really to the point, @Patrick
Whereas the prooph guys are really killing it atm
 
How so? Implementing it seems rather straight forward, and all the DDD books that I've read warn against using a framework for DDD
 
Also: first library that I used for more than a year and only found 1 bug so far (documentation issue) :D
@Patrick yes, very true, but I saw multiple projects fail due to the will to re-implement the wheel on their own. Prooph allows you to shoot yourself in the foot with customizations, but I wouldn't suggest going that way
 
where did they fail?
 
10:14 AM
@Patrick you may want to check out youtube.com/watch?v=8NuHNtwjync
 
will do, thanks
 
@Patrick they found out mid-development that their approach wouldn't work, or had major technical issues, or needed something technical to be added
so they lost entire sprints due to technical blockers
ended up having performance and serialization issues/data-loss in production too
 
thats why we want to get a consultant to discuss our approach before we start with DDD ^^
 
@PeeHaa what machine is that running on? Yours?
 
@DaveRandom @Ekin's. Give her your key
 
10:16 AM
@Ocramius do you know Mathias Verraes approach to DDD? Does he use prooph?
 
Hum. He has 5 on github
 
@Patrick I can surely help with the technical/practical part. I know that Verraes is more on the business/planning part. As far as I know, Verraes is not coding much these days
so he may not have a tool of preference, not in PHP at least
 
Yeah he feels important with that amount of keys
Just let him have his moment
 
:-P
 
morning
 
10:18 AM
@Ocramius we need both, who knows, maybe I can convince the higher ups to even bring you both in...
Anyways, you'll hear from me later this week. Thanks for all the info so far
 
@Patrick my current format is a 1-day workshop. Just send me a mail whenever you feel that you pulled enough strings to make it happen :-)
 
Github really needs deployment keys like bitbucket
 
moin
 
@Ekin is that running on a LAN (behind NAT)?
Or, more to the point, is the machine's DNS server on the same subnet?
 
oh hey @DaveRandom
 
Anonymous
10:20 AM
@DaveRandom gh has deploy keys?
 
you might be able to fix my networking issues ... I've more or less given up ...
if I setup a teamviewer over the next few days will you have a look at it for me ?
please
 
@DaveRandom not exactly sure at the moment, it's a droplet on digitalocean with a floating ip and I haven't even wondered anything else about it (yet)
/me is cooking brb
 
@JayIsTooCommon where?
 
@Ekin E_NOT_ENOUGH_TMI
 
posted on January 16, 2017

New Cyanide and Happiness Comic

 
10:27 AM
How does one cook a brb?
I usually just have mine raw
 
ew
 
soo .... is that a yes @DaveRandom ?
 
if you want to see what I mean by that, lookup hosts for nevis.krakjoe.ninja, try to open a shell on both addresses ... and see "are you all on skype" conversation from star list ... it's all too strange to wrap my head around, but probably something simple ...
suspense is torture Chris ...
 
Anonymous
It says in the manual that AssertionError is thrown when the function assert() fails.
 
Anonymous
But all I get is a warning
 
Anonymous
> AssertionError is thrown when an assertion made via assert() fails.
 
Anonymous
assert(1 === '1'); // Warning:  assert(): assert(1 === '1') failed in C:\
 
10:54 AM
lol
 
Anonymous
hmm
 
lol
 
I heard there are some proposals for property accessors? phpclasses.org/blog/post/…
 
@samayo set assert.exception = 1
 
@brzuchal you can ignore 99% of what you read on phpclasses.org
 
10:56 AM
more
 
99.87%
 
better
possibly more
 
so what is the purpose of those talks, they're talking about devlined RFC's and presenting as next major release proposals
:/
 
Anonymous
@JoeWatkins thanks.
 
Anonymous
Nothing about PHP surprises me anymore
 
10:59 AM
we don't know why it's such poor quality content, we can only observe that it is ... many of us have tried to encourage them to do better ...
 

« first day (2284 days earlier)      last day (2654 days later) »