« first day (1427 days earlier)      last day (3537 days later) » 

12:10 AM
Anyone know how to handle Integer overflows like Java does? For example, a large number over 2147483647 would go to the min value 2147483648 and counting up again?
-2147483648*
oh nvm
Totally forgot about intval x-x
 
12:29 AM
@bwoebi i was hoping smart watches could power from body heat :D
@LeviMorrison As much as I would like ext/ereg to be gone, I don't believe there's a precedent for such a direct removal ... by moving it to PECL we put the fate of it in the hands of package maintainers; I guess the only question is who will maintain it once that happens.
bbiab
 
12:48 AM
@bwoebi does your arm look like this?
 
@crypticツ no, definitely not^^
 
why are those java byte approximation posts starred?
 
 
1 hour later…
2:09 AM
I need to insert new record, or update existing one if data in row not actual. How to make it more effectiveny(1. speed, 2. code accuracy)? Now I am using insert ignore..., update ... where.
*effective
 
2:53 AM
Is there a way to use strictly integer throughout all operations in PHP? For example, never turn it to a float, and instead display the overflowed negative value? Thanks
Like in Java, you can do

int i = -690939880;
i *= 134775813;

Then the value of i would then equal -2092836744 instead of an obnoxiously long number.
 
By custom functions only
 
How so?
It is displaying the float value as -2092836736, when I run through the operations. I don't know how to fix this.
It's supposed to be -2092836744.
 
Also. What is your system? 32 or 64?
 
64bit
 
$i = -690939880;
$i *= 134775813;
var_dump($i);
displays int(-93121984061122440)
 
3:00 AM
That's not the correct value
I need it to overflow
 
??? overflow over what? 32 bit sign integer?
 
Yes
That's how I'm getting -2092836744.
 
int what? int32 or int64?
 
int32
 
int32 .. well, modulo 2^31 i guess
 
3:03 AM
@Ja͢ck I'll try and get back to ya
thanks
 
Hey everyone !
 
@baseman101 it won't work well for negative though, you need different behaviour for each sign
strict integer calculations is not an easy thing with php :)
 
@Ja͢ck I wish it was more OOP like Java ;(. It'd be useful for stuff like this
Wouldn't it be interesting to see

int $i = 5;
echo $i;
 
What's OOP about int?
 
You're defining your variable as the Integer object
Can only be used as an integer
 
3:07 AM
Integer and int are different things.
Isn't Integer in Java 64-bit by default, btw?
 
I don't know
Yeah, I know they are different.
int i = new Integer(5);
int i = 5;
int is a primitive type
But nevermind that. This isn't the Java chat :P
 
No, it's not.
 
3:45 AM
hi
 
4:13 AM
Hey
 
 
1 hour later…
5:27 AM
morningz
@Ocramius watched that video ...
 
@JoeWatkins morning
yeah, it's mainly about the nice abstraction that they built around the AST
 
interesting view ...
 
Any of you in SF?
 
@JoeWatkins threaded { return str_repeat('foo', 1000); } - converts to a closure
 
there is a problem though, in the premise that nobody can write concurrent programs .... some of us have spent the last 10 years doing just that, almost explicitly that ... I'm not saying it's not great to have this very high level abstraction, but as a matter of fact I view it as restrictive, because I'm used to being able to make those choices for myself and used to getting it right ...
 
5:33 AM
@Anfurny San Francesco?
@JoeWatkins well, you have control over it if you want, but you shouldn't really need to
 
Yup @Ocramius
 
okay, to assert control over how "par" works, I then have to learn about whole new paradigms within scala, which scala is supposed to be helping me avoid, I don't know anything of scala, but the same is true in any language or abstraction of concurrency, the same can be said for my implementation of a pool, the same can be said for daniels implementation of async event loops ... I maintain that high level abstraction should be left to the programmer or more specifically library developers ...
 
@JoeWatkins ah, I was targeting you as "library developer" :|
 
and we have to work within the wrealms of what is possible ... the example threaded {} code above is very nice, but simply impossible today ...
 
Well, it could be possible via macros, if the AST stuff will allow it
 
5:38 AM
literally today, 7 lifts some barriers
 
even just $hyperWhateverPool->run(function () { ... }); would be awesum :D
super_closure could be a way to implement that, I suppose
hmm, guess I have to try pulling out my code generator shit again, and give it a run
:D
 
there's a really simple problem with doing it in php5, php7 lifts the restriction, we'll see similar stuff in pthreads when 7 is in production ...
 
ic
yeah, I'm probably too much oriented to what Lisachenko is doing
he's doing crazy things with the autoloader :D
 
where do I know him from ?
he's done pr's to pthreads I think, or bug reports ...
 
@JoeWatkins we've been talking a lot when he was working on GO-AOP-PHP and I was working on ProxyManager
he basically wrote a version of the autoloader that parses files at runtime and dumps them in a cache
after having them converted to add AOP point cuts
 
5:44 AM
morning gents
 
moanings @Ja͢ck
 
sup
 
moin @Jack
 
I was looking at man re_format .. turns out that posix regex has a few features i didn't know about :)
like [. .] and [= =]
 
5:46 AM
Good morning everyone!
 
@KamranAhmed TESTS!!!!!!!!!!1EISN!
 
So... like is valid range simple returns date1 < date2 ?
and isDate is like date construction via string but for older browsers?
 
@KamranAhmed Yes, it's not PHP.
 
@Ja͢ck that's true ...
 
hmm, not sure whether ext/ereg supports collation sequences ...
 
5:54 AM
Max and Min date... basically you could do this: new Date(Math.max(new Date("Jun 12 2014"), new Date("2014/1/11")))
your "implode" function already exists, it's called join in javascript
getInt is called parseInt in js
Trim also exists in JS
" test ".trim()
truncate exists as .substr
Sorry I feel like a huge downer here, but a lot of this stuff already exists in good helper functions or standard js @KamranAhmed
 
@Ja͢ck I read it wrong i.e. "Pee Ech Pee = Javascript" ;-)
 
@Anfurny `getInt()` would return 0 if NaN so won't disturb any calculations while parseInt returns NaN for non number params
`implode` yes it exists but nothing was getting to my mind so... ;-)
 
if I want to run the function against "Hello123" I expect "Hello" returned not "hello"
 
Also, looking at your maxDate function it looks like it fails with an empty array
 
6:06 AM
same here github.com/kamranahmedse/handy-js-functions/blob/master/… why lowercase when you are removing all non-numeric chars anyways.
 
@crypticツ thanks.. I'll fix this.. as most of the strings functions was a contribution and my bad I didn't carefully check em
 
So then parseInt(x) || 0
 
github.com/kamranahmedse/handy-js-functions/blob/master/… why are there commas and a hyphen in the regex? Also add A-Z to it and stop lowercasing again.
 
@Anfunny It'll return 0 if NaN found as NaN is considered as false
 
Right
Which is what you want
You said above you want 0 if NaN to not disturb calculations.
Anyways
If anybody is a PHP engineer in SF here at a cool company let me know
 
6:16 AM
@KamranAhmed you should fire wookiecooking for committing those =oP
 
@cryptic haha I'm planning on that. Let me find a gun first ;)
Actually, I just looked upon his streaks.. Just checked his commit history and I'm astonished see that :O
 
T-SQL is really wanting me to go to bed:
T-SQL, you so pretty (not) http://t.co/MosF7IbPEi
 
can someone have a look at this?
0
Q: Caching html, js, css, images on server side vs HTML5 cache manifest?

zigzag.bondI am new to caching. I have a simple static php website and I would like to cache JS, css, images on browser, so my question is what is the best way to achive this: 1) add expires in .htaccess for the files which I want to cache or 2) use HTML5 cache manifest I would like to know what ar...

 
kamranahmed.info/contribute-to-evolve
 
ThW
7:07 AM
Morning
 
7:46 AM
Morning
 
moin
 
Good Fry-day :)
 
8:02 AM
@tereško the breaker is finally out!
 
Moonrings and happy friday
 
@JoeWatkins Here's that amazing swag I picked up for you from PHP Hampshie
 
@HamZa yay
 
The breaker?
 
@Fabien Sweet!! #swag
 
8:11 AM
=]
 
@Fabien grrrrrr
 
@Fabien manhwa
 
@salathe with the assist
 
@rdlowrey have to made Artax compatible with composer? Or does it still require manual setup?
 
8:26 AM
Morning
/**
     * Finds and displays a Article entity.
     *
     * @Route("/{id}", name="admin_article_show")
     * @Method("GET")
     * @Template()
     */
    public function showAction($id) {

}
is this secure?
 
@StaticVariable what?
 
for
$entity = $em->getRepository('myBundle:login')->find($id);
 
@StaticVariable does the doc not say if the value passed is sanitized/escaped auto?
if not, no. =]
 
its not specified ....
 
posted on September 12, 2014 by kbironneau

/* by zalzasta */

 
8:40 AM
0
Q: Load Parent Model inside a Module Code Ignitor

Gayan ChathurangaStructure, models |Customer.php modules |--register |--controller/c1.php |--models How can call the parent Model Customer Inside the Register Module? Note: I have auto load the parent model already, but can not access $this->Customer (like this)

hey any solution?
guys...
 
@GayanChathuranga Don't use CodeIgniter. It's 2014 in case you haven't noticed
 
yes know, but this is already buit system
need to find a way
 
8:56 AM
@Fabien Got me... ass face.
@salathe You got me too!
Dafuq!
 
hello everyone....so.. my question is more looking for na advice, what is the best code editor for php, HTML, css and js ?
 
morniing!
 
Hey can you look at my problem please
 
"naked-pings" I MUST CLICK IT
 
@japa : sublime text
 
8:58 AM
13 mins ago, by Patrick
@GayanChathuranga Don't use CodeIgniter. It's 2014 in case you haven't noticed
 
@ Dan : yes, but I need a solution for this
 
many people say sublime..but how about codelobster?
 
@PeeHaa Mooooooooooooorning.
 
@GayanChathuranga Then figure one out? It will be hard to find someone willing to help you out in his free time for a very framework specific question about an old, deprecated and horribly written framework.
 
no one familiar or used here on CI?
 
9:02 AM
hey guys thank you for you advices, regards
 
@Japa PHPStorm or NetBeans
 
0
Q: Load Parent Model inside a Module Code Ignitor

Gayan ChathurangaStructure, models |Customer.php modules |--register |--controller/c1.php |--models How can call the parent Model Customer Inside the Register Module? Note: I have auto load the parent model already, but can not access $this->Customer (like this)

 
Don't spam.
 
thanks
 
@GayanChathuranga I don't know shite about CI (thankfully) so, I'm going to go ahead and guess: if Customer.php is actually defining class Customer { ... } then use whatever voodoo garbage CI uses to instantiate it. Normally, that'd be new Customer(...). If there's a service, it'd be $customerService->getNewCustomer();. If there's some magic to get that service it'd be getService('Customer')->getNewCustomer(); or something.
 
9:04 AM
I like sublime. But then I'm just too lazy to seriously consider alternatives :(
 
everyone back to work ...
 
@Japa PHPStorm == $, but worth it, NetBeans = free, but also worth it.
There might even be magic to get the service factory (provided that any of this is remotely correct) which might be get('ServiceFactory')->getService('CustomerService')->getCustomer() or something.
 
this is about HMVC architecture
 
So?
 
so I need calling parent model in side a module
 
9:07 AM
So, if it's a type, instantiate it, and it's dependencies.
 
already done
 
So then WTH is the problem?
 
I can do this from one module to another
but can not call parent model inside a module
 
Why? If you instantiate the necessary "things" and "services to work with those things", then your problem should be solved.
 
that's what I am looking for
 
9:11 AM
Also, "call parent model" means nothing; if you want to instantiate a type that represents an entity, then you just do that, through whatever means CI offers (see: voodoo garbage)
 
link please
 
link what?
Even with the voodoo magic that CI offers, you still need to be able to program problem solve as any developer would.
Check y'all.
 
mornings
 
9:22 AM
moin random one
 
fun morning =]
 
what time is that?
 
@salathe Before I bring it up on the list I just wanted to see if you know if there's any logic behind the somewhat randon spattering of brackets against entries here. There are things which do require brackets that don't have them (flow control construct keywords) and things which don't require brackets which do have them (exit, die)
@Petah The time when not only do you need to "get down", you also have to make that agonising choice between sitting in the back or front of the car
 
9:38 AM
hello
anybody can help me with linkedin?
Got stock on 2weeks
my job is on the line
 
@DaveRandom i have no idea what you are talking about
and i think thats a good thing
 
on the linkedin How do you post on JS version?
var url = 'https://api.linkedin.com/v1/jobs/1234123';
var methodType ='POST';
var bodyContent = 'test';

IN.API.Raw(url).method(methodType).body(bodyContent)
  .result( function(result) { alert('test'); } )
  .error(  function(error)  { /* do nothi*/ } );

}
 
hi guys
can anyone suggest a link where I can get some good tutorials to work with codeigniter
I have no previous experience with mvc in php but I have done abit of asp,net mvc and basic php html
 
@Gotalove Don't use codeigniter, it's deprecated
 
9:44 AM
@Gotalove there are no good tutorials on codeigniter
 
which one is a better framework
 
why?
 
@Gotalove learn php
 
i've been using CI for these 6years
 
9:45 AM
CI is great
 
nope
not imo
 
no no, no it isn't ...
 
Its a project am working on with a colleague and he was under the impression code igniter was easy to work with
 
@boyee lol... no
 
hahaha
so suggestions
 
9:46 AM
yes codeigniter is the best ever , promise
 
@Gotalove it is common to get sucked in by marketing and people who fabble
 
why use laravel
 
but the truth is it uscks =]
 
@RonniSkansing I do know some PHP its me ->GOtaLovePHP
 
9:47 AM
ci is balls
so is laravel
 
Still waiting for overall vote
 
What's the new hyped framework this month then?
 
yii?
yii is a great they say
 
@Petah so which framework do you use ?
 
static::yii
 
is shit ...
 
but nothing can make your world best at Codeigniter
 
whats the stable framework with least votedowms?
 
<?php
 
9:48 AM
yii and ci
 
Gotalove, Symfony does okay. Realistically your question is too open.
A framework is a choice you make not just between frameworks but about your application.
 
symfony is greaT? i haven't tried that
 
modules are the key
 
what does your application does?
 
why pick a framework when you can pick interoperable modules
 
9:49 AM
My advice is don't use any framework when you're doing personal projects.
 
willknow which is fits to your qualities needs
 
@Gotalove Don't use a framework. Just use composer for all your dependencies and wire things together like for example github.com/PatrickLouys/example/blob/master/src/Bootstrap.php (not a perfect example by far but you'll get the idea)
 
@Patrick
Its a joint project
 
so what?
 
@Petah lol ...
 
9:50 AM
now these days they use wp and magento stuff
 
The other guy asked what framework to use I said aaah.... I dont know I always use notepad ++ :-P
 
@Gotalove we do the same at work, we are running custom php now (started with a shitty codeigniter codebase)
 
if you like to go the markets trend today
use magento
or drupal
 
Hahaha
 
can make you rich in no time
 
9:51 AM
@boyee all of them have oversaturated marked.
 
Just be prepared to get laughed at for asking Drupal questions here
From what I've seen, at any rate
 
@boyee are you a troll account?
 
@Magikaas There's one very decent programmer here who works with Drupal btw :P
 
@NullPoiиteя hahahaha
 
lols
jus sating
why ?
 
9:52 AM
@Fabien I work with Drupal, but it's being phased out in favour of C#'s Umbraco.
 
I work with all the shit
wp, laravel, drupal and all kinds of crap
 
The less I have to test whatever I am building in a browser the more fun it tends to be. (for me)
 
I avoid all of it, like the plague ... it's going well ...
 
hehe so cogeigniter is definitely crap
that seems unanimous
 
9:55 AM
whats the use case?
 
@DaveRandom It looks like brackets or not, is determined by how PhD renders that list of keywords (e.g. the isset docs look like any other function, whereas require doesn't)
@DaveRandom it's not like we deliberately chose parentheses for some and not others
@DaveRandom feel free to mention it on the list to get opinions... my preference would be to try to get rid of the parentheses entirely from that page
 
@salathe +1
It's obviously really not important, just someone at work brought it up yesterday
 
Yeah, that's just odd.
@DaveRandom The reasoning might be that it makes no sense to just have __halt_compiler ... unlike break for instance.
 
@Ja͢ck Yeh but no-one is going to use it without reading the docs for what it does
I think I've only ever seen it used once, and that was a pretty stupid use of it
more accurately, if someone does use it without reading the docs they deserve everything they get
 
Indeed, just bringing it up as a possible reason why it's like this now.
 
10:03 AM
hey guys any help on this:
http://stackoverflow.com/questions/25805578/why-the-zoomed-image-size-is-same-as-original-one
 
Btw, that regular expression to detect all keywords is awesomesauce lol
@Montiyago wait a little longer
 
@jack:ok
 
@Shell stop skulking :-P
 
@Ja͢ck which one?
 
10:11 AM
going to eat...
 
@Montiyago no one can help you with support on woocommerce plugins. We can help you with your code.. is there any?
 
@Gotalove I cant dare to do that
 
@RonniSkansing: sorry but i havn't
 
@HamZa This one :D
 
@JoeWatkins 737?
 
10:13 AM
:)
@Shell
 
Hey, can someone help me on my virtualhost problem? I am donig this but it results in failure.. paste.jesse-obrien.ca/vki
 
> 749
 
@Montiyago so what kind of help where you hoping for? =/
 
very funny stuff ... they must not get much done a railscamp ...
 
720 - Unpossible
 
10:14 AM
@RonniSkansing: i have uploaded my code there with my question .
 
007? Very dumb persmission for a spy! #linux http://t.co/Lqd3yoERw2
 
How to debugg where this problem can be for my virtualhost / http.conf file error/
 
@Montiyago I do not understand? "I have uploaded my code with my question". But the question still has no code?
 
@Duikboot Always in the error log
 
@JoeWatkins well... rails. Any distraction would be welcome, I imagine.
 
10:17 AM
@PeeHaa I found out that :
http://local.loyaltyplatform.com is not working but:
http://local.loyaltyplatform.com:8889 is working.
So I tried editing my virtualhots file doing: <VirtualHost 127.0.0.1:8889>
 
@RonniSkansing: is there any other forum??
 
i have install gitlab at my server and status looks fine but not getting login page i have also specified host url at sudo -e /etc/gitlab/gitlab.rb
 
someone mentioned doing gitlab setup the other day ... forgot who though ...
 
@NullPoiиteя How do you know the status is ok?
@Duikboot What port(s) does your server listen on?
 
it looks identical to here gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md (documentation )
 
10:24 AM
@NullPoiиteя Restart your server
 
8889
 
And by server I mean the actual machine
 
If you run your webserver on a non standard port i.e. 80 or 443 you always have to supply the port @Duikboot
 
i am getting above ^^ , let me ttry
 
10:25 AM
Restart the machine @NullPoiиteя
 
@Montiyago I do not understand... No forum can help you if you think you can solve it by installing plugins and clicking around the controlpanel. Digg into the code
 
@RonniSkansing: ok thnks buddy
 
lung-smoke, wet-and-naked, clean-fabric-wrapping, at-work, now all I have to do is wait to start drinking.
@crypticツ If nobody's said it yet, "ROOM 11 THUNDERDOME!"
 
@PeeHaa restarted the machine now getting 502 gitlab is not responding
 
@Ja͢ck nice
nitpick: \b also includes underscore, so we might need to add (?!_) and (?<!_) :P
 
10:43 AM
@NullPoiиteя Error log?
 
ohhh my server is using 99% ram
 
:P
 
going to uninstall it LOL
 
10:49 AM
:P
There is also some go selfhosted github alternative I have seen a while ago. Maybe that's something for you (not sure about system requirements)
 
i would love to know about them
 
@NullPoiиteя +1,000,000 for gogs.io
8
 
awesome ...thanks
 
damnit @salathe
 
10:51 AM
*wins*
 
:-)
 
@salathe INSTA(STAR|DOWNLOAD)
 
Those were my stars!!!!!!!! :(
:P
 

« first day (1427 days earlier)      last day (3537 days later) »