« first day (2862 days earlier)      last day (2085 days later) » 

2:16 PM
@PrabirChoudhury Please make a stackblitz
Then I can take a look np
 
@Maartenw can I use the data there also, which I am using for binding?
 
I have a store that I've mostly been using outside the scope of my webpack project, but now I want to be able to import it in my webpack project. I've gotten the imports working but it's not importing the same store object
So my store.subscribe inside of angularJS isn't firing when a store.dispatch happens in my webcomponents
 
Yes have a look at stackblitz.io @PrabirChoudhury
 
did one Maarten,
https://angular-grk32d.stackblitz.io

onbly I couldn't link my data json to the select list binding. can you take a look? @Maartenw
 
you need to fork it
this one gives me the default
 
2:29 PM
how do i fork it,
 
upload it to a github and fork it
 
i don't have github account Maarten,
 
then I'm afraid I don't know :s I don't use stackblitz a lot
 
you told me, so I created the issue on there; I don't know much about stackblitz either!
 
@PrabirChoudhury you must give link to the editor
 
2:32 PM
https://stackblitz.com/edit/angular-dntfvm

I think this should work!!
 
Hello, I made public a scraping script that could help guys that schedule videos on youtube to get that information on a calendar github.com/jy95/YTscheduledVideos2Ical : Any feedback would be appreciated :)
 
opens in edit mode, doesn't it @Maartenw,

..
https://stackblitz.com/edit/angular-dntfvm
@Vap0r --- this is the one:
https://stackblitz.com/edit/angular-dntfvm
 
If I use native imports, and then I use whatever webpack transforms imports into side-by-side, will it still give me the functionality where importing an object in multiple files will only return one instance?
 
should. my stores all work
 
Are they cross solution though?
 
2:44 PM
wtf is cross solution?
 
Like say I use import in a regular JS file, no transpilation, right?
Then I use it in the webpack area of my project
 
no I compile my stuff
 
Ahhh gotcha
 
I'm using things I need to pass into babel
 
Yeah then this situation is a little different
I should probably just set up compilation for everything
 
2:45 PM
1 message moved to Trash can
 
user1596138
are you asking if you can export/import instances
 
No, I am currently doing that.
 
@PrabirChoudhury your link is visible above. if I was interested I would have already looked.
 
user1596138
I
 
@LadyBird say I'm using import in a non-transpiled area of my app. Then I use import in an area covered by webpack (which does something to my imports, not sure if it's requireJS or what)
 
2:46 PM
thanks for clarifying, @rlemon
 
user1596138
Oh. I have no idea
 
Yeah, it's a weird use-case that probably doesn't come up much yet because everyone is still compiling
Which, to be honest, I should probably be doing
 
user1596138
I don't think we will be stopping.
 
user1596138
People like to say they can just remove compile and remove babel someday
 
user1596138
They're wrong in most cases.
 
2:48 PM
I would be happy to if we had good native import support in evergreen browsers
 
if class properties and decorators and import/export worked on node and all clients, I wouldn't need babel.
 
user1596138
Right but in most cases it won't be as simple as publishing /src instead of doing a compile step lol
 
user1596138
Tat's all I mean. It's not like "Oh we got good support, turn off webpack"
 
@rlemon good point on the class properties, I've been programming constructor this.var stuff in the meantime
@LadyBird oh absolutely
 
user1596138
You'd be surprised how many people think that lol
 
2:50 PM
Once again, you have to fork it
your stackblitz is empty
 
this is the edirt lint -- https://stackblitz.com/edit/angular-dntfvm

@Maartenw
 
Once again, you have to fork it
your stackblitz is empty
I better write a for loop for this...
 
clicking the link doesn't open the stackblitz in edit mode?
that's the editor url I shared,
 
user1596138
@Maartenw Why repeat yourself when you're wrong
 
user1596138
His stackblitz is NOT empty.
 
user1596138
Maybe it's not what he wants, but it's not empty and we have a "don't be a dick" rule ;P
 
I know we do
 
user1596138
@Maartenw YEah that's just you. I get the correct blitz
 
I'm not trying to be a dick
Can you show me your output?
 
user1596138
2:56 PM
 
user1596138
Idk why yours is empty but it's not his fault
 
click the app folder, and you will find more files there also.
 
In incognito it works
probably a caching error
I'll take a look
 
refresh clear cache or something, @Maartenw
then click it,
yeah,
 
Oh
I don't understand why you're iterating over your objects like that
 
3:00 PM
?
 
1 message moved to Trash can
@Maartenw Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
you can do it way easier with the *ngFor parameter
then read out the object property and save it in a variable
 
yes I am qyuite confused over it.
 
3:01 PM
can you make that stackblitz a working one, with the data.json i provided.
 
Check those 2 out
 
so I can follow up
@Maartenw
 
Well I have a meeting to attend, but those 2 links should get you on your track
you're overcomplicating things by manually iterating over the array
that's what the *ngFor is for
 
"Data fetching in Redux apps — a 100% correct approach" blog.logrocket.com/…
 
okk...

and basically what do I send as arg for the (change) function. the $event
or the $event.target.value...

which one?
@Maartenw
 
3:03 PM
So instead of manually setting your this.payments[i].Id == pay_Id) {
just bind it to {{p.id}}
you're already doing it with the ptypename
 
well so why does this help with this : upon select change, I want to get the id(value) as well as the selected text.... my code isn't working... I am only getting the id but not the name/text ...
Angular automatically updates the value
 
bind like,
<option [value]="p.id" .....
?
 
instead of manually retrieving it like you do in your component.ts
Read the angular.io directive for ngFor I have provided to you
And the tutorial
it should explain it better then I can
 
okk,
@Maartenw
 
3:06 PM
I have to go now, but let me know if you managed to solve it (after reading those, and googleing more about the *ngFor)
if you still haven't found it and I've time I'll help out
 
sure I will,
let me try it some more; I'll update you with my progress/lack of it... @Maartenw
 
morning
 
3:24 PM
Trying to concat two arrays in my vue sfc. One is a default array defined in the data object another is an array returned by a function. For some reason I only get the default array back after concat? Could it be doing concatenation before the function call is done?
this.ports = (this.$serial.getPorts().concat(this.ports));
 
no
well, unless it's async and returns a promise
but that would error
 
hmm ill try logging each one out individually then logging the concat
ok each one logs, but the concat doesn't contain both the array elements
the prototype for the return is Array(0) and for the default is Array.
could that be it?
 
no, that's how arrays are
 
hmm ok
 
what is $serial.getPorts() ?
 
3:33 PM
function getPorts() {
    let portlist = [];
    SerialPort.list((err, ports) => {
        ports.forEach(port => {
            portlist.push(port.comName)
        });
    })
    return portlist;
}
 
pretty sure SerialPort.list is async
and by pretty sure, I'm positive.
you're returning an empty list every time
 
ahh ok
(static) list() → {Promise}
Retrieves a list of available serial ports with metadata. The comName must be guaranteed, and all other fields should be undefined if unavailable. The comName is either the path or an identifier (eg COM1) used to open the serialport.

Source:
serialport/lib/bindings/base.js, line 29
Returns:
resolves to an array of port info objects.

Type Promise
You are right @rlemon
 
yea I use the serialport library
async function getPorts() {
	const ports = await SerialPort.list();
	return ports.map(port => port.comName);
}

async function whateverYouAreDoing() {
	this.ports = ( await getPorts() ).concat(this.ports);
}
you can do something like this
 
ok got it thanks.
 
but this will double up ports if you list it twice
use a Set and you get automagic dupe handling
 
3:40 PM
ok cool, my defaults are actually ports on /dev/pty and /dev/pts since i am also emulating the serial device.
 
4:07 PM
For SPA application in vuejs, should I load a data variable "authenticated" and use that to let me router if to show login page?
Is that right to do
Or make it go to login page server-sided automatically on request
 
If it's a true SPA then login will be handled within that SPA as well so you don't redirect etc on the server
 
ty
 
4:28 PM
Hello !
good afternoon
How are you ?
 
@ex080 that's one way of doing it
 
hello, just publicizing my npm package npmjs.com/package/scroll-utility, any suggestions please let me know :)
 
@forresthopkinsa Yeah I just installed vuex and created a store. Assigned the store as a instance property. So now this.$store gives me access to a central source of truth from any component
 
that's a good plan
 
that moment when you forget the this.
 
user1596138
4:43 PM
huh
 
@ThiefMaster I still like the server returning a redirect in the case someone comes by with JS disabled
Just because I like browsing with JS disabled on occasion :D
It doesn't cost me anything
 
4:56 PM
@MadaraUchiha if it's a SPA then nothing will likely work with JS disabled hahaha
so being able to login wouldn't be very useful lol
 
so what is everyone else working on today
 
vue project
 
it's a release day at work
 
@forresthopkinsa ah the fabled friday releases
 
yeah smh
 
5:02 PM
is it fun?
 
I hate naming, is hardest part of programming
 
no its not
try doing something thats not documented on Stackoverflow.
Naming just needs a dictionary and common sense :P
@TravisWhite this might come in handy - blog.elpassion.com/…
 
Thanks for the literature, reading it now.
 
5:17 PM
@ShrekOverflow naming a class DistancePresenter already shows some deep problems
I like kevlin henney's philosophy on this. Look up almost any of this talks
 
I am getting a response that looks like the following:

res = 'callback({"status":true,"customer":"Skrab ... and so on"})

However I am having some trouble accessing the values.
'res.status' does not work. Is there a special way of accessing it?
The response header says it's of type: "application/json"
 
That's jsonp
 
@towc I linked him that as a starting point, I have watched his talks
 
Read up on it
 
but I have my own opinions, I personally read my code 3 days just to make sure naming makes sense.
Hey benji
 
5:27 PM
Hi
How was independence day? Did anything fun?
 
Flew back 😛
coming out of the flight gave a new perspective given the day
 
if i used fetch in my vuejs app, will this work in IE11 ?
 
Ofcourse not
Fetch is like bleeding edge new even now
 
so this doesn't get transpiled, right?
 
@JoeSaad you might want to look at the github polyfill for it, but I don't think even that will make it work
fetch is an API, you can't transpile an API, you shim or polyfill it
 
5:30 PM
Does anyone know how to test functionality around the window.performance object in jest? I have a class that uses it under the hood and I'm trying to write some tests for it, but it seems that the performance object exposed by JSDOM is an empty object
 
@ROODAY what methods are you using?
 
@ShrekOverflow thank you very much
 
How have you been doing Benji ?
 
@BenjaminGruenbaum window.performance.mark and window.performance.getEntries(). The class im testing uses mark, and it doesnt seem to throw an error, but the getEntries says its not a function, and when I log the performance object i get "{}"
 
user1596138
 
user1596138
5:33 PM
TIL Runescape still exists and they have artists from Overwatch/Disney or something
 
@ROODAY probably you'd have to include a polyfill
 
is any of you using a 4K 32" monitor with your laptop screen, if so in two rectangles can you share your layout ?
 
Do you have any links I could follow for that? I tried searching for using performance in jest for a while now and all I found were old issues about JSDOM not supporting it in the first place
 
Thanks, I'll try those out!
 
5:49 PM
At my work we use angularJS and angular. angularJS is built via webpack, angular is built via angular-cli. I have a store which is an object that I want to share the same instance of between these via import. How should I achieve this?
 
hmm
 
user1596138
Export it from one module and import it from the other lol
 
user1596138
@Vap0r are you trying to import it from the webpack side, or the non-webpack side now?
 
user1596138
If you need the non-webpack to be imported to webpack, I'd use externals or if the projects are in the same folder I'd use alias
 
user1596138
If it's the other way around you can make your bundle export the module, then import {x} from your bundle
 
user1596138
5:58 PM
If you instantiate before you export you will be importing the same instance from both.
 
user1596138
export new Class()
 
@LadyBird the problem with that is both bundles use different instances of requireJS, so they don't use the same instance when they import
 
user1596138
Might need more context...
 
user1596138
You'll have to do the import at run-time, not during compile if you're importing the non-bundled instance inside your bundle.
 
the way import normally works is if I have two files importing the same object the second import receives the same instance as the first.
This is works correctly in browsers which support native imports (basically chrome)
 
user1596138
6:02 PM
Right, the first time something is imported the script is executed
 
user1596138
Not the following times
 
This also works correctly with requireJS because it keeps a log of the imported files and objects
but the problem is that the bundle for webpack and bundle for angular-cli EACH have their own instance of requireJS, and so... two different logs
 
user1596138
What you need to do is expose an instance somewhere for the other bundle to find. They can't both actually import the same file
 
user1596138
One needs to import the file and then expose that
 
expose how?
 
user1596138
6:04 PM
So for example
 
user1596138
Project A in App.js
import X from 'myStoreInstance';
export {X};
 
user1596138
Project B (which isn't compiled?) does import {X} from ProjectABundle
 
user1596138
Idk, there are a few ways to do it but you can't have both import it the way you want
 
Oh I see. That probably won't work :(
Going to just attach it to window under a company-name namespace
 
user1596138
You could also have one project attach it to window and then define it as an external in webpack config
 
user1596138
6:06 PM
Yea
 
Not great, but neither is our software stack lol
 
user1596138
you could compile the store as it's own bundle.
 
user1596138
Then import the same bundle from both other ones
 
user1596138
Sounds annoying af tho lol
 
user1596138
Not annoying but... A whole extra bundle to include
 
6:10 PM
Yeah but then I might run back into the issue of bundle B and C using different requireJS instances, and so when they require the file they require two separate instances
 
6:47 PM
I cant figure out why this.$store is undefined in my vue project.
nvm
 
I am considering implementing redux in my current react project, is there any downsides I need to know of?
 
@kristian 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.
 
7:11 PM
@kristian why do you want to implement redux?
 
@Vap0r lifting the state passing props and callbacks have gotten to the point where it's feels overly complex
 
 
@kristian then that's a good reason. And sure there are downsides
 
@Vap0r yeah that's why I am asking, I don't want to regret it 2 months down the road ;)
 
How can you avoid the "Mixed Content" error when passing data to a php file via an ajax call? I used this notation: "./folder/file.php", I also tried with "https://www.websitename.it/folder/file.php" but it does not change anything
 
7:25 PM
@th3g3ntl3man 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.
 
Anyone experienced in VBA here? Can't find a VBA room
 
@Tmacjoshua 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.
 
35
Q: "Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

StormRageI've a form which I'm submitting (through GET as it is required this way) to a crm (ViciDial). I can successfully submit the form however if I do that the processing file at crm will just echo a success text and that's it. Instead of that text, I want to display a thank-you page on my website, s...

 
> is any of you using a 4K 32" monitor with your laptop screen, if so in two rectangles can you share your layout ?
cc @Luggage @Loktar and @rlemon (it'd be nice to see what display setups you are using regardless)
 
lodash is so helpful
 
user1596138
7:39 PM
@ShrekOverflow I doubt anyone is running a 4K 32", there's no point. You'll just use heavy scaling :P
 
Not on a Mac :P
 
user1596138
You'll either scale or you won't use it without a magnifying glass ;P
 
user1596138
Mac just scales
 
oh you mean that scaling.
I thought you mean the crazy notion of zooming in being confused with scaling.
 
user1596138
Yeah I mean in the end you'll run equivalent to 1440
 
user1596138
7:41 PM
Which is just useable with no scaling at 27+"
 
@LadyBird Makes sense, but well lets replace 4k with just a 32" monitor then
 
user1596138
I run a 27
 
user1596138
ANd my laptop drives it
 
do you use them side by side ?
 
user1596138
I use my laptop as my left monitor, 1440/27" in the center and a old one on the right
 
user1596138
7:42 PM
Yes.
 
How do I tell babel not to transform async/await statements?
 
user1596138
I have a Rog GL551
 
Also related: how do I tell babel not to transform import statements?
 
@LadyBird oh neat, mind sharing a picture?
I ended up with 32" besides my MBP 15"
Even at 4K the macs display looks crispier 😬 meh darn it pixel density.
 
user1596138
 
user1596138
7:43 PM
Kind of a crappy pic
 
user1596138
That's the day I got the center one. Only a week into my home office
 
user1596138
Of course my laptop is only 1080
 
user1596138
But they look the same to your eye. 15.6"@1080 looks just like 27"@1440
 
Which is the best resolution for 13" - 15" imo
 
user1596138
7:45 PM
Yeah for sure IMHO too
 
The higher pixel density is a PITA once you are used to it
 
user1596138
I might buy a second one of these monitors
 
I get headaches when switching b/w the two
 
user1596138
I already have more space than I know what to do with tho lol
 
becuase the mac has like 1.7 times the pixel density.
 
user1596138
7:46 PM
Loktar got a massive ultra-wide recently
 
I got a wide monitor too
I don't want to post an image her 😃, any better place ?
oh wait you follow me on FB
 
user1596138
Yea you can send on FB
 
user1596138
Can I just say I have the best mousepad ever up there ^
 
user1596138
Glass desk, used painters tape to create an area that the optical mouse works on :D
 
hahaha
 
user1596138
7:54 PM
Still using it lol
 
my eye is twitching with the new monitor though
I wonder if the birthness is too less or too high
 
omg a vertical monitor
I want one
but too poor
 
user1596138
8:10 PM
That thing isn't even full HD and is from like 2009
 
user1596138
It does run at some insane refresh rates for the age tho.
 
I can put a Veritical display too
but I am happy with the screen real estate I have atm
its a bit too much xD
 
If I have a data stream which can contain numbers or strings but has been JSON.serialized. On my listener should I JSON.parse and then pick out stuff using regex or by typeOf?
@ShrekOverflow how many monitors is too many?
 
1 32" and 1 15.4" MBP
 
@LadyBird what is a lady bird? Is it a name or a nickname?
like lady bird johnson
 
user1596138
8:15 PM
It's Hank Hill's dog.
 
user1596138
So many people ask this...
 
user1596138
Watch king of the hill ffs
 
is it good?
 
Coccinellidae () is a widespread family of small beetles ranging in size from 0.8 to 18 mm (0.03 to 0.71 inches). The family is commonly known as ladybugs in North America, and ladybirds in Britain and other parts of the English-speaking world. Entomologists widely prefer the names ladybird beetles or lady beetles as these insects are not classified as true bugs.The majority of coccinellid species are generally considered useful insects, because many species prey on herbivorous homopterans such as aphids or scale insects, which are agricultural pests. Many coccinellids lay their eggs directly...
 
haha
 
user1596138
8:20 PM
That's a lady bug
 
https://manta.cs.vt.edu/cs3754/Images/CS3754-CloudSD-Poster.png
^ This is a class I can take this semester. Does it look like it'll teach me anything about cloud?
 
is there a webpage that will visually convert your JSON object into a binary tree
 
myParser.on('data', (data)){
  data = json.parse(data)
  //do something with data
}
 
I looked can't find anything
 
Any quicker way of writing that?
 
8:26 PM
@ex080 thanks but I don't mean that
 
oh ok.
 
like this visually.
 
@oboecat Looks like a class which is the opposite of cloud well modern anyway.
 
@oboecat that looks like a class that I would have taken 3 years ago tbh. Now everything is moving towards JavaScript imo. Java is still good if you want a 9 to 5 at a big company maintaining existing stuff.
@ShrekOverflow nice, pretty much what I meant too.
 
:(
 
8:31 PM
now it is technologies not owned by Oracle/NSA
 
The point of cloud should be to reduce the tech lock-in not increase it
 
My college doesn't have almost anything which isn't Java...
 
@oboecat that's why code bootcamps are so popular these days. Many universities are stuck in the 90's/2000's
 
> Netbeans, MySQL as pre-requisites
 
I will admit that Java servers can do well with performance much of the time...
 
8:32 PM
I think they should also mention you must have a shirt with blue collar then
 
@ShrekOverflow lol?
Working for the clampdown?
 
no no maintaining old java
and having to be forced to the level of IDE :|
 
imagine writing java without an ide though
 
@ShrekOverflow to be fair, I would play Clampdown by the Clash everyday all day on loop if I had to do that so....
 
@DavidKamer haha
 
8:35 PM
@ex080 the compiler commands could be turned into bash scripts
@ShrekOverflow well, I would start my morning commute with Mad World so not every second of the day.
"going nowhere, going nowhere"
"the tears are filling up their glasses"
glassfish... lol
 
9:19 PM
Anyone know why adding ...mapGetters({}) to my vue sfc would cause it to crash
 
9:50 PM
why is there a reduceRight but no forEach right?
 
Does anyone in here live in a big city like san francisco/seattle/new york
 
why
 
How much does a beer cost
at a bar
& to answer your question: reduceRight is an analog to foldr in functional languages, but there's no such analog for forEachRight
As for why you'd use foldr instead of foldl'...idk good luck with that one
 
are you old enough to even be drinking at bars
 
Yeah I'm 25
 
9:55 PM
classic Rick
 
how much does a beer cost at a bar around you, do you think it's going to be that much more in a big city?
 
That's what I'm wondering
I think $6 is standard here
 
that sounds about right. I would personaly think that it would probably be cheaper
 
I mean you can get a $2 pbr tall boy
But like it's usually $6 for something a little nicer
 

« first day (2862 days earlier)      last day (2085 days later) »