« first day (2757 days earlier)      last day (2413 days later) » 

10:02
@SomeGuy Dying
Had food poisoning while travelling
Oh, god damn
That's awful
how can someone from trollnation suffer from food poisoning
your food is already poisonous fire
That's what i was thinking, haha
In Mexico, I didn't take people seriously when they told me something was spicy
Turns out, India doesn't have a monopoly on spicy food :)
I always thought food in india was spicier
I went to mexico 2 times, btw
Rob
Rob
We've unfortunately got very few mexican restaurants here. Our most popular is 'Taco Bill' (no, not a typo).
10:09
@Neoares It is if you look for it, but I think the average spice levels are higher in Mexico
Rob
Rob
I've found South-east Asian food (especially the soups) to be much spicier than Indian food.
@Rob Hahaha that tickles my brain
@SomeGuy well they basically add spicy things to everything
they said that if something is not spicy, it's not tasty
I use salt to prevent that
@Neoares I ate spicy crickets there, SO GOOD
Yeah food from Thailand is pretty spicy
10:10
@BadgerCat Thanks for the crickets :P
I don't like insects
I ate works, ant eggs, and mashed crunchy crickets with guacamole
It's usually made fairly tame for foreigners, but I understand they actually make a separate batch for thailandese
I didn't think I would either. But I didn't seem to mind, deep-fried
my father ate mountain oysters once. He said if he knew what they really were, he probably wouldn't have eaten them at the time, but he said they were quite good
Uh...shouldn't have googled that
Genuinely thought it was just oysters
10:13
Ambush!
Here in South Africa one of the delicacies is something called a Perlemoen. That stuff is just plain nasty...
I'll take a hint from @SomeGuy and not google that. What is Perlemoen?
@Rob If they're clever they can design a taco like a bird's bill.
So, like, a regular taco
@SomeGuy It's not that bad
They just look a bit weird
@Neil Hmm, also known as abalone. Kinda of like a big snotty muscle that clings to rocks...
that's not a south african delicacy
10:18
@New_2_Code I can see why someone would want to try to put those in their mouths by the description
that would be biltong or koeksisters
@david lol also true. We make the best biltong in the whole world. Only because we are the only country that makes biltong. ;D
have you tried american jerky? that shit is so vile
Rob
Rob
Zim makes biltong, too ;)
user1731387
hi anyone help me in jquery resize function
10:19
@david if you knew their content, they'd probably be worse than anything mentioned until this point
I've heard Jerky is no where near as good as Biltong. Aparently they don't add spices to it. Savage
@SomeGuy Try Thai food
they add weird shit to it too, it's like... artificial
@New_2_Code That looks a bit like roast beef after some seasoning and cooking, does it compare?
@SomeGuy also I got denied YF Vaccination (because of outdated info to docs) so now I can either choose to come back to India in isolation or goto USA
10:20
in Iceland, they have this food where they take birds and stuff them into the carcass of a seal, then put the whole thing under ice for a winter
Rob
Rob
@david When I've told my friends I make biltong, and they ask what it is... I feel so ashamed when I have to compare it to jerky. But I don't have a better description than 'Jerky, but less sweet, and way better'.
even for non citizens US has saner laws -_-
How do people even come up with these ideas
@Rob (Oh Snap!) Biltong is a form of dried, cured meat that originated in Botswana, South Africa, Zimbabwe and Namibia.
@Neil There was nothing to do in Iceland for centuries
10:21
@Zirak "Oh man, this is awful! You gotta try it!"
you could go with something like 'jerky is like a macdonalds burger patty, biltong is a nice thick steak'
@Neil The equivalent of "Smell this" :D
which would probably be pretty accurate
@david Accurate
@New_2_Code sounds about right
10:22
@Neil Revenge Food Prank Gone Terribly Wrong
mainly because it is literally a steak...
@david *"t h i c c", get with the times
Well now I am hungry... GJ guys. Going to go get me some droewors. :D
@Zirak What starts with an e, ends with an e, and contains one letter?
they still make thick burgers?
10:23
screw "mobile first"... if you're serious about getting it done everywhere, you need "ie/edge first" design
@david eeeeeeeeeeeeeeeeeeeeeeee
reeeeeeeeeeee!
Maybe we should get a room specific pass-word that enforces having read the rules, like pythons?
I propose, archer
what
10:25
The cabbage ritual, kinda forced me to read the rules
biggest mistake in human history was to allow this little criminal with his thick eye glasses and his company to create a web browser
@jAndy Bill Gates?
100 points go to India
@SomeGuy Also, India has variety of spicyness levels
Yes, congrats, @ShrekOverflow. You win.. the game @jAndy
10:26
@jAndy :(
why is alert first and then the text and image is shown in my promise?
@jAndy Dudes gave you event bubbling and ActiveX, what more could we wish for?
shouldn't text and image first be shown and theeen the alerts?
@Zirak Also CSS
@Suisse alerts are synchronous but dom changes are shown at the next render. Simply put everything is working and alert is just special.
10:28
they did a lot of "good stuff", I don't condemn them. It's just the fact that their browser ever was a "special animal". That never changed.
@benjamin then() isn't blocking to the next then() ?
@Suisse alert is completely synchronous unlike other io stuff
Chart of IE market share
WTF happened in 2014 :(
Edge I guess?
which still sucks ass
Edge isn't that bad, its special
10:30
edge
they have like 10%???
@BenjaminGruenbaum ok thank you - I'll look at the docs, maybe its written there.
I thought last time I looked it was more like 3-4
@jAndy I know, it's a shame
@jAndy yes, 😬 and unfortunately tey are bigger than ffox
10:31
hard to believe that
90% at 2003
the good old XP times
PC + Mobile
Good ol' IE: was and will always be the best browser to use for downloading another browser.
that stats has to be wrong
@ShrekOverflow UC? QQ?
10:32
UC must be bigger
Why would they have had only like 15% of the market share in 1996?
Netscape wasn't that popular then was it?
not many choices other than netscape and Internet Explorer
@jAndy I haven't seen UC since forever
@Cerbrus QQ is some Chinese company, I think it belongs to baidu
10:37
How to fix CORS issue guys ?
Hit with rock
@stonerock Define the CORS header on your server
The console showed you which header you need, google it and play around with it
I vaguely remember a site which gave you a tl;dr on how to set it up
there we go enable-cors.org
I could not understand where to define CORS header ? which file ?
Like you define any other header your server sends. Website above has some quick guides on popular servers
10:41
I am using Reactjs I cannot see it ?
oh, the server you're sending the request to isn't your own?
I am making request to delete a user API endpoint
From my local machine
@stonerock You have to get them to add the CORS header then. That's sort of the point
The server you're sending the request to, the one you blacked out, do you have control of it?
@Zirak Yea, googled it a bit. Never heard of it before
10:43
@Zirak No I have no control of it.
Browsers don't allow you to send requests to sites that aren't in your origin
It's a security feature, it's only allowed for specific pages which explicitly allow it (by setting the CORS header)
If the endpoints doesn't want arbitrary clients to send XHRs to it, then it doesn't
I have spent almost 2 hours reading articles about CORS but could not understand where to fix that issue ?
It's not up to you
Again, it's on the side of the server you're sending the request to
@stonerock CORS exists explicitly for the purpose of excluding requests from clients which aren't accepted
Check this question which I asked stackoverflow.com/questions/50172651/…
10:46
Hear us out: It's not a problem with how you're making the request. The server you're sending the request to has to cooperate with you
If you own the server you can set it up. If you don't, read their docs if they have any, maybe they can support CORS or JSONP. If they don't, contact them and tell them
I have control access. I mean I can see the API endpoints of that server by typing in email and password
Rob
Rob
Yeah, but you need access to the server itself. The server is ultimately the one responsible for deciding who can make cross domain requests.
If the server says 'No, I don't accept cross domain requests', there's nothing you can do in the browser to sidestep that.
Is your client perhaps meant to be hosted on the same server as the API endpoint?
What exactly is this API? Internal company one?
Company API
Then talk to the people in your company and tell them to add a CORS header
Or host your client on the same origin as the API
10:50
I am using company's API. I have made user CARD's and when I click on delete button it should delete the user from database. So when I make request again it should fetch the updated result.
Dude, you're not making any mistakes
The fault doesn't lie with you
Your problem is actually someone else's problem
2 mins ago, by Zirak
Then talk to the people in your company and tell them to add a CORS header
Does above screenshot useful ?
No, dude.
10:52
Browsers need a CORS header to communicate to this resource
This is it
Ok I will thanks buddy for helping
That is all
no above screenshot doesn't useful
Thank you all for helping :)
he's also getting 500s though
which is weird
10:54
yeah errors are so rare nowadays
so weird
i know if a server is 500ing on the cors preflight options request then that can manifest itself as cors errors
Thank you guys I will fix it out.
so maybe it's not the server that's at fault
well it is, but not because it's not using cors
maybe he's sending a crazy header that's crashing middleware
My mentor from company has told me it is not server's fault. I need to fix this
Tell him to come fight us
10:56
Hahaha :)
tell your mentor that an error that starts with a 5 is a server error, so it is definitely the server's fault
This is not your fault. It really isn't
for at least one of the screenshots
@david I think you misunderstood that screenshot. It is the API endpoint information which I shared with you all.
10:57
Yes
@stonerock Just @Neil and I have a combined experience of over a decade and a half in webdev, and this is a rather basic issue at that
So when we say the problem isn't with the client, it's with the server, we're probably in the ballpark
11:00
Ok I will ask my mentor what is the issue. He told me to google it so that I will learn :)
Thank you again guys for helping
let us know when you find out, we are interested
How can I connect with you guys ?
Can I connect with you via linkedin ?
This chatroom
never linkedin...
So the guy who hired me is designing a REST API that I'll have to work with.
11:08
well, that doesn't sound bad @littlepootis
REST is so 2015
tell him to graphql
It didn't so bad at first. But then he showed me what he's been working on.
The API was something like this:
POST /api/v1/scenario/submit
GET /api/v1/scenario/<id>/pipeline/<id>/get
GET /api/v1/scenario/<id>/get
GET /api/v1/scenario/<id>/get's response can be in 18 different formats
@littlepootis Well at least it doesn't look like i.imgur.com/R390EId.jpg
I don't really get this meme
POST ... submit ? what's that ?
11:12
@DenysSéguret Here's a graph which explains it: i.imgur.com/1NmGgDU.jpg
Do I really need to click this one ? ^^
@zirak, unlabeled axes
@david yeah and it doesn't start with 0, but you get what you paid for
@Luggage wow you wake up early
One of my first tasks at this job has been to integrate an external state (glorified global object) with a stateless React Component.
So, I had to re-render the React Component every time the state changed.
11:16
Do you guys really use graphql in lieu of REST for everything new ?
sadly no
I never used it for anything tbh
but I want to
@DenysSéguret No, that would be stupid
I wrote a wrapper for the global state. And attached an event listener onClick to the react component that does this.setState({ state: this.state}). And now the external state updates just do document.getElementById("graph").click() to re-render.
@DenysSéguret oh ok :)
@littlepootis ew but keep going
11:22
turn that object into a mobx observable
The entire web page that I'm working with is a giant SVG, so are all the React components inside it.
the web page is a svg ?
I like SVG but...
why?
Even a simple state that calls react.setState / react.render for said component would would be fine
The library that renders this giant SVG doesn't support updating the content of the SVGs inside it, so I had to write a wrapper that generates these little SVGs with the updated props.
Right now, I'm writing a "layout manager" that positions these SVGs to form a tree.
The pain doesn't end here.
I'll also need to handle events on the little rectangles in my little SVGs.
11:40
I would like to see this svg site
@littlepootis I'd think it'd be easier to find a better library at that point
Is it better to use sessionstorage or localstorage that gets deleted when you leave the page?
@J.Ende if you have no reason to use sessionstorage, use localstorage
I'm using sessionstorage now but everyone advices me to use localstorage or even cookies
well do you know the difference?
11:49
morns
Localstorage saves everything also for future comeback on the website , while sessionstorage only saves it for the window at that time, right?
which are the best ORMs for postgres in nodejs?
And please don't recommend sequelize , I hate that thing.
@J.Ende yes. Do you need to persist the information or not?
yes
atleast only for the session
@mega6382 typeorm
can't recommend it enough
12:03
@BenFortune how does it compare to sequelize?
Compare how?
@BenFortune In ease of use and performance etc.
@Neil My problem is about this question stackoverflow.com/q/50173890/9427768 If you have time left you could maybe check it, I try to keep finding a solution for now
Ohh typeorm looks nice (just skimming the readme)
@mega6382 The learning curve is much higher, but I believe it's structured much better and I haven't really benchmarked it but it works well
12:06
@Luggage It is kinda nice, also check out routing-controllers while you are at it.
OK, great. Thanks.
DSK
DSK
hii
@DSK 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.
@VijayMakwana 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.
Its hard to tell if he's being satirical or serious.
A little from column A, a little from column B
naa He is pretty serious about it
12:25
neat flattening one-liner:
const flatten = (arr) => arr.find((el) => el instanceof Array) ? flatten([].concat(...arr)) : arr;
could use the Y-combinator to make it an expression and not need variable names, but at that point, there's probably an easier way
.ie tld should be donated to companies still supporting IE.
12:48
sigh
I think my refrigerator is dying
It makes a beeping noise because the temperature is too high
worse, I can't seem to make the alarm turn off at least
@towc old and silly?
@BenjaminGruenbaum hadn't seen it before
do you have a better one?
I'll give you a hint, try reduce
recursively?
oh wait
12:56
const flatten = arr => arr.reduce((a, b) => [...a, ...(b instanceof Array ? flatten(b) : [b])], [])
best I can come up with in a couple of minutes
seems unelegant
const flatten = arr => arr instanceof Array ? arr.reduce((a, b) => [...a, ...flatten(b)], []) : [arr]
this is maybe slightly more elegant
but urgh
arr1.reduce((acc, val) => acc.concat(val), []);
that's one level, right?
yes
multiple levels would be recursive
arr1.reduce((acc, val) => acc.concat(flatten(val)), []);
oh, that's kind of nice
13:01
you'd still need to add the initial check for being an array though
@Neil probably missing stop condition
const flatten = arr => arr.reduce((a, b) => a.concat(b instanceof Array ? flatten(b) : b), []);
@Neil meh, that's ok
@Mosho hence the initial check :P
or wait no
it's not ok
you lied
I have a better solution
13:02
inb4 lodash
inb4 underscore
inb4 jquery
JSON.stringify(arr).replace(/[[]]/g, '').split(',')
glorious
troll level: expert
slowclap for that
13:04
won't work for ['[']
I'm sure it won't work for many cases
const flatten = arr => [1, 2, 3, 4];  // works only for specific cases
13:19
!!s/^/y/
@towc prefer Array.isArray
that's a stupid name
ok towc
said Zirak
13:23
!!> [] instanceof Array
@ShrekOverflow true
satisfying vim command: /require('loadash<cr>dd
the true boyz will know what I'm talking about
@towc the true boyz would use :%s/......
out-boyzed
Hi Everyone
Is the new teams also has Meta?
13:32
that's unneeded
:s/require('lodash.+$// maybe?
that's actually more strokes
Having meta would be a cool feature
please direct me to meta chat room
will ask this there
wat
np, I found it
14:04
do you ever export different things, for when you're testing and for when you're not?
to at least mark that you're exporting them because you need to test them?
no, that'd be testing the private interface, not the public one
if your private interface isn't reachable via the public interface, it's dead code
I guess that makes sense. If you have private things that need testing, they probably shouldn't be private
in my usecase, I have a web crawler that exposes a method that returns some urls from a site url that is passed as an argument
in between, I have some local utils that fetch the website, parse it, filter, and normalize the url
I feel like those should be tested
but they shouldn't be made public from that model, because nothing else cares
and it seems pointless to make them separate modules
thoughts?
I was considering making them separate modules for the sole purpose of testing them, but that seems messy
there's "public from outside your library" and "public from inside your library"
I was then considering exporting them only if the testing env is set, which is less messy from an architecture point of view, but slightly more messy within the file itself
libraries are very public places
14:12
here's one of the lambdas, from a similar file:
const storeIconsInLocal = (icon, website) => {
  const domain = urlToDomain(website);
  const cacheRoot = `${CWD}/icons`;
  const websiteCachePath = `${cacheRoot}/${domain}.json`;
  const alreadyCached = fs.existsSync(websiteCachePath);
  const iconsFromCached = alreadyCached
    ? require(websiteCachePath).icons
    : [];
  const iconData = {
    website: domain,
    defaultIcon: icon,
    icons: getUniqueTruthyArray([
      ...iconsFromCached,
      ...icon,
    ]),
  };
  fs.writeFileSync(websiteCachePath, JSON.stringify(iconData));
there's no reason to make this its own library (or part of a larger one for public (people) consumption), it's too specific
(I inherited this code from maybe 2014 and did a bit of restyling. Don't judge too much plz)
@towc Chat just replaced }; with a "(see full text)" button.
Because logic.
yeah, that's kinda funny
sometimes it replaces no lines for me
it just disappears
14:39
Why are there 0 good tutorials for react-transition-group?
do you guys ever do something called "disc personality test"? Apparently a workplace personality test thing. It feels wildly inaccurate
not me. got any example Qs you can share?
github.com/reactjs/react-transition-group/tree/v1-stable I mean, this is from version 1... WHY??!?!
Everything else is on Medium and just awful
just generic personality questions, but the results sound dumb
what was yours?
14:47
> What do you see here?
> A dev killing a Project manager
DC or something, made it sound way more competent than I actually am
@corvid lots of "I am a neat and organised person" kind of statements?
Yep. Pretty dumb.
yeah. last time I did a test like that was a long time ago working for a supermarket. not sure what the point of it was, but nobody ever actually used them for anything. Probably best going with "yes" to everything

« first day (2757 days earlier)      last day (2413 days later) »