« first day (2874 days earlier)      last day (2298 days later) » 

00:27
I'm not going to express any opinions on hacking in total, but I will say is slipping malware into software to trick a user into downloading you bad code is evil in a cheats-on-5-year-old-release-of-call-of-duty-in-multiplayer lame and I hate you (the person who does it) for making everyone suspicious of people like me who just want to make stuff for people to use.
00:48
@forresthopkinsa got too real? Lol
01:30
whats a good javascript related tag to browse
canvas?
01:57
@snek html5 almost always includes javascript
ok also not related to ew web stuff
02:09
@snek electron
or npm
what is up with everyone and the word ew today jeez
It's like a theme in this chat today
02:34
Reminds me jimmy Fallon
EW
disgusting code
everywere
Question: I working alot with canvas however allowing for input on a canvas is very tidious at best. I know about Modals but i would like a subwindow that users can shift around that stays within the tab. any good way todo this?
03:03
Good example of an XY question. They have a problem and they've already decided on a bad solution, and want a way to implement said bad solution.
@MoonEater916 Maybe an iframe lol jk
I recently read an interesting post (forgot which SE site it was on) about the difference between a framework and a library. A framework is a set of API functions that you set up to call your code at appropriate times, while a library is a set of API functions that you call from your code at appropriate times. I think that's a pretty simple way of stating it
Anyway, I started thinking, is there such thing as a library for writing web applications? Everything I can think of, Angular, React, etc. are all frameworks for writing web applications.
03:23
@PatrickRoberts I've heard that React is technically a library but I don't know how true that is.
React seems to satisfy the definition of a framework I gave, in the sense that it creates a virtual DOM to which you add your content, and let events propagate from the real DOM, to the virtual DOM, and into your components.
I mean, I'm welcome to criticism of what is most likely an oversimplification of the difference between "framework" and "library", but at the moment, most of the talks I see about React address it as a framework since the most popular implementations of the flux architecture are frameworks
03:42
"just a view layer"
so not a framework
I found the definition I'm citing: stackoverflow.com/a/148788/1541563
I'd say react is a library that lets you interact with the DOM.
It doesn't do much more than that.
Angular, however, seems to force you to interact with the DOM in a way that makes angular apps looks similar, meaning much of the code is just your fill in the blanks rather than your code
04:03
It does a lot more than that. You're forgetting that each component has a predefined set of call hooks for different stages of the component lifecycle, much like what you see in a typical framework model.
And in order to write a component, you have to subclass the provided React.Component
04:17
@PatrickRoberts It doesn't make opinions about how your code should look though. Basically you could make the same argument for any paradigm if you wanted. Having a virtual dom isn't defining, it's just a tool imo
Like you can even circumvent it and directly set html if you want.
Hell I've used three.js directly in the dom sitting next to react
Being able to choose when not to use a framework doesn't make it any less of a framework. If that's what you're trying to say, it's not true. By that argument, Angular isn't a framework. You could put three.js next to it too.
Ok what I mean is that it is a tool, i.e. library, to manipulate the DOM. If you are trying to say that manipulating the DOM (virtual dom or real dom, jvm application or c# application) then jQuery is a framework because it does that.
You're basing it on the fact that there is a virtual dom, but I think that is just the tool you use. It doesn't tell you how your code will look anymore than a structured language like Java or C++ would
Frameworks tend to make stronger opinions on how your end product will look
I'm not basing it on the fact, that was a side-note in the main point I was making. It contains an API that you set up to call your code, not the other way around.
and it usually feels more like templating than writing code.
@PatrickRoberts That's not how I do it. I use a lot of functional components.
Sure your components can be functional. But what creates them and destroys them? Oh right, the framework :P
04:28
I don't think you call your code from react.
So anything with garbage collection would be a framework?
My point is that to have a virtual dom you have to have these things
and just because you have a virtual dom doesn't make it a framework
And the fact that you can use the render/life cycle methods if you want to makes it even less of a framework
The "if you want to" transparently hides the fact that they're called anyway since you extend the base Component class.
because you can and don't have to manipulate every part of the process if needed or just treat it as a library that handles the dom.
@PatrickRoberts you extend it, but extending something doesn't alone qualify it as a framework. It's just a way to package all of your dependencies in the end
You're right, it's not the only quality that makes it a framework.
A virtual DOM needs this type of support, but in the end 99% of your code isn't effected by the virual dom
My point is that you could write some html and some JS and do it the exact same as React without changing much
We just don't because we like the virtual dom.
You would just replace render with document.innerHTML =
so render is really just a library tool to set your html.
JavaScript is only like 20% dom manipulation
if that
so you are just using a library to handle dom manipulation
like jQuery
but with a render lifecycle instead of #'s and $'s
and actually, if you did consider it a framework, then you should look into adding each of libraries that goes into it instead of using create-react-app. So, instead of looking at it as a framework, it's more a series of libraries that work towards the goal of avoiding direct dom manipulation.
And I would admit that it often feels like a Framework, but in the end it only does one thing
04:45
I've never used create-react-app, but of the few times I've worked with React, I've found my code quickly being conformed to a particular structure, and while yes that structure is very modular, (which is a testament to how well-written React is), it's still a structure that, in the end, all gets built by React when you call ReactDOM.render() on the top-level component, sit back, and let the "library" handle event propagation, component lifecycle, and application state.
Meanwhile, your code follows a strict set of rules that ensures it does not break out of the box it was put in, e.g. making render() pure, only modifying state with setState(), etc., so the "library" can automatically take care of reflows.
The github page even says it is a library.
I look at a framework as something more like OpenCart which is MVC and makes claims about how data is handled beyond the view or linking the view directly to the data.
Angular would be closer to a Framework
From what I can tell the consensus is that it is a library among those who know what it is thoroughly and a framework by those who make top ten lists about frameworks lol.
be it Garbage being closer to it than framework.
@ShrekOverflow I don't do anything in Angular, but I would agree from what I've seen
04:52
but lets not get into technicalities
The garbage collection in the JVM got carried away one day and we got angular lol
just spat it out
no, I don't know enough to dis on it, but I didn't like it when I looked at it
Vue looked much cleaner but in the same genre when considering ascetic implementation.
MVC is a specific architecture for frameworks. A framework does not have to be MVC. And it's pretty clear that the developer team for React is very opinionated about how their "library" should be viewed, but just because they market it as a library doesn't mean that's the final say. Plenty of open source projects wrongly label themselves, and just because something is official doesn't exclude it from that possibility in my opinion.
And in that very article you linked, the guy who wrote the blog stuck the top comment at the end where the guy goes "I still think it's a framework"
@PatrickRoberts So you think it is a framework because you use the component life cycle, so then that means that you are calling from the "framework" and not calling the "library" from your code?
@PatrickRoberts yep lol, I was just throwing related articles. Alot of people including the ones that taught react to me call it a framework.
but I think it is a well written library that is so awesome at what it does that it can trick you into thinking it is a framework when it really just makes handling the dom that easy.
And what really convinced me of this is how easy it is to make a page look however I want with react, much like jQuery used to be
but way better because it is way less dirty
and if you notice the parts that "feel like a framework" are actually just timing functions for the render.
They don't really do anything beyond letting you do stuff during points in the render. Your other code is where all of the logic and decisions are made.
in fact you wouldn't even have to use anything other than the render method if you didn't want to
So, you're saying that because the DOM is event-driven, that the "ecosystem" we're talking about in React doesn't qualify as a framework simply based on the inversion of control principle?
It helps to look at React without the JSX too.
@PatrickRoberts No I'm saying calling everything with a virtual dom even when it gives you near complete control over the virtual dom a framework just because it has a virtual dom is utterly wrong.
It's like arguing that the JVM is virtual machine manager like Virtual Box just because they both are vitual machines.
I mean yeah they booth virtualize something but they are fundamentally different.
05:03
I thought JVM was a universal bytecode?
no, it takes java bytecode and runs it on the machine
ah, so java bytecode is the universal bytecode then
I would say that node.js is a framework though
@PatrickRoberts yeah, I mean it can be Kotlin too
I guess I'm starting to see your point about React
but I think Oracle still (at least 2 years ago when Java was relevent and I learned it) calls it Java bytecode. They might have rebranded by now. They even added var as a keyworkd! lol
@PatrickRoberts I mean it's an opinionated subject. Many think about it both ways. From what I've seen most people who think about it long enough tend to think of it as a library
it's just a lot to learn and a new way of doing things, but that way isn't a framework way. The new way of doing things is because of the concept of a virtual dom which will translate to many frameworks/libraries in the future.
05:07
Well since you use React a lot, maybe you could answer something for me
sure, I'll try
Is there a fairly non-painful way to make an element responsive to the state of its sibling? or am I just thinking about it the wrong way. Simple example would be just a typical form validation of each input field being triggered by a submit button. More complicated example might be audio controls for a visualizer in a completely different unrelated part of the DOM.
my first electron app made entirely in react!
@PatrickRoberts You might need refs
Do you mean the way it is displayed?
nice. I wanna do something in electron eventually but I can't find the motivation during the time in between my actual job. I just have enough motivation to do smaller projects
actually avoid refs if you can and use state.
05:11
Oh, refs might be necessary in the second example I gave
that's a better picture lol.
@PatrickRoberts just set the value with state
I wanted to rewrite an old audio visualizer I made a few years ago in react but I got stuck when I tried to figure out how to link the state of some arbitrary element to the view of another element
or use CSSAnimationGroup
if it is animation based
so like :
const {value, bool} = this.state;

render(){
return(
<input value={bool && {value}} />
or conditional rendering
so use {bool && <SomeComponent />}
any time it is dependent and setState({}) for a value to control it.
Yeah but notice how conditional rendering makes the assumption that the dependent element is a child of the stateful element
You just move your application logic away from the dom and into JSX directly
05:15
OH
you can call setState on a ref?
no no. Just make a piece of state (a variable in state) for your specific situation
It would be easier to explain with a more concrete example
I thought that was bad practice o.o
to use state?
oh, I misread
that's the whole point of react or at least about half of it
lol
05:17
I thought you were saying make a state variable outside of react and use it in react
If you had two elements and one needed to do something based on the other, you would just create a case that would happen based on a state variable
that violates the principle of pure render functions
yeah, I wasn't saying that lol
like I said, I misread
anyway, I'll try that out when I get the motivation to pick up that project again
I'd send you the demo, but I ran out of monthly hours on heroku again xD
when something happens like you adjust a nob or a dial and something else needs to be adjusted for the two inputs to both be correct, you would just change the value or aspect (like max and min in a slider) based off of the state. It basically allows you to directly apply the logic to the render instead of wasting time manipulating the dom.
05:20
github.com/patrickroberts/music-js feel free to cringe, I cringe too. My code doesn't look like this anymore, I promise :P
@PatrickRoberts It's cool. You should look at digital ocean. I pay like 10 bucks (usd) a month for a vpn server and a webserver
Oh, I could pay even just 7 a month for heroku, I just choose not to.
wow app.js has a lot of code
lol
I could probably run all of my stuff on 5 with DO but I like a sperate server for my vpn because it is safer
Jeez I don't remember the last time I say 800 lines of code in one file lol, you got my props on managing to do that lol.
This project was before I learned about task automation for bundling modular code. I like to use gulp and browserify now when I write web applications
@PatrickRoberts I've honestly never used gulp, grunt or browserify
I pretty much do webpack these days
05:23
One of my friends also nagged me about getting into TypeScript and I'm finally doing that too, it's pretty neat actually.
It's on my list after Julia and Rust (and maybe Vue.js or Angular (don't tell anyone lol))
Julia is my priority for now
I've read a lot about webpack and I still feel that I prefer gulp. I never do anything big enough to merit webpack
well I guess it is Julia, Solidity then Rust
fullstackking.com
Since I started my job, I've gotten really interested in C#
I do lol
I wrote the backend from scratch on that.
It's not my best possible version, but it is my MVP
05:26
Your index.html has a syntax error owo but yeah that is a lot of code
Does it lol? It works though lol.
@PatrickRoberts You mean on github or the actual site?
on github
you mean fullstackking?
that's how it's spelled lol
that's what you sent me
no no
link me to it
05:29
Also no offense to you or your choices whatsoever, but I've always hated the recommendation to do giant switch-case statements in redux reducers instead of more modular event listeners for each action type. The switch-case just makes functions longer and less maintainable, in my opinion.
I never understood what the benefit of that style was
wow I can't believe it compiled with that error lol
it's even like that on the server it was built on lol. The build must have removed the error automatically
@PatrickRoberts Did you see how many different reducers I still have to combine?
yeah there's a few in there
that's why I ended up doing it that way.
I prefer it as one statement because I feel like an idiot doing a single case switch statement lol. Also it generates more code to spread them out.
like defining the switch statement over and over is just painful imo
No I mean like, why isn't the reducer defined as an event emitter instead of a function with a switch-case? Instead of calling it with the action, emit the action and have the "case" be an event listener
05:36
anyone good with firebase
@PatrickRoberts can you show me an example?
@KarelG It used to not show others that stuff..
I ran npm audit fix before build. This is the version before that.
I don't know what kind of example you're looking for. But just consider React's "flux architecture" and how they define the dispatcher. Even the name alone makes it sound like an event emitter
help please
Hello, world! How can I help you today? :D
@KarelG Oh you just mean the orphaned service worker? lol
05:41
@PatrickRoberts
0
Q: wait for images to upload then grab download URL firebase

hello worldhey guys im trying to wait for firebase to finish uploading images then grab then downloadURL but im having trouble. // loop through files for (var i = 0; i < files.length; i++) { file = files[i]; console.log(files.length); // Upload file and metadata to the object 'images/mountains.jpg' ...

:(
@PatrickRoberts Imo I don't even know if a store is really needed. localStorage and making a fetch request on componentDidMount() is usually enought. You don't want stale info on most sites anyway. I kind of know what you're talking about, but I wanted to use redux-thunk and I think you pretty much have to do it that way. I mean you could just return stuff, but redux-thunk wouldn't let you because it's concatenating all of your switch statements together in the end.
@helloworld what does:
    console.log('File available at', downloadURL);
print
doesnt print anything @PatrickRoberts
@DavidKamer store? I don't think we're talking about the same thing. a reducer in redux is an implementation of a dispatcher, is it not? Its just is to receive actions from the view or from a store, and dispatch them to components that subscribe to those actions. That's exactly what an event emitter does.
I'm saying I think their implementation is not very JavaScript-y
@PatrickRoberts an action is fired and a reducer catches that action and "reduces" it into the store
@PatrickRoberts I want to show you a real beaut lol
05:50
lol, I was on about this the other day, but I get it now
@helloworld try catching the promise with .catch()
see if that prints a better error
so i did catch( error => { console.log(error); }); but nothing @PatrickRoberts
@helloworld stop pinging me, I'm not the one that suggested that
If while sending a response back to the caller for an API request you need to do something as well apart from sending a response back how can we handle it gracefully?
It will be like an asynchronous call
06:06
@GandalftheWhite You are referring to a response from the server?
like what http2 does?
@helloworld Does it even give you the length when you console.log?
Oh god I swear that is not on purpose sorry
I was about to say, very funny
I have ping problems lol
It's because when I ping him it will automatically reference you because he pinged you. It is a terrible teriible cycle
Hello world seems to have deleted their question for the time being
and if I edit it, it will also ping you so it's a freaking bomb with no right wire
the edit didn't ping me
06:09
type in helloworld
lol, a unique username
I never expected it to be unique :P
He must have figured it out.
He has 500 rep... That's a lot more than me but I just started using SO (contributing and asking) like a few months ago
!!rep
@DavidKamer That didn't make much sense. Use the !!/help command to learn more.
It's too bad you don't have 10K. It's really helpful being able to see deleted content
!!help
06:11
@DavidKamer Information on interacting with me can be found at this page
@PatrickRoberts Do you have 10k?
I think it is almost directly proportional to how long you've been active
I have 16k
like most with 3k+ just have some really good highly viewed oldies.
I am not so lucky to have one of those
@DavidKamer not really
06:13
@PatrickRoberts ~1.2m
wow, that's a lot of people
@DenysSéguret You don't think so. Alot of the regulars in here during the week seem to think so
they always tell me it is from some old questions or answers that have a ton of views.
stackoverflow.com/users/1541563/… none of my answers even have +20
You deserve some rep for reaching 1.2m people though I admit
@DavidKamer I spent a few years on SO with almost no reputation (less than you). Then I started answering and I was at about 100 to 300 rep points per day. Now that I stopped answering I'm still gaining points but far less than when I was active.
Your oldest one has 900 views and like 1 upvote. I don't even have 900 views total I think lol Views do count towards rep, correct?
views don't bring rep
06:16
@DenysSéguret That's what I mean. You get like interest. And I think, at least some SE sites, give you rep partly on views
maybe I'm wrong lol
You'd know better than I
If views counted towards rep, I'd have so much rep from some of my questions
When you're actively answering you gain much more reputation
I'm only at about 30 per day now. I was at more than 200 per day when I was active.
Yeah I get burned out actively answering. I can answer low-hanging fruit and encourage help vampires, or try to answer more difficult questions and risk getting FGITW'd by someone more familiar with whatever it is than I am. It's draining.
@DenysSéguret I just don't know how to answer questions that are so dependent on a specific situation most of the time. It's hard.
that sounded whinny
It's fun when it's a new topic. Today you can't really find questions on js for example that aren't either duplicate or plain stupid
06:20
who me?
I mean it's hard to find questions that aren't just messed up implementation details
@DavidKamer In JS yes. Try a new language.
@PatrickRoberts no when I reread "it's hard" of my own message
@DenysSéguret I'm learning Julia... The flood gates on that will open soon I'm sure
maybe they already are..
@DenysSéguret the latter happens frequently.
Then look at the tag. Answering questions while learning is also an incentive to dive into interesting specific subtopics. You might be to late to really answer but at least you learned something by searching.
06:23
@DenysSéguret that's why I try to go for stuff on react but usually it's because they screw up something with a package I'm unfamiliar with. You're right.
react is old (I mean there are so many people there from a long time, compared to the size and complexity of the topic)
"reading documentations", "comprehending the code before c/p'ing it", "doing little research on approaches", "checking if the problem that you have already got asked by someone else" are not happening lately :|
@DenysSéguret true. I mean every framework is 'old' at this point..
@KarelG Sure but how do I iterate this nested property? Just gimme teh codz plx
true. I think it is still really relevant though
what's a brand new language?
to be fair julia has like 8,000 questions and rust has almost 25,000
06:26
@DavidKamer the other day I saw a job posting asking for 6+ years of experience with React. I checked and it was published in 2012. How can you have more than 6 years of experience with it? xD
@PatrickRoberts talking about the devil:
Rust is newer. Julia is probably the way to go. Too bad solidity is on its own exchange
0
Q: How to initialize the association rules into artificial bee colony optimization?

Ko MoeI am doing the association rules mining using artificial bee colony optimization(ABC).I need a help how to initialize the association rules generated from apriori algorithm? Anyone guided me.

@PatrickRoberts So true... I have 20 years experience with Windows 10 makes about as much sense
06:27
@KarelG that is equivalent to, "How do I make General AI by solving the np completeness problem associated with the traveling salesman problem"
If I could answer that I wouldn't be answering questions on SO
I would be the richest man in the world and we would all be out of jobs
that is not a TSP
Seems a homework assignment for me
@KarelG no I mean "is equivalent to asking"
I mean if she is really asking how you can make a program that solves puzzles about movement in a bee colony
TSP is an interesting one though. I would attempt to answer it :P
how do you know the OP's gender?
I just always assume gender is a she.
unless it is a male name. I wouldn't mind being called she
It's not a bad word
hi davide :P
06:32
^^saved myself
lol
I think I might have partly assumed it was a she because it actually made sense even though it was really poor english. That doesn't happen very often with men lol, but I'm sure it could be either.
Ko is a Korean surname
and Moe is
Moe (萌え, pronounced [mo.e] ( listen)) is a Japanese slang loanword that refers to feelings of strong affection mainly towards characters (usually female) in anime, manga, video games, and other media directed at the otaku market. Moe, however, has also gained usage to refer to feelings of affection towards any subject. Moe is related to neoteny and the feeling of "cuteness" a character can evoke in oneself. The word moe originated in the late 1980s and early 1990s in Japan and is of uncertain origin, although there are several theories on how it came into use. Moe characters have expanded through...
yep probably a man lol jk
or neither and I just got blacklisted from life forever
~~or at least from this room~~
before I keep digging this hole I'm just gonna say that it doesn't matter and the question is just as bad either way
crap I thought that was strikethrough
06:36
I don't know what strikethrough is on SO
@DavidKamer there have been posts in broken English that got made by a male.
do that ~ three times for a strikethru
~~~strikey~~~ = ~~~strikey~~~
wait
@KarelG no I meant that somehow broken english by men is harder to understand for me
---strike----
>.<
I'm pretty average so i assume that when I say "for me" it is every man in America lol jk
oh glorious redemption
06:38
****strike****
%strike%
%%strike%%
just... stop
HAMMERTIME!
I was certain that it is ~
but ... hmm
I'm dying right now
06:39
wait how do you get to the sandbox
it is just room 1
here we go
--- KarelG found it first lol
it's weird that it's different than the main site. Does chat have a different formatter?
I know that the code formatting is completely different. I think they are completely different servers/bl
different logic. There are similarities but this is a watered down version for sure.
oh I have a opinion question for everyone
I'm currently working on a TypeScript module I plan on publishing to npm
what's the "best" practice for whether or not to commit .js and .d.ts files, and should they be in separate directories or next to their respective .ts files?
06:46
This chat is just a small fast made thing they don't seem to want to invest in. I wouldn't be surprised to wake up one morning to a partenariat with slake or similar
@PatrickRoberts I would include the typescript files. Someone earlier said they were handing over a github open source project but the new maintainer wanted to make sure it was in typescript first.
I would include it in a way that doesn't require transpiling though
Notice I never asked if the .ts should be included. It wouldn't even have crossed my mind to omit those
I wouldn't usually include the transpiled file, just the real source (with instructions on how to build the js one)
but opinions differ and there's no real rule, as long as you make it clear it's a built file
@DenysSéguret that last bit seems to suggest that if I do include them, they should be in separate folders
yes (assuming you have more that 3 or 4 files total)
Note that it's common enough to include a minified file for small libraries, just for ease of use. It's the same logic.
06:53
@DenysSéguret yes, and I do that, but bundling / minification is different than transpiling from human-readable to human-readable
The reason I ask is because this is my first TypeScript project
!!afk having nightmares about bees
@DenysSéguret frankly, I was waiting when you would talk about Miaou
Nobody here is interested in Miaou. I see no point in boring you.
(but if somebody wants to play some tribo, the next annual competition is next month and there's still time to discover it and train a little)
07:11
@KarelG if you think that rest spread is a hack, you should not be giving advice about javascript. Performance is not a concern here. — Andy Ray 3 mins ago
¯\_(ツ)_/¯
@DavidKamer I don't recommend having nightmares about bees
@Neil DavidKamer is afk: having nightmares about bees
07:25
Good morning , Why doesn't TS shows aaa Auto-completion in :
declare interface Object  {
    aaa(): any;
}

var g = {};
g.aaa();
Are you still doing that? Stop that
Stop extending builtins :D
No im not :-).. jsut wondering why TS is OK , but won't autocomplete : bit.ly/2Pgyhct
might be a TS bug ?
that auto-complete depends of your editor ...
Ts playground is THE testing-editor for TS
I write TS in ST.
:D
07:27
:-)
is it vogue to call typescript TS now?
sounds like an STD
lazy mode is on :-)
you mean LM?
nah, just lm, saves a reach to the shift button
I'm starting to wonder about myself. I actually prefer hand-writing gulp tasks for projects to using IDEs like Atom with builtin automation. For one, the plugins lock you in to specific versions of compilers / transpilers, and two, the project does not come with complete developer dependencies if you were to publish it, having built it with an IDE
07:45
@Neil Just don't google the TS playground.
I recall that advice from before
I did not check why you should not google it. I am however trying to figure out what Google would respond as search results
what would you get ? What's the other meaning of TS ?
@MadaraUchiha OMG :-) hahaha
@RoyiNamir I told you not to!
Worst part is that i did it without incognito
07:58
@DenysSéguret Transvestite
Dec 8 '16 at 9:38, by Madara Uchiha
Note to self: If you want to reach the TypeScript repl, do not google for "ts playground".
Got 31 stars the first time I found out about it :D
(I hope that our company's FW won't catch that)
ok, thanks. Doesn't sound so bad but I still won't have a look
@DenysSéguret You basically get all porn sites in the search results.
I wonder how you know that ........................
@RoyiNamir How do you think? I naively thought that ts playground would get me to the actual TypeScript playground :D
07:59
I know I know....

« first day (2874 days earlier)      last day (2298 days later) »