« first day (2589 days earlier)      last day (2359 days later) » 

2:01 PM
@mega6382 Plain text password and vulnerable to timing attacks \o/
 
@PeeHaa Yeah, but I only wrote it as a concept. I have never used it in any live project.
 
@mega6382 but… it's advertised on phpclasses. people will use it.
 
@mega6382 So nobody is using it?
 
@PeeHaa @Gordon Well it does have over 170 downloads.
 
And you just made at least 170 innocent people vulnerable to all kinds of attacks
 
2:06 PM
@PeeHaa Yeah, but it only got those users because it was nominated for innovation award. So, it is not my fault, entirely.
 
It very much is
And saying above is plain negligence
 
^
 
@mega6382 you submitted the code, right?
 
if it's only meant to be a concept, specify that it's a concept, instead of misleading people
you don't say it's a concept in the description
 
@PeeHaa @Gordon Yeah, maybe I'll try to make it a bit secure. I'll try to work on it over the weekend.
 
Anonymous
2:08 PM
Don't blame him, he was rushing to get that innovation award.
 
Anonymous
first come first serve
 
@mega6382 At the very least clearly state it's not meant to be used with marquee and blink tags in bold capital letters
 
@PeeHaa You are right.
 
Anonymous
@mega6382 Also, do yourself a favor, leave that site and start to hangout here. You'll learn more in 1 week in this room than you'll do for a year in that site.
 
@samayo Yeah, sure.
 
2:15 PM
@PeeHaa but can I use without marquee and blink tags in bold capital letters? Can I at least use it with Comic Sans?
 
No
 
@PeeHaa Do you have any suggestions for how I can make it better?

I also have a similar code for joomla. https://github.com/mega6382/habJoomlaLogin
 
On an unrelated side note: I just checked packagist and there is no package named lekker. I hereby assign @PeeHaa the job to create the Lekker PHP framework.
 
@mega6382 If you want some pointers: hash password with a decent algo and a proper random salt, and compare it in a timing attack safe way
Luckily password_hash and password_verify do both for you
 
Lekker PHP - the only PHP Framework made with Joppie Sauce
 
2:19 PM
hehehhee
You foreigners always remember those weird Dutch things :p
 
reminds me, saw a question yesterday that was hashing a password, and then base64 encoding it x_x
 
@PeeHaa that's because we only know these things.
 
@PeeHaa it's just like how all Americans own at least two guns
2
 
hahahah
 
I own two tickets to guns n roses.
 
2:21 PM
speaking of which, saw this earlier
 
Anonymous
@mega6382 Did you really get the Zend Certificate for PHP7? or 5.x?
 
@samayo I got ZCE for php 5.5 but I asked the Zend Team. They said it is ok if I use the latest logo.
 
evenin room
 
posted on November 17, 2017 by kelunik

- Added annotation based deprecation notice for `evalSha()`. - Added script cache to avoid `\sha1()` calls.

 
Somebody just upvoted 5 of my old answers, this is not gonna turnout good in the end, once the cron runs.
@samayo You should also use the latest logo and link it back to your ZCE directory profile.
 
Anonymous
2:28 PM
:)
 
Anonymous
My php is too shitty it doesn't need to be advertised at all
 
@samayo Hahaha
 
2:51 PM
posted on November 17, 2017 by kelunik

- Removed unnecessary parameters for CSRs (#15). - Moved challenge verifiers into their own classes. - Upgraded to `namshi/jose:^7`. - Moved generation of CSRs outside of `AcmeService` (#17). - Added `generateDns01Payload()`. - Retry when ...

posted on November 17, 2017 by kelunik

- Fixed `OpenSSLCSRGenerator` to return a `Promise` instead of a `Generator` (as defined by the interface) and to resolve the promise with the CSR contents instead of a boolean.

 
What are these feeds?
 
Github releases
Of people from the room
@Feeds lol @kelunik
 
@PeeHaa That's what happens if you just release a new major version you wrote ages ago. :P
 
:D
 
what does CSR mean? nevermind, figured out the right words to google
 
2:57 PM
Hi everybody.I am using thread class I added pho_thread extension too but I get class thread not found.can you help me
 
@Tiffany certificate signing request
 
@Tiffany Corporate Social Responsibility
 
isn't that oxymoron?
 
@zohreh did you restart your server after adding the extension?
 
3:21 PM
@Tiffany now that you are here I remember you asked me what room, I meant the game talk room ^^
 
@Naruto it's a discord channel
I didn't make it, not my place to send invites
 
@Naruto you want teh invitez?
 
@SaitamaSama are you in there?
 
yep
 
@Jimbo :-/ dang and agree this $app thing reeks a bit
 
3:26 PM
Yes @mega6382
 
@SaitamaSama mm that's giving me second thoughts :p
 
Morning.
 
\o
 
3:44 PM
o/
 
4:01 PM
I swear that every feature I want to add runs into the fact we use separate symbol tables for constants, types, and functions.
 
happy frydai!
 
hhehehe yeah, that happens
 
class IntCollection {
   use CollectionTrait[int];
}
In this case there aren't any issues, but imagine if we generalized it to new and functions:
$collection = new Collection[int]();
map[string]('inttostring', $collection);
 
yup, ambiguous syntax
why [] instead of <>?
 
The choices based on other langauges are really just <> and [].
 
4:16 PM
What does []?
 
The former has lexer issues because we have >> in our language. Solvable but I'd rather just use []...
 
PHP could also use {} too
 
@ircmaxell Ha! nope.
 
hehehe
no lexing problems!
 
@LeviMorrison Or use new Collection|int| just for having it super weird looking
 
4:18 PM
that's ambiguous as well, no?
especially if we ever add union types (please)
 
To be honest [] makes sense; I'm looking up a type based on some positional arguments.
 
@ircmaxell yes, then yes.
@ircmaxell I can't think of any case with the current grammar
 
@LeviMorrison I don't think it does, it's too often used with arrays/lists, not parameters
 
@Levi I think {} could be indeed interesting
 
Where do we allow {}? Turns out we don't for string literals.
I tried doing "why is this a thing?"{19}
But $str{19} definitely does work.
 
4:22 PM
${"TEST"} will also work
 
ok, who has used the new autowiring thing from Symfony's DIC?
 
We don't allow {} for constant array lookups. /cc @bwoebi @ircmaxell
 
@ircmaxell I would take care of the technical side and updating my patch, if someone else will take care of the RFC part and push it through. I would make the code compatible with Optimizer, but I'm not interested in extending Optimizer structures in order to use the additional type information.
 
I can't figure out, how to make it pass parameter automatically (where class instance is needed) and second parameter as scalar value
anyone tried it before?
 
php > const Collection = ["int" => "Collection<int>"];
php > echo Collection["int"];
Collection<int>
php > echo Collection{"int"};
PHP Parse error:  syntax error, unexpected '{', expecting ',' or ';' in php shell code on line 1
 
4:25 PM
@tereško Sounds like you're attempting to use magic well above your level. Better avoid it :-P
 
I don't particularly like it though. Maybe preferable to altering our lexer and parser to support <> though...
 
@LeviMorrison well, shouldn't it be enough to always parse '>' as '>' in general PHP context and implement right shift as '>' '>' instead of a single T_SR?
 
@bwoebi Precedence...
Although I don't know what much about bison/yacc. Maybe still fine.
 
@LeviMorrison it is possible to assign precedence to individual rules with bison. %prec
 
o/
 
4:31 PM
@bwoebi Where do I put it?
expr '>' '>' expr { $$ = zend_ast_create_binary_op(ZEND_SR, $1, $3); }
 
@Levi we can create a dummy token (within parser only) which has a specific precedence, lookup how our dangling else is solved
 
@LeviMorrison why does it have lexer issues?
 
@NikiC nested generics like foo<bar<baz>>
 
eh
 
(dangling > there, bob)
 
4:33 PM
i think it aint a problem
>> only becomes hard once you have constant (value-based) generics (where >> might be a valid operator inside a generic argument)
 
So where does %prec go?
 
otherwise it's just a simple special case to handle
 
sigh, for some reason bison doesn't want to function on High Sierra
Can't test right now :-(
 
This compiles:
expr '>' '>' expr %prec T_SL  { $$ = zend_ast_create_binary_op(ZEND_SR, $1, $4); }
But:
Parse error: syntax error, unexpected '3' (T_DNUMBER)
When I tried 1 >> 3
 
I suppose it shifts the wrong thing
 
4:38 PM
Make a rule for just the '>' '>' %prec T_SL part?
 
Can't really help you now without trying myself
 
Hmm. What would I return though? Anything at all?
 
@bwoebi actually I found the solution
 
I think I fixed it.
 
5:14 PM
@alvarofvr Did you consider running the query in LIMITs to get data in chunks?
 
MySQL doesn't really expose a lot of information when tracking query progress, and it certainly doesn't have an estimated completion time
if the query times can be averaged it might be worth collecting that and using that to estimate
 
I'm no MySQL expert, but smaller queries should be faster than one huge one that takes forever right?
Just use offset and limit
and 'paginate'
 
especially if it takes forever @Jimbo
 
Or that ^
 
5:15 PM
If you paginate / batch, you can also estimate how long it'll take if you count the number of rows prior
 
^
 
If you were dumb I guess you could grab & store your process ID prior, then use that to poll the processlist from another source while your query executes
But that is super super dumb (and wouldn't work if you were sharing connections)
 
@JoeWatkins you damned domain has run out: phpdbg.com
 
^ I noticed that the other day, but figured you knew.
 
5:32 PM
a guy on my team is having issues with Drupal 8 and sessions. He keeps getting an error where sessions are invalid due to either invalid characters or or the session name being too long. Has any one come across this and how does one solve it?
 
5:45 PM
can i view the progress of sqldump i started with a different terminal?
 
@Andy don't put invalid characters in your session ID for starters.
 
"put characters in your session ID"?
 
yeah well, i get that, but he's just using Drupal out the box not his own code.
 
Normally one does not put characters in a session ID. You let the session handler do that for you.
 
^^ exactly
 
5:49 PM
They're generated based on an algorithm. They're not exactly easy to screw up.
 
@Sherif Apparently this isn't a normal case. A quick Google shows that Drupal does it's own weirdness.
 
for some reason sometimes the session ID that drupal creates has an "_" which is an invalid char and i'm unsure how it does this.
 
Unless your session handler has butchered the entire concept of session id generation.
15 secs ago, by Sherif
Unless your session handler has butchered the entire concept of session id generation.
I definitely wouldn't put it passed Drupal to screw something like that up.
Those guys could probably screw up echo "Hello World"
 
@Andy 1) Does he absolutely need to use Drupal?
2) Does he absolutely need to use their weird session?
3) If all else fails, use a JWT library. You should probably do that anyway.
 
1. Yes
2. Maybe not, but probably
3. say what?
 
5:53 PM
Do you not know what a JWT is or are you saying it's weird to use one?
 
no idea what JWT is soz
googling now
 
TBH it's really only better if you have a REST API. But, it's definitely a work around for your problem.
 
o.0
 
so we could use this as a session? All they're doing is storing a few bits of data.
 
I can't imagine how JWT is "a workaround" to his problem.
Oh, room/11 you make me LOL sometimes.
 
5:57 PM
@Sherif Just pretend session doesn't exist. It was just a suggestion. It would definitely work. I don't know anything about Drupal, so. :p
@Andy You can indeed. Would I suggest it? Probably not. But it would work.
 
@Allenph Here's a novel idea. If you don't know the answer to something, maybe just direct the person to where they might find the answer or at the very least get help from people more-familiar with the problem? Like say... Drupal's support?
 
@FélixGagnon-Grenier caption.madara.ninja
 
That certainly seems a lot more reasonable then suggesting they abandon their entire workflow to go off and try a new tool with brand new problems.
There's zero guarantee they won't have issues there.
 
@Sherif That wouldn't be any fun. Regardless, they're using Drupal. They've got worries all around.
 
All you're doing is substituting one set of problems with another.
Hey, I'm not saying Drupal is a great idea, but I'd rather go ask the Drupal guys about it. Maybe they have a solution.
 
6:00 PM
I have a feeling he's perfectly capable of Googling Drupal support, and yet he's here.
 
It's nice to give direction, none the less.
 
TBH i didnt think about that, re: support.
seemed like a genuine PHP issue so was curious if anyone came across it. I've found the slack
plus, i'm doing this second hand -- i.e. it's a colleague having the issues so just going by their error message.
regardless, i now know what JWT is. So it's not a complete waste :D
 
See? No need to get all fiery Sherif. Good luck Andy.
 
@MadaraUchiha ta!
 
@Allenph Nobody got fiery.
 
6:12 PM
Hmm.
use T1<T2<int>>;
Ah, nevermind.
Actually... bother.
trait T1<T> {
   use T3<T>;
}
I do need to permit it but then check on-substitution if it's valid there.
Well for the proof of concept I can just forbid it, lol.
 
@Wes That reminds me...I had a question. How do traits fit in with all this OO stuff you've been teaching me? When would I use a trait instead of another interface?
 
Traits are compiler-assisted copy and paste. They do not exist in the type hierarchy of a class at runtime.
You cannot type check against a trait.
 
That makes them seem like weird globals.
 
@Allenph Many will tell you that traits are a crappy abstraction and should not be used.
 
My recommendation is that traits should be avoided and when used should contain only instance methods and nothing else; no properties, no static methods, etc.
And, if this proof-of-concept passes it will finally give them some more usefulness.
trait OuterIteratorTrait<Value, Key> {
   abstract function getInnerIterator();

   function rewind(): void {
      $this->getInnerIterator()->rewind();
   }

   function valid(): bool {
      return $this->getInnerIterator()->valid();
   }

   function key(): ?Key {
      return $this->getInnerIterator()->key();
   }

   function current(): ?Element {
      return $this->getInnerIterator()->current();
   }

   function next(): void {
      $this->getInnerIterator()->next();
   }

}
^ That would actually be useful, for example.
 
6:21 PM
@LeviMorrison That still seems...wrong. If any two classes both implemented that trait wouldn't they neccesarily violate SRP?
I mean except in really extreme edge cases.
 
@Allenph No; why?
 
@Allenph A trait is generally used to implement mixins
Adding an extra capability (like logging, iteration, etc) to a class without having to implement the same thing every time
Like @LeviMorrison said, it's a glorified copy/paste done for you by the PHP runtime
 
Maybe I could see it for logging...but doesn't that kind of "go against the spirit?"
I.E. shouldn't you inject a logging class instance?
And it seems like any future changes to a single class that implements that trait could be...weird.
 
@Allenph Indeed you would, although that could be tedious
 
@Allenph Didn't we all lead with traits aren't recommended? :D
 
6:25 PM
There's generally no real place for it in an OO application
 
There are some legitimate cases, such as the one I posted.
 
@LeviMorrison Yeah, you did. But you're obviously using them, and I don't understand the case.
 
@Allenph Sparingly; very sparingly.
But it makes it easy to write new iterators without having to copy and paste that sort of thing into my own iterator.
I only have to write the methods that I need to change from the default behavior.
 
@LeviMorrison Isn't that a perfect case for a service?
Then it's not coupled too.
 
6:28 PM
You're iterator for instance...why not make a service class that does that instead?
 
I'll be honest; I don't even know what that means.
class MappingIterator implements Iterator {

	private $inner;
	private $mapping_function;

	use OuterIteratorTrait;

	public __construct(callable $f, Iterator $inner) {
		$this->inner = $inner;
		$thhis->mapping_function = $f;
	}

	function current() {
		return ($this->mapping_function)($inner->current());
	}

}
 
@Allenph Generally you'd make a Logger interface and typehint that into the class that need it
I don't really see it as a service, but that's highly preferential
 
The snippet I just posted shows all the work to write an iterator that will call $f on each element returned by the iterator..
 
@FélixGagnon-Grenier I would think you'd inject a logger instance and then have the class send it's own messages. The service I was talking about was in the case of Levi's iterator.
 
For basic ones like this we'd probably just use generators (thank you once again, @NikiC).
 
6:33 PM
@Allenph "I would think you'd inject a logger instance and then have the class send it's own messages." Yes, that's what I am saying.
 
Oh, oops, forgot to implement getInnerIterator which just returns $this->inner.
 
the interface is just so that you can have different types of logger
 
@LeviMorrison Your snippets are just doing me a confuse. I'll do some more research on traits tonight and see what I can scrape up before I try asking more questions.
Thanks though.
 
evenin
 
So our app is built on Silex, which is EOL 2018. We're toying with the idea if moving it to Slim. How boned are we? :P
Too vague I guess. I'll say this... it's pretty tightly coupled.
Mornesko
@Danack FTR if we do move to Slim, i'll be heavily opting for your port with Auryn.
 
6:50 PM
o/
 
Hey Teresko.
 
Anonymous
Is there a politically-correct term to describe a person who is fat?
 
Yeah its "Fatto"
 
@samayo "Big Boned"? "Stout"? "Heavy"?
 
@samayo In all seriousness, I believe it is "overweight"
 
7:00 PM
@samayo Heavy set maybe, what's the context?
"Festively plump"
3
 
Or "obese" will work too
 
That's more medically correct than politically.
 
Anonymous
I have to ask person A to deliver a message for person B from me. Now person A is asking what B looks like. But B's only distinguishable element is that he is fat
 
Anonymous
@Fabor ^
 
large works then
"He is a large gentleman."
Which differs from "tall"
 
7:02 PM
@Fabor Yeah but it won't offend anyone or anything.
 
Anonymous
I was going for chubby but large will do just fine I guess.
 
@mega6382 Dunno, some pretty soft people out there.
 
Anonymous
I thought obese was kinda an insult @mega6382
 
Actually it is the most correct word to describe it, as it is a medical term.
 
@mega6382 most correct isn't always most politically correct. Retard is a good example.
 
7:14 PM
Yeah sure maybe.
 
@Fabor I would suggest a pillow to you, but you're in Vietnam
though, I'm not entirely convinced by it yet
 
Yeah, they're made of some synthetic crap here that lumps over time.
I actually had a water-pillow back in the UK.
Damn that thing was heavy.
 
I guess some pillows are made out of literal garbage?
 
Shrug. Wouldn't surprise me.
They just burn their garbage here. $environment--
 
7:17 PM
lol
 
they offer a 100 day trial thing, but one thing I've noticed is that if I have a migraine, I want a softer pillow, and purple's pillow doesn't suffice
however, regular usage seems to go well so far
I'm in between on whether I like it or not. But on the note of being too flat, I think it does a good job of being just the right height. It seems too flat, but it isn't
 
7:33 PM
I know someone who works for Purple.
I said they were overpriced and they agreed :D
Good product, definitely better than average, but way more expensive.
 
I got the pillow cause I'm sick of buying pillows like every couple of years, and bought this with the intention of stopping that. I'm debating on whether I like it or not.
 
8:27 PM
@Jimbo ping
 
8:38 PM
@Tiffany one and a half world's problem
 
@FélixGagnon-Grenier hmmm?
oh.
 
you mean "first world problems"?
 
well, sleeping is important, and a good pillow makes a hell of a difference, hence...
 
:P
 
8:49 PM
Can some1 please give me an honest opinion about this small "framework" f, be as harsh as you can ( keep in mind that this is for small projects ) github.com/getl0st/Fyre
 
I make my bed uncomfortable on purpose.
 
@Allenph that's easy
 
@Tiffany You would think so, but I had to hunt down the alligator's with my hands in order to get the perfectly uncomfortable leather for my pillow case.
 
@Allenph I was thinking along the lines of "put a bunch of books on my bed"
 
@getl0st it seems you have an outdated conception of the M in MVC. Read this stackoverflow.com/a/5864000/576767
the whole "let's have a model class containing a $db connection from which every model extends" idea is Very Bad™
 
8:54 PM
@IROEGBU thanks for the proofreading. I can see the comments, will go through them soon :)
 
generally, people now have "entities", "mappers" and "services", with the roles you could expect from each of those: being a data entity, mapping data from the persistence layer to an entity, and interacting with the rest of the application, respectively
 
@getl0st buy a copy of clean code and then rewrite the whole thing after reading it
 
"But I am just making a REST API!" , thanks for the input, will improve on that @FélixGagnon-Grenier
@Patrick ?
 
one thing you got right however, is the name. Put all that on Fyre :D
 
8:57 PM
@getl0st it's is really hard to find something that is done right, almost everything is wrong from a clean code perspective
Not trying to be mean, but you asked for honest feedback :)
 
... that expands out bigger than I was expecting
 
I never worked for a company, I dont have the "production" quality code
I apreciate every input
 
@getl0st yeah if you don't have a senior that reviews your code it's hard to learn. You have to read a few books and watch some talks
 
a lot of "production" code are houses of cards
 
8:59 PM
How does it feel to work in a company?
 
I compiled some stuff there a while ago
 

« first day (2589 days earlier)      last day (2359 days later) »