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

00:31
translate: translate: translate: translate: @monners What's up
translate: translate: translate: @monners What's up
:(
I hate you
m59
m59
00:49
@Loktar are you using gulp-sourcemaps?
I believe so
only using sourcemaps on an older project (from like April)
but pretty sure I ended up using the gulp-sourcemaps plugin
uglify didnt support them yet via gulp iirc
m59
m59
.pipe(sourcemaps.init())
  .pipe(concat('components.js'))
  .pipe(uglify())
.pipe(sourcemaps.write('build'))
.pipe(rename('components.min.js'))
.pipe(gulp.dest('build'))
I'm not getting a map :(
Uglify is supported now (supposedly)
you get nothing at all right?
m59
m59
hmm, maybe it's mad at the rename
I get the minified file with a comment about a sourcemap that doesn't exist anywhere
I had that same issue Ill vpn real quick and look at my gulp file
m59
m59
00:52
There's not much info on gulp around.
haha yeah it can be a bit frustrating
but man its so much faster than grunt
and easer to use
alright logging in now on sec
m59
m59
ah!
@Loktar np, it was the rename
00:53
oh ok cool so it works now?
m59
m59
which brings up plenty of other questions haha
kinda
 return gulp.src(paths.campaignScripts)
        .pipe(stripDebug())
        .pipe(uglify('campaign.min.js',{
            mangle : {
                except : 'navigateStep'
            },
            outSourceMap: true,
            basePath : '/scripts'
        }))
        .pipe(gulp.dest(paths.build));
ah I remember I ditched the sourcemaps plugin
and ended up using uglifyjs
and it works great
gulp-uglifyjs
thats what I used for uglifying because it had source map out support
m59
m59
I'm thinking that I should break up what I'm trying to do a little more
I was trying to get a concat full version and concat min version using the same concat. Probably better to just build each one by themselves.
At least much easier to read :)
yeah I try not to have any intermediate files
just all my sep .js's in my dev directory and my minned in the /dist directory
m59
m59
If I concat my dependencies which are already minified with their own sourcemaps, will they get associated?
or would I have to minify them from their own src?
01:00
not sure..
m59
m59
I'll find out, then :)
youd need to minify from source
otherwise it cant assoc them tmk
but yeah try it
I have 2 sets for our site
m59
m59
sounds too good to be true heh
vendor, and ours
m59
m59
I'm getting an error in a dependency that I wrote :(
impossible to debug lol
01:01
ah yea
lol need sourcemaps for that
m59
m59
yup
hey is anyone using gulp-minify-html
?
yea
commnets options is not working?
it deletes IE conditionals commments
hmm I didnt have that issue, but I just ran it with the defaults
main issue I had was some elements looking weird due to collapsed spaces
01:03
-)
gulp.task('minify-html', function(){
gulp.src('index.html')
.pipe(minify_html({
quotes: true,
comments: false,
conditionals: true,
}))
.pipe(gulp.dest('./dep'));

});
anoying
..
m59
m59
Yeah, I dunno. I use jade
2
Ive never watched a talk hes given
I like him
m59
m59
WordPress ahhhhhhhhhhhhh
haha yea
01:36
Is there a breaking space?
because I could reaaaaaly use one right now
yes trying to remember wtf it is
I had to use it for email templates
oh, wait, it's mis-calculating the width of the container
I think
m59
m59
....
Why must I troll myself.
 , &emsp
m59
m59
I modified the same task like 20 times trying to figure out why it wasn't doing what I expected. I was running a different task the whole time.
01:41
@m59 haha shitty
-)
it happens
m59
m59
Hour 10/10 for the day is the worst hour lol
cant find the w3 spec I read them in earlier in the year, but i had never heard of ensp or emsp before that
/me goes for a run
m59
m59
01:44
have fun!
we're adding 6 more &nbsp than we need?
How can I determine the height and width of a character?
do I need to create an element?
Canvas has a method for measuring text
We have an embedded terminal in our page
it needs to know it's size, with regards to columns and rows.
I only know the size in pixels
          var x = Math.floor($termElem.width() / CHAR_WIDTH);
so far is the best I have
with CHAR_WIDTH being determined manually
I think that's a reasonable way to do it, even if it involves creating a temporary canvas
02:00
emsp; takes on the width
but yeah the canvas option is a good one for perfect measurement
oh you need to create an element the exact size I see so yeah use the temp canvas
kind of odd there isn't another method to measure the length though w/o using a canvas..
@copy Doesn't look like I'm allowed to set CSS stuff
>
Hello people I am starting a company called AABraham Tech, There's gonna be a selling department, an IT department, a web designing department ect, estimate company growth after 3 years 10.5 million. But I have many problems now I need some one to control the selling department, IT department, Web designing department many more to come but if you are interested in helping me send me an email to [email protected] you don't need to send a resume just tell me some qualifications and I'll tell you some open spots.
lol
that last sentence "just tell me some qualifications and I'll tell you some open spots."
> gonna be a selling department
FUCK YOU ISCROLL!!
I wanna meet the person that decided it'd be a good idea to wrap every fucking page in an iscroll instance and punch them in the mouth.
Sounds reasonable
02:06
Now nothing can scroll unless it's an iscroll instance
.width
idk if thats viable, but just measures a single space, should be the widest char id imagine
a tad less overhead than with canvas
it's a monospace font, thank heaven for small wonders
m59
m59
02:34
@Loktar ya know, I really want to get rid of my deprecated gulp.run() calls, but I can't work out how to use the recommended task dependencies when you may not always want the dependency to run.
Have you had that?
My build task, for example.
Sometimes, I want to run clean-build, then build, but I don't always need to erase it all first.
So, if I make clean-build a build task dependency, it's always going to run...
ah, maybe make another task to deal with it?
I'll try that
nope, that was bad reasoning =D
hi
m59
m59
hi!
hi -)
m59
m59
02:50
Oh sccreeewwww me!
That dependency I wrote is fine =D
I forgot to remove the old one.
well, I had to get sourcemaps going at some point ;D
you figure it out?
m59
m59
Yeah, I had two angular services by the same name and the old one didn't have a function that the new one does.
Since I refactored it into its own reusable module
Dunno about the gulp task problem, though
I think about it every few weeks and never can figure out what to do.
when dont you want to run the clean-task task build?
m59
m59
When I don't want to clean it first
No need to usually
I have a clean task that removes everything in the build
and the build task
is it taking a significant amt of time to clean?
m59
m59
02:54
No, but it still should be possible, right?
It's the principle that gets to me.
Hmm I guess I still dont understand, whats the condition for running clean?
m59
m59
What I like to do is clean the build when I fire up gulp, then build, and then watch for changed and rebuild
so, in one case, build depends on clean and the rest of the time it doesn't.
you could always have your default start task do the clean, then you can break out the watcher
like watcher.on('change', somejs files, do some js task)
m59
m59
I suppose I don't have to do that initial build.
gulp.task('watch', ['markup', 'browserify', 'optimizeCss'], function() {
    var cssWatcher = gulp.watch(['./dev/less/**'], ['optimizeCss']);
        cssWatcher.on('change', function (event) {
            console.log('File ' + event.path + ' was ' + event.type + ', building css...');
        });

    // Change to watchify at some point, works a lot better with browserify
    var jsWatcher = gulp.watch(['./dev/js/**'], ['browserify']);
        jsWatcher.on('change', function (event) {
            console.log('File ' + event.path + ' was ' + event.type + ', building scripts...');
m59
m59
02:56
since I would already have one.
thats my watch task
its also the default
m59
m59
yeah, I have something like that
so when it starts it does everything, then just does what it needs to for subsequent changes
m59
m59
yep, mine to.
I have the exact behavior I want anyway, but I get the deprecation warning because it uses run()
so, eventually it will break.
ah yeah I dont use run at all
m59
m59
03:09
If I ping any SO user, they'll see it?
@OverZealous If you feel like hopping in to chat about gulp task dependencies, that would be epic! I think this issue is related github.com/orchestrator/orchestrator/issues/21
@m59 runSequence may be your friend
m59
m59
@phenomnomnominal yeah, OverZealous wrote it.
m59
m59
Based on his comments on it and the date of the last update, I'm thinking there might be a better way now.
04:04
Ugh, today's kids are forgetting the old-fashioned art of absentmindedly reading the same half-page of a book over and over and then letting your attention wander and picking up another book.
2
04:59
^ Yep, that's pretty much me right now
05:15
@m59 absolutely not. but if you are a mod, you can use the mod super ping via @@<userId>@<site> but you are not in blue, so you are not a mod :(
05:32
I was a mod once, but then I got bought out and expanded into a full-fledged application.
06:22
Why would this be downvoted? stackoverflow.com/a/25440679/586051
06:38
anyone aware of JS learning videos
best ones
@indieblue let's see .. emm .. $(this).val() ? different APIs used for each event listener ?
I did not downvote, but I wouldn't see it as something deserving an upvote
also, it's a "fix my code" question .. not sure if you really even should be answering it
:D
I hate the way comments go in these type of question. Cats and dogs.
07:10
@tereško whats wrong with that
you mean, aside from it being against SO guidelines ?
Hi guys, does it happen to you too that opening minified css/js files hangs the editor for a few minutes?
I'm using Gedit FYI
!!google gedit
@monners Unix text editor most similar to Notepad++ on WIN32 envs
07:16
Never used it, and no, I don't get that problem
At least in not in Sublime Text or Atom
@monners Uhm ok, I'll try them
Sublime Text is more or less the standard to beat in terms of free web editors
If you prefer more of a full-stack IDE then webStorm's pretty good
Guess it's a Gedit's bug
Sublime looks great. Well what I need is syntax highlighting and optionally ability to extend it with plugins so I can make my own functions easily
It is. Takes a bit of setting up, but once you've done that it's incredibly powerful
First thing you'll wanna do is download and install the package manager
I see :P It even has multiple selections wow. It could save a lot of time, and many things that are Gedit plugins look like they are the default on Sublime. Why didn't I know about it before :D
@monners Package manager, how so?
07:21
!!google sublime text package manager
That was you can search for and install public packages right from within the editor
Oh ok. Cool, they are like plugins I see
Great stuff like emmet, syntax highlighting, all sorts
Yeah, plugins
Thank you for the awesomeness :D
07:23
I strongly suggest you take the time to learn some of the more esoteric keyboard shortcuts. You'll save yourself a lot of time
I'll do :)
08:03
hi guys, can you look my post
0
Q: Intro.js style not appearing properly

vasanwe are using intro.js to implement application tour. In between tour I am highlighting bootstrap modal but elements are not appearing,you can see in the following pic. It's happening only to modal,it's working fine when I try to highlight other elements like in the following pic. can anyone...

No, I will check now
08:26
Weird, Google seems to be using Java server side whereas I thought they used Python.

If you enter the following code on Closure Compiler the compiler will break and show you nasty things:
for (var s = [], i = 0; i < ua.length; i++) {
        s[i]= String.fromCharCode(ua[i]);
    }
    return s.join('');
@SufiDeveloper closure compiler is written in Java, they use Python in YouTube, they also use C directly, and Go
@BenjaminGruenbaum Got it. It struck me as I've never heard about their use of Java anywhere
ya I guess so :P
GMail was originally a pure Java - project, right? I think they ported it to Closure now?
08:36
It could be
Shouldn't an empty array be treated as "0" in a for loop?

Because
console.log([].length) -> 0
but
for(i=[];i<10;i++) {

    console.log(i)
}
[]
1
2
3
4
5
6
7
8
9
instead of
for(i=[];i<10;i++) {

        console.log(i)
    }
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
Don't paste long code in the chat, use gists or pastebin
Oh, is that long? sorry ;)
also
 console.log([] == 0) -> true
!!> [] === 0;
@monners false
Exactly
08:44
Well that's "pedantic" comparison as I like to call it. But maybe there's the reason it doesn't work as a zero value in a loop
@SufiDeveloper It's not pedantic. you should always use strict comparisons unless you've got a good reason for not using them (in which case you should document it, which wouldn't be trivial)
Just trying to extremely minify a program for js13kgames.com
Doesn't that do double the walks where it has to check another time for something else?
Nevermind
@GNi33 sorry for late, in the example(what you suggest), they are starting intro after modal open time...but in my case modal will open in between tour starts.
Wait it works now! I'm using this to convert from byte array to string, so I force the byte array to begin with an empty byte
Is there any online resources or code challenge for javascript
08:52
@user1475089 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
@user1475089 Yes.
Or, you know, anything else in Google that starts with JavaScript
but you can come up with a few more not documented if you act clever
Thanlks @SufiDeveloper is there any site like codechef an online problem solving
08:53
Someone looking to learn JavaScript is not looking for clever results
0
Q: Stubbing the return of a promise

BenI have an async function that returns a promise. On the first completion of the function, I am caching the response. On subsequent invocations, if a cached response is available I wish to use this. How can I construct a promise to achieve this behavior? Would something like this work? if(this.c...

@user1475089 codewars.com
he said ..or code challenge
rtm

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