« first day (915 days earlier)      last day (4259 days later) » 

20:00
GCC is a group of compilers for C/C++/obj-c though isnt it?
@bizzehdee Yes, but the C compiler is now built in C++. My point is that a 'lower-level' language is now written in a 'higher-level' one :]
@bizzehdee nah, python is still built in C
rad
rad
Problem related to PHP/MongoDB:
I am updating my MongoDB database using the data coming from a PHP script and it can have variable number of elements to be updated into MongoDB. For testing purpose, I tried..
$update = '"continent"=>"Asia"'; // one element to be updated
$tracking->sessions->update(array("ts"=>$timestamp,"fb_id"=>$fb_id),array($update));
I do not get any error when I do this, however the data is not updated in the database, instead a new record is created:
{ "_id" : ObjectId("517048f87a088a7e65000003"), "0" : "'continent'=>'Asia'" }
pce
pce
20:02
@LeviMorrison GCC switch to C++ to support the weird C++11 parts, afaik.
@ircmaxell: python sucks monkey balls though
how do you figure?
@pce My guess is that writing parts of the compiler using templates would have been more helpful than using void * everywhere.
nah, as a language its ok, i just dont like it myself
I basically use C++ as C with templates. I generally avoid classes in C++.
pce
pce
20:04
@LeviMorrison the costs of templates "scares" the c developers ;)
@bizzehdee don't like it myself and sucks monkey balls are two very different things
i thought the humor was implied with how i described it
rad
rad
any idea, folks?
20:06
@ircmaxell I love being able to look at 72 101 108 108 111 32 ... and read "Hello world"
@rad Your question?
Fellows of the PHP room: Do we need a Parse error: syntax error: unexpected X on line Y canonical to close against?
What do you think?
@MadaraUchiha wasn't there a -community wiki- post about these errors ?
rad
rad
Problem related to PHP/MongoDB:
I am updating my MongoDB database using the data coming from a PHP script and it can have variable number of elements to be updated into MongoDB. For testing purpose, I tried..
$update = '"continent"=>"Asia"'; // one element to be updated
$tracking->sessions->update(array("ts"=>$timestamp,"fb_id"=>$fb_id),array($update));
I do not get any error when I do this, however the data is not updated in the database, it actually replaces the record with this one:
{ "_id" : ObjectId("517048f87a088a7e65000003"), "0" : "'continent'=>'Asia'" }
@HamZaDzCyberDeV Yes, but this one is special, it's asked a lot more often than the rest of the errors, so I think it deserves some love
I'm asking this because canonical questions tend to take a lot of fire, and I want to know I can have a reopen back until the heat goes down :P
20:14
@MadaraUchiha So should we create a new community wiki that covers most of those errors ?
@HamZaDzCyberDeV That's what I'm asking.
@hakre @ircmaxell @PeeHaa埽 @DaveRandom mostly you guys
Yeah hahahha
Think it's a good idea?
I would go for it
yes, which one should we choose
WTF! Google isn't willing to issue a trademark takedown... WTF youtube.com/watch?v=dXtgkR3-tkk
20:19
@ircmaxell I'll make a new one, with a ready answer and everything.
I'll update a gist with what I have until we agree on the wording
@ircmaxell The hell?
Flag that shit
@MadaraUchiha I tried
> Please understand YouTube is not in a position to mediate trademark disputes between users and trademark owners. As a result, we strongly encourage trademark owners to resolve their disputes directly with the user who posted the content in question. Contacting the uploader may allow for a quicker resolution to your claim in a way that is beneficial to you, the uploader, and the YouTube community.
@ircmaxell ... So why do you allow people to flag at all? Assholes
Did you try talking to him?
wb
@hakre Hey
@MadaraUchiha wonderful :)
20:24
14 mins ago, by Madara Uchiha
Fellows of the PHP room: Do we need a Parse error: syntax error: unexpected X on line Y canonical to close against?
@Ocramius: OT/FFM: frankfurt-nazifrei.de
pce
pce
@hakre hi
@MadaraUchiha I think we have it in the error reference, don't we?
wozz dat?
@pce hi!
@Ocramius Nazis want to come to FFM on 1st of May.
20:26
@hakre O_o they still exist?
I thought iron sky was their last appearance
@hakre I don't think there's anything special there. And by far that's the most common error question we get
@MadaraUchiha Yes, it's one of the top questions. Probably pick the first one ever asked (just for the date) and add an answer. I would review it then if you like.
I would also close against it.
@MadaraUchiha No. People asking them do not deserve getting linked to a duplicate and we ought not waste time on doing so.
@NikiC Why's that?
20:30
I'm entirely new to PHP and I'm wondering if someone could suggest a good graphics library and how to install it
pce
pce
@Vlad GD? ImageMagick? isn't gd already installed?
@MadaraUchiha just flagged as copyright rinfringement
@pce so what's cooking?
@hakre I'd prefer to create one myself, so that I can accept an answer as well. Also, I wouldn't want some random user to be getting all the rep for work he didn't do
@ircmaxell Wait... thought you tried that?
I flagged for both copyright and trademark infringement
trademark first
20:33
@pce. GD looks like what I need. I'm unclear on how to install it, there are directions on php.net but pretty vague.
@MadaraUchiha Because it's a parse error question, maybe?
@NikiC Why do you think the user doesn't deserve information?
I.e. it falls into the "no effort on behalf of the asker" category and as such it follows that there will be no effort on behalf of other people either ;)
pce
pce
@Vlad do you have php installed? which os?
@MadaraUchiha you should do that! you're putting in all the effort, and you can word the question appropriately
20:34
You know, one of the first places you find in your search is Stack Overflow, so I don't think it's harmful to have a good information source on Stack Overflow over this clearly popular subject
@pce. I have the latest version of php installed on windows
@MadaraUchiha How does duping parse error questions to a canonical (and obviously subsequently deleting them) add any "good information" to SO?
pce
pce
@Vlad uncomment the line with gd.dll in your php.ini and make sure you have the gd.dll in the "ext" directory.
@NikiC Same with the Headers already Sent canonical, same with the Errors and Operators reference. You think those aren't useful too?
@NikiC but there will be effort from 'rep-whoring' types and SO will end up having tons of duplicate content with poor answers mostly
20:36
@pce ok can do.
@kaᵠ Ah, I see you are new here. Thing is: Having a canonical duplicate doesn't change anything about that ;)
repwhores gonna repwhore, no matter what you do
@NikiC By your logic, you should stop closing, stop deleting and just take off.
system's over the mature phase, things starting to break down...
@MadaraUchiha That may actually be not such a bad idea ;)
@NikiC Looks behind you
Do you see a door?
20:38
@pce, I'm trying to create an image, sort of similar to this one. Perhaps you can tell me if this is the library I want to be using. staff.jccc.net/pdecell/celldivision/chromoterm.html
@MadaraUchiha But what I actually meant is not to stop closing, but to close to the quick Too Localized option and not the moretime-consuming Duplicate option ;)
@NikiC Oh the almighty 5 second difference!
@NikiC wouldn't a 'canonical' duplicate worded such as the user will learn something out of it instead of there's your problem -------> bring at least some benefit ?
@MadaraUchiha 5 seconds? I need more time to find good duplicates
@kaᵠ To the asker yes. But I have no interest in helping him
pce
pce
@Vlad that's possible with GD.
20:40
@NikiC good point.
@NikiC Canonicals take less time to find, since you already know them
@NikiC @hakre need I remind you what's the point of this site?
@NikiC yea, good point
Or are you moderating a site your care nothing of its users?
@MadaraUchiha I think you may need some reminding
@MadaraUchiha yes but NikiC has a valid point about even telling those filthy non-searchers where the information is.
potentially nsfw, but freaking awesome
The point of this site is not about finding the syntax error in people's code...
8
pce
pce
@hakre my new hobby, i make a lot of panorama pictures: blog.ioloop.com/compiling-the-php-interpreter.html (at the header: malmö i sverige)
@pce, rectangles and ovals enough to get the job done? Thanks for all your help by the way.
20:41
@NikiC Remind me then
@MadaraUchiha I just did. Look three up
@kaᵠ what is "linux stuff" ?
#Fail :P
@tereško ohh, i meant programs
pce
pce
@Vlad yes, gd functions like imagefilledellipse
20:42
@NikiC I can agree with that. The point of the site is to provide expert answers to question, be a source of good information.
@MadaraUchiha Yes.
@pce kewl. you compile on Z61m? Should I try with X61 then? :)
A canonical detailing the process of finding and correcting syntax errors, as opposed as just finding them for people, is what I consider good information.
if you like "linux stuff" do what i have been slacking off work with for the last 4 days
a full emerge -e system on gentoo on a ras-pi
@bizzehdee what?
@MadaraUchiha I concur.
pce
pce
20:44
@hakre yes, compiling php is fast, compared to build a linux embedded system ;)
recompiling the entire of gentoo linux on my raspberry pi
@bizzehdee how long did that take?
currently taken 4 days. was 90% done when i left this afternoon
why are TL questions closed so hard???
@kaᵠ What do you mean by "hard"?
i just leave the screen on and the code scrolling, makes it look like im doing loads of important work, when in fact im playing bad piggies and letting the pi sort its self
@pce ah kewl
pce
pce
@Vlad and for Text, check the for example, the example of imageloadfont
eh when you come back over here, I already have booked you on our PHPUG to make a talk about creating C extensions for PHP :)
@MadaraUchiha i mean take so much time, aren't there enough people to see and close?
20:46
@ircmaxell awesome
@kaᵠ When you use the it's usually a breeze :P
@MadaraUchiha still takes too long, and people tend to don't mind questions not [php] tagged
@kaᵠ the few "linux programs" that you would use on freebsd are executed on a top of emulator
the rest are compiled , but they are in no way tied to linux
@kaᵠ It's not that we don't mind, we usually don't know enough to determine if a non-php question is indeed worth closing or not.
I've closed my fair share of etc through here.
@tereško any headaches compiling linux c source on freebsd?
20:49
what is "linux c source" ?
you mean gcc ?
pce
pce
@hakre oh, yes. why not. Maybe someone could create a useful extension :D
@tereško i mean possible lib differences ?
pce
pce
@ka bsd doesn't have wget - they have fetch and so on...
you have no idea how any of it done , do you
@pce bullshit
bsd has all gnu tools...
pce
pce
20:51
@tereško they use wget today :D
how does ?
@igorw braincool!
pce
pce
@tereško flame wars are OT, php is cross-platform :)
@pce a sleep function that actually consumes 100% CPU maybe?
Like block(1);
pce
pce
@hakre or execute bitshifted php code for extra cpu cycles - no, i would create your tokenizer as ext
20:58
@pce yes, very nice :)
we could also patch the PCRE extension that it allows to capture groups.
multiple groups that is?
pce
pce
@hakre ok, we could look into it
That would shift PHP on the level of Perl and .NET
PCRE has this already, it's just a callback.
"just" (tm)
pce
pce
@hakre ok, there must be a reason it isn't ported? PCRE supports multiple groups?
doesn't @pce (capture groups) this
pce
pce
21:04
@MadaraUchiha Linux is always a good choice, not only because daniel.stenberg.usesthis.com, eric.s.raymond.usesthis.com and joe.armstrong.usesthis.com
@pce I think the lib has one function you can call that will do a callback on each subpattern match.
@hakre hmm, thanx, need to read that
tl;dr;pinned
21:20
@PavanGjakati what do you mean by friend list? and no, you dont have to buy anything for me
pce
pce
@hakre how can i follow your regex skills? in C regex are a little bit different, you compile a regex first, we visit copenhagen and malmö next week, after that i'll look into it :)
@ircmaxell ok. if you start posting vids of half naked girls it means either the world is going to end soon or you're drunk. I'd prefer the latter since I have some things left on my bucket list.
@pce eh cool, so you're close to a little trip. may I join ? ^^
pce
pce
@hakre oh, this time the trip is with lisa and my mum, you might not to join this ;) Before the last weekend we did the same trip with my brother, but i'm addicted to NewYork Cheesecake (in malmö), now.
21:30
@pce lol - okay, but well, this can be fun, too.
pce
pce
@hakre maybe, i rent a car, booked hotel you could come by train and drink an ale in copenhagen (what i'll do in copenhagen city ;) ) Or we could do this next month, again?
@pce okay, then I would prefer next month I think.
@pce wow!
pce
pce
new york cheesecake of sweden
the turning torso of malmö / sweden
https://i.sstatic.net/UaG3Y.jpg
cool as welz.
I'm just wondering: Is it possible in PHP to access the parent class as a variable expression?
pce
pce
@hakre ok, we book 1-2 nights in malmö and from malmö, it's about 20 minutes to copenhagen
21:42
Like the special $this put for parent?
laters
@pce Yes I know. And I've just met some devs that are living in malmo some weeks ago and they were really nice and said, when I'm in the city I should drop them a line :)
gnight @stackoverflow
@Ocramius cu & hf
@kaᵠ gn8 @kaᵠ
I could imagine the beer part could be particularly well then.
@pce: Just some days ago I was crazy @night and did compile a PHP extension - on windowze.
pce
pce
night!
@hakre that would be cool, let us fix that in the next weeks.
i had to tweak a Windows(8) 2013 Server today for a php application and CTI over a COM Object, ActiveX - tomorrow :(
21:49
yeah, to lazy to re-instll.
I need to kick out the one laptop and replace it with the new one.
I'm just so f*ckin' lazy.
Anyway, is there in PHP any variable expression to access the parent class?
Do I need to use Reflection for that maybe?
pce
pce
what do you want to do?
$parent ?
well I wanted to do some crazy shit
implementing jsonSerializable but then inside calling json_encode($parent) ;)
so extending from a base class only to change the json serialization quickly.
But I guess there is no way in PHP to access the parent because it actually is $this.
in an object there is no parent object. (in PHP, no idea about other languages)
@Gordon Ok, I'll keep that in mind
Hi, I have this question of mine posted here on stack but some people was voting to close it as off-topic. Now I moved tho the serverfault I would some help.Please take a look at it and comment, write a answer or vote up.
0
Q: What is the best pratice to host websites on a server?

GarouDanI wonder what the best practice where we put a website/application on a server. Commonly there that we should not put them in our folder /var/wwwfor several reasons. I was searching and found two alternatives to host the site example.com: Put it in the folder /srv/www/example.com (reference he...

0
A: Removing Double Quotes from JSON String

hakreYou json-encode a SimpleXMLElement which by default returns the element node values as strings. If you want to change this behavior, you need to extend from it and change the way it encodes the object for json, e.g. the rain array (if it exists) should be converted to float values: class JsonSe...

^ this is crazy move ;)
22:49
@HamZaDzCyberDeV duuur O_o
sometimes the OP can be pretty dumb...ok very often
W9rd
or whatever
23:08
@hakre Are you here ?
@HamZaDzCyberDeV yes... :)
I though maybe this will help you ? (it's kind of a messy code :P)
$string = '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN1)(PORT=1234))(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN2)(PORT=5678))(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN3)(PORT=9012))(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN4)(PORT=3456)))(CONNECT_DATA=(SERVICE_NAME=STUFF)))';

$array = array();
$result = preg_replace_callback('/\(HOST=(\w+)\)\(PORT=(\w+)\)/',
	function($matches){
		global $array;
		$array[] = array($matches[1], $matches[2]);
		return($matches[0]);
	}, $string);

echo '<pre>';
print_r($array);
y'all don't sleep?
So the idea is to use preg_replace_callback() since it has a "callback" option, we use a global array to store the info we want
@HamZaDzCyberDeV Yuck.
Holy cow yuck.
23:10
@LeviMorrison hahahahaha lol
Know you not about the use statement?
@LeviMorrison No, but i did see it somewhere !
function($matches) use (&$array) {
And ditch the global.
@LeviMorrison yaaaay thanks ^^
anyone know how to modify an ellipse to have completely flat edges and rounded corners? Exactly as show in this picture. staff.jccc.net/pdecell/celldivision/chromosome1.gif
23:13
. . . really?
@LeviMorrison I'm searching for the PHP documentation for it but can't find it. "use" is a common word when Googling =oP
speaking of use, it would be really nice to be able to import functions.
use foo\bar;
bar();
That there is witchcraft!
@igorw don't get me started
/me half wants to propose that for 6 we merge function and class namespaces into a single hash table
@ircmaxell is there a technical reason why it is not possible right now?
23:19
yes, because you can declare function foo() {} and class foo {} in the same environment
they are for historical reasons just separate entities...
Then, we could do fun stuff like __invokeStatic()
got mah GPU overclocked, hashing at 730 Mh/s
And I have to go to the bank tomorrow for the first time in like a year, to deposit a check... Who sends checks anymore?
@HamZaDzCyberDeV not needed in that case, but this sometimes is the solution (with the callback), but hten there are more than one pattern involved.
@ircmaxell would there be a less intrusive way to allow importing functions?
weeeeeeeeeeeeeee. This use is not documented?
No
because you'd need to implement function autoloading for that to work
what does this have to do with autoloading?
23:28
you'd have to do a lookup. And since functions are cached, you'd have to load to determine if it is really not there long term
@ircmaxell example of a conflict? I'm just trying to understand
@hakre I was actually referring to this Q
http://stackoverflow.com/questions/6371226/how-to-get-all-captures-of-subgroup-matches-with-preg-match-all
\foo\bar()
@iroegbu not that use. the other one.
@iroegbu this is not the other one.
23:30
actually, wait
hrm...
I wonder something... will need to check on it later
@HamZaDzCyberDeV yes, for that. BUT in my case I have this more than twice inside, so doing with the callback once isn't enough. And the regex is much more complciated as outlined there (in fact it is generated). In short: it does not work. ;)
if the function is cached (so defining bar(), calling bar() within foo namespace, and then defining \foo\bar(), and calling bar() again (from the same opcode) to see if the cache is valid
@hakre I think you can find the other under doc for anonymous functions
@iroegbu I linked, it's not in there. that's why I wrote Weeeeeeee ;)
23:33
I have seen it before, I'm sure.
@ircmaxell so this would already be an issue right now, correct?
Yeah, the only difference here is that the compiler would be making guesses that it might have to fall back on
so we'd have to distinguish between a guessed namespace (from a use statement) and a auto-resolved one (via normal syntax)
I can't think straight enough to put this down
if there is a use statement, then it would not do the fallback to the global namespace.
@hakre example #3
you have to explain it to yourself though
@igorw what says the use statement wasn't for a class
23:37
:D
@iroegbu ah, I searched for use( and not use ( ;)
changing that now would be a pretty big BC break
@ircmaxell yeah, that could have some implications, since it would have to "alias" both classes and functions if the syntax should be the same.
@hakre you remembered me of this guy when you said "weeeeeeee"
http://i36.mangareader.net/angel-densetsu/40/angel-densetsu-272342.jpg
@iroegbu That's a really tough example for a noob ...
it sure is... I still don't get it
23:47
@igorw yeah, and then which is the forced one?
@ircmaxell yeah, that's a problem. :-/ so it would have to be a different keyword. which sucks big time.
or it would need to be a BC break
I wonder how much overlap there is
shouldn't be hard to build a parser for that sort of a thing, since it's on the file level...
and the only effects would be when overlapping class or namespace names with function names
use function foo\bar\baz;
looks almost usable to me tbh
23:56
yeah, that's why I added almost to the yuck
if you think it's worth a shot, I can have a stab at an RFC.
Go for it. It'll at least start the discussion

« first day (915 days earlier)      last day (4259 days later) »