« first day (2484 days earlier)      last day (2690 days later) » 

16:04
Who is far left?
@Fabor Bob.
And Michael Foot. ba-dum-tish
Whut? Really? Bwoebi?
My girlfriend has been bugging me for weeks to check if this pay stub I had from my previous company which went out of business a couple months ago is a legit check. I was 100% sure it was a pay stub.

Talked to the HR woman, turns out it was a legit check for the last week I worked there.
yes, he exists, and isn't just a bot.
Best night ever. Hahaha.
16:18
hi
I am back, new people here already
this is php.net, array_splice(), Example 2
$input[$x] = $y; // for arrays where key equals offset
array_splice($input, $x, 1, $y);
I am not sure what is this suppose to "convey", what meaning / knowledge?
I tested it with two arrays - one 5 elements (1, 2, 3, 4, 5) and the other seven elements (1, 2, 3, 4, 5, 6, 7);
this would be for the first one - array_splice($a, 2, 1, 2);
and this for the second one - array_splice($b, 5, 1, 5);
I used third key for the first one, value is 2, and the sixth key for the second array - the value was 5
in both cases the number of elements in the arrays stays the same
so the first example replaces what is there to 2 at offset to, and the second example replaces what is there to 5 at offset 5
So what is the meaning of this?
$input[$x] = $y; // for arrays where key equals offset
array_splice($input, $x, 1, $y);
I must not be understanding something here
the example indicates that there should be some logic in this, but I don't understand
Example #2, bottom lines, this is about whats in the manual on php.net
you may check there, as this here may be confusing
I mean, they mean that if I have an array where keys are equal to offset it will insert the key number at its offset value?
what sense would this make? also keys can be strings
so what are these lines of the example about?
input - offset - length - replacement
well, the channel is PHP :)
it is on the manual, so it is easy to check
What is your question -- you just trying to make sense of array_splice()?
ignore me... I was just gazing at the wall of text ;-)
no, of the last 3 lines (except for the last one of php.net array_splice() Example #2
go to php.net, array_splice() there, Example #2 on this page, bottom
I don't understand that and I was testing:
$input[$x] = $y; // for arrays where key equals offset
array_splice($input, $x, 1, $y);
16:27
That example looks like garbage IMO
I am just starting learning
like one month of learning so far
but I am not new to this
I've been working on websites for 7 years
Do you understand array_s(p)lice?
like, in general?
but I am going over these things
Its saying everything in that example does the same thing
yes, array_splice yes
Anonymous
16:28
!!wotd
hobbyhorse: a pet idea or project.
and I analyzed most of the lines in this example too:
but what is the "logic" of that?
$input[$x] = $y; // for arrays where key equals offset
array_splice($input, $x, 1, $y);
those two lines are equivalent
maybe these lines are not connected, but it looks like they should be or are
for a given $x
each of those will set that offset to $y
16:28
it does not do the same thing
I was discussing it earlier here too
@Leigh doing nw again this year?
somebody from here actually had access to the admin of php.net and he changed something there, after looking at that
$foo = [1, 2, 3, 4]
array_splice($foo, 1, 1, 5); // [1, 5, 3, 4]
// -OR-
$foo[1] = 5; // [1, 5, 3, 4]
yes
but it basically inserts the value of an index at that offset
so 5 at offset 5 or 2 at offset 2 - and this is not connected to what this example is about
it will do that
this has nothing to do with the other lines
ok
I will look at what you said
I am a beginner
ok :
)
:) thanks
I don't yet fully get it, but I can see that it makes sense, I will look at this
16:32
I am "banging my head" around s*** like this all days :)
@Ekin How are your hamstrings/arms?
any ways of getting better at things like this?
just practice / continue?
Yup
I want to study it all for up to a year and a half, I can do that / I have time, no other work
all days for this
The more you learn, the faster new things will come, because you'll have fewer new things to internalize
16:35
read the entire php.net, like 10 good books, learn NetBeans, Eclipse, PhpStorm, and I do exercises in the afternoon (from w3resource.com now)
I want to specialize in this, give it priority
array_slice - "give me a segment of the array, from this point, for this length"
array_splice - "get me a slice of the array, remove it from the array, and optionally replace it with what I specify"
write website scripts after I learn (like tube, pinterest clone, picture galleries script, link exchange script)
yes, things like these are understood
I get these things
just some examples are not obvious
for example they were using $input or something like this in an example and $input was also a parameter of the function on that manual page, I was thinking that it was connected, but it probably was not, it could have been replaces with $anything_else
things like this, not really findable on google.com
there could be some mistakes or bad examples there too
I am going over that, but I am starting (just one month so far), it should be easier down the road, 3 - 6 - 9 months...
yes, this was already stated above
the mindset can be important too, I realized at this point
when I think "ok, I have to come back to this hard thing again and learn this and so on it may not go as good"
and when I think "ok, the break is over, I can finally come back to working and testing on this <great thing>", it maybe going better
"you like it, it likes you back"
the mindset
@AaronSmith If you're lonely, @Jeeves is always looking for new friends.
@Fabor Derp derp derp!
at this point it is like learning to write and speak in Chinese
I am "breaking through that crust" (of not understanding still, or getting things together), but I can feel that I am already better after one month (I was able to write my own function and it worked)
@Fabor, if people do it for like 5 years and know what they are doing, they can point you in the right direction too
I am basically "studying this", reading the whole php.net, all these things
do it good
this may make a difference
it is not like 50 people digging with shovels and everybody is more or less the same
they can fire you and get 10 new people for the work the next day
@Fabor lol :P
here you can tell that the edu and skills are good
arrange people from the best to the worse
!!dad
What did one snowman say to the other snowman? Smells like carrots.
Anonymous
16:44
hmm. is it possible to make a variable/object invokable?
Anonymous
class foo  {

   $foo = [];

   function __construct(){
       // make $foo invokalble
   }
}
Anonymous
In other words, do something like this
Anonymous
(new foo)->foo();
@samayo ((new foo)->foo)();
Anonymous
w/out type juggling
Anonymous
16:46
@Trowski let me check... is that for 7.0+ only?
Yes.
ok
thanks, I got an answer to that
@samayo yes, but use Closure. because single responsibility
Anonymous
Eh, I give up already :) I was going this answer this stackoverflow.com/questions/45511227/…
what you are looking for is __call, but you shouldn't use it
Anonymous
16:50
But it might be nearly impossible and not worth the time
Anonymous
Nah, __call would've been better. I don't think OP wanted it that way
not sure if that guy is a bot or an actual person..
Anonymous
Is it me or does anyone feel the need to rep-whore just to improve your chances of getting employed.
Anonymous
17:05
I hate doing it, but it's also a necessity I guess.
I am back! And showered.
Now posting #catcontent #tgif
O/
A man and his cat high fiving and fist bumping is the video the world needs right now... https://t.co/m0zhMgp2fS
Anonymous
I need that cat.
:P
17:10
A cat owners knows that this is no high five, it's the beginning of what will end in cuts and scratches had he not pulled his hand away -_-
Whipping cream tastes okay as a milk replacement but oh boy, the stomach didn't love it.
Anonymous
Hmm.. if you are download thousands of files from a site with nodejs you are basically DDoSing it...
17:25
datetime error – #75038
@Gordon german humor is the wurst
17:37
I can't believe @bwoebi looks so normal.
lol, haven't you seen that photo earlier?
No, I was off-radar for a while
I went to PHPNW the year prior and these gits didn't come. Well, some did.
oh, I forget.. :P
I wish to go to those conferences when I grow up or something, with you guys... :P
@Fabor uh … what ought I to look like then?!
A recluse
17:44
some kind of alien?
@Fabor pfff
18:07
I have a classic case of "my code doesn't work and I don't know why."
hmm
In C, is it safe to cast struct { A a; B b; }* to A* ?
nite all
18:23
@Andrea Well, we're kind of relying on that in php-src … Not sure whether it's safe per the standard though.
Hmm, I google image searched my name and there's a picture of @rdlowrey
@bwoebi oh right, refcounts
19:17
@Andrea nope
@NikiC do we do it anyway?
of course
okay ^^
@Andrea .... yes... ish.
@Andrea hrm, actually I may be wrong here
19:19
In C there are degrees of safety.
There might be an exemption from strict aliasing rules for this case specifically
This is permitted but your compiler can break it via optimization if told to do so by re-ordering/packing members. No compiler I am aware of does this in any of the usual -O settings and must explicitly be told to do it.
@LeviMorrison It is non-conforming to reorder members
(Bitfields notwithstanding)
@NikiC Which is why it is a separate option ^_^
You can also get into trouble if you use restrict when doing this because you now have the possibility of two pointers of different types pointing to the same object.
Yes, permitted, and yes it's mostly safe. I'm not sure there are very many things in C that are guaranteed to be safe anyway.
14
Q: Nested structs and strict aliasing in c

JohannesPlease consider the following code: typedef struct { int type; } object_t; typedef struct { object_t object; int age; } person_t; int age(object_t *object) { if (object->type == PERSON) { return ((person_t *)object)->age; } else { return 0; } } Is this legal code or is it...

19:26
ooh, so it's valid. nice
And then we have things that aren't guaranteed by the language yet are guaranteed by every compiler, such as the union member access trick ^_^
@LeviMorrison iirc the union access is actually conforming under c99 -- just not c++
It's nice that Rust doesn't have these kinds of problems
... at least in theory
In practice they don't emit noalias information because LLVM is too buggy
@NikiC As with every single feature I'd have to consult the standard to be completely sure but my memory doesn't match yours here.
evenin
ugh, why does zend_compile_typename require an arg_info when all it touches is the type field
easy to fix at least, it's static
thank you dmitry for zend_type, it will make this exercise much easier…
19:43
@Andrea and that also answers your question ;)
@NikiC it requires an arg_info because we didn't used to have zend_type? yes :p
@NikiC My only problem with Rust is that there aren't enough libraries in the fields I work in :D
It's a pain to take something like MPI and try to make idiomatic Rust. There used to be C++ bindings but they quit because it was too much work and also modeled after old C++.
@tereško o/
argh
crap
I tried to fix the git and made it worse
20:02
I'm trying to compile xdebug for ZTS. Which compile option do I need to make sure it compiles for ZTS and not non-ZTS
did you use the phpize and php-config of your zts build?
Good afternoon PHP :B
@NikiC I have two builds on the server i'm running php. How do I ensure phpize is running the zts version vs non version?
@Ishmael I'd just pass a full path
20:16
Actually I think i found it. phpize zts is zts-phpize
Not sure why I never thought of that. (I didn't configure this box)
@Ishmael Which PHP version are you using?
5.4.45
óÒ
yeah yeah
5.6 is on the horizon
5.6 is a pretty pointless upgrade
I mean if you're already bothering to go through the procedure, might as well upgrade to something worthwhile
20:24
@Ishmael 5.6 is already in "security fixes only" stage of its life
My title prevents me from dictating the path. I can only influence it
I was able to get it to install thanx NikiC
21:00
@tereško You watch "Space brothers"?
I liked it. About two brothers becoming astronauts
on the upside, at least that title is honest
21:47
GoT S07E04 leaked?
@Fabor :s I don't even watch GoT and I can tell you it is
apparently quality sucks. I can wait.
Plus... it's bed time! Night
Good call :P
Night
Anonymous
Is there an app for daily programming-related quiz, like a question/answer for mysql, regex etc... just to learn new stuff or not forget ...
Would be a good idea
Maybe you should make one :P
Anonymous
21:55
I have gazillions of projects, I barely have time to think ...
Anonymous
Although I'm excited about native support for vuejs ...
Anonymous
I no longer need to learn that Java/C# shit crap
Anonymous
I can't even write a full sentence without making typo ...
Anonymous
Which makes me realize that I need to finish my typo-checking app
:3 I would like to never have to learn Java
Anonymous
21:59
All low level languages scare me to death...
Anonymous
I have irrational fear of C, C++, Java and C# ..
You can learn something that compiles into C/Java
22:15
Do Java and C# count as "low level"?
@samayo Yet you probably drive a car each week. Freaking death machines and you are afraid of a programming language?
22:33
Low level would be assembly
I suppose you can count C since it compiles into assembly and you can view the assembly code it makes.
23:07
@LeviMorrison is the only true low-level language actually µcode?
@JosephAstrahan many languages compile into assembly.
Golang, Common Lisp, etc.
23:35
no spoilers until @‌bwoebi's seen it
5
23:46
@JoeWatkins I've successfully compiled php, and it's working!
I'm had some troubles with starting php-fpm: I had to set manually the autorun in `/etc/rc.local` and also chmod `/var/run/php5-fpm.sock` for nginx

« first day (2484 days earlier)      last day (2690 days later) »