« first day (2161 days earlier)      last day (2802 days later) » 

3:00 PM
It seems pointlessly engineered.
Everything has an interface and exactly one implementation.
 
Wes
@MadaraUchiha are you around? can you point me to some "mixin" pattern in js? gist.github.com/Netmosfera/b4baee407aa37b8dcfcaafa6bfe9949e
 
@LeviMorrison You got what's going wrong with todays OOP…
I'm really sad there's no factory for getting UuidFactoryInterface implementations…
…………
 
heheh my post is basically a follow up on yours @bwoebi :P
 
@PeeHaa yep.
 
See nobody reads that fast
:P
 
3:06 PM
@bwoebi You mean AbstractSingletonUuidProxyFactoryBean
 
@LeviMorrison sounds like a library which is inspired by a java based implementation ;)
 
@staabm It was, yes.
Turns out it has a CodecInterface so that you can __toString() it.
 
@NikiC yea………
 
You shouldn't have to inject a CodecInterface so you can toString something...
public function compareTo(UuidInterface $other)
{
    $comparison = 0;
    if ($this->getMostSignificantBitsHex() < $other->getMostSignificantBitsHex()) {
        $comparison = -1;
    } elseif ($this->getMostSignificantBitsHex() > $other->getMostSignificantBitsHex()) {
        $comparison = 1;
    } elseif ($this->getLeastSignificantBitsHex() < $other->getLeastSignificantBitsHex()) {
        $comparison = -1;
    } elseif ($this->getLeastSignificantBitsHex() > $other->getLeastSignificantBitsHex()) {
Great job coding to the interface, guys!
It's just that all of that stuff is not really interface; it's all implementation...
 
if you don't actually need uuid's, don't use them
 
3:12 PM
Alright, enough picking; time to enforce the NIH syndrome stereotype and roll my own...
 
\o/
 
it's just a random_bytes and bin2hex away
 
NIHFTWBBQ
 
uuidv4 is super stupid unless you actually need the uuid format for interop
 
WWJDFAKB
 
3:13 PM
@NikiC I'm not sure we need v4's but we do need v1's.
 
@PaulCrovella lolwat TIL?
 
goddammit this is all crap
 
@PeeHaa mashup of a long running ad campaign and a, um, well this
 
Are those still a thing?
 
klondike bars? oh hell yes
the wwjd bracelets and whatnot are still around too, but not nearly as popular as they were
 
3:23 PM
Evenin'
 
3:34 PM
Klondike is a good mini-series FTR
 
@Fabor watch Mob Psycho 100
sorry for da pings
 
@Saitama I have it bookmarked from when you last mentioned. Been meaning to get round to it
 
Oh I did? Sorry for pinging you again then :P
there's only 10 episodes atm... The hype is really high with this one, and it's really a pleasure to watch as well
 
@bwoebi @NikiC question about how functions are allocated/cached in PHP's heap. Are they stored in a deterministic fashion? Or does the memory manager rely fully on the OS to do the allocation when we're dealing with virtual memory? I'm trying to figure out if the order the function bytecode is allocated in memory can have an effect on memory access time.
 
@Sherif userland functions are in CG(arena)
 
3:49 PM
How do you guys keep monitoring your servers?
 
which is a large chunk of memory being allocated at once and then incrementally further big pages (of 64 KB I believe) as needed
 
@bwoebi So then it is just a heap. The functions will get block alignments in order of execution, right?
 
That way user functions of same classes will be relatively close in memory and thus there are chances to have inexpensive access
 
Anonymous
@FarhadSaadatpei I'm looking into new solutions atm. Scout monitoring seems like the best up until now
 
@Sherif not sure what you mean?
 
3:51 PM
@JayIsTooCommon I will look into it
 
@FarhadSaadatpei in the web 2.0 world you can crowd-source that now too - i.e. wait 'till someone bitches about it
 
@bwoebi I'm measuring slight performance differences in function execution depending on which function is executed first. My assumption, because the difference was so tiny (in usec), was that it's just because of slower memory access. Because the functions called on later were further down in the heap?
Wondering if any of this is factual or just nonsense.
 
@PaulCrovella lmao
 
@Sherif That may depend on anything… like whether the function happens to be still in cache due to e.g. L3 cache containing a reference to start of CG(arena) (where size and current offset are stored) and the first function … being at the very start of the arena data.
I wouldn't give anything on that.
 
@bwoebi Right, but all things being equal, my theory is sound, right?
Let's just assume the L3 cache is missing.
 
3:56 PM
It's more like wild speculation
 
yeah, what Nikita says
 
@NikiC But if I can prove the difference consistently by changing the order of the function calls?
 
Too vague. Are you seeing order dependence on call to identical duplicated functions?
 
It's on average ~60microsec difference for the function that was called first, which would be consistent with memory access time according to my motherboard specs.
But yea, sure I could just be on a wild goose chase here.
@NikiC They're not exactly identical. There's a single code statement that was changed, but it's a condition that is always false anyway in the test.
The opcodes are practically identical, but that branch will always jump in both functions.
 
Low blood sugar is for other people.
 
4:05 PM
@Sherif err, consistent with what memory access time?
Are you sure you mean usec and not nsec?
 
@Fabor diabetes
 
Trade off
 
@NikiC No, the difference is measured in microseconds, but I can't exactly be sure this is an accurate clock. I'm extrapolating that at 100ns access time, the cache is missing every time to get to code, but of course inclusive of that is the fact that the function probably takes up much of time.
It's consistent though. I just tried even with the identical functions.
 
Any ideas guys :) ?
0
Q: Wordpress redirecting localhost url

BaldrániJust installed an existing wordpress in local to check for a few images problem. However When I'm laucnching under mamp. localhost:8888/wordpress/ Im redirected to localhost/wordpress/ which is not anymore the path to my files. I've checked for redirection like in .htacces but it was empty. Wh...

 
I do have all opcache turned off.
 
Ekn
4:16 PM
@PeeHaa did you pull? cause actually there's now a better implementation I have with !!in and !!at on a branch, but it has an issue which I wanted someone to review/help me finish these bits before PR. it's currently on this branch.
 
can we get rid of the function keyword yet?
please?
 
@DaveRandom but but but grep
 
fuck you too.
:-P
 
evenin
 
Wes
evenings
 
4:28 PM
ok, it's official - I'm sick (having cold)
 
Ekn
I can relate, it sucks
 
@tereško get well... soon!
 
@DaveRandom Everywhere?
 
@LeviMorrison I would be happy with methods only
 
since it's my second day, the "getting well" part wont happen so soon
 
4:32 PM
Can we have some sort of shapes with a well-defined array structure and methods? (i.e. objects, but by-value)
 
@Fabor the filling looks like snot
 
@bwoebi structs... yes please
 
@DaveRandom And exactly what does this solve?
:D
 
@LeviMorrison the fact that I, like many others, also use several languages with a syntax that is almost identical to PHP in this particular area, but do not require they keyword, and as a result my fingers forget to type it every. single. time.
It's unnecessary and the source of much frustration to many people. If you want to allow it to be there, fine. But there's no good reason to require it to be there.
 
@DaveRandom You could as well just forget to type the $ …
 
4:42 PM
@Ekn Nope didn't pull yet
 
@DaveRandom I end up typing the function keyword in languages that don't have them.
 
@DaveRandom It looks stupid without function and you should just shut up
 
@bwoebi I do that as well :-P
 
Then we better do nothing at all.
 
If following DDD what are your opinions on developing your application, domain and infrastructure layers as separate packages? I'm not sure if it is worth the hassle or not
 
4:47 PM
it does make ide fu<tab> completion feel somewhat cathartic
 
what te hell
!!uptime
dats weerd
 
dead or only mute?
 
mute
!!uptime
 
@PeeHaa I have been running for 34 seconds, since 2016-09-15 16:50:01
 
u okay @Jeeves?
 
4:50 PM
It was doing just fine from what I saw on the server
Everybody say thanks @DaveRandom
 
Thanks @Dave-chan
 
Anonymous
Finally I can find out
 
Anonymous
!!wotd
 
eponym: a person, real or imaginary, from whom something takes or is said to take its name.
 
lol
 
4:51 PM
sorry for dem pings @Dave-San
 
i like to think jeeves wandered into another room and was babbling all responses there, to everyone's confusion
 
@PeeHaa Did it stop responding?
 
@DaveRandom Yes
 
finally
 
No clue as to the why
@DaveRandom okay at least somebody is happy with it :P
 
4:52 PM
let's hope there's been something logged this time
 
Anonymous
@PaulCrovella @PeeHaa is this possible? :D we could very much troll js..
 
any idea when the last successful command was?
 
@DaveRandom nutting that I see
@DaveRandom somewhere this afternoon I think
 
Anonymous
@DaveRandom a Google search for rpi incognito mode porn
 
@JayIsTooCommon It used to do just that but that was a bug i wrote cc @PaulCrovella
 
Ekn
4:54 PM
heh Jeeves and Cap interacting (somehow) would be a fun sight
 
@Ekn I remember seeing two bots in some room a while back talking to eachother
 
Ekn
heh
 
@PaulCrovella That really was the last one?
 
Anonymous
1 min ago, by JayIsTooCommon
@DaveRandom a Google search for rpi incognito mode porn
 
Anonymous
4:55 PM
Yeah xD
 
@PaulCrovella is right @DaveRandom
 
Anonymous
Fock you.
 
gee tnx @Fabor. asshole
 
Anonymous
@PeeHaa out of interest
 
Anonymous
Why would he crash without any commands? Isn't he just idle without commands?
 
5:03 PM
yes?
@JayIsTooCommon He's never actually idle
 
Ekn
> When a plugin has been explicitly enabled via a user interaction, the $persist argument will be true, indicating that the action will be remembered by the bot and that the plugin should initialise any persistent data that is required for proper operation in the target room.
 
He's always processing incomign messages to find out if it needs to be acted on
 
Ekn
is that the same when it enters to a room? I think it should be
 
Anonymous
Oh, yeah of course
 
@Ekn Yes
 
Ekn
5:05 PM
> When a plugin has been explicitly disabled via a user interaction, the $persist argument will be true, indicating that the action will be remembered by the bot and that the plugin should clean up any persistent data that does not need to be kept while the plugin is inactive in the target room.
in case of disable, then, this must be false?
 
What does this refers to?
 
@PeeHaa yeh I got nothing :-/
 
@DaveRandom Really odd
 
Ekn
just comparing mine with docs
 
I think we might have to just add line-by-line logging or something
 
5:07 PM
@DaveRandom yay...
 
I really thought that it was going to turn out to be a swallowed exception but I can't see anywhere that could happen any more
 
@Ekn ooooh ask @DaveRandom he is great and knows all the things
 
Ekn
^^
 
@DaveRandom The WS connection is also fine because incoming messages just come in fine
Can we see if it even tries to post a message?
 
> [2016-09-15 16:48:57] Passing event #67010525 to built in command handler Room11\Jeeves\BuiltInCommands\Uptime
then nothing
 
5:09 PM
ok who build uptime?
:P
 
[2016-09-15 16:50:35] Processing event #67010587 for built in commands
[2016-09-15 16:50:35] Passing event #67010587 to built in command handler Room11\Jeeves\BuiltInCommands\Uptime
[2016-09-15 16:50:35] Post attempt 1
[2016-09-15 16:50:35] Got response from server: {"id":32873886,"time":1473958235}
[2016-09-15 16:50:35] Event #67010587 processed for built in commands
That's the successful one
so you see that "post attempt 1" before it even tries to do anything to do with actually posting
 
uptime doesn't even do anything
 
ooooooh
 
something failing to release the lock and/or bug in the locking mechanism
 
5:13 PM
yeah that smells like the issue
 
(which is quite likely since I wrote it)
@Ekn Sorry not quite follwoing the question?
 
Anonymous
Looking at Jeeves code is depressing..
 
@JayIsTooCommon why?
 
Anonymous
Because it reminds me that I have no idea what I'm doing :)
 
wow @DaveRandom you are annoying
Amp/Mutex where do we think that lives?
 
5:16 PM
If you guys are working on a project alone and using PHPStorm do you .gitignore the whole /.idea directory?
 
You guessed right! daverandom\mutex \o/ :p
 
@PeeHaa Ummm yeh sorry github.com/DaveRandom/Mutex :-P
 
hehe
 
It was supposed to turn into a thing and move over to amphp
but guess what happened!
 
I'm not judging
 
5:17 PM
I am
 
@PeeHaa I know. That would be a weird name anyway.
/me goes home
bbiab
 
later
@Ekn it basically depends
Do you want to keep reminders in the storage while it is disabled?
 
Ekn
sorry back, yes, I cancel the watchers on disable but want to keep them on file. Then upon plugin registration I'd like to reschedule them. I think it works, just not upon plugin registration. Because it does ping me for timed out events that were on file and does ping for still upcoming ones too, but this happens when I call !!reminder list for example.
 
Wes
-21
Q: Requesting new Badge for people that submit edits that are rejected or rolledback

Jarrod RobersonI think we need a molester badge that indicated that someone has a certain number of suggested edits rejected or if they can unilaterally edit, has had a certain number of edits rolled back.

do it
 
Yes!
Also badge for people who got their rep from answering terricrap jquery questions!
Can't wait to get my new badge!
 
Anonymous
5:23 PM
:p
 
!!dad
 
What did the officer molecule say to the suspect molecule? I've got my ion you
 
@Ekn You are saying it only gets rescheduled once you have run list?
 
Ekn
Each of those methods check for $seconds <= 0 if so, pings me telling "I guess I'm late: $text"
If that works upon rerun, means the content stays there. But at enableForRoom, it should scan that and do the same, but something's not right
 
Do you have it running and can you show me?
 
Ekn
5:26 PM
will run in 2 mins, need to pull, but sure
 
Sorry. It's going to be in 30. Smells like my food is ready
 
Ekn
no problem :-) bon appétit!
 
ty
 
heh. now that I work exclusively in JS, I'm pretty sure I'll be yearning for a side-project in php
I guess I'll be flooding @Paul with questions about generators
 
@FélixGagnon-Grenier why him?
 
5:35 PM
for random ping-ness?
tbh I rarely ping specific people about questions :)
 
@bwoebi I answered one once, therefore it's my problem now. You know how it is.
 
glares
 
@Paul you must be decent at chess. Whatever I answer to that, be it "I'm no help vampire" or "Yeah I am", I ain't in a good position.
 
zugzwang
 
5:52 PM
@NikiC @bwoebi I know it would be nice to keep our parser but the more I look at other languages the more I realize how uncommon it is to not need a glr parser.
(or something even worse)
I'd definitely prefer to keep a simpler parser.
The feedback from private conversations usually includes "wtf is this XOR doing here?"
Maybe \ would be better received but I'm not sure "wtf is this escape doing here?" will be any better.
We can resolve the conflicts with [($x) => $x + 1] with regular shift/reduce rules once we can actually parse general arrow functions.
The GLR parser would allow us to directly use JavaScript and C# syntax. I think this might actually be a requirement to pass...
 
@LeviMorrison There is still the option of just not supporting types
 
Anything else we can support just fine
 
How can we convince Internals of this?
@NikiC I think maybe if you make the RFC. Everyone loves you.
 
I could use some guidance on something.
I have an array of dates in the format of 160915 and I need to build a query using the dates in the array, and the only way I know how to do it is to put the half of the query in a variable and then loop through the array concatenating onto the query until it's done, then executing the end result.
I've used prepared statements before, but only for inserting records, so not sure how this would work here, or even if it's possible.
 
6:09 PM
Any CURL experts in the house ? :)
0
Q: Trying to login with cURL , but it instantly Logs me out

Akshay L AradhyaI was trying to write a website scrapper that gets my college attendance from my college cms website ( http://bnmit.pupilpod.in/ )which is behind a login page. I was successfully able to get the hidden CSRF token by loading the page once and finding the token. When I then try to login by passing...

 
@Waxi First fix your date formats :P
 
@PeeHaa I can't because that's how they are stored in the database.
 
what's your desired syntax like? WHERE date IN (date1, date 2)? WHERE date < date1?
@Waxi then fix your database
 
^ that :P
After that....
9
Q: PHP - Using PDO with IN clause array

iRectorI'm using PDO to execute a statement with an IN clause that uses an array for it's values: $in_array = array(1, 2, 3); $in_values = implode(',', $in_array); $my_result = $wbdb->prepare("SELECT * FROM my_table WHERE my_value IN (".$in_values.")"); $my_result->execute(); $my_results = $my_result->...

 
I can't fix the database unfortunately, I have to deal with it. Let me look at this and see if I understand it, thanks.
 
6:11 PM
np
 
@Waxi can't you tell the clients that the way of dealing with it is to fix it? (sorry... :p)
 
@FélixGagnon-Grenier I wish that was the case, but this tool is internal, and the db I'm working with doesn't support the pivot command, which forced me to make a query the way I did, but now I'm in unknown territory in trying to accommodate that query.
This is what I'm looking at: i.imgur.com/GoT2P5c.png
 
@Waxi hrm... so probably I don't understand, but a few things
1. use parameters
2. you really want to add a condition for each of your dates array? you sure you don't want to run the query for each date time range?
3. fire the bloke who names tables a and b
 
I've used prepared statements/params before, but only to insert, wasn't sure if that would work for selecting. I will look at the code I've used for that and see if I can make it work for me.
I don't want to run a query for each date when I can capture them all at once.
And I named them a and b so it's easier to read.
 
a.empl? oh boy
 
6:24 PM
Yeah this database is pretty lousy. The date fields are not even date types. Some are strings, some are numbers, some are whatever, and then the convention is not even the same either, some are YYYYMMDD, some are MMDDYY, etc.
 
Yeah, I think we all get through that at one point or the other
if you survive, you'll get even better
 
Wes
wait, are there people still using asp 3 these days?
 
well, some people are still using @Jimbo's mom so...
 
Wes
:P
 
I think you guys have also been a bad influence on me
I'm not this guy.
 
6:27 PM
Do prepared statements / params work for all databases?
 
yes
...well, except MySQL 4.x (but you shouldn't encounter that in anything made in this decade)
btw, I would strongly recommend to pay as much attention to table/column naming as you do to variables in php
 
im look for a good ide for php in ubuntu what do u suggest
 
IDE, probably PhpStorm, but I personally am using Atom on my Arch
also, please use whole words
 
Does this look right? i.imgur.com/YPzlM83.png
I'm clearly over my head lol.
I don't get how all my dates are gonna get their own sum(case when) line.
I took apart a prepared thing I did for a previous project, but it was inserting, so a little more straight forward.
 
@Waxi no
also, why the hell you have a condition in the SUM()?
you could have simply set it in WHERE clause
 
6:41 PM
o/
Good evening
 
\o\
 
@tereško This is where I started: i.imgur.com/GoT2P5c.png
 
Omg
Code screenshot D:
Nooooooo
 
obviously he is unable to use gist.github.com
 
^^^^^^^^^^^^
Fking 1000 ways to post code.. He takes a screenshot
Oh dear lord
 
6:44 PM
I must have used a bad code site (didn't keep formatting), let me paste what I have and what I'm trying to achieve. Already spent 2 days on this and really don't want to concatenate a query from a bunch of strings because that seems so bad.
 
@Slayther just be grateful that he didn't embed it in a docx file
 
@tereško Omg please no
Ok, screenshots are totally fine.
 
@Waxi , can you write a query, that returns what you want in a SQL client ?
(you can even use phpmyadmin for all I care)
 
select
	job_detail.empl,
	employee_mstr.name,
	sum(case when job_detail.date_sequence = '160822' then job_detail.hours_worked else 0 end) as '160822',
	sum(case when job_detail.date_sequence = '160823' then job_detail.hours_worked else 0 end) as '160823',
	sum(case when job_detail.date_sequence = '160824' then job_detail.hours_worked else 0 end) as '160824',
	sum(case when job_detail.date_sequence = '160825' then job_detail.hours_worked else 0 end) as '160825',
	sum(case when job_detail.date_sequence = '160826' then job_detail.hours_worked else 0 end) as '160826',
That's the end result, I need to create this query from an array of dates.
 
Noite o/
 
6:47 PM
Nite \o
 
The only way I know how is to split this query, and loop through the array and concatenate for every sum(), but I'm looking for a smarter way of doing it.
 
@Waxi I am starting to suspect, thet the problem is in the DB structure itself
 
The db doesn't take a pivot command or I wouldn't have went this route of using a bunch of cases.
 
what is "pivot command" ?
 
SQL pivot.
 
6:49 PM
What is "SQL pivot" ?
:P
 
I think he is talking about many-to-many relation
 
lol seriously? It's when you turn the rows into columns in the results.
 
Lol what
 
when you turn rows in columns, it means, that your DB design is fucked
 
^
 
6:50 PM
Haha....omg I'm gonna lose my mind. Let me dig up where this allll started.
 
Who uses pivot?!
Wtff
 
@Slayther probably some SQL Server newbies
 
@tereško Yup, I would say so
 
And that's where I'm at now, trying to create this query from a loop, some really ghetto stuff.
 
do you know what normalization is ?
 
6:52 PM
What I wanted, could be done with a pivot, but my db doesn't support pivot.
No?
 
Database normalization, or simply normalization, is the process of organizing the columns (attributes) and tables (relations) of a relational database to reduce data redundancy and improve data integrity. Normalization involves arranging attributes in tables based on dependencies between attributes, ensuring that the dependencies are properly enforced by database integrity constraints. Normalization is accomplished through applying some formal rules either by a process of synthesis or decomposition. Synthesis creates a normalized database design based on a known set of dependencies. Decomposition...
 
Imma just go tweak my bot's code. Kthxbai
 
what you have been dealing with is a classical XY problem
 
I can't 'normalize' the database because it's used by the ERP software and what it is is what it is.
I don't know what I'm dealing with, but it's frustrating me.
 
instead of asking us for ideas to solve a problem, you decided on a solution and then asked us to help you fix your broken solution
 
6:55 PM
Doing a pivot here, paste.ofcode.org/PN6kBEz2DVXhQirYJSNCaQ, would have been the solution, but the db doesn't accept that command, the only other way to 'pivot' would be to use a case, which is what I did, but now I'm stuck. I'll do anything at this point.
I wanted to do as much processing as I could in the query.
 
you know what, I give up ... gonna work on JS widget instead
ktnxby
 
OK, time to post my problem on the site then.
 
Yeah, you just do that. Don't think at all about what you're doing.
 
What are you talking about? I'm on day 2 of trying to figure out how I'm gonna do this.
I've given clear information on what I did and why.
 
Exactly.
 

« first day (2161 days earlier)      last day (2802 days later) »