« first day (3790 days earlier)      last day (1383 days later) » 
00:00 - 21:0023:00 - 00:00

00:08
@makadev I don't know where you've worked but the last two companies I worked for, half of everything is written in VB.NET. Even though Microsoft is trying to kill it, it is still the language for a lot of in prod stuff. C# not so long ago was pretty much exactly the same as VB.NET in terms of features and even had a few things more than C#
@JohnnyPrescott 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.
@JohnnyPrescott I'm doing more web/app development, so even in the Microsoft Sphere it's basically C# or JavaScript/Typescript. I literally don't know a single framework which is either powered by Visual Basic or Perl... might be my bias thought
also.. wonder why Go is on the List but C# is missing.. and so on.. this list is so weird.. Perl + VB + CSS have basically nothing in common (nowadays), maybe 10 years ago, but neither Go nor Swift existed then (or where anywhere near usable)
 
1 hour later…
01:42
 
4 hours later…
05:16
Hi everyone
Can anyone help me with my problem?
12 hours ago, by MRS1367
I'm trying to port my Nuxt.js App to a subdomain on Apache in Ubuntu
I have not been able to solve the problem yet... :(
 
2 hours later…
07:25
I lived to see a question which was (shortened) "Why does check(str) work but when I do check it doesn't return what I expect?"
I guess it's not too surprising given the types of questions I've seen on SO but this one was from a user with rep in the thousands.
And they did have some posts about JS, so that wasn't a completely new language to them. Even then, they had more posts about Python, so I'd expect calling a function vs not calling a function to not be a foreign concept.
@KevinB hey
07:53
I have changed the file mentioned in my previous conversations as follows:
<VirtualHost seller.example.com:80>
    ServerName seller.example.com
    ServerAdmin [email protected]

    ProxyPass / localhost:3000
</VirtualHost>
And I face with a new error:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
502 (Proxy Error)
08:08
And after a while I get the following error:
This site can’t be reached
seller.example.com took too long to respond.

ERR_CONNECTION_TIMED_OUT
 
4 hours later…
12:09
you guys know on reactjs material dropzone comp...i need t set the file limit size to 15, but filesLimit shoud be null because i whant to the users never go over 15mb of upload
you guys know how?
i have try to set the value to 0 or null but don't work, i have been looking on google or doc for any info anbout that but i have noting...so i'm asking if you gys know about that
 
3 hours later…
15:00
OMG. I was googling something about promises and happened upon one of the most misguided things. It's "proof" that Promise.race is a lie but it's complete misunderstanding of what a promise is and how it works. Here is a tip, a promise doesn't get "executed".
Once created the promise marks that some operation is already running and will be resolved eventually. The operation doesn't start when you "use" the promise. So, if you re-use the same promise then you don't "prove" that Promise.race is broken since you're working with already settled promises.
o.o
@VLAZ Promises is something that is often misunderstood, despite it being a core part of js
@MisterSirCode ^ I still recall your confusion
I believe you once said "it does not make sense"
and ... I hope that you have taken a shower first before returning from the trash can, Vlaz.
Thanks. I was actually expecting a whole different wrong that at least makes slightly more sense:Promise.race([slowUpload(), timeoutAfter1Second()]
I've seen people expecting Promise.race to somehow "stop" the upload after the timeout.
Yet that's also not how promises work but at least it seems more sensible (even if wrong).
15:20
I recall when I first learned about promises, I didn't really find them too complicated.
Taking some JS courses through pluralsight and an advanced JS course after those.

Say I wanted to learn another scripting language aswell, would you guys recommend PHP or Python?
tbh I think promises are harder to understand if you come from any other language
@JBis To be honest, they shouldn't be. People seem to overcomplicate them a lot.
Promises aren't in a second thread but at first they seem like they are
@bigchungus Would not suggest PHP there is no benefit in learning it
@JBis sort of but there are similar structures elsewhere. C# has Task which is in many ways directly relatable. Especially when you start using async/await - the usage is nearly identical then. You basically always want to await any Task. In Java you have Future which is maybe slightly more different (especially since there is no await mechanic) but otherwise comparable.
15:23
Not just because it's a shitty language but because there is like nothing you get from PHP that useful to know outside of PHP
What do you think about Python?
Pretty good language.
I'd suggest Python if you are just looking to do machine learning, math shit, or just quick scripts.
Gotcha
Otherwise I'd suggest a compiled language like Go, Rust, C, C++ (in order of complexity).
15:25
Just trying to forecast my plan of action. Before I get to that I am going to take the JS/Advanced JS courses then begin to touch on React and Angular
I've not really gone more than the basics of Python but I can read it fine because it makes sense. Pretty useful for data manipulation. Not sure how it scales for bigger apps, though.
Instagram backend is mostly python iirc
Go is used a lot for web
Also thinking about C# as thats how SharePoint was developed and since I am working with that might as well take a swing at it.
Ill have to look into Go, never heard of it
C# is very enterprisey iirc, but probably worth learning
Go have a look at it. Ha!
15:27
I see what you did there
@JBis I suppose. Java feels more enterprisey but overall both are in the same category for me.
Java is just shittier C# from what I have heard
If you want that area, I'd suggest Kotlin. Great lang from what I've seen and heard.
When I took business programming 1&2. The class above me used C# and the classes above them as well. When I entered, they switched to Java and kept it at Java not sure why
coldfusion is better
@KevinB more like confusion
XD
15:32
Also I know everything seems tends to carry a weight on level of importance, if you were me or you were to go back and do it again, what would you learn first, Angular or React?
It depends what your goal is
If you want to do frontend end dev then knowing React or Angular will likely be very attractive to many employers
I learn the language my job needs
i don't learn languages for fun
you're old kevin
;)
To me, it seems like a waste of time to learn a language if i'm not going to actively use it
that knowledge will just fade away
or become obsolete
If you're not challenging yourself with it and constantly learning and improving with it, what's the goal,
@bigchungus is in college iirc, so learning new languages would probably be beneficial regardless
15:36
I still think it'd be better to just pick one you may already be familiar with, and get as good at it as you can
keep improving, keep challenging
The things you learn from one language, from the basics all the way to the most advanced, will help you with any other language you end up needing to work with
Also, employers are quite accepting of people who aren't familiar with "their" language. Not all of them but many will accommodate you if you have decent experience otherwise.
though, tbf, i did pick a second language to dive deep into that wasn't 100% necessary to do so as far as i did, and did benefit from it
Graduated actually, been using JavaScript (with some jQuery) at my Job, but that's about it. My level of confidence in my JS skills is not where I want it to be thats why I am going to take these training courses to sharpen them
Well if it means anything @bigchungus, I consider myself pretty advanced with JS and web dev. I've been attempting a bunch of different languages (including C# with Unity, C++, Rust, and Go) and have found it hard to stick with any. Right now I am trying to stick with Rust and Go but it's difficult.
I have heard of Rust
15:41
(that second language was javascript)
I know
but all I have been using is vanilla JS Ive only really dabbled in jQuery. But from this chat and webdev forums I follow. jQuery seems to get bashed on
i learned the most in javascript when i was working with jquery
what i did was instead of just using jquery, i learned how it worked internally, what it did, how it did it, learned the sourcecode behind it, etc
got into plugins, all of it
I will note, to Kevin's credit, part of the reason I think i found it hard to stick with C# and C++ was because I had no use for them. JS I was practicing every day because I was building websites and web apps and apis. C++ I legit had nothing I wanted to build. C# with Unity there were too many other skills I needed (3d modeling, physics understanding, etc.). Rust and Go I am learning for cryptography so at least I have a goal.
15:44
The most JS I learned was when I worked with Knockout. I knew jQuery beforehand but Knockout really put the screws to me.
You can say it...knocked me out. Ha!
i dabbled with knockout, but never had a project that needed it
Yeah, the library is decent but the way bindings work is that you write some JS in the HTML. And it can quickly become really complex. And error in the binding can cascade. Worse yet, it did so silently.
So, I had to pay real good attention about what any piece of code did.
I will look into Knockout as well.
I worked on a c++ project once
didn't seem too difficult
the errors were incredibly useful
java as well
almost always good stack traces
Writing C++ isn't hard, writing good C++ is hard
But i guess thats with any language
I guess you just learn by experience?
15:48
So Knockout uses a MVVM? What differentiates that from a MVC
I do
I learn by doing, reading books/watching guides doesn't do it for me
I wouldn't recomment Knockout. It's not that bad but I think Vue.js is much better.
Vue is basically a better designed version of it. With more bells and whistles.
and more up to date it seems?
Much more.
@KevinB but how do you know if what you are doing is right?
15:50
for me, books are mostly a reference. a place where i can pick up terms that will make sense later when i'm working on it
i mean
just because it works doesn't mean its good
doing it right is subjective
KO is fine for small applications. You can dump data into it and format it into something useful very very fast.
But you can also do that with Vue. Or React.
I'm not really concerned with following what someone else i don't know thinks is the best way to do something
Everyone learns in different ways so it is subjective in a way
15:51
@KevinB i am :)
I approach it more... like an art
I figure they know more than me so they are probably doing it a better way
which is probably partly to blame on the fact that i've worked solo for my entire career
with the exception of 1-2 years where we had a second dev
but we never worked on the same projects
Ohwell, now i gotta go play in livecode
i inherited an ios app
Even though I have used them before taking another course on Promises and Async, they still confuse me just a bit and it bugs me
its just like how do you know you are doing it wrong without someone telling you
15:54
by making mistakes
but it still may work
i mean
if it works, and never fails,
was it a mistake?
console.log
if it fails, now you have a learning opportunity
so not only do you learn the proper way to do it, but you learn why
code can still work but be terrible quality code
15:56
but, li ke, that's still not really relevant
unless it actually causes a real world problem
in which case you learn from it, :p
If another dev comes along and can't figure out what's going on with the code because i didn't follow best practices, that too is a place to learn, look at how and why you did something some way, and compare it to the "best" practice. What thought process brought you there, and in what ways is the "best" practice better?
just following the best practice without understanding why seems dangerous to me
@KevinB but how can you ever know the best practice without someone telling you
@KevinB agreed
by participating in places like this
helping others, interacting with other people's code
thats how i learned with js
i just irrationally find it frustrating not immediately knowing the right way to do things when learning a new langauge
i learned the basics and worked on my own stuff mostly in a vacuum, but that doesn't mean I didn't also see how others approached similar problems, -> chat.stackoverflow.com/transcript/message/51699789#51699789
16:01
Until it stops running, and keeps burning
but that also kinda... reminds me of another aspect of JS that only started recently, that i despise....
@VLAZ lol nice
while i like async/await, and what it's brought to the language, I also really hate the fact that it completely turned the way we talk about asynchronous logic on it's head
we can't say "you can't return from an asynchronous callback" anymore
because it's ambiguous
example?
Yeah, I get it. "Async code" might mean async function or a function that does something asynchronously but it doesn't return a promise.
16:03
like an old XMLHttpRequest callback
setTimeout is asynchronous.
but fetch also is.
people used to try to return from that all the time, even still do today
it's what we called an asynchronous callback, because it does what it does in the future
as opposed to a forEach callback
@KevinB what did they try to get out of returning?
the result
it doesn't work as you know
weird
16:05
but now the whole conversation about that is muddled by async/await existing
because async/await doesn't actually solve that problem, it's simply syntactic sugar over promises
usually you don't use async/await with callbacks
usually it's used to eliminate them
the same way promises were used to eliminate callback hell
it simplifies the long .then chains that promises introduced
essentially, we have 3 layers, each solving the previous's problems
but all 3 still exist, because this is javascript and we don't remove old functionality
yeah, i guess i just haven't really encountered the returning from an async call
5848
Q: How do I return the response from an asynchronous call?

Felix KlingI have a function foo which makes an asynchronous request. How can I return the response/result from foo? I tried returning the value from the callback, as well as assigning the result to a local variable inside the function and returning that one, but none of those ways actually return the respo...

^ that
ahh
16:11
Bookmark it :D One of my most used dupe targets :D
so now... it's relatively common for someone to run into this problem, and the solution be "Here, use async/await" and not at all covering how we got there
which... is fine for a little while
but if you don't know why you're doing it, when it doesn't work you're lost
sure but that's abstraction
it works until it doesnt and when it doesn't you need to learn what the abstraction is doing to understand why it doesn't work
A counter example IMO would be classes
vs prototype
at this point... learning all the ins and outs of working with the prototype directly is more likely to lead to someone writing bad code than being better at writing good code
learning what an abstraction does doesn't negate it's usefulness
135 messages to read ... yeah GL
16:16
lol
tldr i hate best practices
"best" practices are subjective
lol
;)
It annoys the hell out of me any time someone asks for them
like there's some library out there with the best ways to do any given thing
an api can return 200 Ok for errors and still have a perfectly working application
fetch
16:19
so is returning proper errors "best practice"? if so, does it matter?
returns a resolved promise even for application errors
so why should i return the proper status code?
unlike jquery, which did the opposite
i still don't quite agree with how fetch handled that. like, I get why, but, the opposite would have been more... in-line with how applications use HTTP requests.
16:50
@JBis you are mixing communication (connection - http) errors with application errors
it depends of the error though. Let's say you have an endpoint that expects id parameter
why output errors at all?
2
we should outlaw errors
in a working application there shouldn't be any errors
1. id not provided: communication error (403)
2. id provided but not valid: application error - respond with error
3. id provided and is valid: respond view
forgot 0: endpoint is ded -> 404
@KevinB "WANTED: Error - 1000$ - DEAD OR ALIVE"
my point is arguably errors is a best practice thing
16:55
sometimes I hate containers.
if that app works, anything better is best practice
a container won't spin up "because other does not exist" but it is there you damn thing
function foo(x, y){
   x = x + 5 // overwriting argument, considered bad practice but it still works
}
why is it bad
predictability/readability for other developers and future you
someMethod(){
   var that = this; // no need, just use arrow function, var instead of const/let
   element.onclick = function(){ // addEventListener better
      that.foo = "true"; // use true, not "true"
   }
}
@KevinB well its not an issue now and likely won't be in most situations
all those comments are best practices
16:59
sure
eh comments
I just cleared a comment that was like
> this one should not be possible ... let's leave the building and pretend nothing has happened
it was with
there's a few //dumbass comments throughout ours
and a whole lot of commented out code because it wasn't in version control until a few years ago
if (isSomeStatus) {
  some_logic
} else if (notThisOne) {
  log.error("this one should not be possible ... let's leave the building and pretend nothing has happened")
  redirect_to_error
} else {
  redirect_to_error
}
a lot of .old files
@KevinB do you agree all those things are worth correcting?
17:02
heh, my old manager actually printed every line of code for our intranet system years ago
yes, ofc
had an old colleague with a habit to have a copy of a .js file and rename it with .original extension
put it all in a binder, it was enormous
@KevinB lmao, then fax it to deploy?
the goal was to find all the sql injection vulnerabilities
that explained the extension being in .gitignore I was just questioning that
17:03
like
iunno
maybe use search
lol
@KevinB how is anyone to learn those things without interacting with devs?
having other developers tell them they're mistakes
several of those you will run into on your own
with time
aaaah container spins
so experience and interacting with other devs
and ... I did nothing special. Only restarted it
:X
17:05
var that = this; for example is a solution you would generally find by looking at someone else's code
number 1 solution of IT
it's an old way of controlling this prior to arrow functions, you'll see it all over the place in old code
i think that is the hardest part about learning a language
Just interacting with other devs isn't always enough to learn these new things
coming from another language, you can learn the syntax and the basic ideas in a couple weeks
17:07
reading a book isn't going to teach it unless it's a recent book
but learning best practices and conventions (and why) take a very long time
ok ... I am a failure. Container is there but is not there. All attempts to make a connection to that leads to 404.
that's for tomorrow then ... bb
side note, error handling in general is such a pain the ass in like every langauge
hehe
17:45
Hi @JBis
Finally, I could solve my problem
but I have a new problem
don't we all ;)
The solution for previous problem is (with Thanks from you):
<VirtualHost seller.example.com:80>
    ServerName seller.example.com
    ServerAdmin [email protected]

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / localhost:3000
</VirtualHost>
@MRS1367 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.
But I have a new problem
I have two Nuxt.js
One for Sellers and One for Buyers
1. Don't use port 3000. It is associated with development and will be confusing.
2. Start one on one port and the other on the other port
3. Proxy pass within the proper virtual host for the proper instance
17:49
I could port them correctly
One on 3000 and another on 3001 port
But the problem is as follows:
i still don't like using port 3000 on prod
;)
I ported the Buyer Nuxt.js app to a subdomain on Apache in Ubuntu with following lines in a file with a name such as example.com.conf in /etc/apache2/sites-available/ path:
<VirtualHost example.com:80>
    ServerName example.com
    ServerAdmin [email protected]

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / localhost:3000
</VirtualHost>
And now I want the address (example.com) to be redirected to www.example.com address
I've looked at many solutions on the Internet, but they all cause problems
For example:
Redirect permanent / example.com
OR
ServerAlias or somehting like that
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ %{HTTP_HOST}/$1 [R=301,L]
@JBis I don't need Redirect Rule?!
if you want it to redriect you do
this is why apache is such a pain
17:53
But always face with ERRORS such as this for Redirect:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
So I'll try ServerAlias
I hope it solves my problem
for the record, here's how you would do it in nginx
Thanks @JBis
server {
  listen 80;
  server_name www.joshbrown.info joshbrown.info;
  return 301 joshbrown.info$request_uri;
}
@MRS1367 server alias with alias the site so it will be accessible on www and non www, if you want a redirect its more complicated
Thank you @JBis
<VirtualHost example.com:80>
    ServerName example.com
    ServerAlias www.example.com
    ServerAdmin [email protected]

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / localhost:3000
</VirtualHost>
Is this true?
go for it
18:03
I tested it
But I face with the problem I mentioned above again
I restarted Apache and two of my projects face with that error :(
are you getting the error on example.com and www.example.com?
on seller.example.com
and example.com
And now I get prev error that I mentioned yesterday:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request
and if you remove ServerAlias?
Are the settings apply with delay?
for changes to take effect you must restart apache
18:06
@JBis The problem still exist
@JBis I restarted it and the other one project (Seller) now face with the same error :(
whats your entire configuration?
use a gist don't paste here
11 mins ago, by MRS1367
<VirtualHost example.com:80>
    ServerName example.com
    ServerAlias www.example.com
    ServerAdmin [email protected]

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / http://localhost:3000/
</VirtualHost>
entire config for all vhosts
And
21 mins ago, by MRS1367
<VirtualHost seller.example.com:80>
    ServerName seller.example.com
    ServerAdmin [email protected]

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / http://localhost:3000/
</VirtualHost>
for Apache?
on the server curl http://localhost:3000
18:09
one of them on Port 3001
@JBis OK
curl doesn't show anything...
Two projects are running
204
A: How to debug an apache virtual host configuration?

sqrenSyntax check To check configuration files for syntax errors: # Red Hat-based (Fedora, CentOS) and OSX httpd -t # Debian-based (Ubuntu) apache2ctl -t # MacOS apachectl -t List virtual hosts To list all virtual hosts, and their locations: # Red Hat-based (Fedora, CentOS) and OSX httpd -S # Debi...

if curl doesn't show anything then it's not working
@makadev Thanks
@JBis But the projects with above mentioned configuration were running before
@MRS1367 well if curl can't reach it and apache is saying it can't reach it then it's not reachable
So...
18:16
> The proxy server received an invalid response from an upstream server.
What I must do?
figure out why its not running
I'm trying to figure out if I can...
@makadev ->
sudo apache2ctl -t
Syntax OK
check apache2ctl -S for your vhost "frontend", it should show in which order and for which IP which entry matches, of course there is no info about the proxy
I tried it
curl -I localhost:3001
curl: (52) Empty reply from server
VirtualHost configuration:
000.000.000.00:80      is a NameVirtualHost
         default server example.com (/etc/apache2/sites-enabled/example.com.conf:1)
         port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.conf:1)
                 alias www.example.com
         port 80 namevhost seller.example.com (/etc/apache2/sites-enabled/seller.example.com.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
18:22
the config isn't the issue i don't think
see what that says
ye, not for the proxy.. the vhost dump looks fine btw
* Rebuilt URL to: localhost:3001
*   Trying ::1...
* TCP_NODELAY set
* connect to ::1 port 3001 failed: Connection refused
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 3001 (#0)
> GET / HTTP/1.1
> Host: localhost:3001
> User-Agent: curl/7.58.0
> Accept: */*
I changed the configurations yesterday
and when I check the server this morning
The projects worked correctly without any problems
but when I checked them yesterday after changing the configurations
@MRS1367 you aren't getting a vaid HTTP response from your server
and restarting the Apache
what port is apache running on?
18:25
They always show me errors
This isn't an apache issue
@JBis Wait
Your node servers are not returning anything
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
apache should be on 80/443
18:26
Yes
> Your node servers are not returning anything
It's running on that ports
solve that
OK
But they are running
and when I remove these configurations
I can access them with ports
sudo netstat -lpn |grep :'3000'
tcp        0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN      2971/node
sudo netstat -lpn |grep :'3001'
tcp        0      0 0.0.0.0:3001            0.0.0.0:*               LISTEN      2970/node
@MRS1367 turn off apache
and curl http://localhost:3001 still nothing, apache isn't breaking it
18:31
Wait
@MRS1367 yes, node is listening on the port but node isn't responding
So, why?! :(
Why they are working with ports
but don't work with subdomains
?
@MRS1367 they aren't
if curl isn't returning anything then your node webserver isn't returning anything that is your issue
So,
What I must do...
figure out why node isn't returning anything
18:34
Thanks for helping to find the problem exactly
@JBis
np
@makadev
and
I try again and if I could solve the problem
I'll share it with all in here
Thanks again friends
 
2 hours later…
20:13
If I need .row>.col-md-4 in booktstrap and want it to be located on the right, do I need to ad an empty col-md-8 on the left
20:32
posted on March 02, 2021 by Prudhvikumar Bommana

The Chrome team is delighted to announce the promotion of Chrome 89 to the stable channel for Windows, Mac and Linux. This will roll out over the coming days/weeks. Chrome 89.0.4389.72 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 deliv

00:00 - 21:0023:00 - 00:00

« first day (3790 days earlier)      last day (1383 days later) »