« first day (3601 days earlier)      last day (1569 days later) » 

02:59
Smh, JavaScript only has labels for repetition structures: 🤦🏾‍♂️
void function process() {
    console.log("PROCESSED");
    label: console.log("JUMPED");
}()
03:31
Hey, I'm having some problems with my CRA build. It doesn't like me using module.exports = MyObject, but doesn't complain during development. Has anyone else had this problem?
@libby 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.
 
2 hours later…
05:14
ok i think i got an idea, what do y'all think? Spotify for youtube. Basically it setup the same way as spotify but instead of songs you can use youtube videos.
p.s. sorry @phenomnomnominal ;)
That sounds like a licensing nightmare :)
i don't think i need permission to embed YouTube videos on a website
on a completely unrelated note, do you guys use a nosql db for your playlists @phenomnomnominal?
I have absolutely no idea how our playlists are stored! But I would guess not nosql
Playlists are very relational
Hmm. Interesting. I thinking ordering things are a PIA in traditional databases.
I may have more questions soon, thanks!
YouTify coming soon!
or SpotTube
ok my idea has been ruined
05:47
oh yeah that's totally a thing haha
@Jbis
check out newpipe
u can make ur own playlists without a yt acct, and can listen to songs on background
pretty epic (gamers only)
06:20
Gordon Linoff reached 1M reps :)
 
2 hours later…
08:02
quality > quantity
most of Gordon's answers can be deleted as they're duplicates
bro u just posted cringe
You know what's cringe? Txt tlk
ok boomer
¯\_(ツ)_/¯
 
2 hours later…
10:06
@BenFortune Lol :P beers then
10:35
@BenFortune is he not overly active in sql questions?
that's most of it, yeah
did not have been checking his answers but if you say that he's like ... ahem, you know her 😉 .... then "meh"
she's not been very active last time I checked js questions
 
1 hour later…
11:52
hey
@Sayyamabbasi 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.
react native expert here??
I am creating a chat app and encoded the audio recording base64 using react-native-fs but now I want to decode base64 back to audio format and play it using react-native-sound, please anyonne know then do let me know
😐
you clearly don't read provided documentation(s) 🙂
all this effort from the api devs to provide documentation so that users could work with the said api /s
 
2 hours later…
13:57
o/
14:22
@JBis did you see the link?
14:59
Hiii, it's my first time any chat room in stackoverflow (for some reason it's making me really happy xd)
@GenesisAlgorithms 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.
15:09
Hello room, I hope you're doing well.
Quick question:
Could be there some negative aspect of using dot.notation for sessionStorage/localStorage keys [' namespacing]?
Google is not much friend in this advice.
Personally never had problem with accessing localStorage props/methods
While accessing*
I @GenesisAlgorithms , thanks.
I mean between under_scored, camelCased and dot.notation keys, just thinking what should I take and wondering if dot.notation could have some negative connotation.
It seems to me very readable to use sessionStorage.setItem('some.namespace', 123) and I'd probably go with it if there is no any known issue.
15:48
@Tpojka It's just a string, it can be whatever you want.
Lots of people prefer to store JSON though through a single key, as you get the benefits of localStorage not casting everything to a string
@BenFortune Actually mozilla used camelCase in examples but I found dot notation almost more appropriete in that place. :)
Funny thing is that there is no much google results for "sessionStorage localStorage dot notation keys".

^I am going to store stringified object but also would like to separate those since I'll have few of them of different entities.
session/localStorage are actually pretty nice places to use a Proxy
There's probably nice libs for it out there
of course, if you're concerned about bundle size, raw API use is probably prefered
Has anyone had any problems using a module.exports command on npm run build of CRA?
I don't need anything more than setItem/getItem but just want to organize things nicer.
I don't have issue with other names like
`sessionStorage.setItem('product_all_category_abc', JSON.stringify(obj))`

But just thought it wouldn't be ugly to use
`sessionStorage.getItem('product_all_category_abc')` instead.
My software works perfectly fine in development, the build compiles fine, but when I serve it an open with a browser I get an error message about module.exports is read only
16:02
I can't see any reason that sessionStorage.setItem('some.namespace', 123) wouldn't work
@ShrekOverflow Hey. Just saw. I'd love to work with Auth0, but I am going into my senior year of HS and can't commit to a full time position. If a part time or internship opportunity becomes available let me know. Thank you for the offer though.
@libby c/p exact error message into google should give you some SO results.
@libby module.exports is a Node.js construct. To use it in the browser you will need to use something like Webpack
Yes, I tested it roughly in browser already, just wondered if there could be some caveats like tech debt in the future in fav of bad decision.
But being it string I don't see something that bad could happen.
Thanks. :)
@phenomnomnominal, I thought this was built in to the CRA package manager
16:05
@libby I wouldn't expected that to be the case yeah!
@phenomnomnominal so I need to mess around wth the config?
@Tpojka everything is tech debt eventually! I would possibly say that product_all_category_abc is more clear that product.all.category.abc as it is very clear that there isn't some magic happening with the .
@libby maybe! Or google the exact error message and look for help
@phenomnomnominal, the error message was googled, it brought me to SOF and now I'm here looking for help haha
Could you show us the error?
0
Q: Serving build, `module.exports` is not modifiable?

libbyDuring development, I can freely do: Getters.js let Getters = {} Getters.foo = function(){ return 1; } Getters.bar = function(){ return 2; } module.exports = Getters; But after npm run build and serve -s build -l 4000, I get the error message: Uncaught TypeError: Cannot assign to read only prop...

16:08
@phenomnomnominal Correct that, although I am big fan of naming consistency and would like to save underscore for later maybe. lol
Enough of chatting about different names. lol
Thank you a lot, guys. See you around.
@libby Could you show the code for Getters.js?
why the guy deleted his super good answer???
@phenomnomnominal is a huge file with some proprietary functions
Aug 21 at 15:01, by Suisse
0
A: How to create a tree structure in javascript

Yevgen GorbunkovYou may expand your input array recursively, like that: const src = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20], getTree = (inputData, parent=null, idx=0) => { const name = (!parent ? 'node_0' : parent+(idx+1)), halfLength = inputData.length/2, ...

wtf
is an admin capable to get that answer back?
and when I say huge, like 1k lines or something
16:10
@libby are the imports and exports consistent?
Do any of you have experience with ASP.NET or Rails? I'm looking to learn a new language + framework for webdev and wondering what y'all would suggest.
Shit it's 4am. I should sleep.
@phenomnomnominal I don't have any imports or exports
@libby require statements?
@phenomnomnominal just require
Yup
16:11
You can mix require and export. You can't mix import and module.exports.
@phenomnomnominal sleeping is for the weak
@JBis agreed
If this PR builds I'm sleeping
@Tpojka I don't have any import statements
@phenomnomnominal, yea so just require and module.exports
Here I'll get the full error message
16:13
@libby You have import in React code file. Try with require as that link suggests.
@phenomnomnominal 4am, Aus?
```
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
at Module.<anonymous> (Getters.js:954)
at Module.11 (main.5806a853.chunk.js:1)
at p ((index):1)
at Module.614 (AbstractNavBar.js:7)
at p ((index):1)
at Object.205 (main.5806a853.chunk.js:1)
at p ((index):1)
at t ((index):1)
at Array.r [as push] ((index):1)
at main.5806a853.chunk.js:1
```
What about all of your other files? Any imports there? Or in your node modules?
@Tpojka New Zealand. Aussie is 2am now (East coast)
@phenomnomnominal where in NZ?
@phen
@phenomnomnominal I lived in Rotorua for 4 months
Christchurch right now
@phenomnomnominal sweet as
16:15
@phenomnomnominal Nice. :)
I actually live in Sweden. So I'm on a weird in between time
@Tpojka why should I need to get rid of my import statements though?
My import statements don't mix with module.exports, as you see in AbstractNavBar
@phenomnomnominal yes, there are imports everywhere in the React files, never in any code run by node
You should at least check if that solution works.
Guy there - on googling exact message and getting that github link, so guy with 512 likes for the answer says so. Pretty good reason for myself but you can see if that is correct.
@Tpojka it didn't work unfortunately
I am sorry but I am mostly backend LAMP dev.
I would go through articles in your place and don't have some solution on top of my head right now.
Although that comment you got above is something I could agree: node.js is not browser.
16:25
Its just weird that it works perfectly find during development
@phenomnomnominal goodnight
hi, i got this service on a project im working on and i just dont know where i can find the definitions of the show and hide method import * as angc from '@angular/core';
export declare class LoaderService {
    show(): void;
    hide(): void;
    static fac: angc.ɵɵFactoryDef<LoaderService, never>;
    static inj: angc.ɵɵInjectableDef<LoaderService>;
}
@TahaMouhtij Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
hi, i got this service on a project im working on and i just dont know where i can find the definitions of the show and hide method
import * as angc from '@angular/core';
export declare class LoaderService {
    show(): void;
    hide(): void;
    static fac: angc.ɵɵFactoryDef<LoaderService, never>;
    static inj: angc.ɵɵInjectableDef<LoaderService>;
}
posted on August 25, 2020 by Bindu Suvarna

 Hi, everyone! We've just released Chrome 85 (85.0.4183.72) for iOS: it'll become available on App Store in next few hours. This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Bindu Suvarna Google Chrome

17:14
ƒ setData(r, i) {
    return null == this.data && (this.data = Object.create(null)), this.data[r] = i
}
Hi! I don't understand the syntax of return statement. Does it mean if ```null == this.data && (this.data = Object.create(null))``` evaluates to true ```this.data[r] = i
}``` will be returned?
@user36339 this is just terrible code
but basically its saying
@JBis Maybe.. I am trying to understand the return statement. because I am learning ast manipulation.
if(null == this.data){
   this.data = Object.create(null);
   this.data[r] = i;
   return i;
}
return false;
||> null == null && (z = Object.create(null)), b = 5
@JBis 5 Logged: `` Took: 0ms
@JBis Thanks! I wonder at the possibility to shrink down such lines of code to just 1 line
17:20
its just terrible code
Now I agree!
only use one-liners if they improve readability (i.e. are super simple and only deserve one line)
don't fall for the minimalism meme in pretentious FOSS communities
Ok, gonna learn the art of writing one-liners!
you can also write one liners on multiple lines
return   foo === bar
         && foo === bar2
         && bar3.test === foo2.test
@JBis Right! But I am impressed with that return statement!
17:49
@JBis One (late) question: how do you know return i; part?
||> (b = 5)
@JBis 5 Logged: `` Took: 0ms
an assignment, when evaluated as an expression, returns the assignment value
this is pretty standard with a lot of langs
@JBis Thanks again! Gonna jot it down!
what does it mean if my code goes to this part os the Subject class which extends Observable, i have a component Loader Spinner which dissapears when going into the next
next(v) {
        if (this.closed) {
            throw new ObjectUnsubscribedError();
        }
        if (!this.isStopped) {
            const { observers } = this;
            const len = observers.length;
            const copy = observers.slice();
            for (let i = 0; i < len; i++) {
                copy[i].next(value);
            }
        }
    }
18:01
is it good practice to destructure your packages to minimize the size of the js bundle produced by webpack?
import { ThisClass, AnothaClass, EvenMoreClass } from 'my-epic-lib'
18:30
1
Q: Does service-worker make web-worker reduandant OR is it better than Web-worker (HTML5 Features)

DeadpoolWebworker - Webworkers provide scripts that run in a separate thread and don't freeze UI. Service Worker - Service Workers provide scripts that provide "rich offline experience, push notification, background sync". To me it seems that "Service Worker" also runs in the background but also does som...

@Deadpool 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.
Help me get answer to my question pls
i would but im dumb
yep, but the moderator is asking to close question there ... and none answer I have till now.
you'd probably be better served cross-posting in software engineering SE page and just ask for what is the "best practice"
"best practice" is the magic keyword that transforms heavily opinionated and arbitrary whims into industry standards
18:38
eh, no
best practice is 100% opinion
but das what i said chief
> "best practice" is the magic keyword that transforms heavily opinionated and arbitrary whims into industry standards
seems quite the opposite
@JBis Ah yes! Good luck with the school work, also they are def. wanting to open up junior roles in engineering.
i wouldn't suggest cross-posting that question anywhere
its joke
19:04
posted on August 25, 2020 by Srinivas Sista

 The Chrome team is delighted to announce the promotion of Chrome 85 to the stable channel for Windows, Mac and Linux. This will roll out over the coming days/weeks. Chrome 85.0.4183.83 contains a number of fixes and improvements -- a list of changes is available in the log. Watch out for upcoming Chrome and Chromium blog posts about new features and big efforts

19:55
why does resizing the window make my http call fire again?
because the logic that fires the http call is within other logic that runs when the window is resized
does the nodejs events library work inside of browser contexts?
no
but the one browsers provide should be able to serve similar purposes
!!mdn Event API
20:51
why oh why is the API for sets/maps so uselessly small
Things like joins of sets and diff/exclusions should be easy
UsE a LiBrArY
Now we have to go through the limitation of copying to an array, joining those then merging it back into a set.
Making it o(n) to add a single element - instead of o(1).
I feel like I'm being punished for trying to go for algorithmic efficiency
@JBis rails.
@JBis new language, try something that's different from the ones you know. if you know like ruby or python or js. maybe try rust or ocaml. And then bring back your understanding to the one language you want to know in and out
21:29
rebuild jamesbot using coldfusion
21:55
What is the reputation threshold for chat?
@Taplar 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.
50
or was it 20
Mmm, I do see a really old meta saying 50. Anyway, thanks. Want to make sure I don't try to send low rank people in here only to dissapoint them, :)
posted on August 25, 2020 by Ben Mason

Hi, everyone! We've just released Chrome 85 (84.0.4183.81) for Android: it'll become available on Google Play over the next few weeks. This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Ben Mason Google Chrome

22:39
||> function test() {} / 42
@JBis "SyntaxError: Function statements require a function name" Logged: `` Took: 1ms
@JBis "SyntaxError: Invalid regular expression: missing /" Logged: `` Took: 0ms

« first day (3601 days earlier)      last day (1569 days later) »