« first day (1862 days earlier)      last day (3103 days later) » 

2:03 PM
@tereško Common sense disappears if people thinks that they got offended
look to the Zwarte Piet controversy in Flanders and The Netherlands
 
if you really try, you can also be offended by "Bachelor"
... and professional wu-wu pedlars are very offended by "Doctor"
 
@tereško I was offended by @BenjaminGruenbaum's face.
 
@MadaraUchiha you probably should start a change.org petition then
starting a hashtag also might help
 
i get offended by the changes in change.org !
* staying classic *
 
crl
2:26 PM
I have some crazy weird issue, on chrome or FF, codepen.io/crl12/pen/NGJjzp?editors=001 when you drag one of the 3 top element in the main list, you may see some WTF in console, it's triggered when a .getBoundingClientRect of an element is >300 in width or height, which shouldn't happen since they are all ~100px (even $$('.element:not(#root)').forEach(e=>{var r=e.getBoundingClientRect();console.log(r.width<300,r.height<300)}) shows it's ok, but the bug occurs while dragging a new elt)
and it's always the 'c29' element that has this crazy big dimensions (like 2000px in width and height, although he looks totally normal)
(only happens when dragging one of the top 3 elements)
 
@Abhishrek I'll do the part which makes the function because I have done it like a thousand times :D wrap it in an extension yourself :P
@Zirak Someone did, I suggested how to implement.
Actually for jsh it will be slightly easier than what @Abhishrek is trying to do. When user calls your magic require function, you can append a script tag to the iframe allotted to the user, show a "loading..." bar, freeze the code input text box, and wait for the script's onload event. Then make everything normal. @Zirak
I did something slightly similar a while ago for some client. But not JS. CSS.
 
@AwalGarg I am way ahead of that
 
@AwalGarg How will that work for replaying sessions?
 
oh, great
@Zirak require everything before execution of any user code starts.
that would be inline with es6 imports as well
 
Great, so all that's left is to identify require calls in arbitrary user code
And lift that up
 
2:38 PM
no, use the es6 syntax.
 
And hope the user doesn't give an example of a behaviour before a script is required, and different behaviour after
 
import 'foo'
 
import https://random/stuff?
Really?
 
@Zirak as I said, that's what ES6 imports mandate as well :D no error handling, no dynamic loading, no conditional loading, whatever
 
No, that's weak for a repl
 
2:41 PM
fight the TC. vOv
ftr, firefox's gcli does it pretty similarly.
 
@AwalGarg what? no.
ES only defines the syntax, the module loader defines the "how".
 
@BenjaminGruenbaum which is not here for atleast an year
 
Because it's incredibly hard to specify a module loader..
They want to do a good job, there are lots of edge cases and things to consider. It would have been far worse to just specify something in the language
 
seriously? It is not like JS is the first language to get a import/exports...
 
Right, and most languages get it very wrong.
 
2:49 PM
And being browser compatible is a meh reason
 
Want some data points?
 
@BenjaminGruenbaum how?
 
Java is redoing its whole system for import/export for Java 9, they're introducing modules just now.
C# just got static imports, and are struggling with it.
Don't even get me started on Python.
Or C++, which wants modules for 20 years and are also struggling to specify them, maybe for C++17 they'll have modules - but it's 2 years so it might get postponed because how much work it is.
 
@BenjaminGruenbaum dunno java and C#, but python and php are terrible indeed. But I think what the JS community made themselves is pretty good too. node's require/commonjs is quite spot on.
 
It's not just "include that piece of code in that one", to be fair node does a pretty good job with require because it's simple - but a lot of people struggle with it a lot.
@AwalGarg yeah, require is pretty decent, but it's synchronous and that can be a problem. It's also worth mentioning that it doesn't do a lot of cool stuff other loaders do and it has its own fair share of problems.
The thing I <3 about require is that it's just a function. The problem is that each module gets its own copy of that function which is different than other copies.
It has to be because of path issues.
 
crl
2:53 PM
new Promise(r=>r(require('shit')))
 
I think RequireJS also does a pretty good job.
 
@BenjaminGruenbaum ES6 import syntax has to load stuff synchronously too...
@BenjaminGruenbaum Why is that a problem in userland?
 
@AwalGarg I know, but ES2015 module syntax has the advantage of being easily statically analyzable. ES2015 modules were made so that HTTP2 push would be easy and possible with JavaScript.
@AwalGarg it's not IMO, but it gives a false impression and it defines a global that is not really global - the whole exports thing isn't terribly great. Although to be fair I like it a lot more than import/export since it feels a lot less magical.
 
@BenjaminGruenbaum that's not the point. you said require is synchronous while defending es6 imports, but I am saying es6 imports inherit the same issue :P
 
Heck, the syntax they did get they got wrong - ES2015 modules are the only place in the language that have pass-by-binding or - actual pass by reference.
@AwalGarg no, because require is a function, you can assign it - eval it and do a lot of other quirky things. To be fair I would have probably skipped modules if I was the TC.
90% of the times people want modules they actually want an injector. The JS community is too uneducated to know that though :D
 
2:56 PM
@BenjaminGruenbaum If it has to be a native function, it can be magical and not writable
 
@AwalGarg can still be evald - but still - I think the parts they did get they got wrong. Module importing is a really hard problem.
I'm not even getting to module unloading which is even harder and would be really useful for node servers.
To be fair, it's a pretty solved problem with dynamic linkage, it's exactly the problem a dll solves on windows - but we love solving problems over and over so there's that.
 
crl
you'd want a module lazy-loading?
 
@BenjaminGruenbaum I still don't get what is wrong with node's require :/ what is it that it interferes with/doesn't let you do (other than injecting random shit in current scope, thank goodness)?
 
@AwalGarg I just said that I think node's require is better than ES2015 modules - so I don't disagree - but require leaves a lot to be desired.
 
lot === undefined
 
2:59 PM
===?
 

« first day (1862 days earlier)      last day (3103 days later) »