« first day (2415 days earlier)      last day (2516 days later) » 

12:34 AM
@doesnt_matter how high are you
 
1:00 AM
@littlepootis I only go high when I am going for the miles high club!, otherwise I follow what my role model michelle obama said, ' when they go low, we go high' !
 
 
3 hours later…
3:44 AM
Html5 drag API: Can I set tolerance value on the decision whether a drag entering occurred?
 
4:21 AM
@Allenph send me your resume,
 
Camel-casing is for Java, not Javascript.
 
@TomRussell Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
@TomRussell what?
 
Just a comment from peanut gallery.
 
> In the 1970s and 1980s, medial capitals were adopted as a standard or alternative naming convention for multi-word identifiers in several programming languages. The precise origin of the convention in computer programming has not yet been settled. A 1954 conference proceedings[30] informally referred to IBM's Speedcoding system as "SpeedCo". Christopher Strachey's paper on GPM (1965),[31] shows a program that includes some medial capital identifiers, including "NextCh" and "WriteSymbol".
Java was developed in 1995 iirc
 
4:32 AM
!!wiki javascript
 
@RexAdrivan You iz in mindjail
 
@rlemon how did you put html on this link? rlemon.github.io
 
5:06 AM
hola mis amigos
 
5:38 AM
Good morning everyone
if you have an app with express as web server implemented as app.get, app.post as usual, how would you replace it with koa ?
without having to write the whole thing
another way of looking at would be, if you have a greenfield project, how would I integrate express so that I can replace it with koa or another web server if necessary later on
 
morning!
 
5:56 AM
morning
 
6:33 AM
 
Oh my. That's amazing.
 
@Dasaru Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
good after noon to all..
 
Good afternoon guys
 
@DeepSinghBaweja Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
6:47 AM
Sure bro
 
 
2 hours later…
8:53 AM
holy sterling! Is it only me or was it that at some point ~37% of all of the currencies were represented by bitcoin?
on May 24, at ~14:30, the value of bitcoin was 2737 usd. According [the official btc amount graph](https://blockchain.info/charts/total-bitcoins) on that day, at 01:00, there were 16349725 btc in circulation. That means that their complessive value at 14:30 must have been slightly above 16349725 * 2737 in usd: 44749197325, or 44.7 TRILLION.
The next part is kind of shady, but I remember an estimate for all of the money in currency out there being ~120 trillion. 44.7/120 = 0.3725, so more than 1/3 of all of the money represented by currency in that moment was btc
that, to me, is mindblowing
 
9:28 AM
How do you protect yourself from hash algo changes in the future? Let's say I am using bcrypt and want to use md5 later on?
 
you don't "protect" from hash changes
that's not how it works
that's like saying "I'm wearing short sleeves because it's hot outside today. How do I protect against long sleeves, if tomorrow it might be cold?"
 
well i want to be able to wear long sleeves when I want to. I don't want to get stuck with short sleeves when the weather is cold.
If I do wear long sleeves, I don't want any problems
 
oh so you mean, how do I switch between hashing algos?
 
well yes in a way... But I want to somehow have some boundaries so that switching between hashing algos is less painful for me and my users
I dont want to directly point my password field to the hashing algo. Then you are stuck with it and wont be easy to change later on
 
there's no single clean way that I know of. Probably easiest and maybe safest is that when you want to switch, you keep both the A (old algo) db as well the B db, for a while, then when users log in again, you first check on the server if the password corresponds with the hash on the A db using A, and if that's the case, you remove that entry from the A db, compute it for the B db, and that's one user done, with not much of an added memory
after maybe a week, send an email to whoever hadn't logged in to please log in, in order to "consolidate server mechanics" or something, and repeat the week afterwards, until you feel like everyone else are dead users and you can remove them from the login system, so you delete them from A db, and therefore get rid of A db
 
10:02 AM
@towc Thanks. How do you strengthen the password without forcing users to create a strong password? What are the problems of getting your application to add specific characters to the end of the password to strengthen the password security?
 
you can use a timed salting algorithm of some sort
 
i thought bcrpyt does that already
 
it already has a salt, but nothing prevents you from adding more
in some cases it's a really bad idea, because if the salt is known, the hash space is very greatly reduced
and a salt on a salt may actually give out more info than only 1 salt
 
timed hashing will only protect you from brute force attacks..I wanted to create a strong password on the fly before the hashing happens. If the user chooses to create a weak password like "123456", my app will detect and add a predefined character set before the hashing, so the password will be"123456&jsakdfj;la&skd". This still does not protect you if the database was stolen. They will be able to tell it by looking at that fixed character set and you are doomed again
What other layer can you add on top of hashing the password?
 
and from rainbow tables, if the person doesn't know the salt and the salt is long enough
yes, it doesn't protect you from a stolen database really, but it's still an additional step
if the person has all of the hash data and full knowledge of the algorithm, and the passwords aren't strong enough, he will be able to find them no matter what
 
11:04 AM
@GokhanDilek That idea is called a salt btw, and bcrypt does that for you
If you're using php just use the password_hash function, really
 
@Zirak PHP ? I think you are in the wrong room.
 
If you're talking about how to authenticate a user after you change your hashing algorithm, I think there's that exact question on SO
@phenomnomnominal Forget that one the acoustic version is phenomenonomnominally better youtu.be/evBgLWQwAFA?t=538
 
Yes this one here : https://stackoverflow.com/questions/6469913/how-to-migrate-a-password-hash
My question was how to really design user authentication systm with hashing algorithm so that I can easily change the algorithm without having to change several files in my user authentication module
 
@GokhanDilek Making it a function doesn't fly?
 
@Zirak :)
 
11:11 AM
What problem exactly are you facing?
 
@GokhanDilek PHP is just JavaScript without callbacks. duh
 
@littlepootis That's another way of looking at it. I like the description
@Zirak lets say i have a user model which has a method savePassword
i import bycrypt library
then call bcrypt.hash to has the password.
now my save function is coupled to this particular hashing mechanism.
how do you even test this since it is one way hash? Dont tell me to use bycrypt.compare function :)
 
There're two ways to view this:
(1) That makes sense. If you change algo you change something fundamental and have to couple it with a migration strategy.
(2) Write your own module called `dileks-awesome-module` with a `hash` function, it does it own thing, `savePassword` never changes
 
you mean like a barrier between the savefunction and the has function ?
so my awesome module will import the hash library?
 
11:19 AM
Again, two ways to go about testing:
(1) `hash` is idempotent, so given a constant input you get a constant output
(2) You don't need to test the hash function, that's not your job. When testing, mock the hashing algo and make it return some constant
@GokhanDilek yeah
 
mock the hashing algo. How? It twists my brain :D
Also maybe mock the timing as well ?
 
Why would you test the hashing algo?
 
Is there a function to escape quotes?
 
function hash (potato) { return potato; }
 
@Zirak I won't then
 
11:23 AM
Maybe I'm in the wrong and I'm missing something, that's always possible
 
Anyone runs laravel 5.4 with vue.js in hot mode?
 
alot of people
What's hot mode?
 
@Zirak Should you also hash other sensitive data? like usernames emails? WHat are the disadvantages of doing so?
 
no
usernames are not sensitive data
 
@GokhanDilek Think about that for a second. What does hashing do to a certain blob of information? Why do we do it for some data and not other?
 
11:30 AM
@Zirak I guess thats correct
 
And how would they know the usernames?
 
If you don't know it then you run in not correct.
 
Dont worry about usernames, lets say I have a tabular data structure with some sensitive data God knows what, some police mission critical information
i want to securely store this. How would you do it? I want to minimise the risk in case if the database was stolen
 
Do you know the difference between hashing and encrypting?
 
Not 100 percent
 
11:41 AM
Start out with reading up on that
 
all i know at the moment is hashing is one way, you cannot go back to its original
but with encryption you can go back
but what does bcrypt.compare function do then? Doesnt it take to the original form while comparing it?(I havent looked at how it is implemented yet).
 
12:36 PM
I think I'm in front of the largest problem I've ever stumbled into in writing JS and I don't think main site can help me. I have this huge project and I have no idea where to start and no will to start it despite the many benefits I would get from it. Damn!
What's your experience with starting huge personal projects?
 
No planning, dive in face first
 
commit 40,000 lines of code. delete 35,000 of them throughout.
 
Don't forget to use single letter variables as often as possible
Also who needs comments?
 
Assuming I did this, I'd start with the thing that looks easiest to me, which is readying the databases, without even knowing how I need them to be structured in order to serve my code.
Right now I'm trying to understand how to load a div in an existing HTML page through a google extension but I'm not even sure where I want to put the div, and it will probably go in a place that's usually occupied by a pane that can be hidden (so I should monitor when it is hidden and add the div I guess...
 
God no I was joking, plan
 
12:44 PM
@BenFortune Hah, I'm well past that stage luckily
@BenFortune yes I got it
I was following along
 
if you break the project up into 100's of little bite sized problems, you can probably get main to write the entire thing.
 
This damn thing is too huge to plan for and I need would like to get a tentative version with minimal functionality working in a little more than 24 hours :(
@rlemon lol, no good.
 
Just do what @corvid does
 
@Zachiel My 2c? Don't start huge personal projects, or huge projects in general, start small projects and increment
 
@KendallFrey ^
"stuck on eve? I don't think so"
 
12:47 PM
That's a big head
 
"Huge" projects are unrewarding until the point they're finished. Small projects can give you gratification
So it's a matter of personal motivation and knowing thyself
 
!!are you still just a glorified hangman bot?
 
@rlemon No
 
@Zirak Ah, that'd be a great thing to do but it's the breadht of the argument that baffles me. For the most basic implementation I need a form with several checkboxes, cross-validation, several buttons each launching a function and a field I can copy-paste from where to return the result of these functions (that are input strings for a different field in the original page)
 
Sounds like a challenge, but a surmountable one
 
12:52 PM
By cross validation I mean each checkbox corresponds to several attributes (e.g. a,b,c for checkbox 1, b,d,e for 2,...), sometimes with a fixed value, sometimes with a value provided on a separate field, slider or what-have-you, and I need to take the greatest of each attribute and list the attribute name, the greatest value and the checkbox name that provided the greatest value for each attribute.
(you're my plastic duck today, people)
And it's preferable if I do this in pure JS, even if I'm used to jQuery, for... reasons.
 
Separate. If you want to use jquery to read/write to checkboxes, that's fine
 
But copy those values into a plain JS structure to do all your logic.
 
@Luggage I was suggested node and angular for the fields but I have no idea how to use them. I discovered I can't read documentation because I keep forgetting which entities are called this or that.
 
@rlemon heh
 
1:01 PM
@Zachiel step 1: learn to read documentation
 
@rlemon Oh god that was an infuriating read
 
Anyway, step 1) back to my target page, and trying to determine how to know when the collapsibile menu is collapsed, so that I can place my DIV there. Seems reasonable to me.
 
Flexbox is actually just magic.
 
@rlemon For me, the biggest challenge in returning from Eve isn't delta-V, it's ladders.
 
Send a ladder mission, if you have to (need KAS)
 
1:17 PM
@Luggage Not that, it's the physical challenge of getting a ladder from the cockpit to the ground
 
oh
the extendable ladder (at the bottom of the craft) and permanent ladders up the side, maybe.
 
1:31 PM
YouTube Red is available now in Canada, I guess
 
@KendallFrey just put one on the craft.. open it.. copy it and keep putting them all the way down.
It's a pain, but I wasn't aware it was a challenge.
 
2:29 PM
Hello
anyone here
 
@rlemon That's not the problem
 
2:56 PM
@FlorianMargaine Thanks, Florian "Disillusioner" Margaine
:|
@FlorianMargaine Ooh, that's so neat and organized! :D
 
 
1 hour later…
4:07 PM
Burqas should be banned because they block Vitamin D from sunlight – UKIP manifesto https://on.rt.com/8cvk
 
4:30 PM
    function getLongestElement(arr) {
var firstWord=[];
var secondWord=[];
for (var i=0; i<arr.length; i++) {
secondWord=arr[i];
firstWord=secondWord;
if(firstWord===secondWord)
{return firstWord;}
return secondWord;
}

}
var output = getLongestElement(['one', 'two', 'three']);
console.log(output);
 
@amarghodke Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
it returns one instead of three. why ??
 
 
1 hour later…
5:48 PM
@littlepootis burqa burqa jihad
 
hey all
no one here?
okay
bye no one
 
6:52 PM
Man I'm loving VueJS such a breath of fresh air in comparison to vanilla stuff
 
But have you tried Angular 4 ?
 
use jQuery
 
7:19 PM
I'd take Vue over Angular any day
 
7:39 PM
anyone here willing to walk me through how to do things in sailsjs?
 
I got that far, thanks :P
I've read all of the reference documentation
and some bits and pieces of the concepts part
I just feel like I know less than I started with
I just kind of need someone who can put things in metaphor and I can bombard with questions
(I've also had a look at the source of various "simple" sails apps)
 
I tried angular 2 and thought it was okay, but vue is way better. So simplistic to get on board with and you can expand out to pretty much anything you want alongside it.
 
only issue against vue is that there are so many plugins for angular that still makes angular programming so productive :/
 
Such as?
 
7:46 PM
which is kind of a sad argument in favour of angular, but it's true
 
Oh you mean everything
4315 for vue
 
yeah, was expecting a lot less tbf
 
Though angular has been out a lot longer so I would predict there's a lot of extra packages for each version
It's really great, plus I haven't really had a hard time plugging in things that don't have an existing vue package
 
fair enough :)
ideally soon enough I'll be able to make sails-vue apps and I'll be productive af
 
Could be a good place to look over if you did want to go that route
 
7:59 PM
I'm working on a little project where a csv file gets read and contents displayed (in a style similar to a blog or forum or comment section) with a "new post" button that opens a form that can be submitted that then gets saved to the csv file as well. -- There's a few more moving parts, error handling, etc. --- I started splitting separate concerns into include files, but my head is still aching a bit, and it's not even that complex yet.
I'm looking for resources on how to map the flow so I don't go direction spaghetti code. My understanding is Information Archetecture is a higher level, with users in mind etc. - I just need to map/understand the thing I'm working on, but I have no idea what to look for. -- Anyone know what I should read up on? Is there something like flow diagrams for this? What do you usually use to work out how you're going to structure your code?
My problem happens to be in HTML/PHP - but the principle of it (how to handle complexity / plan structure of the code) would probably apply to JS scripts too, so I'm asking here.
 
If your not opposed to UML, you could try designing event diagrams with sequence diagrams.
 
That sounds like exactly what I'm looking for. Not sure what UML is, but sequence diagrams would be awesome. I'll go read :) -- Dahell? A whole language for modelling flows? Neat
 
Unified Modelling language, A lot of software processes for complex parts of a system are normally designed before hand using sets of diagrams so once you come to implement you can be certain of how things work
 
@lix That sounds sooo useful (even just for like estimating how long something might take to build, and properly planning, and... wow, excited.)
 
For instance here you might generate some user stories, map those into an event diagram then go onto produce a sequence diagram of how things are supposed to work
 
8:06 PM
@lix user stories sounds like UX / IA again... unless you mean something specific like "user wants to post a new post to my blogthingy"
 
That's exactly what it is!
example stories might be "user needs to be able to upload CSV"
 
@lix Oh good, like a use case. In my UX class we were doing like the whole "stereotyping the heck out of our userbase by coming up with representative example users" etc. which seems unlikely to help me get my homework done today :D
 
Yup, very true
User stories > Use cases > Activity Diagram > sequence diagram
 
Although I appreciate the value of that too, but I'd end up building something different (cough better cough) than what the requirements ask for, because my user would get frustrated if every field is required (as the homework asks)
 
then you may optionally create a class diagram so you know how your classes may interact
 
8:08 PM
Sequence diagram is I think what I was looking for then --- Uh class diagram sounds good, but since this is PHP intro 1 we're still procedural not functional nor object oriented, so no classes yet
 
It's good practice to just do as much as is needed
Then if you still feel like your writing garbage go back to the design and work on it a bit more etc etc
 
@lix that's really useful, thanks! :) -- alright, I'll look up how to draw up the diagram and then review whether my files match that... And then I'll have to make a separate version where I just copy paste the includes back to where I called them, since the homework didn't ask for it and then I'll submit both versions and hope the instructor doesn't get annoyed.
 
@Julix no worries, best of luck
 
@lix yeah, upon looking at the language a little closer it seems like (no surprise for something that awesome) I'd definitively have to spend some time learning it before using it... - Probably not happening before today's deadline. But I'll look it up in the future. Now I know what to google for! Thanks for that
 
It's not exactly a language like you may be familiar with but rather a set of principles for creating programming related diagrams and how to approach a new project, what year are you in?
 
8:25 PM
@SomeGuy life ain't magic :P
 
@lix Well I started teaching myself web stuff in August last year (from psych background). I have no CS background whatsoever and it seems this course isn't teaching much of that either (just like PHP syntax and a couple use cases) -- apparently the second half will be object oriented php applications but it'll either be quite steep or it's overpromising or there will be much more learned this semseter (40 % through the course already)
 
You never know with CS courses as it's mostly compound learning, what you will learn in the next 2-3 months will far out weigh the amount you learned before hand
 
I also work as a jr web dev, but mostly frontend (semantic, accessible html; pixel-perfect CSS3; small behavior changes (that can't be done with CSS) with JS; bit of PHP for modifying WordPress child theme, thus why I chose to take this class --- I also did some AngularJS and ES6 problem solving, but that feels like forever ago now, even though it was just a few months)
@lix that's good to know... I went with the part-time program, since I left psychology to make cash asap (and it sort of worked), but I miss having solid fundamentals. I almost never write pseudo code for example... I just kind of jump in (research a bit) and test until it works (or I need to research more), then see how ugly the result is and work on it some more until it's a bit better - and that makes it hard to predict how long somethings going to take.
Do you write pseudo code or something like that? Do you use UML yourself?
 
Well it's good your putting the effort in!
It depends on what your creating to how much design you need to do, My recent big project I used UML because I wasn't the only person implementing the code. Where as smaller tasks where I'm the only developer I either just prototype right off the bat or create diagrams for things that are hard or perplexing
I write out pseudo code occasionally, as well as create smaller toy examples if I really want to know how something works
Ideally in the long run you'll abstract your codebase so parts of it don't become overwhelming and prototyping smaller pieces of code is easier
 
@lix I'm sure I wouldn't be employed currently if I didn't love problem solving so much. Makes it easy to put in the effort and also to keep learning, because I keep smelling the inefficiency all around me and my workflow and that pushes me to be motivated to learn to do better. -- But it also makes taking courses harder, because they expect so little of you at the beginning and I keep seeing "but what about this" and then try to build it, and then feel I don't have enough time - haha
 
8:40 PM
Yeah I can sympathize, If your good at keeping focused maybe get your projects done and work on side projects to accelerate your learning.
 
@lix Yeah, that's what I was working on, but sometimes pieces depend on each other, and I have to be careful on what to include or not to include so I don't call functions that don't exist in this file (or else exists in helper.php or something really obvious) -- because otherwise by next week (I only have a day or so a week where I really work on homework) I won't recall, and I don't want to annoy my prof -- and also it's just ugly.
 
Comments are you friends!
The bigger your projects get the more maintenance and commenting you should be doing :p
 
@lix is it okay practice to call stuff from include files and comment where it's from?
 
Give me an example :p
 
@Julix this sounds like a problem solved by namespaces.
 
8:44 PM
@FlorianMargaine so functions? - cause classes and other OOP stuff isn't available to me right now (not even objects) . I do have associative arrays... :D --- nevermind, found it! php.net/manual/en/language.namespaces.rationale.php -- pretty cool.
 
Are you using spl_autoload_register?
 
come on.
 
My bad didn't finish reading what he said
Might be an idea to look for a naming convention to use when programming which is different to the wordpress Mage / Helper stuff so you don't run into those problems of similar names, though as florian said namespaces are king here.
 
Oh for wordpress/work I would be allowed objects, classes, everything. It's encouraged that I learn OOP asap. - But for my homework I'm stuck to a simpler level. -- that could be a good thing, too, since I never learned the simple level in PHP and maybe this forces me to have stronger foundations rather than skipping it all? - But it doesn't feel that way right now.
@lix Tried finding it, failed to. There was a nice one on stackoverflow in some answer. It was basically saying that sometimes people abuse includes as though they were functions and just pass stuff between it in a way where not enough info about the origin is left behind. I thought that could be solved by commenting "this comes from that" but I felt reminded of go-to statements somehow. (Note I don't know much about them either, but I'm aware of a strong negative connotation :D )
 
9:01 PM
@Julix if you need comments to make your code readable, it's usually a sign that something is wrong.
 
9:21 PM
@Trasiva Good poll, however what's "afternoon" and "evening"? As in, what timezone?
 
Universal Global Time?
 
Universal Greeting Time, duh
@Zirak I had the same question, I was replied with "u no care, get out"
 
Umbilical Grooming Technician
 
more seriously: he's an American, obviously he meant US timezone.
 
9:23 PM
Underneath Gary's Testes
 
@FlorianMargaine PST or EST?
 
woop, browser has a dark theme now
 
@Zirak give or take a couple hours
2 days ago, by Trasiva
@FlorianMargaine Probably CST, as a whole for a majority of our users, they fall plus or minutes an hour or two from there.
 
But it's currently CDT!
...I think?
 
so, you know, the majority of people hanging around when he's here are in his timezone.
 
9:26 PM
The American users
 
I mean, "the majority of our users"
 
Non-Europeans/Asians/Africans
Or swans
@Trasiva THINK OF THE SWANS!
 
damn you and your swans, party-breaker one day, party-breaker forever?
 
@FlorianMargaine It'd be interesting to graph that. Didn't we use to have a map of the world?
 
stop feeding your fish goddamnit
 
9:27 PM
like, we flagged where we were
It'd be cool to make a heat map of this chat on the world, as in user activity per region
 
yeah, so cool
 
I'm not imagining it am I? We made a user map!
@BadgerCat You probably have it in hard-copy and printed out all over your desk
It's lacking, but it's something
 
wtf why I am not a regular? JK
little pootis is mostly on at night when nobody is around but hey I guess he is still a regular
 
You didn't add yourself in :P
 
don't know much about google maps or whatever this is can I edit it live
 
9:38 PM
See controls on the top left? See the icon next to the open hand?
 
yes added myself in NC how do I add the avatar
custom icon go it
 
¯\_(ツ)_/¯
 
I'm sure you'll figure it out
 
luggage is closest to me!
 
Hi guys !
I have a question about my react-redux app. I have several input field that update store when their field are updated. Then I have a "Search" button that does a fetch request with the data. My question is : when should I retrieve data from store ? should I retrieve it from action creator and pass it to action, should I retrieve i during action just before fetch, should I store in the props of my search button ?
 
9:41 PM
I wonder if it is bad idea to add other people
 
how dare thy insult my insult-heavy companion @littlepootis
pootis: we're at war here
you distract him, I'll sneak up behind him
but I'll probably trip and shatter my lambdas, so prepare a plan B that doesn't involve me just in case
 
little pootis is my friend no attack needed
 
@William Please don't
 
I suggest you read out loud the PHP docs to him, he won't be able to withstand it
or her. I don't want to assume any genders
 
or it.
if you don't want to assume genders, do it all the way.
 
9:43 PM
wtf little pootis is from india I thought
 
that's what he tells whoever isn't his friend
he has a family in greenland
he may or may not be a sausage roll
 
@Zirak classic
 
10:04 PM
@FlorianMargaine yes, I much agree. I like comments being for other things than code readability, like giving credit to whichever stackoverflow post a section was inspired by :P
I do a bunch of stuff to check whether the _FILES array contains a valid image and whether the _POST array contains all the necessary input. They're both related to handling the form submission, but since they're mostly unrelated I have them in separate files... but before finalizing and saving the submission I need to check if both is done properly. I'm tempted to pass stuff between the two, but since they're both from included files that would mean referencing things outside of their own scope
Maybe a new, higher scope is necessary to capture both and then they could just return things from within their own scope to the caller (one higher) who puts it all together... The functions are each > 50 lines - should be enough to justify moving them to their own file, right? ---- WordPress has done weird things to me. My js files were often much longer... -- but they were less confusing I guess (all these templates)
 

« first day (2415 days earlier)      last day (2516 days later) »