« first day (2774 days earlier)      last day (2178 days later) » 
01:00 - 20:0020:00 - 00:00

1:43 AM
Hi any suggestion to use serial port communication using php?
 
 
3 hours later…
4:20 AM
Good morning room.
 
@brits how long does it take to cross the severn bridge? I guess traffic would make a difference
 
5:10 AM
moin
 
5:27 AM
@tereško wtf is kefir
it's like sour yogurt
bottle said it's eastern European
damn American food is loaded with sugar, I'm unaccustomed
 
6:30 AM
@Tiffany it is a soured milk, which a specific bacteria added
the consistency is like one of those "drinkable yogurts"
but the taste is closer to sour cream
... and it's good for you gut microbiom :P
 
yeah, that's why I bought it, cause one of my medications gives me...issues...
after I get past the first drink, it's easier to drink, but it's unsweetened so it's...odd
 
people drink it with various main-course meals, have it a main indigent in cold soups or add to salads with a bit of sour cream (instead of using oil ... I can't understand way people make salads with oil)
 
I usually use raspberry vinaigrette
@tereško lol, one of the words is "cats" as an ingredient
locini?
 
lol ... that's some hipster-ish thing
usually here it is in lot simpler packaging and larger: pievedums.lv/image/cache/catalog/part3/120A8423-900x650.JPG
basically it's sold in same sizes as milk (and at about the same price too)
 
yeah, bought it in the "health food" section of the grocery store... which usually has hipster-ish stuff
anyway, I need to get to bed
nearly 2am
 
6:42 AM
nn
I just woke up an came out of the shower
 
going to grab a shower before I go to bed
 
function &() {
	return func();
}
jarring to read ... so I thought I'd make you all suffer ... since I'm suffering ...
 
Wes
watisthat
morning
 
mornin all
 
Morning
 
6:56 AM
@Wes writing strange code for test coverage ...
94%, I'll hit nearly 100 by the end of the day ... probably ... although it is monday ...
 
@JoeWatkins why
 
I'm going to finish my damn PR ... I work better at 2am anyway
 
poor kid
 
7:06 AM
mornin
 
Wes
i did not understand the question. but that is totally me trying to use english
\o
 
anyone know of a better tutorial for handling forms than from the php manual?
 
7:23 AM
In PHP there is a function called ftok an it's used in sysvsem and sysvshm mostly, this function returns just an integer and my question is why it is used in those extension tests if ftok doesn't belong to any of them and can be easily replaced by assigning an int instead of this function call?
 
that's just how you use sysv
 
It is even for eg. commented out by Anatol in some tests github.com/php/php-src/blame/master/ext/sysvshm/tests/…
@JoeWatkins Yes, but can I remove it from the tests and simply replace by int with no worries on review lata?
 
you should have a good reason to change the test ... I would have questioned that change from anatol had I seen it ...
it may be legitimate, to make the test predictable and behave the same on all platforms (the test is going to have a different realpath on installation) ...
 
morns
 
but I can't see why that particular test was changed ...
 
7:32 AM
 
7:42 AM
Hi lows
One question
Why this Query runs Well
select stocks.name, stocks.saleprice,  stocks.image, stocks.color, types.name as types_name, units.name as units_name, categories.name as categories_name, stocks.id  from ((((`stocks` `stocks`  inner join `types` `types`       on (`types`.`id` = `stocks`.`typeid`))  inner join .......... like '500'))
The query is longer that ............ means for the end


that query runs well
But When i add DISTINCT for the Query like the following
select DISTICT(stocks.name, stocks.saleprice,  stocks.image, stocks.color, types.name as types_name, units.name as units_name, categories.name as categories_name, stocks.id)  from ((((`stocks` `stocks`  inner join `types` `types`       on (`types`.`id` = `stocks`.`typeid`))  inner join .......... like '500'))
It say SQL syntax error
 
8:00 AM
adultescent a young adult or middle-aged person who has interests, traits, etc., that are usually associated with teenagers.
 
@HamreenAhmad DISTINCT is not a function, you can't use it with parenthesis
 
Thanks i didn't knew for multi column its Only the DISTINCT not parenthis
 
8:16 AM
@Tiffany as a side note - those are not supposed to come with some shady "dessert tastes"
:p
 
8:50 AM
@JoeWatkins If I would want to continue my work on removing resources from ext sysv* and would like to clean up some bug reports would then need some special account, yes?
 
9:06 AM
G'morning!
 
Is there a way I can get the average of every n values in an array?
e.g. in an array of 20 key/value pairs, get the avg of every 5 values
 
moin
 
moin?
 
\o
 
is it friday yet?
 
9:20 AM
> My body is like a temple .. More like Catholic Church. Full of wine, bread & guilt.
 
@DaveRandom yes
 
awesome, see y'all next week
 
@brzuchal possibly, but pull requests are necessary whatever ...
waves
 
@R1ddler how do you think you might do that?
 
@R1ddler you mean smth like this? 3v4l.org/qi7a9
 
9:25 AM
ugh I wish people would just use loops
 
@JoeWatkins yes, but some of the bugs related to shared memory and semafores are for eg. outdated etc.
 
that is so much less readable than foreach (...) if ($i % $n === 0)
plus all that stuff very quickly gets O(scary)
 
@brzuchal yup I think that's what I need
 
@DaveRandom this foreach would take more that 3 lines I suppose
 
readability > brevity any day
3
 
9:30 AM
foreach is convoluted for what that does
 
yes but that either needs a comment or when you come back to it next year it will take you a minute to work out what it does
 
eh, I don't think it's too hard to discern when you have array_sum and count inside, it gives you a clue that you are taking an average then also you have array_chunk
 
How bad is the singleton injected from a dependency injector like Guice: github.com/google/guice/wiki/Scopes. There's no static keyword, the injector is just returning the same instance.
 
that's java
 
I have a use case where I need to have a class Presentation to be injected to my other classes as a dependency, and before using a singleton, I had to pass it around using setters and then do stuff with it and then I needed to pass that presentation again somewhere else which required it.
 
9:41 AM
why are you asking us about java?
 
@tereško Yes, but I was talking about Singletons in general.
 
@2dsharp then it is not a Singleton
 
Also, I was watching youtube.com/watch?v=-FRm3VPhseI, which you once recommended. And the question popped up.
 
@R1ddler I am reasonably you will come to change that opinion. Maybe not because of this particular thing, but eventually you will do come back to something where you used a collection wordy-but-not-descriptive functions and it will take you an hour to work out what it does
in some ways this is a PHP problem
e.g. linq makes it much easier to write readable constructs like this
 
@2dsharp I wonder, how did the watching of that video prompt you to use a singleton instead of dependency injection
 
9:44 AM
@tereško uhh, so @Singleton means something else in this context?
 
yes
 
but PHP has no efficiency optimisations, and a bunch of badly named functions, and no short closure syntax
which means you code is full of words which do not describe what the code is actually doing
 
@tereško Oh, no. It didn't prompt me to use a singleton, I started questioning my approach with this implementation of Singleton after I watched the video.
 
@tereško Did you hear the info about the potentially upcoming GTX 1180 / 2080? Also, Loque Ghost is shipping! I'm ordering ;) You can help me build thx
 
there's a reason that mathematicians like symbols instead of words, it's because when you learn what the symbols mean it makes things a lot easier to read (and so understand) because there's less parsing work for your brain to do
 
9:49 AM
@tereško they also mention avoiding static states: github.com/google/guice/wiki/AvoidStaticState
 
@Jimbo I heard something about the new cards coming, the estimate was "maybe this summer" ... as for Loque, that thing sucks at dust-proofing, which would be my major complaint. I would have gone with NCase
@2dsharp of course. Static code is by it's nature global and by it's application - procedural
 
@tereško So, I would assume it's safe to use?
 
@tereško Nothing compared to the size of this, I can handle dust stuff as I'm planning on dual AIO
My main challenge is to figure out the best Mobo for this, I have no idea what to care about
Dual / Quad channel for 32GB RAM would be good
 
Wes
\o
 
o/
 
10:00 AM
\o
 
o/
 
@tereško Just found out that the injector avoids the problems of static singletons. Thanks!
 
There are maybe two people in this room who are both old enough and English enough to get this 3v4l.org/c1cRD
 
@Jimbo yes its the smallest one out there, but at those sizes you start sacrificing features
and AIO does not protect gains dust
it just makes the cleaning process more annoying
 
10:15 AM
> The GHOST S1 was designed from the inside out, challenging the concept of a box.
actually fuck off
take yourself outside, and put yourself in the fucking bin
 
Order of extending interfaces should not matter – #76361
 
Wes
@kelunik @LeviMorrison ^
the bug is legit... though not sure why on earth someone would do that...
 
> I found this bug when I was testing solutions for PSR18 and HTTPlug.
 
<?php
use Inspector\InspectorFunction;

use Inspector\InspectorFrame as Frame;
use Inspector\InspectorInstruction as Instruction;
use Inspector\InspectorBreakPoint as BreakPoint;

$function = function() {
	echo "Hello ";
	echo "Dark ";
	echo "World";
	echo "\n";
};

$inspector = new InspectorFunction($function);

$first = $inspector->findFirstInstruction(Instruction::ZEND_ECHO);

$second = $inspector->findFirstInstruction(Instruction::ZEND_ECHO, $first->getOffset() + 1);

$darkness = new class($second) extends Inspector\InspectorBreakPoint {
I should get points for the most complicated hello world ever ...
 
They are trying to make code that works across different implementations of stuff.
 
Wes
10:28 AM
i don't get psr
if they want people to use the same code, why don't they make it, rather than allowing them to roll their own
 
@tereško Can you get a dual AIO for GFX + CPU that'll work in that tophat?
I'm feeling greedy :-)
 
not really: you need to make a custom loop
and the video will need a custom waterblock anyway
 
Hmm, then you need a reservoir and pump, don't think they'll fit in there :(
 
and if you are not doing water-cooling for video, you will need a leaf-blower style card
if you want to make a custom water loop, I would just go with fractal-design.com/home/product/cases/define-series/…
:P
 
Wes
i use phpstorm breakpoint as bookmarks. on that note... does anybody know how to use "favorites" in phpstorm?
 
10:36 AM
do you mean ctrl + shift + <number>?
or that other thing that I do accidentally sometimes and then have to google to figure out how to get rid of them?
 
Wes
didn't know that
would be nice to have lines clickable like the breakpoints
 
11:09 AM
If someone wants internet points:
0
Q: How to validate array of objects using JustinRainbow/JsonSchema

DanackI have code that correctly validates an article returned from an endpoint that returns single articles. I'm pretty sure it's working correctly as it gives a validation error when I deliberately don't include a required field in the article. I also have this code that tries to validate an array o...

 
11:21 AM
What would be a good storage format for storing questions in a quiz program? I am considering CSV, any other suggestions?
 
  "properties": {
    "data": {
      "type": "array",
      "items": { "oneOf": [
        { "$ref": "file://....json" },
        { "$ref": "file://....json" }
      ]
      }
    }
@Danack
That's how one of ours is done anyway
 
@Leigh yeah.....I don't think the issue is the definition of the response. I think the issue is probably with the validation. It could even be a bug in the JsonSchema library
 
I didn't really read the question or the code, I just went by the title
 
11:41 AM
@Danack bad idea, the 500-point rewards do not attract more users
it's actually the opposite - it scares some of them away
you are likely to end up with only that one answer, which will get an auto-awarded bounty :(
 
oh noes, I may have wasted some of my fake internet points.
 
:)
 
it's not that you wasted them
it's just counter-productive
 
12:02 PM
@Danack that lib is... horrible
it is full of references
and very long methods
and huge nested if-elseif trees
in any case the issue seems to be that it simply does not resolve $ref correctly in arrays
at least, based on a bit of var_dump() debugging
it reaches the item validation loop but it appears to expect that the $ref will have been expanded in the schema data structure by that point, but it hasn't
 
Grand Monday morning to all!
It's going to be the best Monday ever! (trying to see if positivity will make this day any better...)
 
god damn it @Danack I'm going to have to write a json schema implementation now
4
 
Wes
12:49 PM
you are almost as insane as me :B
 
no I'm just allergic to badly written but popular libraries
 
@DaveRandom is it finished yet?
 
what is "finished"?
 
Fixes my problem for me.
yeah, so it looks like jsonschema is borked.
 
1:10 PM
evenin room.
 
\o
 
o/
 
\o
 
o/
 
1:53 PM
@tereško Or maybe I'll get someone who digs into the code, and provides the necessary patch to make it work correctly, which I can then open a PR request with.
 
@Danack that's what I was going for, but I don't think I have the necessary patience to unravel the spaghetti
 
Me neither, hence the maximum bounty.
 
honestly, I don't see how this shit is any better than soap
and I see several ways in which it is (astonishingly) worse
it's like someone looked at wsdl and thought "nice idea, but there's just too much existing tooling for this"
 
2:11 PM
@DaveRandom Maybe we're all waiting for you to finish your SOAP request/response generator?
 
Hi, clearly we haven't met. I'm Chris, I write things so that they are 90% complete and almost useful then get bored of them.
 
!!blame @DaveRandom
 
  [Composer\Json\JsonValidationException]
  "./composer.json" does not match the expected JSON schema:
   - authors[0].email : Invalid email
> omfg.stop.scraping.email.addresses.from.foss.projects.you.dickhead@daverandom.co‌​m
actually fuck json schema
 
I'm sure it feels the same about you
 
2:29 PM
@Danack I just tried doing that but it is such a mess, that you'll be better off making your own. Trust me.
 
@DaveRandom Also looking at OpenAPI
 
@Wes This is a well-known and established "bug".
It's just a special variant of it that only exists since we added return types.
 
3:28 PM
@NikiC do we know when PHP 7.2.6 will be released?
 
tag tomorrow
release thursday
 
@mega6382 ......the comment you're replying to represents a sequence of events that have already occurred.
 
@JoeWatkins thanks!
 
o/
 
Wes
3:43 PM
@LeviMorrison i thought that was covered by kelunik's rfc
 
@Wes Link?
 
Wes
wiki.php.net/rfc/parameter-no-type-variance but i realize now it's just about parameters
wonder what happens with that
same problem 3v4l.org/RS7ML
 
3:57 PM
What signature would you expect PsrBridge2::sendRequest or PsrBridge1::sendRequest to have?
 
Wes
public function sendRequest($request);
 
Wes
as it is the one that allows all the types specified in the parent types?
 
Then you have specific problem and a way to solve it. Go!
 
Wes
? :|
 
3:59 PM
I just used certbot to renew my ssl, but when checking the expiry date from ssllabs it still says in 2 days (not cached). Should it be showing me the new one straight away?
 
@Fabor and you did restart your webserver?
 
Wes
not sure what the problem you are talking of is
 
@bwoebi Negative
I will now
Thanks @bwoebi. I'll remember it for the future.
 
4:27 PM
o/
 
\o
 
Wes
5:07 PM
so creepy when people likes stuff you posted years ago
 
5:19 PM
Why? It's not FB.
 
Hi guys, need a little help here: dpaste.com/3HZKZZX
wondering if I can have a variable that has a variable inside it
 
@Damon Whatever you're doing, you're doing it wrong.
Really wrong.
 
you mean the dpaste format?
 
Wes
@Allenph on fb...
 
No, I mean reading SQL queries out of a file and then running SQL queries that are susceptible to SQL injection.
@Wes Oh. Yeah. That's weird. #Unfriend
 
5:27 PM
ok, i can hard code queries .. can I use same method to get username and password from txt?
 
No.
Do not do that.
Why are you storing stuff in text files?
 
so I dont have to hard code it in .php
 
You're certainly doing something wrong.
What are you trying to do?
Also, passwords should not be stored in plaintext EVER.
 
it is on a server and access to cred txt file is restricted
 
Doesn't matter.
Store it in a DB and hash it.
Besides, what are you even using the plaintext password for?
If you're planning on emailing it to people, go walk over to the post. It's time for your lashings.
 
5:29 PM
email what
 
The password.
 
no I am the only one who knows the password and not planning on sharing it
btw .. it is a read-only account for queries
if that makes it ok :)
 
It doesn't.
I'm confused on what you're doing. Explain what you're doing.
 
bob
Hey if anyone has time: pastebin.com/tESDvwBu getting no errors
 
It is sending a sql query to get some data regarding a server and display it on a web tool
 
5:33 PM
@Damon You just described every fucking website on the internet.
 
user enters site and server name, and it display data
 
What are you doing?
 
same thing
database does not have any sensitive data .. just ip and stuff that we have access to
 
IP can be sensitive data.
 
5:59 PM
@bob Did you hit it with Postman first?
Also, why return HTML? Usually you want to communicate in data, not rendered views.
 
bob
@Allenph code updated: pastebin.com/jS2ejT2c returning JSON here
@Allenph But didn't not working haha
 
Completely forget about the JS, which I'm not going to even look at.
When you go to that page in your browser or hit it with an HTTP client like PostMan what happens?
 
bob
@Allenph it runs the script, in the network panel, but returns nothing from the php
 
Sounds like you're talking about the JS, not the PHP.
 
bob
@Allenph No, i'm talking about the php. well i'm talking about the AJAX call and what the php script returns
 
6:10 PM
...
Forget the JS.
So you can isolate the problem.
 
bob
@Allenph yeah, I think it's with php in the mysql statement. it's a mess lol
 
6:25 PM
...then test the SQL statement!
@bob Don't use something you're not sure works to debug something that isn't working.
 
bob
@Allenph Obviously.
 
Then why are you using the AJAX call to debug your PHP?
 
bob
@Allenph I understand. but, that literally makes no sense.
 
That's what you're doing.
 
bob
@Allenph No, i'm a happy camper mate. I was just asking if someone had time to have a look.
 
6:34 PM
e'nin
 
@bob Sigh
 
@Allenph How old are you?
 
21.
 
Your profile picture looks really young. You probably have age defying genes or something... which will be great as you get older.
 
That's not what I look like anymore. I'm much fatter and have long hair. I just am not a picture taker.
 
6:41 PM
I got ya.
 
That was like 2 or 3 years ago.
 
@bwoebi I'm writing this inspector library and I realise something ...
case InspectorInstruction::ZEND_NEW:
				$class =
					$opline->getOperand(InspectorOperand::OP1)->getValue($frame);

				if (is_string($class)) {
					$class = new \Inspector\InspectorClass($class);
				}

				if (!$class->getConstructor()) { /* no constructor */
					if ($opline->getExtendedValue() == 0 && /* no args */
					    $next->getOpcode() == InspectorInstruction::ZEND_DO_FCALL) { /* to constructor */
						$next = $next->getNext(); /* so skip it */
					}
				}
			break;

			case InspectorInstruction::ZEND_JMPZNZ:
 
Wes
@LeviMorrison didn't mean i urged that fixed. just linked to you as you are going to work on that
 
there's only a few people that can actually write the core of the debugger, I'm going to have to do it myself ... features, bells and whistles can be done by anyone, but the core knowledge has to come from somewhere ...
 
Wes
i still have the feeling that my poor english pisses off people......
 
6:43 PM
You have better English than a lot of people whose first language is English.
I have a feeling those people are just dicks.
 
Wes
lol levi is nice
more probably i said something not nice :B
 
Apparently anesthetic doesn't prevent you from having an itch, but DOES prevent you from itching it. #WTF
 
is an itch that you don't need to itch an itch ?
 
No, it still itches.
You just can't feel the scratch so it's impossible to relieve.
 
you're not making any sense
 
6:57 PM
You can feel the sensation of needing to scratch and itch, but scratching it does nothing.
This is not worth explaining. I'm getting trolled, huh?
 
7:14 PM
So I got a copy of this over the weekend ($11.00) used-very good condition. amazon.com/Object-Oriented-Software-Construction-Book-CD-ROM/dp/…
 
Add support for *.jsm – #76363
 
In my pursuit to improve designing from an OOP approach- I want to ask you guys what steps do you take initially when approaching a new project?
 
@StatikStasis Was it you I was talking to on Friday?
Did you go through Tereskos stuff?
 
I've seen his second highest post.
or answer
 
I sneak up from behind and say 'boo'.
 
7:22 PM
I'm just asking you guys specifically for anything that may not be in most of the generic responses.
 
@StatikStasis I'm planning to write blog post on that.....but it involves github.com/danack/SlimAurynInvoker
 
No- you were not talking to me about it on Friday.
@Danack What is your blog address?
 
I ought to write more and make it my default domain....
 
@Danack You're using Slim?
 
I will bookmark it and keep my eye on your post.
TY
 
7:32 PM
@Danack Just read this. What happens when you need more complexity? Do you make a class that turns an HTTP request into an implementation of your interface for each part of the request? IE headers, body, etc.
I usually just seperate my controller by name.

ProductHttpController
ProductCLIController
 
7:53 PM
posted on May 21, 2018

New Cyanide and Happiness Comic

 
01:00 - 20:0020:00 - 00:00

« first day (2774 days earlier)      last day (2178 days later) »