« first day (2363 days earlier)      last day (2810 days later) » 

16:00
When in use it's more like this...

$car = new Car();
$car->make = "NotAnAcceptedValue";
if ($car->isValid())
  $car->save();
else
  echo "You done messed up A-Aron.";
Wes
Wes
@JayIsTooCommon irk he gave me the money for the taxi and left
ew active record @Allenph
@Wes If I were to do it in the constructor there would be no difference. I would STILL have to see if the other model existed!
Which you said I wasn't supposed to do, right?
Wes
Wes
$car = new Car("ValidMake");
try{
    $car->setMake("InvalidMake");
}catch(CarInvalidMakeException $e){}
assert($car->getMake() === "ValidMake");
What's wrong with active record? Rails and Laravel are wrong?
Yes
Wes
Wes
16:02
yes.
You the kind that just use a query builder and do everything by hand?
Wes
Wes
i'm pretty sure i write less code than you @Allenph i can see already you like complicated things :D if it looks complicated it's not good code
There is more than one data access pattern in the world. ActiveRecord is no holy grail. And it's not an ORM.
@Wes I wasn't criticizing. I'm asking.
Wes
Wes
16:05
told you the other time too, it's an advice, not personal
I've only ever worked for myself until I got hired here, and this company is small and I'm the most senior dev here. (Not that I am a senior dev by any stretch of the imagination.)
I'm self-taught, and I've noticed that I seem to miss chunks of knowledge here and there.
Anonymous
@Allenph good for the ego but shit career wise
Then continue with ActiveRecord for now but also check the data access patterns found in PoEAA for a discussion
@JayIsTooCommon Ehh. They'll pay for my college if I want and I'm used to being in charge.
Although I hate being in charge. I want a mentor.
"If you are the smartest person in a room, you're in the wrong room"
Anonymous
16:08
^
^ Exactly.
Anonymous
this, so much this.
Must be hard to be @NikiC then
Wes
Wes
@pmmaga ...everybody leaves till no one is in the room
Does anyone know how the horizontal menu looks this way when moved down? builtwith.com
16:08
I wouldn't say I'm the smartest. One coworker is a front-end dev and he's fresh out of a bootcamp. He wrote the entire front-end SPA (Which is impressive for his skill level) but I'm basically having to redo the whole thing teaching him as I go.
The other guy is a back-end dev, but he's old and has been doing this 30-40 years and his give-a-shitter is broken. He doesn't use any framework, or have much knowledge of ORMs, MVC, etc.
Wes
Wes
he is probably the best :D
@Wes You wouldn't happen to have a public project I could study, do you?
@Wes He's a really good problem solver and hardly has to look at the docs for anything anymore. But he writes this crazy spaghetti code.
Wes
Wes
lol, i always give people the impression i know what i'm doing
@Wes You might not, but it seems like you know more about what you're doing than I know about what I'm doing.
Wes
Wes
i just pretend to know some words and developed some theories about software development, but i'm pretty much a noob too
16:12
Well shit.
Wes
Wes
being here helped
I'm glad I discovered these chats.
I like asking questions, but sometimes I need help understanding a paradigm or something, and it doesn't make a good SE question.
Wes only got 1k reputation. Hahahaha
I have way less. And almost all of it is from asking a billion questions.
Wes
Wes
@Gordon that's a lot considering the effort i put in it, i just wanted to join the chat basically
16:13
Most of which I look through now and want to die.
Anonymous
back off @Gordon.. not everyone had mod privileges to abuse..
I should have banned you when I was still able to.
Wes
Wes
@Gordon do you have 5 minutes? can you please run this phpunit pastebin.com/SQ8jyWRp and paste me the output. tyvm
I don't have phpunit installed
Any recommended books on DDD?
Wes
Wes
16:18
@Allenph DDD is a book
I haven't done any serious PHP in almost two years. All Java nowadays
@Allenph the blue one, the red one and DDD distilled
@Gordon I feel sorry for you.
@Allenph I like it. Helps to expand the horizon
@Trowski @kelunik @bwoebi Can you please suggest me how can I debug/find where is memory leak using AMP_v2 as server backend ??

I am leaking somewhere, I am getting un__destruct - ed objects
[Amp\Internal\Watcher] => 723
[Amp\Coroutine] => 2008
[Amp\Internal\PrivatePromise] => 2744
[Amp\Deferred] => 709
Wes
Wes
no probs @Gordon just looking for reassurance. this thing is driving me insane... i've been reading phpunit's code all day and i couldn't find anything that could cause that
16:20
My first language was Java and I almost immediately found greener pastures.
Wes
Wes
@PeeHaa friend help me. FRIEND
Java8 is nice
@Wes How are you?
:P
Wes
Wes
hi honey, do you have 5 minutes? :B
Sure babe
16:22
@Wes From my 7 seconds of reading DDD does not seem like an architecture but rather a way to break up features.
Wes
Wes
@PeeHaa pastebin.com/eiB44WeA can you run this and paste the output?
Extending phpunit. Brave
1 sec
Wes
Wes
you should read Expected: BAZ Actual: BAZ
Specific phpunit version?
Wes
Wes
6
16:24
k
Wes
Wes
thanks
What's your take on keeping primary keys for user ID's on Int vs Alphanum?
uhhhhmmm
> Class 'PHPUnit\Framework\Constraint\Constraint' not found
?
Wes
Wes
phpunit 6?
wait
composer fail
s/composer/peehaa
Wes
Wes
16:33
:B
There was 1 failure:

1) ShitTest::testShit
Failed asserting that failure desc.
Expected:
BAZ
Actual:
BAZ
@CoderDudeTwodee What possible advantage could you have for using alphanumeric primary keys?
@Leigh That's my question, is there any?
Wes
Wes
@PeeHaa now if you replace getDump with
protected function getDump($object): string{
    return print_r($object, true);
}
you'd think it would print the dump in place of "BAZ" but instead the error gets eaten by phpunit
Some people like GUIDs, I think they are second-class to unique integer identifiers per entity type
Wes
Wes
16:35
i can't understand exactly where phpunit decides to not print the error, and why
By error do you mean the text Expected etc?
@CoderDudeTwodee You can read an alternate opinion from one of the guys behind stack overflow - blog.codinghorror.com/primary-keys-ids-versus-guids (but he is also fond of Windows and SQL Server)
Wes
Wes
yes
@Leigh, I will be going with auto incremented numeric keys, can I enable indexes on two columns of a table?
I still have that text
Wes
Wes
16:37
what's the output?
@CoderDudeTwodee You can indeed, you can have composite primary keys
1 sec gisting
I have a phone and an email column, I will need to search them separately.
Sure, you'll want an index on everything you ever use in a WHERE or a JOIN
Wes
Wes
16:39
wtf. let me try .13
I will specifically need those two columns to be searched quite frequently, so I need the indexes on them both.
Wes
Wes
php version @PeeHaa ?
PHP 7.1.2 (cli) (built: Feb 14 2017 21:24:49) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.2, Copyright (c) 1999-2017, by Zend Technologies
Wes
Wes
PHPUnit 6.0.13 by Sebastian Bergmann and contributors.

Runtime: PHPDBG 7.1.3
Configuration: ..............

F 1 / 1 (100%)

Time: 361 ms, Memory: 6.00MB

There was 1 failure:

1) ShitTest::testShit

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
empty screen...
Are you running with a phpunit config?
Wes
Wes
16:43
yes
gimme
also index any field you use ORDER BY with
ty
Same working dump :P
Wes
Wes
wtf
can you try running it through phpdbg?
16:46
I am running it with phpdbg
phpdbg -qrr .\vendor\phpunit\phpunit\phpunit > test.txt
Could try without for shits and giggles
Same :-)
    {
        "name": "phpunit/phpunit",
        "version": "6.0.13",
For completeness
Hello. If I have an architectural question of how to build something, what's the most correct website between SO and Programmers.SE?
Totally going to guess / make up things now @Wes
Are you running with xdebug?
Wes
Wes
trying 7.1.2 @PeeHaa because i have 7.1.3
no xdebug
19
Q: Where should I ask software architecture / design questions?

brainydexterI often look for feedback about the design/software architecture for a given problem. Should I ask it on Stack Overflow, or is there a separate site that is dedicated for such things?

k
I will download .3 too
16:48
thank you @Leigh
7.1.3 also works fine for me
Wes
Wes
bloody hell
Say I wanted to do some stuff with an AST in C# -- is there a reasonably feasible way to compile a .so file from PHP exposing an entry point for getting and passing back the AST data structure?
Wes
Wes
no output even with 7.2
16:55
There is something really stupid going on on your side
Not sure if PEBKAC or something else
without scrolling up, xdebug?
you just run phpdbg phpunit with that ^ config right?
Wes
Wes
yes @PeeHaa
Wes
Wes
* 7.1.2
16:56
wtf
I don't know what else to say / do
:P
cc @Leigh
Wes
Wes
this must be the right time that i quit programming. so relaxing would be the life as a vagabond
@Dereleased Theoretically you might be able to use the embed sapi for that
Practically I'd just use a serializer and invoke the binary ^^
Wes
Wes
@PeeHaa are you running a custom php.ini? can you try with the default values?
@NikiC Was going with that until my boss got excited about the idea of removing that overhead. =/
Wes
Wes
17:01
26 mins ago, by Wes
@PeeHaa now if you replace getDump with
protected function getDump($object): string{
    return print_r($object, true);
}
you'd think it would print the dump in place of "BAZ" but instead the error gets eaten by phpunit
@Wes .2 was running custom ini .3 was running production as is
@NikiC the possible PR I was referring to was having an optional parameter to invoke zend_ast_process, if defined, on the AST before dumping the structure.
@Dereleased It sounds like "your boss" is the root cause of most of your problems :P
@NikiC Yeah, pretty much since the moment he decided he was going to be a resource on this project. Note, he's not a Team Lead or anything, he has a D level title. I think the poor guy misses coding. He's the main reason I'm doing any of this in C# at all.
@wes I don't even know if I'm helping, you asked for output :P gist.github.com/lt/38a226fc3a8d72bc7bb5033208051bb0
17:04
s/main/only/
@Dereleased Sounds reasonable. I'd suggest a $flags arg for FC
Wes
Wes
i get no output :( @Leigh
@Dereleased What's a D level title?
@NikiC Wise
@NikiC "Director of ..."
ah
17:07
@Wes Well 2:1 it's your environment rather than your code. Also PeeHaa is on Windows and I executed it with a ubuntu supplied PHP, nothing exotic loaded for me
Try it without loading your php.ini
Wes
Wes
i did, we both did
Hello Everybody. On my website there is this particular page where when i visit, the cursor is automatically placed on the first input field which is under the text. As a result when you visit the page, the page will automatically scroll down before scrolling up. How to deactivate that ? I have looked for everywhere where there is .focus(); to remove it but i dont now what i am missing. PLease this is the page

https://holyunions.com/how-to-use-this-website-language-en-tab-7
Sorry then :(
Can somebody help me solve it please ?
17:12
@Leigh W3Schools should not be trusted as a reliable resource. Click here to read why.
@ManOfGod Holy fuck that page is sloooooow
And yes what that great ape said
@Jeeves Stick it up your arse
@Leigh You mean person.
!!mdn autofocus
[ HTMLSelectElement.autofocus ] The HTMLSelectElement.autofocus property is a Boolean that reflects the autofocus HTML attribute, which indicates whether the associated select element will get input focus when the page loads, unless the user overrides it.
17:13
@PeeHaa Lol Please is there a way i can test the speed of my pages ? Because they look fast where i am but it seems you find it slow ?
@PeeHaa s/ape/great ape/
fixed it
Ah I see the problem
You are using wordpress
I like the two worms in the little red advert, worms are cute
Probably shit out of luck trying to fix thta
@Leigh :D
@PeeHaa U guys here are interesting :D Ok i have fixed my problem. Thank you all but now HOW do i test my website on a slow internet to find out whether it is slow or not and correct it ? Is there a tool ?
Wes
Wes
17:16
@PeeHaa this works
protected function getDump($object): string{
    return print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), TRUE);
}
google for pingdom tools @ManOfGod
@PeeHaa And the Great ape @Leigh Thank you all
Also, SpeedCurve
Wes
Wes
if i add DEBUG_BACKTRACE_PROVIDE_OBJECT it fails again
np
@Wes :|
Wes
Wes
17:17
there is something in the string that kills it
Do you have one of those bootleg php versions? :P
Wes
Wes
downloaded from windows.php.net...
so yeah, bootleg...
:B
Wait, you're using PHP Pro right?
Wes
Wes
trying char by char now.... return substr(print_r(debug_backtrace(), TRUE), 0, 20);
@PeeHaa try running the thing with a larger backtrace, like within 10-20 super calls
17:27
super calls? :P
parent?
careful, any more than 20 super calls and you end up in hyper call territoryu
it's dangerous because of the 5th dimension aspect, might get backtraces from parallel universes
I need to go home
I could do with some parallel processing though
parallel... universe... processing
Wes
Wes
@PeeHaa yeah, parent
ingenious
Wes
Wes
17:30
return substr(print_r(debug_backtrace(), TRUE), 0, 31201); this works
return substr(print_r(debug_backtrace(), TRUE), 0, 31202); this doesn't
If you get started now, you can work out a succinct API for dispatching async calls across dimensions before we discover how to communicate across them, you'll be one up
return print_r(debug_backtrace(), TRUE);
works just fine
@Leigh Imma be rich \o/
brb food
Wes
Wes
tried to change everything, i can only print max 31201 characters
the value doesn't seem to depend on memory limit or something
i'm dying
@NikiC would something as simple as this handle resolving all the constant expressions, and if so, would you accept this as one of the options/flags (in addition to the other) for my PR? Or is it getting too far out of hand for your taste? pastebin.com/aGyqnTXY
17:50
@Wes Really no clue what else to touch
Wes
Wes
@PeeHaa try one more thing please
sure
Wes
Wes
function additionalFailureDescription($other): string{
return str_repeat("x", 100000);
}
you should get a wall of x's, but you dont
if you try half of that it will work
@PeeHaa did your patch get sorted, I don't see it.
Cannot get rid of it ^
@Wes sec
Wes
Wes
17:57
so i'm sure now. the test runner for sure avoids printing big dumps on purpose, limit seems set to 62,000 bytes or something like that
Still works for me :P
Wes
Wes
with 100,000?
@Wes return str_repeat("x", 10000000);
@salathe booo :(
Wes
Wes
kill me, KILL ME
17:59
Will just have to live with the lingering patch I guess :P
Wes
Wes
it's not dramatic enough
6 messages moved to Trash
!!kill wes
@Wes BANG! BOOM! Rat-at-at-at-at-at-at-at! BOOM! You are now dead. Have a nice day.
Wes
Wes
ahahaha perfect
@PeeHaa for real you could print 10 millions x
if it's a joke it's not funny :B
18:03
Not joking
Wes
Wes
why it doesn't work :'(
And you are really sure you don't have xdebug installed?
gimme a php -v
php -v
Wes
Wes
yeah i don't
!!kill dave
Wes
Wes
18:04
php downloaded from windows.php.net
dave BANG! BOOM! Rat-at-at-at-at-at-at-at! BOOM! You are now dead. Have a nice day.
pfffff
Denied.
Wes
Wes
default php.ini
tried everything.
Just look up the name...
@Wes What os / shell?
Wes
Wes
18:05
win 7
@Wes for the sake of humouring @PeeHaa, can you pastebin a php -i?
Wes
Wes
and prompt
wait maybe prompt can't handle too big lines?
I am running powershell
Wes
Wes
how's that new shell for windows called
18:06
bash
Wes
Wes
never used that
how do i run it
Don't know if 7 also has it
start menu, type "power", click on it
system powering down
If not there by default it's available on win update
@PeeHaa if you run it on cmd what happens?
I can't be arsed setting it up myself if I don't have to
18:08
1 sec
Also works fine
I was expecting that, tbf
If cmd had issues with line length I would have run into that before now
Yes you certainly have length issues. You are like 3.5 meters tall
That's like 9 miles or something
11, actually
Wes
Wes
no change @PeeHaa :(
@DaveRandom is now here @Wes. For some reason he makes some good guesses sometimes
18:12
I highly doubt this is anything to do with phpunit, it would either be trimming it down or it would be visibly erroring
It's not likely to be a buffer overflow because it would probably have properly crashed at some point during the millions of times you have now tested it
Wes
Wes
it crashed once phpdbg
What if you ob_* and var_dump() @Wes?
Wes
Wes
tried, same thing
@Wes segfault (equivalent)?
Wes
Wes
just got the windows ui "program crashed"
i have no idea what a segfault is :B
18:15
can you look back through the system error log and find it?
ugh, I failed to brush my hair after I got out the shower this morning and now i have a small dreadlock :-/
Wes
Wes
will do, thanks all for trying to help. now i just need to get in the bed for 20 days drinking hard till i forget even what my name is
@DaveRandom ewwwwwwww
At least you found the shower this month you hippy
It's just hair, you know, the stuff you used to have
shit, /me is late, ttyl
@DaveRandom :P
laters sire
Schönen Abend noch
18:38
!!help
Built-in commands (* indicates admin-only):
 admin - Manage the bot's admin list. Use 'admin help' for details.
 *alias - Add a bash-style alias
 *approve - Approve the bot for talking in this room. Room owners only.
 *ban - Ban a user from interacting with the bot for a specified period of time
 command - Manage command mappings. Use 'command help' for details.
 help - Alias of 'command list'
 invite - Invite the bot to join a room. This can also be done through the chat web interface.
 *leave - Ask the bot to leave the room. Room owners only.
!!translate en Schönen Abend noch
@iroegbu Sorry, I don't speak Schönen
Schönen Abend noch (translated from German)
hmmmph
lol
18:43
!!reminders
Registered reminders are:
• @‌DaveRandom http://chat.stackoverflow.com/transcript/message/33706606#33706606 → Id: :33706826 → Saturday, 29th April 2017 12:01 (UTC) - Set by Gordon - Time left: 23 days, 17 hours, 17 minutes and 8 seconds
• what happens → Id: :35514705 → Thursday, 21st December 2017 00:00 (UTC) - Set by Trucy - Time left: 8 months, 15 days, 5 hours, 16 minutes and 8 seconds
• Happy PeeHaa day → Id: :35763899 → Wednesday, 21st February 2018 00:00 (UTC) - Set by Trucy - Time left: 10 months, 15 days, 5 hours, 16 minutes and 8 seconds
Maybe, it's broken - oh! it's not 28th yet
@iroegbu should be something along the lines of "it's still a nice evening"
my german is fucking rusty
@tereško have a good night
if that is the entire sentence, maybe (but without "good" or "night")
18:49
It works on Bing translate... Maybe, Jeeves is drunk
!!de Schönen Abend noch
@PeeHaa Sorry, I don't speak magic
I always forget how that works :P
Schönen Abend noch (translated from German)
imma give up now :P
18:52
Invalid free of persistent results on error/connection loss – #74376
!!it Schönen Abend noch
Schönen Abend noch (translated from German)
19:04
I think the bot died .. again
@kelunik @Trowski @bwoebi ping, \Amp\Coroutine is not __destruct - ed
!!uptime
╔══════════════════════════════════════════════════════════╗
║ [6 hours, 16 minutes and 55 seconds] without an accident ║
║               since [2017-04-05 12:57:11]                ║
╚══════════════════════════════════════════════════════════╝
19:27
null pointer deref and crash in zval_addref_p() – #74377
I think lxr.room11.org is down, btw...
cc @DaveRandom ^
2 days ago, by PeeHaa
Aaaaaand it's down
@kivlara Then you must be holding onto a promise reference somewhere, or a coroutine is not resolving.
If I'm building a php extension and I want it to use a particular dir for PHP lib files instead of whatever my system PHP is, what arg do I need to pass (I assume to) ./configure to set that up?
@Trowski I think somewhere in amphp/socket is the problem
@Trowski right now building an example
19:35
@kivlara That is very possible :-P
@Dereleased Imho out of scope. In any case it wouldn't work because the necessary apis are not dll exported
@Trowski :<, i am using amp_v2 in production and my RAM is wasting very quickly! :)
@NikiC Yeah, already notice that. My paste now just says "/* nevermind */"
(If it doesn't have ZEND_API before it, you can't use it in extensions)
How much of a fight would you guys put up to add that pesky ZEND_API on a permanent basis? Failing that, I can probably bring myself to add 9 bytes on an as-needed basis
(this is why my question on ./configure btw)
found the help though, reading that
19:38
@kivlara There are only a couple coroutines in amphp/socket, so the possibilities are limited.
@Trowski, yep so why I am not sure :)
I am debugging right now, :)
19:50
It's up again @tpunt
Which one is correct?
- Some kind of expriences are totally enough per life
- Some experiences are totally enough for once in a lifetime
latter

« first day (2363 days earlier)      last day (2810 days later) »