« first day (1656 days earlier)      last day (3518 days later) » 

00:04
why don't people like if you flag swearers?
00:14
./sapi/cli/php -r '$a = 10; var_dump(($x ~> $x + $a)(5));'
int(15)
(still unstable … but first time something works ^^)
I just needed my own attaching logic^^
@bwoebi ah :D good choice, ==> is fugly and ~> looks cool
@marcio I'm first doing that and only later fiddling around with r/r conflicts in parser when using parenthesis…
(for multiple args)
Also… AST is nice.
reduce/reduce ???
yes
..., zend_ast_create_list(1, ZEND_AST_PARAM_LIST, zend_ast_create_ex(ZEND_AST_PARAM, 0, NULL, $1, NULL)), NULL, zend_ast_create(ZEND_AST_RETURN, $3), ...
I just can dynamically add nodes in parser with AST without fearing any compile-time implications
@marcio I called the token T_TILDED_ARROW … you have a better suggestion by chance? :-D
are the '(' ')' on arg list really necessary? $x, $y ~> $x + $y looks ok
00:25
@marcio fcall($x, $y ~> $x + $y) … yeah ;-)
right, T_TILDED_ARROW sounds fine
what happens when you:
./sapi/cli/php -r '$a = 10; var_dump(($a ~> $a * $a)(5));'
It'll set $a to 5 and return 25
they share the scope
ok, that's what I'd expect. I'm just asking because PHP.
[I still have to do some work to ensure that the variables are ported back to the original cv table]
I need to make attention that indirect references are copied to symbol table if parent scope is destroyed
It's not that simple as I imagined ^^
is there a ready to use internal function to check if a class name is valid ?
00:33
uhmm ($a) : int ~> $a * $a looks so weird.
@marcio not sure if I'll support return types there.
i'm digging with lxr.php.net but didn't find one yet
I don't really see how they make sense there.
@CodingInsane something using strspn … minute
good thank u :)
@bwoebi if you pass the short lambda as callback and we get function prototypes, the return type might become handy
(and sometimes necessary)
00:36
@marcio We can have callables without return types just be like a wildcard there
@CodingInsane define invalid?
@bwoebi only if the prototype does not specify any type
@marcio no, I mean… if prototype specifies a type, still accept callables without return type
@Danack a class that cannot be declared or used in PHP because it contains invalid characters
@marcio You IMO shouldn't be forced to define return types when using a library
They're nice for static analysis and catching bugs earlier
00:39
@bwoebi that would be very annoying, if I tell you "I want a callback that returns integer not an object" like ` callable() : int ` you better give me a compatible callback
otherwise I still will need to check if what you returned is really a int
@marcio no… in this case just let the EngineException bubble up
which you anyway would have … but just at call-time now.
but one of the points to have a function prototype is that I can know if the callback is compatible before executing it
eih… @marcio no. I mean that a callable is auto-promoted to return an int if it's passed to a parameter accepting a callable returning int
so, in strict mode, it'd fatal at return-time
@CodingInsane What Bweobi linked was only for autoloading - 3v4l.org/tXVpg
bascially run-time inferring of return type
@Danack look at what I liked him too…
@Danack there's a full-list of > 126 octals if you scroll right
00:44
@bwoebi you mean ($a) ~> $a would be augmented to ($a) : int ~> $a if passed to function(callable($a) : int ){ $a(); } ?
@marcio sure. That's why you specify the type. But you shouldn't have to. Especially with short-lambdas it'd make some sense…
@marcio yes.
huuuuu, I wasn't expecting this interaction between the callable types RFC and the short lambdas one, but seems reasonable at first.
@marcio That's a bit a coincidence… but yeah, makes sense^^
time for bed, I'll continue tomorrow on it…
I'm wondering if this would make sense for normal closures too... another dissonant topic on the list :P
@Danack lol i'm surprised this actually works i just needed to check if a class is valid before adding to the class_table because classes are loaded from an assembly and some internal classes have names like <PrivateImplementationDetails>{a64d.... or some other invalid names. i probably need to check for keywords as well
00:49
@marcio Yep. It's just more apparent with short Closures… but with normal Closure syntax already…
ok, I'm adding a "callback augmentation" section on draft and will do some research about other languages.
01:19
Does PHP have a string concatenation function? str_cat or str_append? I can't seem to find one.
i think it's called concat_function
i think you meant i user land nevermind :)
01:46
@ircmaxell I have function composition and algorithm composition working now in a way I think you'll like more.
Algorithm composition is just a particular form of function composition.
First given the definition of map (note that the input comes second):
function map(callable $fn, $input) {
    foreach ($input as $key => $value) {
        yield $key => $fn($value);
    }
}
And filter:
function filter(callable $fn, $input) {
    foreach ($input as $key => $value) {
        if ($fn($value)) {
            yield $key => $value;
        }
    }
}
To compose the algorithms you do this:
$algorithm = compose(
    bind($fqn('map'), function($value) {
        return $value * 2;
    }),
    bind($fqn('filter'), function($value): bool {
        return $value % 2 > 0;
    })
);
$algorithm([1,2,3]);
So far so good
That's it. That's the whole thing.
bind works probably how you would expect.
As does compose
01:50
$fqn is just a helper function here so I don't have to write __NAMESPACE__ . '\\map'
Yeah, compose is regular old composition:
function compose(callable $f, callable ...$callables): callable {
    $functions = func_get_args();
    return function(...$params) use($functions) {
        $f = array_pop($functions);
        $carry = $f(...$params);
        while (!empty($functions)) {
            $f = array_pop($functions);
            $carry = $f($carry);
        }
        return $carry;
    };
}
I've defined chain as well since the composition order of right-to-left is not what most people want:
function chain(callable $fn, callable ...$callables): callable {
    $functions = array_reverse(func_get_args());
    return compose(...$functions);
}
@ircmaxell Any complaints?
Hi. Does anybody know what unlikely actually do in Zephir?
@sectus It generates a better if/else structure in the generated C code.
(that is, if the condition really is unlikely)
I cannot imagine better if/else structure. Could you elaborate it?
02:00
@LeviMorrison not so far
@sectus It has to do with the way that the compiler generates the assembly.
Maybe this will help you:
47
Q: Why do we use __builtin_expect when a straightforward way is to use if-else

kingsmasher1I came across a #define in which they use __builtin_expect. After some googling i found in GNU documentation: — Built-in Function: long __builtin_expect (long exp, long c) You may use __builtin_expect to provide the compiler with branch prediction information. In general, you should prefer to ...

 
1 hour later…
03:05
@ircmaxell Preliminary repository: github.com/morrisonlevi/Algorithm
 
2 hours later…
05:09
good mornings
Anonymous
mornings
DON
DON
05:23
hi all good morning
0
Q: Javascript files in a requiered php does not work, but directly in the file does

TinmanI have an index.php file that requires a common head.php file, in the head.php file are several Javascript files, when trying it like that, the code looks fine in the source, but the files don't actually do anything to the document. (The .css file works fine though) If the Javascript files are p...

I am facing the exact same problem help me
DON
DON
@JoeWatkins any idea?
don't do that, if someone wants to answer your question, they will ...
DON
DON
okay sorry
05:45
@LeviMorrison gosh PHP is verbose!
(map (* 2) . filter (\n -> n `mod` 2 > 0)) [1, 2, 3]
That's the same thing in Haskell, where it's a one-liner
Same in PureScript, except replace . with <<<, and PureScript also has >>> for left-to-right composition
Or, even:
(map (* 2) . filter ((`mod` 2) . (> 0))) [1, 2, 3]
algorithm :: [Integral] -> [Integral]map (* 2) . filter ((`mod` 2) . (> 0))) [1, 2, 3]
er
-- optional type signature
algorithm :: [Integral] -> [Integral]
-- $ just means "parenthesise the remainder of the line"
algorithm = (map (* 2)) . filter $ (`mod` 2) . (> 0)

result = algorithm [1, 2, 3]
06:01
Hi, I am working on twitter api,
I am getting trends using this : $trend->name

But some contain #Hashtag and some without hashtag, How to Remove Hashtag from Trendsname if they contain.
Because search is showing blank results if searching with hash tags
K , solved myself !
06:20
Morning peeps
06:31
Is the coffee ready yet @SergeyTelshevsky ?
@Epodax 2 cups consumed already
can't start a day without that
@SergeyTelshevsky you and me both, I can barely figure out how to turn the computer on without a cup of coffee first.
Bas
Bas
Good morning. /o
Morning
Bas
Bas
sup?
06:44
Nothing much, waiting for the coffee machine to finish brewing.
Bas
Bas
oh nice, we have this automatic douwe egberts device here
Pretty nice.
moin
I too have tea making machines, one of them is 27, but has another job, another is newer, at only 10, but has to go to school half the day ...
hey yall, do you know if this would prevent php from displaying parse errors thru the cli:
PHP Startup: Unable to load dynamic library /usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so
that's not a parse error, read it again
06:47
im on a shared environment, made every change i could think of to the php.ini and .htaccess, but i cannot see parse errors from the cli
i know its not a parse error, im asking if it would prevent php from printing parse errors on the screen?
parse errors are displayed thru the web browser tho
no, it would just stop apc from working
kk, dont know what apc is so figured i'd ask.
lol
thanks
Bas
Bas
I had a question aswell, i'm in love with Java for web (Spring MVC). But what is it that makes Java so popular?
Or actually, why should we use it
06:49
maybe the code bails before it gets to emit a parse error when apc isn't loaded, look for !extension_loaded or something like that ...
is it possible that there is a system config that would prevent parse errors from printing on the cli? i dont understand why it prints on the browser
@Bas you should keep that on the down low ... java is extremely uncool, and nothing can change that ...
@JoeWatkins Does a tea brewer really need a education?
literally i can have a simple echo and omit the semicolon.. no parse error on cli. only thru browser
@Epodax this is my angle, but laws and whatever require it ...
Bas
Bas
06:50
@JoeWatkins What do you mean? Some people use it right? For projects that are really getting big.
Hah, that's some advanced laws for a tea brewer
@bas honestly i think what made java 'so cool' was the amount of money put into it for marketing
Bas
Bas
@RobMullins But what makes it so bad then?
its not bad either really, its just in my opinion i think there are better alternatives
Bas
Bas
Such as PHP?
06:52
debatable, .. hack, closer
@Bas well, that's never happened to me, I've worked on a fair number of big projects, and java projects ... java is a language you choose at first, in my experience ... there are things java can do that make it suitable for certain types of enterprise infrastructure, if you have that infrastructure in place and skills in your team can exploit it, you might decide to use java, but you still wouldn't talk about it ... because uncool ...
u have to weigh development time into the equation
Bas
Bas
Ah okay, so it's only used when a specific system will need it?
And if you have the money and right team?
a properly planned project, properly planned in the financial sense, has no reason to switch from say PHP to Java, PHP scales in a particular way (adding hardware), if you factor this into your equations while planning there will never be a need to switch languages at any point ... you have to operate at the scale of facebook or yahoo to make rewriting your entire platform in a different language financially justifiable
Bas
Bas
Ah okay, so if we're talking about a webshop, java is defintly a no go?
06:56
not definitely, I've used java for the backend of a web service before ... never say never ...
Bas
Bas
Hmm, could you give a few examples where you should use it for and where you shouldn't?
when you need native multithreaded support, for example
although, people may argue for php pthreads
Bas
Bas
a multithread support, do i have to think about a big chatbox?
well ... no ... because that's not how it works, every project is different, you shouldn't go in thinking "I'm gonna use PHP" or "I'm gonna use Java", you should see what you are presented with and plan with as much language agnosticism as possible, until you are so far along in your planning that you start to see where your application can take advantage of Java, or PHP, or Ruby, or Go, or C++, or C#, or whatever ...
(i use pthreads just fine, but there comes a point where i wonder if i am exceeding the limitations of php.... and then there are times when i wonder if php has any limitations lol
@JoeWatkins do you have any ideas on why php isnt printing parse errors on the cli, but prints them on the browser?
07:00
if I had them, you'd have heard them already, clueless sorry @RobMullins
I'm on school run now, I'll leave you in @PeeHaa's capable hands ...
lata
thanks
@RobMullins is it the same php version?
Bas
Bas
@JoeWatkins Sorry, i have to read that later, gotta build some hard disk in a laptop first. lol
@Patrick i assume so but now im getting a 500 error on the browser with no .htaccess or ini mods
i think this godaddy account was provision incorrectly
im moving my client off of aws so i dont have to pay the hosting, and now this is just a headache.
Bas
Bas
07:07
@JoeWatkins Alright, that was quick.
so you move him to a shared host? o.0
and don't assume things when you debug... check them
Bas
Bas
How do you learn these kind of things? Whether which language to choose?
lol a shared host works fine for our needs, its just a simple crud app. php -v shows 5.4.37, i cant run phpinfo() from the browser though
and unfortunately with godaddy, u cannot see apache logs at all
take that back, i might have them here in cpanel
a shared host has more issues than just performance...
outdated php versions, security issues (from others that you share with) etc
yeah i feel you, i don't think the client wants to pay for a vps though.
07:15
@RobMullins Probably a bit too late but godaddy is the worst provider you can possibly choose :)
@RobMullins You can get them for 12$/year. If he can't afford that, you should ditch him because you won't get paid either...
i realize that after getting off the phone with them. i used to work at hostgator, and they would have solved it
yeaaa but at the same time im not really admin-inclined, or atleast don't want to take the responsibility of server maintenance. i have enough of my own that i need to maintain
also, EIG is apparently getting investigated for fraud. their stock dumped 10% today, a firm gotham research posted some speculation
@RobMullins wow... sounds like you really care about your work...
why? because i'd rather have a webhost take care of the system side?
s/webhost/crappy shared host
07:24
i have to work with what i got here man
thanks anyway for your feedback
good mornings
Apr 8 at 8:35, by Joe Watkins
less than the cost of a cup of coffee a day for a vps ...
morning
@iroegbu aren't you sleeping
I'm at work already... got here around 7:35
07:33
wow, how much did you sleep
about 4hrs
how do you manage to work productively then?
it's normal for me to sleep 4hrs
good meurning!
'nin
sleep is for wimps
07:44
moion
@iroegbu how do you manage with so little? don't you feel tired?
sleep is for the weak
I've read in many places and doctors have said that if you sleep less than 6 hours or more than 9 you increase the chances of hearth attack and getting fatter
08:08
you really think blanket statements like that can be applied to all 7 billion of us @ziGi ?
Apart from a few genetic outliers? Probably yes.
Interestingly people who are sleep deprived often don't notice it because they are sleep deprived...
@JoeWatkins well, yes. It's like "I've read that people can't live without drinking for 3 days"
that's fair
Morning
08:12
FapOre
but I don't think you can apply it to sleep, how much you need to sleep depends on what you do, if you are a farmer and you work hard for fourteen hours every day and don't sleep for nine hours a night, maybe you die at 40 ...
moin fab
if you are completely inactive, and sleep for nine hours a night, maybe you die a 40 ... but you can't say everyone should sleep at least X amount, because it cannot really apply ...
exercise definitely adds to sleep needs. I can get by on six if I am sedentary, but need 8 when I do sports.
But there has been plenty of research to show that <6 and >9 is bad for you long term.
You can't say everyone, but you can say the vast majority...
but I remember reading recent articles advising that 4 hours a night, for an active adult is enough ...
@JoeWatkins article or scientific study?
08:17
article, but prompted by study, would have been on the bbc probably, can't find it now ...
you can still find articles with 6 and 9 as boundaries, that seems current ...
I can be wrong, seems I am :)
Hi guys
i have a question would that be okay?
on the facebook php sdk , is there any chance that you don't want to redirect using
$redirect = $facebook->getLoginUrl('blax2');
echo anchor($redirect,"login");
i dont to use this option i want that everyone i use this plugin it will just a php code
its hard to explain sorry
"i dont to use this option i want that everyone i use this plugin it will just a php code"
can't make sense of this sentence
i'll just explain in a programming way , because its hard to explain in english dialect sorry
so our system uses social media facebook module then , on our site once you login on our php site , you automatically post the users time in the facebook groups for the board directors
facebook output would be
groups director : user1 has login on april 29 2015 6am
so this is okay
but when i combine the login system + social media the only thing which is a huge problem to me is that the user must login to her/his facebook account
i just wanted a functions like postonfb(token,secret,noredirect,"user1 has login on april 29 2015 6am ");
the facebook api url needs you to redirect to a facebook page
to login
is there a way that you dont need to redirect to a facebook page just to confirm any permissions?
just a token display only
08:35
No of course not
i have a token , oath , secret key
WHat kind of token?
the fb token the oath secret key
oach token
posted on April 29, 2015 by kbironneau

/* by guybrush117 */

which is generated on the developer facebook
08:36
request token? access token? offline token?
The last one is removed btw AFAIK
yes
yes?
You might as well have said 42
is there an sdk facebook php that auto accepts permissions?
likes no need to confirm
Of course not
since i already have the sdks secret key and api key
08:40
/me gives up
haha
sorry
so in other words they must required to activate permission to fb right?
sorry my end clients are non-techy
thanks @PeeHaa makes since
they are like homosapiens
^ me, every day
moin
they like automatic hehe , because there lazy to acccept any actions , haha
Mogguh @DaveRandom
If Moore's Law were sustained on it's current trajectory, in just 250 years, the energy it would take to wipe registers would exceed the total energy of the universe ...
08:43
@JoeWatkins Aren't we already failing to meet Moore's law for a couple of years now?
At least that is what I think when I see e.g. CPU speeds. Or is that some other limitation?
@JoeWatkins But what about the dark energy???
the actual law is about the number of transistors on a die, the speed of a cpu was a side effect when things were simple, I think it holds true for manufacturing processes
@boyee are you Filipino?
@JoeWatkins Yeah, but I thought that the number of transistors is pretty fucking hard to gain much as of late
Might be completely wrong about that one though
lets look, how many transistors you got ?
08:47
10
:-)
I got 2.6 billion, I counted ...
singaporean la
you're a quick counter Joe
08:50
The transistor count of a device is the number of transistors in the device. Transistor count is the most common measure of integrated circuit size. According to Moore's Law, the transistor count of the integrated circuits doubles approximately every two years. On most modern microprocessors, the majority of transistors are contained in caches. In fact, IBM's Storage Controller at 7.1 billion transistors with 480 MB L4 cache in 2015, is bigger than any microprocessor before, on both counts; it is however not a CPU until combined with one (or more) of its companion IBM z13 microprocessor chip. That...
i love Filipino
pretty out of date graphic ...
Can anyone suggest me a good way to understand why there around 150 requests that are expiring per day on an IIS installed on the server, most of the requests have similar source
i got it cool
Anonymous
@PeeHaa How did you get that crap site strawpoll.me to work?
Anonymous
09:04
Too slow, and the button does nothing.
Get a normal internet connection
Anonymous
the button does not work.
Anonymous
I am on a wifi network.
0
Q: A Router I coded

Hassan AlthafThis is router I created for use, however, I wish to refactor this code and make this more robust. I would really appreciate anyone who can: Point out how to make this code more robust, clean and flexible. Point out where code can be refactored and possibly how. Point out how the code could be ...

Anonymous
try it again.
09:05
Bounty^^
@samaYo Works fine for me
Mogguh @Jimbo
Anonymous
Maybe it's a browser issue. I am using Firefox, I will try with chrome :/
Anonymous
Nope, it doesn't work.
Anonymous
09:07
@Jimbo Can you test if strawpoll.me works?
Anonymous
creating a poll.
Anonymous
lol.
Anonymous
will just try with opera.
Anonymous
Oh, fuck. I am retarded.
Anonymous
09:11
Biggest TIFU ever.
Anonymous
@HassanAlthaf Why can't you check out any of the hundreds routes in github and just improve on that.
So our teacher said MariaDB > MySQL
Never used MariaDB, your thoughts?
yes
it's just a drop in replacement
Anonymous
@HamZa Used it for 6 months.
09:23
0
A: A Router I coded

JimboYou need to decide on the Domain Objects that represent concepts in your current model. A Route object should encapsulate the data to do with a route. If you look at Symfony's Route you'll see that it is simply an object with some properties, getters and setters, and that's about it (apart from ...

Anonymous
I didn't see any improvements, maybe that's because it's not too obvious. but it is just like mysql so you won't have any problems with the syntax or anything.
Had to google it
Anonymous
I am using postgres now, which I seem to like more than mysql/mariaDB
5
Q: What does "a drop in replacement" mean

MasroorPlease see the second response here. You should try xelatex which is almost a drop in replacement for latex. Leaving aside the technical part, which of no interest to the general audience here, I am interested in knowing what does this "almost a drop in replacement" mean? I have a genera...

Anonymous
I will just drop in and take a look myself.
09:26
@HamZa why did you link me that?
@CarrieKendall People really put the effort in don't they
@Patrick I didn't exactly know what "a drop in replacement" mean and I was surprised I found the answer on an SE site :)
@DaveRandom Can't I just create a new JS file without creating a project in phpstorm?
I only see the option to open an existing file
Dunno, never tried, looking now
@PeeHaa Have you tried "File > new"?
< Me has PyCharm open
09:33
blog.jetbrains.com/phpstorm/2014/09/quick-edits-with-phpstorm-8 <-- the "scratch file" thing is approximately what you want, but it does keep it in the same window as the currently open project (you can always drag the tab out into a new window, though)
@HamZa Not available when just opening phpshitstorm
Can't you just create the file in explorer and then open it though?
Sure I can :) Just odd
Agreed
Oh same on PyCharm, I had a project opened :)
09:36
"Dude Silex reminds me of Wordpress" -fml
Creating a socket server with python is super easy...
user4661379
10:01
hi all
user4661379
someone please help me
user4661379
-1
Q: How to extract, change and overwrite the image path for each element in an associative array in following scenario?

PHPNutI've an associative array titled $feeds (after executing print_r($feeds);) as follows : Note : The actual associative array $feeds is very large. For the understanding purpose I've only put one element from the huge array. Array ( [0] => Array ( [feed_image] => Array ...

what have you tried?
user4661379
I don't have any idea at all about how to do this.
> First of all I want to check whether the key ['feed_image'] is present in an associative array $feeds.
do you know how to do this in php?
10:11
Has anyone ever dealt with offline sync (from localstorage while offline to syncing with server when you come back online)? Using PHP server-side of course
Should be simple enough in theory, what specifically are you having difficulty with?
10:26
@FlorianMargaine You stumped him.
lol
Mar 18 at 12:28, by DaveRandom
There is an xkcd for literally any subject
Kinda like Rule 34
@DaveRandom They want bi-directional. Client goes offline, stuff on the server can keep going, then when client comes back up, there needs to be syncing. But all till functionality already exists, legacy code - it just has to be 'offline capable'
So, HTML5 localStorage <-> |REST|[PHP]|[MYSQL]
I'm just wondering if there are any already build solutions out there before I go writing my own
Found: Syncit, not at all simple
10:35
The part that's usually trickiest with things like this is determining who wins when a specific data dimension has been changed on both sides, everything else is just wiring. In the context of an existing application it's probably pretty complex wiring, but still only wiring.
Sounds a little like SSE
"only wiring" :P
10:57
-3
Q: Is Yahoo Phone Number UK 0800 086 8676 Yahoo Helpline Number UK?

Joy FernandisIs 0800-086-8676 UK Yahoo phone Number Technical Support Number? I need help with my Yahoo Email Account. I am not able to access my email account from the past 1 month, i know the password of my email account. But whenever i enter my password its telling that the user name or the password is i...

lol

« first day (1656 days earlier)      last day (3518 days later) »