« first day (2410 days earlier)      last day (2764 days later) » 

12:09
Is it natively possible to use bytestring instead of unicode strings?
I'd like to optimize a text algorithm without changing technology
So, our enterprise endpoint protection just deleted my /usr/local/bin/php
tempted to put it back and chattr +i just to see what it does
@Robson There's no such thing as unicode strings in PHP. They're always byte strings.
Thank you, I always thought wrong :)
@Leigh Do it. :D
12:29
@kelunik Took 3 minutes after I restored it for a sysadmin to message me on slack saying their reporting is going nuts
12:40
!!uptime
╔═════════════════════════════════════════════════╗
║ [20 minutes and 22 seconds] without an accident ║
║           since [2017-05-22 12:20:01]           ║
╚═════════════════════════════════════════════════╝
did someone restart it @JayIsTooCommon?
@PEMapModder 69632 is exactly 4096 bytes more than 65536 … you need to know that internally zend_strings are a) always 0-terminated and b) possess a header structure which contains things like refcount or length. … And when you allocate something larger than 4096 bytes, we always round up to the next 4096 bytes. So that's perfectly fine.
@PeeHaa heads up that based on jeeves logs your VPS hosts may be having some issues, although it seems fine for the last 20 mins, there were connections timing out all over the place for ~2hrs before that
Anonymous
@DaveRandom no idea. I don't have access /cc @PeeHaa
12:58
@JayIsTooCommon I checked the logs, they didn't. Looks like the root cause was either a problem with @PeeHaa's hosting provider or SE, however the jeeves service fell over eventually with OOM because there's clearly either a memory leak or a recursion issue in the reconnect routine, but it was automagically restarted by systemd and a few minutes after that whatever network problem there was went away
So I think it's not our fault, and certainly it recovered by itself
Anonymous
s/'s hosting provider or SE/
Yeh that websocket was up for a lot longer than #11 for some reason
it did go over eventually though
Anonymous
ah
dunno, don't care much tbh, whatever the problem was there's probably nothing I could have done about it :-P
@MadaraUchiha traitor!
How dare you use PHP! We trusted you!
@SterlingArcher Hmm?
I don't use PHP today
PHP used to be my main language before JS/TS/WS
I'm gonna have to test you for suspicion of being under the influence of PHP young man
lol jk, PHP was my first language. I'm still using it for PRPG
When it's used to build a real rest API, it's not horrible, though the SlimPHP framework does seem a bit heavy.. much easier to build a Node API
Anonymous
@SterlingArcher you think he likes you js punks? He's always bitching about you guys.
Yeah, bitching about our superior code, fam!
Anonymous
13:15
pffft
There's talk about moving to a new framework over here, a couple of devs have mentioned Laravel. I will become the gatekeeper.
@Sean I am so sorry
Anonymous
@Sean what are you on atm?
Some custom built one from an agency who stopped working on it about 6 years ago
Is composer and slimphp a common usage for PHP APIs?
13:22
There's no way in hell I'll let Laravel get chosen
Anonymous
@Sean Just make sure you manage to get a decent argument. When they tell a non technical manager "it's used by millions and is the most popular framework and it's magic" .. fun times.
^ This. Make sure you do your research and bring up some sound arguments
Many cases don't care about technical debt, but your final point should be that if you do choose that, it's very likely given the magic that you'll end up in the same position again a few years down the line
It's an internal discussion initially, so the guy I'll be presenting points to is hella technical.
I've used the slim framework extensively
it's great because it is just a router pretty much
then you just use composer for whatever else you want
which is imo the 'modern' way of doing a framework. Now we have composer there's no need to have these massive frameworks
in fact, slim is barely a 'framework', just a router
As soon as you have a team of juniors and you give them something that isn't very opinionated and is wide open to architecture decisions, like slim, silex etc, you're screwed unless you have a defined lead who can make decisions on architecture, best practices etc
13:30
agreed
@kelunik It's a little bit cleaner, but also a little bit less microoptimized - so, meh.
@bwoebi I think I prefer the cleaner one. ^^
13:55
@bwoebi Could you please respond to github.com/amphp/socket/pull/27?
PDO_OCI with PHP-FPM: OCI environment initialized before PHP-FPM sets it up – #74631
Segmentation fault on php_request_shutdown – #74632
Still need to understand the concept and implementation behind things like units of work and repositories
14:14
Evenin r11
!!dad
What did the grape do when he got stepped on? He let out a little wine
HALP!! (not about php tho)
also, evenings o/
\o
log(x + 1) + log(x - 1) = 3log2 + log3
14:31
+ 5
mhm! I got the same answer as well! thanks!
is there a built in function for "find position of n-th occurrence of string"? Or should I just make it myself?
strpos?
For the nth position you'd need to loop it from the last result I guess
that's what I suspect :(
I need to limit something to 120 words
and I am lazy
14:34
the words of every programmer: "I am lazy"
I realised I've been advocating an anaemic domain model for the past year, because I don't know enough to not do that
I've reached the "I want to beat myself over the head" threshold with Sharepoint.
trying to add a fucking CSS file is convoluted
Anonymous
@Tiffany :D
I could write a question on SO, and wait for people to write that code for me
I only need to make a new account
cough, cough
14:37
I think a lot of my problems would go away if I could use Sharepoint Designer, but I don't know if we have any keys, or if we're even licensed for it. Coworker said to just contact MS... I know I'd get the answer, but talking with them takes like half an hour for a simple solution.
@tereško make sure it has a female name because something something men will write code for women
something something my soggy knees something
something
good mornings.
Anonymous
moin cat
played wayyy too much minecraftish remake yesterday. blocks. blocks evrywhere.
14:44
omoronin fellow random user
function nth_strpos($str, $substr, $n)
{
    $ct = 0;
    $pos = 0;
    while (($pos = strpos($str, $substr, $pos)) !== false) {
        if (++$ct == $n) {
            return $pos;
        }
        $pos++;
    }
    return false;
}
good enough
https://i.sstatic.net/2yHnq.png

Anybody knows how RabbitMQ hashes the passwords
Or how can I hash my password to match RabbitMQ's hashed password?
Anonymous
@FélixGagnon-Grenier what's it called?
@JayIsTooCommon Creativerse, on steam. I"m ashamed by playing a game with that name, but it's still kinda cool
Anonymous
wow, that does look very minecrafty
14:47
meh
I never really liked minecraft
Anonymous
Anonymous
ah I loved minecraft. I would never play it single player mind but with a friend, I could spend hours on it
Anonymous
I probably still could once I got past the shame
Tried playing vanilla Minecraft with my boyfriend, we both got bored...
apparently there's this MMORPG server that we're going to try called Wynncraft
14:49
OVERWATCH!!
Yeha
We're trying it tonight Tiffany
so are we :P
Anonymous
vanilla can get boring, creating some sort of objective or actively trying to kill each other helps
^ This, I love modpacks because there's more to progress through.
I really want to try SkyFactory but I would need to pay for a beefy enough server, and I don't wanna
I also don't know if I could handle SkyFactory because of how intense it is
Anonymous
14:50
Voltz is a fun one to mess around with. Not sure if it's still going.
Usually we have two players who rush tech but make their bases ugly af, I try to keep a nice balance between the two
But that kind of progression is why I'm in love with cracktorio atm
My cousin is obsessed with Factorio
Anonymous
r11 mc server.. we could reach a new level of cool.
@JayIsTooCommon oh god
14:52
Jeeves bot taking on a new dimension
On the one hand, it'd probably be fun, on the other hand... someone would probably blow the server up
Anonymous
yes, it would be @PeeHaa
agreed
Anonymous
Also making a decent mc server is easy money once you get some rep. Or at least it used to be.
Yup, but then you have a community full of kids to manage. Got a friend who ran the top prop hunt servers for about a year and refused to monetise, ended up stopping them because the drama was too much
14:55
My boyfriend used to be involved with a prolific MC server. He's never told me what it was, but he said it was really popular before drama killed it off.
hahah, same oh god.
He built casinos in the game. Which I never knew was a thing until I looked it up on Youtube.
@Jimbo at least now you can improve :D
Used to be part of a team in World of Minecraft, before drama killed it. This was like 80% pre-adventure though
@tereško Service layer makes it easy to adhere to SRP. But if you want a richer domain model, then entities will contain business logic and will be much harder to maintain SRP for - I'm imagining many constructor dependencies for handling complex entity behaviour
Anonymous
14:56
@Sean I made one and first week made £100+ profit (I was 15 so buzzing). But yeah, it was just 12 year olds paying £20 to be able to fly and then kicking off when something didn't go there way
@Sean another Minecraft MMO?
@Tiffany Nah, the name of the community. A popular one in it's age but this was yeaaars ago.
back when minecraft was creative only
ooooh
@Jimbo not really. All the logic, that needs more that one entity itself, should ho in the service.
I started playing Minecraft like right before XP was introduced. I couldn't really get into it without a sense of objectives.
14:58
the entities mostly contain only business "rules"
shrug I like RPGs and quests.
I need to clearly differentiate between business rules and business logic then I guess
@Tiffany have you finished Arcanum?
@tereško haven't played it. I should revise: I like action RPGs.
ah ..
15:00
I can get into traditional RPGs but I have to be in the mood.
so, less Fallout 2, more Diablo 2
yeah
Path of Exile?
I actually installed Diablo 2 a couple weeks ago, been playing it off and on. It's still 800x600, so when I play it, it turns all my windows 800x600.
Yes, PoE is a favorite. I haven't played it in a while though.
it should sate your diablo craving
15:02
I was playing Grim Dawn a couple months ago, probably should pick it back up after I get bored of Neverwinter again...
@kelunik Changed it, I realized I had to set the properties to null in a finally block: github.com/amphp/amp/commit/…
It's probably slightly less performant, but I think the code is easier to follow.
I generally play games with my boyfriend. It's usually whatever he or I is in the mood for. We were playing a lot of SC2 co-op cause I wanted to play it, now we're playing Neverwinter because he wanted to play another MMORPG that wasn't WoW. We might switch to FFXIV.
SC2 is fun, A game I could watch for hours but never play online.
Yeah, I love watching tournaments and stuff, but I'm afraid of laddering.
@Sean have you been playing OW? I'm probably gonna buy it for pc in the coming month
15:08
@Saitama OW is fun.
Have you played TF2?
@MadaraUchiha 10 mins
@MadaraUchiha Hanzo main here
@Saitama OW is essentially TF3
@Saitama =_= You!
:P
I'm a widow main, falling back to Orisa or Ana depending on what the team needs
I wish there was doomfist, then I would be able to do what I was supposed to do
@Saitama Yep, quite often
But comp is super toxic towards widow mains
15:10
@MadaraUchiha tank and dps main... like I play quite a lot of Dva and Genji
And even though I'm a fair healer, I consistently get teams where the average damage output is that of a butterfly
Pharah / Mei / Rein / Zenny are my strong picks per category.
So I tend to avoid comp, in favor of qp
Let's play together some time
What's your SR?
I've been burned before, do you play on console or PC?
:^P I once got a quadruple boop with lucio
15:11
@Sean PC master race
10/10
@MadaraUchiha 2074
@Saitama You had more luck than me
Console, gonna get it for pc next month
I'd get into Overwatch but I haven't been able to find a hero that I really like.
15:12
@MadaraUchiha let's get a r11 group running!
@Tiffany I don't particularly "like" any of them
I'm pretty good at sniping
60% average accuracy as widow is nothing to sniff at
I think I'm just bad at shooters, or I haven't found a hero that fits my playstyle. I dunno.
@MadaraUchiha I sense kheprii in you
@Saitama Pfft, as if
I wish I had 10% of his positioning skills
and 5% of his casual sniping skills
That alone would have gotten me to the 3000 SR range
15:14
I usually end up playing a support class, but it's not really what I want to do.
you don't play any comp?
(Assuming of course that people stop crying salty tears about me selecting a widow)
@Saitama Every time I try I get toxicity
@Tiffany just play hanzo, and mute the team chat...
So I just stopped trying after a while
@MadaraUchiha console is much nicer in that region
15:15
@MadaraUchiha Highest is 2967, I was so gutted
@Trowski @bwoebi Should we keep the SocketPool host connection limit or drop that? I dropped it locally. If we want to keep it, I'll write a wrapping class, that wraps a RawSocketPool.
Wait, you play a sniper in console?
That's pretty impressive
@MadaraUchiha no no no
@Saitama I should probably do that
Only with widow
And switch when I think I should
15:16
@Saitama What then?
yeah... when teammates get toxic I just mute it
@Saitama The other day someone complained that I play widow despite losing 1:4 and having only 29 minutes on it
@kelunik What's bad about having a connection limit?
@kelunik well, as long as we are able to get stats like sockets per host, it's fine
@MadaraUchiha like there is not much toxicity in console
15:17
My answer was "Yeah, because of people like you that moan in chat instead of fragging whenever someone plays a widow"
@Trowski The complexity it has in the current implementation. It's horrible.
I just get so irritated that I just turn back to qp and frag there
I'm doing pretty well there
@bwoebi I can easily add that, yes.
yeah.. but sometimes there are times when people get toxic in QP as well
15:18
@Saitama We just laugh at them at that point usually
"Dude, it's quick play, calm down, if he wants to play offensive battle mercy, let him, whatever"
Half the time you don't get healers anyway :D
Hello guys and girls :D How to setup angular 2/4 with a php framework in a quality folder structure?
I got a potg with battle mercy once ^^
there has been quite a rise in number of lucios after the buff
@kelunik But without it, the pool could grow infinitely, correct?
@Saitama Best potg I had was a quin with Widow, 5 shots 5 kills
Got voted epic on that one :D
15:20
@Trowski No, older connections will be removed if idle.
I look forward to playing with yall
I'll add you when I get home
I'm not on pc atm tho
I get anxiety over playing against AI, rofl
@Tiffany wat XD
15:21
@kelunik Ok, then the limit is probably unnecessary.
I'm weird.
Anxiety from what?
Like, what do you feel is going to happen?
Mmm, not playing well enough and causing the team to lose.
I'm way too competitive
In my experience, most games (when SR isn't at stake, at least) are fun even when you lose
As long as you don't lose spectacularly and completely
I feel like whenever I play a game, I have to meet a certain level of skill, and if I don't, then I shouldn't be playing. It compounds things because I'm still new to Overwatch and barely know any of the heroes.
Wes
Wes
15:25
afternoons
Guys why are you talking about games?Isn't this a php chat only?Or it's some kind of mix chat room
@Tiffany You can set up a game with all AIs, teammates and enemies, and practice there
@Arslan.H It's a chat room, people talk about everything
PHP is a common topic
PHP = games
If no one answered your question, either no one knows or is able to answer at the moment
@tereško is here my only friend he will support me in this?right @tereško?right?
@tereško how are you?Lets put the battle axes down
15:28
I get the feeling like I need to learn ASP.NET to effectively do anything in Sharepoint.
uhm, uhm, I have the feeling that this is not going to end well
or C#, whatever this code is...
Anonymous
yo @Wes
@Tiffany I get the feeling you should not learn ASP.NET and effectively do nothing in Sharepoint.
Anonymous
@Arslan.H Stop with this shit.
15:30
@MadaraUchiha I'm trying really hard to move away from a vendor I do not like. If it means subjecting myself to Sharepoint's fuckery, I'll do it.
@Trowski The limit exists so Artax doesn't get blocked in scraping contexts, but the user should just implement something to limit the concurrency. It's not Artax job to do that.
@Tiffany A "vendor"?
@JayIsTooCommon what?
@MadaraUchiha A company we do business with
Ah
Have you not moved companies yet?
15:31
It will probably be a long time before I switch places :P
@kelunik Agreed. It's not that hard to only pull X number of sockets from the pool.
like 1+ years long
Anonymous
@Arslan.H You've crossed words with him in the past, get over it. Unnecessarily pinging him to try and provoke some sort of reaction is pathetic. Give it a rest.
@Tiffany I don't think you're in a position where you should be a lone dev
You should (ideally always) be with a bunch of other developers that you can learn from.
@JayIsTooCommon I'm trying to settle it down :D No joke
Anonymous
15:32
@Arslan.H No you're not. Just leave it or you'll be kicked.
@MadaraUchiha The problem is, my skillset isn't high enough to be hired for a dev position where I'm making enough money to stay at my current livelihood
@JayIsTooCommon go fuck of
Right
@Arslan.H Take a few days off of chat.
Anonymous
<3 @MadaraUchiha
great idea to say that when a mod is in the room...
15:33
And think about proper behavior in a community.
You should still go fuck of though, @JayIsTooCommon
Anonymous
fine..
@JayIsTooCommon Next time with cases like these, don't kick, flag.
@DaveRandom s/of/off
15:34
(sic)
Anonymous
@MadaraUchiha kk
\o/
Madara uses Sharingan. It was super effective.
@DaveRandom Ugh, I guess we have to replace all strtolower calls on URIs for IDNs?
@Saitama he dropped a meteor on his head.
15:35
@kelunik Yes, you should probably just do nothing though
@Tiffany yeah, or that :P
(as in, replace it with nothing)
libdns deals with that for you
@DaveRandom I'm kinda surprised no one asked "fuck of what?"
@DaveRandom We use it in a lot of places, e.g. used it for the host connection limit.
@kelunik If you want I can expose a normalizeName method publicly from libdns
15:37
Yes, please.
kk will do today
posted on May 22, 2017 by CommitStrip

@MadaraUchiha shouldn't we do both? kick for immediate action and flag for a bit more longterm action?
@Feeds I just threw up in my mouth a little
open to suggestion if not suitable for your purposes
15:52
@DaveRandom LGTM
It's just quite a bit more expensive than strtolower(), is all. For performance reasons results need to be cached wherever possible
@bwoebi @Trowski github.com/amphp/socket/pull/28/files < I'm not really sure cancellation is worth it...
@kelunik I don't think so either. Cancellation IMHO is only worth it for more expensive actions.
@bwoebi I'm especially questioning the API. Most things probably only need a isCancelled and a way to access the created exception.
@kelunik isCancelled? what for?
Wes
Wes
15:57
so guys, i need to generate some numbers, potentially on a large scale. but for instance i want the number "3" to have 6 times the chance to be returned than e.g. 2. right now i'm doing [3,3,3,3,3,3,2] and random_int(0,6) but it gets too slow when the array gets very big, and gets big easily. is there another way to do that?
@bwoebi Instead of subscribing: github.com/amphp/socket/pull/28/…
Oh...SO is TLS by default now, just not chat.
@kelunik ah, on the Token. Yes, makes sense.
Wes
Wes
i have no idea how to solve that
:\
@kelunik if ($e = $token->catch()) { /* ... */ }
16:07
@bwoebi We can also just add $token->throwIfCancelled()
@kelunik nah, I don't like that
@DaveRandom hmmmm
if ($e = $token->catch()) { throw $e; } looks better
@bwoebi Just that catch is weird.
@kelunik dunno, it was a short name which just came into my mind … I'm open for better names.
16:14
If a request is redirected is it possible/acceptable to maintain the original Host header?
posted on May 22, 2017 by DaveRandom

- Minimum PHP version is now 7.0, strict types implemented - Default value for `Decoder::$allowTrailingData` is now `true` - Added IDN support when ext/intl is present

:-)
@Feeds Wait waaaaaaaat @DaveRandom
!!dave
@DaveRandom should work on DNS lib.
16:25
@Sean What's your game tag?
probably something embarrassing
Anonymous
@JoeWatkins your absence has been noted.
Wes
Wes
:37229610 (removed)
@wes is your problem that you're scanning the whole array in order to make sure that your desired ratio exists?
Wes
Wes
problem is filling the array. i'm not scanning it
16:34
mmm, so the challenge is that appending items to an array becomes very slow when that array becomes very large?
Wes
Wes
it's not because it's large. it's because inserting takes some time, and inserting 5000, 6000 values takes a lot of time
i've found a solution but sucks. it's a map of ranges
i thought i could do something like, if a value is returned 6 consecutive times then accept it
but it's the other way round
:\
can't think of a better solution
I think you're right :\.
Wes
Wes
16:52
eh, it's not that the "range map" is much better lol
it requires linear search
damn
How many ranges will you have?
@Feeds @DaveRandom When is the amphp/dns rewrite ready so I can use that?
Wes
Wes
@Jonathan a lot :(
I'm not entirely sure of your use case, but it sounds like what you're trying to do is say "I want to generate a bunch of numbers, but I don't want pure randomness, I want weighted randomness"
Wes
Wes
yeah, that
16:56
I actually met someone who asked an interview question like this :)
Wes
Wes
did you get the job? :D
The one thing you can do is make an array where all of your "targets" are the keys.
So like, say you want 2 2's for every 3.
You could make a data structure of [2, 2, 3]
Wes
Wes
yeah it's what i'm doing
Then generate a random number from 0->2
Then you can constant time index into your array
So you don't need to linear scan.
16:57
You just need a single creation step that is O(your ranges) or something like that
@bwoebi @Trowski @DaveRandom Should CancelledException instead of an instance of Error?
@kelunik no - why do you think so?
Wes
Wes
it isn't it canceled? with one L only?

« first day (2410 days earlier)      last day (2764 days later) »