« first day (1852 days earlier)      last day (3089 days later) » 

12:00 AM
you're not supposed to mix sync and async after all
that would work in a loop
for (let thing of things) await thing()
 
@BadgerCat : i'm not on snapchat D:
 
m59
"How often do you get to say, “Yeah, Java is the one that really does this right.”? But there you go. In their defense, they are actively trying to correct this oversight by moving to futures and async IO. It’s like a race to the bottom."
lololololol
 
m59
12:15 AM
@copy we can just get like a goroutine in JS?
 
No
 
Confirmed date for friday; she just has to find a baby sitter. I'm clearly awesome.
 
m59
Why is that? I don't know why not anyway, but that GopherJS lets you write goroutines and compile them to JS adds even more confusion.
 
@KarelG Download it? I'm new too
 
m59
If you can do nice async stuff in Go and transpile it to JS, it seems way more likely to be able to write a similar nice JS thing and transpile it to JS!
 
12:18 AM
@m59 It needs a different kind of GC, differently implemented IO primitives, locking mechanisms, etc.
 
@Nick you really are awesome
 
@m59 You're confusing things a bit
 
@nick thanks bb
 
When you have a function in go, it's blocking. You can say "run this on a separate thread" by pre-pending go to the invocation. Suddenly, it's non-blocking.
 
m59
yeah
 
12:20 AM
ENOBUFS
That's a new one
 
That's goroutines in a sentence. It's not what js has, which is 100% blocking js code with non-blocking API calls
 
@Nick <3
@Zirak are web workers comparable?
 
m59
@Zirak So, Gopher can do what it does because it's fundamentally different from JS in a way that JS just cannot be written?
 
@nick Soooort of. But you lose tons of things with web workers, like access to DOM or shared state.
 
m59
but it can be transpiled to js. That still loses me.
 
12:24 AM
@m59 Yes. Namely, go has threads and shared state, js has a single thread and an event loop. It's not that one is inherently better than the other, there're trade-offs for both.
@m59 100% of go can be transpiled without changing the source in the least?
 
m59
> "Whenever an instruction is blocking (e.g. communicating with a channel that isn't ready), the whole stack will unwind (= all functions return) and the goroutine will be put to sleep. Then another goroutine which is ready to resume gets picked and its stack with all local variables will be restored. This is done by preserving each stack frame inside a closure."
 
@MadaraUchiha This isn't entire physics related: i.imgur.com/MC1RSES.png
Why did he use sin and not cos?
 
And web workers represent a process, which is much more heavy than a goroutine
 
@Zirak do goroutines run in the same "closure", so to speak?
 
I tried explaining it, but apparently I'm not doing a good job
 
12:26 AM
@nick Goroutines are just functions which run in a separate thread
 
do they operate in a completely separate scope?
 
@m59 That sounds...heavy. And not concurrent. But whatever works for them.
@nick No
Again, just functions, just in a different thread
 
I understand that
but for the goroutine to be able to access the original scope there would have to be messages passed between threads, correct? under the hood, that is
 
if anyne else knows, that's cool too
 
@nick No, they just both have access to the memory
It's exactly like threads
 
12:30 AM
ah
 
With all the horrid implications. Except that under go it's a serious anti-pattern and you'll be stoned to death for thinking about it.
 
so it's not safe
 
Go has channels, and you do cross-thread communications with them
 
how are we feeling about TS
 
TS FTW
 
12:31 AM
eh
 
@Mosho You're a fucking hipster as it is
No need to prove anything
 
I'm not a hipster
I just like meggings
 
I like jeggings
especially buying my GF jeggings. and then grabbing her butt while she wears them. Yissss....
 
12:55 AM
hells yiss
 
1:13 AM
Whats with paintings and hand ?
 
What? You'd rather people paint people without hands?
 
@Nick yep
btw Star Gate fans ^
 
@Mosho loveit
 
1:39 AM
I'll try it for my next assignment
if m'lord allows it
 
 
1 hour later…
2:51 AM
The internet reveals me
If you google my social media account, you will find my secrets about me.
That's terrible.
 
Sheeze. You're right. Yours is tiny.
 
3:07 AM
you won't be disappointed with mine though
add me on snapchat: nickm55
 
surely that violates the terms of your parole?
 
@rlemon how hard is it for a filthy foreigner to get a work permit in Canada?
@rism shh lets not talk about that
 
mums the word, mate.
 
appreciate it bro
 
 
1 hour later…
4:39 AM
I got a snap from @jhawins and i'm not even gonna reply cuz ima king
 
Hey does anybody know of an alternative to Zoomify that has better user experience, something like this? petapixelproject.com/mosaics/25cents
 
5:02 AM
 
5:16 AM
any idea on this
0
Q: D3 Directive is not getting applied when calling inside a modal dialog

SajeetharanI have a directive for a d3 force layout , which works fine on applying inside a dive. Here is the working code: D3 Force Directive But when i apply inside a modal dialog, this diective is getting applied, but cannot see any graph generated. what could be the issue? D3 Force Directive inside ...

 
5:32 AM
Can anyone check to see if sputnikjourney.com works for them in Chrome? I changed some JS code in it, and oddly enough it won't load the main content for me anymore. When I switch to private view it'll load fine, but I just checked on my mobile and it wasn't loading the content either. It's probably just some whacky cache issue, but I wanted to be sure.
 
@Tyrx 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.
 
5:53 AM
@Tyrx Poor UX, I animations don't speed up when I scroll.
 
yeah, I'm using time-based animations at the moment. still need to switch them to be offset-based
 
how do you contribute to the javascript kernel?
5
is this the mindblowing talk i heard about: youtube.com/watch?v=m3svKOdZijA
 
 
3 hours later…
8:35 AM
hi
 
@DenverNaidoo 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.
 
thnks
have a call (POST) to a webmethod on my local dev machine taking about 300ms (the webmethod itself executes in under 40ms). Can that 300ms call time be improved greatly by changing to WCF or asmx?
 
crl
WWF is better, because nature matters
 
hi all!
anyone got a minute to help me test something?
 
@inspectorG4dget Shoot
 
8:49 AM
I created a custom stackoverflow app using fluid.app on my macbook
it's basically a site-specific browser
it puts a stackoverflow application on my HDD, which let's me use the application switcher to switch between chrome.app and stackoverflow.app
now, I'd like to put a dock badge on the SO application icon, when I get a message in my SE inbox
This is achieved with a userscript
I found a userscript for such functionality for a different website called yammer
 
@inspectorG4dget that seems cool! is it up/hosted somewhere?
 
@GavinoGrifoni 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.
 
Uhhuh
 
I am trying to find the proper way in which to figure out how many unread messages I have on SE so that I can add the correct dock badge
 
You need help figuring out the JS for when a user gets a notification on SO?
Ah
Through the notification tray on main?
 
8:52 AM
here's my modified JS so far
// ==UserScript==
// @name        Fluid Badge for Yammer Unread Messages
// @namespace   fluidapp.com
// @description Primitive script to update the docBadge with your unread message count.
// @include     *
// @author      Jim Halberg
// ==/UserScript==

(function () {
    window.setInterval(updateYammerBadge, 5000);
})();

function updateYammerBadge(){
    if (!document.getElementsByClassName){
        alert('UserScript:: "Fluid Badge for Yammer Unread Messages" thinks you should try a different user-agent.'); // yep, no effort to support others
 
And? What's the problem?
 
Here's where I got the original script from
 
morning
 
@SomeGuy I just can't make it work
 
Which part, specifically?
 
8:55 AM
I don't seem to be able to find the right way of getting to the number of inbox messages
 
Care to drop me a comment somewhere so I can try for myself?
 
I tried some JS on the chrome JS console, and it didn't give me what I expected (when I knew I had comment on one of my posts). The JS I tried:
document.getElementsByClassName("unread-count");
[]
document.getElementsByClassName("topbar-icon icon-inbox yes-hover js-inbox-button");
[]
document.getElementsByClassName("network-items");
[]
document.getElementsByClassName("div");
[]
document.getElementsByClassName("network-items");
[]
document.getElementsByTagName("div")
[<div class=​"line-gutter-backdrop">​</div>​]
document.getElementsByTagName("div")[0]
<div class=​"line-gutter-backdrop">​</div>​
document.getElementsByClassName("network-items")
 
hi png file there .in my task read image file getting all text and store txt file .please help me urgent
 
@SomeGuy: just dropped you a comment
 
user559633
$(".network-items").find(".unread-count").text() seems to grab the text on the inside of the notification for me
 
8:57 AM
document.querySelector('.unread-count').textContent
Seems to work fine for me
 
could someone drop me a comment, please?
 
user559633
Oh, huh. I thought .unread-count was a collection of 2 elements. oh, querySelector returns the first it finds.
 
@inspectorG4dget Done
@tristan Right. Your method is more reliable
 
user559633
@SomeGuy It's also jquery, so take that for what you will.
 
user559633
I started down the path of xpath and gave up because it's 4am and I'm lazy
 
9:01 AM
XPath is a PITA
 
gonna restart my fluidapp to see if this worked
 
Luckily I haven't had to deal with it much
 
dang! @SomeGuy: something's fishy. My userscript won't work
// ==UserScript==
// @name        Stack Exchange Growl+Badge (Fluid SSB)
// @namespace   userscripts.org/scripts/show/117180
// @description Stack Exchange Inbox Growl Notification with Dock Badge for Fluid
// @include     http://*stackoverflow.com/*
// @include     http://*serverfault.com/*
// @include     http://*superuser.com/*
// @include     http://*stackapps.com/*
// @include     http://*stackexchange.com/*
// @include     http://*answers.onstartups.com/*
// @include     http://*mathoverflow.net/*
what am I doing wrong?
 
user559633
Did you test that the userscript you're stealing from worked in the first place?
 
couldn't, because I don't have a yammer account
interestingly though, that expression from @SomeGuy didn't work on Chrome's JS console
 
9:04 AM
I don't know about how fluid works, but I'd expect window.fluid.dockBadge to require a numeric value
@inspectorG4dget Are you sure you're working in the correct frame? Works fine for me
In the console, next to "preserve log", make sure you have <top frame> selected
 
total wtf moment
 
Hahaha, Jesus
Use the console on the website, not on the website's source!
 
well, that explains a lot #failonme
someone please give me another comment
 
user559633
One of the few times in which a screenshot of the text is actually helpful
 
hahaha
^ proof that I'm a smart idiot
 
9:09 AM
Hahaha
 
I like smart idiots
do you want to work for me?
 
@FlorianMargaine what do you do, @FlorianMargaine?
 
j/k, I don't hire
 
@FlorianMargaine #sadpanda
 
I do stuff
 
9:11 AM
hey!! so do I!
 
Whoa. I do stuff too!
 
varies from JavaScript to php to python to go to C... depends on the time of the day
 
hahaha! I just read that as GOTO C
 
sometimes I just look at my screen
 
@tristan: comment on one of my posts, please?
 
crl
9:12 AM
ahh got that DnD almost working... output.jsbin.com/pajabe @RoelvanUden could you tell me if the code is ok, concerning react, please?
 
sometimes I gently caress my laptop
 
user559633
@inspectorG4dget done
 
it's going to be okay, laptop, it's going to be okay...
 
crl
laptops need affection
 
@FlorianMargaine You're such a sweet guy
 
9:14 AM
I know, you want an ssd, you want more RAM, I ask too much of you...
it's going to be okay...
now churn through those cores and eat all your RAM to run 5 VMs concurrently and compile all this stuff
 
@SomeGuy: in JS, let's say I have a "1", and I want to cast it to an int and check for >0. How would I do that?
 
@SomeGuy don't answer
 
thanks @tristan
 
user559633
@inspectorG4dget just check "1" > 0, it does duck typing
 
@inspectorG4dget I'd suggest googling for "JavaScript cast string to int"
 
9:16 AM
@inspectorG4dget Should be fairly easy to figure out
Google it
 
sigh. Yes
it's 4.16AM here... was trying to cut a few corners
 
it's 10am here and I'm pooping in the middle of chores
 
@FlorianMargaine Slacker
 
user559633
@FlorianMargaine well, that's not strange
 
to each his own
 
9:18 AM
found it
 
@SomeGuy no, miaouer
 
Heh
 
ok, time for another test. @tristan: could you please leave me another comment?
 
user559633
@inspectorG4dget done
 
thanks
 
user559633
9:25 AM
np :)
 
it worked... sort of
@tristan: one more, please?
thanks
 
user559633
sure thing.
 
it sort of works - it updates when there's a new message, but it doesn't disappear when there's no longer a new message
Current code:
// ==UserScript==
// @name        Fluid Badge for StackExchange Unread Messages
// @namespace   fluidapp.com
// @description Primitive script to update the docBadge with your unread message count.
// @include     *
// @author      Ashwin Panchapakesan
// ==/UserScript==

(function () {
    window.setInterval(updateYammerBadge, 5000);
})();

function updateYammerBadge(){
    if (!document.getElementsByClassName){
        alert('UserScript:: "Fluid Badge for StackExchange Unread Messages" thinks you should try a different user-agent.'); // yep, no effort to support others
anyone spot anything I may have overlooked?
@tristan: one more, please?
 
user559633
done and will remove in 30 seconds
 
found. Remove when ready
need another
 
user559633
9:36 AM
last one :) (done)
 
Damnit! what am I doing wrong?
Any thoughts, @SomeGuy?
// ==UserScript==
// @name        Fluid Badge for StackExchange Unread Messages
// @namespace   fluidapp.com
// @description Primitive script to update the docBadge with your unread message count.
// @include     *
// @author      Ashwin Panchapakesan
// ==/UserScript==

(function () {
    window.setInterval(updateYammerBadge, 5000);
})();

function updateYammerBadge(){
	var msgs = '';
    if (!document.getElementsByClassName){
        alert('UserScript:: "Fluid Badge for StackExchange Unread Messages" thinks you should try a different user-agent.'); // yep, no effort to support others
@tristan: thank you very much for the comments. Feel free to delete
 
user559633
no problem :)
 
anyone around?
 
crl
9:54 AM
ok I thing I'll use the getBoundingRectum thing
3
 
Thanks @tristan @SomeGuy for your help. I definitely got further with that notification system
 
user559633
of course
 
crl
10:20 AM
for some reason jsbin won't load on chrome, fine on others browser though, but I'm always close to their daily usage limit I think
 
10:32 AM
@BadgerCat well, it would be strange to download that for just a person. I'm not active on online social networks. I only have facebook. That's all :p
 
hello, I'm having an issue here.
 
@niceman 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.
 
I added an event
with jquey to a svg element with the on method, the event is remove event
By inspecting from the browser I can see that the event is added but when I click the svg to remove it(the click is programmed with jquery and it works) the event isn't triggered at all , I verfied this by using breakpoints inside the handler function
why isn't it triggering ?
 
JNF
remove event?
 
@JNF yes
by the way my browser is chromium 46 if that's important
 
JNF
10:47 AM
Can you refer to a fiddle with your code?
 
@JNF ahh sorry , forgot to add timerevent and the others, I'll update it to console.log for now, if this works then my real goal will be acheived
 
JNF
It's only the js. Can you add HTML?
 
@JNF ok , give me five minutes as there are many unrelated lines
 
"remove" event?
Afaik, there is no such event
 
@JNF ok here it is jsfiddle.net/eo2h1xxq/2
@Cerbrus o_o !!!!!!!
 
11:01 AM
Where did you get that from?
 
hahaha funny me, it's in jquery-ui not jquery, ok got it, thanks and sorry for this
huh it worked, Again I'm sorry for my little mistake, see you later
 
@inspectorG4dget Sure thing!
 
11:18 AM
As an AngularJS developer, what are your opinions on the framework?
 
^ It was great before React came along.
 
@KarelG then add me on fb
 
@emporio I love it
 
@Cerbrus how long have you been developing with AngularJS?
 
crl
11:35 AM
help guys, jsfiddle.net/crl/e48m2ath/3, when you dragover an element, it should show a red shadow expanding both outside and inside, it works only for the last element, the others only the outside bottom shadow is not shown, that's the prob
 
guys
 
About a year.
 
i tried to implement ajax with php and got successful response from the php script and now after getting the response i want to hide the form but i can't make it to work. Here is my code : pastebin.com/4nj6SNfK
please help
 
@crl could you show with screenschots what you mean?
 
Morning all D:
 
11:48 AM
@djsmiley2k Morning :)
 
@crl that shadow is only relevant to the direction you drag the element, so do elaborate
 
@RoelvanUden I'm using angular, but looking for lighter weight & greater browser compatibility, so for my embed pages, I'm using velocity on server side. However I'd like greater interaction, so I was considering React for client side, however I've read react should be used server side to have good performance.... any thoughts? (I dont' think server side react is an option for me anyway)
 
@RizwanAhmed i currently hate you as your submit works and mine doesn't :P
 
crl
@emporio drag the green over the blue, on the bottom 50% of the blue, then the shadow appears only inside blue, it's supposed to show also on the next yellow block too
 
@djsmiley2k lol :P I think you must have missed the submit button's id ;)
 
11:49 AM
        $('#submit').on('click', function( e ) {
 
crl
o wait , doesn't work on FF, chrome only atm
 
full code ?
 
@crl when you drag over more than 50% of the prev elem, you get one red stripe
 
@crl it shows over the yellow block too for me
 
11:52 AM
@djsmiley2k : form code ?
 
I'm not past 50% on the blue
 
@RoelvanUden for what it's worth, also using knockout. Guess looking for an easy lightweight framework, with all the directive goodies angularjs has.
 
        <form method="post" role="form" id="datafixForm" name="datafixForm" enctype="multipart/form-data" data-toggle="validator">
   <div class="row">
        <div class="col-md-3">Datafix Ref : <div class="text-danger">*required</div></div>
        <div class="col-md-3 form-group has-feedback">
            <input class="form-control" name="datafixId" id="datafixId" placeholder="Txxx" required pattern="^T[0-9][0-9][0-9]|BPC" data-error="Please choose a valid datafix ID" />
            <div class="help-block with-errors"></div>
 
@crl what on earth are you trying to achieve?
 
crl
when dragging on the last 50% of yellow, the red thing should expand 10px on the yellow and 10px on the green (which doesn't)
 
11:55 AM
@jumpstracks If you want lightweight and "all the goodies" you're probably doing something wrong. Either pick and stick with that bloated framework that wants you to do everything "the framework way", or go for a lean and mean approach and get over the fact you may need to write some utilities yourself (which almost never takes more than 10 minutes or so).
 
@crl so can't you solve this problem with css logic?
or ca't you see what's going on ?
 
crl
@emporio thus my question
 
who else can comment on crl's problem ?
 
@djsmiley2k your ajax code ?
 
12:25 PM
it dies at line 40
All i wanted to do was only post the form once the input is valid :(
 
12:41 PM
@AwalGarg @SomeGuy Happy Diwali
 
You too!
 
1:01 PM
@crl : so when i drag the yellow, there should be a red bar at the top of green box ?
 
1:17 PM
    var myForm = document.querySelector('#datafixForm');
    var formData = new FormData('myForm');
Is that a valid way to get the selections on the form?
 
formData = new FormData(myForm);
 
    <form method="post" role="form" id="datafixForm" name="datafixForm" enctype="multipart/form-data" data-toggle="validator">
That's the form...
 
you misread the docs.
 
ah not var? XD
 
you pass the form as an HTMLElement not as a string
you wrote:
    var formData = new FormData('myForm');
you should write:
    var formData = new FormData(myForm);
 
1:18 PM
Oooo
 
yeah misread it, ty D:
but the querySelector looks ok?
 
Hello my fellow warriors.
 
lol wait
 
newhive.com/allmymovies Shia LaBeouf is live streaming Shia LaBeouf watching Shia LaBeouf movies for 3 days straight
 
1:22 PM
PHPs unset only turns null an array element?
I guessed it deleted the element
:/
well, it deletes the element but mantain the indexes, so if you delete the position 1 and then you attempt to do $array[1], it fails so hard
 
@djsmiley2k yes, but document.getElementById('datafixForm') works too. Please be aware of the difference between querySelector and querySelectorAll !
a co-worker had problems with that ...
 
it gets only the first one, right?
I only have one form...
 
@KarelG he's selecting an id.
both would only return one
 
i said "works too"
 
0
Q: AJAX Submit form even when invalid

djsmiley2kTrying to only submit a form when it's valid according to validator.min.js I've tried to keep things as simple as possible $('#submit').on('click', function( e ) { alert("Processing..."); e.preventDefault(); var formIsValid = true; var myForm = document...

 
1:32 PM
really ? if (formIsValid == true)
 
If something is wrong with that, please tell me
 
conditions in statements follow a 'truthy' rule
 
I'm not a javascript guy, before starting on this I've never done it.
 
if( "abc" ) {
  alert('I will alert');
}
 
so I can do
if (formIsValid) {
?
 
1:34 PM
yes
 
Does it actually make a difference?
 
no
 
well, it makes your code cleaner
 
why's it always seemingly true.
 
1:34 PM
in other languages, if( myVariable == true ) would lead to the same remark.
 
In the case of == true, no difference
 
false, 0 (zero), "" (empty string), null, undefined, NaN are all 'falsey'. everything else is 'truthy'
 
zomg I'm getting somewhere `o/
just noticed I was checking .form-control, and the has-error appears in form-group
 
So now, we are still trying to submit the ticket, but it errors when the input is missing.
 
1:37 PM
That setting would be controlled by your validator.js since none of the code you have here is checking for empty values.
 
uhm, you have misunderstood me. You have written document.querySelector('datafixForm'); <-- don't forget the #. I'm sorry if i have confused you.
document.querySelector('#datafixForm') === document.getElementById('datafixForm')
querySelector takes in a CSS selector as argument, and gives the first found result.
 
I think I'm confusing myself :P
 
You're over your head, sure, but that's a good way to learn things.
 
Nov 4 at 17:20, by SomeKittens
http://perfectionkills.com/javascript-quiz-es6/
 
1:45 PM
Can anyone comment on this Babel?
 
i.imgur.com/H0DHTNy.jpg <-- for me, it's not respectful towards the professor. Even the e-mail formulation could have been done better
 
                formIsValid = $('.form-group.has-error').length===0;
What is this even doing o_O
if the has-error matches have a length of 0, set formIsValid to true?
 
0 errors usually means it's valid, no?
looks legit to me
 
@djsmiley2k If there are no elements with the .has-error class, it means that there are no errors. Thus the form is valid.
I don't really like this approach (because you rely on the DOM to be in a state that may or may not be valid), but it will work for simple cases.
 
1:50 PM
Agreed. Architecture, major fail.. but it should work
 
well that's the comment someone posted on my question :/
Uncaught SyntaxError: Unexpected string is the erorr it gives me :D
 
@djsmiley2k line ? context ?
 

« first day (1852 days earlier)      last day (3089 days later) »