« first day (2787 days earlier)      last day (2385 days later) » 
00:00 - 15:0015:00 - 00:00

15:00
oh ... and if you don't know an answer, just tell them that ... and note where and how you would look for that answer, when you had time
@tereško Kinda blurry about that. I would have to look it up.
@tereško That's a great tip, I will keep that in mind.
making shit up is a bad strategy in an interview
@tereško I have a UDP joke for you, but you might not get it...
:P
@tereško True.
15:03
an intern is expected to not know things ..
@mega6382 Ahh, got that one! or did I?
Well they kinda expect me to know some decent PHP :/
Well, I owe to you guys, I got to learn way more shit here than any youtube channel (otherwise I usually get a youtube link here). Thanks!
Serious, but basic question. Under assumption of using symfony, I've seen some SO questions using "Services" in strange ways, but some questionably correct. A entity + repository deals with anything database related right? Controller for routing + operations like pagination and form validation. What about stuff dealing with math? Like if I have to calculate the total cost of a shopping cart, should this function be a service called in controller, or all math in controller?
@Darius Controller doesn't do the routing.
By routing I mean, if all good, redirect to here and handle an action based on route.
@Darius not for an intern
15:09
Not for an intern? What you mean?
I think of intern like interns/cheap labor
@tereško I don't think he was suggesting questions for internship. He was asking those questions for himself.
Yeah , it's for myself.
Sorry, I didn't read the prior convo, maybe threw you off.
@Darius emm .. if you are actually doing pure symfony, then I dont know, but in genera - the answers are "NO"
So all math done in controller?
no, the math should probably be somewhere in the model layer
but I am not sure if in the "service"
more likely a cart would be some type of domain entity, which should know it's own total cost
15:24
thank you.
appreciate your input as always.
Anonymous
@tereško have you played fortnite?
only watched it
Anonymous
most addictive game I have played ever
Anonymous
1400 matches and 0 wins still
lol
try playing something singleplayer
this thing sounds like waste of time
Anonymous
15:35
i am hooked to it
Anonymous
something is def wrong though
Anonymous
the most winless streak I read was like 600 games
well ... when something like that happens to one of my coworkers, I blame problems in the code (the genetic one)
have you considered going to a doctor?
Anonymous
i have an appointment already
but seriously, fuck that game
try playing some good singleplayer thing
the steam sale is coming in like 2-ish weeks
Anonymous
15:41
yeah definitely, they don't even match you based on skill. that is the problem with the game
Anonymous
but it's pretty addictive
Anonymous
I have bookmarked some games I wanna play, how do I know when steam is having a sale?
there is the "wishlist" feature on steam
and when you get a mail from steam that something like 50 games from your wishlist have discounts, you can know it is a sale
@MadaraUchiha I believe you did check ten5 was the same accounts as the Thomas guy and thought it was....but also, this guy is seriously sick. I'm hoping that if other people stop interacting with him normally, and instead he is only told "go to a doctor" whenever he comes here, he might actually get the help he needs.
@samayo but in general they have solstice + equinox sales (the next one should start around 20th of june) and go for a week or two ... and then some additional sales, like black friday
15:43
@Danack I've contacted the community team about merging their extra accounts
bob
bob
Evening all, ok, if I have an array of id's and an array of amounts, and i'm using a foreach loop to fetch data from the db based on the id's, how can I use the array of amounts in that same foreach loop as the value?
@bob Assuming same index, you can use foreach ($arr as $key => $value) {} and inside use $otherArr[$key]
Anonymous
i played with the twich guy that cried on youtube, he was steaming it live and everyone in the comments made fun of my ass for not wining a single game in 1400 matches
Anonymous
i felt ashamed like it was something important lol
bob
bob
@MadaraUchiha sorry not getting the $otherArr[$key] part.
15:46
@samayo You didn't win a single game in 1400 matches?
I would have given up after 40, TBH
@bob Well, you can use $otherArr[0] to access the 0th element in $otherArr, right?
bob
bob
@MadaraUchiha yeah, i'm so confused lol
Assume for a moment, that I have a $foo = 0, I can now use $otherArr[$foo] to access the same element
With me so far?
bob
bob
@MadaraUchiha yes
15:48
With foreach ($arr as $key => $value) {}, you iterate $arr and for each iteration, $key would be the current key in the iteration, and $value would be the value.
bob
bob
@MadaraUchiha yep, clear as day
So you can, inside of the foreach loop, use $otherArr[$key] to access the element in the same place in the other array
btw, @samayo, why is your steam profile private?
I can't even see your wishlist/games
Anonymous
@tereško defunctAI
Anonymous
15:53
@MadaraUchiha nope, not yet
bob
bob
@MadaraUchiha i know this is stupid simple, but I just can't think. pastebin.com/invFuiJ6
Anonymous
I could've probably won a couple if I change my strategy and avoid confronting players, hide until last one is left but I find that like cheating
@samayo What are we talking about?
That doesn't sound like Overwatch
Anonymous
fortnite
Ah
@bob That doesn't look like valid PHP syntax
bob
bob
15:59
@MadaraUchiha It's not lol, i'm getting Undefined variable: value
16:50
evenin
@bob because it has not been defined
bob
bob
17:14
@tereško I'm not sure how to define it. I just get a Notice: Array to string conversion in… error
do you understand what those errors mean?
which word confuses you?
bob
bob
@tereško Not really, I googled it. but could figure out how to fix it
which word can't you understand?
bob
bob
@tereško well the conversion part and why can't it be converted.
what happens if you do $foo = 1 + '1341'; ?
bob
bob
17:18
@tereško an error because one is a string and the other is an integer?
how about do an experiment?
bob
bob
@tereško good idea :)
@tereško oh i get '1342'
what happens if you do $foo = 'as' + [1 + 5]; ?
bob
bob
@tereško A non-numeric value encountered
sorry ,error
what happens if you do $foo = 'as' + [1 => 5]; ?
bob
bob
17:24
@tereško same, A non-numeric value encountered
why?
do you understand why you are getting an error ?
bob
bob
@tereško yes, i think so. because there is a string 'as' and you can't add that to a number.
so, what would you expect to happen if you do echo [2 => 76]; ?
bob
bob
@tereško ah, it's an array, so it'll just display array
13 mins ago, by bob
@tereško I'm not sure how to define it. I just get a Notice: Array to string conversion in… error
why are you getting the notification in that line?
bob
bob
17:28
@tereško Because i'm trying to echo and array.
ok ... next
what happens if you do: echo $foobar;?
bob
bob
@tereško Undefined variable:
and how is it different from $foobar = 2; echo $foobar; ?
bob
bob
@tereško foobar is defined, in the second example
so ... what is the conclusion for:
2 hours ago, by bob
@MadaraUchiha It's not lol, i'm getting Undefined variable: value
bob
bob
17:30
@tereško I've not defined it.
But i'm not defining a variable, i'm defining an array
Hello, good evening from Athens!
I have a question: I make this for a pacman game.

jsfiddle.net/58bfuarL

Now i want to fill with blue color.

How can i do that?
17:42
\o
bob
bob
@ChrisP like this? jsfiddle.net/58bfuarL/1
No, only the part that the player cannot be moved in.
Only the second path attribute.
On armies of bad-ass nano bots ... or debugging: http://blog.krakjoe.ninja/2018/06/preface-to-idbg.html #php
@ChrisP so like walls
@Danack That's exactly true. He rambles on whether anyone says anything to him or not. In fact without intervention by one of you guys he does not stop.
@Danack mistyped- should say "that's NOT exactly true..."
Afternoon!
17:58
he just needs help, I have a bit of pity for him in that... admitting that oneself needs help with mental health is incredibly hard. I was too proud for the longest time to seek help. But that's a story I keep repeating so... won't go into it further.
A possible similar question to this one might have been asked before on SO but the only answer on it isn't clear. I'm using "random_bytes" (just for a simple testing purpose) and store the generated value in a session, then passing it to the user and getting it back. Then I'm getting two equal values (two of this: �%���hY{��8}��), no problem so far, however, when I compare them against each other it returns false.
(I used bin2hex function too and contrary to their apparently similar looks they're not equal.)
@Simon.B encoding issue?
like when you're generated the random_bytes and then storing them somewhere, database maybe? database encodes it to something else, and the comparison turns out wrong?
@Simon.B sending raw bytes is probably not a good idea. use bin2hex before sending into storage.
He either needs help or he's trolling. In either case we're not psychiatrists or doctors- best thing is to not give him an outlet to continue doing what he does in here and mods remove him every time.
@JoeWatkins TBH I rarely ever felt to be more productive in PHP with a debugger … I use a debugger all the time I C, but 99% of the time in PHP I feel like I'm wasting more time setting up the debugger (breakpoints, launch debugger etc.) than debugging via var_dump()
18:01
goals for today: finish setting up nginx on my VPS and finish reading top 10 OWASP
@StatikStasis indeed
@Simon.B basically, what @Danack said
@JoeWatkins Because often enough I'm just debugging backwards and adding variable dumps where needed with sometimes more elaborate expressions
it just dumps me all data needed in the format I want
@JoeWatkins you really need to make a series of shorty youtube videos explaining how tyo use phpdbg
whereas with a debugger you usually inspect every value individually you need, even in GUI formats having to expand all the things
(I too am mostly debugging shit using var_dump)
18:03
I like debuggers, but for PHP it's not too practical
@Danack hmm, Thank you, this has solved the issue.
I disagree, they are necessary ... don't misunderstand, I use var_dump like everyone does when developing bits of code ... but when it comes to debugging entire systems, you need a debugger, sprinkling var dump everywhere becomes practically impossible at a certain point ...
you must only work on code that mostly works :)
@bwoebi I think it's basically because you never actually run your php code from your development environment - instead it gets executed on a server and you are just looking at the output on the client
in that aspect php has a really punchcard-ish workflow
and people have adopted to that
that's why there is so low uptake on proper debugging tools
the kind of code bases I work on, it's unreasonable to have such high fidelity familiarity that I even know where to put var_dumps, and discovering that, will always take longer than firing up a debugger ...
18:08
sure, @JoeWatkins, but that just makes your development environment special
it says nothing about the viability of debug tools in 99.99% of projects
@tereško uh, sure I run PHP on my dev env?!
I've worked on codebases without even having access to prod
@bwoebi no, you run it on a server, which is completely separate from your IDE
think about how development is done for desktop applications
I think you guys are talking past each other. Bob doesn't debug other people's libraries much. Joe (I'm pretty sure) spends quite a bit of time debugging PHP code he didn't write.
@PeeHaa shit, I've been rumbled
@Danack I'd say half of the time I'm working with PHP I'm working with other peoples code
18:12
I do, I rarely actually write any php code myself now ...
@JoeWatkins stuck on doing code-reviews most of the time? or on c?
what confuses me is someone who knows very well what a debugger is capable of, having written a fair chunk of one, saying they don't see the point in debuggers ... learning how a debugger worked was like a revelation for me ...
we are lazy
setting up debugger takes time and integrations usually bug out
@tereško I mostly write in C, spend a lot of most working days reviewing PHP code, and a fair amount of the rest of the time debugging/profiling or directing the optimisation of code other people wrote or are writing ...
@JoeWatkins dunno, I read the code and then it doesn't surprise me so much … I usually need debuggers when I can't be intuitively sure about what will happen
Often I dump data at a point before and after and compare that and work out where it'll fail
without actually dumping at each step
unlinke C, where there are often much more side effects and I'm happy to be able to step
18:17
maybe my intuition sucks, I just by default open a debugger when I think there are bugs ...
you really just do what works out best for you :-)
you know I even find myself using gdb to debug php sometimes, even phpdbg isn't enough ...
Yes, I do too
I still can't attach to a process in anything but gdb ... this annoys me ...
I intend to fix it ... somehow ...
you need to wait for the engine to return to a stable state before you can attach things to PHP, that's the problem
actually, one could attach phpdbg, set a breakpoint in executor and then handle that to install itself completely
18:21
yeah, but I think we may be able to gracefully interrupt it now ... I've not tried anything yet ... but the new vm_interrupt stuff may be useful here ...
vm_interrupt is also interesting, yeah
though sometimes you hang inside an internal function
but you can interrupt those whatever
(gdb does it)
sure, but the engine is in an unstable state then
I'm not necessarily interested in forcing it to step out
just actually interrupting it would be a good start ...
for gdb the only state it needs is opcode level state
which is given by the system
18:25
is there any way to create an exception without the top stack frame?
i assume not but asking just in case
k, ty anyway
the trace of exceptions is generated by PHP by unwinding the stack, which obviously always icnludes top
not create, but you could implement a __toString that uses getTrace and ignore whatever you wanted ...
yeah, you can override it obviously...
18:29
@DaveRandom what is /mnt/data/srv? is it symlinked to /srv?
@JoeWatkins The main problem with attaching is the existing functions on stack. E.g. phpdbg overrides the executor... but the currently running stack is using execute_ex
@JoeWatkins so the most important showstopper is if you need to overwrite the executor to properly function (phpdbg has that problem)
bob
bob
I have a foreach loop nested in a foreach loop and it's duplicating data, can any one explain why this is happening? pastebin.com/WiA3wA1K
@StatikStasis sounds like a pretty timid response
18:41
=D
@tereško You actually came to mind when I saw it. =D
I have never told anyone to kill themselves (hmm ... odd ... I have never actually seen it as a proper insult)
If I had time I would have dropped your image in there for Stack Overflow... maybe later.
I know- I'm exaggerating.
@bob first fix your SQLi
ok guys, time to get to the nitty-gritty of things!!!
ruh roh...
18:44
we write an non-oop app, any; we do html/css first, then we do the dir/file structure, we do the database design next and now is the time to do the php cooding
how do we approach this?; html to database and the other way around joing first, or something like that
bob
bob
@crypticツ ok, fixed. still same issue
we have html/css - - - dir/files structure - - - database is designed
how do we write the code, where do we start, how do we continue?
you have not set the fetch mode
since you are using PDO, when you are establishing the connection , you should set the fetch mode
are you talking to me?
PDO::FETCH_ASSOC is what you probably will want to use
18:48
@ten5 you go and talk to your doctor first. Have you done that?
it would be great to figure out this first
We've got a new rule; no-one is allowed to indulge your OCD behaviour. Everyone is going to just tell you to get and talk to your doctor about your OCD.
so I could lay down on a bed and think it through
no way to get some info, maybe like 10 or 20%?
18:50
... but I think you can also set it in the PDO's constructor (in the same place where you disable emulated prepares and set error mode)
or where would I look on the net
1 min ago, by Danack
We've got a new rule; no-one is allowed to indulge your OCD behaviour. Everyone is going to just tell you to get and talk to your doctor about your OCD.
@JoeWatkins You have that php_inspector_execute() function for example...
Go and talk to your doctor.
html/css done, dir/file structure done, database design done, how do we add the code now, where do we start, with what do we start?
18:51
@Danack why is he not in your ignore list
seems like too much frustration to be worth it
The person is in serious need of help. And room owners are meant to watch for shitty behaviour.
this is not suicide support line ... do you really think you are responsible for self-harm?
he's either genuinely autistic (which can't be helped), or convinced that he knows da way
only thing that changes is your blood pressure
and now I need to bleach my brain
Should state that function arguments are passed by reference if objects – #76411
18:57
Speaking of Japan... a friend of mine at work is from there and when they visit home they bring me a few bags of these Sugar Cane Candies that are AMAZING!
These are them... but they are much cheaper in Japan. ebay.com/itm/…
I must have missed any conversations that have occurred about Microsoft possibly obtaining GitHub... thoughts?
I will stick with beer and cheese
it looks a lot healthier
Yeah- sugar definitely not good for you. I am glad I cannot find them locally for that reason.
lately MS has played pretty well with opensource and it will also give nice kick for people to not put all their eggs in the same basket
opensource has become too dependent on github - it has created a pretty large "single point of failure"
and there are good alternatives, like bitbucket and gitlab
Interesting.
MS is not the "designated evil corp" these days ... that role has been taken by google
if there were rumors about google buying github, I would be a lot more worried
19:08
Yeah I agree.
because they would also be able to shape the traffic so that the competition gets starved (and it would not even be intentional)
19:19
other than inventing something for myself, is there a way I can practice memorizing linux binary permissions, like a list of numbers and I figure out what r/w/x permissions it has, and vice versa?
I feel silly writing a bunch of numbers down on paper... but I suppose I could write a program to output something for me
more of like an exercise
like homework
cause I'll be damned if I don't drill this into my head, and finally remember it without having to stumble around thinking about it
wow, that is over complicated
19:24
lol- when I was learning to play the piano I used to write down all of the notes in a scale and I would take them on a long drive and say them over and over without looking. Referencing them when I could not do it by heart. There is a lot of tedious learning I have done that way. Did the same thing when learning the NNS for a music composition.
When I say long drive- I mean like having to drive to another location for work. Not just a random drive while I learn.
yeah, I used flash cards to memorize degrees <-> radians
@JoeWatkins repetition works for me (assuming that's what you're referring to)
I think he is talking about the link I posted... maybe.
maybe not...?
now to figure out how to write a program to generate a list of numbers for me, lol
0 = none
1 = execute
2 = write
4 = read
note descending order, should be able to remember that ...

three columns, owner, in group, and out group, in that order ...

666 = 4+2 for owner, in and out group, that's read+write but no execute
777 = 4+2+1 for owner, in and out group, that's read+write+execute
644 = 4+2 for owner (read+write), 4 for in and out group (so read only) ...
and so on ...
600, only owner can read and write ...
19:28
@JoeWatkins I understand it, but when I need to use it, I can't remember it, and I want to put an end to that
now you do some ...
I don't want to have to google every time I need to use chmod
just read what I wrote, slowly ...
there's very little to remember, forget binary to octal conversions ... there's like three things to know ...
I know, I've read this type of stuff before, but in a month, I won't remember unless I work through drill exercises until it's ingrained in my head
I know that 4 = read, 2 = write, 1 = execute, and it's just a matter of adding those together
but I want to be able to look at a number and know instantly what it refers to
you mean ... like a number :D ???
I don't understand
19:31
like if someone tells me to type chmod 650 in a week from now, I won't remember what permissions this gives to a file because I'll forget everything I've learned today, unless I repeatedly write conversions out on paper
who told you to do that ?
no one
nobody is going to tell you to do that ...
it's just one of the ways how I learn
and 650 was a number out of my ass
Wes
Wes
\o
19:36
o/
basically I want to commit the rwx to numbers in my motor memory, so I don't spend time translating the number to permissions in my head
I don't know how to PHP...
what's everyone up to?
torturing myself with multidimensional arrays
Lovely. Those are always fun.
19:45
and I get mixed up on which should be the outer for loop
Yeah, it's harder when you make a preconceived notion of which should be at the top.
Trying to force it
can a multidimensional array be initialized like $list_permissions = [][];?
20:03
apparently not.
I don't need an array actually 3v4l.org/uQE3d
yay
what are you actually trying to fix?
30 mins ago, by Tiffany
basically I want to commit the rwx to numbers in my motor memory, so I don't spend time translating the number to permissions in my head
why
it's just addition
20:07
I asked if anyone knew of a homework-type drill that I could work from, but no suggestions, so I wrote a program to do it for me.
Is there any English word which sounds like "braging" and means "when you win the game and continually say to others you won the game"?
I like doing writing/math drills shrug
@Shafizadeh poor sportsmanship
yes that's it, thx
rwxrwxrwx => rwx, rwx, rwx => 421, 421, 421 => 777
rw_r_x_wx => rw_, r_x, _wx => 42_, 4_1, _21 => 653
20:10
^ addition
I don't remember those, I figure them out as needed...you just need to remember they are octal numbers.
I don't like doing that though, I don't like having to put the effort into figuring something out when I know it's something I can memorize
I'm weird
....damn kids, with their brains that don't chuck an old thing out when they learn a new thing.
sound's like you have never discovered use of bitmasks
and my supervisor wonders why I forget meetings ... unless I remind myself to check what meetings I have for the next day
20:12
bitmaks ... it's a common junior-developer affliction
and yes, I have a reminder on my outlook calendar to check what meetings I have for the next day, otherwise I will forget to check, and I'll be late/unprepared for meetings
you can set reminders in android's calendar
google calendar has been flaky for me
I dunno what it is, either I'm doing something wrong, or it didn't send me notifications for things I needed a notification for
I'm used to outlook's calendar, so I stick with that. Course, that will probably have to change when I get a new job, depending on their software platforms
20:34
does "flaky" mean "you don't care to your google calender anymore" ?
@Shafizadeh flaky = unreliable
intermittent functionality
ghost issues
That sort of thing.
@StatikStasis see, I find the bot asking basic English questions to be far more disruptive than Mr OCD.
=D
@Danack Well that is one of your places I believe english.stackexchange.com/users/31979/danack
@Danack By the way- he was doing the same crap in a bunch of other rooms- same exact questions. I alerted Madara. Madara had actually already caught him bleeding out in another room before I saw it and said something to him there too. Seems like a hobby given his history.
Or an illness as you suggest.
20:46
I blame the education system, which emphasizes the memorization over conceptual understanding
Someone in the C# room referred to it as Help Vampiring which I was unfamiliar with but apparently a common term.
@StatikStasis this is one of the oldest known publications regarding that problem: slash7.com/2006/12/22/vampires
wow... 2006.
the term probably comes from Usenet (that's early-90s)
@tereško This one I believe falls under #3 for "Reforming the Help Vampire" Weed out hopeless cases.
20:52
yes, it's one of those "irreversible contamination" situations
Got to head out for a bit. See you guys later.
o/
i'll just go back to reading a manga
Wes
Wes
21:27
Microsoft has reportedly acquired GitHub. Deal will likely be announced on Monday https://www.theverge.com/2018/6/3/17422752/microsoft-github-acquisition-rumors?utm_campaign=tomwarren&utm_content=chorus&utm_medium=social&utm_source=twitter
@Wes 😲
Wes
Wes
i've already read ms haters expressing their will to leave the platform if that happened
wonder if big companies that have private repos will remove them
like google, apple's private repos
@Wes Honestly, my hope is that they don't impose their "new login experience" bullshit on GitHub
That, out of everything, would definitely make me leave.
22:04
I almost guarantee you they will.
22:27
does this mean that srv is symlinked to /mnt/data/srv? srv -> /mnt/data/srv
22:55
yes
thanks
and to remove it, you would have to use unlink command instead of rm
because symlink essentially is just an alternative name for same structure on your drive
github.com/upend/IF_MS_BUYS_GITHUB_IMMA_OUT reports are saying they have already acquired it =o(
2 hours ago, by Wes
Microsoft has reportedly acquired GitHub. Deal will likely be announced on Monday https://www.theverge.com/2018/6/3/17422752/microsoft-github-acquisition-rumors?utm_campaign=tomwarren&utm_content=chorus&utm_medium=social&utm_source=twitter
Wes
Wes
23:21
@crypticツ could be worse. imagine if facebook bought it
23:34
I'm surprised Google didn't buy it since Google Code went under due to losing out to Github by being late too the game.
Plot Twist: all these companies are owned by some shadow company... O_o
Wes
Wes
lol
wonder what microsoft is going to do with it
@crypticツ I don't believe that's why google code disappeared. It's more to do with Google not being able to design a decent UI for the vast majority of their products.
also:
@MicrosoftUK I just got spammed by an unwanted marketing message on my login screen. How is this GDPR compliant and where can I opt out?
Really looking forward to getting more reward points for my open source contributions!!1!.
Wes
Wes
where did you get that?
on my fucking desktop login screen.
Wes
Wes
oh lol
23:42
I should follow that up. I'm pretty sure it's a violation of the GDPR, as well as a dick move in general.
Wes
Wes
in unrelated news, the new gmail has broken history. if i click a message then i hit back it doesn't go to the list of messages, it goes to the site i opened before gmail
wanted to buy a font... i expected something like 20$
it's 189.99 lol
@Danack I get that on windows 10 since I got it
kinda sorta shruged it off and am trying not to see it anymore
00:00 - 15:0015:00 - 00:00

« first day (2787 days earlier)      last day (2385 days later) »