« first day (1521 days earlier)      last day (3442 days later) » 

12:07 AM
I apparently have a hat now.
 
@PaulCrovella that sounds suspiciously like some stuff associated with "spirit science"
 
@DaveRandom Yeah......no-one should ever actually access it. It should be hidden away, but legacy reasons.
 
@tereško You do kinda expect it to return a small brass pyramid, just large enough to wear on the head.
 
seen those videos I take it
 
Mythbusters did a thing on it once
I won't spoil their findings for you
 
12:20 AM
@PaulCrovella I was referring this pile of endless wonder: youtube.com/user/TheSpiritScience
I stumbled upon this one via some guy who happened to debunk those in youtube
 
what in the crap am i watching
 
... careful, I can cause an aneurism
I recommend beer for insulation
 
I don't know if I'm having a stroke or hoping for one.
4
 
=)
 
12:42 AM
@PaulCrovella I actually lol'd
 
 
1 hour later…
2:04 AM
shitshow detected.
 
 
1 hour later…
3:31 AM
@AndreaFaulds There are 9 states (excluding error state) in a finite state machine for a JSON number. Thought that might interest you somehow ^^.
I drew up and implemented a state machine for it.
 
3:54 AM
INSERT INTO cart SET member_id='".$_SESSION['member_session']."', book_id='$id', session='".session_id()."', qty=1, price='$price', total=(qty * price) In this code, total is not getting the product of qty and price, any help?
 
well at first i'd guess that member_id, book_id, price and eventually also session are numeric values. but you use them as if they were strings
and you forgot the $-sign in front of qty and price
and arithmetic operations are not performed within string context
 
@LeviMorrison :)
 
and you shouldn't save redundant values in your database
it's quite likely that they'll sooner or later get out of sync
 
@LeviMorrison pre-sign, pre-dot, post-dot, pre-exponent-sign, post-exponent-sign... ?
 
instead just multiply qty and price when you query the values
 
4:04 AM
thanks, @foobar. Its working fine
 
and session and member_id also don't seem to be normalized
 
@AndreaFaulds I didn't name them; I just drew them out.
Implemented the transition function as a switch within a switch.
 
4:19 AM
@AndreaFaulds Does the Electric Boogaloo have a future? I actually like this approach, even though Zend casting currently has some issues.
 
(I used squares instead of circles for no real reason)
 
4:30 AM
@TheodoreBrown I have a draft RFC for it and intend to go forward with it. Dunno if it will pass.
 
@LeviMorrison That's pretty neat, reminds me somewhat of Crockford's railroad diagrams
Presumably the double rings are permissible final states
 
Yes, known as "accepting" or "final" states.
 
That's really cool though. State machines are fun!
 
I started feeling ill (although this time I am fairly confident it was something I ate) so I didn't work on the RFC.
 
4:37 AM
Though I never write state machime parsers myself, they're a pain
 
Eh, in some ways it makes things much simpler.
 
@LeviMorrison Alright. I hope you feel better later.
@LeviMorrison I tend to use recursion and loops
 
If all you are doing is validation (not parsing into data structures) then state machines are nice.
 
I wrote a parser for something a bit like JSON, one sec...
That language is Game Maker Language. Bear in mind that strings are 1-indexed for some reason, yet everything else is zero-indexed.
Actually, there's a PHP port of that parser... But the GML is the original. It's not very impressive as it's an incredibly simple format.
I found that tokenising then passing around a mutable list of tokens which each function pops from works quite well ^^
 
@AndreaFaulds The draft RFC looks really good so far! I'll cross my fingers that it will pass.
Personally I don't think there should be aliases for any of the type names, otherwise a codebase might use different aliases in different places which would be confusing.
 
4:50 AM
@TheodoreBrown Yeah, having some people write function foo(int $i, bool $b) and others write function foo(integer $i, boolean $b) would be annoying. I'm concerned people would try to use aliases that don't exist and be surprised when their code didn't work, though.
The previous RFC's patch would detect if you had a class name type hint like 'integer' and you passed an int to it, and would helpfully suggest you use the 'int' type hint in the error message
 
@AndreaFaulds That's actually a cool idea.
@AndreaFaulds Hopefully the documentation would make it clear that aliases aren't supported.
 
@TheodoreBrown The problem with that is it might bother people who try to make a class called Integer and get weird suggestions
 
@AndreaFaulds Yeah
 
I think Hack errors if you try to use the aliases, Hmm...
Oh, it doesn't.
 
@AndreaFaulds So HHVM doesn't error, but the type checker does?
 
5:01 AM
@TheodoreBrown It might be that.
Yeah, HHVM never errors.
 
hi evry1
 
hy guys just need a little attention
static $rule=[
$username=>'unique:login'
];
Is it possible to use $username...??
 
That will make the key be $username... I think. I'm not sure if non-constant expressions can be used to set static variables.
 
I just get an error like so syntax error, unexpected '$username' (T_VARIABLE), expecting ']'
 
5:09 AM
Ah, yeah, I guess they can't
you could try doing static $rule = NULL; if ($rule === NULL) { $rule = ...
 
$validation=Validator::make(array($username),$rule);
It doesn't seem to be work..!!
 
Can I get little ahead how to make validation for the user
if($validation->passes){//validation passed}else{}
@AndreaFaulds
$validation=Validator::make(array($username),$rule);
It always get passes either I pass anything to $username...
 
6:04 AM
Give this comment a star and win a winter bash hat ;)
Good morning all
 
 
1 hour later…
7:34 AM
Good morning, for those who are working.
 
good roaming
 
moin
 
What is HHVM actually doing? Im reading about it but not yet getting it. It's built by Facebook to make their website more efficient?
 
7:50 AM
@JoeWatkins I think I have hard time understanding the use cases of pthreads, if it's not running requests in parallel, is it for running heavy tasks like mailing, heavy filesystem I/O and CURLs?
 
@Duikboot treat it as an alternative interpreter implementation for the same programming language
 
Which should be a lot faster then.
 
@SergeyTelshevsky you can do all those things, you just have to be careful about where you do it ...
 
"a lot" is vague
it's more "it depends"
 
@JoeWatkins can you suggest, where threading would be more efficient than running CRON workers in the background? For doing the tasks faster?
 
7:54 AM
@SergeyTelshevsky interaction with threads is easier than with separated processes
 
@SergeyTelshevsky well for one thing, processes started by cron cannot easily communicate with one another
yeah ^
 
@zerkms @JoeWatkins so this is the main reason for threads? intercommuniucation?
 
From another hand - having shared memory is both nice and bad. The more things you have shared - the more complicated it is to synchronize access
 
hi guys
php experts
I am using laravel 4.2
$.ajax({
type: 'post',
url: 'http://localhost:81/larvel_exmp/public/users/'+this.value,

success: function($data)
{
$('span').html($data);
}
});
Route::get('users/{username}',function($username){
return $username;
});
Can't get back any error or data
instead If I use the resource routing for another controller then that works fine.
Any Idea please??
 
@SergeyTelshevsky the main point for threads is - another execution context that runs in the same address space (as per definition)
 
7:56 AM
@zerkms pthreads does that for you ...
you still might have to synchronize, but you have a high level API to do it with, and you never have to use a mutex directly whatever ...
 
well, you still need to use some synchronization primitives. As soon as you have several threads - you need to be aware of synchronization of any kind
 
no, they are built into the implementation, like Java's wait/notify
 
so any access to any shared data is enclosed in its own critical section?
 
(same names, same functionality)
yes
 
what if you need to access several items in an atomic fashion?
 
7:59 AM
there is ::lock/::unlock ...
or you can use the synchronization lock ...
 
okay. that's my point - you need to be aware of them, otherwise there will be races
 
oh yeah, but if you're setting out to do that then you already know about them ...
the point is there are no primitives, it's a high level api, where you never use a condition or mutex directly, or don't have too ...
pthreads uses the primitives obviously ... but easy for the php programmer ...
 
@JoeWatkins I see, thank you
 
btw, as of communication - python Thread module introduced multiprocess mode "recently"
so it runs physically different processes in thread-like way
 
8:02 AM
you mean distinct ones, like not fork'd ?
 
good mornings
 
moin
 
@JoeWatkins there are several models. Fork is among of them, including a completely separated new process
 
morning!
 
I wonder how good that is, sharing memory between distinct processes is not so easy, not so easy to get it to work everywhere
 
8:03 AM
@AndreaFaulds nice tool!
 
ing-morn
 
I tried to introduce a distinct process mode in apc, mmap wouldn't play nice, nor would windows ...
 
@JoeWatkins that's the "limitation" actually, you pass messages, not share
 
ah right
 
it's again good and bad :-)
you don't have shared state - nothing to synchornize
 
8:04 AM
yeah
moin @AndreaFaulds
is anyone else having a problem loading this page fully ?
my browser has been trying to connect to gravatar since yesterday sometime ... still won't load fully, refreshed like a million times ...
there are no missing images though :s
 
no problem here
 
now it's i.stack.imgur.com
 
weird, when I open the starred image of Levi. It gives me an empty page but when I refresh the page it shows the image accordingly
 
it's fine for me
 
I guess we all seen about the cafe thing on the news ...
 
8:16 AM
A state machine for integers in science notation
australia?
 
some gunman taken a cafe full of staff and customers hostage ... been going on for ~8 hours now ...
he's got two bombs strapped to himself, and apparently four in the city, he is carrying a sawn off shotgun ... hostages are holding up an arabic flag in the window, and he's got a human shield ...
@zerkms yeah ... that ...
 
scary shit ...
 
the best with live updates I've found yet
 
I been watching in on sky news through the night ...
 
8:20 AM
"One of the hostages managed to call her fiance and tell him she loved him before hanging up earlier today, my colleague Helen Davidson reports."
what this means?
(I cannot translate)
 
one the people that is being held managed a phone call to her husband-to-be
 
what "hanging up" here means?
 
ending phone call
 
got it
yep
 
ended in a rush
 
8:21 AM
@AndreaFaulds So for the conversion from float -> int and checking for overflow... are you just reusing whatever Zend provides for that or are you doing it in ASM?
 
wth!
 
indeed
 
@AndreaFaulds like 2x user input than an IDE with autocompletion
 
good meurning!
 
'nin
 
8:30 AM
morning
 
moin
 
@JoeWatkins listened/watched that mp4 yesterday. Other than the low audio, I really had no constructive input. Wish it was longer, enjoyed it and learned abit
 
@RonniSkansing morning
same for me, audio too low but clear enough
 
what was that video?
btw, not sure if I shared it here but it's really entertaining:
 
is it joe speaking there?
no, it's only in the beginning
 
@RonniSkansing Decibel thingy could be increased? /cc @JoeWatkins
 
that's curious that Thread object in pthreads is started implicitly
 
9:04 AM
mrnng
 
M orning
 
zan
Morning
 
@PaulCrovella Is it an asshat? :-)
 
Good morning
 
9:08 AM
Morning @obiNullPoiиteяkenobi @salathe
 
@PeeHaa I don't understand. How does it prevent you from using composer's autoloader?
 
@FlorianMargaine Stupid people gonna stupid
 
@PeeHaa yeah, I'm stupid. Mind explaining?
 
WTF do I gain by using it?
 
@zerkms it's not, you have to call start on a thread or worker object ...
 
9:12 AM
@JoeWatkins "poe-zix" *giggle*
 
/ rather by changing working code
 
@PeeHaa Belongs to Laravel organization, makes sense :-P
 
reusing something that everybody uses
 
threads in a pool are started and shutdown automatically depending on size of pool
 
What is the gain? Why would I do that?
I am not for changing code just because
 
9:12 AM
@PeeHaa You get to be cool?
 
@JoeWatkins yep, just realized on the second look that I didn't spoot the pool there
 
having less code you maintain yourself is always good...
 
I neither don't get those +1's from random people. Unless I am missing something it doesn't provide anything more
 
yeah these +1's are stupid
 
@FlorianMargaine I don't have to maintain that part of the code it's stable
 
9:13 AM
but removing code from your codebase is good
@PeeHaa it's still code you maintain
nobody told you? less code = good
 
less dependencies = good
 
@PeeHee I'm refusing to use OpCacheGooHee until it's using Composer autoloading.
 
@salathe :P
 
I admit I have a bit of a fetish for deleting code.
 
This @salathe character is quite jolly.
 
9:15 AM
jolly good sir :)
@FlorianMargaine If you can make a good case either way can you please drop a comment in the issue?
 
ty :)
 
morning
 
Morning @Kemo
 
@webarto nice stuff
 
9:26 AM
@FlorianMargaine are you posting a message in the issue?
 
k
 
Morning
 
Yo @fapoor
 
9:32 AM
moin fab
 
posted on December 15, 2014 by kbironneau

/* by Esteban */

 
Mooning @FAP||DIE
 
@PeeHaa can I post this?
What's the argument against including it? You're removing code from your own codebase, to replace it with a single line to include a battle-tested library. Sure, your code works. Do you know what code has even less bug? No code.

You have no reason to *not* include composer's autoloader.
 
@FlorianMargaine Sure :)
 
you've already read it though
 
9:38 AM
It nice to have it where it belongs
 
GitHub or it didn't happen.
 
^ that :)
 
github it is then
 
ty
 
@FlorianMargaine by that argument, can't @PeeHee's project just composer require amnuts/opcache-gui?... No code!
 
9:39 AM
lol
 
@salathe that's a stupid argument and you know it :P
 
hehe
 
btw, the project does not have any dependencies and can be installed without composer on a target machine
 
@FlorianMargaine Oh, I know it. :)
 
why to tie its autoloader to composer then?
 
9:41 AM
Hey @webfarto do you have some days off this month?
 
@zerkms it's an argument against using any library...
 
@webarto ...In case you don't get pings from ^
 
@FlorianMargaine it's argument against bringing another dependency
less dependencies -> better
 
I think I want to do some flaregramster shit
 
tell him to remove his composer.json then
 
9:43 AM
@PeeHaa Yep, if this @Kemo character allows :-P
 
You are not required to use composer
it's an option
If you don't want - you do not use it
 
@PeeHaa Shit is the bomb, want me to point domain or set up server?
 
@webarto @Kemo is your boss?
 
@PeeHaa I know, I know...
 
If so I feel sorry for him / her :P
:D
 
9:44 AM
Superior :-P
But I'm better, he just doesn't want to admit it.
 
@zerkms you willing to post something in the the issue? Otherwise I will just link the chat transacript
 
@PeeHaa no. I'm deliberately playing devil's advocate here
just because I'm generally a pain-in-the-ass here in the chat
 
You kinda are on my point ;)
 
just because there is one to argue with
:-P
 
@PeeHaa wait, I'm not saying that you should not include the autoloader in your repo, I'm just saying that it should be composer's
via a git subtree, for example
it's an app, not a library, I want all the deps included in the repo
 
9:48 AM
@FlorianMargaine ?
 
Graham's argument sucks
 
yeah it does
 
@PeeHaa I mean that git clone should get all the deps
including composer's autoloader
 
"I mean that git clone should get all the deps" --- generally it's not true
try to git clone php sources
and run it without dev environment
 
@FlorianMargaine You mean I have to include the classmap in the project itself?
 
9:49 AM
@zerkms yeah, you need internet.
 
building artifacts should never be in the source code
 
in a CI environment or when you need to deploy, you better don't rely on packagist being up
 
as anything that is a code derivative
 
@FlorianMargaine bingo
As a matter of fact I was just typing that in my response, but I am not sure I understand what you want now :D
 
including composer's autoloader... right in your code
well, somewhere in a "vendor" directory
Graham is annoying
 
9:52 AM
why to add a dependency and include it in the repository if it already works without it?
 
Morning
 
because he'd remove code from his codebase
 
Morning @Leri
 
but he added more code
 
morning @Leri
 
9:53 AM
that he needs to maintain
 
no, he doesn't have to maintain a library's code
 
he does not need to maintain his class either then
it works
 
a library's battle-tested code
@zerkms he does, it's part of his app
 
autoloader code is dummy
 
if anyone want to use composer, they can just add it to their composer's autoload?
 
9:53 AM
if someday he refactors to completely change his app's structure, he'll have to refactor this code too
 
No, it's a dummy PSR-x autoloader
he just needs to follow PSR conventions and all will be fine
the same is required for composer
 
"all will be fine" -> developer's famous last words
 
composer does not work automagically
it also relies on EXACTLY THE SAME conventions
 
We all know nothing will be fine in the end. :)
 
well, is PeeHaa's code a copy paste of composer's autoloader?
 
9:55 AM
I think it is not. But it's trivial
it either works or not
there is no place to make a mistake there
 
Morning mr @DaveRandom
 
not necessarily. Does it work on windows/linux/osx? Does it work on windows if it's not in C:\? Does it work if there are special characters in paths?
there can be plenty of bugs
 
@PeeHaa mronring
 
does it work with nested deps, etc etc
 
Also morning @Danack :)
 
9:57 AM
it does
 
it's not "either works or not"
 
it does work
 
for his relatively narrow use case right now, yes. What about tomorrow? If he includes composer's autoloader, he'll never have to worry about autoloading, ever.
 
How's the talk coming @JoeWatkins ?
 
@FlorianMargaine I don't worry about autoloading since 1994 ;-)
:D
 
9:59 AM
Oh link. Cool will watch that :)
 
@FlorianMargaine So if it stops working tomorrow either fix it or replace it with composer's then. Why replace it today?
 
Oh, it's that I put on my robe and wizard hat part of year on SO again.
 
@SergeyTelshevsky I hate cats
2
uuhhhhm hats
:)
 

« first day (1521 days earlier)      last day (3442 days later) »