« first day (1993 days earlier)      last day (2970 days later) » 

9:00 AM
it's still opt-in
 
The Maybe antipattern :D
 
Either is a monad, shush
 
Either is great, it's like throw :D
 
I CAN HAS MY OWN ADT MONAD OKAY
 
If your code is always Either<success, fail> then it's just like JS code that can throw.
lol
Except JS people don't understand how throw works.
 
9:00 AM
I need a coffee before I talk to you :D
 
You don't use it - you use dumb callbacks instead that return a tuple and map with both and everything is explicit :D
I understand how frustrating it is to discuss these things with someone who actually wrote code in Haskell and did a course in typed lambda calculus. You can still probably convince me of a lot of things about types or FP that aren't very well based - but it's a lot harder.
On the upside, I kind of like Idris now.
Also, I had an interesting discussion with a friend about TypeScript the other day - his outlook on optional types was interesting - it's like telling the compiler "assume this lemma - I got this".
If TS had dependent types that'd be awesome.
 
I took a course on proving correctness of programming languages
 
Then I might actually use it.
 
> Except JS people don't understand how throw works.
Care you elaborate? ;)
 
Every programming concept had to have a mathematical equivalent
 
9:03 AM
@BenjaminGruenbaum yeah, that's a huge thing IMHO
 
@Neil a common mistake people make is that they think functional programming is the only way to prove things or show they're correct - most of our proof models for program correctness are completely imperative.
 
Variables had to swap values. You couldn't use unassigned or null
 
I can't see how I could use Idris like a regular lang without an option to skip some verificaiton
 
@MichałMiszczyszyn Node can support throw in asynchronous code today but chooses not to - for one thing. JS people are used for asynchronous programming with callbacks that traditionally meant you couldn't throw in async contexts. That's not the case anymore but it is still the mindset.
 
crl
wow React is overriding Node.prototype a lot, .render, .setState on it
 
9:05 AM
@BartekBanachewicz well, if types are optional it could be great to enforce some actually interesting contracts.
 
Is there anything in javascript to prepare a query string with the correct format?
 
@ErroreFatale not in JavaScript itself, but in its host APIs (browser DOM or Node)
 
@ErroreFatale serverside hopefully
 
@BenjaminGruenbaum does that mean that would be different for each browser?
 
9:07 AM
@BenjaminGruenbaum yeah, I guess the "all or nothing" is kinda problematic in a lot of such languages. But then again, if Dependent Haskell gets real, it might just hit close to home
Liquid Haskell is fully optional
 
@ErroreFatale it should be done only on the server, so the browser isn't an issue
Liquid Haskell... I don't know what that is, but I want to learn more about it
 
how does one change the text of index.html by pressing a button?
in other words, how does javascript write to .html files?
 
what have you tried?
it's basically a selector + textContent and the likes
 
@GNi33 Tea, Coffee, Hot water, cold water etc etc.. and am quiet impressed
 
@Neil it's a system for dependent annotations in comments for haskell code
 
9:16 AM
sdfgkll;
 
sometimes I get freaking frustrated just reading Bartek and Benji talk about stuff
 
@BartekBanachewicz types all the way is annoying for a lot of stuff.
Sometimes you genuinely don't care.
@BartekBanachewicz @room vimeo.com/74354480
 
@BenjaminGruenbaum eh, I guess I've come to admit that's true quite some time ago
 
I can't use FormData() using es6, am I doing something wrong? FormData is not defned
 
I like the style of explicit typing for top-level functions and implicit typing for anything else.
 
9:23 AM
FormData is not part of ES so it doesn't matter if you use ES5 or ES2015 or ES2016
What browser @Darick?
 
Google chrome
i don't know whats happening this is frustrating
even XMLHttpRequest doesnt work
 
Are you using Worker? Many objects are unavailable there.
 
@JanDvorak Typing of data is quite problematic as well
 
XHR should be available in a web worker
 
cue the whole SQL vs noSQL
 
9:25 AM
im using babel something used in vuejs
 
Databases don't have a very strong type system, that's true.
 
@Darick Have you tried a different browser? Does it work outside of your project?
 
@Mic
 
@JanDvorak Stronger than the primitives of most languages.
 
@MichałMiszczyszyn yes, I have tried
 
9:27 AM
some languages for sure, but most?
SQL doesn't even have arrays!
 
this is really frustrating It should work
 
@JanDvorak You can regard the table / result set as array. In stored procedure, for example.
 
@Darick don't ping mic because you just pinged every user on SO whose name begins with mic
 
exact error is
error no-undef 'FormData' is not defined
sorry I'm not aware, i forgot to press tab
 
I still don't have nested arrays. And even if we allow joins, I don't have runtime polymorphism.
 
9:29 AM
@Darick That sounds like a linter error
 
@Neil of which there aren't any
 
@Darick no sweat, just for future reference
@JanDvorak no?
 
using window.FormData works though
 
@JanDvorak Polymorphism is beyond data types. But SQL has many data types, both simple and fancy.
 
typing @mic only offers @MichałMiszczyszyn for completion
 
9:31 AM
@Darick Do you have "env": {"browser":true} in your eslint configuration?
 
@Neil ... that were recently in this room
 
1 message moved to Trash can
@Darick Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
 ```
module.exports = {
  root: true,
  // github.com/feross/standard/blob/master/…
  extends: 'standard',
  // required to lint *.vue files
  plugins: [
    'html'
  ],
  // add your custom rules here
  'rules': {
    'no-unused-vars': 0,

    // allow paren-less arrow functions
    'arrow-parens': 0,
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
  }
}

```
 
Short answer was "no", I presume.
 
what should I do to update?
 
9:32 AM
Read the documentation. eslint.org/docs/user-guide/…
 
@MichałMiszczyszyn it works now
"env": {
"browser": true
},
 
@BartekBanachewicz where is this from?
also codewords.recurse.com/issues/six/immutability-is-not-enough someone is so close to discovering functional programming for real
 
TIL the important distinction between requestAnimationFrame and setInterval: The former won't run if the tab is not visible.
 
@AwalGarg the eloquent js thing
 
@JanDvorak Does it? :O
 
9:45 AM
@FlorianMargaine I shouldn't have told him then?
 
At least for me it does; latest Firefox
 
But does it run at the same pace as when the tab is in foreground?
 
@Darick my sincere apologies. Do please continue to ping as you did before. Apparently, I have erred
 
Because it certainly didn't:
> In early 2011, both Firefox and Chrome clamped the minimum wait time for setTimeout and setInterval to one second when running in a tab that is not the active tab for its window.
 
I have a simulation tied to the display loop, which is realised by RAF. I have a counter tracking the progress of the simulation. I have noticed the counter isn't decreasing when I switch to another tab - but it might have just been slowed down significantly.
Should I test with setTimeout?
 
9:49 AM
I think it'll be slowed down anyway
 
I noticed that chrome will not immediately load pages until you focus them, when several pages are loading
 
Firefox has been doing it for years
 
Chrome certainty favors the active tab
 
firefox is super annoying with that
 
You can turn it off
 
9:52 AM
Chrome is much smarter than FF at resource allocation in this area in my experience. FF feels really sluggish in comparison with lots of tabs.
 
@JanDvorak I don't want it to take a couple of GBs
 
@FlorianMargaine about:preferences => general => don't load tabs until they are selected
@FlorianMargaine so, what do you want?
 
@JanDvorak like chrome.
 
that is?
 
not annoying
and still cuts off resources when it feels like it
 
9:54 AM
That your browser randomly unloads tabs when it feels like?
 
when it thinks it should
 
Confirmed; setTimeout fires at reduced rate in background tabs, too.
 
Firefox: "Your shoes are untied..." "Stop being annoying, Firefox! Gah!"
 
Define the distinction between intuition and thinking in a computer program
 
Don't know why, but I imagined the reply in napoleon dynomite's voice
 
9:56 AM
how chrome achieves that: i.imgur.com/v2RiPUU.jpg
 
@AwalGarg poor guy is just hungry
 
Perhaps Chrome thinks of itself as an operating system lite.
 
Not sure about Chrome but webdevs and Google sure do think of Chrome as an operating system.
 
When you consider the importance of browsers today with respect to '95
Today I couldn't use my computer without a working browser
 
Which is problematic if I want to run a desktop game and have a webpage open on a second monitor
 
10:01 AM
web doesn't want you to run a desktop game. it wants you to run only web games.
 
@BenjaminGruenbaum frankly the talk was shit though. It would easily fit in 20 minutes and even then it's not that valuable.
 
Web games can't replace desktop games. Web games can't go over 200 FPS simply due to the limitations of the browser environment.
 
@JanDvorak I suspect that will change someday
 
^. servo's webrender already renders heavy stuff at ~500fps when gecko/blink lag.
 
In the mean time there are still desktop game developers who still lock their games to 30 FPS and if you unlock that manually they run at ridiculous speeds.
 
10:05 AM
lol
#gamedev
 
!!undo
 
Well I suppose the types of games running at 200 fps won't be online poker
 
@JanDvorak I'm afraid I can't let you do that, Jan Dvorak
 
... wat
@Zirak why can't I undo my own messages?
 
10:07 AM
I imagine more like the browser encompassing all the launch abilities of steam
 
Could even be steam working in tandem with Google
 
@Neil Faacebook
 
> You can control the menu with pageUp/pageDn; keys I barely knew even existed.
 
@Abhishrek I swear if I hear someone mention candy crush one more time. ..
 
10:20 AM
what's Candy Crush?
 
@JanDvorak the bane of my existence
 
> A wild candy crush request appears
 
Jan uses Uninstall Facebook. It's super-effective.
 
In fact I don't use Facebook much if at all
 
I think Badger does
 
10:25 AM
Is there something called a "npm proxy" ?
0
Q: Custom npm proxy to catch all js requests

malcoauriI want to create some npm proxy to catch all js requests and return some another js for it. For example, page requests 'js/jquery.js', my proxy returns 'js/some_js.js'. Is it possible? How can I do it easy? Thanks!

 
I wouldn't be surprised
 
Catch all js requests? I feel like a nice pokemon reference is missing. Hmm
 
I'm really curious why would anyone want to do that. On the fly minification?
 
it looks like he just wants some proxy
 
!!stats 895487
 
10:28 AM
@littlepootis malcoauri (http://stackoverflow.com/users/895487/malcoauri) has 1997 reputation, earned 0 rep today, asked 320 questions, gave 0 answers, for a q:a ratio of TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡.
avg. rep/post: 6.24. Badges: 7g 28s 58b
 
Some lite npm web server in order to proxy all js requests — malcoauri 1 min ago
"npm web server"
 
A setTimeout animation loop seems to fire at half the speed when in a background tab. Is there any way to prevent that?
 
@CapricaSix TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ is the perfect q:a ratio
 
!!stats jandvorak
 
@JanDvorak User Elusio proved elusive.
@JanDvorak You (http://stackoverflow.com/users/499214/jan-dvorak) have 17873 reputation, earned 0 rep today, asked 0 questions, gave 519 answers, for a q:a ratio of H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ.
avg. rep/post: 34.43. Badges: 7g 35s 58b
 
10:32 AM
I think H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ is a better q/a ratio than TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡.
 
To the pony? Is that some sort of inside joke?
 
tony the pony
 
!!se tony the pony he comes
 
@JanDvorak That didn't make much sense. Maybe you meant: sw
 
!!help sw
 
10:34 AM
Oh, then maybe it isn't being rendered properly
 
@JanDvorak sw: User-taught command: (w+) (\w+) $2 $1
 
screenshot?
 
Using mobile
 
There's an app for that
 
Using Chrome app, weird
 
10:37 AM
You need an app for taking a screenshot? What mobile phone do you use?
 
Still amazes me how many high rep users in don't know about ES6.
 
@BartekBanachewicz that's not actual criticism
@BenFortune why? It's less than a year old and you can get by just fine without it.
 
@BenjaminGruenbaum I know, but not even heard of it. Especially when you're trawling through the JS tag on SO
 
!!nudge 10
 
@MadaraUchiha Nudge #1 registered.
 
10:40 AM
Nice word, trawling
 
Etymologically related to "trolling"
 
@BenFortune link?
 
KO1() is a syntax error (an object key is expected) and that error is preventing the rest of the code from running. KO2 should work if you remove KO1. — Frédéric Hamidi 31 mins ago
 
@MadaraUchiha nudge
 
@BenjaminGruenbaum he said a lot of things that didn't really bring any value
 
@Shea wow, nice.
 
@BartekBanachewicz he showed actual research that showed no improvement whatsoever in regards to number of defects when using static types, he showed research that showed a decrease in development time, and he explained why he thinks that this happens.
 
That sounds like stuff that could have been done in 20 minutes
 
Did you watch the talk?
The first 10-20 minutes is background on what it even means
 
I watched the first 10-20 minutes
 
11:10 AM
@JanDvorak right
 
crl
!!> JSON.parse('test ${1+1}')
 
@crl "test 2"
@crl "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"
 
hastebin.com/axusoliqah.coffee help me to shift it to s3 bucket
 
@AbhishekKashyap uguuu
you use promises, but the code still looks like a callback pyramid :P
 
what i have to do for transferring every image to s3 bucket
 
11:19 AM
I have a var last = 'for-3'
 
@MatthewSmart 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.
 
Now i want to select an element with the class name .for-3
$('.' +lastpage).show();
how do i make this work in jquery
using a variable inside $()
 
that should work already
but really, document.getElementsByClassName is cleaner in your case.
 
why would that be cleaner?
 
@BartekBanachewicz , how can we redirect each images to bucket
 
11:21 AM
out of curiosity
 
@MatthewSmart yes
it should work
 
@littlepootis it does work
 
You don't mangle the data you have so that you can use the abstraction you like instead of what the browser provides to you natively.
 
I messed up aha
 
Which also implies performance improvements.
 
11:22 AM
variable was lastPage not lastpage -_-
@JanDvorak ok fair enough. I will use that instead, PHP developer not too amazing with javascript :)
 
Is Stack Overflow dead for anyone else? It's been for me for a day or so but it does load through the official SE app for Android.
 
not me
 
@JanDvorak works here
 
hastebin.com/axusoliqah.coffee help me to shift it to s3 bucket @JanDvorak
 
11:31 AM
^kick please
 
user3119231
!!ban @AbhishekKashyap
 
@Maurice The user will be thrown into mindjail in 1 more invocations
 
@Maurice I meant, out of the room.
But sure, we can deny him access to the bot out of spite.
 
user3119231
o/
 
nice answer from the group members....!
 
11:39 AM
You have already been told to not ping specific people and beg for help.
 
user3119231
thanks Jan.
 
its okk
 
Til that strangelets are theoretical particles that would destroy the planet if created by the LHC
Scary idea
 
@AbhishekKashyap (also, do read theoatmeal.com/comics/apostrophe)
 
@Neil s/would/is hypothesized to possibly/
 
11:43 AM
@KendallFrey I thought that was implied by the "theoretical"
 
theoretical !== hypothetical
 
I'm going to stick to the term "evolution hypothesis" from now on.
 
We'll burn that bridge when we get to it
 
When ILHC creates a strangelet there will be no bridges to burn, or by whom.
(insanely large hadron collider)
 
Not advocating against the use of the LHC mind you
 
11:47 AM
@Neil s/theoretical/hypothetical
 
Absolutely. We should only start to worry when we surpass the enegries that regularly occur within the atmosphere
Not even then actually, because God won't let people destroy the universe.
 
@littlepootis why wouldn't theoretical fit here?
 
@Neil I guess because there is no evidence of stable strangelets
 
Because they are elementary particles and haven't been observed yet. They are technically theoretical, but there is nothing theoretical about them.
 
Wikipedia calls them hyopthetical
 
11:49 AM
Time to edit wikipedia?
 
@KendallFrey so it's theory, as in not proven
 
That's not what theory means
 
nothing in science can be proven
 
that's pretty much the definition of hypothesis
@JanDvorak That's provably false
 
@Neil it's not a theory
 
11:50 AM
And now cue the nihilists
 
@KendallFrey How would you prove that?
You have to start with an axiom.
 
@JanDvorak By giving an example of a hypothesis which is trivially disproven
 
@littlepootis you would call it a hypothesis then?
 
@Neil yes
 
@KendallFrey Ok... no hypothesis can be proven.
 
11:53 AM
@JanDvorak sure, why not?
 
@KendallFrey Each hypothesis relies on at least one axiom
 
and?
 
you can never be sure about the truthiness of the axioms
 
that doesn't mean you can't use the axioms to prove anything
 
11:54 AM
You can only prove a hypothesis with respect to a set of axioms
but a hypothesis is a set of axioms
 
Is this turning into a debate about realism?
 
What do you guys think about creating a generic controller for accessing items using REST API and having specific controllers inside the scope that pass parameters to the generic controller via $scope.$parent?
In angularjs
 
You can only prove that a set of axioms is inconsistent with reality, you can never prove that it's fully consistent.
 
I can prove that my ex broke up with me
 
I thought you said nothing was provable
now you're giving an example of something that is provable
 
11:57 AM
4 mins ago, by Jan Dvorak
@KendallFrey Ok... no hypothesis can be proven.
 
I think he was just making a point
 
I hypothesize that the Earth is not a giant marshmallow
 
In the absurd case, nothing can truly be proven
 
ok... let me think about my definition of hypothesis
 
think for the rest of today, please
this is boring
 
11:59 AM
G2G anyways, getting a job.
 
user3119231
@JanDvorak good luck!
 
@JanDvorak remember, your greatest weakness is that you work too much
Joking aside, interviewers can't possibly think that they ever receive a non-bs answer to that question, can they?
 
@JanDvorak good luck!
hey baes
 
@Neil my left wrist.
old injury
 
@rlemon guess you're all right now
 
12:12 PM
@Neil yea. it's healed as much as it will
ligament is never growing back
 
(All right) now...
 
Hi o/
 
 
@Neil Y U NO LINK?
 
12:16 PM
@OliverSalzburg nightmare with mobile le sigh
 
@Neil no I got it
but you immediately made me think of free
now I'm jamming out
 
Oh, no now I've got that song in my head
I think we should all share one thing we've learned everday
In this way our collective knowledge will grow until we surpass the greatest minds of our generation! We will become gods!
 
@Neil you bait wild hogs with piles of potatoes
 
I knew that one :/
 
@Neil did you know about yo-yo despin technique
 
12:27 PM
No, and still don't. Mobile phone, remember?
Sounds interesting though
 
your phone can't play webm?
 
@Neil What mobile phone do you use?
 
It can, but I have 100mb per day, and my brain must share
 
no wifi ?
 
@rlemon nope. I work for a bank, not a startup
 
12:30 PM
@Neil weird. almost all businesses around here offer public wifi
it's shitty connection, but still. free.
 
A) in italy and B) in a bank headquarters. Frankly I should be happy to have a led monitor
 
@Neil dude even my mothers bank has a wifi and I am in India
 
does the "window.onload" event wait for the resources (images, etc) to be loaded?
 
dafuk!
 
banks in Italy sound shitty if having a led monitor is a perk
 
12:31 PM
or only the DOM?
MDN says The load event is fired when a resource and its dependent resources have finished loading.
 
@Abhishrek might be a security thing I don't know
That is why I am using mobile phone
 
@Neil well in your defense I did demonstrate them they were open for DNS rebind attack
 
Proxy server from hell
@Abhishrek so you're the reason behind it
 
@Neil lol no
They have a wifi for staff which runs separately from their LAN which runs their core (That part they did get right)
Also they use fingeprints over passwords (Which I find effing cool, is that the same in Italy @Neil) ?
 
My internet provider managed to setup a wifi network accessible by their customers anywhere in the city
Shame that I don't work in the city
@Abhishrek fingerprints? No, but there is a law requiring all wifi networks to be password protected
Even in friggin' Mcdonald's there's a friggin" password
 
12:40 PM
@Neil not for wifi :-( for verifying everything they do in their system.
 
@Abhishrek the sensitive information gets obscured, but otherwise we have access to a copy of the production database
 
What if I accidentally chop my fingers off
 
@littlepootis you cant work then :P
even without the fingerprint sensor
 
fingerprint scanners are pretty easy to fool
I wouldn't trust it as my main line of security
 
12:50 PM
> fingeprints over passwords
isn't that 2 factor ?
 
simple jquery statement, i want an anchors parent LI , next li to hide
 
1 message moved to Trash can
@MatthewSmart Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
if(firstVisible.hasClass('active')){
firstVisible.parent('li').next().hide();
}
Sorry i didnt know about the formating code on here
<ul>
    <li>
        <a class="active" href="#"></a>
    </li>
    <li>
        <a href="#"></a>
    </li>
</ul>
Any ideas why this isnt working?
 
@Abhishrek no
 
firstVisible is the anchor with the class active by the way
 
user3119231
12:53 PM
looks fine.
 
-_- why isnt it working then lol
 
Im not sure I understand what you're trying to do
 
sorry @BenCraig , essentially the anchor tag with the class of active
 
i want the li which contains the anchor tag with no class to hide
 
12:54 PM
> "It is nothing but God's act,"
@littlepootis ^
 
so in humen text it would follow similar to, anchor with class of active > parent li > next li > hide
 
user3119231
js -> document.querySeletorAll("a") loop check if class == active else hide
 
@Abhishrek what the fuck
 
is firstVisible.parent('li').next() actually getting you the right li?
 
@littlepootis yeah :-/ that article is terrifying
 
12:56 PM
that wont work in my situation @maurice as i have more code, ive just made a smaller version to demonstrate here
 
user3119231
why shouldn't this work?
 
@BenCraig no it is not
 
Oh the hue manatee
 
@maurice because i will have many more anchors which i dont want to hide. Your code would hide all of them and not the next one
 
user3119231
Huh? Okay.
 
12:58 PM
@BenCraig but if i simply do firstVisible.hide(); it does hide the anchor text
 

« first day (1993 days earlier)      last day (2970 days later) »