« first day (2345 days earlier)      last day (2826 days later) » 
00:00 - 21:0021:00 - 00:00

00:05
@Asperger I don't think a 3 element array is going to give you a good idea of its performance
@Asperger That's a bad test. Declare functions doing the work outside of the test case: The test case should only call the relevant function being tested and check its return.
You should also work on a much larger subject
Also note that in such simple cases, v8 does loop unrolling, so your test could be completely irrelevant
00:35
Can you update (get it signed my more people) your pgp key after you have uploaded it to a server?
 
1 hour later…
01:47
anyone around?
I'm trying to repackage a node app as a native widows app if this is even possible
might be a bad idea not 100% sure
We do it every day: electron.atom.io
Is that what you meant?
I think so reading always wondered what you were referring to when mentioning electron
Sometimes that. Sometimes the everyday lepton.
 
1 hour later…
03:05
Anyone know if it is possible to read a file from a different domain using just JavaScript?
Searching the internet has yielded ambiguous results.
Have you looked at JSONP?
@Alesana isn't that being replaced by CORS?
Hmm
I don't know what you mean
You can do CORS by allowing the request on the different domain
But if you just want to read a file from a different domain through JS and you can't get CORS access you would use JSONP
// this?
someArray.slice(0, -1)[0]

// or this?

someArray[someArray.length - 1];
I thought JSONP was insecure
03:15
@Luggage latter
I have a problem at catch.js:22
This isn't the good ol' Donald.
What do you mean?
 
1 hour later…
04:35
hey everyone :)
user4196492
05:01
quick question, if I get a vibe that my code is feeling messy, should I try to clean it up?
yup
quick question, if I get a vibe that my arm is dripping blood, should I try to stop it?
:)
lol
user4196492
man I feel bad using javascript plugins like 3js and p5 to make things. it feels like I'm cheating if I'm not doing it from scratch
I can't speak for the usefulness of 3js and p5 but it's 100% legit to avoid re-inventing wheels
You don't have to do it all from scratch. But knowing the basics of doing it from scratch helps you pick a library, debug problems, etc.
 
1 hour later…
06:21
I have a single page app js project that is bundled and transpiled with jspm and babel-5. Would webstorm be of any benefit as an IDE or would it get in the way? Currently I use emacs. What I am looking for is static code analysis and refactoring tooling. Like, I might want to caalogue all uses of this.something in a module, so I can see if any typos crept in. Or rename a property or variable without having to loop through query-replace in emacs or the friendly fire of replace-string.
I am probably hoping for too much, and need to be talked back to realit.
reality.
Offline responses welcome.
@Paul Instead of webstorm, I suggest VSCode for 'static analysis'.
thanks
It uses typescript to do that. You don't have to use TS. You can use plain JS.
I haven't given visualstudio much thought, maybe worth a look as msft has become more linux-friendly. Everything here basically runs linux.
vscode, not full old-shool visual studio
(microsoft loves to re-use names)
and it is cross platform
06:32
Saves on lawyers/trademarks/domain names.
and ad copy.
Ad looks nice. A shame this thing isnt a web app.
It's almost a web app... it's written in JS. It runs on Electron.
The text editor component is usable on web pages (it's html and JS): microsoft.github.io/monaco-editor
Fascinating.
Thanks again. Gotta run.
07:02
omg this show
now pedophilia
07:27
mornin
08:19
in Java // NOT ANDROID OR JAVASCRIPT, 1 hour ago, by CausingUnderflowsEverywhere
javascript IS Java. it's scripts written in java.
08:38
good morning
@JennaSloan Shouldn't feed trolls, but I gave that a reply in the other room.
08:59
morning
I really should not eat mcdonalds for breakfast..
it's ok, I think they feed 2% of the world population... just don't do all three courses there
especially don't do it for a week... you'll force your guest microorganisms into genetic mutations to survive
hahaha
@FlorianMargaine what's a redshift substitute for wayland 😪?
09:49
jsfiddle.net/pengwah/2p1qgszn/2 Can someone explain why my area code and phone number wont display? I know I should use split but is using innerHTML redundant?
@Hello looks like you're never actually calling start?
jsfiddle.net/pengwah/2p1qgszn/3 I added the line to call the start
hmm, dunno if that actually works in a fiddle
@Hello you didn't assign an id to the split button and document.getElementById('whichdoesntexist') should return null
and (null).addEventListener(...args) should have thrown an error
woops..forgot to add the IDs
wtf is this, first match for IIFE in the documentation stackoverflow.com/documentation/javascript/4655/…
oh, it's for modularization techniques
@Hello try with a simple call to start(); at the bottom
(function start () {
})();
^ that's also not bad, some peeps prefer that
10:04
ah
trying something
10:34
@FilipDupanović o/ hey man!
So does anyone have a good way to minic echo but in js or a good way I can insert html without having to make it one big string and add it as a new node?
@lix ohaaaaaaaaaaaai :D
long time no so chat! how've you been?
I'm really good, had a small phase of I don't know what my lifes about and I'm doing. But now I'm back to work and doing my last uni project before it's all over, how about you?
started looking for jobs and made a good friend irl, so stuff is good atm
hmm, nothing I can think of without punching in huge strings
Ooh swish what kind of jobs have you been looking at?
Yeah maybe I should move to react, but I feel like that just adds to the complication level
I had a test week at toggl.com, nice crowd, but dunno how I really did
10:38
ohh awesome, what kind of stuff did they have you doing?
I was in the frontend team, they have a huge React application and some legacy Backbone stuff
basically anything you'd do in the course of your normal day work, but I'm sort of not liking this idea of a test week (was my first time)
you gobble in bazillion lines of code that you might have to flush out immediately out of your system\
Ahh right, yeah can't say I've ever heard of test days.
LOL
Pretty deep dude haha
Gotta turn all of this into a long ass string just for output :/ gist.github.com/LiamDotPro/8444966c9f71ccc3124ebeeaec02b5cb
hmm I'm not sure I can get away with it
you just need to strap on Babel or some other transpiler and pick an implementation for creating the actual DOM elements
if not, dunno where web components are atm, but you can use that and just import HTML into the main document
10:48
Yeah I'm gunna output it first then try and find a better approach
@FilipDupanović puu.sh/uOomt/2cf3798fcc.jpg here's what I've got so far
decorators don't seem real. What do people use them for?
@towc I was always taught to use the decorator pattern for loggers
@towc before/after traps wrapped around some routines
takes the before/after bits away from the context so you can focus on the main thing that's there in front of you
oh you know this already... well, dunno, there's no syntax support atm and they're still pretty useful
I've seen it being used in react-redux. It feels more messy than cleansing :/
@lix looks sweet
10:58
it's probably just because I'm not used to the syntax
hmm, I think you can get away with that, dunno, I'm not big on react-redux
there's probably a way you can apply that on the component itself without having to use decorator syntax
decorate(my(CustomComponent))
anyone used jquery ui? im trying to position element: position: { at: "right bottom+20%"}, however the +20% does nothing
11:24
react-redux vs flux?
flux and redux are one and the same, I guess
one big state object and serializable events that update it
although redux is a lot more opinionated about how stuff should be done, so it's much easier to use
11:41
@Alesana a high dose measured in milligrams will put you into a generator that's eventually going to yield you back as the next value
it's not bad to take a jaunt into the scheduler's main loop
12:23
@towc ew redux
@snowy500 not since 2011.
@FilipDupanović flux isn't really a "one big state object" approach.
Both are awful.
meh, don't know how to best describe it then... changes coming in from the left, subscribers getting notified on the right and majik impurity somewhere in between
@BenjaminGruenbaum so what else is there? I saw your talk on mobx, looks really nice... actually everything looks nice until you get down to writing tests
Try MobX
It doesn't do architecture but it gets rid of a ton of ugly code
I am put off by observables because observable::try()::to()::test()::me()
well, I at least saw it gets rid of deriving data from state, or at least that's what I took out from it
I do catch myself doing things like getSmt(state) multiple times because I need the dervied data at disjoint spots
12:40
@BenjaminGruenbaum why not?
@FilipDupanović wait, what?
@towc not recent, but I have nothing newer in English youtube.com/watch?v=VT6_v2lHi0Q
Ignore the RxJS part - it's done better with MobX
13:04
@BenjaminGruenbaum well, sure, redux is not as functional as people may say it is, but that doesn't mean it doesn't work well
@FilipDupanović Wayland doesn't work on my CPU, can't say
@BadgerCat afk playing, actually
13:27
Someone compiled lua to wasm. That's pretty cool github.com/vvanders/wasm_lua
13:40
@BenjaminGruenbaum Sweet SO shirt
14:06
anyone worked with event.path?
really wierd
what is event.path
I'm clicking on a button and get the above
no idea why there is a shadow and document-fragment, probably some plugin adding that to my DOM
I'm trying to generate a unique query for an element without an id
I think I can ignore everything after the body
14:37
do it right, add a class
or simply keep the element in storage
Is there a way to add several cases to one switch option without resorting to the fall-through feature? I am required to keep the cyclomatic complexity low.
i.e. this:
case: 'optionalTriggerCommand'
case: 'secondaryTriggerCommand'
....
break;

Is not allowed.
@JackOfBlades no
You can of course not use a switch statement
Well I need the functionality, whereas isolated ifs would just make jshint go off again. Guess I'll have to try and think outside of the box or something.
you can de-js hint it
ask jshint to ignore it
I don't think the professors allow it. They said it has to be spotless when they run jshint on it. And they don't hold back from what I know.
14:50
heh, in the comment where you ask jshint to ignore the thing, also write why to make your professor know what's up
Sorry, I should've.
also, it is really bad practice to do switch cascading like that anyway
if you need it, it's likely that your structure can be improved
I'll take it into consideration, thank you.
Off to bed now, I hear the birds chirping. See you, folks.
@FilipDupanović I'm trying to understand your message
Anyone ever used Fiverr for graphics?
15:16
jsfiddle.net/pengwah/2p1qgszn/6 hello, could anyone help me figure out why nothing is output in the text boxes?
@Hello I think I see
Hello @Hello
Well first of all you are trying to link the Split button by the wrong ID
ah
just realized!
Then there are some other things wrong with it
split is supposed to be used on a string, to turn it into an array
So the first use of split is great
But then you try to split the output of split, which is an array
Then with this code
var areaCode = document.getElementById("areaCode").value;
  areaCode.innerHTML = areaCode.substr(1,3);
oh
15:24
You are setting the value of areaCode to a substr of what is already in the textbox, but the textbox is empty
^ listen to Alesana
oh..
I don't need .value then
Why are you trying to use split a second time? do you not want 555-5555 to be in the last textbox or do you want to split that?
15:25
what I was attempting to do was split to extract the area code as a token, the first three digits of the phone number as a token and the last four digits of the phone number as a token
so by using split twice yep
user6820627
@Hello You couldn't understand what you wrote o_O
user6820627
so there are logic errors
^^
But what about (555)?
Don't you want the second text box to be 555, and the third textbox to be 555-5555? Or am I mistaken?
That is correct yep
Hellooo.
Any idea of how I can read a .json file in the same level of my .js file using only html and javascript? No jquery and no ajax, with no php and no server sde technologies?
Any way by using a <script> or <link> tags?
15:29
but I wanted to add the "-" which is why I wanted to use split twice
but i guess its redundant
Add the - where?
555-5555
It's already in there though
yeah i just realized..derp
Another thing is you have var areaCode = document.getElementById("areaCode").value; which sets the variable areaCode to the whatever the value of that textbox is, which is a string.
15:30
so I can just remove that code
whenever I export interface I keep getting error cannot find cannot even though I have exported it
Then you try to edit the value using innerHTML on the string, but there's no innerHTML of the string
yeah, im just going to take off .value
So you want to set the variable areaCode to the object, which is just document.getElementById("areaCode")
can I post code here ?
15:31
Then you use .value instead of .innerHTML below
ahh
user6820627
@Hello I fixed your code. jsfiddle.net/2p1qgszn/8
user6820627
No split.
Now token1 actually contains both tokens, you access the first one by using token1[0] and the second one using token1[1]
wtf, there are taxes on owning dogs?
15:33
@LearnHowToBeTransparent I was trying to use split only, instructor said, thanks!
@Alesana I will try to implement that
Thanks alesana
user6820627
@Hello JSFiddle handled the onload event for you, so just do dom operations right away there.
user6820627
no window.addEventListener('load ...
yea, teacher just taught it to us this way
@LearnHowToBeTransparent I would assume he doesn't have his actual script in a JSFiddle though
If you want the code that would execute correctly based off everything I said I can give it to you, or if you want to figure it out I'll let you :P
who's your teacher?
15:36
@Alesana I think I will give it a try, then I will ask for your halp if it doesnt work xD
its a web development I course
user6820627
@Hello Recommended: If you use JS in HTML file, put it at bottom, before </body>, no onload events. If you want to make damn sure DOM is loaded, use DOMContentLoaded event. And you should learn to code yourself, do not go to a class about it.
user6820627
> It is an incredibly popular mistake to use load where DOMContentLoaded would be much more appropriate, so be cautious.
thank you siir
15:43
can anyone help me with interfaces I keep getting cannot find error
I dont really know how to copy the same exact code on plunker :O
for angular 2
16:05
hi I have a problem with my js anyone here to help me ?
16:24
depends how complex but I can take a look
@SyedMuhammadShafiq show your code
jsfiddle preferably unless it is nodejs or something. codepen sicks
am I the only one who likes codepen over jsfiddle :O
16:44
I like Egg McMuffins
16:58
^ prefer chic-fil-a but that isn't common up north
Anyone know of a way in Chrome to make the certificate properties more accessible again?
user6619012
hi all, please help me to sollve console errors in link
is anyone here who knows angular 2
Weekends are pretty dead.
user6619012
@Luggage yes, no one will help in weekends.......
17:10
Whats the best templating library, not very heavy one? Does nto have to have very fancy stuff
For what purpose?
Multilingual web
Have you seen / tried this to help see what your options are? garann.github.io/template-chooser
Thanks
I'll take a look
I highly suggest react for web projects. I wouldn't call it lightweight, but it's not bloated, either. It's way more than normal templating, but it's not a full framework, It just does the "view".
But if you really want JUST plain old templating, then maybe Mustache.
17:14
Thanks :)
twitter.github.io/hogan.js Hogan is mustache-derived, made by twitter.
nice
can anyone help me lift up my question ban ?
I can't. Bad back.
;-; damn
17:35
I solved it finally I broke free curse interfaces
hue hue my first interface i love you
18:25
@ssube I see you have allowSyntheticDefaultImports = false. Do you get warnings for some libraries? e.g. import React, { Component } from 'react'; gives: .../node_modules/@types/react/index"' has no default export.
18:43
Thanks for the PRs @Luggage
I've added you as a collaborator, I think you've earned it.
happy to help
what is a collaborator
Someone that gives information to the enemy
i wont be that person
j/k. He just listed me as somene that contributed to an open source project
18:45
I want to contribute to open source but everything seems too complex for me
@AtharvaPandey someone who has direct push access to the project.
github.com/benjamingr/bluebird-api <- talking about this btw.
I want to publish to NPM by the start of April
@BenjaminGruenbaum Shall I continue to PR for everything? Or just things that I think are controversial / need discussion?
ben can i also be part of something like this the next time you start
I guess i will learn a lot
indirect push is enough for me XD
You can be a part. you don't need permissions to submit code.
That is what is so great about pull requests.
18:46
yes if i understand whats happening
@Luggage PR if you'd like feedback, basically.
gotcha.
If you're sure of something, there is no need - but mark it with an issue so I know you're working on it.
I want to create a chatbot using JS if i knew where to start from
I'm going to try to get setScheduler working which is going to be a little tricky.
18:48
yea.. I should have done with filteredCatch, but started diddling.. then before I knew it i was almost done
thanks @FilipDupanović
@BenjaminGruenbaum is using/disposer a goal? I can't think of any native equivalent.
except I always have to re-read to remember why it's different than a "finally"
@Luggage I think so, but it's a little tricky. I think some/any etc are easier to do at this point.
I'm a little torn about using, it's a great feature but rarely anyone uses it.
ok, so not a priority, then, quite yet. you want more mainstream features filled in...
18:56
maybe promisifyAll
promisifyAll is used almost everywhere and is relatively simple to build at this point by taking bluebird's code on top of promisify
also, fromCallback and promisify are very simple at this point, they can share code.
19:16
Why is Chrome's RNG so slow?
probably because it takes time to store it in NSA database
looooooooool
Hi guys, any JS gurus willing to help around?
@Chriss 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.
0
Q: Javascript/jQuery Multi filtered gallery and arrays comparison

ChrissI'm sorry if this is a duplicate questions, but I've spent over 8hrs trying to figure out how to implement this, but it seems I haven't succeded so far. I've got a photo gallery, each foto contains multiple tags. If multiple tags are active, it needs to show only items that include all the selec...

19:26
you have in front of you the gurus of the gurus
some of us are experts in beef jerky/fish tanks, others know how to spill things very efficiently, and others are just a joke (cough ndugger cough)
anyway, question is unclear. If you could add some examples of expected behaviour and what currently happens, that would be good
and don't start by excusing yourself and how much you tried, but rather explain concisely what you've tried and why it didn't fit your needs
19:43
Hey, I'm a joke, too.
you're a thumb. The best thumb
(hope it's not offensive)
why would x2 be a NaN?

export default {
  foo: '  ',
  fooX2: this.foo + this.foo
};
It's what my mom always told me growing up. It's good to have validation.
this still refers to window
@SuperUberDuper y u no strict mode?
19:46
i thought webpack automatically done it in strict more + typescript
Nope. It's not it's job. Babel does, if I recall.
looks like webpack might for es6 modules..
> v2 doesn't add it by default. It only adds it to ES6 modules (spec). Which module is breaking? Could you paste a link to the relevant file. - Sokra github.com/webpack/webpack/issues/2512#issuecomment-220360924
> The ES6 spec imply strict mode when using ES6 modules. So when you use import or export strict mode is automatically activated.
can you imagine holding the world on your shoulders (sokra)
activated by webpack 2, in this case, since it transpiles a bit
ohh, I didn't see the + typescript.
20:01
@MadaraUchiha Yea. I'm sold on TS. I always knew I wanted to switch, but just avoided doing it. It was WAY more painless than I imagined.
@Luggage I know! :D
I have a lot of JSON schema that I want to either start generating from TS reflection or.. something
or JSON Schema -> TS
@Luggage Well, I don't know about schema to TS, but there is that tool where you give it a sample of your JSON and it generates types for it
VScode is what pushed me, since even befor eI switched I was getting benefit from it's built-in TS
Then you can do things like fetch<MyJsonResponseType>(url) and get a Promise for that
20:02
Yea, I saw the JSON -> TS link
and found other JSON Schema <-> TS options.
the keyboard typing is not going well, today.
I also avoided it since my project started 100% coffeescript and I slowly converted to 100% JS. Once bitten, twice scared.
sdd
sdd
Guys, can you have a look at this question:
http://stackoverflow.com/questions/42879356/jquery-space-in-string-is-causing-issueswrong-position-of-quote
omg go comet!
20:26
lol marbles race
what a great idea
20:41
@Meredith whats crazy is skipping ahead it was hard to tell if I was looking at real footage or a game lol
It's real
^ linked timestamp with glowing marbles lol
wooow what are those
lmao idk
this is crazy
the account has over 150k subs
Oh yeah the halloween race
That was a good one
20:43
daaajuuuum
Google's new JPEG compression algo github.com/google/guetzli engadget.com/2017/03/17/…
00:00 - 21:0021:00 - 00:00

« first day (2345 days earlier)      last day (2826 days later) »