« first day (1384 days earlier)      last day (3790 days later) » 

14:00
i am working on changing description below site name(suppose www.example.com) on google page .anybody knows how this will be achieved?
user895378
And you could import only specific individual functions/classes/etc from a module instead of the whole thing if you wanted
@ircmaxell like nodejs module system?
Yeah, but that does not stop developer not to expose wrong classes from the lib, does it?
@rdlowrey import *; … at the top of every file, every problem solved.
@FlorianMargaine I'm biting my tongue at that comment... And no.
user895378
14:01
@bwoebi guess we'd need to implement an allofthethings keyword :)
@ircmaxell dunno much about python. And I like nodejs system.
importall
@rdlowrey the asterisk is fine ^^
user895378
allofthethings
user895378
:)
14:02
@NikiC nah, it's pretty much the same :) thanks for following up
It's like in C++, where everyone just writes using namespace std; (and makes his namespaces subnamespaces of std)
user895378
@Leri no it wouldn't, but that's a less pressing issue to me than having a usable import system to start.
@ircmaxell I don't like AMD.
@bwoebi "everyone" who isn't particularly good at C++, you mean to say.
14:05
@NikiC Usually when smaller things are written.
@bwoebi no one does that really, the people do that are the same people who do mysql_query("SELECT * FROM users WHERE ".$_GET['term'])
shame on you
@BenjaminGruenbaum Well put ;)
so compilation is slow... Like up to 30 seconds for some of the more complex functions (like mandel() from zend_bench.php)... But the code that's generated is amazingly fast... :-)
user924016
anyone know something that can read php class files and extract the public api, maybe in md?
14:06
@rdlowrey I don't know, how python actually loads things underneath, so can't really say anything about that. Well, anyway, I think that hardly solves problem why I want access modifiers. I.e. with php you can also use only things you need.
anybody plz
@ircmaxell because everything was optimized away? :P
@ircmaxell What about warming up and cooling functions?
simple()                2496.16301                         1.00000                        70.42320
mandel()                4124.63979                         1.00000                       350.30017
mandel_typed()           682.05620                         1.00000                        45.89964
mandel2()               17745.73646                         1.00000                       499.23105
mandel2_typed()         18296.73057                         1.00000                      1298.55959
That is, optimize and deoptimizing as you go, during program excution... you know
user895378
14:07
@Leri Well think of the difference this way. With a more pythonic system you wouldn't need autoloading. It's like if the use statement pulled in whatever you were using on its own automatically.
@NikiC not everything. When it's dependent upon user input, it can't be optimized away (since the "infinite loop" case could exist)
So, today I've created this monstrosity. Let alone the fact that I desperately need namespace aliases, how should I go about making this less tedious?
Like, if the compiler compiled at the time the code was really required, almost if it would compile... just in time :D
@BenjaminGruenbaum nah, I'd rather pre-compile and generate opcode which can be compiled on the fly
@Jefffrey In C# that'd be part of the object representing that item and validating it would be a part of model validation.
14:08
@Jefffrey You'll have a PersonValidator responsible for the validation keys
Or maybe just an array key validator
@ircmaxell how long does it take to compile a big program?
@BenjaminGruenbaum I'm only doing function level compilation right now
@ircmaxell contrary to what the internet tells you - so does V8.
It's not really a tracing JIT, neither is JSC and neither is JagerMonkey (they tried it for two versions and didn't pull it off).
@rdlowrey Oh, I see but as long as php does not know anything about possible location of used class/interface I doubt that's doable atm.
@Jefffrey well. What can I say. No params = excellent! 1 params = good, simple and clear method. two params is .. acceptable, but needs to be thought of. Three params is just bad. Well, without certain circumstances. Your method has 11 params ..
14:09
The only real practical tracing JIT I've seen is LuaJIT, everyone else is just lying about it :)
Oh, as for low hanging fruit, if you haven't - simple stuff like loop unrolling goes a long way.
@AlmaDo 3 params is bad? Wtf?
@Jimbo (:
"/var/www/html/fab/public/index.php" is forbidden (13: Permission denied), client: blah, server: fab.vm, request: "GET / HTTP/1.1", host: "fab.vm"
user895378
14:10
@Leri right, not doable now. That was my complaint -- a better module system would be needed :)
@AlmaDo You can see all except the first one to be a unique object. Yes, it should probably be a class.
CALL /me shoots @Jefffrey in the face
NGINX y u do dis!?
@PeeHaa uni project, I'm required to use that shit
user895378
@AlmaDo +1
14:11
Do they also tell you to fuck sanity and stop using brackets? ;)
-.-
Also why does that function do multiple things? @Jefffrey
That would be the first thing I would fix
@PeeHaa Because it's terrible.
@PeeHaa Brackets are for wussies :P
hth
@BenjaminGruenbaum yeah, I may get there... But for now, I don't have any concept of a loop ;-)
everything is compiled down to a conditional jump
14:13
I have ctor that has 23 arguments. :-)
@Jefffrey good thing you don't work where I work... :x
user895378
@Jefffrey Said the author of the apple goto fail that broke SSL/TLS for millions of people and exposed their private data.
@Jefffrey that's why you need to do "more OO". So to create "person" entity at least. No way you can do that some sane way with procedural code. Not that it's bad. But you'll end with something like this - because procedural code just .. have no "state".
@Leri yep. you should troll it's user with something like: "sorry, you have an error in 19-th parameter"
14:15
@AlmaDo Procedural code has state. What are you talking about
I mean, I guess I could unroll it at the AST level... But without SSA, I can't guarantee type safety... I could detect cycles in the SSA graph, and unroll them...
@Jefffrey well it doesn't, since there is no "state holder" (objects) there
@AlmaDo Meh, it's just crappy DI that injects only ctor of controller.
@Jefffrey again - it's not bad. It's just another way. But in terms of readability, maintainability, scalability.. well, just close your code, forget about it for ... 2 months. Then open again with need to real usage. You'll remember what was said here (:
also imagine that you have not ~50 lines of such code, but ~50.000. And..
@rdlowrey so, something like this makes the test code work as excepted, though my implementation is obviously full of holes and shady corners >D
14:19
@rdlowrey lol
@Jefffrey at the very very least separate your validation from your persistence... And please use brackets :/
@AlmaDo You don't really need OOP to have state.
You probably mean something else by "state".
probably
> // NOTE: This totally wrong, the thing is service provider does not return phone property as expected.
Should I remove this? Code might be public ^
@Patrick How would you organize it?
14:21
@Jefffrey okay, next thing: testability. And isolation. How would you isolate anything in terms of procedural code?
@ircmaxell people.csail.mit.edu/saman/student_thesis/petkov-01.pdf not what I remember, but looks reasonable.
user895378
@Jack It looks sensible. I would wonder if there's a measureable perf impact for such low-level functionality with arrays but I don't think anyone should really be manipulating the array's internal pointer that way in the first place. So screw them if it's a slightly slower to do the check :)
If you ever intend to do statistical learning in your JIT that'd be awesome.
(Yes yes, you don't have a JIT I get that)
@Jack mainly the else part is missing when nor array nor iterator
And remember, convincing you isn't my goal. I just have free time to waste, so I'm typing some of the words which I know randomly into this chat.
user895378
14:22
@BenjaminGruenbaum wooooooooah that would be sweet :)
@bwoebi inorite .. i love living on the edge hehe
@Danack Ever had an nginx issue 403 for all files including the nginx default? I've checked all the users are www-data and the files are in that group too. Still 403. ps aux has nginx master as root but worker as www-data. Same for fpm.
@AlmaDo If you are asking how would I test that function, I would go with: add_person(...) (with arguments that should trigger an exceptions) and add_person(x,...); $p = fetch_person(x); -> should succeed
@rdlowrey LuaJIT sweet.
user895378
There is no way to statistical learning. Statistical learning is The Way.
14:22
@bwoebi that will be polished out when i'm done with it.
@Jefffrey lots of different classes, like an entity, something for persistence, a validator.... But you don't seem to like that so do whatever you want...
@Jefffrey not bad
@Patrick Who says I don't like it? What do you mean for "validator"?
@Jimbo What's an array key validator?
@Jefffrey Takes two things, an array of keys you want in the array, and an array of keys you expect to be in the array
14:24
@Fabien nginxlibrary.com/403-forbidden-error check the execute permission bit?
@BenjaminGruenbaum fair enough... :-)
@Jefffrey something like that, instead of using functions github.com/symfony/Validator
@Danack Believe so.
drwxr-xr-x root root /
drwxr-xr-x root www-data var
drwxr-xr-x root www-data www
drwxr-xr-x root www-data html
drwxr-xr-x root www-data fab
drwxr-xr-x root www-data public
-rwxrwxrwx root www-data index.php
( ¯\_(ツ)_/¯)
@Jimbo Hmm. And what does it do?
14:26
fy markdown
@Jefffrey hm..
public function addPerson(Person $person, PersonValidator $validator)
{
   if($validator->validate($person))
   {
      return $this->addValidPerson($person);
   }
   throw new InvalidSomethingException('E_OOPS: your data failed');
}
@Fabien Why not just chmod 04777? :)
looks better? (:
14:27
@Jefffrey It's an object with the responsibility of asserting that the array you pass in contains the array keys you expect, and also are valid keys (right type, int, string etc)
@Fabien Do you have a location block that doesn't go through php, (e.g. css files) and are they working?
@AlmaDo I would argue PersonValidator would be a ctor arg
@Danack nginx's default. Not getting the nginx welcome page.
Same error
@AlmaDo I could do that by simply trying to push the data into the database and see it fail. The reason I have all those different exceptions is because I need a more specific error messaging.
ʕノ•ᴥ•ʔノ ︵ ┻━┻
14:28
@Jimbo well. depends. But that's a sample. right
Worth mentioning I saved a docker image. Loaded on to this new machine and ran the same run command.
Sure
@Patrick I see.
@Fabien You can probably investigate this quite easily with strace - it will show you the exact file operation that is failing.
not used strace before
14:29
@Jimbo I like in-place pass by several reasons (we've discussed that already today). For instance, you may pass "null-object" validator ("validator", which has: public function validate($obj) { return true; } and use that for testing)
of course you may do that with ctor as well, but here it's more flexible
@AlmaDo Or changeValidator(Validator $validator)... but when they're going to be validating multiple people, you would not want to pass in a validator each time
Still means that you'd have a validator interface for a ctor arg
right
so as I've stated: it depends
@AlmaDo I sense sarcasm.
:P
@Jefffrey just remember that I'm a troll .. ask @Jimbo if that's so (:
14:32
Oh yes I forgot @AlmaDo was a troll...
oh, you are a special guy, I see
Very special
@Jefffrey validate your input earlier.
10 mins ago, by Alma Do
And remember, convincing you isn't my goal. I just have free time to waste, so I'm typing some of the words which I know randomly into this chat.
(:
@Patrick has a fair point
@Jefffrey Your input shouldn't even be getting to the database stuff unless it's valid
14:33
@Patrick Yup, that's what I'm doing right now, in a terrible way.
okay, I was serious when discussing what's a good way to re-structure your code
so you have basically two ways: validator in ctor or as I've proposed, in-place parameter
I think I'll go with an immutable person class that validates at construction.
Using a validator array.
@Danack Changing nginx user to root works -_-
keep it mutable and validate somewhere else
otherwise how are you going to validate that for example 2 users don't have the same email?
root almighty
14:35
@Patrick The same email thing is a database issue
@Patrick The database layer guarantees that.
@Jimbo well, yes, but smells like leaky abstraction to me. I'm thinking ..
Hi everybody, I planning to make user editable pages with WYSIWYG editor and i dont know where should i save that data(HTML) in database or where?
@Jefffrey what if you have url slugs and multiple domains, they can be the same but only one per domain... Validation in the entity will fail at some point. Instead validate in the service that manipulates the person.
I just looking for advice or article
14:39
@VeeeneX yes, save it in the database. If performance becomes an issue you can always cache it
@Patrick Yeah, I'm using a PHPFastCache but is there another method?
@Patrick I see.
@Jack and your indentation is partially fucked up^^
ok ... this sucks
There's still a problem. I cannot have a single model (person) for both adding and retrieving a person.
Because the model of the person that I retrieve contains more fields that those set on creation.
14:42
@Jefffrey How is a person responsible for retrieving itself?
It's not.
How does that work even :P
I don't know where you read that. :/
@Jefffrey model is a layer. Person is an Entity (which is part of the model layer)
"Sign in with twitter is useless" - dev.twitter.com/disacussions/4019
14:43
@Prasanth Why?
I'm saying that the person class that I use for pushing a new person (add_person(new person(...))) cannot possibly be the same that is returned by the fetch_person function.
Anyone here with some sysadmin skill? There is a domain, that is managed on name.com. When client (?!) logged into that site. Said client supposedly updated the A entries .. but nothing has changes
@Jefffrey Your Person is dumb. It has only properties and getters / setters. It's an Entity. You query a your PersonRepository::findAll() and you get back an array of Person entities.
@tereško I think @DaveRandom knows what an A entry is
@tereško Did he reload the zonefile?
you might benefit from having a look at doctrine http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/
its far from perfect but way better than active record
14:44
52 secs ago, by Jefffrey
I'm saying that the person class that I use for pushing a new person (add_person(new person(...))) cannot possibly be the same that is returned by the fetch_person function.
hmm ...
Have you tried querying the nameservers directly?
Do you have access to the dns panel? @tereško
@tereško when was that? that stuff can take a long time :)
@Jefffrey addPerson(new Person(...)); is fine. fetchPerson($id); // returns Person is fine
What's up with that
Also whatsmydns.net @tereško
14:45
@Jimbo The person returned by fetchPerson contains more data than the one pushed.
@PeeHaa it doesn't return email address of the user.. that thread i posted is full of people coming and going away disappointed and still twitter doesn't do anything about this
@PeeHaa nope
@Prasanth Good
what I had ws 2 screenshots and PM breathing down my neck
Or better: to push a new person you need way less data than the one we retrieve from the database.
14:46
@Jefffrey What extra data does it have?
And how does it get it?
@Jefffrey how would it have more information than the information you provided?
IWe don't need more services that has access to userinfo. Also what does an emailaddress have to do with login functionality?
@Jimbo Statistics (number of posts), the entity ID, the account email, etc...
@tereško can you share the screenshots? info@{firstname}{lastname}.com
@Jefffrey So what's up with it having more data than when you put it in then?
14:47
@PeeHaa nope
because they are only on PMs laptop
Stupid PMs
@Jefffrey look at doctrine and how they solve this. You will learn a lot
What is the TTL on the records? @tereško
@Jimbo That you should need to set a bunch of things null and then you would have to check that those things are null on creation but not at retrieval.
4 hours
update was 5 hours ago ... supposedly
14:48
@Jefffrey Oh, are you talking about validation? On retrieval you only need to validate some, but on creation you need to validate extra info?
@tereško Could be router DNS cache
If it hasn't been suggested
@tereško Have you visited the domain before the change?
@Jefffrey The only time you need to do validation is on creation, that's all
@Jimbo No, validation has nothing to do with it. On retrieval I don't validate because it's an invariant of the database that the data is perfect once stored.
14:49
the IP that as in the A entry was not matching the current IP
@Jefffrey Okay, everything sounds good so far, I don't know what your issue is though :P
@tereško have you done an nslookup changing the nameserver
It's this dual face of the same model that is the problem.
use googles or something
@Jefffrey keep your logic in the code, not the database
14:51
@Patrick can't, it's a database course
course, class w/e
@Fabien I did "host -a site.com one.of.listed.nameservers.com"
it is not updating
it looks like the new entry is not propagating, because the zone file has not even been updated
@tereško What os?
name.com .. web interfae
What's the domain if you can share too?
just5.com
14:54
What's a change you made? See if I see old or new
I see neither
192.185.25.230 correct?
yes
that IP was NOT in the name.com's configuration settings
neither before nor after
in that case ask your teacher how he likes it...
also, maybe give this a read http://martinfowler.com/articles/dblogic.html
@tereško name.com settings have no effect on your domain
14:56
If you look in the network waterfall at first call of someone who is seeing the unchanged issue you can see Remote Address:
it's nameservers are pointed to something else.. see this
so those are NOT name.com's default nameservers ?
afaik no
da fuck
14:57
@Patrick By the way, why are we talking about the fact that logic shouldn't go into the database?
so , how would one configure them ?
@Patrick non sequitur
name.com should have an interface for changing nameservers.
gods below, I has this "debug by screenshot" bullshit
yeah , well ... they have , but how the hell would I know, what to put there ?!
Is it hosted at a new location?
14:59
@Jefffrey because your Person magically gets more information in the database that it didn't have when you saved it.
edit your nameservers to ns1.name.com, ns2.name.com, ns3.name.com, ns4.name.com
and then your records should start working
That website will have some FAQ somewhere with that info
transferring blah blah
@Patrick That's true even for a simple autoincrement ID field. And that has nothing to do with login being in the database.
15:01
@Jefffrey but that should not be a problem at all
Also taking advantage of the query abilities of SQL is not really "using logic in the database". I'm just querying more data.
There's no "logic" in querying the number of posts a user has posted or what his account email is.
Posting data to PHP from client-side. You can post an array via the name key on the input: name="data[]", but can you do this with the value? I want to post an array as the value
guys any one have a php opensource project that need bug fixes? i kinda have some time
15:05
@Jimbo AFAIK nope
But how are you posting that stuff?
@Jimbo Hmm?
@Jefffrey but that does not belong into your Person entity. Add a Post entity. Then add a one-to-many relationship between the two and then you can have a getter on the person to get the posts/the number of posts
What does posting value as array mean?
@PeeHaa Artax. It's okay, I'll post through as JSON :-)
github flow webinar starting in an hour @newrelic
15:06
@Jimbo Yes you should :)
@Jimbo post as yaml for extra wtfness
clarity* ;)
Inb4 someone wants to send YAML over AJAX
Actually I might post that as an SO question
@PeeHaa if you don't mind me asking.. do you have a full time job?
15:08
@PeeHaa How about soap xml? :-)
i just wonder how you get so much time to spend here.. i wish i could ;)
@Prasanth I'm self employed so... kinda I guess
@Leri :-)
cool
Omg I'm gonna lose rep
0
Q: How can I send YAML over AJAX?

Jimbo Please focus on the technical aspect of this question, and not on the why. The why is obvious: YAML is the most human-readable data serialization format available to man. And therefore, the best. How can I send YAML via an XMLHttpRequest from the client to the server, without first convertin...

15:16
@Jimbo I don't get why you shouldn't be able to send it. Just try it.
Also, I propose a AJAY becomes a thing
@bwoebi Meh, it's merely a troll question designed to annoy the Javascript guys ;)
@Jimbo really.
9 mins ago, by Jimbo
Inb4 someone wants to send YAML over AJAX
9 mins ago, by Jimbo
Actually I might post that as an SO question
@bwoebi But actually you have a fair point, you probably can, and the troll aspect disappears. Deleted :D
Now undeleted, because I got a +1
@bwoebi You absolute shit
You had to give it away didn't you
boo deleted
no I thought it was deleted
15:19
we can flag @bwoebi's comment so it gets removed :)
It's removed ;D
undeleted
He flagged it though
so I just submitted because I cannot submit on deleted questions…
Or close-voted
close-voted.
> You've earned the "Popular Question" badge (Asked a question with 1,000 views) for "Using a variable variable name in Visual Basic".
hahahahhaha
15:19
great xD
shame
Nooo, I close voted too
Upvote upvote :D
@bwoebi Btw I apologise for "you absolute shit". It's obvious no offence was meant
@ircmaxell Draft for AST RFC: wiki.php.net/rfc/abstract_syntax_tree
@Jimbo no problem, I know ;-)
What I actually meant was "ass cactus"
15:21
hehe
going on vacation tomorrow, so I'd like to put that out for discussion today
@NikiC Where to?
@Jimbo wait
I've seen that somewhere recently
@PeeHaa mallorca
@Jefffrey Did you manage to sort your problem out?
15:22
in Lounge<C++>, 5 hours ago, by Second Rikudo
@AlexM. YOU ABSOLUTE ASS-CACTUS!
@NikiC i hope you speak german :D
@SecondRikudo You judas!
@Jimbo I'm thinking about it.
@Patrick of course ^^
@NikiC It's actually faster. Nice. :o
15:23
@NikiC Oooh nice
Bets on how long NikiC can go without touching code?
@Jefffrey Nice find
@NikiC + infinity, really well written, and implemented
@NikiC wiki.php.net/rfc/… … well, this will break a few lines of my code. But that's really not an issue ;-)
15:26
@ircmaxell I feel like I didn't make a good case as to why the current code sucks.
@NikiC personally, I don't think you need to, but yeah, fair enough
I need this to be sufficiently convincing to warrant the additional memory usage during compile
For me personally "This is compilers 101" would be sufficient argument, but I guess that won't cut with internals :D
Yay, it's closed :-)
Just wondering, but is memory really critical during compile time? I think run time would be much more of an issue?
@bwoebi I don't think so
Any place where compile-time perf and mem matters use an opcode cache.
15:29
jup
Little problem: "No ending matching delimiter" on this small piece of code sandbox.onlinephpfunctions.com/code/…
@NikiC worth writing that explicitly (that the memory hit will only happen pre-cache
I want to match anything between the square brackets [ * ]
@bwoebi it can matter, if compilation takes an hour because it causes paging to kick in that's a very long feedback loop if your app is not practical with the current approach.
user895378
> Additionally the current compiler architecture prevents use from implementing
user895378
15:30
^ @NikiC typo
@tmyie You need to wrap it in a delimeter - e.g. #[(.*?)\]#
user895378
Or is it? Maybe not. I was thinking you meant, "us," but maybe not.
LIke this? preg_match('#[(.*?)]#', $s, $matches); (that has the same issue)
@rdlowrey I think it's a typo ^^ I didn't proof-read this
user895378
15:31
In any case, @NikiC, your English writing is always very well-polished.
@BenjaminGruenbaum we're writing PHP. Not a giant C++ app.
user895378
@Jimbo you can send anything you like in the entity body of an xmlhttprequest -- it's an HTTP request like any other.
I didn't actually expect a serious answer
@NikiC Is it really worth separating zend_ast and zend_ast_list?
15:36
@NikiC +eleventy billion
Sucks getting old issue where the old fix doesn't work.
strace all the things.
attach: ptrace(PTRACE_ATTACH, ...): Permission denied
sudo isn't a known command for this docker instance
user895378
15:41
@DaveRandom I've been trying to exfiltrate all the references to ext/filter in my code because it's not included when building PHP with --disable-all. You may or may not be interested in using inet_pton to check if something is an IP address instead of the filter_var method:
user895378
if (!$inAddr = @inet_pton($host)) {
    // not an IP address
} elseif (isset($inAddr['15')) {
    // IPv6 (128-bit)
} else {
    // IPv4 (32-bit)
}
@Fabien then run as root
It's a downward spiral of googling for every issue I run in to :p
XY
I am root
@tereško fyi that could take a long time (like, days) to propagate fully across the internet. Changing the NS without changing the registration tends not to invalidate caches through the usual methods, and a lot of servers put a very long ttl on the SOA of a domain that is not due to expire soon
That said... if they have set the name servers to something else it's probably been done for a reason, it's not something that people who don't know what they are doing tend to do. Better approach would be to update whatever record you need to change on the actual name server instead of pointing the name server to something else that may not contain all the other necessary records (other subdomains etc)
@rdlowrey That's a pretty niche requirement even for you, but I'm fine with that if that's the way you'd rather go
I mean really, who does --disable-all unless they are developing PHP? And who would try and run a far reaching process like Artax+friends on a dev build? (apart from you)
user895378
@DaveRandom it doesn't matter, I just find myself trying to build php quickly and then getting script failures because I'm missing filter_var() ... Don't feel like you have to do it -- I just prefer to use something that's part of the standard library and guaranteed to be available than something from an extension (even if it's a standard extension).
15:55
I think the real solution to that would be to include ext/filter in the standard build, seems like something that should always be there to me
user895378
<pedantry>Well it is part of the standard build, it's just an extension and not in the standard library.</pedantry>
user895378
inet_pton is part of PHP.
user895378
filter_var is part of an extension to PHP
You know what I mean :-P
user895378
Sorry :)
15:56
Although +1 for pedantry
user895378
Also, I was thinking about the circular dependency issue of Addr + Acesync and to me it makes sense to merge the two, but that's a concern for another day.
user895378
I may fiddle with pulling in Addr things to Acesync and adding an Acesync\resolve($host, $options) non-blocking function and a congruous sync version.

« first day (1384 days earlier)      last day (3790 days later) »