« first day (1526 days earlier)      last day (3416 days later) » 
00:00 - 16:0016:00 - 00:00

Bas
4:00 PM
Hmm, i've been thinking about it and so far i've seen it till now it notices me that arrays are very unclear when you just see them.
In compilation to PHPMyadmin when looking to a database
 
@Bas sure, that's a problem voiced earlier, too. As you can see, each decision comes with pros and cons.
 
Bas
Indeed, but if i add clear documentation on every action then its fine for me
 
If you take an existing system to store your data, you don't have to create so much and it's normally instantly ready to use.
 
Bas
True.
And that'll be the arrays i guess
no extra services
 
If you write it your own you can either do it with documentation or most often even better, to write it down in code so that the code is speaking and has a clean interface.
 
4:03 PM
mornings
 
Bas
Yeah indeed.. trying to figure out a way for that now
Good morning ronnie
 
So now you've laid out the data structure you've to do the lookup with. I won't yet decide which kind of array or what not for the moment but to reflect not only which data you have but also what to do with that data.
 
Bas
Hmm, for all the vehicles where the price is getting setted by a specific fuel type and a weight.
I has to check if the car which is getting inputted is higher then a specific weight in the array
and lower then the one after that.
so lets say we've got a car which is 560 KG's
We need the 551 weight row
 
For example just thinking about the input parameters. I see three here: 1.) Type-Of-Car: one out of a set of 9 named types. 2.) Province (most likely again a fixed set of all province names of the netherlands or the route-tax-system of it) and 3.) Car-Weight of which I don't know if it follows a table of certain ranges or it's just a natural number with a unit of measurement.
 
Bas
4:06 PM
and the one next to that is 651
 
Okay, so you have got a rule here how to lookup by weight.
 
Bas
Indeed, with your statement, but not every vehicle type is looking to the fuel type or province
 
So the input parameters for the lookup operation vary by car-type.
However the overall lookup parameters and types are limited. You perhaps might want to give the table some love and make visible which parameters are required for input and which parameters are output only. This could be done with background colours for example.
 
1 message moved to bin
 
Bas
@hakre Do you mean in the code or in the users view? s
 
4:12 PM
I already told you in JS room:
in JavaScript , 5 mins ago, by PeeHaa
@user159870 Facebook has advanced tracking techniques. If it shows two naked guys it's because you like naked guys
 
@Bas From the operations view: The Lookup. You (the work to be done, the code to be written) lookup by some parameters (input) and then provide the lookup result (output).
 
Bas
Yeah indeed uhm, I need to figure out what my next step is. Do i gotta design the arrays? Like, do i need 9 different arrays (for 9 vehicles)?
Because when i have 9 different arrays, then i need to check which vehicle type it is, and then which array to search in
for the weight
 
technically you need a file parser for each file-type and a lookup operation for each way of looking up things. From the document you've created it looks like that you have four file-types and four different lookup operations.
 
Bas
Yeah exactly, i was first thinking about merging them together (the first two and th e last two)
They almost match, only thing is that the one has one more field.
But that was to hard for me atm xD
 
hello
Array ( [account:user] => Array ( [0] => index [1] => create [2] => delete ) [account:role] => Array ( [0] => delete ) )
this is an array
 
Bas
hello.
 
i have to change
 
Bas
Your damn right that's an array.
 
You're*
;)
 
Bas
4:29 PM
blast :C
 
i have to change array values to and value somethinfg with out loop
 
@PeeHaa enjoying the weekend? or working
 
why not both?
 
@RonniSkansing Enjoying the weekend. Looking for a small side project to do. Not sure yet what I want to do
 
@FlorianMargaine No idea, could be both [=
 
4:30 PM
@PeeHaa do you know pgp?
 
@FlorianMargaine A little. As in I know what it does / is used for
Why?
 
I'm making a chrome extension to use pgp on the web... for example for gmail
by using the local gpg installation on your computer
would you be interested?
 
Yea think so. Would be nice to look into
 
Bas
@hakre Indeed, but how would you name a file parser for different vehicles who has no relation with each other at all?
such as an car for persons, and a camping car
 
@PeeHaa I think I'll have something more useable tomorrow... the thing is, I'm doing it for miaou right now
 
4:33 PM
ProvinceWeightFuelPriceFileParser ?
 
and doing it for gmail would be a nice feature
 
Yeah sounds like a fun + useful project
 
the miaou content script is basically self contained in a folder
 
Bas
:P alright
 
I need to correctly do the background script, so that it handles communication with the native app
 
Bas
4:34 PM
WeightFuelPriceFileParser also.
 
@FlorianMargaine!
> // innerText préserve les \n contrairement à textContent...
...
 
oops, copy paste :P
 
;-)
 
Bas
Sorry for my late responses, currently learning the solo for Simple Man - Lynyrd Skynyrd
Some good music..
 
hello... has anyone from you ever used Google Cloud to host a php project?
 
4:36 PM
@user2491321 This sounds like something @hakre would have given a try
Not sure whether he actually did though
 
Bas
@hakre I assume these parsers will be written in JS? and then be passed to a php file
 
I am totally lost with google cloud.... actually I have create a social network in php and I use mysql to hold my database. I was trying to upload it to google cloud. Can I do this using only google app engine? does anybody now?
 
@Bas You could use v8 in php, but that may be overkill
 
@Bas err whatever you like. I would perhaps just extract the data from the original JS files with a parser written in PHP so you can automate that more easily.
 
Bas
@PeeHaa Whats v8?
@hakre Yeah same, but you cant read JS with PHP right?
 
4:40 PM
otherwise you would first need to get JS code running in your console which normally requires a js scripting engine like v8.
 
@Bas as long as JS is text you can read text with PHP. PHP does not parse JS code.
 
@hakre well, technically, it can...
 
Ow wait. I know what I can do tonight. Dick around with @NikiC's PHP parser thing! \o/
 
@PeeHaa and write a tool to ease the transition from php5 to php7?
 
Bas
4:41 PM
@hakre Yeah, but the data is given to me as an array. So i cant really parse that directly right?
 
@Bas well perhaps you just start with the parser. just the parser.
 
@FlorianMargaine @NikiC himself is already working on that IIRC, but yes something like that I am thinking about
 
you don't even care if it reads into an array or what not. just parsing the file and obtaining the values from it with the grouping preserved.
that perhaps answers the question(s) you're most curious about first ;)
 
Bas
Hmm, yeah. I wrote that already for one file right?
One type of file
the ProvinceWeightFuelPriceFileParser
 
lol ^ that is a proper long name :)
 
not necessarily
I'd rather have that than ProWgtFPFileParser
 
:P
Why not PWFPFI?
 
looks like WTF
 
Good good :D
@Bas Pro tip:
 
I read "brotip"...
 
4:46 PM
// this adds one to one
var i = 1 + 1;
Is not really needed
@FlorianMargaine Same thing in this case :)
Even more so when it is lying
    /*
     Convert it all to JSON and store it into an array
     */
    data.push(item);
Nothin is converted to json there
 
#brotip #justthetip
 
Bas
@PeeHaa Where did id o that then? And indeed, there was a small mistake in the documentation :p
 
The 1 + 1 example is just an example. You don't need all those comments in there
 
@PeeHaa given that JS's type conversion is even weirder than PHP's I think it's perfectly needed to add that comment ;)
 
hehehhehe no argument there whatsoever :D
 
Bas
4:48 PM
I think it's needed aswell, for me. It makes it more clear and easier to read.
 
@Gordon uh, sorry, but php is weirder
 
Nooooooooooooooooooooooooooooooooooooooooooo
{insert rabbit AHHAHAHAH nope meme}
:)
LANGUAGE FIGHT!
 
@FlorianMargaine no, it isnt.
in PHP "1"+1 is 2. In JS it's 11.
 
yes, and it's perfectly documented
seems normal that adding something to a string, if it can be converted to string, is coerced into a string
 
@FlorianMargaine so is PHP's type juggling :)
 
4:53 PM
both suck anyway
 
that's the right spirit :)
 
@Gordon That's due to the fuck up of not having a separate concatenate and addition operations rather than type shenanigans...
 
@Danack I know
 
Barely related:
 
Bas
5:05 PM
Brb. dinner
 
Enjoy
 
@Danack is it now better with some examples?
 
@bwoebi Yes. Out of interest, is it common for other libraries to have multiple statements enabled by default?
One of the nice things about not having it enabled is that it prevents some types of attacks. I'm just not used to it being enabled.
 
@Danack no idea. I believe it's disabled for PHP mysql exts by default because it makes sql-injections harder.
It doesn't prevent any attacks
 
btw you seem to like the keyword 'yield' a lot.
 
5:12 PM
That's by nature of Amp ;-)
Well, you could also have a callback hell with tons of ->when()'s…
 
@FlorianMargaine yes looks perfectly sane and understandable by an idiot (that's me) :-)
 
@bwoebi At the risk of another film reference you might not approve of - I like to think of 'when' as 'and then'
 
@PeeHaa cool
 
@Danack that's why yield and not "when/then"
 
6:11 PM
@Danack I used to think PHP was silly for having . and + be different. Nope, it's everything which didn't copy Perl that's wrong
 
6:24 PM
Hmm, I wonder if the pub will be busy on the Saturday evening before Christmas.
 
It should be filled with people in town, already sick of the family.
 
Actually, I think Bristol is the type of place people leave for Christmas.
 
@AndreaFaulds But PHP ought have used lower precedence for .
 
6:39 PM
@NikiC What precedence does PHP give it?
 
@AndreaFaulds Same as +-
 
Are you saying 'foo' . 1 + 2 . 'bar' should result in 'foo3bar'?
 
yes
 
yeah, I agree there
 
Incorrect . precedence is the primary reason why I use ,-echo
 
6:40 PM
That probably results in 2.
$ php -r "var_dump('foo' . 1 + 2 . 'bar');"
string(4) "2bar"
Ah, almost.
 
Or foo3?
 
if it worked backwards
i.e. was right-associative (I think?)
 
@bwoebi all ops are left assoc
well, apart from **, he's the weird kid
 
it's amazing how many code you can write to abstract $output = popen('git show --numstat HEAD~999..', 'r');
 
Bas
Back.
 
6:43 PM
I'm at twelve classes now.
 
@Gordon what are you doing wrong !?
 
@Gordon Just like bureaucracy, over-engineering knows no limits.
 
writing it in java?
 
Good evening
How's all doing?
Would it be beneficial to extract things like first_name and last_name combined with cell_phone to an Entities table then reference it in my Users table with entity_id?
 
@PaulCrovella yeah, kind of
 
6:46 PM
@Gordon Well then. How did you manage to shrink this to just 12 classes?
 
@NikiC I am not done yet ;)
 
7:24 PM
 
hi
anyone there ?
 
Nope, sorry.
 
:) need some help
anyone ?
 
7:44 PM
Jul 27 at 21:28, by Danack
Hello, I have a problem, but I am too lazy to write the question out until some says that they will help me. http://sol.gfxile.net/dontask.html
 
Maybe we should include that rule directly in the room description.
 
No one reads instructions :-P
 
@kelunik it's in the guidelines (room-11.github.io/#dont_3) that no-one reads :)
 
Other than eval, is there any way to generate anonymous functions dynamically in PHP?
 
Yes, because nobody wants to click that link. If it's included directly .. ;-)
 
7:49 PM
@Danack file_put_contents, require?
 
@Danack create_function()
 
@salathe This function internally performs an eval()
 
@Danack so?
 
@Danack what's the issue with eval()?
 
Not a real problem - just was wondering if there was a way of doing it programmatically. I guess it wouldn't be possible for the actual body code of the function, but having to generate a string for the function params and types, seems not as clean as it could be.
 
7:51 PM
@Danack xy?
 
yeah, sounds like xy...
 
Context:
$provider = new Auryn\Provider();
$executable = $provider->curry($callable, [':foo' => $fooValue]);
$executable(); //calls callable with the param $foo set to $fooValue
 
@Danack Where $callable is defined how?
 
@Danack you want to implement curry()?
 
Basically I just ran into a problem that was solved by manually currying a lot of callables to be parameterless to avoid having to pass the provider/injector around with them. It seems like something that should be part of a library.
@bwoebi yes.
@NikiC It's just an example:
$callable = function ($foo) {
            return $foo;
        };
 
7:55 PM
@Danack So, where does generating closure come in here?
Looks to me like you just gotta reflect to find the right param
 
so, what's the issue with a wrapping callable to call Provider::execute()?
 
Also, what is that I hear about passing an injector around?
 
@NikiC I want the curry function to return a closure that can be passed around and called by code that isn't aware of the injector or the parameters.
 
sorry for the delay. Actually its 1:30 in night here so i thought to ask. Anyway, Is it possible to change the tshirt color (png image) to any color user inputs with the help of GD lib. ?
 
>Also, what is that I hear about passing an injector around?
That's what I want to stop having to do.
@bwoebi Just means having to write code wherever the wrapping/determining of parameters takes place.
 
7:57 PM
@Danack well, you anyway need to do that implictly, maybe if it's just as the $this context of a wrapping Closure…
 
$newCallable = function(...$args) use($callable) {
    $pos = getPosOfParam($callable, 'foo');
    $args = array_splice($args, $pos, 0, ['fooValue']);
    return $callable(...$args);
}
Did I get that right?
 
@Danack, @salathe Is it possible to change the tshirt color (png image) to any color user inputs with the help of GD lib. ?
 
uh, the $args = in the above code is of course wrong. array_splice is an ugly in-place function
 
@Sajal I don't know about gd - but it's possible with imagick - phpimagick.com/Imagick/tintImage
 
@Danack ok. thanks for the info. I am going for it.
 
8:03 PM
@NikiC That sounds close - I'm possibly more tired than I thought, but that's close. There may be more than one arg that gets replaced, but the same thing should be workable.
 
@ircmaxell having worked for a hosting company I think they really have a point
Don't forget you have the php community and "consumers"
 
8:32 PM
Nothing preventing you from supporting multiple PHP versions
 
No sleeps until Christmas!
.@AndreaFaulds If you're an insomniac.
@AndreaFaulds here’s some coffee to help you ☕
@Ocramius ooh, why thank you, this is del- OH WAIT NOOOOOO
 
It's 20:34 there, no? O_o
 
That is the time here, yes.
 
already willing to sleep D:
The world is ending.
 
I'm not actually an insomniac (well, my sleep cycle is a bit broken just now, but I'll sleep at least four times before Christmas), and I'm not currently trying to fall asleep...
 
8:38 PM
What is a sleep cycle?
 
@Ocramius It's something you have to do to batteries to maintain their performance.
I think.
 
Evidence that I don’t have a sleep schedule: http://t.co/UIZyMIkwpe
 
@PeeHaa imo It is a pointing fingers game. They should point them at themself. Both parties, hosting companies and devs.
 
moin
 
morning @JoeWatkins;
 
8:46 PM
Hi guys , Can you help me with Apache my existing folders arent shown.
 
done 300 miles today in new car, no disasters ... a successful Saturday I think ...
also got new elephpant in the post ...
 
@VeeeneX 'arent shown' is a bit vague
 
=] ah congrats, I have been looking for real elephpants lately. Why all the traveling?
 
I mean ; folders are not shown in web browser
Fresh install no htaccess
 
pickup/drop off xmas presents
 
8:50 PM
Default http.conf
But some of them arent shown I checked permissions but without luck
 
I should have guessed [= yesterday a client asked me to write a user login with a buildin weakness..
 
seems a little crazy
 
buildin weakness?
 
@VeeeneX yea like.. as in, the cliented wanted to a "backdoor" kinda thingy
 
@krakjoe @php_net @official_php Current state of #phpdbg docs causes far more harm than help. Please help keep modern #php above reproach.
when was php above reproach ?
 
8:53 PM
Why? There are always backdoors
 
I declined.. Could have used the money, but it seemed wrong in so many levels..
 
:D
 
Snopping probably
 
:D
 
back to reading/writting... laters
 
that's a good point ...
 
 
2 hours later…
10:52 PM
@NikiC I do wonder if that's the case. Ask on a WordPress forum.
 
@AndreaFaulds You are a bad person.
You want to make things case insensitive.
You won't be getting presents from Santa.
 
@NikiC Case-insensitivity is silly, yes. But it's less silly than inconsistent case-sensitivity rules.
That makes me wonder. Does the uppercasing bit hack for ASCII work for Latin-1, too?
Yep! :o
Ooh
If you're from Germany, you may not have noticed the difference between Latin-1 and Latin-2
Since for German texts, the codepoints are the same
 
Who cares about Latin-N?
 
lisp has case insensitivity... somehow. it's all transformed back to uppercase by the reader
 
@NikiC nobody
@FlorianMargaine hah
 
11:02 PM
well, common lisp, that is
dunno about clojure or scheme
 
const π = M_PI;
 
I really wonder how people come up with case-insensitivity in programming languages
 
@NikiC Rasmus's reasoning was fairly sensible, actually.
 
I mean it's just more code to write and will be slower at runtime. Why not just be lazy?
@AndreaFaulds M_PI
 
At the time, people hadn't standardised on <HTML><LIKE><THIS> or <html><like><this>, so he allowed both.
And I suspect variables were the exception (being case-sensitive) because they contained request data
 
11:05 PM
@AndreaFaulds const τ = 2 * π;
 
@NikiC we could add implicit multiplication and be all mathematical
 
const ½Ï€ = Ï€/2;
 
user image
3
... relevant, I guess
 
@FlorianMargaine inverse square root two cubed epsilon pie?
OH
@FlorianMargaine i eight sum pi
 
got it now? :P
heh
 
11:07 PM
@FlorianMargaine :D
For the record: i is a very nice number.
 
I believe it's quite complex though.
2
 
@NikiC Let's add complex numbers to PHP!
(Or let's not, adding bigints is hard enough)
(help pls)
 
@AndreaFaulds numphp
 
@NikiC hah
 
Actually, doesn't sounds so bad
 
11:10 PM
?
 
Having some linalg and matplotlib bindings
 
@NikiC We could use that operator overloading that was added (by you IIRC)
 
Indeed
 
@AndreaFaulds relevant to internals thread: programmers.stackexchange.com/questions/1483/…
 
You know what'd make bigints easier? If they were merged into master before being complete
 
11:11 PM
Though we'd need better indexing and slicing support
 
Well, not just this answer, but the other too
 
Because then it'd be other people's job to keep it working
Rather than my job to resolve merge conflicts
Which are a frequent occurrence because phpng
 
@AndreaFaulds TSRMLS sounds like fun
 
@NikiC To be honest, that merge isn't that bad
Surprisingly few conflicts
My current pain is that Dmitry optimised the bitwise operators
An optimisation I have to undo, because it's incompatible with bigints (you can't free the copy if you don't know it's a copy)
 
@AndreaFaulds lol, he introduced a bunch of overloading bugs there ^^
 
11:14 PM
@NikiC And memleaks which I fixed
 
lots of c&p
 
@NikiC I made that mistake a few times when resolving merge conflicts
 
all that code looks very repetitive. We should macro out
 
@NikiC That'd be a good idea. You should see the bigints code, lotsa macros.
 
We might even function it out
 
11:16 PM
I also added macros to zend_operators.c, actually.
 
could even use such fancy things like return instead of a do/while/break pattern
 
With bigints, I only have a few things I need to do, actually: 1) Finish LibTomMath integration (almost done, just need to do bitwise ops and zend_dval_to_lval emulation), 2) fix tests, 3) update extensions, 4) opcache
Of those, only 4) is something I need help with
That and maybe the asm stuff I need to look at for Dmitry to be happy (performance...)
 
A good opportunity to learn you some x86 ;)
Well, more like an opportunity to learn that damn ugly __asm__ syntax
 
@NikiC If only GCC 5.0 was in widespread use released, then I could just use the intrinsics.
clang, being far superior to GCC, has had intrinsics for a while.
 
@AndreaFaulds GCC also had intrinsics before hand, they just weren't generic.
 
11:21 PM
@NikiC Not for overflow.
Can I cheat and just include the GCC 5.0 and clang intrinsics? That'd be easy-peasy.
I mean, GCC 5.0 will be out by the time PHP 7 is, right? :p
Oh, right, MSVC is a problem, hmm...
 
OIS
lo
 
@AndreaFaulds How sure are on that? I thought the fixed size builtins were available previously as well
Like __builtin_saddl_overflow for long
But I have no idea how to check it
GCC docs suck as much as GMP docs when it comes to telling you when something was introduced
 
I can see no evidence GCC had that before 5.0
clang did
> A new set of built-in functions for arithmetics with overflow checking has been added: __builtin_add_overflow, __builtin_sub_overflow and __builtin_mul_overflow and for compatibility with clang also other variants.
 
hm ok
 
11:33 PM
also, MSVC x64 doesn't support inline asm, I think
but also doesn't support intrinsics
so we're screwed there.
 
really amazing how bad support for overflow checking intrinsics is
An extra jo is all it needs...
 
really amazing how bad support for overflow checking is
Also appalling that people keep making languages which don't check overflow, despite the tiny performance costs.
Apple got something write: Swift checks by default
Oh, Counter-Strike calls. See yaz.
 
@AndreaFaulds The cost isn't tiny in the non-interpreted sector at least
 
@NikiC It's not as big as you think, and a lot of the cost is from compilers mis-optimising
 
It's not as small as you think either ;)
 
00:00 - 16:0016:00 - 00:00

« first day (1526 days earlier)      last day (3416 days later) »