« first day (3084 days earlier)      last day (1874 days later) » 

2:00 PM
touchè
 
BRB, getting the helicopter.
 
@rlemon do you mind looking at my recent question on SO ? I think I'm very close to solve it. I'm missing something really small :(
 
@KarelG did they teach you that authoritarianism (and thus totalitarianism) is found at both the far right of the scale and far left of the political scale?
 
I just feel that socialism (still democracy) in small communes is what we need right now to solve world problems. So the nihilism and cynicism that comes with capitalism isnt as prevalent and we can move forward in the way those communes want.
 
@DavidKamer It's at the top, duh
 
2:01 PM
sure. Saw a lot political / economical concepts so that we are aware what for structures would exist and what are the advantage/disadvantages of it
 
And again: look at the scandinavian or swiss model - those are socialistic states.
 
@paul23 That gets rid of the working together that has built our global economy and technology
 
You mean like the one that just collapsed over the weight of socialized medicine?
#Finland
 
@paul23 and they are rapidly desocializing
 
Only under pressure from the US/trump based administration.
 
2:03 PM
lol @ Scandinavian countries being "socialistic" states
 
It's why I wish the EU would've just said "no" against the US and stopped working together and focussed on their own.
 
@paul23 You dont know how that works do you? They've known they had that problem for more than a decade.
 
Socialism is fine if you don't mind it devolving into communism like it was intended to, and communism is fine if you don't mind complete lack of freedom and eternal poverty while the politicians transfer the wealth to themselves from the business people.
 
there are four socialistic states now. FOUR
 
I rather take an economic step back than being forced into neo liberalism.
 
2:04 PM
all others went away from that structure because it is not possible.
it is not a civilization game
 
@paul23 wow, sounds like a weak form of government if it takes literally no foreign policy directed at them to collapse their government.
 
@paul23 "I'd rather be emotional and let everyone die than be logical."
 
@AnotherUser31 you're using a bunch of libraries that I don't know. sorry
 
@paul23 Tell me, do you use HTTPS?
 
@rlemon ok, thank you anyway for your time !
 
2:05 PM
@DavidKamer Yes socialism isn't as "stable" as capitalism. But that doesn't make it worse.
 
Okay...maybe hes just trolling at this point.
 
Why do you not use HTTP, and just assume that everyone means well and no one would intercept your traffic and use it against you?
Because that's not how the world works.
 
@MadaraUchiha it is however somethign youshould aim to achieve.
 
It used to be how the world worked, by the way. 20 years ago, almost no one had SSL
 
2:07 PM
20? try 10
 
@paul23 But that's just not possible.
It's not possible because for every 10 people willing to play nice, there are 100 who are willing to play dirty.
And you need to make the rules of the game account for those 100, not just for the 10.
 
You're describing this utopic works where everyone is nice
The human species is not a nice species. We're a violent bunch that get angry in arguments and angerier when people attack our beliefs.
We've exterminated the other homo-species who were our competition
We are not a nice people. And you should not assume that we are.
 
Domt you guys know post scarcity will solve all these problems and the world will be a socialist utopia in like 2 years? God.
 
Or you need to change how the next generation of 110 people will act
You're trying to control the problem, not to fix it
 
2:09 PM
I disagree: I rather think those 100 have just a bad motivation and those 100 can be reduced a lot by explaining things and showing how working together makes better solutions. To be taught from childbirth to death how to behave.
 
Something tells me Paul has not even read The Communist Manifesto. He clearly does not understand what Marx was advocating.
 
@MadaraUchiha and this, I think is a truth that was tought to you by the same people that govern today. This elite want you to think those rules are mandatory because some people are bad. But they are the same that make people bad.
 
@dievardump History shows very clearly that we are not a peace-seeking species.
 
That's how you control a country to stay as crooked as it is.
 
I'm not even going to start on how people (and children) would pass the time a thousand or so years ago
 
2:10 PM
It's also why I propose to work in small communes and only let a few people work "over" those communes: the communes would be small enough to have social control over all members. - the few people elected to work together are then chosen for their inherent social behaviour.
 
Context. We were still trying to understand if the Earth was flat. Exploration. Religions were also a big part of those wars
 
This has nothing to do with governing or rules or economy.
We are a species that is predisposed to solving things violently.
And it took us a long while to understand that we need to do better, in spite of that natural predisposition.
 
It can change. We are now a lot more "educated". And we need to make the next generations kind-hearted and not just make the system "ok" with bad people
 
Sounds like slavery with extra steps
 
@MadaraUchiha Yet history also shows that humans can ignore their own wellbeing for the group when it must be done.
 
2:12 PM
I, too, believe in what is good and admonish what is bad
But you need to produce a practical way to get there too, not just say "I just wish that everyone played nice"
 
Wait, so if all humans can learn to be good do you need a government at all?
 
@paul23 there were thousands "communes" in the past (2000 years ago).
 
Are you anarchosyndaclists or communists?
 
I disagree about the fact we are a bad specie. We are violent, but not more than other species. When we think there is a survival threat, we attack.
 
there is always some people that wants to know what's outside.
 
2:13 PM
I just feel that the whole "globalisation" is what is fuelling the current neoliberalism and I think socialism becomes more natural if we do away with globalism.
 
that leads to connection with other communes.
then the "human game" starts here
 
@dievardump Fun fact: as far as we know, bonobos do not kill each other.
 
@dievardump On the biological level we react the same way to an attacker with a knife and to a heated argument with your coworker
 
one person from this commune dislikes how that commune lives. Or that there are relationship with persons from both communes
 
Same hormones and chemicals, same parts in the brain light up.
 
2:14 PM
That's why making everyone feel comfortable that they will survive the next years, by giving them enough money and health treatment, will change the way they act from the start
 
that sometimes ends in bloodshed
 
@dievardump You don't seem to understand how biology works...
 
@paul23 I've thought about what you said about CNN being far right in Europe.. I caught some Spanish CNN from a YouTube channel that was reporting in the same place. Probably only 20 seconds, but it was reporting something they'd never report in the US. Something way more right leaning than anything shown here
 
@MadaraUchiha This is a bold statement, you'll have to back that up. Current studies have actually shown that the whole "humans are let by emotions" model isn't complete - as the prefrontal cortex is directly and strongly influencing whether emotions boil up or not.
 
Fight-or-flight is not something you can "train away"
 
2:15 PM
 
I do. But accompanied with the biology there is the state of mind.
Someone completly out would grab a knife and kill their coworker.
 
This will go on forever because some of us are arguing about our emotions, and some of us are arguing about what's pragmatic. I'm going to go make money now.
 
Someone chill will get angry, but would never grab the knife
 
@dievardump there are people with psychopathic mind ...
some of them are peaceful. Some of them are murderers
 
The global context in which this person live will have an impact on their reaction
Yeah it's a very few people.
 
2:16 PM
you cannot control what another is going to do
 
And usualy it comes from past problems
 
@Allenph so true, thanks
 
posted on March 27, 2019 by CommitStrip

 
@dievardump You, again, misunderstand what I mean by biological reaction.
 
@KendallFrey someone give me two bonobos and a knife.. time to test this theory!
 
2:17 PM
People get angry when their political beliefs are challenged, because political beliefs is something that defines the self-esteem of many people
 
I didn't say that. I just say if you have a better life from the start, which could be attained by lways having a fix income, a lot of negatively impacting situation wouldn't occur
 
@MadaraUchiha I'm honestly not angry.
 
Me neither
 
@paul23 Never claimed you were.
 
And I'm borderline of being communist, this conversation is very challenging
 
2:17 PM
@dievardump Never claimed you were, either :)
 
this chatroom has a disappointingly low amount of capitalized letters right about now
 
If you know me I'm always sparring with what I think is right, so I might come across as pushy, but I'm never personally offended nor do I feel any grudge about it.
 
@Neil HOW DARE YOU SAY THAT?!
 
drakeapprove.jpg
 
@dievardump so you want to murder the people who have money to hire you or is that the border line part?
 
2:20 PM
Haha is that being communist? Damn.
 
I mean someone has to say it lol. It's the communist elephant in the room lol
 
@dievardump part of the core believe structure man.
 
quick question
how i can make a json object from a List where
list = [1,2,3]

listJsonified = {0:1,1:2,2:3}

what is the fastest way to do this ?
 
@geisterfurz007 *points to the Java chatroom*
 
As you cannot see my face right now; it looks a little like this: ?
 
2:22 PM
@za001a why would you make it an object?
 
@za001a you can use arrays in json structures..
const jsonObj = {list: list}
then send it
 
{ list }
pls, it's 2019
 
don't make it complicated for him bruh
 
!!> const list = [1,2,3]; console.log(JSON.stringify(list));
 
@MadaraUchiha "undefined" Logged: "[1,2,3]"
 
2:23 PM
@za001a ^
 
JSON.stringify(new Map(list.map(item, idx => [idx, item])))
 
@rlemon because appearnly i cant send a list , i need to jsonify it
 
@paul23 Object.fromEntries()
 
!!> Object.fromEntries([1,2,3].map(v=>[v,v]))
 
@rlemon {"1":1,"2":2,"3":3}
 
2:24 PM
eww
 
@za001a JSON.stringify([1,2,3]) works just fine.
 
the pain to handle it at the server
 
fromEntries is vnice when dealing with maps
 
don't give him that example lol
JUST SEND AN ARRAY AS VALUE
 
we said that two hours ago tho
 
2:25 PM
JSON (while the name implies it's an object) doesn't have to correspond to an object - the top layer can also be an array.
 
@paul23 Technically, arrays are objects.
!!> typeof []
 
.
 
@MadaraUchiha "object"
 
^
 
fair point
 
2:25 PM
even then, IMO that should be removed.
 
But the top level can also be a string or a number or a boolean or null, which are not.
 
top level is a object. Not an array structure
 
!!> JSON.stringify(5)
 
@MadaraUchiha "5"
 
Valid JSON ^
 
2:26 PM
true
annoying
 
@KarelG That too.
 
i'm pretty confused now lol , i appraciate all the help you guys have provided
but its actually more than just 3 items and the exact value is unknown that is why i want to make a dynamic version of it
 
@za001a What you need to do, is take a step back, and make a complete example that works in isolation.
A simple client and a simple server that all they do is that the client send a message successfully to the server on the other domain.
 
@rlemon bad support though according to mdn.. Nodejs doesn't support it yet :/
 
It's clear that you're struggling with how sending HTTP messages even work
Trying to do it alongside everything else with your specific message is only detrimental to you.
 
2:28 PM
@paul23 yes, it's very new
 
@MadaraUchiha that is what i will do but i keep thinking about avoiding wasting more server resources on it where the client 8g rams can be very much useful and cheap
 
There are too few things not supported by nodejs to warrant using a transpiler.
 
@za001a That's the last consideration that you need to have.
This is the worst possible reason to offload work to the client.
 
@paul23 that's why I let my bundler do it all for me. I'm never removing that, and I can spec how much downgrading I want
 
@MadaraUchiha why is that ? the client wont feel a thing but if my 10,000 client did it at the same time they will all feel a lag
8g of ram is really fast enough in doing so
 
2:30 PM
do you have 10,000 clients?
:P
I highly doubt it
(you have no product)
 
@rlemon that is true just hypothetically lol
 
okay, so cross that bridge when you get to it
if you get to it
you're buying a moving truck to go to the grocery store "incase" you buy 1000 cases of water
 
I prefer not to bundle in nodejs - I noticed that when I used a bundler/transpiler in webstorm sometimes breakpoints are "gone" or "moved" a few lines. - Making debugging much harder. I think the increase in difficulty debugging isn't worth the new features.
 
@rlemon i'm positive
:P
 
you don't even know if 10K client is a problem
you're solving non issues
that's a HUGE trap
enjoy
 
2:32 PM
better to be prepared than sorry
 
@za001a Read about premature optimization.
 
@paul23 I don't bundle the node, but the bundler does run my src/server through babel
 
@rlemon yeah I did that too - but then sometimes the breakpoints inside src/server are ignored due to how transpiling works. - And I'm spending a lot of time wondering "why the hell is that breakpoint not triggered, why is the function not called".
 
never had that issue
 
@paul23 I haven't encountered such a problem in more than 3 years
 
2:34 PM
the ONLY issue I had caused by the compiler was when I fucked up my plugins and babel didn't report it was just omitting class properties completely.
so properties would just not exist.
but then I fixed that by changing plugin order
 
Are you using debugger statements or breakpoint set in the sidebar of webstorm?
 
I'm not using webstorm :P
 
I'm constantly always running into it with react nowadays.
debugger; statements work fine, but breakpoints set in source code tend to be ignored upon hot reloading.
 
@paul23 Sounds like you're having sourcemap issues.
I too have a react application that I debug through vscode and the chrome debugger extension, and it just works.
 
Even if I set the debug points in chrome itself chrome 'ignores' them whenever I set them at "return X"; - and often executes them after the line has actually executed.
 
2:38 PM
yea, sound like this is a "you" problem (not that you caused it, but that it only exists for you)
 
@paul23 are you using webpack?
 
I guess, I'm just wary now, since i can't find a course. (And I've spent more than I'm willing to admit on finding the cause of the sourcemap issue).
@DavidKamer Just using create-react-app.
 
on Mac or Windows?
 
Ubuntu
 
huh, wonder why you'd have a problem then
cra uses webpack btw
maybe I don't understand the problem, but this is my best guess
 
2:43 PM
ugh why does flow not allow ^ operator on booleans :(
 
@MadaraUchiha i will thank you
 
@paul23 because bitwise operation are confusing to 99% of developers lol
 
Can you ever have too many eventListeners?
... resulting in the website slowing down noticeably?
 
waits for angry response from every l33t h@ck3r in the chat
 
@SebastianAlexanderBNielsen sure.
 
2:48 PM
angry response
 
but that would seem to indicate other larger issues
 
How many would you shoot?
 
I'm not gonna answer that
 
because it would seem to indicate a larger issue :P
why give you rope when you're just trying to hang yourself?
 
2:49 PM
I am just contemplating whether i should attach an event click listener for each item in my large container of items.
That's all.
 
no, you should use event delegation
 
Never heard of that. Seems like it's time for some research.
 
@DavidKamer :'(
 
@SebastianAlexanderBNielsen one event on the container, check the target
you can determine what element in the container was clicked from the click event.
 
Is it hard to implement?
 
2:50 PM
no
 
@rlemon just wondering - weren't you well versed with the mobx internals?
 
go google. lots of resources out there explaining it
 
Nice! Well, then it sounds like the solution I am looking for.
I will.
 
@paul23 no. I use mobx. and I know a bit.
but I wouldn't call myself versed, let alone well
I've read more jQuery source code than mobx
 
A that's a shame, I'm having an open "issue" that I still would like some more understanding answer on.
1
Q: Asynchronous functionality in "observe" function

paul23Well I have the following code that seemed to run well: observe( store, "user", async (data: {oldValue: ?UserTy, newValue: ?UserTy}) => { const {oldValue: previousUser, newValue: newUser} = data; this.entries = []; this.confirmed_entries = []; this.paid_e...

Basically "is this allowed for mobx or is this undefined behaviour"...
 
2:58 PM
boo reddit is having a 503
Since reddit is having an outage problem... back to work then I guess...
 
oh, you noticed too
I thought it was just the subreddit I was on, I thought maybe BioWare paid off reddit to crash their subreddit so nobody else could complain
 
down in the USA too
East of Chicago
 
mobile app works
can't get on the desktop tho
 
@rlemon THIS IS WHY THEY TELL YOU TO DOWNLOAD THE APP
 
I'm using reddit-is-fun
 
2:59 PM
every time you go to the site about 4 times
 
the official app sucks
 
oh, nevermind then lmao
 
basically my mood rn
 
and it looks like reddit is fun is no longer getting them
 
3:00 PM
thanks bioware
 
was like 3 minutes ago when I was out vaping tho
 
it's China
interesting fact, reddit is available in china...
 
china doesn't exist
 
If you have a list of objects with several properties, and you have a list of search parameters, what is the most efficient way of filtering the object list?
 
@rlemon *cough* joey.
I use that
muchos betteros
 
3:06 PM
I'm happy with reddit is fun
there is a dark theme. the ads are not intrusive
no push notifications
 
@rlemon That's what I use
 
Sam
Is someone able to explain to me what nginx reverse proxy is? I'm having a hard time understanding it
 
joey has no ads. has a dark theme as well
 
@rlemon It's what I use
 
I wish they had a button for "Other Discussions" though.
 
3:06 PM
who's joey?
 
you can even configure to exclude some subreddits
 
Sam
Is a reverse proxy fundemental to microservice design?
 
It used to be the "Reddit" app, but since it wasn't in any official capacity
 
I just use the darkreader extension. Dark mode for every site.
 
3:07 PM
Works for like 95% of sites
 
learning how to set one up and why should give you the answers you need
 
interesting
thanks for sharing
but ...
does it not interrupt other extensions running? :|
 
Sam
@rlemon cheers dude
 
"Function Constructor" You keep using these words, they don't mean what you think they mean....
 
3:19 PM
love that latex below it
I don't even know what that's supposed to be doing
 
@Feeds lol shots fired
 
shorts fired
!!kinkykendall
 
@dievardump we never thought the Earth was flat. That's a myth from the mid 19th century
 
Oct 16 '15 at 15:11, by Kendall Frey
I can do goatse
 
ok, good
that's still there
 
3:23 PM
Hi,
 
1 message moved to Trash can
@AjitSingh Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
how i can get value of "data"
 
you're getting slow cap
time for a reboot?
 
const streamData = [{
"data2": [{
"name": "SB PR", "data": [{
"name": "16:37", "y": 84
}]}]}, {
"data": [{
"name": "SB Power", "data": [{
"name": "05:30", "y": 0
}, {
"name": "16:30", "y": 17
}]}]}];
how i can get value of "data"
i can get by
streamData[1].data
but i don't want to do that
 
well.. that's how you get it
 
3:26 PM
Maybe we should ask "why don't you want to get it that way"
 
but i don't know the index position
 
so you want to search an array for a specific object?
 
yes @rl
 
It looks like every index has a data property within it at some point in that data
 
arr.find( node => 'data' in node )
should work
 
3:28 PM
ok let me try @rlemon
 
I hope that he is not taking that literally :P
 
perfect @rlemon thanks for the help......
 
Fun trivia time
function foo(a) { return a instanceof a; }

const x = ???;

assert.ok(foo(x)); // what value of ??? passes the assertion?
 
Function?
 
Object
 
3:44 PM
Those are the two only values, yes.
 
3:56 PM
@Rick Less interesting
 
@MadaraUchiha does it not give an error?
*tries it out*
 
@KarelG Well, the ??? is a syntax error
But put {} for example, and you'd get false.
 
I mean that a instanceof a
 
@KarelG It's valid code
 
dev console says no
 
4:01 PM
!!> (()=>{}) instanceof (() => {})
 
@MadaraUchiha "SyntaxError: unexpected token: keyword 'instanceof'"
@MadaraUchiha "TypeError: 'prototype' property of () => {} is not an object"
 
🤨
 
!!> Date instanceof Date
 
@MadaraUchiha false
 
damn arrow functions having no prototypes.
 
4:03 PM
!!> Function instanceof Function
 
@forresthopkinsa true
 
I mean that statement itself
unless you were just hypothetical
 
!!> function foo(a) { return a instanceof a; }; foo(Function);
 
@MadaraUchiha true
 
@KarelG ^
 
4:06 PM
well well
!!> const foo = a => a instanceof a; foo({});
 
@KarelG "TypeError: a is not a function"
 
@KarelG That's because {} is not a valid second operand to instanceof
Only constructors are.
!!> (a => a instanceof a)(Set)
 
@MadaraUchiha false
 
4:30 PM
Hi
I'm using component-based architecture in my app.
I'm developing attribute directive, that's my export of it:
import angular from 'angular';
import InputMask from './inputMask.directive';

const inputMaskModule = angular.module('inputMaskModule', ['$filter'])

.directive('inputMask', ($filter) => new InputMask());

export default inputMaskModule;

I want inject $filter into this directive but don't know how - my current inject doesnt work...
Anybody knows?
 
have you tried using an actual function instead of that lambda
 
nope, not yet
 
4:53 PM
Still nothing:

const inputMaskModule = angular.module('inputMaskModule', ['$filter'])

.directive('inputMask', function($filter) { new InputMask()});

Error: [$injector:nomod] Module '$filter' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
 
@JohnDoenym you don't get an implicit return here
if Angular needs that
 
@rlemon I doubt it really needs implicit here, rather explicit, imo.
 
no I'm saying without the arrow functions you don't get the implicit return. so your directive method there doesn't return anything
I don't use Angular, but the example on directives I just read 10 seconds ago would seem to indicate you should be returning
 
I'm having an issue on my corporate CI/CD where docker is running an npm install of something that has a dependency like: "graphql-type-long": "markbirbeck/graphql-type-long#peer-dependencies" . the npm install stalls when it hits this and times out after an hour. --verbose doesn't add any more information. it should be proxied... how best to debug this?
 
reddit is no longer dead
 
5:07 PM
and suddenly nationwide productivity dropped back to normal levels
 
heh
 
@JohnDoenym Have you tried it without stating the filter in the module statement?
 
@forresthopkinsa nope, because it's a template for defining components in app I'm working on.
i.e. every single component, directive, filter, is defined like this
 
And everything else works like that?
 
yep
the case is, none other directive has any injects inside it
but this I'm trying to implement, should have $filter service injected
 
5:15 PM
const inputMaskModule = angular.module('inputMaskModule');

inputMaskModule.directive('inputMask', inputMask);

function inputMask($filter) {
  return {
    ...
  };
}
^ that's more what I would be expecting it to look like
but to be fair all my angular experience is with angularjs so that might not be an up-to-date way of doing things
 
5:46 PM
I have a question about objects
 
the answer will probably be objective
 
This is weird.
getAllPlans: function () {
            return this.groups.reduce(
                function (acc, cur) {
                    return cur.plans.forEach(function (p) {
                        acc.push(p.planId);
                    })
                }, []);
        }
 
you returned a forEach
:D
don't do that
forEach(...)
return acc;
 
ah
yeah
ok
 
need opinions
JS application that includes a frontend and backend in React and Node
 
5:56 PM
@forresthopkinsa I think that mauve has the most RAM.
 
thanks
 
Does anyone write React directly instead of JSX?
 
I've seen people do it
they're crazy
 
... so it's not some thing that people should be doing
I mean I assumed not considering the documentation
Literally says something like "you won't/shouldn't be writing this stuff"
 
I mean, I wouldn't go as far as saying you shouldn't.
if you really don't jive with jsx, it's completely viable.
 
5:59 PM
structure can either look like

./
-- frontend/
-- -- node_modules/
-- -- package.json
-- -- src/
-- node_modules/
-- package.json
-- src/

or

./
-- frontend/
-- -- node_modules/
-- -- package.json
-- -- src/
-- backend/
-- -- node_modules/
-- -- package.json
-- -- src/

Right now I'm doing the first one and I have some scripts in the Node package.json like "lint" that first runs eslint, and then descends into `frontend` and runs its own `npm run lint` script
 

« first day (3084 days earlier)      last day (1874 days later) »