« first day (2762 days earlier)      last day (2412 days later) » 
00:00 - 13:0013:00 - 00:00

Wes
Wes
00:10
00:24
I need to apply to another job tonight
01:11
blah, I hate writing cover letters from scratch for companies I know almost nothing about
01:29
Specify failure return type. – #76314
01:45
there, applied to two places... I can do something else without feeling guilty
 
3 hours later…
04:43
mornin
05:27
@Tiffany I know the struggle
I have a job now but the work we do is not quality. Today I was dealing with the worst case of spaghetti code I could possibly imagine
Why is this ((preg_match($route , $url , $matches)) returning an array like this
(array(5) { [0]=> string(36) "series/javascript-tutorial/episode/4" ["slug"]=> string(19) "javascript-tutorial" [1]=> string(19) "javascript-tutorial" ["id"]=> string(1) "4" [2]=> string(1) "4" } ) ?
It should turn $matches into an array, right?
If this is my $route: /^series\/(?<slug>[a-z0-9-]+)\/episode\/(?<id>[a-z0-9-]+)\/?$/i
05:30
It is actually returning an array?
@Alesana right, but I've only put only two groups in my regex
But it gives an array with 5 keys
This is the $url: series/javascript-tutorial/episode/4
$matches[0] will contain the text that matched the full pattern
@Alesana Hmm, So...?!
Then when you use a named subpattern, you actually get the named group as well as the numerical key value too
It makes it easier if you're using a regex with a named subpattern but you want to be able to use the result without knowing the named subpattern
So...
Ok, the first one ([0]) makes sense now but how about these two? ` [1]=> string(19) "javascript-tutorial" ... [2]=> string(1) "4" } `
05:38
> Then when you use a named subpattern, you actually get the named group as well as the numerical key value too
@Alesana Ohhh!
Thanks! Why is it working like this?! Is there any reason behind it?
[0] => Full Match
[1] => First Matched Group
[2] => Second Matched Group
['slug'] => Named Subpattern Slug (Also happens to be first matched group)
['id'] => Named Subpattern Id (Also happens to be second matched group)
Yes, now I see. But it's kind of unintuitive, I don't know if this is the right English word for it, I mean you don't expect it to work like this
I suppose it is a bit unintuitive
@Alesana Thank you very much.
05:41
well, it's how REGEX works... there's not much intuitive about regex
@shadowhand :DDD
The first time I was learning about rewrites in apache htaccess files
@shadowhand I loved this, I want to add it in my Evernote as a quotation about Regexes :D
@Simon.B feel free :D
I was like "What on earth is this thing here? It's just a jumble of characters, I guess each character is a flag??"
Wes
Wes
05:44
when i do interactive rebase in sourcetree, shouldn't i be able to tell what's the new base? :\
@Simon.B I think with PDO, fetching from a database also returns it like that. By key as well as by index. It always has been easier for me that way because sometimes you don't know the key but you know the index. Although, I assume if your regex contains named subpatterns it's because you want to refer to it by the named subpattern
@Alesana Merci
De rien
Opinion, I have 3 different sections in site, each upload different things. Pdf, images, and videos. Should I have a table for "media" and it holds ALL filepaths, filenames, and extensions, and in pdf_table have more details about the file, like what category, etc. and media_id which refers to the filepath/filename ? that way I have all files in one table, and details in the others?
06:02
\o
\o
@Darius I would say that it depends on how your application works. For example, if it will be looking for a file by it's filename without being sure of what type of file it is, it could be helpful
Or for example if you want to go and check all files to see if they're over 90 days old and delete the ones that are, that would be useful
Awesome, thanks, that helped me think it through
:B No problem!
mornng
06:22
o/
Wes
Wes
@Alesana because it would need an internet connection and as you know any IOT thing sux, so...
It wouldn't need internet connection though
Wes
Wes
but actually, it's a good idea :B
There's not that many options
Oh wait no you're right
I was thinking the food has a special barcode designed for the microwave
the I reread it
06:31
Guys i have a question. I'm trying to upload video by Laravel . then this error shows up Warning: POST Content-Length of 31492043 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 and I changed post_max_size, upload in php.ini. Any Solution?
@RukaXing Did you also update max_upload_size?
Yes I did.
Wes
Wes
@Alesana well, if the barcode only contains time and temperature then you don't need the internets
@Wes That's what I was originally thinking. Well there's also at what power, defrost mode, and all that but it's not too much
@RukaXing Maybe your PHP is using a different php.ini file? Try echoing the ini config for post_max_size
echo 'post_max_size = ' . ini_get('post_max_size');
@Alesana okay let me try.
06:36
I'm buying a server, there is an option named "one more network-card (hardware)", now I want to know what's the benefit of having multiple network-cards for a server?
Alright guys I'm going to sleep
nn o/
Again I will only get 6 hours of sleep. That used to e enough for me, I don't know what happened
@RukaXing Oh make sure you actually restarted your web server too
@Shafizadeh that depends what the second card is connected too, if it's backbone at the same rate as primary card connected then you get more speed and balancing, if it's connected at a lower speed, it may be useful for a dedicated vpn interface ...
night \o
06:39
It says post_max_size = 8M . @Alesana
Oh :'( Okay. Good night. @Alesana.
Wes
Wes
\o
@JoeWatkins ah I see
some places might have used the secondary connection on all their servers to create an intranet ... although I believe that's not the done thing anymore, because hardware is cheap, and security important ...
Wes
Wes
> Something went terribly wrong with the rebase
@JoeWatkins ah
Wes
Wes
06:45
sorry @Ocramius i blame sourcetree for being a mess
servers generally don't connect to the backbone with the RJ45 connections you are used to seeing ... they have SFP connections that use fibre optics and can carry data at much faster speeds than RJ45 ethernet cables ... they also have more than one of these ports by necessity - they are designed to be installed in batches of several hundred at remote locations, sometimes under a mountain, and while they have a normal (slow) RJ45 maintenance port, the networking requirements of some data centres
Wes
Wes
i tried squashing... took me a while, and yet it didn't actually squash anything
require the use of a dedicated connection, or did ... now they don't, and so you get to use that second (or more) ports ...
Wes
Wes
i am the worst at git
@JoeWatkins ah, when two network-cards are implemented on a server, then the server has double ports, right?
Wes
Wes
06:50
i.imgur.com/KS8kg0J.png how did that even happen :B
Do you prefer package by feature or package by layer? stackoverflow.com/questions/6260302/…
@Wes s/ at git//
<3
Wes
Wes
thats accurate
i think there was a "commit automatically" checkmark i didn't uncheck
07:05
mornin room
07:27
morning
07:39
I am under this impression that a callback function is a function that gets called inside another function and its name is passed to that function as an argument. Am I (terribly) wrong or somehow wrong or right?
@Simon.B Callback function will be called when a function is finished, then it will call the callback function.
so Call a with callback argument to call b will mean when A is finished, B is called.
The name doesn't have to be passed as argument, you can use the stacktrace to check who called the callback method, in case you would need to.
@MikeM. Ok, here a callback function named $foo(the string inside $foo) is used right? call_user_func_array($foo, $params);
ThW
ThW
@Simon.B $foo is not necessarily a string, actually in the most cases it should not be a string.
@ThW What else can it be?
ThW
ThW
@Simon.B a function :-) eval.in/1001325
07:54
@pinepain ...
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

typedef struct _thing_t {
	int *num;
} thing_t;

const thing_t *ref;

int num = 42;

const thing_t stack = {&num};

int main(int argc, char **argv) {
	int ohFuck = 0x0F;

	ref = &stack;

	((thing_t*)ref)->num = &ohFuck;

	return 0;
}
you can't do that ...
7.3 will break all old implementations of weakref ...
ThW
ThW
@Simon.B or an object eval.in/1001327
@ThW That's a good example thanks. So now run function is executed first and then the callback function (in this example which it is an anonymous function) is called. So what's the point in that? What if other lines of code were below calling callback function(I mean in the body of the run())
suborn to bribe or induce (someone) unlawfully or secretly to perform some misdeed or to commit a crime.
I mean, would the callback function still execute in the end?
morns
08:01
morning
ThW
ThW
@Simon.B It will be executed if you call it, here can be other code before and after of course.
Sorry I was working. {Yes I do work ^^}
@MikeM. Ah, No problem at all, I appreciate your help
@MikeM. I know I've used usort() mentioned here for example, I know what happens, but I'm going to wrap my mind around the concept of "callback". I'll read the documentation now once again. Thx.
ThW
ThW
08:20
@Simon.B "callback" is only a variable name, the typehint is "callable"
@ThW Okay now I think I understand what a callback is. It's calling a callable which can be any of these: A name of that function, the function itself, An object and the name of one of its methods as an array, and etc... .
Unless you say I'm wrong again :p
I have a question out of curiosity. What is the underlying process (not very deep of course) of a "throw" in exception handling. I know it's not literally throwing objects right? :)
ThW
ThW
It is not calling a callable, the callable is the callback, callback is only a variable name
"A callback is the process of calling a callable (i.e. function, method, or closure) to execute (i.e. invoking it) by passing its fully qualified name into a function."
@ThW What do you say about this guide? Is he wrong? :(
ThW
ThW
@Simon.B Well, I already did show that is not necessarily a function name
@ThW You're completely right about that. I'm specifically asking about the first part which you opposed to, I mean this: (A callback is the process of calling a callable)
@ThW Sorry for disturbing you BTW.
ThW
ThW
08:32
@Simon.B $callback is a variable name often used for callables, and some people mean the same with both words. But what is called back?
@Simon.B Read it carefully and you'll understand. But here is a bit of explanation, if you are sending a method as callback ten you'll need to send an array like [$object, 'myMethod'] where on the first index is the object and on the second the method name. If you are passing a function then you can simply pass its name 'myFunction'. But if you are sending a closure then you'll send the closure like function($a, $b){/** **/}. Hope you understand now.
ThW
ThW
@mega6382 what?
huh?
@mega6382 Yes I believe understand this already.
@ThW This is what I mean 3v4l.org/StUGW
08:43
@ThW So you mean it's a matter of the words we use. You want to say programmers might not be accurate in the words they use about it. (Sorry if I misunderstand I'm not a native English speaker thus your sentences like this the callable is the callback burning double analyzing and burning sugar in my case :D)
ThW
ThW
@mega6382 You forgot one eval.in/1001372
@Simon.B Think more of it like, anything that can be called, like, method, function or closure is a callable. But when any of these are called from inside a function or method these become callbacks of that function or method.
@ThW Yes, thanks.
ThW
ThW
@Simon.B "callback" is often used with the same meaning as "callable", but "callable" is a better word for it. It allows you to provide a piece of behavior to another, encapsulated part.
sam
sam
Hi all,

I have a question about mysql, queries and subqueries.
I need to wrap my head around how to pass a variable from on query to another.
SELECT locationName as LN FROM locationNames WHERE locationName NOT IN(SELECT tagName FROM test WHERE theTimeStamp >= NOW() - INTERVAL delay MINUTE) AND locationType <> 'System Event'
Wes
Wes
woa
08:58
@mega6382 This one is really good and understandable. I'm going to stick with this one. Thanks both of you pals.
Wes
Wes
phpstorm crashed dead. it just disappeared altogether
sam
sam
And when I run a UNION SELECT * FROM test WHERE tagName=LN I get an error saying Unknown Column LN
Am I missing something?
ThW
ThW
09:13
@Simon.B Suggested syntax for a callable is Closure or object with __invoke() not string or array. You should not reference functions/methods using strings.
@JoeWatkins maybe we should ship a weakref impl in 7.3?
I mean, I certainly appreciate the perverse beauty of uref, but that does not look like a good production solution ^^
09:28
now I am sad because I also want to appreciate the perverse beauty of uref but cannot because I have no clue what it is and even if I had I wouldnt know how to appreciate it
fuck you internet
now I need a drink, but all I have is tea
I wonder, is drinking oolong while white also a form of cultural appropriation?
@tereško yes
@Shafizadeh o.0
@tereško This must be a joke. What is wrong with people?
Stupid people should not be allowed to use internet.
09:38
@mega6382 Isn't "white people" a term concept?
@Shafizadeh errm. yes?
I don't know :-)
@Shafizadeh if you asked it 10 years ago, then the answer would be "no"
@tereško it always was
but now it is a concept used by some crazy people, who are obsessed with race
09:39
5 messages moved to Trash
@tereško drinking oolong makes you a Weeaboo
@tereško It says minorities, and china in no way is a minority.
So, i guess you can drink oolong.
hahaha
what are you laughing at ?
09:41
@Shafizadeh oolong is a tea.
I see
why Jeeves said it is a sausage?
@Shafizadeh You should try to translate that, then you might see what I am laughing at.
@Shafizadeh oh boy… sometimes it feels like you are a 5 yo.
@mega6382 I did, but I don't know why a girl should say ooolong when she's seeing a sausage. Actually I don't know what sense convey when someone says "ooolong"
09:43
@NikiC thanks. I appreciate you believing I could make sense of that or realise it's perverse beauty. I can't but I really do appreciate it. it's probably the nicest thing I will hear today <3
@Shafizadeh you should just stop using urban dictionary
yeah .. apparently
3 messages moved to Trash
... sorry, I only now stopped laughing
09:46
moin
@Shafizadeh Urban dictionary is not an actual dictionary, it is just a repository for urban street slang and internet slang. You should not trust the results you find there and should avoid using it like @Gordon said.
Yeah, I mean it says Gordon is "trustworthy". That in itself means it's not to be trusted..
Clarify if colons are actually necessary to bind named placeholders – #76315
This json string is stored in table column. Now, I want to make 'Valuation', ['Completed'], ['NotCompleted'] as first parameter and false as second parameter.
But its giving an error.

{"onchange" : "showHideCheckBox(''Valuation', ['Completed'], ['NotCompleted']',false);"}
09:51
@Jimbo true, but I think the fallacy comes from it being correct about you
Wes
Wes
\o
@Exception well pretty clearly you have a single-quote encapsed string with literal single quotes in it
@mega6382 o.o
09:52
\💩/
@J.Ende you took my spot
\🖕/
\??/
\¿/
I would do one with an interrobang, but I'd rather skip straight ahead to telling you that I interrobanged @PeeHaa's mother.
09:54
👋💩🖕
!!urban interrobanged
whatchoo talkin bout willis
!!wiki Interrobang
The interrobang (), also known as the interabang (‽) (often represented by ?! or !?), is a nonstandard punctuation mark used in various written languages and intended to combine the functions of the question mark, or interrogative point, and the exclamation mark, or exclamation point, known in the jargon of printers and programmers as a "bang". The glyph is a superimposition of these two marks. == Application == A sentence ending with an interrobang asks a question in an excited manner, expresses excitement or disbelief in the form of a question, or asks a rhetorical question. For example: You...
09:57
Where do I find the commandlist from @Jeeves Or is it a real humanbeing
Yay for summer + broken air conditioning at the office.. Luckily my weekend starts tomorrow (and ofcourse the temperature drops by 10 degrees on my first day off....)
!!help
@Jeeves Are you a real boy?
Built-in commands (* indicates admin-only):
 admin - Manage the bot's admin list. Use 'admin help' for details.
 *alias - Add a bash-style alias
 *approve - Approve the bot for talking in this room. Room owners only.
 *ban - Ban a user from interacting with the bot for a specified period of time
 command - Manage command mappings. Use 'command help' for details.
 help - Alias of 'command list'
 invite - Invite the bot to join a room. This can also be done through the chat web interface.
 *leave - Ask the bot to leave the room. Room owners only.
Oh yea, forgot you disabled chat
09:58
yes it was fucking annoying
I thought that was the point
hmm sweet
@DaveRandom And in doing so, you've made it boring af
it's still active in playground if you really want to play with it
@DaveRandom but I can't give single-quote in the json ,should I?
09:58
I'm pretty lonely, but not that lonely
@Exception why are you trying to JSON-encode code anyway?
So. What happened to the first 6381 mega's?
I ate them
Any of you guys see the google AI thing today?
@DamienOvereem They didn't survive the experiment. ;)
@Jimbo no, share the link.
10:00
!!poop
💩
Shitty answer
!!remove poop
@DamienOvereem Sorry, you're not cool enough to do that :(
Such a shame
10:02
Definitely watch this, super interesting ^
yeah that caused me to have two meetings today so far
it is really interesting
@tereško thanks, but (in theory, at least) @FlorianMargaine has managed to get platform.sh to host it for us :-)
although not migrated it yet
@DaveRandom I am just adding parameter to the function as this is legacy code.So I am making changes in the json itself(which is stored in table)
if it falls through, you can ping me
10:06
no worries, ty
or you can ping me. :)
I am basically paying for a VPS that I use as an irssi-machine
@Exception rather than modifying the JSON string, create the string that you want it to be decoded to and then JSON-encode it
@DaveRandom .MY concern was how can I make 'Valuation', ['Completed'], ['NotCompleted'] as first parameter and false as 2nd parameter
Ah. You are settled for lxr Dave?
10:07
@DaveRandom you didn't reply to my email :P
do you ignore emails in your @php.net box?
@FlorianMargaine sorry yeh I started writing a reply and then realised that it was going to be v.long and I didn't have the time
and that also it would be easier to chat about it
do you have gtalk to avoid filling #11 ?
oh I already have you on it]
@Jimbo I liek the way she said 'mmhmmm'
just going to grab some late breakfast, brb
You can call it lunch
fail to print newline after end tag in included file – #76316
10:21
!!dave
@‌DaveRandom should work on @Jimbo's mum
@NikiC I could get on board with that ...
and yeah, it's going to be impossible to make it work on windows in a non-stupid way ... so it couldn't be a core solution
and protecting whole pages, and flags and blah blah blah ... but it sure was fun :)
I'm not sure what a core solution looks like ... if you do, and want to throw some ideas out there, I'll have a go, this weekend probably ...
I forgot which language, but one of them lets the weakref act as an instance of the object it references, which I quite liked, but couldn't figure out what it would really look like, what if the referent already has a get (or whatever), how to resolve collisions ...
@DaveRandom Good Option .. thanks :)
10:44
@JoeWatkins I feel like this should be pretty simple in core
it seems that way, an object with a reference to the bucket will be cleared with the bucket, but how to know if the bucket has been reused ?
reference to the bucket, and addressof base of the object I guess ?
yep
that should be safe
is there no possible edge case where the mm will hand out the same address for an object of the same type with the same handle ?
eh
yeah right, that can happen ^^
I was originally thinking more handling this from the side of the object, i.e. doing an extra check on destruction
As that's something we can easily do in core, but hard to hook into for exts
i.e. store all weak refs to an object somewhere and have a flag on the object if it has (or had) weak refs
if it does, go kill all the weak refs
even ext's call zend_object_std_dtor by convention ... I've never seen one that doesn't ... or written one
oh wait, I did write one ... but it's surely something we can document is necessary, or something you have to work around if you are me ...
10:49
@JoeWatkins even exts have to unregister the object from the store at some point right?
yeah
well ...
must be run by the engine even for custom objects, although it's not run by ext directly ... but we can have what we need in there ...
I'll have a go ...
PHP is a dangerous language, just imagine someone like me going around writing code like this. [$this, 'theMethod']("foobar"); :P
disclaimer: I don't actually do that :)
11:11
Why would you do that if you call it right away?
@PeeHaa Yeah, that's the point
!!error
It's @PeeHaa's fault
@J.Ende Use the playground for testing the bot chat.stackoverflow.com/rooms/100286/jeeves-playground
11:16
This is not a test
Seems awefully testy to me
11:41
hands off my testicles!
11:55
@PeeHaa shits and, optionally, gigs
shit
single shit, not a gig in sight?
aye
gigless monoshit
Well mostly shit
11:58
@DaveRandom cause they are optional :P
@DaveRandom name your band 999 Megabytes then
Can we call the album "Gigless Monoshit"?
yeah sounds cool
brb booking recording studio
Ugh every time I open jeeves I want to start from scratch :|
12:01
Make a Jeeves 2.0 then :)
@PeeHaa your mom told me she feels the same about you
lol
It's mostly just PresenceManager and stuff related to that sub-system
hmm, that was mean… I apologize
and the persistence layer
12:02
I kinda want to write it from the ground up taking uncoupled plugins and different connected services (as SO chat) into account
all in all it could be much worse
@Gordon It was funny
And redis storage
And better architecture so tests are easier
And tests
redis should be trivial to implement, tbf
the storage layer is all interfaces
yeah
And custom !! command prefixes
@Gordon Nah, should call it AbstractProxyBandSingletonFactory
12:03
decoupling the plugins is also not too hard, there was a viable plan for that as well
@PeeHaa now that could definitely be done with very little effort
The presence stuff handles rooms right?
Can generator consume other generator?
@brzuchal Yes, yield from
if hungry enough, a generator can consume anything ...
12:06
@MadaraUchiha Cool, I'll check this out
Where does Fonzie like to go for lunch? Chick-Fil-Eyyyyyyyy
you are all internetting wrong, that was supposed to be followed up with a @PeeHaa's mom joke ...
@PeeHaa yes, it handles which rooms the bot is in (including invites and leave instructions) and also manages concurrency and back-off. Unfortunately those two things are inextricably linked because of the way the the SE back end works
w.r.t the command invoker being configurable, github.com/Room-11/Jeeves/blob/master/src/Chat/…
in particular, notice that the methods that actually use that constant have a ChatMessage instance to work with
so they have access to a Room instance
which means you can easily retrieve room-specific config on a per-message basis
in other words, making that configurable is mostly just a case of defining a storage location
12:12
@PeeHaa honestly, the more I look at Jeeves the more I think it's one of the best architected applications I've ever worked with. It certainly has problems (mostly surrounding the plugins), but as a general rule I find that it's pretty simple to add features pretty cleanly
the testability issue is totally valid though
Hi, I have a db class which connects the database to the production server.
I don't want to connect to any database when dev mode is active. But if I didn't create any db instance,
and there are certainly parts of the historical decoupling work that feel half-finished
of course other methods will throw error because $this->db = null. Is there any way to avoid or suppress errors?
@Gowri you need a mock database instance
@DaveRandom Yeah adding features is totally ok
12:15
@DaveRandom: Database instance is third party code. is there any design pattern which solves this issues
`
class db{
private $db;

function __construct(){
if(prod mode){
$this->db = new dbConnector("production details");
}
else{
// dev mode probably
$this->db = null;
}



}

function getRecords(){
$this->db->run();
}
}
`
@brzuchal Do you want to consume or delegate?
@Gowri yes, define an interface for the database, make your code depend on the interface instead of the class, and then you can easily create a mock implementation of the interface
@kelunik fuck me i dunno, lemme think
@brzuchal Consumption works like any other function call, delegation works with yield from.
Do i need to define interface for db class or dbConnector in above example?
12:18
@kelunik I need in one iterable thing a list of all case identifiers which are retrieved through API calls which are paginated, so I assumed I can start generator with first page, count number of pages and yield case identifiers from first page and then consume generator created in the same way but with next page number
@Gowri db, but also you need to use dependency injection
This is actually my first code which is not simply yield an element from an iterator
i.e. there must be only one place in your entire app where you create a new db instance
@brzuchal Yes, yield from can be helpful there, but as the "page fetch" code is always available at once, I'd probably go with an array there.
@DaveRandom: Thanks I will give try and see
12:20
@kelunik I'm not sure I get it with the array
while ($url) {
    [$items, $url] = $this->fetchUrl($url);
    yield from $items;
}
@kelunik hmmm, that gave me to think, actually I've got a next page url in first response - no need to count number of pages etc.
I always liked this as a demonstration of yield from
@kelunik ok, I got it, in your code $items will be something which is array and yield from consumes this array every time it's going forward
@DaveRandom It's nice, but not the most useful case I think.
@brzuchal Yes, $items can be any iterable.
12:25
class Awful implements ITerrible {}
4
@DaveRandom Yes, makes it more efficient as compared to something like this 3v4l.org/n217Q
@DaveRandom no need to brag about your own code.
@Ocramius I aspire to ITerrible
Wes
Wes
12:49
@DaveRandom foreach(flatten($thing) as $f) yield $f;
isn't that the same?
@Wes no?
oh you mean in the is_iterable() branch
well yes it is
but that's true of every yield from
Wes
Wes
bleh
i dislike both :B
00:00 - 13:0013:00 - 00:00

« first day (2762 days earlier)      last day (2412 days later) »