« first day (2891 days earlier)      last day (2282 days later) » 
00:00 - 21:0021:00 - 00:00

00:00
@KendallFrey do you work?
@KendallFrey with computers?
@KendallFrey writing software?
00:02
@KendallFrey for MI6
but he wouldn't tell you if he was
That's a trick question if you said yes, then I would have known that he did not work for them. However, since he said No we know that he does work for them. It's one of those let true_identity = ~KendallFray && MI6
@KendallFrey do you work on gui or server?
@Rick To be honest, all uni did to me is make me hate Data Structures
and I see the DS class everywhere do the same
because idiots teach it by making use-cases around data structures
thus, now they have just created zombies which will think of using a singly linked list when they are told dynamic memory.
00:14
@KendallFrey databases or api's or datascience.
databases/apis
@Rick what do you need even a database for?
@ShrekOverflow there are two types of memory in hardware. linked lists have their place.
I know
but cache oblivious linked lists are the last thing you want to use
@ShrekOverflow you need them for transactions and record keeping
00:17
@Rick Whaaaa?
Oh databases :P
databases are needed for transactions and record keeping. Other than that they are sort of useless if you plan on building for scale.
@ShrekOverflow however, I don't believe many companies know how to implement or maintain a proxy caching type backend.
@ShrekOverflow however, http's does cause problems for proxy caching type backends
00:34
Where is that coming from?
caching servers are stupid, they a susceptible to man in the middle attacks.
Not sure if you have ever googled AWS
> I don't believe many companies know how to implement or maintain a proxy caching type backend.

What most companies need is satisfied by wordpress. Yet great measures are taken to have JSP, Servlets, Springs, rats and Horses. Powered by the most powerful MySQL Database for "Data assets"
And that problem comes because most companies don't have good architects.
Most data structures were invented in very early years of programming without uni's or CS 101. Because the use-cases moved them forward that way, "Databases were invented to abstract File I/O because you were bound to disks and inconsistencies attached with Disks." Bob Martin paraphrased.
user image
2
Not the pointer I meant, but I appreciate your being proactive, Google :P
@ShrekOverflow what I am talking about is a firebase architecture.
@Rick That's garbage, firebase is a tool when you design your entire product around it you are jumping into the worst vendor nightmare of all time.
00:43
why is it garbage?
I am assuming with Firebase Architechture, you mean using firebase as the starting point for your app architecture.
@oboecat you should post that to reddit
I can't speak for their business model only their architecture. how they serve content and response times
@ShrekOverflow Google's like, "so tired of you people asking this"
@Rick Oh ok, I was a bit sensitive because recently I had to deal with people thinking firebase as the first part of their app and not as the data-store.
It reads as hilariously passive aggressive
00:48
So stuff like, So what does your app do? Was un answered but they were absolutely sure its gonna use firebase.
@ShrekOverflow I am just talking about their shared proxy caches architecture. Their business model might suck I have no idea. but I can't imagine anything beating it performance or response times.
That is unless your app takes advantage of local cache, but that's usually in the hands of the app designer. and app designers don't trust browsers with data. So...
smart business leverages the client and reduces loads on their server. in fact, a truly smart business would take advantage of the client and off-load any compute to the browser. Quite possibly farming out all number crunching, instead of doing it server side. like how rick produces electricity for his car lol.
user6086034
01:15
can a bounty be awarded after bounty period has ended?
01:28
@Rick I am talking about people using firebase, I am pretty sure 80% of apps that use "FIREBASE" would work off better with just a postgres instance (and that too might be an overkill for some) on $5 DO and I am not even going to go into Postgres vs Firebase differences.
> smart business leverages the client and reduces loads on their server. in fact, a truly smart business would take advantage of the client and off-load any compute to the browser
Smart Businesses figure out the need first and then start talking about architectural decision like what to do in the browser and what to do on server.
Most literature on these topics is plagued by Marketing inventions from MSFT, IBM & Oracle. For example, from the look of first 5 minutes mongo will feel modern and so much awesome you'll run your brand new startup straight into bankcorrupsy.
 
1 hour later…
02:33
@ShrekOverflow can you clarify this?
@ShrekOverflow dude I love that. Block chain could do something like that but it still feels risky. I guess encypted data on a block chain?
02:52
@DavidKamer Mongo is garbage
@DavidKamer you are missing the point by a very long shot.
@Rick ^ here is an example.
Not mongo --- has to be blockchain encrypted risky omgpop!
03:44
@ShrekOverflow why do you think it's garbage?
Lets start with why do you need a database and what do you want your database todo?
Storage, Replication, perhaps even indexing?
@DavidKamer ^
I want to not worry about a second language to interact with my database and I want my database to work effeciently
I know sql - mysql, but I just don't get why you need that overhead. I'm not a database expert in that I don't know much how they work behind the scenes and I know normalizing data actually often reduces performance
mongo isn't that bad if you use it correctly
actually the more I think about it relationships are pretty dumb for most modern apps. If you have a user with a list of posts, that should just be an array of pointers to those post entries.
that allows you to retrieve them when needed rather than in a large mess.
04:49
Hello! When I visit a page such as web.telegram.org or youtube.com on a slower connection the serviceworker ( I believe ) pre-populates the page with simple shapes masking in where content generally will be appearing. Is there a name for this practice?
@Reizvoller Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
They're loading placeholders.
Or placeloaders.
 
4 hours later…
09:07
const promise = new Promise((resolve, reject) => {
	setTimeout(() => {reject('setTimout error')}, 1000);
})
promise
		.catch(err => {console.log('err:', err)})
		.then(res => {console.log('res:', res)})

#OUTPUT:
"err: setTimeout resolved"
"res: undefined"

I would like to simply log the error and move on, what is the best way to avoid the .then getting called after the .catch?
using fixed width on data table column, working fine in desktop view, but not working on mobile view. why is it happening?
 
2 hours later…
11:25
@masud_moni Android?
@DavidKamer You are not answering my question, why do you need a database?
12:00
@SebastianNielsen .catch will catch a rejection and return a Promise.
If you don't want the chain to continue, either rethrow (throw in the callback, or return a rejecting promise), or don't catch at all.
You're basically asking
let res;
try {
  throw 'setTimeout error';
} catch (e) {
  console.log('err:', e);
}
console.log('res:', res);
How can I prevent the last line from executing
What is the syntax here? I want to run the anonymous function so I append "()" to the end of it. I believe that I have seen somebody else do that before.

function async () {
	console.log('func ran');
}()
>>>> nvm, I forgot the parantheses
12:29
@RyanCameron if you want to be more concise
(async () => console.log("fun ran"))();
Madara Uchica, If I don't catch at all, I will get spammed with a lot of the annoying "uhandledrejectionerror". If I throw an error, it is similarly going to console.log a lot more than I actually want (spam my console). Example:

.catch(err => console.log('err:', err));
#Output: "err: setTimeout error"           // nice and tidy just as I want

.catch(err => throw err);
#Output:                // Ugly and messy :(
(node:12820) UnhandledPromiseRejectionWarning: setTimout error
(node:12820) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwin
@SebastianNielsen I know the error. I wrote it, after all :)
But think about my example
34 mins ago, by Madara Uchiha
let res;
try {
  throw 'setTimeout error';
} catch (e) {
  console.log('err:', e);
}
console.log('res:', res);
You want to, somehow, magically make the last line not execute, even though you caught and handled the error.
From a code flow perspective, you've handled the error in your .catch(), you've recovered, all good now. So the code continues to run normally
1 message moved to Trash can
@SebastianNielsen Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@RyanCameron That will not work properly, as the JS parser will interpret that as a function declaration block, and not a function expression.
You have to make sure the parser treats it as an expression, the most common way is to wrap the function in parenthesis:
(function async () {
	console.log('func ran');
})()
I just figured out that this, so far, solves all of my problems:


const promise = new Promise((resolve, reject) => {
	setTimeout(() => {reject('setTimout error')}, 1000);
})
promise
	.then(res => {console.log('res:', res)})
	.catch(err => {console.log('err:', err)})

//swap .then and .catch
12:40
@SebastianNielsen Yes, that will work, but if you add any more .then()s after the .catch(), they will still execute.
Yeah, that's why I said, "so far", it solves my problems
@ShrekOverflow Note that his example was a named function async, not an async function.
@SebastianNielsen Regardless, I suggest you stop using .then() and .catch() directly on Promise objects, and move to async functions
That gives you a much better control over the code flow, and looks nicer for more complicated flows.
@MadaraUchiha Using async functions still requires me to .catch and .then - the flow is the same
@SebastianNielsen No it doesn't, try/catch works inside of async functions
Here's how I'd write your code with async functions:
/**
  * helper function retuns a promise that resolves with nothing after a while
  */
async function delay(n) {
  return await new Promise(resolve => setTimeout(resolve, n));
}

async function rejectAfter(n, err) {
  await delay(n);
  throw err;
}

async function main() {
  try {
    const res = await rejectAfter(1000, 'setTimeout error');
    console.log('res:', res);
  } catch (err) {
    console.error('err:', err);
  }
}

main();
It's worth noting that, like the warning warns you, currently, if you don't successfully catch a Promise rejection, all you get is a warning.
In the future, the entire process will exit
If anybody could have a glance at this question pls (its on vue, and vue-i18n)
https://stackoverflow.com/questions/52344776/access-vue-i18n-messages-as-object

:)
12:50
1 message moved to Trash can
@SebastianNielsen 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
@MadaraUchiha    I am not entirely sure what your point is. "try/catch works inside of async functions". Well yeah, but it does so too in promises:

    const promise = new Promise((resolve, reject) => {
    	try {
    		setTimeout(() => {reject('setTimout error')}, 1000);
    	} catch(e) {
    		console.log('err:', e)
    	}
    })

    promise
    	.then(res => { console.log('res', res)})
@SebastianNielsen No, it would not.
Try it, and you'll see that you catch { doesn't fire.
Wait what, I have litterly done that throughout my application. But trying it out in a minimal working example I can see that you are right.
The error is not catched.
In non-async functions, catch will only catch synchronous throws.
Why do you think that every callback Node provides has an err parameter, if you could just try/catch asynchronous calls? :)
Okay, now I got a lot of rewriting to do, I have litterly tried catching errors like that multiple places in my code not knowing that they would be handled by the outer .catch - what have I been doing lol.
12:57
fs.readFile((err, value) => {
  // gotta make sure that err is null first
})
This will work though, I just tested it, async or not:

    const promise = new Promise(async (resolve, reject) => {
    	try {
    		throw 'this is an error'
    	} catch(e) {
    		console.log('errrrrrrrrr:', e)
    	}
    })

    promise
    	.then(res =>  console.log('res', res))
    	.catch(err => console.log('catched here'))

    #Output: 'errrrrrr: this is an error'
 
1 hour later…
14:15
I am new to redux can someone please tell me how can I implement login logout using redux and asyncstorage. Should I create 2 actions for login and logout and 1 reducer ? see code below:
_onLogin = () => {
    auth0.webAuth
      .authorize({
        scope: 'openid profile',
        audience: 'https://' + credentials.domain + '/userinfo'
      })
      .then(credentials => {
        Alert.alert(
          'Success',
          'AccessToken: ' + credentials.accessToken,
          [{ text: 'OK', onPress: () => console.log('OK Pressed') }],
          { cancelable: false }
        );
        this.setState({ accessToken: credentials.accessToken });
      })
      .catch(error => console.log(error));
can someone help me with parsing xml data to a table? in nodeJS with ejs set as view engine.
@Dinesh Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
14:31
$ npm run build

> [email protected] build D:\xampp\htdocs\myaskbuddy
> webpack-dev-server

(node:16580) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
i ï½¢wdsï½£: Project is running at http://localhost:8080/
i ï½¢wdsï½£: webpack output is served from /dist
D:\xampp\htdocs\myaskbuddy\node_modules\webpack\lib\Chunk.js:824
throw new Error(
^

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
at Chunk.get (D:\xampp\htdocs\myaskbuddy\node_modules\webpack\lib\Chunk.js:824:9)
can anybody solve this problem
 
3 hours later…
17:25
Hi everyone how can i fill each country with a color randomly i use d3 js lebrary
wut
!!poe or wow
@KevinB poe
good choice
@SebastianNielsen calling reject inside try block does not fire an exception to catch
@mohammadmohammad Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
18:14
Can someone spot the error in this code? The script execution ends there, the follwoing statements are never reached somehow
  await readdir(".", async (error, files) => {
    if (error) throw error;
    await Promise.all(
      files.filter(name => /^adn/.test(name)).map(f => {
        return unlink(f, () => {});
      })
    );
  });
@Frondor Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
unlink function is = promisify(fs.unlink), same with readdir
@Frondor that will not work
const files = await readdir(".");
Promise.map(files.filter(blah).map(async x => await unlink(x));
I am assuming both are promisifed
Yes, they are. But I realized I didn't need async here, so I rewrote it
but still, files are not getting delete
fs.readdirSync(".", async (error, files) => {
    if (error) throw error;
    files.filter(name => /^adn/.test(name)).map(f => fs.unlinkSync(f));
  });
I think I know why, that callback doesnt go there
fs.readdirSync(".")
    .filter(name => /^adn/.test(name))
    .map(f => fs.unlinkSync(f));
Finally, ty xD
18:33
2
Q: Nuxt.js: ReferenceError baseURL is not defined

Billal BegueradjI want to read a local JSON file located in the static/ folder (if you are familiar with Nuxt.js). I have in my nuxt.config.js file: module.exports = { ...

Hi im trying to return a boolean from the following only getting false everytime
itemExists(items, day) {
    for(i = 0; i <items.length; i++){
        if(Object.keys(items[i].item) == day){
            break;
        }else {
            return false;
        }
    }
    return true;
}
@ShrekOverflow in the most basic sense, to store data to retrieve later in an organized and predictable way.
omg I'm falling back in love with gvim. Atom has just gotten too clunky for me tbh
19:03
@DavidKamer you could do that with file systems and memory caches too.
and it'll even scale and stuff
so what do major databases give you on top of that?
efficiency? but I think I already said that.. I guess easy access from multiple instances?
@DavidKamer No
A database's main purpose is the locking feature
@MadaraUchiha so multiple instances?
The ability for multiple entities to access, read and write multiple times safely
It's not about easy or efficient
I mean that probably isn't the best way to describe it but that's sort of what I meant
19:09
It's about safety and guarantees.
so you are saying mongo is bad at that?
You mean when more than one user messes with the same document?
At the smallest granularity, mongo locks the entire collection
Also, by default, mongo will successfully return without confirming the read has even happened (or even acknowledged)
what? that is absurd if I'm understanding you correctly
19:11
So you have no guarantee that the write operation you've just issues was even accepted
Mongo has a few use-cases, but not really as a database.
I mostly use mongo with mongoose and it always returns either true or false with a document...
Not a serious one, anyway.
idk it's pretty popular and a lot of businesses use it.
@DavidKamer You will find that if you stress-test, you'll get true on occasion even when the write was not made.
I know that isn't exactly a valid argument lol
19:12
@DavidKamer It's definitely valid, I know of several successful businesses that use Mongo and are happy with it, it has its advantages
@MadaraUchiha why do so many people use it and what nosql should I use instead in your opinion?
You just need to be aware of the risks
@MadaraUchiha fair enough. It's probably not very good for mission critical stuff ?
For example, if your usecase is increasing a counter of some sort, for aggregated analytics, you don't care if 10 out of 100,000 writes failed
hi folks
19:14
@DavidKamer You should never use mongo for handling money, or anything that requires absolute guarantees that actions have been made
Use a database with proper transactions for that.
can someone help me tweaking a js library?
@MadaraUchiha what nosql alternative would you personally suggest looking into?
As for what to use, Postgres, despite being a SQL database at its core, has very good NoSQL features that you can try. Namely, the JSON type.
@HenriqueHBR Don't ask to ask, just ask.
@MadaraUchiha isn't postgres really just a cache?
@DavidKamer You're thinking of Redis, maybe.
No, Postgres is a full-fledged database.
19:15
i can't achieve multiple connected lists on slip.js
oh crap I am lol
i already tried messing with the code, but unfortunately, nothing...
@MadaraUchiha what about couchdb?
For most projects postgres is overkill, mariadb performs better and offers pretty much the same
@DavidKamer I'll admit to have never tried.
@Frondor "performs better" how?
19:16
@Frondor mariadb is really just a mysql engine isn't it?
@DavidKamer It's basically the open source fork of MySQL
@DavidKamer Its a fork that pretends to be a drop-in replacement for any mysql database. Personally, I find mariadb development way more promising than mysql
That's what I thought. I think there are ways to use mongo correctly...
@Frondor Anything from Oracle is a little suspect
@MadaraUchiha I admit I do use if for something that handles payment tracking, but I have an external rest api I reference before any actions occur
so really mongo is only used for convenience of reference. I think the payment will even fail if mongo doesn't return with a created entry
@HenriqueHBR what have you tried so far?
> PostgreSQL supports .Net, C, C++, Delphi, Java, Perl, PHP, Python, Tcl
wat
@MadaraUchiha no JS?
@DavidKamer wait a minute, i'm going to send a jsbin
19:22
I believe its talking about where it can run
@Frondor where it can run?
@MadaraUchiha maybe they mean official support
What does "running in Delphi" means?
@Frondor This doesn't compare the most important features
Read/write speed under varying degrees of pressure, for example.
Data manipulation abilities, the complexity of available constraints
I was not saying one was better than another
You said MairaDB "performs better", which is a claim I think is completely false.
19:24
Simply that for most projects, postgres is overkill and mariadb quite lighter, less resource hungry and easier to replicate
Those are different claims from "it performs better"
the nested list is not working properly
i was trying the implementation on this repo issue, but the workaround is buggy and unstable: github.com/kornelski/slip/issues/15
that seems like an event propagation/bubbling issue.
is stopPropogation called on the event listener for each list item?
19:29
the propagation is not the focus, i can solve it later, i need to fix the nested list issue asap
because that would need to be removed. Also, I'm not sure how slip.js is binding to each item, but I assume through the class selector?
I'm saying that the even is topping in the parent
probably the click event
do you mean the click event is the reason of the nested bug?
the click even has to propagate to the child. I haven't looked at the code in slip.js, but propagation immediately seems to be the culprit to me.
@HenriqueHBR yeah
check if stopPropogation is called on the onClick listner callback
ohh, i get it
so...
when i click on the child, the parent is moved instead, right?
yeah because there is no onclick even propagating to the child element from the parent.
19:32
thank you david, i'm going to try this solution
so only the parent is moved. @MadaraUchiha please correct me if I'm wrong lol. I basically only do React
Your conceptually looking at the capturing phase
(90% certain)
but
if the reason of the problem was the propagation...
the child and the parent would be dragged
in this case, only the parent is dragged
@DavidKamer like this --> 362f2e64.ngrok.io
You'd have to stop the event bubbling with stop propagation in the child
You basically need a new set of event listeners for the child elements you want to behave like list items.
This is the opposite side of the coin, not capturing but event bubbling
but how can i connect the two lists? (the parent and the nested)
actually, they can't exchange their items
if i try to drag something from nested to parent, nothing happens
the same thing occurs when i try from parent to nested
19:49
It depends on how it's implemented. Try creating another class with another set of event listeners that stopPropogation do their parent?
which event listeners should i put on this new class?
i was thinking on something like rubaxa sortable
for example...
$("#list").sortable { group: "shared" };
everytime i call this function on a element with this group, the items on them should be interchangeable
@HenriqueHBR That's beyond what I can help you with. I don't know how slip works tbh but the concept will have to do with event propagation.
it's normal to have difficult to make changes on a third party script with ~1K of lines of code?
@HenriqueHBR yeah, but if it let's you provide a callback you can start there
would it help if i share some important snippets of the script?
like, the reorder and onmove function
20:10
what's people's thoughts on this scrolling effect? apple.com/apple-watch-series-4
I tend to heavily dislike most scrolling effects
this one isn't meaningful, but I don't think it hurts
annoying
20:24
I am not that familiar with the js Date module, is there a method to get a date in the format like this "2018-09-15T17:46:49.613Z"?
Or do I have to use a lot of "smaller" methods to create it?
It's eastern time by the way.
lookup date.toJSON()
The 3 last (.613) indicate UTC
Yes, thank you! You just saved me a lot of time.
new Date().toJSON()
Did the job :)
!!> new Date()
@DavidKamer "2018-09-15T20:32:23.699Z"
this is horrifying:
20:39
@towc haha, who's it for?
there's been a trend of people pretending to be other companies on job platforms.. That's so illegal
what do you mean "who's it for"?
@towc what company
just a random post on facebook I found
oh, nevermind
@DavidKamer oh, my word for that is "from"
company's called Plat4M
20:42
@towc prepositions in American English or more interchangeable than the British dialect.
I think you meant "are"
and I'm inclined to disagree
go for it. I also make a habit of speaking to native speakers of languages and dialects and correcting them on their culture and language. jk, I don't
Well apple's stupid
They use JS to protect order details from being seen until you log in.
Page → AJAX Request | AJAX Request [Containing "John Doe"] | JS only displays ["John D"]
Page says you need to login to view more info
Anybody know what the best chat room to ask questions regarding Semantic UI would be? I'm tearing my hair out over here.
@Dehodson Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
20:51
I'm suprised apple would stoop so low as to use JS.. THought there would be something like Apple Super Script that's a proprietary version of JS
I prefer mine as it abbreviates better lol.
lol
@DavidKamer Woah I didn't even notice! Fair enough, I would vote for that.
@geisterfurz007 I guess Apple lucked out by being closed off to any one other than the people they own lol.
no way we can vote on it without being their property!
20:55
:D
I actually use Apple Script. For what its supposed to be used for its REALLY good. (You can also use JS with it)
Gonna contact Apple just for fun about the issue
@JBis It probably is. Is it like a bash scripting language?
lol the wikipedia link is right there :P
> display alert "Hello, world!" buttons {"Rudely decline", "Happily accept"}
set theAnswer to button returned of the result
I would go absolutely insane writing that I think.
tell application "QuarkXPress"
  tell document 1
    tell page 2
      tell text box 1
        set word 5 to "Apple"
      end tell
    end tell
  end tell
end tell
yeah.. that looks like something Apple would make you write
20:57
Not too big but might as well tell them. The info that is exposed is Last name, first & last letter and domain of email address and parts of the phone number. And first and last name of the person who can pick up the item.
@geisterfurz007 hold on. You have to put into perspective.
@JBis you should. Does Apple have a Hackerone?
^an active hackerone
@JBis You already are so it doesn't matter? :P
It is not meant for writing full blown apps (thats what swift is for) its so someone can script different things without lots of experience.
Fair enough
Also
I personally think it is one of the best languages to start on. And let me explain why...
00:00 - 21:0021:00 - 00:00

« first day (2891 days earlier)      last day (2282 days later) »