« first day (2357 days earlier)      last day (2583 days later) » 

12:00 AM
apple can kiss my @$$ for not letting other people use the magnetic charging ports
 
You can just put your phone in a toaster to charge it on some newer android devices
 
You owe me a phone.
and a toaster
 
Bees aren't even real
 
A conspiracy by the chinese to make americans scared of plants.
Luggage 2020
 
12:07 AM
A lot of people on that sub grow weed and keep bees
 
I don't go to reddit
 
What are you guys gonna do for april fools day
 
avoid a lot of sites.
 
same thing I do every day
not much
 
12:12 AM
Stay home and get extremely intoxicated
 
my favorite ep was when pinky made the fruit float with telekinesis and brain asked "how did you do that". "ohh it comes and goes"
memories
 
Shit yeah it's a saturday
 
ohh the memories
 
I'm gonna get trashed
 
go trick or treating
and when they go, its not halloween
tell them "april fools!"
 
12:13 AM
For April Fools day?
 
Gonna get schwifty
 
and then run away from the police probabyl
 
@ndugger Awww.... yeah.....
 
@Meredith Hockey tournament
 
someone in the comments thinks that crystal is the best hot sauce lol
it's literally pepper flavored vinegar
 
12:21 AM
it is to hotsauce what yellow mustard is to mustards
 
Yeah exactly
 
and some people like yellow mustard better than the others..
 
No one's favorite mustard is yellow mustard though
 
Gospel.
 
I claim there are.
 
12:23 AM
I mean obviously there are but they're all from the midwest so it doesn't count
 
I like the green milder tobasco.
I don't have a favorite non-mainstream sauce, i just grab something new and try it out
 
Yeah that one is good
 
@Meredith I'm kind of annoyed that Vivaldi browser doesn't let me drag a tab to a new monitor and create a new window
@Meredith anyway to import history from Chrome
 
12:47 AM
Don't think so
 
I figuired it out. Import "bookmarks" also lets you import history and passwords
see above
 
You should be able to right click a tab to move it btw
Oh cool
 
Awesome.
Not as easy as dragging, but better than nothing
 
Yeah it's still pretty new
 
1:16 AM
I never realized anime is so modular
 
ISS is doing another spacewalk tomorrow
 
@KendallFrey where can I stream?
 
NASA TV, I assume
They have a YouTube channel
 
YouTube is more entertaining because you have flat earthers and alien hoaxers to debate
 
@rlemon LOL
that is awesome
 
I quite like it
 
I don't
 
@KendallFrey What is that?
 
jk bro
 
1:30 AM
It looks like the Canadian flag
 
It's my KSP flag, 3D printed and painted
 
KanadianSP
 
exactly
 
1:48 AM
4 hours ago, by rlemon
user image
@ndugger Kendall Space Program
 
 
2 hours later…
3:57 AM
morning
 
4:13 AM
Question for Angular (4) Developers:

I have a route that takes in a username as a param: /user/:username

ex: { path: 'user/:username', loadChildren: './user/user.module#UserModule'}

If I navigate from within in the app via button click, it navigates to page correctly "BUT" if I change the username param in the url, it breaks? Any ideas?
 
4:25 AM
how does it break?
 
figured it out
Missing: <base href="/">
=)
To be more clear, issue was pasting url with parameters
 
4:49 AM
how would you wrap this GM code into a single line (when called) function:
GM_xmlhttpRequest({
  method: "GET",
  url: "http://site.com/",
  onload: function(response) {
    alert(response.responseText);
  }
});
i seem to get errors, might be the way greasemonkey uses the code but i probably just did it wrong
 
 
1 hour later…
6:07 AM
anyone get openid connect here?
 
6:27 AM
@Loktar please deny the reminder invite
i accidentally did it
 
6:38 AM
@rlemon you can visit your neighbor virtually
 
Morning, Do you guys have anything like code of conduct for developers ?
 
@Mathematics How do you mean?
Like coding style enforcement?
 
i want some more explanations on that too
 
Also morning folks o/
 
@MadaraUchiha something like this - acm.org/about/se-code
I meant your workplace...
 
6:42 AM
@Mathematics "Don't be a piece of shit" is the general rule
Other than that, I don't think so, no.
 
@MadaraUchiha well some developers like to play down others and without any rules I can't say much
 
companies can have their own coding rules / styles but that usually doesn't make a big difference. Discussion may occur about naming convention, but I see that as a part of socializing
 
@Mathematics That falls under the category of "being a piece of shit".
 
at my work place, regardless of what idea or improvement I come up with.. 2 of devs... just can't digest it and keep prejudice my efforts
 
like the negation !. Some companies insists to use a space after it, other without, another one doesn't give a fuck
the most important thing is consistency imo
 
6:44 AM
@KarelG They consistently try to play me down lol
 
@Mathematics If you have someone to complain to, like a team leader or the CTO, do that
 
and I can't leave this company because I am on visa.. at least for another year
 
That's why employer visa sucks so much
 
@MadaraUchiha can't tell you how much I hate it
However I liked the idea of introducing this code of ethics and then use it to make any claim if still needed
 
you have chosen for that. Sometimes it ends good, sometimes it ends bad
what's the main problem actually?
awkward coding styles ?
 
6:49 AM
@KarelG whenever I make an improvement or suggest something - 2 of us 3 in our team starts questioning me like FBI
 
morning
 
or make comments like I have done a absolute rubbish job
 
can you give an example of your improvement? (just one method with lots of changes)
 
because it's a mix up of backend/frontend and SharePoint which most of us hate here lol it's difficult
but here we go we had been using jQuery in projects and I suggested AngularJS for what looked like a SPA project to me..
Developers initially started picking up on me like it's stupid to use AngularJS it's very hard, it won't benefit etc etc... informal chats but infront of everyone as office is open plan

few months later same devs wrote everything they did in jQuery into AngularJS without saying a word to me or anyone else.. I didn't said much
 
Hello
 
6:58 AM
hi
 
Are you into typescript?
I've got a little question about debugging
 
@SteamFire Go ahead
 
@Mathematics try to build up your file. document things. Be well-prepared. And then go to a high level manager. Or HR dep
sounds they're using you as a caddie-boy
 
That ^
 
btw madara, is there no limitations on SO profile names ?
his name is in caps and is too long to disturb me here
 
7:03 AM
When I'm running my code, it seems that it exists some differencies between compiled code and my source code. Is it possible?
 
@KarelG There are a few limitations, but I'm not sure what they are
@SteamFire Well, it's compiled, so of course the would be differences.
 
yeah of course
 
It also depends on the level you emit
Classes don't exist on ES5, etc.
 
An object that I'm giving to a function is undefined but if I follow my code step by step in TS, it doesn't seem so, when I watch this object it seems well declared
but when I do it with the compiled code, it is undefined
I'm running my server in server:dev:hmr
 
How does your TS code look like?
And how does the compiled output look like?
 
7:09 AM
@KarelG thanks, you are right on that :)
 
1 message moved to Trash can
@SteamFire Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
your ctrl+k was bit too late :P
 
yup
 
feel free to repost it
 
oh caprica, I missed you
 
7:11 AM
Don't repost it
one second
1 message moved from Trash can
 
mod powah
 
1 message moved to Trash can
@SteamFire Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
oh
 
!!afk staff meeting. And coffee. And secretary memos. And whatTheFuckIHaveToDo
 
7:12 AM
hahahaha
public patientConfig:any = {
    paging:true,
    sorting: { columns: this.patientColumns},
    filtering: {filterString: ''},
    className: ['table-striped', 'table-bordered']
};



public ngOnInit():void {
    console.log(this.patientConfig);
    if (this.patientConfig != null) this.onChangeTable(this.patientConfig); //I pass my object there
}
better indentation...
when I console.log it, it is also defined
 
Where is it not defined then?
 
1 message moved to Trash can
@SteamFire Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
having trouble with caprica
    public onChangeTable(config:any, page:any = {page: this.page, itemsPerPage: this.itemsPerPage}):any {
            //if ( config != null ){


                if (config.filtering != null) {
                    Object.assign(this.patientConfig.filtering, config.filtering);
                }
[...]
}
 
@SteamFire Why is everything any?
 
7:18 AM
yeah
checking it
 
@SteamFire any means "I don't want TypeScript to help me with typechecking here"
 
it's not useful there
 
Which is fine if you have a lot of code in JS that isn't well typed, and refactoring it would take a while
 
but I could declare it as an object or make an interface
 
But these seem like little snippets
 
7:19 AM
it's snippet
 
@SteamFire Yeah, declare a Configuration interface
And have onChangeTable accept a Configuration argument
The object itself doesn't need to be typed, TypeScript will infer its type.
 
oh, or as an Object
i'm using Object.assign()
problem is that I use a little library for tables in angular2 and the config object is passed to it lather
Mmmm, it first run this function at initialising
there the object exist
and then, when I'm performing action that use this function, it seems erased, it's maybe not a compilation problem.
    PatientsPage.prototype.onChangeTable = function (config, page) {
        //if ( config != null ){
        if (page === void 0) { page = { page: this.page, itemsPerPage: this.itemsPerPage }; }
        if (config.filtering != null) {
            Object.assign(this.patientConfig.filtering, config.filtering);
        }

this is the compiled code
 
8:15 AM
just read that Amazon's founder Bezos has added +10.2 billions to his wealth in one year.
 
8:26 AM
Me too :-P
 
@FrancescoPasa Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@FrancescoPasa You added +10.2bn to your wealth in one year too?
Good on you.
 
@MadaraUchiha Maybe if you remove 6 zeros I'm there!
 
Hey guys. What JS library should I use for adding/removing permissions for a user?
I have made a CMS system. In this system I can determine what workplaces the worker is allowed to work at
Everything works in the backend (php), but I need a "pretty" way of doing this
For example drag and dropping work places the worker is allowed to work at / adding workplaces from search list
 
angular 2
 
8:39 AM
Bascially SELECT and DELETE options
 
huhu
no, that's overkill
 
I can "do" it by using PHP, as I have made the appropriate ORM classes for each table
But I want most of it to be made using AJAX
Any good library choices for this?
With library choices I mean specific libraries meant for (example) CRUD list operations
 
Can We get attr of href from different site and display it ?
 
@RameshKharbuja Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
8:54 AM
Solid first post.
2
 
combo
 
9:19 AM
can this read only object being shortened ?
const Memory = function(o) {
   const content = o;
   return {
       get content() {return content;}
   }
};
with that i can simply use const m1 = new Memory('hello'); then pass it around
 
I mean... you can always just use whats there... like Map() or WeakMap() to store data
but other than that... closing over data and return a functional value is quite common in ecmascript
 
@KarelG try
const Memory = (o) => Object.freeze({
    content: o
});
then ...
const m1 = Memory('Hello')
no new needed :P
 
@Shrek const Memory = content => Object.freeze({content});
 
problem with that object freeze is that assignments is handled silentlyu
forgot to place a setter there
set content(_) {console.log('no');}
and it is for multiple objects
 
NO SIRE
they are not handled silently
They are just ignored ;) unless you are 'STrict'
which you should be @KarelG
!!> (() => { 'use strict'; a = Object.freeze({a: 5}); a.a = 6 })();
 
9:35 AM
@Shrek "ReferenceError: assignment to undeclared variable a"
 
uff -_-
!!> (() => { 'use strict'; const a = Object.freeze({a: 5}); a.a = 6 })();
 
@Shrek "TypeError: \"a\" is read-only"
 
Also we need an Object.deepFreeze :D
 
errr ... that isn't ignored. the error is thrown but not shown. unless you're in strict mode
 
The error is either thrown or not thrown
it can't be thrown but magically handled
 
9:55 AM
May someone have a look at this code: kopy.io/obUVp
I cannot find the mistake
 
Hey everyone, i´m having a problem refreshing a ul on my app and i was wondering if someone could help me, the thing is, when i enter the app the i´m creating a listview dynamically throught ajax and everything works fine here, but i have a button to check who´s near me that is suppose to refresh the listview based on a calculation, well..what happens is that the listview dissapers and the screen stays all white...
i have tryied: $('#listaParceiros').trigger('create');
and also this : $('#listaParceiros').listview().listview("refresh");
i have searched a lot and nothing seems to work
 
in mongodb is it possible to make two searches in one go
like counting total values related to company
and then active values from those
for e.g imagine a schema with company_id and active identifiers
I want to extract company_id match and one match with both company_id and active identifier
 
@GandalftheWhite so a complex or nested query?
 
is it possible to do it in one go
Mongodb
 
7
Q: How to make nested queries in MongoDb that works like nested Sql select queries

ssnI want to make an efficient query in MongoDb to find all users who have their userids listed in a usergroup. Ideally I want to make this as a single request to Mongodb. What I want corresponds to nested selects in SQL. I have tried this in the mongo shell: db.user.save({_id:"u1", Name:"u1 name"}...

 
9:59 AM
^ answer: use PostgreSQL
 
yep
 
Mongodb wont help me to do that
 
Postgres forever!
 
so either I make two queries or loop over the result
:l
Dayum
 
well its mongo :P
 
10:00 AM
it's just that Postgre has an engine for document storage, taht supports joins
 
and actually performs better than mongo
and is way more reliable :D
 
We have had our fair share of problems with MongoDB
given that our use case is such that we need better performance for simultaneous writes
and not reads
 
@tereško Wait, you can join using JSON?
 
Hi Guys can any help me in solving this
 
@kirankumar Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
10:03 AM
@BenFortune yes
 
omg
 
@BenFortune now. go back to your mysql at work :D
 
I have 10 html elements for which i need to generate the events at run time for the 10 elements i need the on change and on click events
 
10:19 AM
@BenFortune been there since 9.3 IIRC
 
@BenFortune heck even I knew about that
 
also json support got improved lately
but people treats postgresql as nosql db which isn't. Those "json" datatypes is just ... a type
 
@tereško you should write a blog post about how to use postgres sanely.
 
I would need a blog to begin with
and it would probably mostly contain rants about OOP and MVC :(
 
hackernoon ?
Aside I really like this project postgrest.com/en/v0.4
 
10:29 AM
0
Q: Javascript click start / stop interval function

MicheaslI want to start a interval / function if the user clicks on a button and stop that if the user clicks on stop. But somehow it immidietly starts the startRecord function. What am I doing wrong. HTML: window.onload = startRecord; startRecord = document.getElementById('startRecord'); stopR...

 
@Micheasl Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
10:46 AM
Please be aware that using setInterval may cause issues if the callback fn takes more time than the interval itself. If less accurate timings are OK, I prefer to use setTimeout, that calls itself at the end of the callback fn.
 
Does anyone have an idea to make this code kopy.io/Zu1Yr nicer?
 
@SvenvandeScheur Interval/timeouts in general is something that I try to avoid vehemently.
 
@MadaraUchiha That's a sane thing to do, however sometimes a timeout is
inevitable.
If only to push thing on top of the scheduler stack...
 
11:01 AM
@SvenvandeScheur Promise.resolve().then()`
 
Oh yes, but that not always something you can do, in many cases a promise is available, but not always
 
@SvenvandeScheur What project (that I would want to develop in) doesn't have at least Babel?
 
Even if babel is available, your scope simply doesn't always have a promise to hook into... If you want code te be executed AFTER that "thing" is done a timeout may come in handy (even with the actual time set to 0)
 
@SvenvandeScheur Then you create a Promise
 
setTimeout pushes things to the end of the scheduler so all (semi) async stuff get done first.
 
11:03 AM
Hence Promise.resolve().then()
@SvenvandeScheur I know what setTimeout does
 
@SvenvandeScheur Promise.resolve() is static
 
Example:

We have a project that uses jasmine for unit tests. It's also a project that heavily relies on async stuff. The XmlHTTPRequest stuff at the very bottom has been mocked out by jasmine-ajax so any HTTP request resolves instantly with a stub (for certain tests).

The ajax calls are called by a data store that's called by a view, that's instantiated by the framework (Aurelia) we simply do not have direct access the request object hence we do not know then the request resolves.

We do know that it resolves instantly after it's next tick so we just have to make sure our code "ticks" af
 
@SvenvandeScheur You ajax function should return a Promise (like fetch()), which makes it even easier to mock because then your mock just becomes
 
It retunes a promise
 
mockResponse = Promise.resolve(myMockResponseObject);
 
11:09 AM
yet its layed in the code, the view does not export the request since tit doesn't need to
 
@SvenvandeScheur Once you enter the "world" of Promises
Everything async needs to return a Promise.
If your view relies on async things to render itself, it's expected of it to return a Promise when it finishes too.
(Even if it isn't the Promise of the request itself)
 
The project is built around promises, the case I want to make is that there are edge cases in which (even when you don't want to) use timeouts to the scheduler trick.
 
Being in an intermediate state where some async things happen with Promises, some with timeouts, some with callbacks, and some with no indication that they finish, is a very dangerous place to be.
 
@SvenvandeScheur That's unreliable at best.
Counting on the timeout(.., 0) to be called before the Promise gets resolved
It's definitely not something you should count on in a test.
That's how you get flaky tests in JavaScript.
 
11:12 AM
@MadaraUchiha if you know what you are doing, you can count on job/task timing
GraphQL is heavily based on it
 
I didn't say it was nice... The alternative is however exporting each and every request to the outside world from the views. Which is also hairy as it will become increasingly complex to refactor stuff.

We don't "heavily" rely on this trick but our project is complex enough to have few edge cases where this happens. We use promises and async stuff all the time (from ajax requests to indexedDB stuff) but sometimes we have to rely on the scheduler to solve things.

In most cases the simple reason is we have no direct access to the "thing" thats async. Providing that access wil do more harm t
 
@Mosho We're eating a lot of shit right now because a certain Flux system relies on that
FYI :P
@SvenvandeScheur No, if your view is asynchronously created, then the function that creates your view should itself return a Promise
Then you can wait on that
 
The view is not async
the view has content thats async
We have no function that creates the view
 
@SvenvandeScheur So your view is a sync function that accepts data and outputs "View" yes?
 
Aurelia creates the view
 
11:17 AM
@SvenvandeScheur It's conceptually a function
Even if it's not implemented as an actual function.
 
Which we do not have access to
It's actually a class (so yes technically a function)
 
@SvenvandeScheur Then what are you testing?
You can't test something that you don't have an access to
What is your unit under test?
That unit can be either async or sync. And if it's async, you use Promises.
 
We control bits of the view using "stuff with things that make shake and run away" and then actually run in a browser (because of reasons) we provide access to the browser but the actual "view" code is outside the scope our code can reach. If we simulate a click on a button the view WILL request, and the XmlHTTPRequest mock WILL kick in but we DO NOT have access the request.

However, since we know that even do the request is async (yet wo do not have a promise) and is resolved on the next tick we CAN rely on a timeout to make sure the resolved state is available.
 
@MadaraUchiha like I said, "if you know what you are doing" :P
 
This is not a situation we typically prefer but is required for a specific project.
In a differen project we actually kick in a backend server, a frontend server and run full integration tests against the frontend data stored and there logic.
And in those scenarios we DO have access to the promises and DO use them.
lunch awaits
 
11:24 AM
Why does bootstrap apply some styles to the body element? It's destorying the style of my website. I don't understand... shouldn't bottstrap only apply a style when explicitly reuired?
required
 
@ErroreFatale I think you're not in the right channel
 
@SteamFire it seems that most web developers sty here. Other channels are empty
stay
 
you're right
 
11:58 AM
@ErroreFatale no, not really. which styles cause you problems? probably the reset styles?
 

« first day (2357 days earlier)      last day (2583 days later) »