« first day (2565 days earlier)      last day (2383 days later) » 

3:00 PM
@Shafizadeh yes, but it is quite complicated
 
You can, but it's just going to involve standing up another server... you see where the problem comes in? Open a support ticket with your host, ask for their nameservers
 
@tereško so using cloudflare.com is your suggestion too?
 
@Sara I think astkit would benefit a lot from using named children instead of offsets
 
what is your DNS provider?
 
then, call your friend and ask him to use them instead of ns1.lamtaka.com etc
 
3:01 PM
@tereško DNS provider is the one I bought a Domain Name from?
 
yes
 
@Shafizadeh can you use it to "manage your owned domains"?
or manage "domain zones"
 
@tereško yes, it has a interface. But I cannot find anything named "Add A Record"
 
what options do you have?
 
3:03 PM
@Shafizadeh that's putting the cart ahead of the horse. Can you see anything referring to "Zones" or "DNS"?
 
on a slightly related subject - is there any reason (aside from saving 20$/y) why you keep buying the infrastructure locally?
 
@tereško embargoes?
 
@tereško I cannot buy from DigitalOcean, because I'm from Iran and I don't have any credit card
 
what are those other tabs?
 
3:06 PM
And what's that top radio button?
 
@NikiC That'd require baking a LOT of knowledge of indidivual AST types in, no?
 
@Dereleased it says: do you want to use your own nameservers or default ones
 
@Shafizadeh You probably want default ones, then manage DNS
or manage Zone file
or something like that
 
yes, use the default ones
 
3:08 PM
@Dereleased if I use default ones, where should I enter my server IP ?
 
not there
which is why I keep asking for what are the other tabs
 
where then?
 
somewhere related to "zones"
 
@Sara yes
 
@tereško lemme see
 
3:08 PM
Decl types have named children, as a class of ast nodes.
 
or maybe "areas"
I am not sure how it would be translated
 
@NikiC Do you have child naming in php-ast?
 
When calling a method of a parent class from a method in subclass, what is the difference between parent::methodName() and $this->methodName()?
 
@Sara yeah. it's extra maintenance burden, but usability really suffers without it
 
@DunDev depends on if methodName() has been overridden/redefined in the current class or not
 
3:10 PM
hrmmm
 
@DunDev the parent:: will call the superclass method, even if a method has been re-defined in a subclass
 
Not that it's particularly good either way. Without one class per node type you're still missing good IDE support, which is really the main thing that makes php-parser usable
 
Nod, php-parser is love.
 
also, @DunDev, it tends to be a sign of architectural mistake
 
It's where I'd rather put energy tbqh
 
Wes
3:11 PM
@DunDev $this->methodName() calls the most recent definition, while parent:: calls the inherited definition. if you aren't redefining methodName then the two are equivalent
 
evening
 
but I should fuck off to work.
 
@tereško parent::__construct() =(
 
@Dereleased my statement still stands
 
@bwoebi Things are working pretty well, though I still get crashes from time to time if I drop the sleeping
 
3:13 PM
@Dereleased my methodName() is really separated and not overridden the current class
 
@Sara yeah ... that adult-ing thing is annoying
 
@DunDev Then parent:: is unnecessary
 
why can I never find a SO question that explains something very well that's being discussed in chat
 
Anonymous
@tereško why does that show bad architecture out of interest? Because inheritance?
 
@JayIsTooCommon it means that you have usecase, where you want both to inherit and not inherit
at the very least, it is a SRP violation, because you are trying to hide the addition of more responsibilities
 
3:16 PM
@Tiffany Because we have chat, we don't have to make SO questions :)
 
@NikiC caused by what? accidental identity of execute_data pointer with different prev_execute_data?
I haven't seen a single crash, running Aerys with a 5 µs sampling rate
 
@JayIsTooCommon in general, it is an indication, that something should be moved to an injected dependency
 
@Leigh I can find SO questions that are similar to what I want, but there was one that had a very thorough answer describing static methods and object methods. And I can't find it. And it's bugging me.
 
@tereško I've been trying to think of an example that counters your argument but I can't come up with anything at the moment that doesn't have a cleaner way to do it without juggling inheritance
 
A single object instantiation within Aerys is taking nearly 2% of total runtime :-D
 
3:21 PM
you can call it "architectural smell", but I would just go with "flaw" or mistake"
 
@crypticツ only like 6. I've since unassigned myself from the docs ones......because anyone could work on those.
 
hmm, maybe autoloading cost is hidden there…
 
@bwoebi I'm currently testing with busy sampling (no sleep)
 
okay, let me try
 
Anonymous
3:29 PM
@tereško I see, generally unrelated but if you saw a controller extending a BaseController, that would smell to you?
 
@NikiC the crash I get is g->samples_num == g->entries_num and it then doing an out of bounds read
 
@JayIsTooCommon I would guess, that someone is using a service locator, or that controller also does some validation and/or authentication
 
@bwoebi Update to current master
And yeah, gotta increase the buffer size by a lot, otherwise it will only collect a small amount of data
 
okay, you've pushed it :-)
@NikiC 40 seconds test with busy loop, no crash
(debug build)
oh well
run out of memory too early
I don't have that much memory :-D
 
@bwoebi age ravages us all
 
3:40 PM
fine … @NikiC But I still don't get crashes on my debug build
 
@JayIsTooCommon pong, bitch
 
Anonymous
@tereško Ok, (context i'm guilty of extending a base). Say I have a authenticateOrRedirect() method that uses an authenticationService to verify authentication and redirects to /login on false.. If I wasn't extending a base, that would have to be repeated in the ctor of every controller because redirecting in a controller dependency would be smelly, no?
 
@JayIsTooCommon why not put the authentication outside the controller?
 
@JayIsTooCommon Don't you use middleware?
 
@NikiC uh, you need to access ex->prev_execute_data before the equality check of EG(current_execute_data)
 
3:47 PM
@JayIsTooCommon middleware could even forward on AuthenticatedRequest rather than a vanilla Request
 
Anonymous
Alright, this is new to me. I'll have to Google for a bit
 
if ex->prev_execute_data becomes garbage between the check and the next iteration, you have lost @NikiC
 
Anonymous
@JoeWatkins just checking your pulse
 
@JayIsTooCommon I would just execute the authentication service in the bootstrap
 
k, it's slow but there ...
 
Anonymous
3:49 PM
@tereško but how would I flag routes that don't require authentication or require a throw instead of a redirect?
 
@JayIsTooCommon by adding property in each route
(not an option in a router, which contains dispatcher)
 
Wes
hey joe \o
 
auth.logout:
    path: /auth/logout
    defaults:
        controller: 'controllers.authentication'
        action: logout
        public: false
    methods: [POST]
 
3:53 PM
@tereško you yaml bro?
 
Anonymous
@tereško aye, I use FastRoute
 
my condolences
 
Anonymous
damnit
 
@tereško how do you actually consume and match the routes?
 
Anonymous
via the dispatcher and route collector that fastRoute comes with
 
3:54 PM
@JayIsTooCommon Eh, so do I. I literally have routes like $routes->addRoute('GET', '[/]', [Dashboard::class, Auth::class]); - Known pattern of controller followed by middleware
 
try {
    $matcher = $container->get('routing.matcher');
    $request = $container->get('routing.request');

    $parameters = $matcher->match($request->getPathInfo());
    foreach ($parameters as $key => $value) {
        $request->attributes->set($key, $value);
    }


    if (!in_array($request->headers->get('x-api-key'), $allowedApiKeys, true)) {
        throw new LoggedException('Invalid API secret key', 403);
    }

    $controller = $container->get($request->get('controller'));
    $command = $request->getMethod() . $request->get('action');
@FélixGagnon-Grenier just copied from the current;y opened project's bootstrap
 
bootstrap has a route resolver, instantiates a middleware stack, then dispatches
 
@tereško That is really interesting. I surmise routing and controllers are top level namespaces sections, but what about auth.logout? is it a way to group routes?
it sure does seem to allow for much more flexibility than the usual "method route handler" definitions
 
Anonymous
Interesting. I never thought about doing it at Bootstrap stage. Much cleaner than the shit i've come up with. Cheers @Leigh, @tereško
 
@FélixGagnon-Grenier yes, I am using Symfony's router
 
4:00 PM
@NikiC Actually, it'd be quite interesting to also collect backtraces here … at least I'd love that :-P Don't need a lot of depth, but 5-10 frames would be nice (maybe configurable)
 
and you have an option to add other magical parameters in each route .. like "section" or "host"
 
@JayIsTooCommon my bootstrap is basically this
 
Destiny release on PC today, a mere £90 o.O
 
    $routeDetails = $router->resolveRoute($request);

    $stack = new Dispatcher(
        $injector->make($routeDetails->controllerClass()),
        $routeDetails->routeParameters()
    );

    foreach ($routeDetails->middlewareClasses() as $middlewareClass) {
        $stack->addMiddleware($injector->make($middlewareClass));
    }

    $response = $stack->next($request);
 
Anonymous
cheers
 
4:13 PM
@bwoebi That's ... a very good point :D
 
@tereško ewwww $data = ['status' => 'ok'] + $data;
 
api
 
that way I dont have to handle the status in templates
and, if there was an exception - add ['status' => 'error']
 
4:17 PM
(hmm .. I think I made the explanation more confusing)
 
it's ok, from "this is an api" + catch it's clear enough what happens in case of exception vs not
I think adding arrays overwrite the value contained in the key if "status" is there on the right operand?
how do you manage http status code though? in $data?
 
I don't, because I cant (we have a fucky load balancer)
 
:(
also, is http_reqponse_code really how we should do it? eg is this a valid end of bootstrap:
<?php
declare(strict_types=1);

ini_set('display_errors', '1');
error_reporting(E_ALL);

require __DIR__ . '/../vendor/autoload.php';

$response = \Zvax\DNDMapper\dispatch();
http_response_code($response->getStatusCode());
foreach ($response->getHeaders() as $header) {
    header($header, false);
}
echo $response->getContent();
 
depends on your infrastructure
 
I'm thinking on creating the request there and send it to the dispatch method instead
 
4:24 PM
is there no $response->send() ?
did you check?
 
0
Q: RewriteRule for several hosts with proxy

dearmisterrobotI have one common domain and several specific domains (per product) with the same A-record There can be unlimited amount of rules per every domain. So I can access my server with somedomain.dev, anotherdomain.dev, thirddomain.dev Each domain should route to it's own path (like index.php?r=site/...

 
@tereško no
 
> asked 1 min ago
 
@Danack is that bad?
 
Morning all.
 
4:26 PM
@FélixGagnon-Grenier it just looks to me, like there should be a way to send the response, without having to manually handle it
 
@tereško yes. I'm still using patrick's http lib, haven't found compelling replacement nor any real reason to change
 
Is it not http foundation?
 
If you're going to ask on the main site, then allow people time to answer it, rather than spamming it elsewhere straight away. Also.... that question is like to be closed as there isn't going to be a single good way of structuring htaccess. (other than switching to nginx).
 
@Leigh that was my first thought
 
@JayIsTooCommon if you haven't tried it, you should try Slim with github.com/Danack/SlimAurynInvoker
 
4:28 PM
@Danack I'm not trying to spam but isn't it better to copy a link for a question instead of copypasting it in the chat?
 
asdaddadasdadsd – #75430
 
@Danack Moreover it can be helpful for people with similar problem
 
not here
we dont have any Yii users here
 
@tereško it can be applied to any framework and even native php
Is there a room with htaccess questions?:)
 
dude. you asked the question five minutes ago
leave it time to be seen
 
4:30 PM
why would a sane person perform routing in .htaccess !?
 
People still use Apache? wut?
 
^ also that
 
Actual image of @tereško when people ask questions...
user image
2
 
@FélixGagnon-Grenier I do something like github.com/CodeCollab/Http plus extra stuff like isEmpty, isServerError like Slim's Response
 
Anonymous
4:31 PM
@Danack I haven't, will have a dabble - cheers
 
@Allenph it's more regarding people, who just dump their SO questions here
 
Anonymous
s/, who just dump their SO questions here/
 
Anonymous
:B
 
@tereško @tereško I was poking fun at these two messages.
 
@Ekin oh nice. and there's even a Session!
thanks for the suggestion
 
4:33 PM
no need to get nervous about it
 
cough as shit as it is, use PSR7...
 
@FélixGagnon-Grenier just use HttpFoundation
 
Anonymous
^ +1
 
Interview somewhere today that does unit tests and seems to have actual senior engineers.
Pray to which ever deity you prefer, if you would.
 
\o/ Odin
 
4:34 PM
\o/ Satan
 
who would have thought ^
 
...the Sun?
 
\o/ Water.
 
Is it too intrusive to request viewing some code in an interview?
 
@Tiffany So, Ra?
 
4:35 PM
\o/ cthulhu
 
I'd like to not have another 5 month employment on my resume because the place sucked.
 
@Allenph no, but they will usually refuse
 
@tereško That's pretty dumb...especially considering most of what I'll be doing there is FE anyway.
That said, I figured as much.
 
@Leigh I guess I could go WH40k and say \o/ Tzeentch
 
aaand you lost me
 
4:39 PM
@Tiffany Hmm.....I wonder if there's a good Tzeentch / agile development methods joke somewhere....
 
@FélixGagnon-Grenier thanks for an idea man!
I'll try use config file instead of complicated htaccess rewrite rule.
 
Anonymous
hey @Leigh, you still planning on making terminator gardeners?
 
@JayIsTooCommon Not any time soon
 
I mean... if your application autogenerates an htaccess, you should be solving your problem using the application
 
4:48 PM
No space to put one
 
bypassing it is sure to amount to shooting in your foot
 
@FélixGagnon-Grenier autogenerated htaccess / config.php is some sort of routing cache
Otherwise it takes one SQL request for every visit
 
ok, you assume I have any idea what framework you are using, which I don't.
 
... and btw, a sql request per request really is a bad reason not to do anything
like, you can be certain that the overhead of yii2 loading is much, much heavier than a single sql request
not to mention the other 2k requests for it to generate the page
try to find the yii2 way to do what you want
anyway, I'm off for lunch, good exploration
 
4:52 PM
@FélixGagnon-Grenier just checked debug panel
It takes 3 core requests and 5 requests to load a models which I use to render the page
Why not to use compiled config to process routes if I can save up to 10-100k requests a day?
@FélixGagnon-Grenier task cannot be solved by yii2 or other frameworks scope
Anyway, thank you for idea of non-htaccess routing
 
\o
 
Could you please have look at this question: stackoverflow.com/questions/46909693/php-post-and-preincrement/…
 
@Tarun It's a dupe of a dupe of a dupe
 
5:04 PM
@PeeHaa Not really, I believe the answer given by me is correct although the answer with highest upvotes says something else
so posted the link to verify
 
@Tarun Yes really
 
well haha
 
^
dem cheap upvotes tho
 
Indeed
 
The top answer is kinda wrong or misleading at best I give you that
But it's a dupe nonetheless
Every week another fool is hit by undefined behavior
Or one of the n thousand more
@Tarun now tell me. Is it a dupe or not? :-)
 
5:12 PM
Yes, Sir. It is.
Cant believe, I used to have such questions in my graduation's exams :p
 
It's a "feature" of many languages :)
 
Other than I guess Ada, is there any language where it's not undefined?
 
I think I remember somebody saying at least one more last time it came up in the room
But one does not simply trust my brain
 
Wes
evenoongs
 
hoi wesmon
 
Wes
5:24 PM
nana nana nana nana wesmon nana nana nana nana wesmon
 
Kinda hard to search on @Danack
wesmon wesmon
KABLAM
 
Wes
KAPOW
 
Kebab
 
:P
 
Wes
@PeeHaa by the way, can i have that kebab?
it's been a day...
 
5:27 PM
The moment I find myself some kebab again and have something left I will sent it over to Italy
Just don't ruin it with pastasauce
 
Wes
ahaha
 
Of course not, it's Kebab Marsala night
 
Wes
i thought "ask @PeeHaa a kebab" was a new game
 
I like that game
 
That reminds me of a Kurdish friend from Syria/Kurdistan that made some killer kebabs. Dude was crazy...the top of his head was a little messed up and it made his eye droop. I asked him about it and apparently he got shot in the head before he left.
 
Wes
5:30 PM
Sep 29 at 16:06, by Fabor
And tell him to bring me a kebab
22 hours ago, by Fabor
@PeeHaa oi. Kebab please.
 
Anonymous
not sure I like all this flirting going on
 
Wes
was funny af
 
Oh I missed that ping yesterday
@JayIsTooCommon Yo bruv
 
Anonymous
@Fabor hah, he doesn't miss my pings. Bitch.
 
Wes
i don't know how that originated @Fabor
 
5:31 PM
Survived the killer weekend?
 
@JayIsTooCommon Are you sure you're not just jealous? Hey there sailor...
 
@Allenph o_O wow
 
They have some messed up version of a kebab here, basically not a kebab, tastes okay but it's not a kebab.
 
Anonymous
@PeeHaa Aye and now back with 11 hour shift yesterday and 12 - 13 hour shift today
 
Oh btw people I have a confession to make
 
5:32 PM
We know already
 
Anonymous
gay gay gay gay
 
:D
 
@PeeHaa How did you nuke the world this time?
 
I've been to turkey a couple times this last year and I am ashamed to tell you
 
How was the kebab there?
 
5:32 PM
I still hadn't kebab there
 
Wes
boooooooo
 
Anonymous
you're a disgrace
 
diaf
 
I knoooow
 
Did you at least eat some turkey?
 
5:33 PM
Going to fix it next visit
 
Wes
it's... it's... like a trip in france without having a peek at the italian mona lisa
 
@Fabor uhhmmm not sure how to answer that :P
 
Wes
how. why.
 
I've never actually tried a kebab...
 
Anonymous
@PeeHaa lol
 
5:34 PM
@Wes I know I know
 
Anonymous
@Tiffany dude
 
My problem is I like all food
 
I think that excommunicates me
 
And it's sooo hard to pick stuff while I am there
 
Anonymous
@Allenph always
 
5:36 PM
!!wotd
 
rapprochement an establishment or reestablishment of harmonious relations: a rapprochement reached between warring factions.
 
Wes
want to go to turkey too... i always wanted to see the mighty costantinopolis' walls
 
Haven't been too ist either yet
 
@Wes Be careful with that. They don't like it when you call it Constantinople.
 
Anonymous
@JoeWatkins oi
 
Wes
5:39 PM
idgaf. it's still part of the roman empire in my mind @Allenph :B
 
Turkey is fairly low on my list.
 
@Wes Yeah...until you're in the middle of Turkey getting the crap kicked out of you.
 
Wes
yes right now turkey doesn't seem the friendliest of places
 
When I was younger I was going to go join the Kurds. The dudes I met from Turkey who were smuggling people into Syria were pretty sketchy.
 
Sketchy traffickers?
No fucking way
:P
 
Anonymous
5:42 PM
:B
 
They weren't traffickers in the connotation you're intending I think.
 
> smuggling people into Syria
That's the exact definition in my dictionary :P
 
It's a little different. They were part of the coalition forces, not just some dude.
 
I'd like to visit Vatican City some day
Look at ceilings painted by Michelangelo, etc.
 
Wes
constantinopolis was defined "more beautiful than rome" and rome was by definition the "most beautiful" ... there should be a lot to watch there @Fabor
 
5:44 PM
@JennaSloan I'm unwilling to pay the ticket price of a young boy to get in.
 
@Wes Meh, Rome is just full of pickpockets and round yellow buildings :P
 
I had kind of assumed most of the old city was pretty much ruble or converted...is it not Wes?
 
Vive la France?
 
Wes
@Fabor rome was the largest city in the world, only matched by london several centuries later, during the industrial revolution. i wouldn't say it's just round buildings :P
 
I've actually been tbf :P
 
5:48 PM
@Wes He did say they were yellow. So the buildings are not "just round"
QED
 
Anonymous
he's got a point @Wes ^
 
Anonymous
#fakeNews
 
Wes
like for? been there weeks and i didn't even scratch the surface... there are hundreds of things to visit
 
Meh, Rome just isn't high on my visit (revisit) list. But yes, it is worth going.
Italy is worth it for the ice-cream alone.
 
Wes
lol
 
5:50 PM
Shittiest place I have ever been: venice
I see some pattern @Wes :P
 
Wes
lol
i am not a fan too
 
You should all just come to Asia
 
Nite all o/
 
Anonymous
@Fabor will you have somewhere for us to stay?
 
Stop fapping around in your comfy western countries and experience some of the orient.
 
Wes
5:52 PM
i think people goes there thinking it's a magic city
 
Anonymous
wait, is nam a dog eating+ ?
 
Wes
do you remember the smell of mold @PeeHaa
 
It was awful
 
@JayIsTooCommon Yeah, go stay in a hotel or hostel. It's like £8 a night. :P I do have 1 room though
 
Narrow fucking streets. Stinking "water". Smelly people. Filthy pidgeons
Expensive
 
Anonymous
5:53 PM
@Fabor Good good.. and as for dogs?
 
False negative filtering a string with short IPv4 – #75431
 
@Fabor Are you in Vietnam?
 
I am
 
Anonymous
fappening.. don't ignore me..
 
@JayIsTooCommon as for dogs?
 
Anonymous
5:54 PM
@Fabor Are they all for dog eating there or are do they have souls instead?
 
I've been thinking about going there...it's inexpensive and I've never been out of the country.
 
For a holiday?
 
Wes
it's in the water, there is going to be a lot of mold... obviously :B and obviously that's not advertised... it's just very characteristic... in picture
 
@Fabor Partly...I also want to make the pilgrimage to the Perfume Pagoda.
 
@Allenph How do you fare with new vastly different experiences? Such as food, people, culture etc?
 
5:56 PM
@Fabor I honestly don't know...I've moved around the continental US about every 6 months for my whole life though, so I would assume I'd be able to handle it better than most.
 
So, let's say something not so appetizing to eat is presented in front of you, how do you deal? Eat it anyway because you'll try anything once or politely decline?
 
I'm a pretty picky eater...but I'll eat if it will be offensive not to.
Unless it's some form of religious sacrament.
 
Not offensive, it's more just an idea of how open you are to different things. Food is the odd stuff normally but culture shock is a real thing, though the name is a bit grandiose.
 

« first day (2565 days earlier)      last day (2383 days later) »