« first day (3182 days earlier)      last day (1757 days later) » 

 
2 hours later…
2:14 AM
@ThW whats the point of the split keyboard?
 
burgeon to send forth new growth (such as buds or branches) : sprout
 
 
1 hour later…
3:27 AM
I haven't looked at the Juno spacecraft photos from Jupiter in a while. This one from late 2018 is spectacular. jpl.nasa.gov/spaceimages/details.php?id=PIA22692
This one looks like a painting. So awesome. jpl.nasa.gov/spaceimages/details.php?id=PIA21972
 
4:17 AM
Good moring
 
Morning
 
 
1 hour later…
5:43 AM
it reffers to the main funciton, which is not any funciton in the php – #78243
 
6:05 AM
Hello guys,
Need help with this question been 5 days still no answer :(
https://stackoverflow.com/questions/56801481/laravel-5-7-causing-error-on-selected-keyword-if-sent-through-post-only-in-liv
 
@RattleSnK What about your route?
 
morns
 
@BasheerAhmed It's a POST route to submit form data
 
@RattleSnK Route snippet?
 
ThW
@JBis more comfortable hand/arm positions
 
6:14 AM
morns..
 
@BasheerAhmed Route::post('/company/store',['uses' => 'Member\CompanyProfileController@store'])->name('company.store');
 
@RattleSnK Is it in a group routes?
 
using separate route file for member routes.
Route::prefix('member')
->name('member.')
->middleware('web','auth')
->namespace($this->namespace)
->group(base_path('routes/member.php'));
 
@RattleSnK I haven't used Laravel for a while but isn't this wrong "->name('member.')"? The dot(.) with the "member"
because laravel will explicitly explode the dot for a route..

Form::open(['action' => 'member.compay.store'])
 
@BasheerAhmed There's no issue with route, if you read my question, I provided a sample code in the question. The issue I am having is only with MYSQL reserved keywords in POST data
e.g Select, Insert, Update etc.
 
If I enter the following text in description of form datam,
"The raw material for shelled cooked Chinese chestnuts is fine selected from Yanshan chestnuts."

It'll cause the code to returned improper Laravel Whoops error,.
 
What if you enter something else?
 
Where as if I remove the "Selected" word from description, I can POST data normally, no issues at all
I managed an alternative solution by myself if you read the question. But It isn't the proper solution
 
You can debug the query if it is causing an issue with DB::enableQueryLog
 
As far as I debugged the problem, It's related to Laravel Request File. The query ain't even being executed. I read an article/Post which said if you use Eloquent, it won't have any issue with Mysql reserved words, and I am using Laravel Eloquent.
I think the execution stops and it returns error while creating Laravel Request Object.
 
Wes
6:38 AM
@JoeWatkins can i pcov on travis?
 
@RattleSnK Did you check if your webserver in production has some funky security features such as mod_security? Those are notorious for blocking sql-words in POSTs - meaning Laravel sees an empty post request and fails
 
@Wes yes, pecl install it
 
Wes
nice
 
@RattleSnK I don't really think that should cause an issue. There might be something else
What Laravel Request has to do with MYSQL reserved keywords?
 
@Sjon mod_security is disabled. I guess I should ask my hosting company (liquid web) to check this issue, maybe they could help me.
 
6:46 AM
@RattleSnK yup they can better help in term of server issues
 
Wes
i am working on a massive refactor on perhaps the bigger application i have (and possibly the only that is kinda well made :B)
basically, i am getting rid of all exceptions that are not exceptional. so basically i am doing a lot of work for no actual gain
 
@Wes does that mean there were a lot of try/catches for normal conditions?
 
Wes
so basically an error in a constructor can only be an exception, i can't have new Foo() returning something else, other than Foo, right @Sjon?
i focused on getting rid of validation errors, basically
now i pretty much have only things i would never catch if not for logging or similar low level stuff
i did that by wrapping new Foo in Foo::new(), which returns an union, Foo or FooError (which is not an exception, it's actually returned)
 
8:00 AM
sedulous involving or accomplished with careful perseverance
 
8:25 AM
I don't know how far 7.3.7 is from release - but I'm experiencing segfaults which I just started debugging
 
@Ocramius Can we create an object first and then pass it to the lazy loading factory as a param to the closure for the $wrappedObject instead of creating the object inside the closure in ProxyManager?
 
cmb
@Sjon, 7.3.7 release announcement is scheduled for tomorrow.
 
@cmb cheers - I'll ping you if I have more info
 
cmb
Thanks!
 
cmb
9:16 AM
@sjon, if in doubt check bugs.php.net/78230
 
@PeeHaa eyes @PeeHaa with suspicion
 
@cmb I don't think mine is opcache related. I have a BT from a debug-build, shall I report it? It seems to have something to do with string-allocations while shutting down
 
cmb
Yes, please file a bug report.
 
@cmb bugs.php.net/bug.php?id=78244 I have a core-dump but limited gdb skills.
 
cmb
@Sjon, is this a regression from 7.3.6?
 
9:26 AM
@cmb yes
since Archlinux already released 7.3.7 - our testing-environment has auto-upgraded and all our apps (same framework) fail
 
fpm segfaults in concat_function – #78244
 
cmb
9:43 AM
@Jeeves @Sjon, can you please double-check, that the issue occurs without opcache enabled (or with opcache.optimization_level=0x7FFEBF7F).
 
@cmb yeah I updated the report - it doesn't fault without opcache. Nikic also mentioned the same issue you did as probable fix
 
10:40 AM
I wished PHP had an ability to extend classes with interfaces (and an implementation) on the fly [possibly with the constraint that the extension must be defined before the actual class?]
that would make so much wrapping superfluous
and it would be trivially guaranteed that things are immediately compatible
@Ocramius ^ your thoughts?
I can easily imagine that composer could check for extensions first in the repos which declared something as a constraint.
 
10:56 AM
!!rfcs
 
11:11 AM
@NikiC re: bugs.php.net/bug.php?id=78244 - will 7.3.7 see an updated release and will distributions be notified?
 
@Sjon yes
 
@NikiC awesome
 
11:50 AM
o/
 
12:28 PM
> which is not any funciton in the php
 
12:44 PM
@bwoebi like go interfaces work?
 
@beberlei sort of, but explicitly name the interface being implemented
 
implement(Foo::class, Countable::class); sorts of?
 
nah, I meant more like class extension Foo implements Countable { function count() { return 10; /* strictly random number */ } }
 
aaah
more like ruby opening up a class
that would allow some extremely awesome, but also nasty stuff :P
 
@beberlei it sure does allow for nasty stuff. But I think it should thus be restricted to before definition of the actual class so that we don't get a runtime mess
 
12:49 PM
you could implement some nice extension in composer autoloader
 
1:02 PM
@beberlei I am just really unsure on whether I want to allow overrides or not
I tend to not allow it...
 
yeah it would be better if it just allows adding new methods
 
But then it would be sort of annoying if the class you want to extend with an interface has already a method of that name albeit with a slightly different signature
 
that's already kinda achievable with traits, no? 3v4l.org/bRoWi
 
maybe the solution would be to mold traits into classes at runtime
 
@pmmaga yes, but then you'd have to change your vendor code
 
@cmb yes, but restricted and native
componere is much more magic
 
uh is componere new? i have never seen that before
 
@beberlei I think it's from last year (by Joe)
docs are quite recent
 
@bwoebi ahh yeah, this would only solve it together with the implicit interfaces
 
joe is a machine in the extension department ;)
 
1:26 PM
Hello. I try to change php project file structure. And all paths in html now messed up. Is there a good practice or advice how to mange paths? Or I need to change paths in all files one by one? I think of some universal script that will handle all paths so I need to change only this one file...
Not only files but URLs as well.
 
> And all paths in html now messed up.
Why is that? Do you have your paths directly reaching individual php files?
Most projects normally have a 'front controller' that maps paths to what needs to be called to avoid (most) of that problem: github.com/PatrickLouys/no-framework-tutorial/blob/master/…
 
@Danack Yes, thanks for hint.
@Danack Right now I have a bunch of html and action scripts, and I try to structure it like real project.
 
1:53 PM
preg_split('/\R/', 'Техни') wrongly splits text into 2 parts – #78245
 
2:03 PM
\o
 
PHP segfault when running opcache in php 7.3.7 – #78246
 
2:21 PM
o/
 
Sam
hey guys, i was wondering... im utilizing this thing where the php file has a fetch and a post(not in the sentence of post request, just post text to a file) function, and i was wondering, everytime i post something, im making it have date("Y-n-j G:i") . " | " on the front. Is there a way to sort this out, that when im fetching, it only shows lines from the text file where date now (date("Y-n-j G:i")) is smaller than the lines in the text file?
tl;dr how to compare dates and show lines in text file where date < date in the text file
 
Hello guys, i wanna ask something. I am new to WordPress and I have task to add a document uploader in wordpress dashboard menus options, what will be the best way to do it ? plugin or there is any other way i can create template can i display template there ?
 
@Sam you almost certainly want to store the data (the actual text) and the metadata (the date) alongside each other, but not in the same file. What are you using to actually store the data?
 
Sam
i figured it out i think but thanks
 
@SayedMohdAli we don't have many wordpress users here. You may have more luck over at wordpress.stackexchange.com
 
Sam
2:35 PM
im going to split lines
and then split "|"
and then strtotime
 
1 min ago, by Danack
@Sam you almost certainly want to store the data (the actual text) and the metadata (the date) alongside each other, but not in the same file. What are you using to actually store the data?
 
Sam
i dont know what youre talking about tbh
metadata?
      $fgc = file_get_contents($ackfile);
      $tgl = "";
      $lines = explode("\n",$fgc);

      for ($i=0; $i < count($lines); $i++) {
        $sp = $lines[$i];
        $sp = explode(" | ", $sp);
        $flt = $sp[0];
        if(strtotime($flt) < strtotime($date("Y-n-j G:i"))){
          $tgl += $lines[$i]
        }
      }
i did it with this
 
morgens
@DaveRandom hola o/
 
Metadata is "data [information] that provides information about other data". Many distinct types of metadata exist, among these descriptive metadata, structural metadata, administrative metadata, reference metadata and statistical metadata. Descriptive metadata describes a resource for purposes such as discovery and identification. It can include elements such as title, abstract, author, and keywords. Structural metadata is metadata about containers of data and indicates how compound objects are put together, for example, how pages are ordered to form chapters. It describes the types, versions...
 
Sam
i know what metadata is, but its a plaintext file
and afaik file_get_contents doesnt put the metadata nowhere
 
2:50 PM
@DaveRandom 1) can I just PR against master of libdns to fix broken parts (calls to non visible ctors from functions) and 2) I am trying to get the data from nslookup pieterhordijk.com 127.0.0.1 uses the default decoder, but I only get:
object(DaveRandom\LibDNS\Records\QuestionRecord)#29 (3) {
  ["name":"DaveRandom\LibDNS\Records\Record":private]=>
  object(DaveRandom\Network\DomainName)#28 (1) {
    ["name"]=>
    string(22) "1.0.0.127.in-addr.arpa"
  }
  ["type":"DaveRandom\LibDNS\Records\Record":private]=>
  int(12)
  ["class":"DaveRandom\LibDNS\Records\Record":private]=>
  int(1)
}
How do I get the actual requested domain?
 
 
1 hour later…
purpose > money
 
Ah! Yeah, that went right over my head when I first read it. =/
 
4:32 PM
@PeeHaa heh thanks
 
@Fabor \o/
 
4:50 PM
Does anyone have any advice on viewing/documenting test coverage for stuff that includes tests that are not unit tests. e.g. I'm just writing an integration test that makes sure uncaught exceptions don't escape the app. How do I document that this test exists so that people can see that stuff is covered?
 
@Jimbo Ha! Nice! Wear a helmet. =)
 
5:53 PM
W00T! I got a B in Calculus!!!!!
So glad that class is over.
 
@Danack run phpunit twice with different coverage reports?
 
@beberlei The problems are i) how to view multiple coverage reports sanely ii) it's an integration test.....the code that phpunit calls does a http request to the server running in a docker container, so coverage is even generated.
 
@Danack coveralls?
 
@Danack oh that is tricky, you essentially need to start php coverage manually in the app and generate an output file per run, then merge them. I think there is tooling for that
 
@PeeHaa More semantically meaningful than that I think. e.g. be able to click 'see code covered by integration tests', and see what code is covered.....click 'see code covered by behat tests',......also same problem as before for integration tests.
@beberlei got any links?
> 'see code covered by integration tests'
didn't mean that.
Meant more....these are the http routes for the app....these are covered by these tests.
 
Wes
sup
 
@Danack and for merging github.com/sebastianbergmann/…
 
@beberlei hmm, so if I found or wrote a PSR7 middleware or similar, that generates coverage through the pcov extension, and then merged that in...it would allow coverage for integration tests to be shown at least.
 
@Danack You can do that
@Danack ah nope
 
6:29 PM
@Danack not sure if middlewar is necessary, just hack it into the index.php somehow :p but yes
 
I'm trying to think if there would be any need to communicate filename/testnames back and forth between the test runner and the coverage generator...
 
Wes
on that note, i kinda want constructors be able to return "errors" other than "$this" now
 
Also, what's a good name for the project.
Sep 13 '17 at 9:56, by Danack
@Wes Or just remove constructors.........
 
Wes
hm?
and use named constructors?
 
yes.
 
Wes
6:35 PM
except LSB
 
oho - this seems to do remote coverage....
 
Wes
function __construct(){ return; } // same as return $this;
function __construct(){ return NULL; } // actually returns NULL
function __construct(){ return new FooErrors($errors); } // returns validation result
function __construct(){ return $this; } // same as the first one
would it be too weird if this was possible? :B
 
yes.
 
Wes
and don't worry i am not going to rfc it. i still don't know what i think about it
 
I have separate validation classes fo that
 
Wes
6:40 PM
why is it weird?
 
or data enforced by types
 
ukrainegirlsdbh – #78247
 
@Wes because constructors are a mistake of programming language design. "Oooooh, lets make a type of function that has no possible way of indicating an error other than an exception. Aren't we clever?"
 
Wes
so let's fix that? :B
@PeeHaa so you have potentially invalid objects that you validate in other classes?
 
@Wes The fix is to use named constructors.
 
6:48 PM
@Wes no
 
Wes
@NikiC can't extend with a different signature
because LSB/inheritance checks
 
If anything is invalid in the ctor in that case the exception route is perfectly valid
 
@Wes Good point. Can be solved by not extending :P
 
Wes
also a good point :P
 
Wes
7:08 PM
maybe @Jimbo can tell us about golang constructors :B \o
 
7:20 PM
@Wes Just use a different name, problem solved.
 
7:51 PM
@Wes go doesn’t have constructors, they allow you to create the struct without any properties because they’re a bunch of nobs
Convention is New factory method
 
Wes
ah right
 
Make the struct private, so it can’t be initialised externally, provide an interface, and your New returns that interface. That way you can control initialisation just as you would a constructor
And then you don’t use exceptions for flow control, you return nil, error if it can’t be initialised
 
Good Morning
 
 
1 hour later…
9:18 PM
Any function to get the tenth of a number?
 
@Ghostff like a math function?
@Ghostff log 10 or something?
 
yeah.
 
Wes
wat
 
like 105 is 5 and 109 is 9.
 
Wes
9:24 PM
@Jimbo why do you think they are wrong
 
cmb
@Ghostff, $x % $y
 
@cmb thanks
 
Wes
is the remainder called tenth? :\
 
9:48 PM
@Wes it'd be called the ones and the tens (columns) if you really needed a phrase...
 
Wes
so he wanted the ones?
 
apprently so.
 

« first day (3182 days earlier)      last day (1757 days later) »