« first day (836 days earlier)      last day (2963 days later) » 

user4639281
10:00 PM
Anything I should know about what it is downloading? Anything that tells you about it?
 
Prob repository indexes
 
These IDE's are bloatware that are constantly doing updates. Can bring your system to its needs at times
 
It must be configured to check at each startup
 
VS2015 / Eclipse / IntelliJ no diff
 
looking for a way to disable that
 
10:02 PM
good luck
 
user4639281
Thanks, it still should download certain updates, I just don't know why it's download the eclipse stuff every time
 
Eclipse is so painful it makes one want to delete it
 
Do you have an entry like "Indexer" in the properties?
 
[ ] Download crap at start up
 
user4639281
@Tunaki properties?
 
10:03 PM
guess what's the status of that checkbox?
 
user4639281
@Braiam checked / readonly
 
The thing with Eclipse-like app is that they can do whatever they want.
And if there's no settings to disable that, you're pretty much sc***ed
 
user4639281
I can't run it here, because it is a windows app.
 
user4639281
But on tuesday I'll look for some settings, I don't think it has any.
 
user4639281
Is there any files that might contain settings?
 
10:05 PM
You're looking for the BUDS2.ini
 
user4639281
K
 
but it sets only Java options
 
user4639281
And in that file, what options am I looking for?
 
That's the thing, AFAIK, you can't disable HTTP requests from Java options
 
user4639281
Because it is the .bin that's doing the downloading, right?
 
10:08 PM
But, it looks like there are some URL in that
I see a DmetadataRepositoryUrl and friends. If you remove that, maybe it'll crash for not being able to download but you might still use it :D
 
user4639281
Oops, the french guy is here. Quick! Hide the evidence!
 
<-- French guy here also :)
 
^---- Yes
 
user4639281
@Tunaki I'll definitely check that out. I think the error was that it could not find a repository to supply that eclipse file.
 
user4639281
Damn, I guess I'm in trouble then aren't I
 
10:10 PM
That wouldn't happen to be https://api.brp.com/veh_serv_support/buds/update/repository/?
 
user4639281
Hmm.... I don't know.
 
user4639281
I think that it couldn't find the file in any of the repositories.
 
user4639281
Now, why would it have to add the repositories every time it loads?
 
default Eclipse settings. That you can disable in normal Eclipse.
 
user4639281
(p.s. it's actualy french canadians that wrote this, so it has nothing to do with the french guys in here)
 
10:12 PM
@Drew I am trying to get away from recursion :P
 
user4639281
@Tunaki So if I drop these repos, is it going to stop any updates that would otherwise be necessary?
 
user4639281
back in a minute
 
@FarazDurrani yes
There is no place in life for recursion
 
There is no place in life for recursion, See this chat.stackoverflow.com/transcript/message/29163663#29163663
 
10:16 PM
Or aggregation
 
@BhargavRao That's what I was thinking. ;)
 
Gotta sleep, Bye all ...
Remember [turtle]s in your queues :)
Bye o/
 
Bye @Bhargav
 
user4639281
back
 
You're in deep trouble if there are no settings to disable syncing P2 repositories on start up
No documentation says that this is possible
 
user4639281
10:27 PM
So I should be able to disable anything not api.brp.com and get away with it?
 
I'd try to remove those URLs in the config file. Maybe it'll fail but it'll still work correctly
 
user4639281
Yeah
 
user4639281
But the program does have to look for firmware updates for the vehicles it connects to
 
poop
 
Rob
hello
 
10:30 PM
linq in the house
 
user4639281
So... yeah I guess I just don't understand why it has to download these things every time and "add repositories" every time. Like, it doesn't store this information anywhere?
 
tg it is a nightmare
 
user4639281
This is why I don't do Java.
 
if you think VS201x is so much different, I would turn on the router TB counter
Chrome is no different
 
user4639281
I think ECMAScript Harmony is better.
 
10:33 PM
All these environments want to keep you happy and assume you are on Mogzies new Fiber network. Most of us arent
 
@TinyGiant Isn't related to Java :)
 
user4639281
My environment is a text editor.
 
It's Eclipse being Eclipse.
 
user4639281
Ahh, just an eclipse thing.
 
That is no text editor
 
user4639281
10:35 PM
@Drew what is no text editor?
 
Eclipse is no text editor. It is the Pentagon
 
user4639281
I don't use eclipse. I use GEdit
 
user4639281
Or sublime text if I have to use a windows computer
 
Eclipse-based application are... how to put it... poop by design
 
user4639281
Ahhh k
 
user4639281
10:36 PM
I wish I could contact the developers.
 
user4639281
Link them to this discussion lol
 
Have you ever used Lotus Notes?
 
user4639281
No
 
I use sublime. I mean all of it. They want you to have the greatest and latest. Are you on a new lessor network recently TG that is matters (dare I ask)
 
user4639281
what's a lessor network?
 
10:37 PM
Good for you. It's supposed to be an email client. THe first version where Eclipse-based and oh god were they a pain
 
One that say lacks the bandwidth and life is different now
I used to work for Lotus. I cannot begin to tell you the horror stories of Notes
 
user4639281
My internet at home sucks, and the one at work is slightly better.
 
@Drew You did?
 
yep
and rolled it out to many in nyc banks
 
I must have cursed at you a couple of times then.
 
user4639281
10:38 PM
@Tunaki So... if I remove just the eclipse urls, am I going to break further updates of the program?
 
every third banker had to have a Notes Server
 
Maybe, maybe not. No. Idea.
 
user4639281
Lol, K
 
I used Notes 7.5 for a couple of years. 7 before that.
 
user4639281
Well... they release notifications on the website every time there is a new version of the program, so I'll just reinstall it every time there's a notification.
 
10:40 PM
Well, I was forced to use it.
 
I worked at Lotus. Met a girl. And left Lotus
Mission accomplished
 
user4639281
Mission impossible accomplished?
 
split?
 
The best thing that ever happened to Lotus was another company for MSFT to tear apart
 
@JarrodRoberson was just reading that :D
 
user177800
10:45 PM
@Drew eclipse is an alcatraz, shitty excuse for what it is and completely ineffective at the same time
 
whats the solution, i like sublime and sbt and maven
 
user4639281
What's wrong with sublime?
 
I like Eclipse also. Integrates well with Maven and Git.
Especially Git because I can't write a single Git command with pooping mysekf
 
I cannot stand eclipse
 
user4639281
I don't use any of the fancy features, I just like it over notepad because it has syntax highlighting and a dark theme.
 
user177800
10:47 PM
Inteliij IDEA Ultimate for Java, Groovy, Python, Javascript, HTML, CSS, ANTLR4 and Erlang ( anything is a waste of time ) and Sublime Text 3 for everything else.
 
when you simply cannot get in and out without it consuming your bandwidth it is a nightmare
 
Meh I don't care about that at home. But at work, it is a pain yeah. Hidden behind all those proxies
 
user4639281
@Tunaki Just hack yourself a hole
 
I only use Eclipse for development purposes. Every other file is opened with Notepad++
 
like love letters?
 
10:50 PM
yeah
 
the french
 
I hate .doc
 
user4639281
I like .odt
 
I like .py
 
doc and docx is a nightmare
why won't people publish PDF
 
10:52 PM
true that
 
user4639281
I like .js
 
I like .tex
 
user4639281
I hate jquery
 
user4639281
Why don't people just learn how to use the native DOM API?
 
Because IE?
 
user4639281
10:54 PM
IE < 11 is not supported by MS...
 
Tell that to 95% of the companies using it
 
user4639281
I try, they don't listen.
 
user4639281
Anyways, I try to write things to be compatible for at least IE 9, I don't care about IE 8
 
You'll lauch so hard. One app I'm maintaining right now only works in Firefox 3.0.9
 
user4639281
@Tunaki ... why?
 
10:56 PM
any other version makes it crash.
@TinyGiant dunno
 
Rob
I think people know how to use the native dome API but $('#myID') is so much simpler than document.getElementByID('myID')
Not to mention almost every site uses it, and if you use a CDN it's not really much extra weight
plus things like .hide() .fadeOut() are so much simpler
 
user4639281
It's not even the extra weight of it, it's that it makes programmers lazy
 
lazy is good. I like being lazy
 
user4639281
No one cares about performance any more.
 
Rob
I think the terrible native API is what makes people lazy ;)
anyway brb
 
user4639281
10:57 PM
They just care about writing code quickly and getting paid for it.
 
writing .hide() is so much simpler than setting the style to display none
 
user4639281
Yeah, but how many people don't know that hide sets the display to none?
 
user4639281
@zondo one of your messages about something sounding stupid in the python room was just flagged.
 
user4639281
$('someselector').on('click', function()
{
    $(this).text('something else');
    $(this).addClass('something');
    $(this).animate(/* some other crap here */);
});
 
user4639281
^^^^ What's wrong with that?
 
11:00 PM
chain the calls
 
@TinyGiant Thanks. I'll remove it, though I don't see that it's offensive to anyone.
 
$(this).html('whatever').addClass('foo').click(function () { ...});
 
user4639281
4 jQuery objects, to do something that is extremely simple without jQuery
 
Scratch that. I can't remove it.
 
user4639281
@Tunaki You shouldn't use .html unless you're actually passing it html
 
11:01 PM
ah true that
 
user4639281
It sends everything through the HTML parser, which is just more overhead.
 
user4639281
@zondo I wouldn't, you probably just hit someones butt-hurt button.
 
user4639281
I've had many of my chat messages flagged in the past that were totally innocuous.
 
Well it's really awesome when you can do something like .filter('selector') or filter(function () { something } It reads nicely
I guess that's why people use jQuery so much: it's powerful, has a fluent API almost like writing English and compatible with all browser you can think of
 
user4639281
jQuery is very implicit. Which means that it works, but you don't necessarily know what is going on behind the jQuery calls.
 
11:07 PM
nor should you care really
 
user4639281
When you use the Native DOM API, you are explicit with what you're doing.
 
user4639281
You should care.
 
user4639281
just because a jquery call is 16 characters, doesn't mean it is something simple.
 
user4639281
The reason I like using the DOM API, is because if something takes 50 lines of code, you may not want to do it 50 times in a row, without thinking about the consequences.
 
user4639281
JavaScript can get very slow, very quickly, especially when using jQuery
 
Rob
11:09 PM
Honestly, though, unless you're having performance issues it's not something to worry about
And for 99% of use cases, even wasted/redundant calls such has $(this)x4 will be neglible
If you're building a one-page app, then maaybe
 
user4639281
jQuery's .closest is a horrible, horrible construct. It uses massive amount of resources to do something that could be done simply otherwise by just selecting the element that you're looking for. Yet it is used very widely.
 
Rob
Personally I don't do the continual $(this) stuff - just storing it in a variable. But really, the amount of extra work to gain <1ms performance really isn't worth it until you can prove its a bottleneck
That being said I'm usually on the server side, not front end - so my js isn't always 100% perfect
 
.closest is nice. What would you recommend?
 
user4639281
Changing your thinking about it.
 
.parents returns all the parents
 
user4639281
11:11 PM
I wouldn't use closest or parents or parentsuntil, ever.
 
Just .parent()?
 
user4639281
First, find the parents you want, then find the elements within that that you are going to be accessing. Find all that up front. Then when you need to access the , reference the elements directly through your dictionary.
 
user4639281
You shouldn't actually be querying the DOM at all during an event.
 
user4639281
You should already have all of that information stored somewhere.
 
user4639281
Check out funcs.getPosts in the NATO script.
 
user4639281
11:14 PM
Right off the bat, all I do is find all of the elements that I'm looking for.
 
user4639281
After I've done that, then I do stuff with that, I don't query the DOM after that.
 
user4639281
Let's take a look at that script you wrote.
 
user4639281
  $('.post-menu:not(:has(.timeline-link))').each(function() {
    var $this = $(this);
    var postId = $this.find('a.short-link').attr('id').split('-')[2];
    $this.append($('<span>').attr('class', 'lsep').html('|'));
    $this.append($('<a>').attr({
      'class': 'timeline-link',
      'href': '/posts/' + postId + '/timeline'
    }).html('timeline'));
  });
 
yup
 
user4639281
11:17 PM
So, if that were allowed to load every time I requested a post on the NATO page, it would select every post on the page, then check if it has a timeline-link, if not it would run that code.
 
user4639281
every time I load a post
 
user4639281
That's querying the DOM 50 times at least every time I load a post
 
Actually I wondered why my timeline links were showing up 50 times yeah
And I had to add that :not(:has(.timeline-link)) non sense
 
user4639281
let posts;

if(!postid)
{
    posts = Array.from(document.querySelectorAll('.post-menu'));
}
else
{
    posts = [document.querySelector('[data-questionid="' + postid + '"] .post-menu,[data-answerid="' + postid + '"] .post-menu')];
}

for(let post of posts)
{
    const postid = (/\d+/.exec(post.querySelector('a.short-link')) || [false])[0];

    if (!postid)
    {
        continue;
    }

    const lsep = document.createElement('span');
    lsep.className = 'lsep';
    lsep.textContent = '|';
    post.appendChild(lsep)
 
user4639281
So, I actually pass the post id to the function from the ajax listener.
 
user4639281
11:20 PM
Which means that it skips the querySelectorAll line, and just selects the first element with a matching postid
 
user4639281
So we only query the DOM once per request.
 
user4639281
Do you see how jQuery makes it very easy to do very process intensive things, without thinking about the consequences?
 
user4639281
When you're explicit about what you're doing, it's very easy to see when you're going over the top.
 
I think I could be able to write that ES6 code with jQuery
I'm still wondering where the data-questionid comes out of
 
user4639281
You could write it with jQuery, for sure. But it wouldn't be explicit.
 
user4639281
11:33 PM
@Tunaki look at the xhr listener.
 
user4639281
I pull it from the response HTML, then send it to the addTimelineLink function, so we don't have to query for all posts
 
Haa
/question" data-questionid="(\d+)/ is setting the data-questionid to the matched element in the regex?
 
user4639281
That gets the id from the response HTML, then (because our listener runs after the existing listener) we search the document for that html.
 
user4639281
document.querySelector('[data-questionid="' + postid + '"] .post-menu,[data-answerid="' + postid + '"] .post-menu')
 
user4639281
That searches the document for elements with the attribute data-questionid or data-answerid where the id is equal to the one we pulled from the response HTML.
 
user4639281
11:38 PM
Now, querySelector stops on the first element it finds, so I know that it will only ever return one element.
 
but something has to put data-questionid somewhere. It isn't returned by defautl
 
user4639281
It is though
 
huh
 
user4639281
log the xhr.responseText to the console in the event listener.
 
ha you're right
 
user4639281
11:41 PM
lol
 
Who here has any idea what could be considered a minimum victory condition for something this room can achieve in the next month
 
haaa now I understand it better
<div class="question" data-questionid="..." >
 
user4639281
So now you can select it by that
 
And you can't use the jQuery magic $('.question').attr('data-questionid') because it hasn't yet been inserted in the page
 
user4639281
Exactly.
 
user4639281
11:45 PM
You could do $(xhr.responseText).find('.question, .answer'), then find the attribute, but that would be horrible.
 
And here I thought it would be easy to add a timeline link below each post
 
user4639281
Because then you're sending the HTML to the parser, then querying the results for the post, only to find the questionid
 
As an exercise, I'll try to rewrite your script without ES6.
Ah but wait
You said I could listen to raw XHR request with $(document).addEventListener?
 
user4639281
$(document).ajaxComplete
 
user4639281
But that won't work for the NATO script, because I don't use $.ajax
 
user4639281
11:48 PM
I use raw XHR's
 
user4639281
You can do it without ES6 nonetheless though.
 
@TinyGiant Yep, just read that stackoverflow.com/a/2912076/1743880
What do you think of that? stackoverflow.com/a/5202999/1743880
 
user4639281
@Tunaki Completely unnecessary
 
user4639281
^^^ That is ES5
 
user4639281
11:54 PM
@Tunaki That is only necessary if you don't have addEventListener
 
I'll sleep on it.
Cya o/
 
user4639281
Cya o/
 
Cya o/
 
Cya o/
 

« first day (836 days earlier)      last day (2963 days later) »