« first day (2596 days earlier)      last day (2353 days later) » 

5:00 PM
if you know it's bad, then why did you write it?
 
I'm amused you created something so complex without seeing the basic solution
 
@ssube it was an example to make the challenge more clear
I didn't claim it was good. The point was to make something better
 
yea sorry I thought you were saying there was a benefit to the way you were doing it. so my bad, ignore my snark
 
@rlemon the opposite
 
amazon is pretty low key on black friday isn't it
 
5:02 PM
welp, time to go find a new doctor and get a tea and pick up a christmas tree
@Mosho Amazon.ca is terrible overall
the sales always suck
 
they suck here too
 
@rlemon amazon.com too
 
@rlemon in canada you buy actual christmas tree every year?
 
amazon's sales are always bad
 
in spain people usually have plastic ones
 
5:03 PM
@Neoares some people do
lots are going with fake trees. I just like the real ones better
 
you're buyng a real one?
nice
yes of course they're prettier
 
fake tree that looks real. $400+
real tree: $19.99
 
lol
but how does it work?
it's alive or dead?
 
we have a tiny tree, no room for a real one
 
you put it in a stand with some water in it
it stays alive for like a month and a half.
 
5:04 PM
oh so it's already dead
 
dying
 
plants don't die when you cut them
 
then you throw them :/
 
they live for a while.
 
well, it's live but terminal
 
5:04 PM
like people
 
they go into a compost pile.
 
@rlemon most of this things I know them from "The Simpson"
 
actually, that makes me ask another question: is there a language that is easily readable when golfed to high extents?
 
perl
 
@towc golfscript is as readable as it wants to be
 
5:05 PM
@towc not french
 
perl doesn't change as you golf it
 
but really,
 
otherwise, that's an absurd question
 
!!afk doc tea tree
 
making something shorter for no reason will make it less clear
you're losing data that the reader has to recreate
 
5:07 PM
I guess aiming for something short and readable is just being concise
 
but you gain bits
 
> concise
> giving a lot of information clearly and in a few words; brief but comprehensive.
 
so, what's a very concise language :P
 
what you do is not concise
 
> short and readable
that's a dangerous assumption
not always true
 
5:07 PM
@ssube short and easy to interpret, right?
 
actually there is no reason to do things shorter without reason
 
don't waste your time trying to make code shorter
buy a better keyboard and type faster
 
except you're doing redundant things
 
@Neoares productivity, mainly
 
a mechanical keyboard with brown switches
 
5:08 PM
@towc but that can hurt readability
if it was only for productivity, I wouldn't coment the code
 
@Neoares if done right, it might help a lot
 
So little of my time is spent typing code, brevity really isn't important
 
@towc what source do you have that says typing less makes you more productive?
 
by saying "prime numbers are positive integers with only 2 positive integer factors", you're being fairly concise, although you're hiding a lot of maybe at first useless information to the reader. You could instead say "prime numbers are a list that starts with 2, 3, 5, 7, 11, 13 ..."
and go on for all the relevant numbers
 
you're already on the wrong side of the graph
@towc so, when you want to abstract some common thing, we have a construct for that: function
you'll have a helluva time finding something more reusable
 
5:11 PM
this is where we go back to macros (lisp) :/
 
> oh god I shave off 1 second every year. YESSS!
 
I might have too many expectations by wanting to get close to it in vanilla, and should use something like sweetjs
 
why not learn to write vanilla first?
 
do not use sweetjs lol
 
then move on to antipatterns
because macros in a C-like language are an antipattern
 
5:13 PM
@ssube I'm experimenting. I think I know my fair share of good patterns, thanks
@ssube (lisp)
 
lol
JS isn't lisp
if you want lisp features, write lisp
 
macros in lisp is something else entirely
 
JS is from an entirely different family and macros in C languages are bad
 
@Mosho did I say otherwise?
did I also say I embraced sweetjs?
 
is there a way to aggregate all imports into a single object?
 
5:14 PM
hi again! :-) i have the following arr with o many objects inside . var Costs = [{cost: " $200"}, {cost: " $100"}] and what i want to do is: for every checkbox checked == true get this value. i tried allready for in but i think i do something wrong.......
 
@AlexBollbach depends on the imports. What do you have?
 
@towc you suggested you should use it
 
e.g. i want to import a bunch of d3 functions like import { scaleLinear } from 'd3-scale' ... import { line } from 'd3-line'
 
@ssube here you need another variable
 
@Mosho I said maybe
 
5:15 PM
"times you're going to keep doing the thing"
 
but i want to access all d3 functions like d3.line() ... d3.scaleLinear()?
 
@AlexBollbach you can have a file that re-exports them, but that doesn't make it much better
 
I think it can be used well, but likely won't be by most people, including me
 
stuff like sweetjs has no room in actual development
fun to experiment with, maybe
 
it just turns your code into an unpredictable mess
 
5:16 PM
buy buy buy.....spend spend spend.....Black Friday deals on everything!!!
 
well, I am experimenting and fucking around
 
he assumed to spend 2 months to shave off 1 day every month
1 day every month is 1 day every 20 days, or 5% of the time
 
in production I'd just go with the full-written version unless it went over the top
 
@towc so you're running different code in dev and production?
 
i guess its like allMyD3Imports.line ... all MyD3Imports.extent etc..
 
5:17 PM
@Neoares not everything's about my own time
 
gl with your tests then
 
so 20 iterations
 
its like import d3 as a whole but your actually important modules
 
@ssube I'm doing a personal thing that should never see production
 
if you're gonna do it 40 times, you could do it in 4 months
 
5:17 PM
@AlexBollbach you can re-export imports
 
it's not part of a project
 
right
cool
 
just messing about
 
thanks
 
I have a couple files that import a bunch of symbols from a weird module and export them named
I try not to rename, that just seems confusing
but for grouping, just make a file and export {foo} from 'bar'; export {bin} from 'bam';
 
5:19 PM
@Neoares there is such a thing as spending 20 hours to do learn how to do something you could have done in 1, but you can now do in 10 mins, and might only be doing twice in your life, so that when time is critical, you can use previous knowledge to get something done faster
it's like storing potential energy to release only once because you're being chased by a tiger and you need to put in all you've got
 
it doesn't have nothing to do
 
@ssube i'd probably name it something like 'allMyD3ModulesAggregatedIntoOneConvenientNameSpace.scaleLinear()` lol
 
or I don't see the correlation
I'm just saying that the time he assumed to do the task it's getting amortized in 20 tasks
in the example I said
 
@Neoares put another way: not everyone works for long-term projects
 
ok, then you might want to do that calculus and determine if it's worth or not
or your boss can do it and force you to work in that tihng
even if you don't give a duck
 
5:23 PM
if academic researchers followed the principle in that xkcd, we probably wouldn't have computers
 
I don't understand that image above, because it only shows the time you shave off, not the effort required to obtain that 'shave off' time for instance it could take you an effort of 20 days to shave off 5 inutes
 
that xkcd applies to well defined long-term things that are fairly predictable
 
like what?
 
sharing docs online
 
isn't the analysis not fully exhaustive?
i.e. it isn't just the time spent on the task vs. how much you've optimized
 
5:26 PM
it minimizes for time
 
no
 
you've all spent more time debating the shortcomings in a webcomic than it would have taken to make a better graph
 
because by optimizing you are improving a skill (optimizing) that is then applied to everything else you do whereas doing the task the dumb way has no externalized benefits
 
I think the real moral here is not to complain about things you aren't improving
 
it's the time you can spent improving the task vs the time you shave off and how frequently you do the task
 
5:26 PM
what if its a one time use skill?
it assumes you are reusing the skill
 
then what i said does not apply
 
@erotavlas then you might want to buy some spell scrolls at the wizard's sqare
 
the moral is that we're all sitting in our mom's basement and we need to go out more
 
and some mana potions, just in case
 
:)
 
wtf is a circus tube ?
 
when you reduce
and you want to take the sum of array of numbers, how do you parse when the array is full of string numbers?
let list1 = PDL.purchaseDataList.filter(x => x.fi == PPDL.ppowerDataList[i1].name && x.wod == "Withdrawal").map(x => x.cost).reduce((a, b) => a + b, 0);
and in the console.log, i get a concatenated string of numbers, yea it makes sense why, but how do i fix?
can i parse 'x.cost'? parseInt(x.cost)
 
@erotavlas "tube" means "metro"
 
Friday, Friday, gotta get down on (Black) Friday. https://goo.gl/oQgMv6
 
5:46 PM
yea
 
can't believe I didn't think to search for this earlier
 
how was I not aware of season 3 of Mr Robot?
I guess it's because I had better things to do
 
unlikely
 
So... The other day our washing machine provider was hacked. And unencrypted(!) password, official details (name, adress, ID card info) was leaked on pastebin. - Turned out to be a simple sql injection in the password field was all that was needed.
Now the company responsible went back up today. But the only difference was a simple 5 liner.
$("#PwdInput").keyup(function() {
    NewString = $("#PwdInput").val();
    NewString = NewString.replace(/"|'|`|,/g,'');
    NewString = NewString.replace(/"\//g,'');
    NewString = NewString.replace(/"\\/g,'');
}
So I told them I still could access their database by simply circumventing that inputfield verification in my browser. I'm a saint right?
Got banned from using the washing machines and basement storage room in response -.-
 
6:01 PM
well, actual validation/sanitation happens in the backend, has nothing to do with what your browser sends
 
@Mosho Does not (well that's what I told them).
 
how do you know what they changed?
I mean, did you actually manage to get access to their database?
or just assume you can because of the front-end changes
 
Cause I could still see my password being sent unencrypted.
 
So you just assumed
 
@paul23 has nothing to do with it
sending clear text password is generally fine if done through a secure connection
 
6:06 PM
While true I kind of wanted to "ask for proof they now handle my personal identity safely".
 
sure, that's a reasonable request
but you accused them of not having upgraded their security instead :P
 
Well I actually warned them that I could access the database a year before the hack already. (I noticed I could simply use someone else's credentials/money by login in into mine and then just replacing the ID in the url with some other ID). They refused to acknowledge this until the hack which put everything online anyone would ever need to forge my identity.
Strangely the building owner organization says they can't change to another security firm since they have a 10 year agreement.
 
@ssube aaaaand... ordered. 540 bucks for the printer, priority delivery and shipping insurance. can't. fucking. wait.
 
goddamn you too?
 
3d printer?
 
6:15 PM
oh, yeah, baby
 
6:41 PM
Is it true in JavaScript that they are not dynamically sized? That when we do a push internally it has to create a new array and copy over all the values? Also that has to know the size of the array at compile time?
 
which printer?
 
7:08 PM
Man I almost missed the most sacred holiday of the room
happy BLACK Friday @KendallFrey @rlemon @FlorianMargaine @Luggage @ssube @SterlingArcher @ShrekOverflow
sorry for double ping :P
 
cr-10 is 12v right?
 
not sure
 
'bout to buy an e3d v6
 
I think so
the e3d v6 works with it so it must be I guess?
 
they com ein 12 and 24v versions
probably just the heater cartridge it comes with..
 
7:10 PM
yeah
ah yeah good point
 
so, cheap to fix if I get it wrong
 
12v
I had to buy some of those
have a ton of extras now lol
 
i don't want to blow a lot of money on nozzles, but one hardened steel might be good, for running abrasive stuff through. 0.4?
 
yeah I was trying to really determine the cost tbh
I mean 0.4 brass ones are so cheap
it would take around 12 or so to make up the price of one steel one I think
however if you want to do any food safe stuff anyway the hardened steel is the way to go
since the brass ones have lead
 
i thought I heard that some of the abrasives can widen a brass one in a single print
 
7:15 PM
I ALMOST bought a new hotend + steel the other day so if you do, def want to hear your thoughts
yeah I think it really depends on the abrasiveness and length of time on the print
the only somewhat abrasive stuff I have is wood but I use a 0.6 and its still fine, but the carbon I guess is a brass nozzle killer
the other benefit though is your bowden tube setup
 
JicamaJS is the best JS
 
you don't have to push it all the way through, it never gets hot
it sounds like a nice upgrade overall though tbh how much is it like $50?
 
47 pounds.. whatever that is
did you need the wider 0.6 for wood?
 
I just read varying accounts of people saying it clogged their 0.4, some said it didn't though
so to play it safe I just threw a 0.6 on
 
Have you guys ever had trouble getting the extruder to grab the filament when putting it in? I had to struggle with it for like 10 minutes yesterday before it started extruding.
 
7:26 PM
no
(yet)
 
7:37 PM
@paul23 lol. amazing
@Luggage cr-10, yes
total newbie I am, idea about how any of it works, or what any of the specs mean, I have not
but I sure know my long time dream of playing warhammer 40k just got a little closer to reality
 
learn as you go. the cr-10 comes with everything you need to start.
 
i'd get the cr-10
but honestly i have no clue what to print
and you probably need trig to design the 3d models
 
trig?
also, what kind of lame excuse is "i have no clue what to print"? do you think anyone has any idea what to print? ;)
 
7:58 PM
I still don't
besides printer parts
 
game recommendations?
 
rimworld
 
@Shmiddty KSP, duh
 
hi
can anybody help me with this question
0
Q: componentWillReceiveProps method doesn't run anymore when using redux api call

SandroI'm going to call api using redux: i used axios,history,react-redux,react-router-native,react-router,,redux-promise-middleware,redux-thunk component to make api call using redux: I made Reducers folder and put all my reducer file there in their own file and combine them in a main file like this ...

 
so ... has the directory structure for frontend projects acquired some standard practices in these past years?
or is still at the "make shit up and then write a post about it on medium" stage?
 
8:11 PM
"frontend" is a little broad
 
JS/CSS/HTML application that consumes remote API
 
I mean
it's a little broad to have a standard directory structure
the only constant structure you would see is having src and build
it's a little like saying "python standard directory structure"
 
well ... so are there any insightful medium posts about it?
:P
 
I never stressed enough about it to google
normally I just pick a boilerplate I like when starting something new and roll with it
I assume everyone else does the same :P
 
I am trying to avoid picking a boilerplace, since it probably will be outdated by the time NPM finished to run
ehh ,.. ok, I'll just try to do something similar to what I am used to in PHP
 
8:18 PM
taking example from PHP is always a great idea
 
... since you have not actually seen how I write PHP, I don't you should go with "sarcasm" as your default
 
sure, let me adjust my settings
 
9:07 PM
@Loktar @ssube @Luggage check out my new honker of a hot end.
the front fan rubber thingies need to be pulled off after this print
 
nice. trendy noctua fans with hipster-blue fang
(i'm jealous)
 
haha nice man
 
9:36 PM
I don't even know where the fan is
 
that fan setup is like a mankini on a czech tourist: very niiiice
 
google mankini
oh
 
ungoogle mankini
 
and czech tourist because it's hairy?
 
@rlemon noctua?
 
damn
!!sleep or try to do something useful or chill the fuck out
 
@towc chill the fuck out
 
!!chill on youtube or chill on mr robot
 
@towc chill on mr robot
 
@tereško yes
 
9:49 PM
:D
 
10:28 PM
is it possible to have global variables when using webpack?
 
yes
(function(){
	// insert some code here
})()
just like you can create global variables from inside that
 
so if i say a = 3 in one module can i access a in another?
 
think again
actually, maybe
depends on your webpack presets
try it out
 
@AlexBollbach Yeah, but you should export it
Don't use globals
 
^
 
10:32 PM
its more convenient to use globals in this case
mainly because i dont want to have to import the function in every file i use it in
@towc apparently global is undefined in my webpack builds
 
@AlexBollbach use window
but I still greatly discourage it
 
ill be fine lol
 
if you need to reuse a function in so many files that it becomes a problem, you probably need to rethink your code structure
 
probably
*
its a log function that i might throw away in an hour
concern yourself not with the perfection of my structure :)
 
10:36 PM
unless you know what you're doing very well, and I doubt that's your case, as you asked how to do that thing
@AlexBollbach if that's going to need to be read by anyone else, I'm bloody concerned alright :P
 
thanks
i know programmers can't resist an opportunity to admonish another programmer on best practices
 
sometimes it's for good reasons
 
what i mean is they can't resist the chance
as if i haven't heard "don't use globals" 1000 times before
its patronizing
 
yet here you are
using globals
 
hmm
how could that be
i might be stupid right?
or stubborn
 
10:40 PM
probably
 
that's my guess
 
let me guess how many hours you spent on a chat room every day?
is it.. more than 5?
 
yeah
I'm what you call an internet troll
 
i've noticed how the greater number of hours some one spends on chatrooms the greater the likelihood they will insult my intelligence
 
I wait around for someone who needs help
then I pretend to be helping out while instead I'm getting them mad
 
10:41 PM
but also the narrower their own intelligence is
and pedantic even
 
because as a matter of fact, I have no experience in this field
I just come here because I get kicks out of watching people be offended
 
sounds fruitful
 
actively trying to bring down the whole development community with the least amount of effort possible
good talk. Now let's deescalate
 
now trying to burn things down i don't totally despise
its advising me on best practices that i mind
ill use globals precisely as much as i care
 
@AlexBollbach Hi, my name is Matei, did you have a question we could help with?
 
10:43 PM
and unless you have commit access on the same repo as me you can't tell me not too!
and even that i'll slip one global through
 
sure, you do that then :)
but don't expect to get much help from us
 
i = will
its funny to me that you can't ask the question "how do you write a singleton" without getting an answer that judges the wisdom of writing one
like just answer the question
 
@AlexBollbach how do I get away with murder? I don't have much time
it raises questions, doesn't it?
 
@Luggage what the shit? tornado just passed through
 
if not, there's probably something wrong with you
 
10:45 PM
i've ran out of feed
 
@rlemon you ok?
 
no, I lost a chicken
 
@AlexBollbach So we're not allowed to give you advice on how not to do things?
 
Hi all, I'm arun can i ask one question? I'm newbie to java script
 
@ArunBaskar Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
10:47 PM
@rlemon nothing on the news
was it appropriately dangerous?
 
rimworld
 
oh
-_-
you lemon, I was worried
this is no way to treat your mother
I had so many questions
> did Luggage start the tornado? Why'd you tell him? Was it the first name that popped up in autocomplete so that you could make sure someone would be reading fast-ish and alert others?
> since when do you have chickens?
> was the tornado on the streets? How does it pass through?
> only one chicken lost?
for some reason I thought chicken was its own plural
 
It maybe simple question for you guys but I'm surfing around three days in net. I have a button which will change the color of it based on its click, like on first click count =1 and it will reflect red color likewise three colors. This button is in one table. I have successfully stored the other information into mysql and retrieve it. my problem is about the button thing. please let me know how to do this if anyone have time to look at this
 
what's the question?
 
how to store the button clicks and display it from the database?
 
11:01 PM
what part of it are you stuck at?
can you get the event from the button?
can you send it over to a backend?
can the backend receive it?
can the backend send it to a database?
can the database receive it?
can both the backend and database process the data correctly?
(sure, the database is part of the backend, but you get my gist)
 
I'm sorry @towc I can't convey my problem in this. My english is not that much good.
 
I see
so, how am I supposed to help?
you can pay me so I can spend a couple of hours sitting around trying to understand your problem
 
how much?
 
my rate is £25/hr
also, I'm joking
 

« first day (2596 days earlier)      last day (2353 days later) »