« first day (2024 days earlier)      last day (2918 days later) » 

Wes
12:00 AM
why php cares about this 3v4l.org/E051B? bob? paul? i totally get why is allowed on trailing parameters only in function declaration, but why does it matter on unpacking? if there's a reason i can't see it :\
ie as long types, count of arguments match, why care where it's used?
makes no sense to me..
 
dunno, but here ya go 3v4l.org/r0dVu
 
Wes
indeed, the fact that that is allowed makes the restriction pointless
 
you might ask nikic (the rfc author)
 
Wes
@NikiC ^
 
Ekn
adding ...9 gives a warning only
 
12:20 AM
@PaulCrovella Not that ruined yet sorry :-P
 
Wes
lol
 
@Wes the reason is how argument sending currently works in VM (based on fixed offsets etc.)
that's why after a dynamic amount of args, you can't currently send individual args
we may have some specialized unoptimized opcode for that though…
The why actually is: it was simpler that way
 
Wes
i think i got the reason, surprisingly
or maybe not... :B
 
Ekn
damnit... I just spent 10 minutes explaining something to someone
and the response is "Yes, but I don't believe in time."
 
puff puff pass
 
12:35 AM
@Ekn Try explaining it again, using only sense of touch, through the medium of a clenched fist.
This is such a bad example of the pipe operator....
twenty lines between the return statement and the actual return.....
 
2-space indentation doesn't help either
 
....I'm actually starting to like that. And snake case.
 
it turns to mush for me
snake case is fine though
 
@bwoebi Sure, it's not completely consistent no matter what - this is PHP.
But it's more of an exception compared to the others than to plain variables.
 
Wes
1:37 AM
gah. i'm working wit some code that is a complete mess... it works perfectly, but it's a readability and efficiency disaster... need to find the strength to refactor it -__- changing functioning code feels so wrong...
 
1:53 AM
ohai room
 
Wes
yo, just came home from bar? :B
 
Yes sir wes
 
Ekn
o/
 
\o
It was too late to get anything to eat so now I have to use chips... :(
 
Ekn
saaame... biscuits instead
 
1:58 AM
Ouch that's even worse
 
Ekn
and too much coffee... I actually crave for a beer now
maybe tomorrow
 
I still have whiskey \o/
 
Ekn
you lucky...
ehm.. how nice, enjoy it :p
 
Wes
i'm hungry and thirsty now
haven't touched beer today. i know it's hard to believe :B
 
@Wes Lies!
 
2:01 AM
how do you drink without touching it?
 
Wes
:B
i'm trying to keep my body in a possibly-non-alterated-state because in 1 hour i'll go jogging
me, jogging. crazy, right? :B
 
@Wes I should do that too
 
I jogged to the fridge.. okay I walked.. okay I haven't got up yet
 
Wes
@Ekn the dude is a pro
 
Ekn
2:04 AM
heh indeed :D
 
Wes
@PaulCrovella lol
 
Not because I'm fat like you @Wes buy because I need exercise besides "weights"
weight being relative here
 
Wes
i'm not fat :B i have big bones :B
yeah same here, it's an actual physical need more than appearance
 
I went snowboarding last winter and I was so fucking tires the first time I came of the hill it wasn't funny
 
Wes
i sometimes have cramps while sleeping...
 
2:07 AM
 
Wes
lol
 
Ekn
I professionally did gymnastics (along with classical ballet) for 10 years (ballet 13yrs) :p
 
I was actually looking for that totally inappropriate image of a guy being splatted in between a tir and a car but this weill have to do
 
Ekn
I will never be the fat old nanny...
 
I used to be totally into sport, but then I got old
 
Wes
2:09 AM
I professionally did chair sitting for 15 years... if there was olympics of it, i'd be a gold medal...
 
:P
 
Ekn
heh
 
brb going to drive till I find something to eat
 
Ekn
be safe :p
 
Wes
i used to be sporty too, did swimming, scuba diving, football, karting... then my parents bought me the internet
 
Ekn
2:12 AM
:)
 
!!rfcs
 
Wes
did jeeves pinned (unpinned the previous) that automatically?
"the 100" is a nice series. looked like a teen series but it's more than that
watched up to the 6th episode now and it's okay so far... pretty nice
 
Ekn
2:30 AM
it was on my list to check... never had the chance yet
I still didn't watch the last episode of game of thrones, vikings too
 
@Wes Nope that was all me :(
@Wes categroy: okish
 
Wes
can't tell yet after just one season
 
It's watchable. It's just 50% teen series 50% lost
 
which of that is watchable
 
50% of both
:P
 
Wes
2:33 AM
@PeeHaa to me is battlestar galactica + terra nova + lost + hunger games
 
Yeah sounds like a decent review
 
Wes
+ divergent
+ maze runner
 
Especially the latter. and hunger Lets just dump "kids" somewhere and "deal with it"
 
Wes
kind of works tho. i usually quit series earlier than the sixth episode :B
time to go. if i don't come back it's because i'm dead on a sidewalk
 
Ekn
:p
 
2:53 AM
@Wes nite
 
Ekn
3:27 AM
It's 1am almost. Want some energy to get out of the sick in bed mood and walk around with Ace :(
 
Wes
i'm still alive in case you were wondering
shower now :|
did about 5km i think
 
Ekn
Cool, I guess it's my turn now
 
Wes
is it safe to walk at 1am there? :B
well, no one would try to do bad things with an husky dog by your side...
 
Ekn
3:45 AM
it is pretty safe till the highway start which is.. quite far
there are two more houses near only
 
Wes
4:22 AM
something must have happened if they needed that sign
 
5:18 AM
'nin
 
Wes
hey joe
 
C G D A E
 
Wes
:P
every morning i listen to that, when joe enters the room :P
 
:)
what do you think of Java 7 Socket interface compared to PHP one ?
 
Wes
isn't php one procedural?
 
Ekn
5:31 AM
mornings
 
it is, in particular though, Socket.setReuseAddr(1) or Socket::setOption(SOCKET::SOL_SOCKET, SOCKET::SO_REUSEADDR, 1) ?
actually that's a stupid question, it's pretty obvious which is better :)
 
Wes
looking for api inspiration? in my experience, c# is similar but better than java. i have the feeling they actually copied java, as most of the api language is identical, but they got rid of bad things in the process (hopefully)
so i'd look at that before java
 
I think it's same
other than I/O
yuk, not it isn't, they use props ...
definitely not doing that ... so messy ...
 
Wes
what is your current api? can i read the php (stubs) somewhere?
 
oh and SetSocketOption
 
Wes
5:38 AM
ok i'll look at that in 5 minutes
 
it's only really a copy of socket ext api but oo instead ... but I don't really like it ... (so I stopped)
the plan is to provide Socket, and on top of that Stream, and on top of that user wrappers like php has ... but that's eventual, I need to just start with a decent socket, the rest may be written in userland ... pthreads/io package or something ...
 
Wes
would be great to have enum & enumset for this
$foo->getOptions()->union($options)
you could have an api like that maybe
i don't know much about sockets tho. it is traversable because? read packets/lines/something?
 
no actually, that's just because Threaded is traversable and it's threaded ...
actually sockets can't have properties at the moment ...
 
Wes
5:55 AM
are all these options settable on a connected socket?
 
well, it depends on the socket, but they're all valid in some context yeah
 
Wes
if not, you could start modeling a class with these options (a DTO) that must be a Socket's constructor dependency
function __construct(SocketOptions $options)
 
hmm
normal use is only to set a couple of options though, I like that, but it might be wasteful to create additional objects for options ... remembering that accept() must construct a Socket ...
 
Moin
 
'nin
 
Wes
6:02 AM
btw how are sockets related to threads? wouldn't be better if it was an extension extension? :B
 
they're not really related, but php streams are exceedingly difficult to make work, and not actually safe
I don't really want to export a bunch of pthreads ... or any of it, actually ...
 
Wes
anyway, depending on the use that could be good enough, even if it's "procedural with an oop api". but i don't know about sockets enough to express an useful opinion. there are several things you could do, like having smaller interfaces (like one for reading only, one for writing and aggregate the thing with a class doing both operations)
 
yeah I have thought about that ... I quite like inputstream/outputstream in java ...
 
Wes
public function getSockName(bool $port): array;
rather than returning an array you could return a struct-ish class
 
yeah addressing is messy ... Java has SocketAddress and InetAddress ...
 
Wes
6:10 AM
what does bind do? forgive my ignorance :B
 
I don't want it to feel foreign to php users though ...
binds to an address/interface
create then bind, then listen, then accept ... that's server
create, connect ... that's client ...
 
Wes
@JoeWatkins i think php users would like higher level apis :P
 
that's what Stream will be for
new stream("host", 80)
and so on ...
some users need the access to actual sockets ...
 
Wes
so you can fully use sockets through stream api?
 
well not fully, but will be able to get the underlying socket if you want mostly an easy interface, but also want to do something fancy (set some non-standard socket option or whatever)
 
Wes
6:16 AM
these things are a huge gap in my knowledge... i have no clue how these things work, really. i just have a rough idea of what they are
 
\o
 
sockets are generally accepted to have pretty low level apis, exposing send/recv/recvfrom/sendto, where a Stream might have a readLine(), a format/printf and that kind of thing ...
 
Wes
yo
 
Ekn
o/
 
Wes
@JoeWatkins but imho a javaish api would be welcome... people always wrap php core functions with their own api, it's the php way :B if you did that i'm sure it's gonna be better than anything casual developers would produce thinking they are doing a better job than you with their api design
 
6:24 AM
posted on May 01, 2016

New Cyanide and Happiness Comic

3
 
Wes
in php you can't use anything without wrapping it first. it's the only rule
 
Wes
:B
 
:D
 
Wes
@Feeds lol
 
6:27 AM
"life hacks"
 
Wes
i often drink coffee while sending fax to cleveland
... to save time
 
@Wes ofc
 
Wes
@JoeWatkins on the other hand, it's not too bad that high level api are written in php by wrapping extensions, as php code is easier to read, maintain, collaborate to, etc. compared to C code
 
don't use 7.1 yet, it changes every few hours ... not smart ...
 
http://stackoverflow.com/questions/36963804/web-design-technologies
@JoeWatkins I was thinking about that only....
 
6:37 AM
@Wes depends who is maintaining it ...
@Saitama maybe try to find a way to run both, or switch between them, if you're wanting to try new stuff or test forward compatibility ...
deploying it would be really silly at the moment
@Wes there's nothing worse than PDOWrapper ....
 
yeah, i was thinking about trying the void return type mainly....
 
Wes
@JoeWatkins everyone use that. i have my own, and it's shit, i would prefer php designed pdo better
 
> and it's shit
did you really do better ?
 
Wes
yeah because i can't write a proper wrapper with limited knowledge, which instead pdo maintainers have
 
if you find a thing that you need to use is covered in warts, it is smarter to avoid the warts, than it is to wrap the thing in a blanket of warts ...
 
Wes
6:43 AM
well, it's not that shit :B i've improved it a bit
 
I think the win is almost always shadowed by the loss ...
 
Wes
what is the loss?
 
the codebase I work on at the moment suffers very badly from thinking they are better than php-src at API design ... now we have 3m loc for which the php manual, the single greatest source of knowledge in the PHP ecosystem, does not apply ...
 
@JoeWatkins hehe
 
Wes
6:50 AM
@JoeWatkins don't get me wrong, i use "almost plain" php, but for instance, how can you possibly use htmlspecialchars today without wrapping it? as it takes 98 parameters each with a bitmask of minimum 72 constants that look like ENT_POSSIBLY_NO_QUOTES
it's impossible...
 
@Wes lel
btw, where are the hashing algorithms implemented in the php source?
 
Wes
sometimes it takes ages to understand what a function does in php, so when you solve it you simplify it by wrapping it
 
@Wes taking a thing that covers all use cases, and turning into something that must cover all uses in a different way, doesn't make much sense to me ... why not just use it simply where you have a simple use case, mutatis mutandis for complex use cases ... this creates more robust systems, where the documentation still applies, where new hires don't have to spend 6 months learning code before they are useful ...
we've had people leave after 3 months without writing a single line of code ...
the loss is immeasurable, and the win is almost inconceivable ... to me ...
 
Wes
> taking a thing that covers all use cases, and turning into something that must cover all uses in a different way, doesn't make much sense to me
i didn't say i do that
i just reduce the options most of the times so that works, say, on html5 utf-8 only
@JoeWatkins php-src has macro in it just to avoid writing a single additional parameter :B what do you think about that
i don't get to these levels though, i only wrap stuff when it's actually an advantage
 
having some object, or function (to a lesser extent), which must invoke internal functions in some specific way, this is normal, but if that object or function is invoking a wrapper around the function you actually need, something is wrong ... you took it too far ...
that can only lead to the kind of monstrosity I told you about ..
 
Wes
6:59 AM
i can't be too wrong, because it's what 99.9% of php users do
 
@Wes php-src is no kind of example ... but I wouldn't want large teams to work on that for some of the same reasons ...
 
Wes
every single php person i met used a framework or own wrappers to make nicer many of the php core functions
it's just a fact...
 
no large teams do work on it ...
@Wes there's a difference between just doing your job, writing your high level API's and actually setting out to try and correct what you see as mistakes in php-src, so that nothing is allowed to call normal functions any more ...
I'm only talking about the latter, not normal code that invokes internal stuff in some specific way, but the attitude that no piece of code can use any internal function, because it must use some wrapper, that somebody who left the company wrote 5 years ago and never documented ...
 
Wes
i'm not disallowing to call core functions though
 
I never said you were :)
it starts with PDOWrapper, and ends in the kind of codebase I described ...
it might be hard to imagine the kind of codebase I'm talking about, because you're thinking that "everyone" uses components and frameworks ...
now, we do use some components, even composer, we are getting there, but at first, at the core of the many applications we deployed was a "framework" that just does as I described, wraps every single thing, the codebase grew up in a world where dependencies were unheard of (it's at least 10 years old), the only dependency was this "framework" ...
 
Wes
7:09 AM
i can imagine it, i think. which is what i'd probably have if i had infinite free time :B
 
can you imagine starting a job, and working there for three months, and not being able to write any code ?
 
@AnmolRaghuvanshiVersion2.0 '
 
there are whole teams that work on a handful of classes ...
 
7:10 AM
@AnmolRaghuvanshiVersion2.0 moin
 
Wes
that's a problem with any proprietary software though, not being able to start writing code easily
 
this is the most extreme case I've seen ...
 
gist.github.com/gourabnagDev/… again makes the socket false :''''''(
 
just because nobody came in and said "stop that" before me ... they got into a rut where they really believed they were solving problems by taking every piece of internal functionality on which they depend and incorporating it into this "framework" ...
@Saitama imo, give up on internal resources, there will be a usable socket soon ...
 
alright...
 
7:15 AM
@Wes also, I'm a php person too :)
 
Wes
yeah but you are a C person too, if possible you'd write sites in assembly :B
 
@Wes wait,..... can we write sites in assembly, at all?
 
jquery isn't assembly of web??
 
4
Q: Low level networking in assembler (x86 compatible)

Neo_bI wish to write a bootable program in assembler that would be capable of sending and receiving network packets. I do not wish to use any libraries, I'd like to create it all by myself (and also learn while doing so). Unfortunately, I was unable to find any information regarding communication with...

REALLY?
 
Wes
7:20 AM
i don't know @JoeWatkins that is my opinion, and it's what is happening with js, with people wrapping wrappers of wrappers of wrappers. it works, for some reason :B
 
@Wes js is .....
 
Wes
groceries time, then sleep a bit
later gator
 
\o
 
well, if I'm using dependencies, where dependencies actually means that some small team of people or possibly one individual has put effort into documenting and maintaining - for free, most of the time - some component, then I don't actually care how it does that, so long as they meet my definition of dependency ...
there's obviously nothing wrong with that, there is something wrong with seeing an internal function you need, or even some component (on packagist say), and thinking you can do a better job, and so adding some usually very restricted version to some class in your mountain of one billion classes, and sticking a docblock next to it ...
 
7:24 AM
@Saitama yes...
 
6 mins ago, by Saitama
4
Q: Low level networking in assembler (x86 compatible)

Neo_bI wish to write a bootable program in assembler that would be capable of sending and receiving network packets. I do not wish to use any libraries, I'd like to create it all by myself (and also learn while doing so). Unfortunately, I was unable to find any information regarding communication with...

 
you can write websites in assembly, you can write anything in assembly ...
 
ASSEMBLY_MASTER_RACE
 
you can also call external functions (in shared libraries), so networking in a non problem ...
you can make it a problem by saying you want to do it all yourself ... in which case you are bat shit crazy, and there is no conversation to be had with people who are bat shit crazy ...
 
heh
 
7:28 AM
@Saitama you want to write everything yourself..?
 
I ... don't but the OP wanted..... :P
And then again...
 
and anyway, writing websites has nothing to do with networking really ...
 
> Never re-invent the wheel
@JoeWatkins true
 
He wants to write a bootable program? wow
There's also this: 2ton.com.au/rwasa
 
7:30 AM
@JoeWatkins bu...... but... why??
 
I think that was the one I was trying to find ...
 
I've used rwasa before. It's fast.
 
@Saitama to some people, this is beautiful ....
 
are you one of 'em?
 
I wish I was
 
7:32 AM
a little bit ... but I would not write websites in assembly, I wouldn't write them in C either ... I do write them, in php ...
or one time java, but we don't talk about that ...
 
@JoeWatkins wait.. I know some of those words...
@JoeWatkins :P
 
If I was given a choice between hla and java, I'd go with the former.
 
@Saitama of course you do ... it's not as magical as it seems ...
call sys_create_tcp_socket
cmp rax, 0
jl exit_error
you know what that does ...
 
i know the first two lines
but not the third one...
 
look at the file it came from ... github.com/nemasu/asmttpd/blob/master/main.asm#L568
you can also read that ...
 
7:38 AM
ah, got it
 
Ekn
this reminds me of my mentor from uk... about 2 years ago he would send me secret codes in 8086 assembler for weekends :p
 
:P
 
Ekn
at first it was completely alien product..
I spent 4days to get "th35c13nc3" x_x
 
that's ... super geeky ... I love it :)
 
Ekn
I would send my euler solutions and he would nitpick everything :p
but well... that's how I learned stuff
it was the weirdest but most awesome connection I had... we exchanged books :p his books either didn't make it till here or made it on 3rd postage from scunthorpe
 
Hi guys..
 
o/
 
I need some help regarding PHPExcel i have posted a question as well but didn't get any answer..
 
everyone is suddenly deciding we need to go out right away ... lata peepz ...
 
Ekn
o/
 
7:57 AM
Moin.
 
\o
@Oldskool '
 
8:13 AM
@Jimbo congrats on the new wheels
be careful =)
 
 
1 hour later…
9:14 AM
@LeviMorrison but constants() itself are all threated equally… no dynamic access except defined() &constant()
 
o/
 
the first link has sql injection vuln
and xss
 
heh
s/inkjection/injection
 
@Wes technical reasons. It was supported in the first iteration, but then dropped. I think nowadays we could support it again
 
10:19 AM
I think this might be a duplicate of this, but the user is so bad at explaining what they want I'm not sure
 
@PaulCrovella Looks like the same project/codebase, but just a slightly different question.
The first only seems to concern the id, where the second is about the link as a whole.
From what I can decypher anyway. It's a pretty vague question.
 
the "Lets start from the beginning" got me wondering.. quite honestly their last 4 questions might all be trying to solve the same problem, just along scrambled tangents
is "get your ritalin dose adjusted" an acceptable answer?
 
LOL, I don't think that'd work ;-)
 
couldn't hurt
 
10:34 AM
The thing I always start wondering when I see a user with 5 questions in 1 day is: Did you pick the right job? And I actually already know the answer...
At the very least they're in over their heads.
 
I presume most of those are students or hobbyists.
 
Students should have tutors, not spam SO.
 
and their answer is "no, my career plans at blockbuster aren't working out, but I don't see how that's relevant."
 
@PaulCrovella LOL
 
!!version
 
10:42 AM
 
 
1 hour later…
11:43 AM
Moenirgins
 
wotcha.
 
12:02 PM
> Regarding debugging, the pipe operator makes it EASIER, not harder...Just chuck a var_dump anywhere
because debugging === var_dump
 
> I am currently writing a message proposing a way to complement these 'piped calls' with a way to get rid of the '$$' placeholder. This will address the long-running sadness of argument order.
 
@Danack it totally is :P
 
I am not optimistic
 
@PaulCrovella I've said this before, that guy is going to one day persuade people to do massive damage to the PHP language.
 
@NikiC I don't even know how to use a proper debugger
I just use error_log...
I mean, for PHP code. For C code you sometimes need to use gdb, the GNU Debugging Backtrace obtaining tool
 
12:12 PM
@Andrea first dev I've seen to use error log instead of direct printing…
 
that's what gdb stands for, right?
 
@Andrea no, the b ist for the b in debugger
 
@bwoebi well yeah, there's no way to print to the browser that's pretty, that's a very messy way to do things, and it doesn't work when you're writing an API
 
@Andrea view-source ftw
 
@bwoebi what? it's a debugger? I thought it was just the GNU Dumper for Backtraces :p
 
12:13 PM
:-P
 
(this is about the extent of my usage of it)
 
@Andrea actually, crash reporter on OS X should give you the traces too
@Andrea TBH, I'm somewhat surprised by that…
 
@bwoebi crash reporter doesn't pop up for command-line apps
also, I do sometimes set breakpoints, rarely
@bwoebi I'm actually a terrible programmer. I work on php-src using printf debugging and heavy doses of grep
 
@Andrea hmm … maybe not when it's directly called … not sure right now … I have it at least pop up while make test'ing
 
@bwoebi huh
maybe it's possible to turn that on
 
12:26 PM
dunno, perhaps I turned it on sometime…
$ defaults read com.apple.CrashReporter
{
    DialogType = developer;
}
@Andrea ^ what do you get?
 
$ defaults read com.apple.CrashReporter
2016-05-01 13:28:27.865 defaults[748:21644]
Domain com.apple.CrashReporter does not exist
 
:P
 
defaults write com.apple.CrashReporter DialogType developer
should then possibly enable it?
 
probably. I don't know if I want to.
 
@Andrea you can always turn it off again when it annoys you
@Andrea printf() debugging is usually my last resort (like in cases where a function is called many times and I need to debug a specific call … also helpful to set a breakpoint then to that call)
 
12:50 PM
 
@Saitama I remember these!
 
you do?
:P
 
hmm?
 
well, was that windows 98? or even older?
 
XP in classic layout or 98, yeah
 
12:56 PM
hehe :P
and tbh I never really faced those things, cuz' I when I was able to start using computers... there was ... vista...
 
@Saitama vista…??? In time of Vista everyone still used XP!
 
nah, I didn't at all.... like XP...
vista imo was much better...
at that time I used to play those games.... which windows provided... like something like... cake store... hearts... etc...
 

« first day (2024 days earlier)      last day (2918 days later) »