« first day (3055 days earlier)      last day (2118 days later) » 
03:00 - 16:0016:00 - 00:00

user1596138
16:00
hi
16:18
Typescript doesn't make any sense as per usual:

TS2315: Type 'MethodDecorator' is not generic.

Bitch please it's declared as following:

declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
Hi, I need a little help here. So I am getting the error "Uncaught SyntaxError: Unexpected end of input" in google console for this line of code.

<input type="number" id="no_property" name="how_many_properties_do_you_own" class="form-select" min="0" max="10" onchange="addFields('no_property','container_property',{'Address','Estimated Value','Amount Owing','Monthly Repayment','Monthly Rental Inc.'})"/>
{'Address','Estimated Value','Amount Owing','Monthly Repayment','Monthly Rental Inc.'}
what is this?
a random block with some random strings?
that would evaluate to the last string.
!!> { 'foo', 'bar', 'biz' }
@rlemon "biz"
thats an list/array argument that i am passing to an array with the function

function addFields(numberID,containerID,fields){
no, that's a block with random strings.
an array is made with [ not with {
16:22
oh okay
it worked :) Thanks @rlemon
16:48
anyone use shopify's graphql api?
it's slow as hell for us, to the point we're considering handling the cart process entirely on our end, and only building a checkout once the customer is ready to checkout. it's taking 500ms on avg per request
17:16
@BhojendraRauniyar Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
Hi, I'm little confused with my function as how to refactor:
function foo(value) {
  if(value()=='test') {
    // ... some code
  }
  value.bind(function(newValue) {
     if(newValue == 'test') {
       // ... some code as same as above
     }
  }
}
What will be the good approach? A new function or something else?
what is it supposed to be doing
some setup... but i'm confused the way it is defined... hah
Anyways, I've asked it here:
https://codereview.stackexchange.com/questions/214347/is-this-something-like-currying-or-recursion-not-sure-how-to-refactor-my-code
17:34
focus less on how it does what it does, and more on what it needs to do
That may help you understand how it should be refactored.
if you don't know what it needs to do... you're not ready to refactor it, :p
That code as is seems pretty weird to me. Like, are you expected to call foo with a function that returns a value? why? and why is value then being bound to a function that returns a value, but the resulting function is never stored/used? it doesn't make much sense.
Hmmm, The code // ... some code is written by me and know this well. But needed to place at two place like in the example. So asking if there's something better pattern for it.
pattern for what though?
what is this code doing?
it's not currying, as foo doesn't return a callable function
it doesn't return anything
hmm, that's what confused me, what pattern it might be... also weird to me as well.
we need more code
noone's going to be able to understand what the purpose of what you've given is
Then, I think making a new function should be fine.
17:48
hmm can I influence the order in which observe() functions are run with mobx?
fn1.bind(fn2)
does nothing
@BhojendraRauniyar
I am a beginner, so please don't kill me
@BadSnowflake 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.
But is it possible to make some kind of iterator for a js json array that I can use to walk through a json array, entering sub-arrays and such, automating the whole process?
just need some pointers
17:53
716
Q: Access / process (nested) objects, arrays or JSON

Felix KlingI have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For example: var data = { code: 42, items: [{ id: 1, name: 'foo' }, { id: 2, name: 'bar' }] }; ...

@rlemon fair point, but I am fairly new to JS and I barely dare to ask questions on this site, given how people react to beginner questions
beginner questions are fine. they just need to be asked well.
the site isn't toxic to newbies, it's toxic to shitty questions.
that's toxic
thanks @KevinB. Looks like what I need
18:17
I fucking hate the word toxic
5
@SterlingArcher that's rude
life is rude :)
> kick-mute this user
I never realised how stupid this music video is
it makes no sense
18:21
I'd expect that to turn out to be rather toxic for the community. — Kevin B 1 min ago
I added it to my favorite song. :) Cool music!!!
omg lol
@BhojendraRauniyar you need better music
try this on for size
18:36
^ Passenger is incredible
I like her
my SO didn't get it
thought it was dumb.
but I thought she was awesome
yeah
Gn. See ya'll
19:19
@SterlingArcher I know you appreciate some Tracy Chapman
20:15
I am setting up a search mechanism on a site. Is there any down side to dumping all the search content (like an SQL table of a DB) into JSON and giving it to the browser so the search results can be handled by JS and go quick, instead of doing a bunch of AJAX requests?
yes
the database is far better at doing that filtering than javascript is
lol, since I started using flow and added the flow plugin for webstorm (allowing continuous checks) webstorm regularly takes over 6GB memory and my laptop seems to melt.
javascript can handle a small set of data, but if it grows you'll start seeing UI locks
@KevinB async/non blocking.
?
you can stick it in all the setTimeouts you want, but the code doing the work still has to run on the same thread that the UI does. You could move it off to a worker though... but at that point you might as well just let the DB do what it's good at.
20:18
@KevinB It wouldn't be that advance searching. Just simple searches like checking if a field contains the search string.
if it's a small set of data that won't grow big enough to cause problems, sure, do it clientside.
How big is too big?
depends on the calculations you need to make
and the client's browser/pc
for example, i recently ran into an autocomplete feature of a 3rd party system that loaded 2k records into an array on the client and filtered on those records... each time it had to filter the array, the UI locked up for 500ms or so.
hmm. I don't expect it do be huge. I mean browser should be able a simple indexOf a couple thousand keys and still be find.
wdym by UI locked?
not entirely sure what they were doing to cause it to lock up like that, but it was just a simple autocomplete feature, couldn't have been that complicated.
like, you know how when you pop up an alert you can't do anything but interact with the alert?
imagine that... but without the alert box.
20:23
yes, because an alert is blocking. But there are ways of doing it non blocking if I am not mistaken.
yes, workers, because you'd be doing it on another thread
user1596138
I guess my company downsized. I got let go effective immediately
any other method is still going to run on the UI thread
user1596138
So... Throw your boy a line :(
user1596138
20:24
What a Tuesday :/
That sucks @Jhawins.
Ok. And AJAX for autocomplete won't be too slow?
Is there a way to do configuration dynamically between two environments for a compiled JS project, or are you just stuck compiling two versions and living with the consequences?
The only alternative I can think of would be to hinge off of like the domain or something.
@Jhawins oh yikes that sucks man
again, it depends. but, at the very least, an ajax based one can be handled gracefully without UI blocks.
user1596138
Yea we were just making plans to move back to Omaha and shit too lol
20:27
gosh that's awful that it was so sudden
user1596138
I was learning to like the place like yeah I could spend 10 years here, buy my house I was about to buy and pay it down lol
@Jhawins well at least you didn't buy it and then get let go
user1596138
YEah.... Not even a hint before. They had me doing some sort of mundane work.. But no hint at this happening whatsoever
work for Target with ndug lol
wow that makes me paranoid
user1596138
I got a car for sale if anyone wants a Challenger
20:29
are you in omaha nebraska @Jhawins?
user1596138
My only debt. Then I can survive off minimum wage if I had to
ft wayne indiana
user1596138
@IrkenInvader I'm in Indiana near Chicago now
user1596138
I was working full time remote for the last 12 months lol
have you talked to Shrek about where he works
user1596138
20:30
Yeah I thought about applying a few times.. Guess I have to now
I think that could be really cool, they're a great company
user1596138
I like just spent a whole week in that office this month too lmao
user1596138
Seemed fine. Damn
your employer's office?
user1596138
Yeah. I went back like every other month
20:31
gotcha
I'd talk to Shrek, he was able to pull some strings for me
I didn't get in but that wasn't his fault
where Shrek work?
I don't think he wants it in crawlable chat logs
that's his call anyway
base64 it
@forresthopkinsa lmao he boasts about it every other day
¯\_(ツ)_/¯
20:33
He's in london now anyway
user1596138
Yah I'll check it out
user1596138
I got some severance
R29vZCBsdWNr
user1596138
I'm not dead in the water lol
well that's good
20:38
@Jhawins I'm sorry to hear that, but think of it as an opportunity!
When I got let go I didn't get anything :(
And I had debt
I mean, you got something
let go
user1596138
Yeah they did me right...
user1596138
It's just unfortunate.
Absolutely
user1596138
I'm not spreading hard feelings or anything. Just saying I need a new job
20:39
@KendallFrey Damn
Nah you're good man, I know
Just trying to keep you positive
user1596138
I'll be positive tomorrow, today I be drunk lol
user1596138
And play Apex Legends
Your only hardship in the next 2 weeks is picking something you'll enjoy
user1596138
Yikes as if I can even get to a 2nd interview in 2 weeks
user1596138
20:40
Remote lmao
user1596138
I have jobs ops in Indianapolis I've interviewed for recently
user1596138
And my lease ends in May. So I'll probably just jump again
I've never applied for a remote position, so I can't compare there
I can tell you already you could get a job in 3 days flat in my area lol
why limit to remote?
user1596138
@Loktar lol that'd be cool. No hard feelings if you can't or whatever
user1596138
20:41
@JBis There are no jobs here
user1596138
I;ve looked this last year lol. There's a few underpaid ones
@Jhawins aren't they all....
user1596138
@Loktar Wait did it happen to you?!
@Jhawins I was poking around SO/jobs and tbh, I found this company interesting stackoverflow.com/jobs/242130/…
maybe something to look into
You just reminded me of it
20:43
bidding against people who are fine making $2/day isnt gonna work out
you'll just undercut yourself.
not to mention freelance clients are abismal
fair enough
i love freelancer hell stories
user1596138
I was not watching the chat so I didn't see any of the now missing ones heh
yeah I guess. one of them but a java project under javascript
@SterlingArcher this is a fun website
user1596138
@rlemon yeah I don't even care to look at those lmao
user1596138
That's hiring to "Get it done"
user1596138
Lots of people can "get it done"
you'll never be valued right. because your offer is sitting next to one that's way less.
20:47
@Jhawins peep the link yo
and people going to those sites don't care about quality, they want the lowest bottom line
it's like commodity sales.
you have to be the bottom line or you lose
Does anyone know of a templating system that's relevant &or maintained? Something that can take a boilerplate folder for a component structure and place it somewhere else? Mine basically(will*) just copies a folder structure and anything with {name-here text-filter} will be replaced accordingly . . .
I was thinking yeoman.io? But it looks like it hasn't had any blog posts in 3 years and the github seems dead . . .
you want scaffolding or a template system?
I'm new to the terms, let me look up scaffolding
pretty sure you just described scaffolding
maybe you want both
like a create-react-app type system.
20:51
Less so of the scaffolding I think - I don't need a project structure generated at the moment(if that's what it is). I'm just trying to simplify my process of having to make a component folder so often.
then it's probably going to be a tool specific for your stack. like create-react-app
user1596138
@SterlingArcher This link?
I found it a while back poking around at the market and thought it was interesting
seems up your alley
user1596138
> Bachelor’s or Master’s degree in Computer Science or similar technical discipline
user1596138
Not that I let those stop me lol
user1596138
20:56
Yea I keep getting that one in my email. I just wasn't honestly wanting to change jobs heh
I just checked the documentation for create-react-app. I feel like yeoman is what I'm looking for. I remember back in the day Polymer-Project used a command "like" yo polymer comp and it would generate a folder structure for a component (not a project structure). So maybe scaffolding is what I want?
If so, is yeoman still the best option for scaffolding?
lol i try to hide myself from job sites now. The spam was ridiculous
I see/hear a commercial for indeed.com every fucking day its annoying
you listen to NPR
zip recruiter is the other one
20:59
I don't always listen to NPR, but when I do, I hear commercials for Indeed and Atlassian
now make it a Cap command
lol
@CapricaSix help
also news orgs gotta chill with all the "AI" crap. Its enough already.
AI is the new BlockChain
also the old BlockChain
AI will always get clicks
yeoman.io: "capture their own boilerplates and easily re-use them and so on". I think this was exactly what I was looking for but it doesn't have a real term associated with it I guess besides "own boilerplate".
21:08
but its not anything new. ML is newish. Not AI.
every 2 days I see an article about thispersondoesnotexist.com
Blockchain AI in the cloud using ML with devops
^A sentence for 2019
forgot something about "deep fakes"
*forgot: "running as a microservice"
that too
also photoshop & after effects has been doing stuff like this for a while
Blockchain AI in the cloud using ML with devops creating deep fakes using a microservice
@JBis if ML seems new, it's just because we have the processing power to use it now
21:14
!!magic
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
What should I search for if I want to find something that helps me "queue" requests to the server? (with priorities/ability to force waiting on the list of requests to finish).
Basically in my application whenever you modify some important fields those fields should be updated at the server directly. However in case of bad internet connection this really lags down the page. So right now I'm looking into a solution where the values are stored locally, and the client just tries to update the values as soon as possible.
I do that in one of our apps. didn't get a package for it. just wrote it myself.
 onClick(async() => {await saveForm(); setState({formshowing: nextform});});
just have your own transport object/class and give it a queue. on failure put the item back into the queue.
and always use that transport object/class
21:25
that's pseudocode what happens now, writing it myself I can see already lots of trouble with requests that are "based on" other data, and the queue filling up faster than it can offload to the server.
if( socket open ) {
  if( data exists in queue ) { get data and add to the payload }
  send payload;
  clear queue;
} else {
  add to queue
}
and just try to structure your payloads to allow conditional stuff
Well yes, but how would you go about that actually running (yet not blocking)? Would I just put it behind a timeout and let the browser decide?
yea just call it in a loop
mines an async function so it doesn't block
@paul23 If you want something to google that is overkill, but might give you some ideas: look into Event sourcing
My boss ultimately wants to save "as much as possible", even if the person is filling in the fields if there is a connection it should try to save. So strictly following that I'd have it just snapshot the application state; save it, then on return of save immediately snapshot again and send a save request again.

However than I can also consider I can have multiple requests at once, so I don't need to wait for the first save to return before starting another request, I just need to consider CPU: however then I can't find any details on how to make sure these dozens of requests will always r
21:47
@SterlingArcher you never answered about chapman
listen
I wrote a node server that talks to a web app over localhost. Now I need it online - I deployed my node server on Azure, but I want the web app frontend (separate project) to be hosted too. Do I make another site to host that? Or can I combine them both into one azure site?
yea
if you can host your server on azure, your server sends the client the files.
so the front and and back end can be the same. or they can be different. there are benefits to both.
but I wouldn't worry about that now.
if you have it in two apps now. a client app and a api then I'd keep it like that and just push both
then maybe look into the pros and cons of combining them
Is your web app static content? Just a bunch of files? This seems to indicate you can just put them in storage and have it serve from there: docs.microsoft.com/en-us/azure/storage/blobs/…
I have my web requests hardcoded to localhost:5000 so I need to set up a default root url in the (manifest? package?) json
that's what we do with aws s3
21:53
I'm testing out making a PWA that hits node->sql to refresh but lives mostly inside its own indexeddb
lots of data querying
I saw somewhere to throw static files in a \public, not sure if that'll install my service worker stuff correctly
22:05
is github pages down
it doesn't seem like it is
and yet, this
but some pages work?? wtf
i mean
that first page works
wut you talkin bout
seriously? yikes
I've been emptying cache and hard reloading and still getting "Github Pages is temporarily down for maintenance"
might be regional
I get GitHub Pages is temporarily down for maintenance. in NZ
weird
does the second one work for you
22:15
yeah
hard refreshed the first link and now it works
really? ugh. I don't know what the deal is
yep now it's working
well this was fun
22:27
welp, I just noticed npm install does not install the latest version, you hae to run npm update after install.
Should install whatever semvar you specify in package.json
hi is anyone familiar with google analytics
i have heard of it
I am struggling with google analytics I havent written a question yet
@rlemon well I had "react": "^16.6.3", in my package.json. npm install installed exactly that version, however npm outdated showed 16.8.3 already existed, it did not install that by default (yet the ^ implies "latest" right?)
22:41
@rlemon i think package lock muddles that now
22:59
Hello. I have a question about Node and SQLite:

I haven't worked with embedded DBs before (I've used Redis). I understand that since SQLite is essentially a db as a library, that there needs to be a client/driver for interacting with the binary library. I also understand that since SQLite is implemented in C++, that it will likely mean a [Node addon](https://nodejs.org/docs/latest-v10.x/api/addons.html). It seems like `node-sqlite3` is the most popular package, but it uses `node-pre-qyp` in the build process, and I don't understand how that works. I would prefer to use a precompiled binary
@jsejcksn 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.
If I close this tab, but have SO on my phone, will I get a push notification for an @ mention?
the ios app?
@KevinB yes
or android app? both will give you a notification, depending on your settings
usually after ~ 10 minutes
23:11
For this chat, I mean
right
After 10 minutes of not beign read, it becomes a notification on the main site
and therefore goes to your phone app too
I don't see anything related to chat or chat settings in the iOS app. Can you link me to a doc?
chat isn't on the app
@KevinB Ohhh, I see.
That's a bummer than I can't chat in the app
Thanks for clarifying @KevinB
yeah, clicking a notification for chat in the app opens up your browser
23:17
wtf I have gotten 3 spam contact form submissions in the past 5 min. jeez spammers.
you should fix that
make the form not work without javascript, will kill 99% of spam
I probably should. But I don't want a reCaptcha. They are so annoying.
@KevinB how? I mean the current form doesn't work without js but you can submit direct to the php script
if the form's action points to the php script that does the stuff, js isn't required
well I mean to use the actual form its required. To post data direct to php script its not. What are you suggesting? Some kind of js calculated hidden code?
basically... no form at all
just inputs and events
ajax
23:22
?
an ajax request still has to submit to the php script
@JBis right, but the crawlers are looking for the action for your form
only sophisticated crawlers will learn how to post to the backend that way
your avg spam bot wont
through just parsing the action?
no, i'm agreeing with you
23:29
literally bs4 and 2 lines of code?
sweet
on the point i've already made :p
that's what I thought lol, I was trying to back you up
gotcha. One sec....
fixed
might have to change file name if bots remember
thanks
just add your form after the page loads if it keeps happening... Most bots will not run your javascript
It's about 5 times more difficult (or more bc it has a larger learning curve and isn't in any tutorials you'll find from a basic search--and you have to know what the problem is in the first place) to crawl a page after JavaScript is ran on the DOM than just parsing the pure HTML from the GET request to the root route.
one piece of javascript adding the form to the page turns it from a few lines and bs4 to:
129
Q: Web-scraping JavaScript page with Python

mocoperaI'm trying to develop a simple web scraper. I want to extract text without the HTML code. In fact, I achieve this goal, but I have seen that in some pages where JavaScript is loaded I didn't obtain good results. For example, if some JavaScript code adds some text, I can't see it, because when I ...

that top answer looks pretty convoluted to me tbh. I'd use a headless browser to print the "compiled" html, but I've never tried it so this might be simpler.
and no, I'm not a spammer, I just want to be able to scrape sites with JS sometimes lol
23:54
thanks. Most scammers probably don't want to spend the time creating something sophisticated enough. Hopefully... Well at least I know how to scrape with js now :)
03:00 - 16:0016:00 - 00:00

« first day (3055 days earlier)      last day (2118 days later) »