« first day (2169 days earlier)      last day (2776 days later) » 

Anonymous
8:00 AM
done.
 
oh fuck you all
 
there you go
 
:-D
 
@PeeHaa s/gif/jpg
 
Wes
lol
 
8:01 AM
@PeeHaa dv something and you'll lose 1 and everything will be fine again
 
@DaveRandom ooooh nice!@
 
he has to downvote 15 times :D
 
Nope ;-)
 
:/
 
meh
 
8:04 AM
moin Joe
 
That's the best thing I am going to see today on so
morgen joe
 
anyone has experience with WSDL?
 
Seriously stop raining on my parade
 
moin Joe
 
servus
 
8:07 AM
/me waves
 
o/
 
\o
 
I still don't have my vps back ... vpsnodes have ignored two emails ...
which seems shitty ...
 
how can i logout from this chatroom
 
are you using a laptop or a pc ?
first acquire one of these
 
8:11 AM
@lewis4u just toss your pc outside the window
 
yeah...thank you you are all helpfull guys
 
then find out whether you are using a laptop, or a pc ... if using a laptop, just smash the thing on the desk, if using a pc, you need to identify the magical box with the processor in it, and assault that ...
 
Anonymous
@lewis4u log out of SO :)
 
just remember that all of you were newbs just like me!!!
 
just remember, it's okay to laugh at jokes ...
 
8:13 AM
^
 
it's not a joke if someone is trying to get help and you make fun of him
 
no no, I'm not making fun of you at all ...
 
then explain the hammer and logging out from SO
 
it was a joke, but not at your expense, at the expense of your question ...
 
you just asked how to log out
 
Anonymous
8:15 AM
@lewis4u They're just pulling your leg (gross) on SO click the stack exchange logo and then click the log out button
 
hi, I'm Joe, I don't really know how humans work, I can hold a technical conversation or make jokes, nothing in between ... sorry about that ...
 
look man i'm trying hard every day i'm learning and i love computers and programming...i got a job a few months ago and i am doing it all by myself....i'm on PC 10 hours a day...8 at work and 2 at home....not because someone is forcing me, but because i love what i do and i want to learn....it is hard these days for beginners....everyone says just google it.....yeah right....even if a beginner finds an answer he can't recognize it right away....experience is the thing what counts the most!
 
Experience is only part of it imo
 
i am 32 years old and if someone can help me with SOAP and WSDL request i would be very thankfull
 
you shouldn't take anything I say seriously ... unless you want too ...
 
8:20 AM
well i want to
 
Anonymous
So you don't want to log out anymore? Just giving us all mixed messages now
 
@lewis4u It's a joke, bruh
 
I wasn't trying to annoy you, just make a joke ... I didn't know you were new, and will have forgotten your name in a few hours ... I thought you would just laugh at the joke ...
 
...
 
it's ok....i have a good sense for humor....
 
8:21 AM
@lewis4u Pro tip: don't take everything so personal / as an attack. Life's better that way
 
but still no one answered to my question
 
Anonymous
@lewis4u we can tell :D
 
Especially when working with something as godawful as soap
 
Anonymous
6 mins ago, by JayIsTooCommon
@lewis4u They're just pulling your leg (gross) on SO click the stack exchange logo and then click the log out button
 
I'm incapable of attacking you whatever, I'm an Englishman ...
 
8:22 AM
ok
 
Anonymous
oh soap question :P
 
yes
 
Call the soap expert
 
I haven't answered because it's not the kind of question that makes my brain work, ask me a hard one ...
 
Anonymous
8:23 AM
@Sean
 
and it looks like it's simple but i never heard of SOAP or WSDL
 
@Sean ping
 
i need to verify VAT number on my website with that service
 
Yomnnin' @Fabor
 
o/
 
8:24 AM
@lewis4u I have no idea what "Interactive service" means means in this content, but if there are no limitations and does the exact same thing as the soap call. I would opt in for that one instead
 
@lewis4u a good skill to learn is how to ask questions online: rurounijones.github.io/blog/2009/03/17/…
 
@lewis4u It's very much not simple
Don't let the S in SOAP fool you
 
:)
 
If anything they should rename it to Stupid Object Access Protocol
 
a agree
why don't they make an API
 
8:25 AM
the interactive service isn't for machines
it's for secretaries and whatever
 
@JoeWatkins That has never stopped me from scraping things :P
:D
 
yeah but why would you, they do have an API, it's just covered in slimy shit ... I mean soap ...
 
That's how much I hate soap.
 
the problem is "I never heard of WSDL or SOAP" ... not the task at hand ...
 
well i know how to make a request on API but i don't know how to make a request on that website
 
8:27 AM
w = web
s = service
d = description
l = language
 
ok
i just need a simple example
 
this describes the endpoint for a machine, to tell the machine how to transmit a string, or number, or some more complex structure (like an array)
a SOAP client uses the WSDL to construct objects for you that allow you to interact with the API by forming requests in the expected way and allowing you to consume responses ...
so now you should understand what to do ...
 
BTW don't want to be an ass about it @lewis4u, but either your google is broken or you didn't really research
17
Q: VIES VAT number validation

Minuciosoanyone knows a way to incorporate a form on our website to validate the VIES? I find information to validate it through the website of the European Union. http://ec.europa.eu/taxation_customs/vies/vieshome.do And what interest me is validate directly from the form of payment data from my websi...

First result
So yea
 
@Joe I created this doc thing some days ago, you should review it... stackoverflow.com/documentation/php/1583/…
 
Soo.. An interesting one. We had an unit test for a class that would use unserialize and we had a typo on the string to be unserialized, missing the semicolon. Interestingly enough, the behaviour for that typo changed since 5.6.20, it won't unserialize anymore. The developer panicked and added checks for the result of unserialize everywhere
 
8:30 AM
ok the truth is....i didn't do my homework! i wanted a quick answer
 
!!eval echo unserialize('s:6:"room11"');
 
and thank you
 
you helped a lot
@JoeWatkins and @PeeHaa Thank you very much
 
It's the second time I see that happen @pmmaga
I think he changed his api
 
8:32 AM
I mean.. it's not wrong, but I don't expect that it would ever find a malformed serialized string in the normal running environment
 
Wait wat. Why does that fail? @pmmaga
 
!!wotd
 
plutocracy: the rule or power of wealth or of the wealthy.
 
jeeves is slow.. :P 3v4l.org/8g3cl
 
/me throws a sheep at @Jeeves
 
8:33 AM
@pmmaga Nope. Not just slow
Broken
 
@PeeHaa also stupid
 
1 min ago, by PeeHaa
I think he changed his api
 
not very botty to just fail
 
Sjon?
 
Might be a good time to look into implementing single version eval calls while I am at it
 
8:34 AM
7.1 FTW
 
but yeah, basically, since 5.6.21, the missing semicolon breaks the unserialization
 
oooooh
 
if I send a bot to do a job, and it can't be done, then the bot is useless if it doesn't return and tell me it can't be done, and I need to send a bigger bot, or an army of bots ... or an army of bots controlling an army of men, or an army of men controlling an army of bots which control an army of smaller bots ... all with guns ...
2
 
I was looking at it and didn't see what's wrong
 
Anonymous
@JoeWatkins you ok?
 
8:35 AM
@JoeWatkins well that escalated quickly....
 
@JoeWatkins I would love the idea of an army of men with guns controlling an army of bigger bots with guns
 
botception
 
I haven't thought about it that much ...
 
posted on September 23, 2016

New Cyanide and Happiness Comic

2
 
@pmmaga How about not using unserialize?
 
8:42 AM
does anyone know why serialization works the way it does ?
Java doesn't do this weird thing to objects to transmit them, it just transmits them, I feel unsure why we go through all this really complicated logic (which still has errors and did/may have sec issues) ...
why not just bitwise copies ...
 
Wes
@FlorianMargaine do you know of a jsdoc style guide?
mostly code is not commented, when it is, style doesn't seem to be consistent not even with jsdoc's site own examples. any idea?
 
Wes
lol
 
@JoeWatkins people trying to be clever......it would be interesting to see the commits that added it. It's possible that at the time just having it done internally by PHP was a significant enough performance gain to make it worthwhile.
 
@Danack I would love to. Unfortunately, it's quite a change given that at least ZF1 uses it for memcached
 
8:46 AM
o/ morning
>< Debugging-friday-testing-friday
 
@JoeWatkins I can't see how that would make it any less complex or more secure (what struct are you wanting to copy?)
 
> if you start with complex, you can never get simple, that Tony Ferrari guy ...
 
A bitwise copy of an object, to store and load again later... internally that object references a whole bunch of memory locations, and uses a whole bunch of other structs, to get a sane binary blob, you'll just end up with another serialisation format
 
@Oldskool o/
 
@JoeWatkins I've ordered some copies of this:
I'm not saying I'm going to force people to read it......but there will be encouragement.
 
8:51 AM
> internally that object references a whole bunch of memory locations
 
i.e. properties set to strings, or other objects
 
@joe
 
And from a quick read Java does do something similar, it's just that it uses a binary serialisation format, and does all the metadata first, and properties/values second
 
@JoeWatkins
 
hello everyone,
does any one who can help me to understanding about Abstract and Interface in PHP
 
8:53 AM
well you learn something new every day ...
 
sorry for english
 
I'm not sure why it matters about the location of anything
 
@JoeWatkins "Java doesn't do this weird thing to objects to transmit them, it just transmits them" - btw I don't know what you mean there. Java normally requires objects to define their own serialization/deserialization routines.
 
@JoeWatkins Are we talking about the same thing? The ability to store the state of an object, and then load that state again?
 
@Leigh thanks, but i need something better
 
8:55 AM
No you don't
 
@sajadAyooby Try to ask specific questions instead
 
@JoeWatkins i just have one more question not related to anything before.....is it possible to get a html select input from other website and show it in my own?
i mean the whole select options
 
@PeeHaa What is the purpose of abstract classes?
 
They have a very limited purpose
 
I'm just wrong about how java works actually ... I had only ever looked at the output, not the explanation for it's form ...
 
8:57 AM
190
Q: Interface or an Abstract Class: which one to use?

user220758Please explain when I should use an interface and when I should use abstract class? How I can change my abstract class in to an interface?

 
@pmmaga thanks.
 
Composition > Inheritance though
 
i read it before,
but i am just a little bitconfused right now.
 
I can't think of a good reason to use an abstract class when you're not already using an interface tbh
 
8:59 AM
i'm out
 
yeah bitwise would be pretty difficult for anything but the most simple case ... I'll shut up ...
@lewis4u it is better to ask questions of everyone, rather than one person, who might be involved in eating breakfast and two other conversations ...
 
You'd need to add a bunch of validation on the load too, sure that thing you're loading claims to be a string...
 
yeah, I didn't really think it through ...
it certainly wouldn't be more secure :D
 
Wes
til ?: is also called "pelvis operator" wtf
ah no, maybe it's "elvis operator" AHAH sorry, shame on me
i suck at understanding spoken english
 
9:07 AM
you are a lot less funny than you imagine
 
it's called the pelvis operator now ...
 
Wes
it wasn't supposed to be funny :(
@MadaraUchiha so es6 got all these "fancy" things but it doesn't have a object member access null safe operator
only coffeescript seems to have it
 
And typescript
 
@Wes What do you mean?
Example?
 
sorry to bother you guys I want to add some new feature to a website and I dont want the visitors see my changes untill I finish is it done with git and how ? thank you
 
Wes
9:14 AM
obj.?couldbenull.?couldalsobenull (or undefined)
 
You mean foo["bar"].foo; // where !("bar" in foo)?
Yeah, that's still a sore point for some reason.
You can implement such a thing in userland using Proxies but it's still pretty bad.
Java solved that with the Optional but I'm not sure (read, I'm pretty sure it's not) it's the right solution in JS's case.
 
Wes
Optional is stupid in any language, i think. except haskell Maybe?
 
Mornasfnasdfas
 
can someone help me
 
9:32 AM
@JoeWatkins but i like you the most!
@Joe Watkins but i like you the most!
 
@Wes I really want this in PHP :-(
 
Wes
me too
 
Can I have named params already please......
Writing tests for APIs without them is so tedious.
 
@Wes I have this which I use very sparingly but it does work:
function n($objOrNull)
{
    return $objOrNull ?? new class {
        public function __call($method, $args) { return null; }
        public function __get($name) { return null; }
    };
}
 
oh god
 
9:38 AM
inorite
It's useful for shitty SOAP services where the code is already horrid
 
:table_flip:
 
moin jimbo
 
'n
\0
 
9:54 AM
yomin jimbo
meh, not a fan of null safe access
"null safe" ... this seems like a problem to me ... not of the kind we should be seeking to "fix" with a magical operator ...
 
@JoeWatkins $this->objectThatCanBeNotifiedOfThingsImDoing?->notifyEvent()
e.g. in C# it's super-useful for event handlers
this.EventNameThatMayOrMayNotHaveThingsListeningToit?.Invoke()
 
What API would you prefer?. The number of properties can be a lot more than in the example. I think I know what I prefer but I am looking for a second opinion which I may or may not ignore.
 
good morning
 
\o
 
Anonymous
I think I like fluent
 
10:06 AM
@PeeHaa In terms of how I set the properties I don't care. I do have a problem with Tweet having a post() method though...
 
@PeeHaa You making a twitter api sdk?
 
In terms of how you set the properties, you can easily support all 3 of those at the same time
Then people can use it however they want
 
@DaveRandom ugggh goddamn you
@Jimbo Yea
 
@PeeHaa Also I don't think a Tweet should be given the client. At all. The client sends the tweet, so it should be $client->send(Tweet $tweet)
 
^ that
Be-ers and Do-ers, not both
i.e. VOs and BOs
 
10:09 AM
Never thought of it that way, good way of putting it
 
Yes
2 mins ago, by PeeHaa
@DaveRandom ugggh goddamn you
 
:-P
 
@DaveRandom this implies that the code that is responsible for adding the listener, is also responsible for creating the event object, doesn't it ?
 
ok will turn it around you are all right
But what about the properties api
I kinda want just one way
 
I would also be careful of how much logic will end up in your constructor (I assume you will want some validation, transformation based on those parameters)
 
10:11 AM
Yes, but most validation (as far as I can see now) will be caught be type hints
Which narrowed it down to me to the last two options when I wrote it down
 
ThW
@PeeHaa ctor version has no code completion.
 
@JoeWatkins No in C# an event is like a property with some kind of delegate type, it's part of the public API defined by the class. However because it's a public property, external things are responsible for setting it, and if no external thing is listening to that event then it is null.
 
ThW
So it complex without support from the ide
 
Essentially null propagation is useful for where you have untrusted external data
 
Good. We at least all agree with option b / c
 
10:12 AM
which is a valid thing to do
 
ThW
fluent version can be used in the non fluent way
 
> However because it's a public property, external things are responsible for setting it
 
Yes
 
@PeeHaa There's no reason you can't do all 3
 
forget the language, this sounds okay to you ?
 
10:13 AM
@DaveRandom sane docs
 
a kind of thing we should encourage ...
 
I want to say: this is how you use it
 
@PeeHaa true, I guess
 
I think not ... I know what it is and why and how it works, but tend to think there is something wrong with wanting it to work ...
 
@DaveRandom Also 1 is ugly
Because of:
 
10:14 AM
 
also that's a very narrow use, the idea of code that reads getThat()?->invokeThis() is horrid ...
 
@JoeWatkins I not currently agree however I am open to persuasion. I don't have time atm but I will write some code that uses it in what I see as the "right" way and then we can maybe talk about something concrete (right now I'm not sure exactly what you are getting at tbh)
 
1) passing scalars when it's not always needed 2) passing an array config 3) no ide support 4) having to delegate validation 5) general ugliness (subjective I kno)
 
Value object definitely is useful for grouping your Credentials together - good to pass to client constructor
 
@Jimbo I already do that
 
10:17 AM
@PeeHaa I'm mostly thinking it's useful to support things like that because it gives you easy and relatively sane (un)serialization. Which may or may not be useful. Sorry multiping.
 
@PeeHaa Just a thought, you could have a isAuthenticated() which basically tests if you can actually authenticate with the API
 
@DaveRandom Fuck serialization
 
Then I'd be doing: if (!$client->isAuthenticated()) { throw new \OffYouFuckException(); }
 
@DaveRandom lol @ last ping to apoligize for multiping :P
 
morning
 
10:19 AM
@Jimbo Why would you not be authenticated?
You either have an access token or you don't
 
Well in fairness, who would let him in?
 
@PeeHaa Invalid credentials, they might have been revoked
Or they just might be incorrect
 
@Jimbo That will throw
 
mornin
 
morekin
 
10:20 AM
\o
 
o/
 
There is no way to know whether the client is authenticated without doing the request so you would end up with an API thay may or may not be lying about its state
ok I think I will end up with something like the following interface @Jimbo @DaveRandom
 
interface @Jimbo
{
    function drink(AlcoholicBeverage $beverage);
}
 
@DaveRandom Last night was my leaving do. By the time I got off the train afterwards I was basically blind
 
lol
interface What
{
    public function getBody(): Body;

    public function getParameters(): Parameters;

    public function getEndpoint(): Url;
}
Those are basically the things I need for the client
Interface name?
Entity?
I hate calling things Entity btw
 
10:25 AM
For the twitter client?
 
Nope for the tweet command
 
I are confuse
 
@PeeHaa Could have something to pull out media specifically
 
The tweet command knows what url to post to, what parameters to pass and what body it has
 
public function getMedia(): Media;
 
10:26 AM
nope
The client needs those parameters
@Jimbo Not everything endpoint has media
 
Some might though
 
I'm like really super confused and I don't have the brain space to devote to being unconfused atm
I'll come back and look at it properly at lunch
 
@Jimbo Yes, but I need a common interface if I am going to pass it into the client
 
You can have a Tweet and MediaTweet extends Tweet
Or not. I think I'm going back up and over that ballmer peak
 
:P
 
10:29 AM
you also should have class Tweet extends Database
7
just in case
 
The "problem" is this @Jimbo
22 mins ago, by Jimbo
@PeeHaa Also I don't think a Tweet should be given the client. At all. The client sends the tweet, so it should be $client->send(Tweet $tweet)
 
mornin tereško
 
yo
 
Obviously I cannot hint for Tweet there. Because there are other commands too
E.g. lists/subscriptions
So I need an interface for that thing $client->send(Entity $entity) or something
Fuck it. Entity it is for now
 
wont you send the request to a specific path?
 
10:35 AM
Yes. And the "entity" knows that path
I.e. Tweet knows it needs to post to /statuses/update.json
 
it also seem to know whether it GET or POST or PUT or DELETE
 
Correct
 
odd, isn't it
 
Why?
It models an http api. I would expect it to know that stuff
 
as if your Tweet is just the body of the requests
 
10:37 AM
Somewhat yea
 
... but what do I know about all this computerization thing
 
You could say it's the request
Not just the body
 
but the tweet is not a request
 
*It represents a request
Or rather that's what it boils down to
 
I've tried utf8 and utf8mb4 's general_ci & unicode_ci. I've to save all language characters, suggest me best collation, one of these are lost: Swedish, Norwegian, Russian, Spanish, Chezh
 
10:39 AM
!!canon utf8
 
649
Q: UTF-8 all the way through

mercutioI'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL and...

 
First read that ^
 
I got a terrible cold.... >.<
 
Anonymous
@Saitama blame @tereško
 
@JayIsTooCommon that's not how internet works
 
10:51 AM
But I heard on the news about a virus
 
Anonymous
@tereško what's the point in anti-virus then?
 
basically, you want anything with Paracetamol
 
@tereško Those things always taste like ass
 
yeah... gonna visit a doctor probably in a while...
 
For... a cold?
 
10:53 AM
I've had it for like a week
so mom's worried...
 
A week? That's nothing. Pick up smoking
:P
 
I had a cold exactly 7 days ago - aside from minor case of running nose, I am completely fixed
 
Anonymous
@Saitama 3 weeks maybe but 1 week is chill
 
Anonymous
@PeeHaa You'll be a great parent one day :D
 
I'll just destroy kids of other people. No need for my own set of those
 
10:56 AM
@Saitama what meds have you been using?
 
paracetamols... :D
 
Hello Guys....
Shortest way to do this?

$array[0] = array('unit'=>5,'foo'=>'bar');
i want to assign value of unit to key of that array
 
@Saitama what dosage, how often>
 
there is multiple array is it possible without foreach?
 
@tereško 500mg, and probably like after 10/8 hours or so...
 
10:59 AM
hmm .. yeah, visit a doctor
 

« first day (2169 days earlier)      last day (2776 days later) »