« first day (3629 days earlier)      last day (1302 days later) » 

12:56 AM
 
1:34 AM
@forresthopkinsa got me there
 
@forresthopkinsa that sounds like communism >:|
(sorry, US politics joke)
 
 
5 hours later…
6:54 AM
private property is just a convention, and our need of it, the product of an education and brainwashing, this is the truth, we are the consequences, even our love to money is only the result of an education
coffee is a very js thing
have anyone ever tested quasar vue framework?
 
7:14 AM
depends on how loose you want to be on that definition of "education"
technically anything you learn after you're born is an education, so technically "love for money" is also the result of an education
 
7:39 AM
๐Ÿคจ
we have distinct word for "education" (provided by school) and "education" (mainly provided by parents, aka nurturing, not home-schooling) in my native language
the desire for money is usually influenced by your own feelings on it and the behavior of your parents/siblings/friends/acquaintances during your growing up.
 
7:57 AM
@Neil hiii
Your country is very capable to manage the pandemic accordingly.
that deserves an applause
 
 
1 hour later…
8:58 AM
Italy was considered to be a shining example of how to handle a pandemic :)
money is the metric for determining your value to the society you live in
You may not think a soccer player deserves his million euro contract, but the rest of society apparently does not think that
 
@swadhwa 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.
 
9:24 AM
@JBis I beg to differ en.wikipedia.org/wiki/… computers are just there to spice up the studies and see what you've learned. Like in engineering seeing the beam helps you understand but isn't required to learn the forces. Or like how a composer doesn't need to hear his music to compose, it just helps.
 
let's not conflate "computer science" with programming :)
 
"Computer Science is no more about computers than astronomy is about telescopes."
 
 
2 hours later…
11:06 AM
hi All
can i update records in the mongo aggregation query
 
no, because you're converting a bunch of lines into one
 
11:25 AM
can anyone help me with my question
0
Q: Getting $size count with a $cond of a lookup record in mongodb

Sam SamBelow is my query and data on Playgroun which works on two collections MongoPlayGroup Collection structure and Query In the query im trying to add one more $match condition of something which return me the count of the subdocument i.e collectB after filter like below { $match: { 'col...

 
@SamSam you seriously need to take time to comprehend how MongoDB works, how you interact with it and other basic information. You have been asking basic mongoDB questions for months here. I do not see any improvements. There is a reason why I am telling this to you: it is an investment in your own, so that you could solve such a problem easily without loosing time. Time is essential in development and there are managers that does not like you "taking" your time on a particular issue.
 
11:46 AM
@KarelG thanks for the suggestion, but i also feel you mostly don't go over the questions. Its not just a count | condition issue that im facing with the query
 
@AndrasDeak Every official education program seems to do that. Quite frustrating.
 
But even with programming, I had a semester of C programming (the only formal training I got), and we wrote mid-terms on paper. It wasn't much fun :)
 
When you're getting the feel of a language, it's important to put your hands out like you were stumbling into a dark room
Approaching it with a stalwart idea that it must work in this specific way because that's how it's worked in previous languages is just slamming your face against a wall continually
 
ha. tell that to my professor in declarative languages.
we were exploring PROLOG and somehow she used C as an analogue to "explain" it to us.
 
@AndrasDeak Not sure how big of a problem it is outside the US, but I think, at least within the US, the conflation of every field of programming into computer science courses is extremely hurtful to the industry. To be good at computer scienece you need to be good at math. There are many fields of programming (i'd argue most) where that is not case. So, when a student tries the only programming course offered (computer scinece) and does badly because they aren't great at math they are...
discouraged from pursing a programming related career. So you end up with a bunch of people in an industry who can do complex math with a computer but can't complete fizzbuzz.
 
12:02 PM
but that's a procedural language and confused us to the hell. Eventually someone took up his guts and mailed her. After that, she dropped all slides with the C variant.
after that, she used her own words. Since then, it was much much better to comprehend
 
@JBis I actually have little perspective on that problem, because I'm a physicist :)
 
@AndrasDeak I know an engineer in physics that did a post-graduate in AI
that is possible, I was surprised. And yeah he got lost a bit
 
@KarelG I'm guessing that probably made a lot of sense to her personally
 
@AndrasDeak go on... (Out of curiosity, do you use python mostly?)
 
but not everyone comes from C as a first programming language
 
12:05 PM
@JBis heh probably that he's using Pandas? ๐Ÿ˜
@Neil it wasn't mine first. It was Java for me.
 
I was familiar with QBasic, but my first formal programming language was C++
then Java in college
 
what year did education move from c++ to java?
 
they give C to those that takes courses in either micro-processing, robotics or AI
 
I think it was relatively new, say by a few years maybe?
 
hmm not sure
 
12:07 PM
I hate to say it, but I think Javascript is a good first language to learn, that or Python
 
my first bachelor year was 2008-2009 and got Java at the first time I've experienced programming
 
so long as you start them off using let and const
It's also literally available on any computer
 
it may become a problem if the language isn't consistent Neil
 
@Neil BuT jAvA rUnS oN 3 bIlLiOn DeViCeS
 
JavaScript is really dependent on the browsers implementing the standard.
 
12:09 PM
in Java, Sep 15 at 17:12, by Neil
@Wietlol more devices than there are hamburgers sold from mcdonalds
 
if a feature is provided in X, would it work on Y?
 
97% of js are the same throughout browsers
HTML/CSS its much lower
 
that problem is not there if you use Java or Python
 
for learning a language, it's fine
 
you have an API and then you're set.
 
12:10 PM
emphasis isn't on teaching javascript, but rather teaching how to program
 
i don't think js is great to learn first
maybe typescript
 
that's a better suggestion
 
i think Kotlin is prob good. I guess Java is fine.
 
the type strictness helps to avoid user errors
 
python is also very clean
 
12:10 PM
The bigger issue isn't the language, it's what they are teaching which is more often than not bad.
 
not sure what they are teaching :P
My first programming project was a potato automat, after 6 weeks already :P
 
computer science
 
well again, depends on the scope. If I were teaching javascript, I'd be telling them about node.js and ajax and react etc.
 
pure console stuff, with whole automat display rendering in the cmd
and interacting options
 
If I'm just teaching someone how to program, I'd get them making designs on canvas
 
12:12 PM
It took 10ish pages (we had to print it out ๐Ÿ™„) for me while a lot people came with more. Then one came with ... 200+ XD
 
like "make a square using a loop", stuff like that
 
another problem with node is that taking input from the command line either requires understanding of async programming (an advanced topic) or libraries, npm, and packages (another advanced topic)
 
@JBis (sorry, I'm on and off all day.) There's not much to it. I started coding for fun around 13-14, learned pascal and perl, then was taught C at university, then learned MATLAB, fortran and latex for studies/work, awk and some bash for quick hacking, and eventually moved my MATLAB to python. But in all of this only C was formal training.
 
so making CLI apps are hard
@AndrasDeak called it! ;)
 
yeah, short answer would've been "yes" :P
but that's actually my post-processing stuff; most of my calculations run on fortran
 
12:17 PM
why?
 
Partly because of speed and features, partly because of technical debt (20-year-old code base)
fortran is not too bad after fortran 90, and it has native multidimensional complex arrays (which we need a lot)
 
Aren't you forgetting 3rd "partly because job security" :P
 
@AndrasDeak I assume C++ or Rust have as good if not better speed.
 
Fortran actually lays out arrays better for the cpu, this is quite noticable.
 
@JBis The professors who have been writing the code base have to be able to read it :)
and fortran is also very low on boilerplate
 
12:21 PM
@AndrasDeak learned laTEX ?
LaTeX*
 
@KarelG well... I learned how to use it I guess
 
*LaTeX
 
I had to learn it at my own lol
 
same
 
ah. but a great tool indeed
 
12:22 PM
Not being able to to be fluent in LaTeX is a mark of bad skills :P
 
@KarelG For the kinds of problems that it is good for, yes :)
 
got my reports/articles much faster than my colleagues ๐Ÿ˜
but the problem starts when you are collaborating in a group
 
Everyone at the uni has "learn it on their own", it's not a requirement but everything is in place to demand reports written in latex.
 
@KarelG and someone has a crappy smart editor
 
hehe. don't tell me :D
 
12:23 PM
Actually latex is many times better to write reports in a group: you can use source control, and it motivates you to split definition of style from the actual text.
 
Someone even managed to ruin our latex structure with what he has on his mac
 
@paul23 I had coursemates who even wrote lab reports in it, but I only picked it up for my bachelor's thesis
 
Our bachelor started and always had 1/3rd of the week you work on a half year project with 7-15 people to learn how to work as a team. (Later years even formalized a rotating scheme of proper roles).
After the first half year we all went to latex :P
 
@JBis I just skimmed the headlines but seems legit
 
12:27 PM
sounds like y'all don't really care about well designed software, just needs to be easy and quick to write, quick to run, and produce the correct result
 
Though it can be exactly changed to "Why physicists use python"
 
@JBis who said anything about a correct result?
 
a correct result*
 
The hypocrisy of talking about well designed software in a javascript room does not go unnoticed...
 
> often confounds computer scientists and other outsiders who tend to view Fortran as a historical anachronism.
hehe
it is really made for science.
 
12:30 PM
@paul23 careful what you say
;)
 
most of the crap fortran gets is due to fortran 77 and bad practices (both fair)
as of fortran 90 you can write decent fortran
 
If you know fortran might as well work for a bank, prob make more
 
That's cobol
 
Probably, although 1. I think banks are cobol, and 2. I'm allergic to finance
 
@AndrasDeak but "decent fotran" is an oxymoron
 
12:31 PM
> In scientific computation, Fortran remains dominant and will not being going away anytime soon. In a survey of Fortran users at the 2014 Supercomputing Convention, 100% of respondents said they thought they would still be using Fortran in five years. The survey also showed that a large number of people were using mixed code with C overwhelmingly the second language (90%).
 
I'm just waiting till everyone uses python :P
 
interesting
 
@AndrasDeak bleh same difference
 
@AndrasDeak bit playing devil advocate here: it is because of history
 
Well programming say a flight simulator is a fairly specific branch of engineering; and it's not like you can find general purpose cs who specialize in that.
 
12:33 PM
bleh, python is overrated. I like my js.
 
those corps aren't interested to invest in a new main frame that works on another programming language
 
@KarelG what is?
 
the use of COBOL in many finance corporations
 
Ah, yes, of course
 
@KarelG at some point the cost to find cobol devs will be greater than changing the codebase to something new
 
12:34 PM
they are still the same that were around in '80, albeit some may have changed their name
 
or do you think in 50 years they are still gonna be using the same cobol crap
 
But if you see well-written fortran 90 you can probably guess what it does. That's probably not true for COBOL though I haven't really seen any, just snippets.
 
@JBis actually I think the costs of rewriting grows at the same rate as the cost of just hiring someone and teaching him cobol
 
@JBis allow me to tell you a story of a problem my government has: there is a department, responsible for managing and paying out support for people with disabilities.
They were the first one that started with automation. The reasoning for that was that the disabled people are let's say ... "same" over time. So pay out should be handled faster instead of manually
Now, scroll further, we're at 2017. There is a open debate in the parliament that the pay out aren't regular anymore
some people we're complaining about it. So they invited the manager of the department to come over to get interrogated
what he told was that there are stability problems, there are too many "disabled people" and various rules/criteria's that the system is not able to progress it
in order to fix it, they have to contract people to work on that. There are currently 5 people that can work with that specific technology (found out after: custom hardware and software) of whose 3 got retired
all the data is in that and they cannot move over
and there is no budget for a new system
 
this is why you contract a private company
 
12:40 PM
the IT staff that "tried" to maintain it don't want to touch it a lot because it may break the system they would be unable to restore
@JBis no budget :)
so we're 3 years further, and there is still no solution on this
 
@KarelG that, is the true issue
Can't expect shit to work without paying for it.
 
I got told by an acquaintance that works there earlier this year that those 2 died in meanwhile
so I asked "any improvements on that famous problem?"
his response: " New minister equals to gathering dust "
(elections was at 2018 and there is a different minister now)
 
In Eastern Europe it would be "my nephew can fix it for โ‚ฌ50M"
 
soon, those other 3 dies and nobody can get the data :D
that would be much more expensive to recover from it. Those people has the knowledge you can use
but yeah, politicians are usually thinking in short-term
 
is there a difference writting the else after the block / writting the else at the new line ?
if (my_array.length < 3) {
    console.log("bro")
} else {
    console.log("this")
}

////////////////

if (my_array.length < 3) {
    console.log("bro")
}
else {
    console.log("this")
}
 
12:47 PM
yes, the first is fine, the other one looks stupid
 
@Amundsen Yes there is. The difference is that the second one has a newline after the }
and I'm in agreement with @JBIs. No need to add a newline there
 
I am kinda more leaning towards the second one
 
don't fall over
 
but this does not effect the code execution right ?
 
that was a stupid joke, i'm sorry
 
12:49 PM
no lol
 
nope
 
whitespace is just whitespace
if () {

}
// can add a comment easily
else if (...) {

}
else {
}
 
it has been some time since whitespace has mattered in code, unless you're just mad at the world like in python
 
*couch* Haskell
 
it matters in Haskell too?
 
12:50 PM
Whitespace is an esoteric programming language developed by Edwin Brady and Chris Morris at the University of Durham (also developers of the Kaya and Idris programming languages). It was released on 1 April 2003 (April Fool's Day). Its name is a reference to whitespace characters. Unlike most programming languages, which ignore or assign little meaning to most whitespace characters, the Whitespace interpreter ignores any non-whitespace characters. Only spaces, tabs and linefeeds have meaning. A consequence of this property is that a Whitespace program can easily be contained within the whitespace...
 
lol yeah.
kek @ that wiki
 
1:16 PM
I'm getting this back after a 'get' request to a firebase database. I understand that this means I'm getting a javascript object back. But what should I do to the object to be able to display it. i.imgur.com/mwu4IfE.png
 
@TomCockram 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.
 
|| mdn json stringify
 
@TomCockram ^
 
Interesting thank you. It didn't return at all what I was expecting but that might be my lack of understanding with this firebase data. i.imgur.com/kox10uB.png
 
1:26 PM
sorry to be late to whitespace chat but twitter.com/hiscursedness/status/788690145822306304
 
@AndrasDeak ;}
 
@KarelG dirty
I just write my comments in the blocks
 
I rarely write comments (if you don't count in documentation) in my code
it is usually for indicating special behavior of what the method produces
there are many products in our CRM and some are very specific for dedicated customers.
 
@KarelG Now I imagine you jumping into a couch any time you want to offer a furtive suggestion
 
i like comments on the line relevant not before it
the exception is if it's for an entire block of code (like a function)
 
1:45 PM
@TylerH perhaps a fainting couch
 
2:10 PM
!!๐Ÿ’ฉ
 
๐Ÿšฝ
 
 
1 hour later…
3:20 PM
posted on September 22, 2020 by Nicholas C. Zakas

Early on in my career, I learned a lot by trying to recreate functionality I saw on websites. I found it helpful to investigate why something worked the way that it worked, and that lesson has stuck with me for decades. The best way to know if you really understand something is to take it...

 
Hi guys
I try to create a selection object in chrome (only chrome) in a table which same as excel. So select B2:C3 four cell. But it is crazy. It moves the dom elements to another row when I add to range object.
Where to start to find any solution?
 
@sarkiroka 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.
 
no idea what you're talking about
also, uh, i wouldn't suggest recreating excel in a web browser... if the client wants excel, offer an import process
 
i got a new idea, probably already exists but its simple and maybe i'll sell it
basically a screenshot app but instead of a screenshot it preforms OCR
 
3:48 PM
@KevinB I don't want to recreate excel :) Just the selection
 
 
2 hours later…
5:27 PM
Wow, busy morning
This is what I get for waking up so late
 
guys be proud, i did some computer science
 function move(e) {
        element.style.width = Math.abs(e.clientX - start.x) + "px";
        element.style.height = Math.abs(e.clientY - start.y) + "px";
        element.style.top = Math.min(e.clientY, start.y) + "px";
        element.style.left = Math.min(e.clientX, start.x) + "px";
    }
only took me 20 min
 
what does it do
 
Game of Life
 
@forresthopkinsa would it be true comp sci if you knew what it did?
 
hmmmmm
It looks like it could be a mouse selection box
 
5:33 PM
to me it looks like some kind of resizing method, with a constraint that it can't be moved farther in the -x or -y direction than it started
 
mouse selection woohoo
 
ah, that makes sense
 
๐Ÿ‘
 
modern art
 
5:35 PM
what if i want to select a triangle
 
I call it The Duality Of Man
 
Going for $25 mil. Any takers?
 
where's Carl
2
maybe he'll trade his bike for it
 
@KevinB damn users
 
5:38 PM
I made you a triangle
 
lmao
 
remarkable
this is a step forward for humanity
 
5:56 PM
anyone built any HTML5 games preferably canvas
or webGL
 
making games in raw js is brutal, i suggest you use a game making and then export to webgl
 
hmm okay what game making do you recommend? Once you add physics it isn't to bad
react native let's you cross the develop so there's that
@JBis
 
6:11 PM
@Lime the most popular i've seen is Unity
 
React question: Can I add classes to a react element? I'm getting an object with attribute: "$$typeof": Symbol(react.element) back from a material UI picker and I want to conditionally add a class to it.
I'm working with the renderDay function here: material-ui-pickers.dev/api/DatePicker
... and still learning
 
how are you adding the class
 
That is the question
 
<Text className={App}>
or
<Text className="App">
but I thought text attributes had been deprecated
@Matthew I only started messing with Reactjs recently
 
6:28 PM
Neither. It's the callback function for renderDay that I linked. I get back a dayComponent: Element and I'm not sure what to do with it.
 
posted on September 22, 2020 by Lakshmana Pamarthy

The Dev channel has been updated to 87.0.4270.0 for Windows, Mac and Linux platforms. A partial list of changes is available in the log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues.Lakshmana Pamarthy Google Chrome

 
renderDay seems like a way to -do- something with the way each day gets rendered but I'm not sure how to manipulate dayComponent. When I log dayComponent it shows this attribute: "$$typeof": Symbol(react.element) so I'm hoping that's a hint on how to work with it but I can't seem to find docs on that.
 
posted on September 22, 2020 by Ruy Adorno

Notable changes deps: update to uvwasi 0.0.11 (Colin Ihrig) #35104 n-api: create N-API version 7 (Gabriel Schulhof) #35199 add more property defaults (Gerhard Stoebich) #35214 Commits [5229ffadcf] - buffer: adjust validation to account for buffer.kMaxLength (Anna Henningsen) #35134 [3d78686987] - build: increase API requests for stale action (Phillip Johnsen) #35235 [f2cc1c22c1] - build:

 
you could simply create a variable link it to the element and update it
 
sorry, that's not helpful
or I don't know what you mean
 
6:36 PM
I tried it it doesn't work so hmm
have you tried get DOM element or whatever
ReactDOM
ReactDOM.findDOMNode(component)
 
I could... maybe finding all dates in the calendar and adding classes that way.
I'm assuming there is something I don't know about the type of "dayComponent" parameter.
... like how to add a class to it for instance
 
ref={elem => this.canvas = elem}
 
If it returned a proper dom element then it would be no problem. Instead it's this Symbol(react.element) which I'm unfamiliar with.
 
I'm using it with canvas so it has the same methods
import React from 'react';
import { Text, View, canvas, ReactDOM} from 'react-native';

export default class ConnectionChart extends React.Component {
    componentDidMount() {
        let c = this.canvas.getContext('2d');
        c.fillStyle = 'rgb(200,0,0)';
        c.fillRect(10, 10, 55, 50);
		ReactDOM.findDOMNode(component)
    }

	// bit.dev
    render() {
        return ( <View className={test}>
                <canvas ref={elem => this.canvas = elem} style={{width:100,height:100}} />
                </View>
 
6:56 PM
Anyone know how I can use the renderDay prop (material-ui-pickers.dev/api/DatePicker) to add a class conditionally to each day? My best guess is the working with the dayComponent param which is an object with "$$typeof": Symbol(react.element) but I'm not sure how to mutate it.
 
7:41 PM
confused about event loop thing
function end() {
        element.remove();
        body.removeEventListener("mousemove", move);
        leaveEvents.forEach(event => body.removeEventListener(event, end));
        setTimeout(() => {
            takeScreenshot()
        }, 0);
    }
shouldn't takeScreenshot run after element has been removed from the dom and a repaint has occured?
 
eh, not necessarily
 
i also tried
@KevinB why not? and how can i run something as close as possible after element has been remvoved and a repaint has occured?
 
the event loop isn't just a simple fifo, there are tiers, some tasks take priority over the js tasks
 
so browser optimizations are preventing it from working?
 
what you have to consider is that you are modifying the dom, modifying the dom won't actually occur until your function ends, at which point your timeout callback is inserted into the queue, and at some point depending on implementation a paint task is added to the queue
presumably the paint task is occuring after your timeout callback
 
7:46 PM
function end() {
        element.remove();
        body.removeEventListener("mousemove", move);
        leaveEvents.forEach(event => body.removeEventListener(event, end));
        requestAnimationFrame(() => {
            setTimeout(() => {
                takeScreenshot()
            }, 0);
        });
    }
1 message moved to Trash can
I also tried that.
@KevinB really? from what i recall the paint should be guaranteed to occur first (except in IE)
 
not in my experience
at least, not consistantly
i'd just bake in a delay
 
if you have a sec, can you watch at that timestamp for about 30 sec
hmm
ok i see why the first example doesn't work
but why doesn't teh following work
   requestAnimationFrame(() => {
            setTimeout(() => {
                takeScreenshot()
            }, 0);
        });
 
8:08 PM
i dm'ed jake on twitter, the guy in that talk
see what he says
 
 
1 hour later…
9:34 PM
0
Q: How to use an object with "$$typeof": Symbol(react.element) to add CSS classes

MatthewI'm trying to add a conditional CSS class to each day of the calendar: https://material-ui-pickers.dev/api/DatePicker This prop seems to be the way: renderDay(day: DateIOType, selectedDate: DateIOType, dayInCurrentMonth: boolean, dayComponent: Element) => Element ... but I'm not sure how to work...

 

« first day (3629 days earlier)      last day (1302 days later) »