« first day (2530 days earlier)      last day (2423 days later) » 

4:08 PM
Hello, I'v deployed my app to a test server on hostgator and everything was fine, when i deployed it to a stronger server(hetzner) i got an error on a certain request that connects to another api.
Here is the error: HTTP/1.1 403 Forbidden Transfer-Encoding: chunked Connection: keep-alive Status: 403 Forbidden Cache-Control: no-cache X-Request-Id: f607ea9a-affe-4d29-8189-c4df70cdb455 X-Runtime: 0.003897 Date: Tue, 19 Sep 2017 15:56:18 GMT X-Powered-By: Phusion Passenger Enterprise Server: nginx + Phusion Passenger 403
I tried to put " Transfer-Encoding: chunked" in the header i get just 501 gad getway
 
and how is any of it related to PHP?
 
Well since there is no much information about it on internet, and the "Server Faulth Stack" said that this is of topic i tried my luck here :D
 
@Allenph docs.google.com/presentation/d/… that's a good high-level overview of the project
 
@ircmaxell Awesome. Man...I bet it would be fun to try and move that thing.
 
yeah... I started moving it to perma-proto boards
so I could connect it all with ribbon cables and make it modular
 
4:22 PM
I had planned to design modular PCBs for each CPU component...then make a server-rack style case.
 
yeah, i considered the same
but I wanted to keep the "breadboard feel"
which created a ton of design headaches
 
Yeah...I would rather mess up a bunch of PCBs for a couple weeks than fiddle with breadboards for eternity.
 
That's a really good idea.
 
can I copy a git repository from a web server to another web server and the history persist across the servers?
 
4:30 PM
@Tiffany What do you mean "the history?"
 
I moved all the 8-bit registers to protos. But then had to stop. Had designed the 16 bit registers, using two levels (stacking proto boards)
 
The commit history?
 
@Allenph commit history, commit log
whichever you want to call it
 
@Tiffany Clone it.
git clone
 
I'm not sure if that'll do what I want... gimme a sec and I'll explain
this is the situation. I had two repositories, one on production, one on development. I was keeping the dev repo updated, but was forgetting to update the prod repo. So I got rid of the prod repo. What I want to do is copy the repo from dev to prod, then I think? clone the repo from prod to dev, so that when I push, the changes go to prod.
does that make sense?
 
4:34 PM
@Tiffany Usually I keep a master branch, at least one dev branch, optionally some composite feature branches, then feature branches. Having separate repos is a bad idea, I would say. (I'm not a git master, so don't listen to me.)
 
yes, which is why I've changed my repo
 
you can add a new remote?
 
I can think of a way to merge your repos...but I can't think of a way to merge their commit histories.
 
well, I already deleted the prod repo
I don't care about its commit history
 
Oh, then yeah.
I'm misunderstanding what you want I think.
 
4:36 PM
my concern is that if I copy the .git folder from dev to prod... that it's not the same because in my head the dev .git folder is still pointing to the files on the dev server, even though the files across both servers are the same
@Ekin that will be the goal
 
@Tiffany I don't think it would give a crap.
Essentially to git you just changed a whole bunch of files.
It's just another commit.
 
so I copy the .git folder over, do I need to run anything on prod for it to "update"?
 
I would do a regular commit.
 
ooooh, just add the files to staging and then commit
yes?
 
git add . && git commit -m 'Some message'
 
4:41 PM
:D
always fun when I'm trying to figure something out, and someone interrupts with, "hey this happened, can you look at it?"
 
What you normally would @Tiffany is have some bare repo somewhere
And both dev and prod are working clones of that
 
I do have a repo on Beanstalk
which I push to as well
it's the "central" location
oooh
I can git clone from that to prod!
:D
 
^
 
@Tiffany I have no idea what beanstalk is but yes
If it's some sort of git server thing it contains the bare repo
 
it's a paid-for private repo host. We went with it years ago because they supported subversion, back when I had to use subversion as the VCS. Beanstalk added support to git at some point, and I decided I was sick of subversion's bullshit.
 
4:45 PM
Ah k
 
!!lxr stream_select
 
[ /ext/standard/streamsfuncs.c#756 ] PHP_FUNCTION(stream_select)
 
So just like github or whetever hosted service
 
yarp
 
kk
 
4:45 PM
it was basically bitbucket for subversion
 
Gitea is a pretty good Github clone if you want to self-host.
Much lighter than GitLab.
 
Well yeah. Oviosuly anything not ruby is lighter :P
 
@PeeHaa GitLab's design itself is really heavy.
 
Yes like all other ruby projects
 
posted on September 19, 2017 by CommitStrip

 
4:48 PM
I have to work with a vendor on occasion, who are the owners/creators of the code base, so self-hosted wouldn't work
 
or rather ror
 
because they need to be able to push to it as well
 
Why wouldn't that work?
 
5:00 PM
I guess it could if they added the server as a host
but meh, we already have beanstalk, it works, it's set up, I don't really care to self-host
 
@Tiffany They don't have to do that either. I mean...by all means stay with beanstalk...but just connect it to a subdomain.
git.tiffany.com. You can put whatever you want over top to deny access from the entire web, too.
 
@Andrea 100% jest, you may not use me as an instrument of declaring bad things about you, period (what cause on account of I didn't)
 
5:45 PM
evening lords
 
Wes
@DaveRandom sorry for the late reply, yes. but you can have vs2017 installed at the same ti me of vs14
 
@Wes when I tried it broke my build process for some work apps, I will sort it out at some point but no time (as usual)
 
Wes
dunno, i have both vs installed. i mean the ides
 
6:04 PM
@DaveRandom Your code is very Amp v1 like.
 
Question: should imports be at the package level (where the symbols are imported to local scope), or at the file level?
 
@ircmaxell Do you have an example? I don't get what's package level supposed to do.
 
so
foo.pr
    package foo;
    type a = int;
foo2.pr
    package foo;
    public type b = a | int;
bar.pr
    package bar;
    import foo;
bar2.pr
    package bar;
    fn something(b $b) none {/*...*/}
in bar2.pr, should the reference to b resolve to foo::b, or should it be an error
 
@ircmaxell I'm pretty sure it should error.
What if you import package baz in yet another file in package bar and that conflicts?
 
hmmm, so I may need to do three passes... Need to think on that...
 
6:22 PM
@kelunik ... in what regard? :-P
oh you mean the original PR for amp/process
I still haven't properly got used to v2 yet, I've not had much cause to write async PHP code recently
 
@DaveRandom Creating watchers over watchers and watchers. :P
 
@Allenph fair enough. I think it has a subdomain already. I think.
 
@DaveRandom Reminds me a lot of the amphp/dns code before the rewrite.
 
I don't have time right now to dig into what that actually means :-P
I don't have time "right now" ever :-/
I need a pay rise...
@SaraMG Do you have any idea on how new HHVM development strategy would inflict future PHP development? Good, bad, no impact?
Like, I realise that English is not this person's first language and they speak much better English than I speak <whatever their first language is>, but... lol @ "inflict"
If you are not careful, I shall inflict some PHP development upon you!
 
That's just harsh man
 
6:33 PM
Don't answer back or I'll make it perl
 
:D
 
Wes
lol
maybe just a slip, inflict = affect
it's an error i would probably do myself :B
 
@DaveRandom I really don't get why one watcher exists where it shouldn't, maybe it's faster to rewrite it on top of amphp/byte-stream instead of manual watchers.
 
6:51 PM
@ircmaxell For what it is worth in some other languages they are imported into the translation unit. My guess is that would be "package".
 
@FélixGagnon-Grenier as opposed to having to work in a field?
and tbh, I'd actually prefer to work in a field rather than an open plan office, when it isn't raining.
 
@Danack I thought opposed to closed cubicles, if that still exists?
 
cubicles are better than open plan...
 
Anyone actually use scroll lock?
 
Wes
i doubt it's even supported these days
 
7:06 PM
Should replace it with something more useful like "SFW" which switches to a spreadsheet view or something
 
A boss key or boss button is a special keyboard shortcut used in computer games or other programs to hide the program quickly, possibly displaying a special screen that appears to be a normal productivity program (such as a spreadsheet application). One of the earliest implementations was by Friendlyware, a suite of entertainment and general interest programs written in BASIC and sold with the original IBM AT and XT computers from 1982 to 1985. When activated (by pressing F10), an ASCII bar graph with generic "Productivity" and "Time" labels appeared. Pressing F10 again would return to the ...
 
Wes
lol
 
lol. Perfect.
 
posted on September 19, 2017 by kelunik

- Fixed warnings and timers in `EventDriver`. - Does no longer hide warnings from `stream_select`.

 
7:31 PM
Hmmm... in auryn context, how do people manage multiple PDO connections? (for instance one with a read only user for the site, one with a read/write for an api). I have no clear idea on the separation of layers, maybe both would be completely insulated, but possibly the same service could be used from both presentation and persistence layer.
would all that happen in the define commands of the injector? define different injectors for different layers?
maybe even interface ReadPDO and WritePDO in the type hints of the classes, services?
 
@FélixGagnon-Grenier this would be the way that I would approach it (although I would use Source and Dest instead of Read and Write)
just a simple class SourcePDO extends \PDO {} would do it
 
@LeviMorrison yes, which is precisely what I'm doing... Aliases are done at the file level, but wondering about imports... :/
 
> (for instance one with a read only user for the site, one with a read/write for an api
@FélixGagnon-Grenier I have completely separate config files for the different environments, which satisifies that requirement, without a specific 'this is a read-only PDO connection'.
> maybe even interface ReadPDO and WritePDO in the type hints of the classes
I think that is fine.....when they're simple like that. When it gets more complex than that though, I prefer to switch to using 'context objects'.
Imagine you need to have archive data from one database to another. Rather than creating a 'SourcePDO' class and a 'DestinationPDO' class, instead create a DataArchiveContext object like:
class DataArchiveContext {
    public $sourcePDO;
    public $targetPDO;
}
You can then create a delegate function that creates those context objects explicitly, rather than having increasingly complex hierarchy of types.
 
If I change the text that is output from a cli app during a task it's doing, so for example "Foo returned Baz results" to "Bar returned Baz results", does that mean a breaking change? Since other apps could potentially grep the output. So would that mean a major version bump?
 
@DaveRandom it seem that the answer would "there will be no impact, because HHVM is not *enterprise-legacy language"
 
7:48 PM
@Danack I think I'm new to the concept of context object. A glorified value object?
 
in short, yes.
I'm trying to find a non-shitty link.
@FélixGagnon-Grenier this is a marginally non-shitty link allankellyassociates.co.uk/static/patterns/…
 
The idea is that you can have certain types associated with certain operations, and that the different parts of the application can communicate that they are going to do something related to that type of operation, without having to distribute the knowledge about that type of operation across the application.
For example - if you had some software to do with people buying stuff online, you could create a 'MakingPurchaseContext' object where one of the properties was an object for analyzing the purchase for risk.
For purchases where the person's delivery address matches their IP address, you could create the 'MakingPurchaseContext' object, with a QuiteLaxRiskAnalyzer. When the persons delivery address doesn't match the country of their IP, it could contain a "ParanoidRiskAnalyzer".
By just having a specific type for the operation that is being done, it makes it easy to have the rules for creating that type in a single place.
 
That would be, the delegated function you mentioned earlier?
 
Anonymous
!!wotd
 
8:02 PM
where we could analyze details about the request, user, etc. etc.
 
Anonymous
@Jeeves yo
 
@samayo Hi!
 
@FélixGagnon-Grenier yep.
 
Anonymous
@Jeeves where is my !!wotd
 
@samayo Near North America.
 
Anonymous
8:03 PM
@Jeeves idiot
 
@samayo In the western hemesphere.
 
tl:dr use context objects for stuff that has dynamic rules. use specific types, if you really need to, if the rules are static. Or just have separate Auryn config files for your different environments.
 
Hey @Jeeves say something completely out of left field
 
@Dereleased Then, what should I do?
 
Anonymous
@Jeeves sucks
 
8:04 PM
@samayo What time is it?
 
Anonymous
@Jeeves 10:00 pm
 
@samayo Where are you?
 
Anonymous
@Jeeves UK
 
@samayo Oh I am in the USA.
 
Anonymous
8:05 PM
noooo
 
Anonymous
i'm drunk
 
You'd like my hat. This is my hat
 
I like your hat.
 
Do, pray tell us, where did you acquire that hat?
 
Anonymous
@Dereleased I'm going bald. I need that hat.
 
8:12 PM
I had it custom made.
 
Anonymous
Even better! Where? How much?
 
It'd've been cheaper if I'd ordered it online. I paid $30 in person, but I think $20 would cover it if you did it online. I'm just impatient.
 
Anonymous
Where? 20$ seems a really good bargain.
 
@samayo We're an ocean apart, man, whatever applies to me won't necessarily apply to you. Just Bing and Decide!
 
Anonymous
@Dereleased Actually, I'm not joking. If you know of an online shop that sells custom made hat for under $50 let me know.
 
Anonymous
8:19 PM
I have a shopify account and I might add that to the list of product I'm planing to sell
 
Anonymous
I could find online a reseller, but since you bought one, It feels better to go with your source
 
@samayo My source is a retail store in Florida
 
@Wes I was working on my "test" application last night...when a repository effectively negates the possibility that you're going to get a different object...is it acceptable practice to pass the repository rather than the object itself as a dependency?
 
Wes
pass the repository to what?
 
Another object...a controller...whatever. Anywhere, really.
Let me write out a specific question.
 
Wes
8:34 PM
ok i get what you mean. no, you shouldn't pass the repository around
 
Actually...in the process of writing that question I realized you shouldn't do that.
Ruins the point of injecting the dependency because the constructor will appear to grab that dependency by magic if it uses the repository itself.
 
Wes
the aggregates should contain all the data they need. you give them the data beforehand, they don't ask it to a repository
 
Different way of saying what I just said...I think.
 
Either way, you seem to be gathering "Tell, Don't Ask", so that's good
 
Follow Up Question: Aggregates seem to be a centralized control of a group of objects...that means they could forseeably have a BUNCH of dependencies.
Do you usually have DICs apart from the repositories?
@Dereleased Yeah. I think not knowing a lot about dependency injection made it REALLY difficult to understand DDD. I had seen people do constructor injection in code examples...it just didn't click that the main thing is not the injection, it's the inversion of control.
 
Wes
8:41 PM
domain objects should contain just the data they represent and the functions to manipulate it
i don't know what you think you'll need to inject to them
 
@Wes In a real world domain, what are a couple examples of aggregates you've picked?
 
Wes
?
 
Here's a good example.

Say I have an order aggregate root and this order has a bunch of line items. In active-record, I'd probably have a relation or a method which grabs them all for me from persistence.

In DDD...would I inject an array of line item objects retrieved from a repository into the aggregate? @Wes
 
Wes
no, it's the repository that does that
$orderRepo = new OrderRepo($orderFactory, $lineItemFactory);
the hydration of a persisted object is done in the repository (which is one for each aggregate)
or rather, in the data mapper
 
@Wes So on the outside, when I pull from the OrderRepo...it just magically has my line items in it.
@Wes Also, in your example wouldn't I inject something like $lineItemRepo rather than $lineItemFactory?
 
Wes
8:51 PM
$orderFactory = function($data){ new Order(...$data); };
$lineFactory = function($data){ new Line(...$data); };
$mapper = new MySQLOrderMapper(..., $orderFactory, $lineFactory);
$repository = new OrderRepository($mapper);
$order = $repository->get(23);
assert($order instanceof Order);
assert($order->getLines()[0] instanceof Line);
 
Won't I end up duplicating code in this mapper and the mapper for my line items?
Shouldn't the line items have their own repo/data-mapper? Perhaps injected into the MySQLOrderMapper?
 
Wes
the aggregate is indivisible. you never have two aggregates doing the same thing
i think the ddd community calls it overlapping aggregates
those are bad
 
@Wes But line items are subsidiary domain objects.
They don't get their own repos and data mappers?
 
Wes
no. for the reason you just noticed yourself... you don't want redundancy
 
@Wes But the line items will have a different class than order, won't they?
 
Wes
8:58 PM
"aggregates" implies different objects
 
Seems like you would end up with data mappers that were encapsulation for complicated procedural code?
 
Wes
data mappers contain just queries and the "hydration" code
 
@Wes Right. That "hydration" code could forseeably be quite a bit of code, though...right?
 
Wes
yeah could be a pain in the ass sometimes, basically you traverse the resultset and construct instances accordingly
that could be a lot of code yes... not hard code though
 
@Wes Do you remember when I was at my last job and I wrote that monstrosity that essentially created an aggregate?
 
Wes
9:03 PM
nop :P
 
It was manually merging two active-record "models" into one thing in a certain format. I had to do it a billion times in my application...so eventually I made a "helper" with a static method.
Essentially...I still have the write that logic SOMEWHERE...but better to put it in the data mapper and forget about it. Yeah?
 
@Wes so the data mappers should generally be aware of the internal structure of the objects they hydrate, yes?
 
Wes
there's not much logic here but it can be annoying because you likely have to do type conversion of primitives, create several objects, collect them one into the other
@Dereleased they just need to give the factory the correct data
 
9:28 PM
@Wes that looks like a mess
 
Wes
hydration should probably be done in the repository
 
9:49 PM
$array1 + $array2
and
array_merge($array1, $array2)

which could be faster?
 
Wes
they produce different results :P
 
regardless of index
 
\o
 
@Tiffany I'll be playing, ping me when/if you want to join! (out-of-context-guard)
... shit. that guard didn't work. anyway.
 
10:35 PM
Wish us luck: http://news.php.net/php.internals/100706 PHP PipeOp v2 https://t.co/p8Dt91vEtW
^^ @LeviMorrison
 
@Sara luck!
And you have my full support, obviously.
I've been hyper-productive at work recently; if I can now just transfer that productivity to my hobbies again then I can make rfc.php.net for a better formalization of our RFC process.
 
Wes
yeah that would be great to have youtube.com/watch?v=g3AA46GzNYc
 
x-post #php.pecl

adsr | Is there a reliable way to get the path of libphp7.so from php-config without parsing out the `--with-libdir`? A gentoo user has this php-config output
| https://pastebin.com/raw/qg8j7aRw and the module ends up at `/usr/lib64/php7.0/lib64/libphp7.so`
adsr | Side note, I can't even repro that install structure using --prefix=x, --libdir=x/lib, and --with-libdir=lib64.. Not sure what I'm missing
adsr | End goal is to write a cmake script that finds the correct linker flags for the embed SAPI
 
Wes
can i use it with new as well?
$o = new Foo() |> new Bar($$, "foo") |> new Qux("qux", $$);
 
10:52 PM
@Wes You didn't read it, obviously.
No $$. The RHS must be callable.
 
I like the new approach
 
Wes
yeah sorry didn't read it, i'm doing it now
um, what
why one argument only...
 
Because that's how piping works? Think about Unix shell, for instance.
$lhs |> $rhs becomes $rhs($lhs). That's it, there's the whole proposal.
If making single-arg functions suitable for the right-hand side is difficult that's a separate problem.
 
If >1 param is needed you can always wrap in a lambda
 
@Sara my only point of feedback is to double check precedence. I'm not entirely sure what is best, there; consult @NikiC perhaps.
 
Wes
10:58 PM
yeah i get it, but if i can't add arguments, it's not that big of an improvement
 
The |>= operator is missing from the proposal :)
 
@adsr doesn't that stuff normally go through pkgconfig?
 
$x = 'hi'; $x |>= 'strtoupper';
 
@Danack That was my first thought too but I couldn't find a .pc file for it.
@Wes Taking a function of arity N>1 and reducing it to arity 1 is a classic programming problem. If you can't do that you need to do some study and practice ^_^
 
make install on my setup does not add any pkg-config entries
 
11:02 PM
@tereško (or anyone hardware knowledgeable) not sure if that counts for stupid remote debugging, but I am just clueless about it. I have a geforce gt610 gpu (1gb), athlonII x4 cpu, 10gb of ram (two 4gb, one 2gb) and can barely hit 30 fps on Path of Exile on 800x600. I mean, I know this hardware sucks, but that is abysmally bad.
Can the mobo be bottlenecking something? is the disk having an effect?
 
Wes
@LeviMorrison yes but in the real world you sometimes use 2+ arguments
 
scratch that, 20fps is a good day, and there are like, no sprites on screen
 
@Wes So 1) don't use this syntax or 2) use a closure?
 
Prediction: If we let $$ in PHP now, PHP 9 will look like Perl
 
oh... the display is connected through a hdmi to display port iirc adapter
 
Wes
11:04 PM
@LeviMorrison a short closure? ah.... right
:P
 
(^_^)
That would make it nicer, yes.
 
$@ can be an alias for func_get_args etc
 
@FélixGagnon-Grenier when do you want to play?
Turn off multithreading
and maybe switch to Direct X 9
 
right now, or later, at your convenience
I'm presently making tests
 
Wes
what was the problem with $$
 
11:06 PM
I can be ready in like five or ten minutes, just need a drink
 
Path of Exile isn't the best optimized. It's alright, but could definitely be better
 
@Wes Needs more refinement than |> does.
And some people flatly thought it was ugly.
 
Wes
how about €€
how is that ugly :P
 
It would be a BC issue but I'd much prefer _
Stupid gettext
 
Wes
11:08 PM
i'd like one $ alone
but i don't mind two
 
literally fill-in-the-blank! $x |> func(_)
I could live with this, though: $x |> func($$)
 
@FélixGagnon-Grenier do you have Steam?
 
add me - Tylae
 
done, I'm fractalesque
o/
 
11:14 PM
says you're offline
 
yeah... i might have set it to always appear offline
I did not want people to know I play dress barbies while I'm supposed to work, y'know
 

« first day (2530 days earlier)      last day (2423 days later) »