« first day (2048 days earlier)      last day (2903 days later) » 

8:00 AM
there is no reason for it anymore
 
So I should go with SystemJS?
 
I use requirejs for quick/small projects. It works really well.
 
I used systemjs quite a bit
I like it and it's pretty stable now
webpack is still the most popular though
 
user3119231
Why don't you go with vanillaJS or nodeJS
 
haven't tried angular 2 yet
 
8:01 AM
@Mosho I have used webpack but not using it in my new project because I need asynchronous loading of script files like requirejs
 
webpack does everything
 
yeah but it builds it right?
which is kind of confusing to me
 
you can make bundles
I mean, that's the point
you can make several bundles and load them async
there are solutions for everything in webpack, as it's the most popular
 
is it friendly to debug at that point?
 
but if you ask me it's all hackery
 
8:03 AM
magic
 
any idea on how to hide partials view in angular web application?
 
@Mr_Green depends on how you debug
 
I use chrome console F12
 
from my experience, sourcemaps dont go well with breakpoints
@Mr_Green yeah :P
I like that you have separate files with systemjs
even if they are transpiled
I don't use sourcemaps
 
@Mosho I experienced this. that is why I was stepping back to use webpack for async loading
 
8:05 AM
my colleague loves them and debugs with them
using console.logs :P
if you are a grown man who uses breakpoints, I wouldn't use it
 
@techie_28 sorry, I can't really do that from my phone
 
we have an app running with webpack and one giant app.js and debugging is less comfortable
 
wow breakpoints are not trending anymore?
 
"trending"?
breakpoints are not a trend
 
compare to console.logs
 
8:06 AM
@Neil may be later then?.. :)
 
I am glad to hear that you fixed your problem though
@techie_28 if I remember, sure ;)
 
@Mosho please suggest me what to use then?
 
I would go with systemjs
 
thanks :)
 
the only issue with jspm/systemjs is that out of the box, refreshes take a while
because it imports each file in each module separately and transpiles on the fly
refreshes can take up to 15 seconds
 
8:10 AM
@Mr_Green Heard that alert is pretty nice, too. Can't miss them. Works even on mobile ;)
 
but you can use dists of libraries instead of jspm installing them
 
@Sheepy is this for me?
 
and you can transpile on your own
and load the transpiled files
 
15 secs is huge. but I think that will not happen in production?
 
no
but it sucks in dev too
react for example is hundreds of files
 
8:12 AM
@Mr_Green Ow. I suck at joking do I not? To be honest I use the debugger statement when my JS is turned into one big pile... or when breakpoint is not feasible such as worker debugging.
 
each takes 3-5ms to load
but you can just use react.min.js with systemjs
dont have to bring in each file separately
 
@Sheepy I do the same :)
 
I hate front-end dev.
 
@littlepootis The feeling is mutual :3
o/
 
8:15 AM
@littlepootis When I develop backend I just write lots of messages to the logging system. At different debug level.
 
All this loader drama could be avoided today if people stop falling over the new import/export syntax. I use plain old require and it has exactly 0 seconds of build time (in browsers, yes).
 
^
 
^
 
8:16 AM
the new syntax brings absolutely no benefits whatsoever except maybe aesthetics which are subjective.
 
Damnit...
 
combo breaker
 
@Cerbrus You should catch the chance to start a new chain :p
 
@JanDvorak I lead to start the chain anyways, so I have da paawor! :D
 
@Sheepy "Damnit" could've been a new chain.
 
8:18 AM
!!xkcd power
 
@Sheepy Something went on fire; status 403
 
@AwalGarg And bundle them for production.
 
/me eyes Caprica warily
 
@littlepootis correct
 
@AwalGarg 0 seconds of build time?
 
8:19 AM
!!xkcd error
 
@Cerbrus Something went on fire; status 403
 
Are you talking about AMD?
@Cerbrus Google API is down, so anything relying on it is down too.
 
Ah
 
@MadaraUchiha no, synchronous commonjs require like node. in dev you require from lo so it is as fast as node's (a couple milliseconds).
 
!!google google api
 
8:20 AM
@AwalGarg "lo"?
 
loopback
 
user3119231
u serious?
 
I think Awal means localhost... or local file system.
 
> Quickly create dynamic end-to-end REST APIs.
REST APIs are neither dynamic nor end-to-end
 
8:26 AM
 
I won't be surprised if I see wool.io or sheepy.io some day.
 
REST in APIeces
 
user3119231
Koreans army i.imgur.com/Tm6U8Ll.webm ... and we Germans are just like: i.imgur.com/NmzA2if.webm
 
lo is the conventional name given to the loopback interface. you guys are a bunch of http hipsters >:(
 
@Sheepy you need to pass the xkcd id
 
8:30 AM
@AwalGarg You set up a lo interface, then what?
 
I'm going to do a major Javascript cleanup, mostly accidental globals. Is the correct way to cast "use script" to each file and hunt down errors?
 
@MadaraUchiha are you purposefully trolling? :P
 
@AwalGarg No, I'm seriously not.
How do you get from "loopback" to "require works in the browser"?
 
And then create a listener?
 
8:32 AM
I'm not very familiar with low-level networking.
 
@MadaraUchiha you "serve from loopback" means there is no observable lag from requesting the JS module to fetching it. Which means you can do synchronous fetching of the module, like node's require does. and then continue like node does.
 
Not low-level, he's confusing us with tech jargon
 
@MadaraUchiha lo is just an interface name :/
 
@AwalGarg But you still need to fetch over HTTP
How are you doing that without an HTTP server?
I'm obviously missing something here.
And if you still do use an HTTP server, what's the point of the loopback?
 
@KarelG Ah. Ok.
 
8:34 AM
@MadaraUchiha the HTTP server understands that it has to serve the file from the loopback interface and not request a thirdparty.
 
!!xkcd 1024
 
@JanDvorak Put 'use strict' at the top of each file.
 
@JanDvorak put up ESLint
 
@MadaraUchiha I think you are over-thinking this :P basically you replace "fs.readFileSync" in node's require code with "xhr.send(blabla, synchronousFlag=true)" and then node's commonjs require works in the browser.
 
8:36 AM
'use strict' will only help you with a specific subset of errors.
 
@AwalGarg oh my god
 
user3119231
@MadaraUchiha dejavu
 
@littlepootis what happened?
 
@AwalGarg So again, what's the point of the loopback?
You're setting up a local HTTP server anyway
 
OH GOD I WAS TRYING TO SAY THAT YOU SERVE IT FROM A LOCAL INTERFACE SO IT RESOLVES VERY VERY VERY FUCKING QUICKLY
 
8:37 AM
So.... what's the point?
 
@MadaraUchiha Awal's main point is (was) to develop your code in a way that you don't need to build to test / debug them, so that you can spend 0 time on building during development.
 
Y U NO GET IT LORD MADARA
 
STOP USING L33T TEMRS
 
@Sheepy Yeah, no, I get that, but what he's doing can be achieved without going to the low level network interfaces.
 
user3119231
CALM NUTS BROS
 
8:38 AM
@littlepootis what would be a better term?
like localhost or something?
 
YEAH DUDE
 
hey that sounds good actually
 
@MadaraUchiha so ignore all that and read this: "you serve the file from localhost which is very very fast, so you can do synchronous require and eval. and browsers now have all the es6 support you need so no transpilation needed"
so no build time in development, but you still get modules
 
@AwalGarg Fair enough
 
8:40 AM
oh thank god
 
what about production? there will be delay right?
 
you bundle with browserify
 
@Mr_Green In production you bundle with webpack/browserify
 
I missed the context, what will I use in development then?
 
@Mr_Green No he sets up loopback interface on server
 
8:41 AM
@Mr_Green Serve from localhost and fetch synchronously.
 
@Mr_Green Nothing. Plain require.
 
@MadaraUchiha eh, I'd have to research how to integrate it into the build
 
github.com/awalGarg/micro-require here is the implementation I use. It supports node_modules too!
 
@JanDvorak Do you have gulp/grunt?
 
and also supports setting a base root dynamically with some dark magic
 
8:42 AM
@MadaraUchiha I'm not aware of having that
 
@JanDvorak How do you bundle/whatever for production?
 
copy foo.js + bar.js production.js
 
You have 100kg of potatoes of which 99% is water. You let it dry out in the sun until it is 98% water. How much do the potatoes weigh?
 
@Sheepy haha yeah good old method :P
 
8:43 AM
Neal. you're not in front of a class
 
@Neil almost 99kg?
 
@MadaraUchiha I don't quite understand the deployment project, but it seems to be integrated in Visual Studio Community for asp.net projects
 
@AwalGarg it is a tricky question :)
Not 99kg
 
100kg
 
yeah not exactly. amount of evaporated water will be 1% of 99% of 100kg which is a little less than 1kg. so a bit more than 99kg
 
8:45 AM
just ceil it to 100kg
 
@AwalGarg not even approximately 99kg
 
@Neil it depends
 
user3119231
@Neil depends on how much water is in there. 1 liter = 1 kg
 
@Mr_Green and no
@Maurice no, it doesn't depend on that
 
@Neil All your potatoes are belong to us
None left
They all ded
 
8:46 AM
@Neil 98% the weight of the potato or the 98% of the first 99% of water
 
@Neil well then, explain?
 
2 kg
 
Plot Twist: The potatoes evoporate
 
user3119231
There can't be a potato without water
 
1st, potato density is about 1.08g/ml
 
8:47 AM
Plot twist: the potato claims a dispenser here
 
solid weight vs water weight ratio: 1:99
dried out ratio = 2:98
but we have originally 1 weight, there is 49 kg for water
as result 1 + 49 kg

answer = 50kg ?
 
oh hi @CSáµ  o/
 
1kg.
 
^ yeah correct
 
8:47 AM
1kg ? o.O
 
@KarelG bingo
 
:D
 
Your premise is wrong and you should feel bad
 
since you said this
5 mins ago, by Neil
@AwalGarg it is a tricky question :)
i started to think further
 
@Neoares and what?!
 
8:49 AM
@Neil lol I get it now :P
 
@KarelG where he said 49 kg?
 
@littlepootis this.
 
@Neoares sorry if I wasn't clear
 
tricky question, since the kg of "solid potato" remains as 1kg
 
user3119231
reminds me on: shoot 45² - (2² - (20/10) + 5) birds. how much are left?
 
8:50 AM
maybe 2 equations with 3 variables?
 
@Mr_Green the 3th line is a conclusion from the 2nd line where you have 2:98 ratio. But there is only 1kg potato, so you have to divide that
that leads to 49kg water
 
indeterminate system :P
 
ah get it
 
What kind of potatoes are 99% water?
 
@KarelG true
 
8:51 AM
@littlepootis the best kind
 
The question should say "1 kg potato with n amount of water" or "100kg potato mass out of which 99% is water"
 
user3119231
@littlepootis the one in the earth
 
you have 1kg of "solid" potato, and a 98% of water, that's 2:98 or 1:49
 
so 1kg : 49kg
 
8:52 AM
@Neil me?
thanks :)
 
@AwalGarg who says 100kg mass of potato? That's implicit
 
little potato, mostly water
@Neil no u r wrong y u confuse my brain >:(
 
ok... any idea why writing to an undeclared variable would create a global even though the file begins with "use strict";?
 
> Three guys are on a road trip. One of them has a pack of cigarettes and suggested others to smoke. They all agree, but the car cigarette lighter doesn't work. They don't have something to light up their cigarettes. How did they manage to smoke the cigarettes afterwards ?
it's an old riddle that i know
 
@JanDvorak variable name?
 
8:56 AM
Morning
 
@JanDvorak browser?
 
@AwalGarg It doesn't exist in the global scope inside execution, and it does after\
 
@KarelG after what?
 
@KarelG a lighter??
 
latest Firefox
 
8:57 AM
@KarelG "afterwards" they got to a lighter
 
They found a convenience store and bought a lighter
Sounds like a lame answer but why wouldn't that work?
 
yeah there is lots of answer possible :/ Should have specified that they're in a desert
the answer is that they threw a cigarette away, so that the car is a cigarette lighter. ;)
 
not so bad (better than expected in fact)
 
it took me awhile...
 
9:00 AM
had to chuckle at madara's reaction
 
Is it proper to use a If/Else + switch case together if I could solve it with only a If/Else construction?
 
Three men walk into a hotel and rent a room for $30. They contribute towards the room rent equally. So each one of the paid $10. The hotel manager after sometime realized the room rent should have been only $25. So he sent the dishonest bellboy and told him to give $5 back to the men.

The bellboy cheated and gave each one of them $1 back.

Now you know $27 ($10 - $1 = $9 each) is paid by the 3 men and $2 is with the bell boy. That makes it $29 (27+2), so where is the remaining $1?
 
If it's pretty much unreadable if I only do the If/Else for anyone else but me?
 
@StrahBehry your question is so vague it doesn't make sense
 
@KarelG ahhh.. I need to drink some coffee after that
 
9:01 AM
switch(task){
 
@StrahBehry switch case is actually an if/elseif/else construction, but used to have a clean choice structure
 
@StrahBehry 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, pastie.org or a demo site like jsbin.com
 
@AwalGarg I have heard this one
 
Oops Caprica is mad
 
9:02 AM
@Neil it's a classic
 
if(isNaN(parsedUrl.query.h) && !isNaN(parsedUrl.query.w)){
    task = 'resizeToFitWidth';
}
else if(!isNaN(parsedUrl.query.h) && isNaN(parsedUrl.query.w)){
    task = 'resizeToFitHeight';
}
else{
    task = 'resizeThenCrop';
}
 
So I won't ruin it for others who may not have heard it
 
So by doing that I can like 'name' the task and it's readable
But if I do everything in the if/else if no1 will really understand what is what for
 
@JanDvorak do tell when you find out
 
@AwalGarg You're adding then substracting when you should be subtracting twice or adding twice
 
9:03 AM
Or should I add comments with the If/else construction, what is the proper thing to do?
 
heh, i thought that awal made a math mistake but he didn't
Gotcha reverse that whole thing
3 times 1$ at the three persons + 2 $ at the bell boy + 25 $ at cash register = 30 $
...
* scratches hair *
 
Here's one: you have a chasm 1 mile deep and one mile wide that you want to cross. There are no ledges on the cliff side to climb on. You have as much rope as you need. How do you cross?
 
what's a chasm ?
 
Classic example of out of the box thinking problem
@KarelG a valley
@KarelG canyon
 
@KarelG like the grand canyon
 
9:07 AM
@neil how far would it be to walk around it?
 
@Neil fill it with rope and walk on top of the rope
 
@StrahBehry it extends to infinity (i know, it sucks right?)
@doug65536 you got it
 
yeah? I've never heard it before :)
 
Well that's what came up in my mind too
but that's incredibly silly
 
didn't have thought at that
 
9:09 AM
Since it extends to infinity
And the rope will spread out really far till it will stack up to 1mile high
 
"as much as you need" is a lot
 
If you have rope as much as you need, just fill the whole ditch with that .. and walk on it lol..
 
@cswl ninjaed?
 
Well you'd have to fill it right? Idk if you have 10 years to do it
 
no time constraint though
 
9:10 AM
True
If I have as much rope as I need, can't I just sell all the rope I need to buy a helicopter ride :D?
 
What's ninjaed?
 
Pretty sure that would be quicker
@cswl I fixed it yesterday btw!
@cswl form.onPart = function (part) {
        if (!part.filename || part.filename.match(/\.(jpg|jpeg|png)$/i)) {
            this.handlePart(part);
        }
        else {
            console.log(part.filename + ' is not allowed');
        }
    };
That's all that was needed
 
A man is found dead closed in his locked basement with no windows. He hangs from a rope half a meter from the ceiling and half a meter off the ground. There is nothing in the room and he is 2 meters to the closest wall. How did he hang himself?
@cswl ninjaed is when someone posts your same idea before you
 
@neil someone else hang him?
 
"How did he hang himself?"
 
9:15 AM
@StrahBehry no windows. Where did he go?
 
Ok the room was flooded he hang himself while swimming in the water
 
The door is locked from the inside
 
Is there any object on the ground?
 
and then the water drained out very slowly
 
closed in his locked basement with no windows.. died from no air
 
9:16 AM
eventually he was hanged
 
jsriddle
4
 
@StrahBehry right line of thinking, but not the intended solution
 
That riddle out of context... Yikes
 
@cswl he was hung
 
@Neil He was standing on a block of ice?
 
9:17 AM
@Cerbrus yep
 
That works the same
as when the room was flooded
 
i would say that too
 
and it drained out?
 
@StrahBehry Faster :P
 
or evaporated
 
9:18 AM
Well time was no factor right :)
And we can assume it would happen before he died of starvation
And he could just drink the water he was flooded by
 
@StrahBehry possibly. Though maybe that would only work if the ground were dirt
 
@StrahBehry Kinda difficult if you're hanging there
 
i probably have done my benchmark incorrectly
#logs	#timeneeded

1	34111
100	34566
200	34227
300	34338
400	34253
500	34369
600	34224
700	34232
800	34083
900	34448
1000	34291
:|
 
@KarelG that is possible though. indicates that you have a latency problem and no bandwidth problem
 
@KarelG there seems to be a weak correlation
 
9:21 AM
but yeah, hard to believe the test is working correctly
it is possible for 1 to take 1 second, and 1000 to take 3 seconds. indicates that the latency is around 1 second, and each one actually takes about 1/500th of a second
oops, you get the idea
 
Or how about this: there are three ducks walking together. The first says, "I have a duck in front of me and a duck behind me. " The second duck says, "I have a duck in front of me and a duck behind me. " The last duck says, "I have only a duck in front of me". They are not walking in a circle. How is this possible?
 
One of the ducks is lying
 
@Neil first duck is looking at a mirror
 
@Cerbrus oh cheater, no fair XD
 
@Neil What, that was actually the answer?
 
9:28 AM
@Cerbrus that's it
 
Haha, awesome xD
 
@doug65536 I didn't consider that. But that would work too
It is really meant to be a joke puzzle, but it certainly makes you think outside the box
For best effect, you say "the first duck is a fucking liar"
 
I've got one: There's this cave with 30 dwarves. 15 of them have a red hat, 15 of them have a blue hat. They can't communicate with each other and they can't know what hat they are wearing themselves. Now they have to go outside and sort by colour. How do they do that?
 
they push a dwarf if he's not in the right group
 
They don't know their own hat colours, so how do they know what group they should be in themselves?
I think I forgot to mention they come out of the cave one by one :P
 
9:40 AM
oh
 
one goes outside, waits. Second goes outside and .... waits left to the first.
then the third
goes in the middle
 
@KarelG On the right track :D
 
@Cerbrus the first dwarf sorts the rest and at the end, the first dwarf puts himself between both groups
 
then the fourth can see other hats color and goes to the place where the hats switches color (ie person left color has diff than right person)
 
9:42 AM
@KarelG Bingo
@Neil Actually, that works as well :D
 
Or kills himself
That too
 
about the dwarves, do you know the state of the hymen of snow white is after leaving the dwarven's house?
 
@KarelG Soaked, probably
 
no, with 7 tiny holes.
 
9:44 AM
(This discussion is going south xD)
 
go to the new link, I think the first one was posted by an actual kkk member -_-
 
o/
 
:|
 
Hai, I heard of Stateless components in React within a tutorial. But in that tutorial classes are used. I currently always use sth like this: export default React.createClass({}). Can someone tell me why I can´t import that "stateless component"?
export const Heart = () => <span className="glyphicon glyphicon-heart"></span>
"Default export is not declared" is the err
but how could i do that
 

« first day (2048 days earlier)      last day (2903 days later) »