« first day (1406 days earlier)      last day (3541 days later) » 

1:00 PM
@Gordon no
 
@ircmaxell is there anyone you or I could ask about that?
 
@MoshMage i have created two txt file a.txt and b.txt and i have written hello on booth the file then i got the tesult Array ( [0] => newsearch.txt [1] => search.txt )
 
@Gordon unfortunately, no.
 
@ircmaxell ok, no problem. thanks.
 
@Leri And everything else as well
 
1:04 PM
but when i have changes the text written into the file to abcd and obviously i ahve the abcd in $searchQuery also then i got the error Notice: Undefined variable: matchedFiles
@MoshMage but when i have changes the text written into the file to abcd and obviously i ahve the abcd in $searchQuery also then i got the error Notice: Undefined variable: matchedFiles
 
@Leri I am very much on board the C# train
 
@DaveRandom if only it wasn't tied to the CLR
 
@ircmaxell what's bad about the CLR? I heard good things about it.
 
it ties you to the environment (win)
 
@ircmaxell Meh, CLR -> CLI, and CLI has multiple implementations
Mono, for instance.
 
1:11 PM
@akhilesh By the lords, if (isset($matchedFiles)) print_r($matchedFiles); have some initiative mate :)
 
@ircmaxell not really
CLR itself is fine, the fact that the competing implementations (i.e. Mono) aren't as good as windows' isn't related to CLR
 
@DanLugg a "port" is not multiple implementations
 
afaik CLR is open source?
 
@MoshMage but abcd is present in text file so i should get the file name
 
I mean, it's an official standard, isn't it?
 
1:13 PM
Meh. CLR aside, I'm also on the "C# IZ TEH BESTEST SODA EVER MADE" train.
 
@ircmaxell inorite
 
isn't there a C# frontend for llvm?
 
You're confusing me;
file1.txt = "abcd"
file2.txt = "efgh"
search query = "abcd"

And error says undefined variable matchedFiles - is that what you're saying?
 
@MoshMage i understand that i need to check wheather $matchedFiles is set or not but when the searchquery is present in text file then it should return the file name like it has returned me the filename
@MoshMage inside the file i have written the text abcd
 
@FlorianMargaine CLR as a concept is amazing. And they pull it off. Mostly. If it wasn't primarally platform dependent, then I would actually care for it.
 
1:16 PM
@DaveRandom Me too but I just don't underestimate Java
 
@MoshMage like i was written hello and it was working perfectly
 
@ircmaxell What about Mono?
 
@Leri a side port that isn't complete and isn't supported isn't an alternative
 
@ircmaxell Well, it's rather complete, and it has reasonable support (not by MS of course)
 
@akhilesh that's rather weird.. I mean: If it finds "hello" it should find "abcd" can you add var_dump($files); to the code and pastebin the result ?
 
1:19 PM
@ircmaxell I've never used Mono at that level, so I can neither advocate, nor blame it. Well, my point was language is not tied to anything. :-)
 
@MoshMage after adding var_dump($files) into the code i am getting this result pastebin.com/BUt6rJzA
 
user895378
2 hours ago, by Dan Lugg
HAIL http://internet.com HTTP/1.1
 
user895378
^ shouldn't this have been "inter.net" ? :)
 
@rdlowrey Pedantry beckons no alliance.
 
which of the files has "abcd" ?
what is your searchQuery? `$searchQuery = "abcd";` or different? ('cos I'm testing this in my box and it's correctly finding everything)
 
user895378
1:28 PM
@DanLugg What a brilliant statement. Did you pen that or steal it from elsewhere?
 
@rdlowrey I stole it from one of your co-singers, captain boy-band.
 
user895378
That's like, the best sentence ever written in English.
 
;-P
 
/// <summary>
        /// Finalizes an instance of the <see cref="RoomReference"/> class.
        /// Releases unmanaged resources and performs other cleanup operations before the
        /// <see cref="RoomReference"/> is reclaimed by garbage collection.
        /// </summary>
        ~RoomReference()
        {
            this.Dispose(false);
        }
 
@MoshMage newsearch.txt and search.txt and obiviously my $searchQuery = "abcd";
 
1:30 PM
@Leri Isn't that backward? You don't dispose from a destructor.
 
@DanLugg Yes, just found that in sample project of mentioned socket framework
And that's totally wrong there
 
@akhilesh thaaaat's creepy; Did you made any changes to the given code? (if yes, can you pastebin them?) I'll try to help you out after my smoke break
 
IIRC an object can be GC'd at any time after it's last reference, in a given scope, so it's unreliable.
So yea, that's pooped.
 
@Leri, @rdlowrey how can I make a chat for me and akhilesh only? (temp chat, so I dont clutter this chat)
(I pinged you guys 'cos you're like.. gurus of this place)
 
Click their name -> "Start a new room with this user"
 
user895378
1:33 PM
^ that
 
^^ that
and I am far from guru
 
user895378
Achievement Unlocked: room 11 guru status
 
Goro? Yea he fucks shit up.
 
Meh, I might not have enough points because that option doesn't popup; just user-profile, Ignore and a list of rooms
Out for a smoke any-who
 
1:35 PM
My client just gave me an exam. Just wondering what does "Don't use built in php function" mean.
 
A) Why is your client giving you an exam? B) If you don't know the answer, you're probably not going to do that well.
 
I'm just wondering if he means all PHP functions
Like implode and shit
 
Any function that's included in PHP would be considered a built-in.
 
no loops allowed too.
F*ck.
 
Stupid exam is stupid.
 
1:37 PM
Yea, stupid exam is really fucking stupid.
 
user895378
Yes, stupid exam is stupid.
 
The f*ck
haha
 
I'd consider not writing it, and instead just doing something else.
 
I was his frontend developer
and considering me as a back end dev. I can do just fine with php functions
 
user895378
If a client said, "here's an exam before I cut this check" I would be like, "lol, bai"
 
1:37 PM
but what the hell..
Thanks guys.
I might flick this one off.
 
@rdlowrey It's like the skill-testing question when you win money
 
@Carnal Yeah, he's a retard. Flick that one off the cliff
and onto a cactus
 
^^ Ass first.
 
@DanLugg Aint your motto "ass first" ;)
 
@Jimbo I was trying to think of something witty with "Shoot first, ass questions later", but instead I'm just going to say "Banana chesterfield carpal chunnel"
 
1:40 PM
is Drupal a bit alike Symfony?
 
@DarkAshelin The same way a tomato is like a suspension bridge, yes.
6
 
@DanLugg oh.
but like, if the gap is small enough and the goods are light enough, a tomato can totally be a bridge
cough
 
A suspension bridge made out of tomatoes would be like a tomato
 
A wild @DarkAshelin appears
 
@DarkAshelin 8th+ , yeah, a little bit .. because they used symfony components
 
1:42 PM
@PeeHaa The wild DarkAshelin fled
 
btw, welcome back
 
You have a new job yet? :) @DarkAshelin
 
@PeeHaa not yet, on it though
had job interview today, went good
 
cool
Interview was at that 3d thingy?
 
1:44 PM
@tereško Oh yea, I forgot they did that.
 
@PeeHaa yes
 
noice
 
noice poi
 
@Carnal I know, you should use CodeIgniter instead.
 
user895378
@Leri No one thinks that joke is funny. Your mother doesn't even love that joke.
 
1:53 PM
@Leri I'm using CI and... don't even joke about it.
 
@MoshMage Why do you use it?
 
@Leri It was already in-place when I got to this position and the "application" is already in its 1.5.0 version soooo I'm not going to be the one who's going to make a fuss out of it :P
 
> that's horse shit
 
> <Pierre> I had great hope in nikita or Joe, they both suck at coop, doing stuff in their corner, just reproducing Derick or Zend behaviors.
Feels like he's saying Joe is a camper at some FPS and he doesn't coop with other players xD (lol. I know.)
 
2:01 PM
Good guy @ircmaxell annoyed
 
@MoshMage I've got huge ancient system and I am going to rewrite it step-by-step. It's your choice though.
 
:-)
 
@Leri , I'm alone in this and honestly I don't have the balls for a re-write; Plus the client keeps sending in new "i want X function" so even if I had the guts to there wouldn't be any time
 
@MoshMage i got the point but i didn't understand it i have uploaded my two text file inside the test folder and i ahve given the path $dir = "test/"; and it is searching for that but the $dir = "test/";file_get_contents function is not taking the path of test folder it is taking the path of root folder so i am uploading the same file inside my root folder then the searching works
 
posted on August 22, 2014 by kbironneau

/* by em. */

 
2:04 PM
so i need to upload the file inside the root folder as well as in the test folder
@MoshMage that i didn't understand
 
I edited my reply to the original question to account for that ;)
also, set dir as "./test/" (./ means location from where the script is ran)
 
@ircmaxell heh
 
OH “Santa @ircmaxell brings coal and a bcrypt whitepaper to children who use inferior hashing algorithms.”
 
@MoshMage I also joined a company where a very shitty CI codebase was in place. We are writing custom code now, so whenever something comes up that is more than a very small bug we rewrite the feature properly without touching CI at all.
 
2:11 PM
Yes, I thought about doing something like that; Whenever new functionality is needed write it in a way of not using CI but the whole thingy heavily depends on custom functions written with CI codebase.
But I might start doing that as well!
 
@MoshMage I also have pretty heavy work but necessary steps should always be taken.
And I only have two school students. :-)
Well and ex developer head who is explaining me old system.
 
@Patrick that's where I have been pushing them to , kicking'n'screaming
 
@Leri That's like a 4 person team! I'd dream to have that; It's only me and I know I'm not enough to rewrite all this (on account of how big and a tad insecure to revamp this and make huge mistakes)
 
@MoshMage it is definitely worth it. In the beginning it was a very hard sell to the business side, but now we have massively increased development speed and a lot less bugs so now they see the point.
 
Here we see @ircmaxell informing a child of their impending stocking stuffed with encryption algorithms http://t.co/ZBIsV3JPxY
 
2:16 PM
@Patrick but but but, let me understand this: You guys re-wrote everything (like, new folders, structure, the works) OR everything's still in place, just not using any of CI functions/aliases/whatnot ?
 
@MoshMage We only have two backend devs, one working 3 days, one 4 (me). The trick is to not do a rewrite. Instead you build a very minimal framework (use available components wherever possible) and then just execute that code before CI gets executed. If one of your new routes matches, you exit after, otherwise you continue with CI. Now you can do it piece by piece
 
@Patrick as someone who is having usually 50-60h work per week, I think that you are a fucking asshole
 
@tereško :)
 
@MoshMage This is really huge system, so I am just going to eliminate parts of it until I eliminate complete system
@Patrick I hate you. -_-
Off to meeting. Later.
 
@Leri seeya
 
2:20 PM
@MoshMage all the new code is in a separate folder and doesn't depend on the old code at all. Where necessary, we wrote small adapters for things that need to be shared (config, the weird session). Still using the same (messy) database of course. Just improving everything little by little as we go along...
 
@Patrick Yep. Like I said: I'm not sure I'm able to make that. 1st off: I didn't even read any help-file on CI: I just dived in and asked questions later; consequence is I don't know how to even start doing that [well, I have a clue, but I think you understand what I'm saying]
 
...@NikiC Maybe it's because I work in the HPC world, but basically everyone uses the _t types as introduced in C99.
 
@MoshMage create a new folder for your project, say Foo. In your old index.php, add a 'require '/path/to/foo.php'. Now you have your new playground
 
I hate no problem with _t, if we start using it everywhere consistently and don't have foo and foo_t and stuff like that ;) Though I do think introducing _t's everywhere is a waste of time.
 
now add the things you need, a good starting point would be a http component and a router. For example (shameless advertising) https://github.com/PatrickLouys/http and https://github.com/nikic/FastRoute
Use composer and just add whatever components you need.
 
2:26 PM
I think having php_int and php_int_t mean fundamentally different things is lunacy though
 
@MoshMage please clear my one doubt
 
@MoshMage other useful things for the start might be Auryn, Whoops, Twig. Something for sessions/csrf protection too.
 
@ircmaxell mainly because _t is weird. dafuq does _t mean?
@akhilesh Shoot
 
@MoshMage it's a suffix indicating it's a "type"
 
I definitely disagree with you guys on this point:
Retain zend_int and zend_uint as 32bit types (same as 64bit RFC)
Use zend_long and zend_ulong as the 64bit-on-64bit-platforms type. As such this type stays the same as previously, with the tweak that it will be 64bit on LLP64 platforms as well.
 
2:28 PM
how can i give the path of test folder to file_get_contents() like i have given the path for scan directory
 
We should just use int32_t for guaranteed 32 bit types and int64_t for guaranteed 64 bit types.
 
@akhilesh if (!is_file($file)) $file = $dir."/".$file; like I said I re-wrote the answer to match that
 
If instead all we want is zend_int is smaller than zend_long and aren't guaranteeing sizes then it's a different story.
Then down the road we could bump zend_int to 64 bit and zend_long to 128 bit and all is well (as long as nobody relied on details)
 
@Patrick wow. screw shameless adverts, I never even thought about making a class for http routs in php. Always used the old $_GET[] :P (well, in CI i use ze controllers, but you get my drift)
 
But this line:
> (ILP64 systems are very rare)
Is just false.
Regardless of my other opinions on the RFC, that's just blatantly false and I think you should change it.
 
2:32 PM
@MoshMage you could also use the symfony http components, it already comes with sessions too. I don't like their "bags" and things like that which is why I wrote my own. But use whatever components you like that fulfill your needs.
 
@Patrick and it's failry easy as well (the including new codebase part) I might actually do that - after asking permission ofc (so people know wtf I'm doing xD)
 
Also on the topics of controllers, when I started writing the code I went with a basecontroller that all my other controllers extended (like most frameworks do it). Don't do that, it will make proper dependency almost impossible because your classes will have different dependencies, but now they have to share everything.
Now we use Views and Controllers, both are just plain php classes with their own dependencies (handled by Auryn). So after the routing, we dispatch to the same method on the given Controller (handles input) and View (generates output) that are defined in the matched route.
 
@LeviMorrison It's not a 64bit type though
It's not uint64_t
It's 64bit on 64bit systems
 
I am definitely not in favor of system dependent integer sizes.
 
@LeviMorrison Do you have examples for that? That may well be false
 
2:36 PM
But that's not up for argument at the moment.
@NikiC Every system in my industry is coded for ilp64.
 
@LeviMorrison Sorry, but that's not up to discussion. We will not be using 64 bit types on 32 bit systems, that's for sure.
 
/me sighs
 
@LeviMorrison you mean like supercomputers and stuff?
 
@NikiC Yes.
 
okay, so that doesn't seem very relevant to php
 
2:38 PM
> (ILP64 systems are very rare)
It's simply false.
Also, the reason more systems aren't ILP64 is because of silly things like this.
I love PHP, I really do.
 
So I should remove the "very"?
 
Just remove the statement.
It's very common to use int64_t and int32_t and int16_t.
Where are you getting this idea it is rare?
 
@LeviMorrison Where did I say using those is rare?
 
> Using the term int for an 64bit type goes against the normal expectations of a C programmer (ILP64 systems are very rare). The meaning of the zend_int_t type is much closer to the long type.
 
Maybe we're not on the same page here
ILP64 has nothing to do with what types you use in your code
 
2:41 PM
@tereško Hey, according to this answer stackoverflow.com/a/16399972/3123545 - I know it's java, but he says that a controller can be business logic, I thought controllers don't do the program logic?
 
ILP64 dictates the size of the int and long types
and has nothing to do with int16_t/int32_t/int64_t
 
Yes, but even those systems typically still use int64_t
I know this because I work with libraries that support both modes, such as the Intel MKL.
 
sorry, I think I don't understand what we're arguing about here
 
It's because using a system dependent int size is crazy.
 
I have no problem with int64_t etc. But that's not what this is about, right?
 
2:43 PM
If you care about correctness and handling edge conditions you need to use know what capacity you have.
 
@LeviMorrison As already said, using 64bit on 32bit systems is not an option
 
It's not up for debate right now.
But I disagree.
Strongly
 
Be my guest and disagree. You have a very valid opinion. However it has little to do with the naming issue.
 
> Using the term int for an 64bit type goes against the normal expectations of a C programmer (ILP64 systems are very rare). The meaning of the zend_int_t type is much closer to the long type.
^ That is relevant.
I've said all I feel like here, change it or not doesn't really matter.
 
@ircmaxell which IDE/Editor do you use for PHP ?
 
2:46 PM
To be clear, I don't like zend_int and zend_int_t; it's just strange.
But the quoted statement is wrong and using it as justification for reverting that seems even more so.
 
#phpinternals on freenode :-D
 
seriously :)
 
@LeviMorrison So just to be clear, you take objection to the statement that int (the unqualified int type with no size suffix) usually refers to a 32bit integer type, whereas long usually refers to a type that is either 32bit or 64bit large?
 
zend_int64_t
 
Both int and long aren't defined sizes. All the difference is that int is probably smaller than a long.
(Less true in C++, which requires certain sizes to be supported)
 
2:48 PM
okay, let me approach this from another angle
 
Which I've already said; we can have zend_int and zend_long; just don't call them 32 and 64 bit respectively.
 
if it's not always 64 bit, then long is the better abstraction, since it's 64 bit on 64 bit platforms, and 32 bit on 32 bit platofrms
 
@LeviMorrison I don't think PHP supports platforms where int/long sizes are totally weirded out
and the whole point of the int64 move was being able to say that zend_long (or whatever the type is called) will be 64bit-on-64bit and 32bit-on-32bit
 
@NikiC that wasn't why I started it ;-)
I originally intended it to be 64 bit everywhere
 
I know we all love our C specification, but we also live in the real world where C is actually implemented and implementations use certain sizes for certain types.
And we ensure that certain sizes are used through configure or #ifs
 
2:53 PM
Lester chimed into the BC discussion with
 
I think long on Win64 is still 32 bit.
Actually.
 
... you'll never guess this one ...
 
Going to check.
 
a complaint about a specific error code ...
 
@LeviMorrison yes
 
2:53 PM
you'll never guess which!
 
that's exactly what the int64 rfc fixes ;)
 
...but that goes against your justification for naming, was the point
 
@ircmaxell So it's like a Linux long, except it's long even on Windows!
 
@AndreaFaulds yeah, what would a better name be?
zend_arch_dependent_integer_size
 
internet makes me sad
 
2:55 PM
@ircmaxell I don't know. zend_lp64? :P
 
@LeviMorrison So, let's go by example: I have a struct struct _foo { zend_ulong bar; }. bar will have a 64bit size on linux and 32bit on windows. With my naming suggestion, after the 64bit change, this code will automatically behave the same on windows as it does on linux.
 
@NikiC nothing behaves the same on windows as it does on windows
 
(on a 64 bit architecture)
 
@LeviMorrison yes, on 32bit they already behave the same
 
@Gordon can you join the javascript room?
 
2:58 PM
@ircmaxell arch_long
 
zend_arch_long_t?
 
zend_real_long_t
 

« first day (1406 days earlier)      last day (3541 days later) »