« first day (2219 days earlier)      last day (2721 days later) » 
00:00 - 22:0022:00 - 00:00

12:05 AM
@KevinB sup?
 
12:34 AM
so stupid, lol
 
12:47 AM
> let god pootis
🙄
 
ugh, forgot to remove that
 
1:07 AM
@ssube @Trasiva got Verdehile and fire Sky Dancer from 2 MS in a row :D
 
user6820627
@taco i see black boxes, not emoji. is there any bookmarklets that change all emoji to svg/png?
 
@LearnHowToBeTransparent no idea, but probably
 
user6820627
i want to enjoy emoji but my computer can't support.
 
What OS?
And browser
 
you could probably see how facebook does it. they turn them into png/gif i think
not sure if that's client-side though
 
user6820627
1:11 AM
this shit looks good. github.com/Ranks/emojione
 
user6820627
now try to install it
 
user6820627
done @taco i know how to do that shit now it is fucking easy
 
user6820627
thanks to emojione
 
nice
 
user6820627
1:37 AM
wow
 
user6820627
my code:
 
user6820627
function loadjscssfile(filename, filetype){
    if (filetype=="js"){ //if filename is a external JavaScript file
        var fileref=document.createElement('script')
        fileref.setAttribute("type","text/javascript")
        fileref.setAttribute("src", filename)
    }
    else if (filetype=="css"){ //if filename is an external CSS file
        var fileref=document.createElement("link")
        fileref.setAttribute("rel", "stylesheet")
        fileref.setAttribute("type", "text/css")
        fileref.setAttribute("href", filename)
 
user6820627
💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩
💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩
and now poop turn into images if you run my code in the console.
 
2:02 AM
Nic
 
e
.
@LearnHowToBeTransparent I get an unexpected end of input error
cya kids
 
Dan
2:17 AM
hola
 
@Dan Welcome to the JavaScript chat! Please review the room 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.
 
Dan
si
tu no hablan espanol?
Estoy bromeando
Adios
 
wat
oh..
 
 
2 hours later…
user6820627
3:53 AM
@Learn How To Be Transparent - Thanks :) That worked. — einScotchFitch 3 mins ago
 
user6820627
one more reason to say that $ready is shit
 
6:38 AM
That has nothing to do with jQuery and everything to do with variable scope
 
 
3 hours later…
10:03 AM
Is there anything in mongooseJS to destroy a precompiled model
like
mongoose.model('Tank');// will be nothing
but previosuly it was returning the instancce
 
10:16 AM
hmm, no, I'm not sure that would be safe
the models and their schema are internal state of the instance and to give things a twist they're also entangled with the DB client
 
11:02 AM
@taco it's missing a }) before the closing semicolon
 
11:27 AM
How do I prevent the player's movement to only allow 1 call-to-movement? I don't want the player to be able to hold the key down and move from A to B in 1 second in increments of 100px, I'd need some sort of delay between them? jsfiddle.net/ngnmk93d/1
 
11:46 AM
fixing swasticas:
user image
3
 
HAHA
😢
 
0
Q: How to outsource upload function as service notde.js

PomeGranateI'm trying to write a piece of my upload code as a service, because I need that function overall in my software. My project use sails.js - here the doc for a service. In a controller I got this code, which uploads a file and after success it calls the function saveTheCampaign() and saves the fil...

 
 
2 hours later…
2:23 PM
@KendallFrey universetoday.com/131903/… ohh yea baby
 
@rlemon KendallFrey is afk: for the weekend
 
Neat
@rlemon For the flag thing, I can add something like vid.dataset.isPlaying, not sure how to handle changing it from the iframe though. Or am I overthinking it?
 
onStateChange
?
idk, I'll look into it
 
Is that the player in the iframe though? Or can I add that to the iframe
Never really used iframes, or youtube's api for that matter
 
I think you might have to construct them differently than I currently do
trumptracker.github.io neat, kinda like what someone setup for Trudeau
 
2:41 PM
Anyone know how to set max core in pm2 cluster in the js file pm2.keymetrics.io/docs/usage/cluster-mode
because neither max nor 0 seems to work
 
@rlemon Looks like I need to implement the library to get the state
 
3:02 PM
casually stumbled across a formula (not homework) that involves the result of n*sin(1/n) as n →Infinity
 
@towc I just low how it is just beside swastika
 
the only way I'd know how to solve stuff like that is using l'hopital's rule
but that doesn't seem to help here
 
3:15 PM
@rlemon Fuck it, not importing the entire iframe library for one function. Sent a PR
 
3:28 PM
@Zirak No worries, I was also quite tired toward the end
 
I sincerely think that sourcemaps are the worst piece of shit technology ever made
 
sourcemaps are excellent, if they work
 
they never work
 
That's also my experience
 
but I'm talking about the idea
that I would care to debug that flimsy mapping instead of the code that actually runs
debugging is based on errors, breakpoints
capabilities browsers give you
and sourcemaps shit all over
they are maybe okay for coverage, I guess
</rant>
 
3:37 PM
They don't work that well for coverage either tbh
As this clearly illustrates
 
hello
so came across this scenario, I set up a web service to returns a user's LDAP info taking their nt name from the request. When I browse directly to the service it gives me the required data.


But when I move this call to an Ajax request, a 401 unauthorized is returned
Any ideas?
 
@Mosho sourcemaps, if they worked would be amazing. I suspect they'll work pretty soon as people start using wasm
What I miss most about debugging in JS is real async stack traces
 
Why is auth into the service prompted when I directly browse using the browser's url bar. But not when I invoke via an Ajax request
hmm
 
Also, I'd like to have much nicer defaults for things, and since I'm already using a transpiler I'd prefer to have stricter warnings.
Also, much faster compile and build times and reuse of unchanged compilation units.
I'm so disappoints isamericagreatyet.com is taken.
 
And they're not even using it
 
3:49 PM
:(
 
4:04 PM
@Cereal ping
 
chat.stackoverflow.com/transcript/message/34017235#34017235 read from here if interested in why I did that.
Ping @rlemon btw.
 
@AwalGarg ....
 
5:00 PM
@littlepootis her uncle got fucked real bad for basically not much good reason lol
 
Hey guys I have an issue here. How can I store all items except the selected item in a dropdownlist in an array with jquery?
Actually I posted this question stackoverflow.com/questions/40546331/… here and I've not really had substantial help since yesterday
 
fiddle?
 
@CSᵠ I just have a normal html dropdownlist
 
@KaceyEzerioha the more normal the easier it is to get help on it once you publish the code within your question
 
5:16 PM
@CSᵠ Okay I just made a fiddle to illustrate my problem. jsfiddle.net/8sxn84y6
What I want to accomplish is simple
all four dropdowns have the same number of items
When I select an item in one of them, I want that particular item removed from the rest of them
 
sounds simple
 
however, my idea is to get the items of the dropdownlist selected without the selected item and replace the rest of the dropdowns with those items
 
what if one day there'll be 100 of those dropdowns?
 
I hope you understand
no for this particular project I'm doing, it will always be 4 dropdowns no matter what
@CSᵠ I know right, but I have been struggling with it for days
 
If anyone has any ChartIQ experience ping me
 
5:22 PM
@KaceyEzerioha might be because of the bug on how you select the class
 
@BenjaminGruenbaum You're just making things up
 
@Zirak you coming for a beer this week?
 
Maaaaybe
 
I'm meeting Ben Lesh on Wednesday, should be fun
 
@CSᵠ Yea you right, I corrected that but it doesn't work the way I want it to
@CS this is the updated fiddle jsfiddle.net/8sxn84y6/3 but it only works for the first selection
 
5:26 PM
shell question: How do I start vim from a pipe? Say if I have ./foo | ./bar | ./baz, how can bar spawn vim in the parent shell and make the pipe wait?
 
@CS If I should change the selection of the first dropdown, I'm supposed to get the last selected one back in the rest, but I don't
@CS you can try it yourself and see the issue
 
question for the group
 
@bwighthunter Welcome to the JavaScript chat! Please review the room 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 have an express project with this little bit of code. line 7 has what I think is not working. I kind of hacked what I thought might work, but i don't think it is.
I have objects that have a string to identify which method should be called on app
I could use a switch or if/else statements, but I was hoping to make it more flexible.
 
5:45 PM
@bwighthunter app[r.method] is the function you want to run. Treat it like any other function and call it.
 
6:00 PM
@AwalGarg where do you lurk on freenode lately?
@Zirak is the grown up back?
 
@Zirak
I thought I had tried this
when I use this I get weird errors
TypeError: Cannot read property 'length' of undefined
on line 2
wait sorry, when I manually put in "get" instead of r.method, it works.
 
@BenjaminGruenbaum yeah, all those are implemented somewhere somehow and you can get most of it but that is a part of the problem
 
otherwise i get "r.method is not a function"
 
@Mosho I really love how MS has been serious about tooling for TS, I think that's the biggest pro for it at the moment (rather than the typesystem). Also, check your hangouts.
 
Hi
 
6:14 PM
I saw
 
I have like the easiest and most useless question in the world for you.
I have a number, like 0.6 that means 6 out of 10. If it was 60, I'd call it percentage. How do I call it if it's 0.6?
(I'm not English :D)
 
a number
 
I want to name the variable. Calling it "num" wouldn't be specific enough :/
And a function; "getNum" would be even worse.
Is there a better word than "part" of something when talking about mathematic topics?
I'll just call it "ratio" -_-
 
@Unknown ratio
 
6:28 PM
I've tried e.preventDefault, return false, setTimeout, setInterval.
Even tried editing the window.addEventListiner
 
@towc #lobsters, #archlinux, ##typescript, and a couple others I can't tell. I am most active on oftc and mozilla though, not freenode.
 
6:44 PM
where in mozilla @AwalGarg?
 
@towc all channels relevant to rust, spidermonkey and pdf.js
 
ffs
 
"ffs"?
 
well, I guess I could learn something that I'm interested in in spidermonkey at least
ffs is the rude thing you may have heard about at some point
directed to the disappointment of seeing nothing that spikes much interest to me
so no reason for me to hang in the same channels as you
 
I don't work for Anonymous, if that's what you are asking :P
 
6:49 PM
-_-
I was thinking other stuff
like node, canvas
I'm the l33t h4xx0r here, no doubt about it, right?
 
You have a pretty skewed set of interests, but okay :D
 
?
 
7:03 PM
the mozilla network seems fairly dead :/
@AwalGarg what about oftc?
 
@towc the only public channel on oftc that I am in is #fish
 
well then... any one you would reccomend I visit?
 
What's your end goal?
 
again, purely web dev/sec stuff, nothing sketchy
trying to find new communities to hang out in, mostly
get connections
know about people and what's new
mostly my only source of "web hanging out" is on stack exchange. That's sad
 
I bought a new shop vac today
it sucks.
 
7:15 PM
@towc Sorry, can't recommend anything for those two topics. I am not really a web dev anymore.
 
well, you do back end and security, right?
or even just derping around with fish could be interesting
 
When one uploads a file via a form, I imagine that it is saved somewhere in the browser before being sent to the action url. Is there any way to "read" the file from that cache/tmp location, rather than configuring a server-side approach?
I no for example that I could send the file to my node server and use fs to read the file into node's memory
know*
but is there a way to get the same result entirely in the browser?
 
@towc I don't have a single word name for this, but I consider myself "a guy who messes with software and makes tools to make his own life easier at work, but stays away from web related tech. picks projects out of the odd to collect stars on github"
@Zirak mr. good vocabulary guy, what would you abbreviate the above as? ^
 
for some reason I thought you were sec oriented
 
@AwalGarg nerd
5
 
7:19 PM
thanks
In related news, I am creating a version control system now.
 
oh lol, so many people in #debian-kde
poor people
 
@AwalGarg but git already exists. :)
What type of version control?
 
@Luggage I am trying to make a VCS which non programmers can use, and applications can embed easily. Think wikis etc.
 
Ah, yes. I like the idea, but could that just be a front-end to another VCS?
 
@Luggage Yes, definitely. But making something from scratch is more fun :P
Also, I can't stop writing Rust. Please send help.
 
7:24 PM
I've always wanted to make something like that. Topic-specific 'github-like' sites with a friendly UI for that topic.
A network of them, like the stack-exchange network.
git for the masses
 
Is there a way to define a variable using a single-line-for statement? [e.g.: variable = (i for (var i=0; i<100; i++)) or something?]
 
Kinda. you can use an IIFE.
var x = (function() { return ....; })();
 
@Unknown JS currently doesn't have python like list comprehensions, if that's what you are asking.
 
Ah yeah, forgot about that :D Thank you
 
Also, look at Array(), .map, etc
 
7:27 PM
IIFE was what I was looking for.
Makes my task alot easiear :)
 
Array(100).fill(...).map(...)
or some combination
 
@AwalGarg Yeah, that was where my idea came from, but @Luggage 's idea fits even better.
@Luggage I do something more complex than just iterating numbers. Thank you for the reminder though :D
 
// also generators if you are on ES6
let foo = Array.from(function*() { yield 1; yield 2; }());
but that's basically the same thing, in this case.
 
Okay
Can a function inside of another function [e.g.: function f( abc = function(){ return 1 }(); ) touch the local variables of the outer function?
 
yea. it's called a closure
 
7:35 PM
yes it is called a closure
 
applause
 
lol, oops sorry @Luggage
 
Ok thank you xD
 
@Luggage Okay good to know :)
Funny enough, that you two typed the almost exact same answer.
 
7:37 PM
lol ya
 
Except I know how to use contractions.
 
sheeeet burn :D
 
:)
 
:-P
 
Okay thanks for the help :)
okay
How did I create the line over my msg?
 
7:39 PM
you didn't
 
Does it appear everytime someone types "okay" after a response? :D
 
okay
 
Logic :P No
 
no
 
You did it with the Closure explaination too.
 
7:40 PM
First time for me in chat, but my best guess is it appears after a lull in chat perhaps attempting to indicate when a new topic has started
 
It didn't appear before I came.
 
It represents new messages or something
 
Maybe I'm god :/
 
It's specific to your client.
 
Okay
Don't you see it?
 
7:41 PM
I do, in different places.
 
For example...?
 
It's a client side thing.
 
okay
 
maybe if you are on another tab..?
 
type something.
Yeah
That's it.
 
7:43 PM
they are specific to how you interact with the chat, so don't expect others to see exactly what you see in regards to them
 
Yeah. They appear everytime you come back from a different tab, to show you what you've seen and where the new stuff starts.
 
2 mins ago, by rlemon
It represents new messages or something
 
I never even noticed they were there.
I mean.. i saw them, but just never gave it any thought.
 
I styled them
so I noticed them
😃
 
@rlemon Basically, they appear before your last post if your post is the last one, so they don't really show new messages :P
 
7:48 PM
7
Q: What is the meaning of the "catchup marker" in Chat?

slhckOccasionally, in chat, a dashed bar appears. It is called catchup-marker (as you can read in its CSS). The chat FAQ says: If you have chat open but we don't think you've seen new messages, the system adds a dotted line like this My questions: When exactly does it appear? The FAQ says,...

 
@rlemon I don't trust someone, who draws arrows like that.
 
he wrote the chat
 
I was kidding.
 
8:05 PM
does exist a library that implements a JS API for CSS selectors?
no DOM
thisLib(class).nthChild(3).child(anotherClass)
to .class:nth-child(3) .anotherClass
if not, there is going to be one in like
an hour
 
We'll be waiting
 
bring your stars
 
You're my star
 
@Mosho why? I'm not crapping on the idea, just curious. Building a lot of CSS dynamically?
selectors, i mean
 
I'm writing tests and I need selectors
I use css modules
so all my classes are variables on an object exported from each css file
 
8:12 PM
@FlorianMargaine How's your db idea going?
 
hm, ok
 
and I have to do stuff like ${classNames.wat}:nth-child(2)
 
and oh yeah, @rlemon, how's your prime minister doing?
 
yea.. I like that.
 
and I use typescript
so I'll have completion as well
 
8:14 PM
@towc You were right. I am extremely sec oriented.
 
@Zirak good I suppose
 
I wrote github.com/awalGarg/curl-tap-sh and put it in a repo of its own with a readme 10 times larger than the script itself
 
How would you do: .foo .bar:nth-child(2) ? thisLib('foo').child( thisLib('bar').nthChild(2) ) ?
 
thisLib('foo').child('bar').nthChild(2)
though that would work as well
 
Then what about .foo :nth-child(2)
 
8:18 PM
thisLib('foo').child('*').nthChild(2)
or an empty string
 
hm. ok
Carry on, soldier.
 
o7
 
@AwalGarg mostly for the fact that we don't even know your name and you do things like the zip-obfuscated source code and dev tools timing attacks
I haven't really investigated what you do, but at first sight you seemed like a sec oriented person
 
nice, object rest/spread in TS nightly
 
8:34 PM
@towc yeah I've done a couple sec related things, but not really into it. I like making things visibly useful much more.
 
Anyone able to help me with react-redux?
 
@Hiyper Welcome to the JavaScript chat! Please review the room 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.
 
yeah well, I probably just haven't heard of too many of them
and that time you sent me the image of some kind of messed up lottery... lol
did you find out what it was in the end?
 
I am trying to make a simple book list in react-redux. My state is changing because I am logging the reducer for selectedBook but the containter never rerenders after the initial render
 
I don't remember sending any such thing?
 
8:36 PM
you were asking me if I had any idea what the hidden meanings were. It was a monetary thing with apparently quite a lot of money, but using that "the bird is in the nest" language
wait, I'll see if I can find it again
 
Ahh, about mafia wars! No, that was entirely unrelated to security stuff. It was.. uhh... trying to recover contact with someone. hides
2
 
sure :P
 
@Hiyper try to reproduce it in a fiddle or a repo and I'll help
 
Hmm any idea why im getting the wrong angle (7) when its clearly 30?
im using the law of cosine to get my angle
 
9:03 PM
What do vectorV and vectorU represent?
 
vectorV and vectorU correspond to the actual lines which simply are there to visualize the triangle
 
Hello All
Has anyone experienced any problems with compiling ionic apps for android?
 
@JonSG does that answer your question?
 
I've been scratching my head for the past 2 days trying to get the damn thing to work
 
Ya, sorry I missed their use in the ctx calls
 
9:06 PM
Ive commented all though
 
looking again
 
: )
basically im trying to get the angle between the position of the red circle and the end coordinates of the reference line (horizontal)
 
9:23 PM
@Asperger you there?
 
@Zirak not much for now, it's been cooking in my head mostly
 
I believe your issue is that you want to translate your vectors back to the origin
rather than using vectorU and vectorV as you ahve them to compute the angle
what happens if you define
var v = {startX: 0, startY: 0, endX: purpleCircle.radius, endY: 0};
var u = {startX: 0, startY: 0, endX: redCircle.x - purpleCircle.x, endY: redCircle.y - purpleCircle.y};
and compute the angle using them?
 
Is the issue that the red circle is a couple degrees off?
 
I think the issue is that the angle computed is way off in the original 7 when expecting 30
because the calculation of the angle between vectors is expecting the vectors to be origin based but they are not
If I translate them back (v and u above) and take the angle, I get the expected result
 
Yeah looks like you're right
 
9:44 PM
ya
@JonSG ya made a tea
 
:-)
 
Will test your solution : ) I suspect you are right about it.
 
:-)
 
holy crap
@JonSG this is so embarrassing man lol
 
:-)
 
9:49 PM
you are right, I get the result now
 
cool beans
 
I was actually practicing my math skills a bit wikihow.com/Find-the-Angle-Between-Two-Vectors#proof
oh, wanna see something cool?
 
sure
 
that is cool
 
9:52 PM
its actually css transforms under the hood. Tried to simulate it and it works
 
very cool
 
they do some matrix multiplication to do all those transforms. Pretty cool ya
 
you can do some surprisingly powerful stuff with css transforms
 
ya indeed! Its getting so powerful
Im thinking of creating a lense flare tool, ill try something out
 
Look up quaternions
Even cooler than transformation matrices
 
9:57 PM
ok im done with the lense flare tool, check it out:
 
You can do 2d stuff with just complex numbers too
 
@Meredith wow nice, will check it out
 
00:00 - 22:0022:00 - 00:00

« first day (2219 days earlier)      last day (2721 days later) »