« first day (2833 days earlier)      last day (2340 days later) » 

00:15
why when i add viewBox="0,0,100,100" to my <line /> does it not start at the top left of the left but more in the middle
given the line's x1,y1 are 0
people aren't going to help you if you don't show code
i mean the problem statement is fully specified i'd had thought but - codepen.io/pen
00:32
when working on a problem most people's first step is to try reproduce it, no matter how well your "problem statement" is specified. Especially if the person asking has a... history of not putting in as much effort as they could to solve the problem themselves
I'd like to be able to believe you when you say that you've fully specified the issue, but you've also just given me a link to a blank codepen so I'm having a hard time being convinced
i've put in a lot of effort i appreciate you're speculation on that
i saved it and sent the link in the address bar i don't routinely send codepen's so i don't know why its blank
hmm looks like adding preserveAspectRatio="none" to the svg did it. i got confused by codepen by not noticing syntax errors and thought i didn't understand the concept but i think its fine.
viewBox="0 0 100 100" preserveAspectRatio="none" should behave basically as a normalized painting canvas, if you will. literally wasted 20 minutes on codepen syntax
00:58
hello, anyone here?
01:16
nope
02:02
@LadyBird the what now ?
02:46
A email-password combo I've used for tons of websites in the past got breached.
Some of my accounts were compromised.
I'm glad I use random, unique passwords for my main accounts.
Or I would've been screwed.
 
4 hours later…
06:25
I am disappointed in you, little pootis
where is the unique mail/password combo per site rule? You behaved like those dumb peasants
06:40
hello sir @KarelG
I have this json values
    ["sched":
[{"id":1,"from":"11:59:00","to":"12:59:00","date":"July 18, 2018"},
{"id":2,"from":"11:59:00","to":"12:59:00","date":"July 25, 2018"}]
But when I'm trying to call it like this, this.something.sched it's undefined
hello sirs and madams
todays I haves codes
@BartekBanachewicz: Launch codes?
@jsonGPPD what is .something?
like this sir
you have a weird json string there tho
06:53
...(response=>{ this.something = response.data }) ...
@Cerbrus I think 00000000
are you using fetch? Then please check fetch API doc to see how to use it correctly
I'm using axios sir
better to not bind something to this
I tried creating like response.data.sched but it's undefined
well been a while when I used it
there is no use for it nowadays tbh
..(response=>{
  const json = JSON.parse(response.data);
  console.log(json); // check  if really json object
}) ...
07:02
Oh I understand sir let me try it
I have this error that says SyntaxError: Unexpected token o in JSON at position 1
what does that mean sir?
@jsonGPPD It means your JSON is invalid
@KarelG sir
Ohh I understand sir @Neil
> you have a weird json string there tho
and this is not a military base. Please drop that "sir" because you use it too often :P
well always
*pats tavo*
I'm creating my json in my backend using C# but I'm not sure why I'm getting the error
07:05
you have luck that your name is not taco
I have the proper data
please display the output of response.data
I put [0] and I can see the values sir
@KarelG well done me
@KarelG yes, sir! err.. uh, I mean..
07:10
well, work from there. It is weird because the string that you have posted before is not valid
@Tavo you ain't a steak 😐
Now my problem is, I can't use [0] on table tr
is it possible like
that?
we do not know what you are doing.
but let' say that
whoever has his or her steak well done should not be allowed to reproduce
[{"id":1,"from":"11:59:00","to":"12:59:00","date":"July 18, 2018"},
{"id":2,"from":"11:59:00","to":"12:59:00","date":"July 25, 2018"}]
@KarelG pff.. newb
07:12
is your array of data
then do
how can I put it on table td sir? @KarelG
you want to add it to a table?
yes sir
there are several steps here.. we're showing you how to access the information. You also need to know how to dynamically add new html tags
once you know both, you should be able to piece them together yourself
but sir do you have an idea how to create a valid json string in C#?
and I have a viewmodel there
07:17
thatArray.forEach(obj => {
  // obj is that {"id":1,"from":"11:59:00","to":"12:59:00","date":"July 18, 2018"}
  // you want id? use obj.id
  // you want from? use obj.from
  const tr = document.createElement('tr');
  // I assume that you want to display all elements from that object, so
  obj.values().forEach(val => {
    const td = document.createElement('td');
    td.textContent =val;
    tr.appendChild(td);
  });
  // put your row tr in table
}
but a better approach is to generate your table at the server and respond with HTML string like <table> ....... </table>
then you can shove it in your document simply by document.getElementById('tableContainer').innerHTML = htmlFromAxios
@jsonGPPD You can try to create it yourself, but I would strongly advise you to use a library for this
if your string contains a " or a ', you may potentially need to escape it
and if it is preceded by a \ character, then you *don't need to escape it,
unless that \ character is preceded by another \ character
In other words, it's complicated.. don't go down that path
Oh thank you sir @KarelG & @Neil
for the advices and tips
got a mail from IMDb with "best of 2018" for movies and tv series
the year is not even finished
...
07:39
@KarelG there's nothing interesting planned for the 2nd part of the year, move along
user6742604
Anyone around who can help me figure out how to structure my import/export of classes/files so they work for both my node js server and in a (up-to-date) browser?
@PascalClaes 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.
so I need to generate some JUnit XML files for my tests
hm hm
07:52
ohai
czesc Kamil
o/
I've been pulled in by WoW recently
there is no comming back
user6742604
o/
user6742604
I require helps! :(
is the WoW community still alive and kicking?
I recall that there was an expansion. Not bad if you know how old that game is
user6742604
07:58
There's a new expansion coming out in a month
I was thinking at Legion. But you are right. Another one
battle for azaroth
I am impressed
@KamilSolecki I'm waiting for WoW Classic personally
user6742604
It's still the most popular MMORPG around
@PascalClaes I don't think it is
if you take the number of active players, that is
user6742604
Name another one that is more popular?
08:00
Yesterday was prepatch day
so many things are currently borked
@PascalClaes you're right
user6742604
WoW is always at the top of twitch with around 10-20k viewers
I'm actually surprised at how big the gap is
but its fun when a maxed out tank gets oneshot during a raid
user6742604
lol
user6742604
08:01
Do any of you actually know JavaScript? :P
user6742604
I still require helps :(
whats the problem?
@PascalClaes we don't, we're just good at googling
@BartekBanachewicz I'm afraid its gonna dissapoint with certain mechanics that were there in classic but were removed (thankfully) in next expansions
but sure, some things were great back then
user6742604
I'm making a game using JavaScript, Node JS and socket.io.
I need a way to structure my files and imports / exports so they work both on my Node JS server and on the clients (up to date) brower
08:04
that is a too broad question
hence I did not paid much attention to it
be more specific please, that could mean million different things
an example would be nice
user6742604
well I can't even get a simple export / import to work in my browser and I have no idea why it won't work
user6742604
0
Q: Why is my import not working in EMCAScript 6 in Chrome 67?

Pascal ClaesI've been researching this for weeks and have spent hours on this the last two days, but I cannot find a proper answer. I've read several times that the latest Chrome versions support ECMAScript 6 and that they support import/export statements. So why is my below script returning an error? Err...

user6742604
08:05
People adviced me to use webpack to compile all of my code, which worked on a small test project.
But someone adviced me not to do that for a large chunk of complicated code
for a game it'd work fine I'd say
games are typically fine with a "loading" bar that you can hide behind
user6742604
I do find it kinda scary to have thousands of lines of code from different files compiled into one file ...
why?
Computers don't find it scary at all
user6742604
Because I don't understand what the compiler does with my code and am afraid it might break something important
that's what the tests are for
and IIRC the "compilation" here is just glueing all the files together, so really not much that could go wrong
08:08
webpack is probably the best thing that happened to web development
user6742604
Is there some sort of import/export syntax that I can use for node js that won't cause my browser to error?
user6742604
browser will only have the files with export and I'll just add the scripts manually
probably at least 5
user6742604
I'm a PHP dev ... So don't really know any of this shit :(
I wouldn't say that aloud like you're bragging
user6742604
08:10
I'm just saying I'm new to JavaScript and find it very confusing
user6742604
I love the asynch part, but hate it at the same time
it's confusing because there have been numerous attempts at fixing the situation
and realistically "glueing all files together" is the strategy that's simplest and most reliable
and for a game will work well enough
user6742604
so how would I go about finding a solution for this?
I've literally tried every single import/export example I could find on the web
user6742604
and none of them work in Chrome 67
6 mins ago, by Pascal Claes
People adviced me to use webpack to compile all of my code, which worked on a small test project.
But someone adviced me not to do that for a large chunk of complicated code
try using webpack for your entire codebase and see how it works out
the build can always be adjusted later
user6742604
08:12
my codebase is still pretty small atm
and you should be using TypeScript anyway
user6742604
I'm looking for a good long-term solution
user6742604
would typescript solve this?
is the good term solution
08:12
you can use the export import syntax from client side but that is not widely supported
@PascalClaes it would certainly solve some of the issues, not sure about build for web specifically
user6742604
I've been looking into typescript, but can't really find a good use case to start using it
tbf you rarely need it on client side
@PascalClaes it's literally every time you want to write anything in JS
TS has nothing to do with your issue
08:13
it works flawlessly in node.js
user6742604
all of my JS code works flawlessly in node? :P
user6742604
it's the browser that it's not working in
FYI you need to use <script type="module"> for browser imports
that is because you used probably ES6 stuff that is not supported widely yet
the console should point you at the error
again the module system is rarely needed client side unless you work within a SPA
@KarelG It is 😛 It's in his question
user6742604
08:15
Yeah I've tried that, didn't help
user6742604
Chrome 67 supports 99% of ES6?
user6742604
Can't find any info on it supporting import / export statements, although every topic about ES6 import says it should
You want babel for transpiling if you use ES6 and/or modules
user6742604
I don't want to support older browser versions
^
do not use experimental tech then ...
08:17
Even recent browser versions don't support all the nice things
user6742604
Where does it say this is experimental?
Literally every single article or post about imports states that this should work in recent browser versions
like the object spread operator, or async/await
Chrome supports both of those :P
@PascalClaes you are using dynamic import
user6742604
This question's approved answer has 3500 upvotes, I copy pasted the ES6 example that states it should work in Chrome 61, it does not work:
https://stackoverflow.com/questions/950087/how-do-i-include-a-javascript-file-in-another-javascript-file?rq=1
08:19
yet, ben is correct
you are missing the type attribute
user6742604
I've tried type=module
the answer in that link has the following
> As mentioned at the top of this answer, many developers now use build/transpilation tool(s) like WebPack, Babel, or Gulp in their projects, allowing them to use new syntax and support modules better, combine files, minify, etc.
user6742604
Yes, but that's a workaround, I'd like to understand why this is not working
user6742604
Did they support it in Chrome 61 and have since removed the support for it?
user6742604
Is it not working because I'm on a node.js webserver?
08:21
No it's not a workaround
It's how you should be doing it
We are talking in circles ...
user6742604
You're not answering my question ...
My code should work, everywhere on the internet is stated that it should work
But it doesn't ...
user6742604
I'd like to know why
Because you're obviously doing something wrong
Are you serving your JS with the correct headers?
user6742604
What?
08:23
Exactly
is @PascalClaes' avatar image broken for anyone else?
oh, tracking protection in firefox blocked it since it's loaded straight from facebook.. nvm
it is from fb yes
but i am curious why the tracking protection would block it
I only trust Native American tracking protection
since they have been doing it since long long ago
08:46
@ThiefMaster web is broken
09:03
I just had a thought to add a constructor method to the interface
so that the set of arguments is fixed.
where was my mind
I tried to use this package
great docs
opened in google translate? :P
ok ...
@yuvrajprogrammer 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.
09:18
configOutputFile :: Either Handle FilePath
uegh this is disgusting
that's not what Either is for
maybe is appropriate ...
Maybe<Optional<Either<Tuple<Handle, Nothing>, Tuple<Nothing, FilePath>>>>
eh @Wietlol I once witnessed an optional in an optional
@KarelG not really no. Should be a dedicated type.
I am not sure if that is a bad idea
09:26
I am serious. It was Optional<Optional<SomeClass>> opt
consider a list of optional values
@KarelG You can just join that so
if you then ask for the first element in that list, you get an optional value of its element type
which would be an Optional<Optional<T>>
^
whether a list of optionals makes sense is another topic
well that was the case :P
So I understand it. But it could be better
it was not my priority to fix that so I let it like that
09:37
hi
somebody familiar with react native?
dont get it done to implement Push Notifications with firebase cloud messaging in android. I just want to send a massage with my backend to all users.
I suggest to edit your issue message and fix those grammatical errors. So many
that project seems desolated ... barely response on the issues
ugh
I hacked my test output formatter to print both text and xml
but of course the text got intermixed with the xml in the one produced file
damn
allowing just one result formatter sounds like a silly limitation
so either I get nice stdio output or nice XML output for CI
but not both
 
2 hours later…
11:30
Hi, I wonder why VS Code considers JSX syntax valid by default. I would like to be able to tell VS Code to treat JSX as invalid syntax and warn me. I asked but I think I angered someone...
@Sébastien You can't make valid JSX syntax invalid by choice
Not like there's a "validity" switch somewhere
It's got to be valid JSX syntax in order to be interpretted as jsx
are you using a linter in vscode? eslint?
you might be able to configure a rule there..
@Sébastien Why would you not want to use JSX (assuming you use react)? ;x
> Ideally of course I would like to still allow the JSX syntax for .jsx files.
You can also use the react/jsx-filename-extension rule of eslint-plugin-react to allow JSX only in JSX files
ah, didn't notice the link to his question
11:56
Hello, I just landed a VP engineering position... The company I work for understand I'm not 100% qualified outside my lead developer role and architect of the stack we working with. My role will now also include mentoring new developers to follow the same pattern through out the stack. My team will be about 10 ppl. I never managed a team before. Anything I should think of or maybe read that you can suggest?

I set up a docker swarm and a deploy system through jenkins with proper tests, coverage and code smell checks through sonarqube to keep track of the code quality so far. Apart from this
TIL firefox uses a different source for displaying satellite images in google maps
in chrome, it uses image data from TerraMetrics
firefox uses from DigitalGlobe
12:30
how completely satisfying
Just got to the end of a war where one development team was trying to test my new changes and they didn't work
Turns out, they wanted something which wasn't written in the specifications. My boss just officially drew a line in the sand that this was not something that was promised (aside from being rather long-winded to fix on our side)
I'm not the general, just a soldier, but what they were asking was fairly off-center
Like they expected authentication to be done in a completely different way than what is done with all our other services
12:44
@superhero Is the company small enough that you're still directly managing and coaching engineers at a VP level?
@ThiefMaster I would like to make sure that, when I am not using JSX, VS Code warns me about invalid JavaScript. As it is there is no indication that the code I am writing is invalid, because VS Code treats JSX syntax exactly as if it were valid JavaScript.
@Sébastien yeah, realized that. see my answer on your question ;)
@ThiefMaster Because I am not always using React. So when I am writing pure JavaScript, it would make sense to underline invalid syntax.
This got me thinking about how energy-dense gems are in Steven Universe. — Renan 58 secs ago
What the heck is a Steven Universe?
12:52
Just as a curiosity: does anyone know if there was a discussion about allow JSX syntax in VS Code by default. It is invalid JavaScript so I was very confused to see it allowed with no warning. Am I missing something? Is it obvious to everyone that it should be the case?
@Neil ask googol?
ohh
I figured it was a typo
Shows how hip I am
had to google it
@ThiefMaster Thank You @ThiefMaster, the rule works in my .eslintrc file. It still wish there was a setting in VS Code. And I wonder why they decided to allow JSX by default in JavaScript files. I know this is purely opinion, but I wonder: is it just because JSX is so prevalent because of React? It does mean that VS Code will allow invalid JavaScript with no warning, even for JavaScript beginners, which I assume will be confusing.
VSCode has eslint integration: github.com/Microsoft/vscode-eslint
you could check if vscode has a setting to specify the javascript version/dialect
the jetbrains ides have an option where you can select es5/es6/jsx etc
13:12
I am bad
then git gud
no I will help vamp my way to glory
how is javascript formed
by adding scripting elements to java
@ThiefMaster Looking into it, Thank You :)
14:01
java is adding a new script type mode by default in java 9 or java 10 if I'm not mistaken
so there will really be a java script
yeah
java 10
soon everyone opens a java class to enter javascript in that D:
@meagar small is relative I guess, but if I manage the dev team and want them to follow a specific standard, it makes sence to me that I mentor them to that point. What would you else say I should work with as a VP? The company has received a huge investor, so we growing fast in number of employees. it's an ISP, so the tech team is mostly network engineers, my team will be a smaller team of developers.
The CTO is on the network side, I'm working closely with him to develop the tools they need to make there jobs easier
@KarelG So if we loaded a javascript library using java script, we'd be using javascript while using javascript
no stop
STAPH
HAMMERTIME!
14:14
🤕
and if that script called eval with some more script
It's java script using javascript using javascript XD
14:33
@superhero I'm just asking. Typically a VP or C-level executive would delegate mentorship to directors, managers, leads, seniors, etc.
It's a lot to ask somebody to manage the high-level technical direction and investments of an entire company and directly manage a team of engineers.
But not that uncommon at smaller companies and start-ups
14:52
@meagar ty for the response, it's the sort of information I'm interested in. Mentoring will probably be delegated as the team grows, currently I only have 2 ppl under me, Once I can trust them to mentor the same principles to others I could delegate the responsibility. Right now I'm more concern about the code quality then anything else. It's an overgrown stack that in many parts needs refactoring.
At the same time I know a lot of new development they want to have done.. so I can see the risk of a very cluttered code as we grow if they are not properly trained
..so I prefer to follow this up from the beginning at least
no good reads anyone could recommend?

« first day (2833 days earlier)      last day (2340 days later) »