« first day (2051 days earlier)      last day (3120 days later) » 

00:00
versioning your classes? ugh.
good luck with that.
if objects are not allowed then metaphors must not be allowed
no one said 'not allowed', just not always the solution
well, if you classes then two sherrif's will come into your office and take your business away
watch out k
The problem I ran into is that javascript just doesn't have a lot of support for other paradigms
sure it does.
00:01
an object represents a real thing, in one place. what else do you do with one thing? scatter it across free functions?
Well ideally you'd have some data structure that stores your state/properties
Then you'd pass that to a function
screw inheritance and polymorphism all that crap. a class models a "thing"
Then the function would transform the struct and return the updated version
Which is a really powerful pattern and I've found that it works very well
ohh, what was that js library that let you 'describe changes'?
But it's such a pain in the ass to write code that way in javascript
00:03
it was like immutable js but from the other direction.. wish I could remember the name
@Luggage If you introduce new requirements which bring incompatible changes, you introduce a new version. Simple, right? Of course it won't work if your whole system is a mess of entangled eventhandlers and globals (he mentions the eventhandlers), but that has hardly anything to do with classes.
No, sometimes you have to make a change that requires you to redo a huge chunk of your inheritance tree
i just try to keep my base classes as light as possible, compose, and refactor if I have to.
I started using immutable records for my base classes
@le_m that's what i understood when you mentioned versioning
00:06
In other words, I do what that articels says NOT to. But I was already aware of the risk and am careful to keep them light. I'm the only dev on the project so it's easy to control.
if you're running v2 against v3 code then expect things to break?
@Meredith but then aren't you making your base classes too complicated?
It's literally just a struct
Oh nvm
sounds like a really obscure edge case
00:08
It doesn't happen all the time
But it happens
@SomeKittens I think it was you that linked some JS library where you 'described state changes'. Any idea what I am talking about?
And when it happens, companies go out of business
Perhaps the problem with JS is that there are no tools that support easy and simple OO coding / refactoring. Thus strong discipline is required in a dev team, which often isnt there
You are right about the discipline, but I'm not sure what magical tool would to that for you.
Our backend is written in C# and there still a ton of bugs because of OO
That's partly why we're rewriting it in node
00:12
@Meredith what will you be doing differently?
okay actually that's too large of a question to ask now
i'm about to go to bed in like 30 seconds D:
Not having a rigid inheritance structure is the first priority
I think it is a moot point in js
it's not like it has types
You don't need types
k, night all
ty for the comments ^^
and instead of declaratively specifying scope chain, you assign a value to .prototype
00:13
You shouldn't touch the prototype at all
whether it is auto generated or not makes no difference
the prototype chain is the prototype chain
point is: it is almost already a bunch of free functions
with 'this'/call/apply prototype chain search for properties sprinkled on top
what's wrong with that? You organize it how you want.
it is easy to not use OOP in js because of duck typing
Ignoring the ES6 class sugar, JS is just a handful of primitives (objects, functions, arrays) and you can use them 'like classes' or with many other patterns.
nothing wrong with it
I am saying it is already so close to a bunch of free functions, that it is easy to say dont use any OOP
00:18
I guess I agree, but you almost make the lack of some strict imposition of structure sound bad.
no, I don't want it to sound bad. I like the ability to be dynamic. some languages are restrictive so it becomes a pain to "pass around" arbitrary types to random functions. templates can work but it can cause an explosion of instantiations
in js, it is a non-issue, so free functions are fine if you really want to
but I'm also for adopting the idioms and paradigms of the language I am using. When I use c#, i'm all about strict types, and I love generics.
Free functions aren't fine
You should at least group them into modules
The point is that functions shouldn't own their state
well of course you try to be strict and clean and have a consistent api and behavior
And the state shouldn't own the functions
00:22
the functions own the state
agreed (with @Meredith ) . I have some functions in JS that I apply to different sets of state. I even have a wrapper that exposes one style of object (plain JS object) as another (backbone-style object, ugh) so that I can re-use the code. I love JS for that.
js is amazing for wrappers/hooks
at one point it was so permissive that undefined = 5 worked, lol
and now that node 6 has proxies.. I am salivating.
gonna abuse that so hard.
@doug65536 tthat kind of permissiveness was never good, though
The problem with transforms and data being completely separate though is that javascript just doesn't have the facilities for it
@Luggage yeah, "didn't think of that" design bugs can be very bad
00:26
So it's really annoying to write code that way
shows that the first implementation just let undefined go through normal symbol lookup. that shows that he was not micro-optimizing anything in the slightest, just banging out code
the way many projects start.
I would treat it as a special token and just use a literal value AST node
like the website for obamacare.
while (if = with) throw = for(continue)
eat that, js parser
thankfully it is too strict for that nonsense
00:36
I liked it better with assignment.
yeah, lol
any one interested in a React Native contracting gig? Really interesting product being made by great people who could use some extra help.
00:49
ahh, Redux was the thing I was trying to think of earlier: redux.js.org/docs/basics/Reducers.html
@SterlingArcher dildo == penis && dildo !== penis
01:41
@rlemon hahah wtf
Dudes I got a GIANT FUCKING ORC
I thought orcs would be taller. I'm not scared of that little guy.
lol
don't be so sure
 
1 hour later…
03:16
@KendallFrey The last remaining space shuttle external propellant tank
My new house.
@rlemon shooped because pixels
seen
b+
so is overwatch any good?
not that I can play
Oh my god that movie gave me nightmares. I realized too late it wasn't good for my 10-year old appendix.
@Shmiddty yeah, kind of
03:25
I watched it at around that age.
wow, FF SVG support is bad
but I also was into horror films
there's a list of attributes that are unimplemented on <text>
you can't write svg in FF, your attributes probably won't do anything and when a real browser shows it, suddenly everything is supported and it is all messed up, or vice versa
04:01
I was watching tales from the crypt at < 10 yo
never really found most horror films scary
04:34
except for the notebook
that movie was terrifying
05:14
I have a list of sports in the database. I bring these sports with ajax call on page load and show them with checkboxes in a dashboard. An employee can update his choice just by checking or unchecking the checkboxes. My problem is to handle the update process. Currently, I am sending all checked choices (Id of sports) to the database and deleting all previous choices and inserting new choices again
@ChanchalZoarder 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.
. Though it is working properly, I think the process is not perfect. Can anyone suggest any perfect way?
Is there anyone?
05:43
no
It's the weekend..
@ChanchalZoarder in a transaction?
if not, it is possible for other clients to see half-updated data
if you're inside a transaction, that should be fine. it isn't 100+ options right?
 
2 hours later…
08:12
How is it going guys?
I am looking for some suggestions, I made a little gallery that you can choose a folder and it will display all your videos and images in that folder on the page with some minor paging, but I want to add some cool features
I am going to put it in a jsfiddle now and link it
Give me a sec
make it mode based and add vim like keybindings.
What do you mean mode based?
Excuse my sloppy code, I wrote some of it a while ago and will rewrite a lot of it
It only works in chrome at the moment though
like vim has different modes - visual, insert, normal, etc.
Just click on toggle full mode
When I see vim I think of the text editor in linux... I will check out what vim is now hold on
vim is indeed that very text editor
08:23
Google won.
Hmm, I should write a framework for web apps which allows you to make modal apps with vim like keybindings and commands
We have something like that already
The DOM API
You guys have any suggestions for my little gallery?
08:25
include cat pics
If you have cat pics in the folder you select your problem is solved
I wanted to do keyword search... but that means I have to write ajax... and I don't really want to run a localhost on the pc I am right now
So that will have to wait
> that you can choose a folder
from?
From your local hdd
Test it in chrome
@Chris very nice :) ui needs some improvement but even without that it is already highly usable and infact less sucky than some popular image viewers. good job
The paging is a bit broken, because I tried to add the auto loading thing from 9gag
Thank you :D
08:27
jesus christ that shit's creepy
@littlepootis ho ho, DOM API, anyone? :P
whenever Firefox gets this "feature", I hope it ships with a flag to disable it.
You do not have to worry you are safe... it is not really linking to your file, it doesn't even know the path, it just uses the tmp path
I skimmed over your code and knew it is safe to use. But that's not always possible in user-facing sites. minified code and dynamic inputs etc.
Dude, you have access to everything that's in the folder.
08:32
lol
The only problem I cannot solve is making mpg videos play in the browser... I am still working on a solution
And my progress bar doesn't seem to work
> 83: goto(0);
I can handle keyword tags, but I will have to get my localhost running for that, and I want this as lightweight as possible so I think I will skip the adding and searching of keywords
Is anyone else having trouble connecting to freenode?
> You are banned from this server- Please do not spam users or channels on freenode. Contact kline.net with questions (2016/5/28 08.08)
wtf?
08:36
Haha
I am connected to Freenode since >2 months. can't see this issue
yes, 2 months without any disconnects
@AwalGarg wow
I should.. try with a VPN..
@SomeGuy read that last week. hilarious and funny
VPN doesn't work
08:40
lolol @riemon, that theme
!!afk lunch
@littlepootis you know what is scary? In internet explorer you can get the actual path of the file, in chrome you can't it gives you a fakepath :D
@Chris littlepootis is afk: lunch
little: it is fixed now
09:03
@AwalGarg That stepping debugger article is so good!
ikr. jlong's blog in general is pretty good
It's blowing my mind, haha
Reminds me of 2 weeks ago when I learned about Lisp's macros
Lots of mindblowing stuff lately. I like not having to go to college
@AwalGarg Yeah, I'll look through the backlog as well later. Got so much to read
What have you been reading / working on, btw?
whats up bro?
@SomeGuy work related stuff, mostly. I am thinking of starting reading books in ink instead of on screen - so I am gonna order a couple CS books soon.
@AwalGarg littlepootis is afk: lunch
09:11
@AwalGarg Haha, I was thinking about that too. Which books are you considering getting?
@SomeGuy that microservices one, and I'd look for some more. If you have any recommendations, do tell
I've heard so much about SICP that I'm considering at least skimming through it
Not now, though. Got enough material to last me a long time
I can't decide which kind of books to read. There are domain specific knowledge ones, so like a book on haskell or JS which teaches you just those things. And I don't find these much interesting at all, unless they are like 7 languages in 7 weeks which teach you a lot of things in a blast. Then there are more on philosophy side with titles like "being a better programmer" etc. dunno if they are any good. Then language/platform agnostic stuff (like that microservices one)...
I doubt there's a way to tell what kinds you'd enjoy without having tried
I think I'd enjoy the last kind
Also I prefer lightweight books which could be read within a week even on a tight schedule. Too long of a book might suffer from me losing interest mid-way.
Maybe you should work on that?
you mean training myself to not lose interest?
I think having discipline is fairly important
yeah that's fair
09:21
Whether you do it by sheer grit or by reigniting your interest somehow, I do think it's valuable
Oh, speaking of, are you still working out? :P
on and off
Better than nothing
yeah. one thing I really want to work on myself is to stop myself from getting distracted by new things and leaving old ones midway :P
the idea-fairy hits often and blows away past projects in a sweep
Yeah, it's something we all struggle with, isn't it? :p
09:24
I think learning German and working out have helped me a lot in that regard. Got a lot better at being consistent with stuff
One thing I wish to try is to organize ideas I get. And shift more of thinking/idealizing part to pen'n'paper from screen.
I sit too much in front of the screen. Like >6 hours a day.
Yeah, same here. Considering getting a standing desk to help with that
ah yeah, that does indeed sound very promising. no "getting up" part which is the most difficult :P
I get exhausted from sitting, really. I get up every 15-20 mins anyway
wow really? I sit for long periods at once. And when I get up that's for getting more water
09:29
Yeah, I can't sit for extended periods usually
@doug65536 No it's not a transaction. But I have to show all the options because clients can uncheck his/her existing choice. Option is not more than 30
@Chris wow
@PeeyushKushwaha nice :D
@AwalGarg wow, that's.. grate
@AwalGarg The "Theory in Practice" series by O'Reilly is really good.
@AwalGarg Trust me. That's not too much.
I spend more than twice as much as you do.
Write Great Code (vol I - IV), The Art of * by Starch, Reilly, Manning's Soft Skills, Programming from the Ground Up, etc..
Teach yourself Java in 24 hours
09:57
@littlepootis will have a look, thanks
10:24
!/summon 19132
!/help
!/live
!!summon 19132
@TheLittleNaruto I will appear in that room after 1 more invocation(s)
Oops
Somebody post this message: !!summon 19132
!!eval "!!summon 19132"
@TheLittleNaruto "!!summon 19132"
!!summon 19132
Thanks :)
10:29
Hello ppl!
@SwatiMaheshwari 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.
hello @Swati
!!help
@TheLittleNaruto Information on interacting with me can be found at this page
Why are you not talking in there ? @CapricaSix D:
!!/live 19132
@TheLittleNaruto I'm afraid I can't let you do that, TheLittleNaruto
@littlepootis @SomeGuy I just setup a phabricator project for "self-management". lets see how it goes.
Tasks and bugs?
Written in PHP so literally anyone can contribute, even if they have no idea how to program.
11:00
yeah... right...
It was on their main page...
is it cheap to use github pages as your main company website?
not even to bother getting a custom domain, just mysite.github.io
11:18
It's stupid
Obviously it is cheap. It is free.
Can always find exceptions to "no question is stupid" in this room... sigh
also ghpages are static..
Any of you guys use fetch? will be supported in edge 14!
11:50
Morning
!!unsummon 19132
@TheLittleNaruto That didn't make much sense. Maybe you meant: unsummon
@TheLittleNaruto I will leave this room after 1 more invocation(s)
why does node's require not care about which directory separator you use (forward or backslash) but express does?
11:56
if someone said your work was decent, would you take it as a complement?
depends on his reaction.
Somebody post this : !!unsummon 19132
!!unsummon 19132
without formatting
I am sick of your tantrums

« first day (2051 days earlier)      last day (3120 days later) »