« first day (2531 days earlier)      last day (2422 days later) » 

Wes
12:27 AM
ping room
 
Invalid opcode 49/1/8 using opcache – #75230
 
@Jeeves will you be my friend?
 
@crypticツ I don't know you.
 
=o(
 
indeed
c'mon @Jeeves
 
12:33 AM
@FélixGagnon-Grenier Android!
 
@Jeeves are we living in a computer simulation?
 
@crypticツ Ja.
 
=oO
 
Wes
12:56 AM
\o
@Jeeves what is matrix?
 
@Wes 42
 
Wes
lol
 
MoRnInGs
 
EvEnInGs
 
Wes
1:37 AM
AfTeRnOoNs
 
dAt EyE cAnCer
 
Wes
1:53 AM
"That isn't compelling for me" - a guy about "writing better code"
i don't know what to answer
 
@Wes ? Sounds like my boss.
 
Wes
except "you might as well just pull the trigger and end it now"
 
2:40 AM
@Wes tbf, writing good code is almost discouraged, when compared to pressure of producing results quickly at project's beginning
 
Wes
what if i tell you that you can write decent enough code and be also fast :B
 
let me hire you :)
 
@Wes Everyone's definition of "decent" is different and it changes over time. 10yrs ago my code was what I would call decent, today my code I would still call decent, 10yrs from now I will also consider it decent.
 
Wes
lol
 
Keep in mind my code is never more than decent, if at all it's just enough =o\
 
Wes
2:45 AM
for me decent means one thing only: easy to change
 
easy for you to change or for others to change?
the latter is bad job security
 
I don't understand the need for that kind of "job security" anymore
my situation drastically improved each time I changed jobs in the last few years
 
My friend works for a company where the lead dev created his own language and built the entire company's software using it. The language does not support comments so nobody can document the code. The guy is now indispensable.
 
if anything, I want to finish stuff, and get on with the next thing
lol^^
 
3:10 AM
@crypticツ now that is job security
 
Wes
3:47 AM
really, a language? lol
that's a bit extreme :D
 
we say, as we literally work in one of those languages =D /notify @Wes
 
4:13 AM
Quick question: is $str[2] equivalent to $str{2} where $str is a string?
 
test it?
 
Well, they appear to be the same, but there's not some obscure difference between them, is there?
 
@JennaSloan No, but you should just use the bracketed syntax; it's more well understood, and there have been proposals to remove the curly-braced syntax before, they may arise again. If I was not clear, do that vvvvvvv
 
No, no difference. Please use [].
 
0
Q: Saving Image with the actual scale gotten from image croping tool

Philip JemsI am trying to save image the same way it look on cropping tool, using the coping i got something like this X = 443 and Y = 180 and Width = 180 and height = 180, now my problem is how to send it to php to resize the original image as the image editor showed using the above information. Currently ...

 
Wes
4:21 AM
by the way @LeviMorrison gist.github.com/Netmosfera/d8bbe6e24275a5d3a39a3e2c9baf3b5c not sure if linked it to you already
lol, i just noticed that francois commented it
i always thought he ignored me
 
Please any idea how i can save the image?
 
sorry, too drunk to help tonight. I can't understand what you're asking for
 
Wes
@Dereleased have a look at the link too please. thoughts about that?
 
@Dereleased Ok, thank you.
 
@Dereleased Please i want to add image X and Y scale in my existing php image resize function
 
4:29 AM
@Wes I'm not sure I follow the logic on disallowing/deprecating character access using brackets on strings
I love the idea of using {} for range/slice access though. Are you proposing introducing .. as a range operator as part of this?
 
Wes
future scope
it's easy. $sequenceOfFoo[4] returns a Foo, while $sequenceOfFoo{4} would return a Sequence<Foo>
 
which would mean that the body of {} should be a list, so ["a" => 1, "b" => 2, "c" => time(), "d" => -1]{ "b", "d" } === ["b" => 2, "d" => -1] should also work. This is my opinion
($a = []){ "x", "y" } = array_combine(range('a','z'), range(1, 26));
var_dump($a);
// array(2) { "x" => int(24), "y" => int(25) }
 
Wes
maybe @Dereleased
 
@Wes I think I get what you mean here. Again, drunk. But, for an array $a, $a[1] is whatever lives inside that element literally, while $a{1} is [ $a[1] ]?
 
Wes
4:38 AM
yes
one does array_slice / substr, the other returns the single element at the given position
 
You'd have my support (for whatever that's worth) as long as you didn't actually deprecate/disallow string access via brackets for a single character. It doesn't seem unreasonable to expect that you can grab a single char from a string that way. That just feels bog standard, and removing it would weaken PHP as a language. It actually bothers me that the only way to get a character from a string in Perl is to use substr
though in Perl I suspect that largely has to do with the semantics of grabbing an element from a list, but if you don't already know what I mean, now is not the time for me to try to tell you about it =P
 
Wes
i'm saying that instead of doing $string[4] you should do $string{4}
and in future change $string[4] to return an integer, rather than a "substring of length 1"
 
I don't know how I feel on that one honestly
$a = 'some string';
echo $a[1]; // "o"
$a = str_split($a);
echo $a[1]; // "o"
 
Wes
$a[1] === 111
$a{1} === "o"
 
Obviously your proposal is very c-like, but I don't think it tracks with how we deal with PHP on a day-to-day basis
 
Wes
4:46 AM
it's just about consistency... it's strange returning the same type for offset access.
 
I think it's stranger for us to suddenly start treating single characters as a special case of integer, as C does, rather than as strings of length 1, since string is a primitive in PHP
 
Wes
it's not characters. it's bytes
bytes are integers.
 
hm
valid point there
 
@Wes Why is 2..4 gathering 4 elements instead of 2 or 3 (exclusive or inclusive)?
Bash is the language I use .. the most in and that's how it works there.
Don't know what other languages are doing.
 
Wes
ignore it @LeviMorrison it's future scope
 
4:49 AM
@LeviMorrison should gather 3
 
Wes
couldbe 2x4count, 2 up to 4, it's to be defined
 
@Wes I'd at least make future scope sensible lol
 
Although it's said that bash is slower than C, why is it given less running time to bash than C in programming contests?Example As mentioned here
 
<starting index>..<num elements> seems wrong; should be <starting index>..<ending index>
 
Wes
2,4 is not nonsensical. there are several options. you can have from key to key, inclusive or exclusive, from key and count, etc. it depends
 
4:51 AM
@Wes I guess it depends on what you expect to be in there. For me, ".." is a range operator, so I expect "2..4" === "2, 3, 4"
i.e. $x..$y === range($x, $y)
 
Although range should be inclusive on begin and exclusive on end lol
 
@LeviMorrison So many choices! hahaha
just cram it into php.ini
 
It's pretty well established, really.
 
@LeviMorrison I agree, but what I feel is well established does not agree with what you think is well established
 
@Dereleased Consider an opinion on how Python does it (which is exclusive on upper bound):
 
4:55 AM
of course I'm basing this on a language where $,=$\="\n";print for 1..10; is a valid way to print all the numbers from 1-10 on new lines
 
> [...] I was swayed by the elegance of half-open intervals. Especially the invariant that when two slices are adjacent, the first slice's end index is the second slice's start index is just too beautiful to ignore. For example, suppose you split a string into three parts at indices i and j -- the parts would be a[:i], a[i:j], and a[j:].
 
Wes
it's not @LeviMorrison
iirc ruby has both
 
> People get accustomed to talking about ending indices in an exclusive fashion, because an array a[] that is n elements long has its last valid element in a[n-1].

There is another advantage to using an exclusive index for the ending index, which is that you can compute the size of a sublist by subtracting the inclusive beginning index from the exclusive ending index. If I call myList.sublist(3, 7), then I get a sublist with 7 - 3 = 4 elements in it. If the sublist() method had used inclusive indices for both ends of the list, then I would need to add an extra 1 to compute the size of the
 
@LeviMorrison I don't think that's bad in the slightest! However, I think that it should have a different syntax than .., maybe even the colon as shown there
so 1..4===1:5===1,2,3,4
 
Wes
ruby has .. for non inclusive ending key
3 dots for inclusive ending key
 
4:58 AM
I'm also fine with that, but do you think it will pose any issue with the argument expansion operator?
 
> The number of elements in the range [n, m) is just m-n (and not m-n+1).
The empty range is [n, n) (and not [n, n-1], which can be a problem if n is an iterator already pointing the first element of a list, or if n == 0).
For floats you can write [13, 42) (instead of [13, 41.999999999999]).
The +1 and -1 are almost never used, when handling ranges. This is an advantage if they are expensive (as it is for dates).
If you write a find in a range, the fact that there was nothing found can easily indicated by returning the end as the found position: if( find( [begin, end) ) == end) nothing found.
Even bloody Excel does exclusive upper bound...
 
The established scripting language which PHP is most like is Perl, so I don't feel that my comparisons are unwarranted. I need to walk the dogs, back in a few
 
Wes
anyway that wasn't really what i wanted you to focus on in the rfc :P
youtube autoplay brought me to russian car repair videos youtube.com/watch?v=diBCLpES2tQ
i started with techno music
 
This makes me happy =o) imgur.com/gallery/kPPiqD1
 
@Wes You were mostly wanting attention to the specific deprecation of $string[ix] and $array{ix}? I have no problem on the latter, and I could probably be convinced of the former
as long as isset($string[ix]) is still ok
 
Wes
5:10 AM
kinda
 
only ok in phase 2 of your dastardly plan =P
 
5:36 AM
morning
 
6:12 AM
morning !
0/
 
6:23 AM
E_TOO_MUCH_PATH_OF_EXILE
damn that shit is addictive
 
@FélixGagnon-Grenier you could start by turning the settings down :( and press F1 (I think it was F1) to launch the profiler
 
yeah, they're all very much down
 
hmm ...
 
tbh, I noticed that I should have ahigher framerate in a few games, in the last months/years
I never thought this could be really a problem of hardware/connectivity, but this is justtoo weird
I mean... I dunno. I should be able to run skyrim on 30 fps with medium graphics, should I not?
s/few/all of them
 
o/
 
6:28 AM
\o
 
no, with connection issues you would get stuttering, while not affecting the FPS
 
well, that dreaded setting, adaptive resolution (on PoE) really helps
but it's horribly pixelized. at least I don't die cause I can dodge shit, but it's strange
 
I think the bottleneck might be the CPU
lemme check
 
I thought a quad physical core 2.6 ghz would be at least decent
 
it's 8 years old ... checking
hmm, according to specs it should be enough
what are you CPU temps when you play?
 
6:31 AM
hmmmm'
hum...
oh wait, I think I installed a monitor software some time ago
 
Hi guys
Is anybody here who have used lodash.js?
 
ok found it, I'll monitor some intense skill display to see temp
 
Aug 27 at 22:28, by tereško
lemme know when you have saved up €1000 and I will assemble a build for you :P
 
morning
 
@tereško I totally have that saved up.
right now.
temp seems to be going near 100
 
6:40 AM
o/
 
@FélixGagnon-Grenier celsius ?
 
@tereško hmmm, do you mean to say, that mt deficient cooling system, could be slowing stuff up?
... yeah?
w8
well yeah
peaks are near that
 
yeha, 100*C is bad
 
well, maybe it's 95. but I guess that's in the same zone
yeah it seems the fans has little to no effect actually
 
6:42 AM
normally you will start see throttling at 70*C
 
I can literally see the spikes when I alt tab to the game vs just in chat
graph goes well over 70
 
cleaning the box and plopping on a different fan would be a good short-term solution
 
hmmm... but somethign is trange. the graph produced by OpenHardwareMonitor really shows a line of cpu goind real near 100, but the max written in the stats is registered at 69
 
lemme check what's out there for old Athlons .. sec
 
what are the cause spawn error?
 
6:47 AM
so, it's actually AM3 socket
 
then you can basically put any cooler on that
 
hmmm. no. I get confused with my precedent build, this was something I kinda got on the fly
which doesn't mean it's not aw3, I just can't say
 
AthlonII x4 uses AM3 socket
 
k
tbh, please advice on build
I'll look for short term, but I kind of am getting really over the edge of "ffs can I haz another computer"
 
6:49 AM
.. wait .. no
what is your full CPU name?
 
AMD Athlon(tm) II X4 620
I bought cpu, gpu mobo and ram from a roommate who claimed all that to be top notch.
 
oh, good, still AM3 (there was some confusion with older models)
 
a few years back.
 
^ 6-8 years
 
@tereško It's Charles Peter Uhura
 
6:51 AM
exactly
 
@FélixGagnon-Grenier these are your options: ca.pcpartpicker.com/products/cpu-cooler/#sort=price&c=3
 
crazy thought: can the actual connection between gpu and monitor slow thing down? is that even possible?
 
no
 
I mean, physical cable
k
 
FPS counter is computed before the picture leaves the GPU
 
6:54 AM
yes. what if it never reaches the monitor, because I have some weird hdmi to DVI/DisplayPort connector?
... yeah then I would see 30 fps written and wonder why I don't see them
nvm
 
such a connection (if shitty) might cause some odd flickering, but would have no impact on FPS
basically, get a cheap cooler and thermal compound
... and compressed air
 
it will probably cost you somewhere from $25 to $40 in total
... or you could start building a new machine
 
/me is sick
 
Aug 27 at 22:28, by tereško
lemme know when you have saved up €1000 and I will assemble a build for you :P
I'm ready to do that, if you have the time/interest
 
6:59 AM
I will take a look at what I can put together in the evening
and preferences for size of the case? dusty environment and/or cat? silent running? power usage?
 
I got no cat, but probably pretty dusty env
silent would be a fucking god given. present box is like godzilla
I don't really care for power usage, nor do I really undersatnd what that means
like, homw much electricity the computer consumes?
I'm in quebec, we basically shit electricity
 
how silent? an water cooling AIO will be +100$
 
as for the size, mid tower is generally what I look
water cooling is so nice I am totally ok with it
I especially if I have to actually plug it together, with chances of failure
makes things spicier
 
@JoeWatkins get well soon
 
@FélixGagnon-Grenier naah, AIO coolers dont have to plug anything strange
 
7:04 AM
is it really water? or some strange alienish liquid? ;)
 
kinda like this (but I would not use this particular model in your build)
 
fractal design. this is like literally my mail adress
well, not "design" part, but I am partial to whatever has fractal in it
but back to the point, yeah, I am not sure how I am supposed to look at it
ffs. that was a hard edit
oh, the heat sink directly goes to the fans
 
the AIO coolers have a heat sink, that is already attached to the radiator
the whole thing is pre-filled with water
@FélixGagnon-Grenier is it normal that video cards in your country cost like 25% more?
 
@tereško not sure if normal, but kinda expected
 
7:19 AM
yikes. is that even the same currency?
ouch one of them is like 230$ more
 
Hello
 
that's a scam, I think
 
let's gor for the card,
 
uhm, is it just me getting 502 Bad Gateway from wiki.php.net?
 
7:26 AM
Why symfony is better than laravel?
I use symfony
 
Don't go there
 
But i want to know, Why symfony is better than laravel?
 
3:30 am, time for me to actually get to sleep. nn
 
Any one can show me some point?
 
7:29 AM
@NeelIon .
 
@Gordon tell me
 
@NeelIon you asked for a point. I just gave you one.
 
may be structure
@Gordon LOL
@Gordon I mean some techniques that makes symfony better
Or structure
 
since you are starting with a premise, that you need a framework, you already got it wrong
 
mornin
 
7:38 AM
@NeelIon the short version is: Laravel is good at marketing itself, but it also has a somewhat toxic community, especially regarding their thought leaders. Their mantra "question everything" is an excuse to break with established good practise patterns. as a consequence, the framework itself does what it's supposed to do, but has some smells in it, some of us find inacceptable.
@NeelIon a good deal of laravel is still based on symfony though. that's how it started out
but symfony as a framework is regarded to be better engineered by most of us.
though laravel fans will probably tell you it lacks the ease of use laravel offers
 
@Gordon yes
 
but as I said: don't go there. the discussion is mostly pointless. a framework is a tool with pros and cons. that's true for sf and for laravel. whether its appropriate to use for your project depends on your project and not on some blanket statements or fanboism.
 
@Gordon Does symfony uses good practice than laravel if yes then what are those?
 
ya know ... things like dependency injection and separation of concerns
 
@NeelIon in general, better adherence to SOLID principles.
 
7:44 AM
@Gordon And does symfony uses any modern structure or pattern that laravel doesnt
 
@NeelIon what are "modern patterns"?
all the OOP-related patterns, that people use, where discovered in 70s
 
@tereško some new structure or patterns that i don't know what symfony uses and a good practice
@tereško everyday code structures getting better right?
 
do think that "good practices" and "new patterns" are some type of fairy dust, that you sprinkle on a fucking framework?
 
@tereško no, these things make frameworks better
 
@NeelIon another main difference: Sf uses Doctrine as their ORM which is based on a Data Mapper approach, while Laravel uses Eloquent which is based on ActiveRecord. But ActiveRecord has problems when the impedance mismatch grows. Most first gen frameworks after RoR based their ORMs on ActiveRecord. But the generation after that realized its shortcomings. So it's somewhat odd to base a brand new ORM on AR
 
7:49 AM
because I am getting an impression that you do not understand the meaning of the words that you use
 
Also, Laravel has this concept of Facades which are not really Facades.
 
@NeelIon how?
 
@Gordon thanks man, thanks a lot.
 
Then there was this whole posse around "Visual Debt", where some Laravelians claimed removing certain keywords from your code would make for more readable code.
 
@NeelIon how?
 
7:52 AM
And some other Laravelians seem to dislike typehints because it interferes with duck typing
 
@Gordon yes LOL
 
@NeelIon how?
 
@tereško how what?
 
@NeelIon how do they make frameworks better?
(or do you not understand what those "arrow" icons do)
 
@Ekin No, it's going to be soon fine.
 
7:56 AM
@Gordon thanks Gordon, i have learnt some terms from you that i didnt know. Like Data Mapper, active records, facades. I am going to learn more about these term
 
@kelunik Merged and released. I've also added you, Bob and Aaron as collabs.
 
You know, if i don't know the name of patterns or practices, how can i learn them
 
@NeelIon how do "modern patterns and practices" make frameworks better?
you still have not answered
 
@tereško may be makes faster, makes secure, makes more productive
 
no, no and not really
 
7:59 AM
@tereško how?
 
patterns don't make the code faster, they don't make the code more secure and the "productivity" is due to technical debt
 
@NeelIon start here: en.wikipedia.org/wiki/SOLID_(object-oriented_design) and follow all the links.
 
@Gordon thank man :)
@tereško then what they do?
 
@NeelIon patterns are standardized description of code structures, they are used as shorthands for explaining "what was written in code". When I tell you that "package X is based on singleton pattern" , it should explain a lot of it's structure without you needing to even look at the code.
 
note that reading and understanding this might take several years. it takes time to understand each of the subjects given and even more time to connect the dots.
 
8:03 AM
@DaveRandom Does it need a fix for 1.0?
 
posted on September 20, 2017 by DaveRandom

- Fix encoding of type field in responses

 
@tereško great, thank you i didnt know that
 
@kelunik I don't have time to sit down and figure that out, almost certainly yes. tbh I hate that codebase :-/
It should be easy enough to cherry-pick downwards
 
@DaveRandom I might find some time in the coming days, currently upgrading wiki.php.net...
 
@kelunik finally making it run on 5.2? :-P
 
8:07 AM
@tereško Thanks man
 
@DaveRandom The new one is running 5.6 currently, but I mean the doku wiki, not PHP itself for now.
 
@tereško I have to learn a lot of things
 
that's lies in the nature of our profession
 
@Gordon Correct
Whenever i need to learn or know something new i come here, you guys are always awesome
@Gordon Thank you
@tereško Thank you
 
Anonymous
8:11 AM
o/
 
XP
 
@kelunik sorry I was wrong about the processwrapper waiting for PHP to close all the sockets btw, the output streams are closed when the child ends, however the stdin copy loop is not closed until bytes_read == 0, so in other words that thread won't exit until PHP shuts down the socket.
 
XP is a short code of an imo right?
 
So for the stdin socket, when you close it you need to stream_socket_shutdown(SHUT_WR) but leave it open for reading
 
@DaveRandom That means there's a bug if STDIN is closed before the process is finished?
@DaveRandom Yes, that happens anyway. It all works, I just have a dump watcher issue.
 
8:15 AM
> On February 5, 2001, Microsoft officially announced that Whistler would be known as Windows XP, where XP stands for "experience".
 
@kelunik I know when I tested it it worked, you'll only have a problem if you fclose() the stdin socket. In the same way as the *nix script uses a read watcher on fd#3 to watch for the child ending, you use a read watcher on fd#0 on windows.
That socket will become readable when the child ends
 
@tereško LOL
 
@DaveRandom The problem is that if the process is destroyed before joining it, the exit watcher will exist for whatever reason.
 
BRB guys
 
@kelunik yeh but it's a TCP socket, if the process goes away it will be reset by the OS. If you get strlen(fread($sock)) == 0 instead of the exit code, you know the child died unexpectedly
If you want me to add a 3rd socket for control data I can do that, but I really am pretty certain it's not required
 
Anonymous
8:24 AM
protip: If anyone wants to make a 'native' cross platform mobile app, and don't want to waste time learning x,y .. use Nativescript Sidekick
 
Anonymous
!!wotd
 
huh, Jeeves is not in the room
 
ReflectionProperty#getValue() incorrectly works with inherited classes. – #75231
3 messages moved to Trash
 
!!wotd
ah there was an UI change issue
 
!!blame jayistoocommon
 
8:32 AM
 
@DaveRandom I finally fixed it. github.com/amphp/process/pull/15/commits/…
 
!!blame peehaa's-mom
 
3 messages moved to Trash
 
8:35 AM
rubbish
 
3 messages moved to Trash
3 messages moved to Trash
 
sorry
 
1 @DaveRandom moved to Trash
 
print_r creating side-effect. – #75232
 
who knows here bootgrid?
 
Anonymous
8:50 AM
who's here bootgrid?
 
Anonymous
!!welcome phoenix
 
Welcome @phoenix, please read the Chat Guidelines
 
Im having problem in using bootgrid, just wanna know if there's someone willing to help me. hehe
 
@Jeeves also works with ReflectionObject::export(new DateTime)
 
@Gordon You're not my girlfriend.
 
8:53 AM
@Jeeves that is correct
 
@Gordon Thank you. It is appreciated.
 
im using a formatter, a command-select specifically, i cant get the row id im supposed to be getting
here's a bit of my code
formatters: {
/* "linkview" : function(column, row) {
return "<a href=\"<?php //echo base_url('benelist_cont/getRoster')?>/" + row.family_id + "\" class=\"btn btn-link\" data-row-id=\"" + row.family_id + "\" >View Members</a>";
} */

"commands": function(column, row)
{
return "<button type=\"button\" class=\"btn btn-xs btn-default command-select\" data-row-id=\"" + row.family_id + "\" ><span class=\"glyphicon glyphicon-list-alt\"></span></button> ";
}
 
  - Properties [0] {
  }

  - Dynamic properties [3] {
    Property [ <dynamic> public $date ]
    Property [ <dynamic> public $timezone_type ]
    Property [ <dynamic> public $timezone ]
  }
it apparently adds these on Reflection and probably also on print_r/var_dump
@phoenix there is a certain irony in that your code uses formatters but your message doesnt
 
@Gordon hi, im using command-select
here's the code to alert the id
$("#grid-data").bootgrid(gridSettings).on("loaded.rs.jquery.bootgrid", function(){
$("#grid-data").find(".command-select").on("click", function(e)
{
alert("You pressed edit on row: " + $(this).data("row-family_id"));
});
});
this part wont work $(this).data("row-family_id"), i just followed the documentation of bootgrid.
 
@phoenix still no formatting.
also I have no clue about whatever that is you are using. it looks like javascript in which case you are likely better off in the js room
 
o/
 
I'm sorry, the code i pasted was a bit messy, i formatted it to look readeable here in pastebin.com/0kPBciC5.
 
> it looks like javascript in which case you are likely better off in the js room
 
Anonymous
@phoenix so there's multiple rooms for different languages, this is mainly for PHP. You'll probably get better help chat.stackoverflow.com/rooms/17/javascript here, which is the js room.
 
9:20 AM
ok, thanks guys :)
 
Wes
@kelunik @Trowski i've not seen photos of computers with amphp stickers on it yet :D do you have one?
 
@Wes @Trowski has stickers.
 
And he's sending some to PHPNW. raises pitchfork
 

« first day (2531 days earlier)      last day (2422 days later) »