« first day (2484 days earlier)      last day (2689 days later) » 

00:00
@Mosho lol wtf
have an exam tomorrow
so many memes today
hmf
spent 4 hours tonight playing with a custom initramfs, has 80 open tabs...
this dump was delicious: imgur.com/gallery/NttTu
00:24
How do I type in TS a mobx observable, i.e. const state: WhatDoITypeHere = observable({ ... })
it should be inferred
Is it has to be?
00:39
good morning lovelies
morn
@CatBoss what do you mean
I want the inner object to be typed according to some interface.
then use an object that implements that interface
That's what I did, split into two lines:
`const _state: MyType = { ... }; const state = observable(_state);` but that sucks
00:43
const state = observable(_state as MyType);
or const state: IObservableObject & MyTYpe = observable({});
@Julix yeah I'm a loser 😬
def inactive haha
ever since I got my current job
@rlemon thanks for all the kind words man
now kith
@Loktar did you finish grapple hero
no
I lost motivation as I was doing awesome on it
someone trademarked the name
makes sense
oh
so I was pissed and stepped away for a bit
00:51
Trademark Hero
that sucks :|
@Mosho IObservableObject is exactly what i was looking for. How could I have found that on my own?
yeah I just need to rename it, it's like 96% done.. so dang close
but I need a new logo now and stuff
just annoyed me idk
@CatBoss check the typing of observable
Grapple Heroine
and change the hooks to rubber bands with syringes attached
LOL
00:52
I sometimes need to read the code for the library or @types/foo
Sadly there's no comments in the d.ts file, this is the description
1 message moved to Trash can
@CatBoss Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
@CatBoss look at what the inferred type is
1 message moved to Trash can
@CatBoss Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
I could find IObservable there
but there are about 20 values it can return.. but on a second thought, i knew that i needed an object
probably would figure it out. thx.
00:54
that's why it's best to let it infer
01:08
looking at this house, was wondering why they mention the basement walkout but not the kitchen walkout
lol
huh, so nokia now owns bell labs
The last post on the blog that I read talked about how it had been a while and three jobs since the last post before then. Who would mistake being busy with being a "loser", especially when literally named victory? - Actually I vaguely recall a study about how things get done better if you give them to a busy person (because they know how to get shit done) :D
how did that happen
anyway, gotta run - best of luck with finding a new title and finishing the last 3 % :)
01:35
I'm having so much fun just doing this
Would I screw anything up adding IIS to a server that doesn't already have it?
01:47
Well, then it would have IIS on it. So that sucks.
02:08
@rlemon Would "caching" a circle and redrawing it be faster than .arc
03:07
@Tobiq Yeah, anything that you don't have to calculate each time should be cached
Hello everyBody :D
Morning
omg there is a tiger in the walking dead
spoilers
huh??? what?
03:14
is tiger news considered a spoiler
> My Advice To Anyone Starting A Business Is To Remember That Someday I Will Crush You - Jeff Bezos
Amazon, the modern day Romans
Crush you (with piles of cash)
03:35
@BenjaminGruenbaum hi there
are you drunk?
Does anyone know what will happen if u get an error in the node js server and its live?
Aren't we all?
will the whole thing crash?
@RachelDockter yes, if it's not handled
oh wow
i have to make mine pretty bullet proof then
03:38
Welcome to software development
Computers are jerks
you would typically handle errors, but even if you didn't you should have a process manager above your application which will restart the process
ah yes a restart would be nice
i have about 1k lines of code for this server, just 1 thing wrong and everything crashes
My node server has been running for a year. No crashes
ahahaha
looks like it has a ton of error handling on it
Oh, it's very robust
03:41
No react?
Isomorphic, with cleansed output
It's all very sophisticated, you wouldn't understand
@RachelDockter There are quite a few ways to make your node application restart if something goes wrong. I'd suggest looking at PM2, it works very well and is easy enough to set up. github.com/Unitech/pm2
sweet ill note that down, im not planning on setting mine up for another week or so, still working on it :D
david do u wanna see my webpage so far, u will be really impressed, it looks so good
probably the best thing ive ever done
Yeah! let me see
its fully multiplayer with nodejs, no sign up
03:50
if you had to colour something based on a status, what colour would you give to: Sending, Sent, Closed, Reopened and Overdue. I'm thinking Overdue = red, Closed = pale green, Sending = green-yellow, sent = green, reopened = blue?
wow, that's looking really slick
you've got the multiplayer wokring already?
that's like less than a week right?
yep, just a few small bugs to iron out. I did a node js project a while back so i did have to learn it
didnt*
the best thing is, the server holds multiple games. On the homepage 2 players can choose to play each other and it will create an instanced game for them where only them 2 can control it but anyone can spectate
its really something :D
Oh, is that a screenshot, not the design you're going to build?
yes thats a screenshot, ive already built it
im really proud of it
You should be, it's very impressive
this is like your first ever javascript project right?
and you have full multiplayer with a node server and everything
03:54
id say my 2nd. My first was a node snake game but it was just 1 canvas for everyone
yeh, the toughest part was actually the logic behind the game itself and not so much the server
Snap. Nice
thanks :)
I was gonna be a jerk and say why'd you make it look like windows 3.1
windows 3.1 was a great windows
haha im always open to improvment on the looks
03:59
i quite like the way it looks, the colours are really good too
Nah, it's fine
it feels like a chill go interface
yeh i went with browns because its usually old people playing on a real wooden board lol
Is the whole thing canvas, or just the board?
just the board
04:04
Helvetica Neue, lose the drop shadows, submit to App Store, fortune.
Wait, are drop shadows back in now?
*plaster annoying popup ads everywhere
*micropayments
those too
as in the border shadows on the white squares?
i thought they looked alright
Nah, the buttons
04:05
oh yeh u might be right
lol, it's all honestly fine. I just don't like the buttons and font.
But, as we've established, I'm a jerk
I wanna make a game too
the font can get abit too much as times but its a japense board game and i thought the font looked abit like japanese writing haha
how they do the swishes and the flicks really fast
where do i get to play this game
i feel left out
which i am used to, story of my life :(
my one? its not live yet
04:08
oh
nevermind then
idek how much it costs to host and get a cool domain
it's on node?
ge tit online for free
oh sweet
now i just need a cool domain, thats probably like £5
04:13
@RachelDockter, I belive Surge offers custom domains on their free plan.
it would be something like domain.surge.com wouldnt it
for free, yeah
I think you have to pay to use www.rachelsgame.com and point it there
not sure, though
I only use the free one
yeh, might be worth it if i can find a cheap one
anyone good at physics?
04:16
ah surge.sh, thought it would be something like that
thanks for the info :)
It might just be a redirect. I haven't used surge.
04:31
Hmm
@Tobiq what kind of physics?
vectors
Ask your question.
I'm trying to calculate rebound of two colliding circles
at the moment I'm calculating as if collisions are head-on
i wish to take into account the angles of collision
04:58
Hm, I've done that before.
05:08
sorry for spoiling that westeros has cell reception
lol
('1999, 3000'), [1999]);
('1998, 2020'), []);
what is the pattern here
I don't know but I do know that I am so 3008 and you're so 2000 and late.
odd numbered years?
('2017 - 2015'), []);
('2015 - 2015'), [2015]);
('1999 , 2000, , 2008'), [1999, 2000, 2008]);
('2015, 2014, 2010'), [2010, 2014, 2015]);
('1999, 3000'), [1999])
('1998, 2020'), []);
yes they are years
it looks like it's ordering them?
I'd say also only doing current and previous, but 1998 doesnt come out in the last one
05:17
ya
here is another ('2002-2005, 2002-2005, 2002 - 2005'), [2002, 2003, 2004, 2005])
okay, so it orders them. Years that have passed. Since 1998.
so when there is a dash, it means betweeen
however, we only get the between numbers when the first-greater than-second
all numbers need to be uniqe
and ordered
and they have to be real dates
so no 3000 or 2020
and greater than 1998
so under 18?
are you collecting children
i don't remember more than 1998 being a rule
('1998, 2020'), []);
('1999, 3000'), [1999])
05:23
3000 is not a real year so it gets removed
> 3000 is not a real year
no
so why doesn't 1998 come out?
I have no idea
@littlepootis by year I mean cannot exceed the current year
what's wrong with my insert where not exists query?
Insert into inventory ('item') VALUES ('TESTING') where not exists (Select * from inventory where item=''Barnakol)
it's not a real year. yet.
item=''Barnakol
05:25
yes not real year yet
@hsimah still has the error, i just misplaced the value outside
error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''item') VALUES ('TESTING') where not exists (Select * from inventory where item=' at line 1
is item the column name
i dont use mysql, but in t-sql you just do insert into inventory (items) values ('TESTING')
no quotes on the name
oh yes yse, i forgot.
i was testing it into my query browser but in my php the query you did was the same
'insert into inventory (item,item_type,price,remaining_qty,total_qty) VALUES ("'.$_POST['itemname'].' ('.$_POST['size'].')","'.$_POST['itemtype'].'","'.$_POST['price'].'",'.$qty.','.‌​$qty.') where not exists (Select * from inventory where item="'.$_POST['itemname'].' ('.$_POST['size'].')" ) ');
but lets takea aside the query in my php. still i have the error in the query
Insert into inventory (item) values ('testing') where not exists (Select * from inventory where item='testing')
05:33
this is the monstrosity for matching all my test cases lol
function parseRange(string) {
return [...new Set(string.split(',').map(x => x.includes('-') ? x.split('-').map(y => +y) : +x) .filter(x => Array.isArray(x) ? x[0] <= x[1] :x>1998 && x<= new Date().getFullYear()).reduceRight((x, y) =>x.concat(Array.isArray(y) ? Array(y[1] - y[0] + 1).fill().map((_, num) => y[0] + num) : y), []))].sort();}
it ain't pretty but it works
:)
and it's short,
hello, my twin mate (as per nickname)..
@ARrOw :|
yes my little twin brother?
from another country's mother.
I don't know what country your are from
its okay.
05:56
Hello
hi,any body give link for payment success page template to download
with order id,transaction id,amount,paid success like that
06:15
Yup i am still alive
mornings o/
@Arrow ...
@KarelG waz up?
how much time did it took you to build up that monster ?
not long initially, you should really blame the requirements not the solution :)
06:19
You don't care much about readability right.
funny enough, I can read that.
really easily.
eh, that's not a problem of requirements. Of some requirements can be vague or not consistent. The developer translates that to a code.
I can read that too, but not all js developers are skilled with the ES array functions or only having basic knowledge
lol at what point do you accommodate, and at what point should you simply be able to read and understand the nuances of javascript?
Some books are meant for toddlers, and some books are meant to explore and express the power of a large vocabulary :)
@KarelG That looks like a codegolf triple bogey
what do you mean with "triple bogey" ?
never heard of that expression
06:27
Here are the test cases
It's a golf term
assert.deepEqual(parseRange('2002-2005, 2002-2005, 2002 - 2005'), [2002, 2003, 2004, 2005]);
assert.deepEqual(parseRange('2017'), [2017]);
assert.deepEqual(parseRange('2017 - 2015'), []);
assert.deepEqual(parseRange('2015 - 2015'), [2015]);
assert.deepEqual(parseRange('1999 , 2000, , 2008'), [1999, 2000, 2008]);
assert.deepEqual(parseRange('2015, 2014, 2010'), [2010, 2014, 2015]);
assert.deepEqual(parseRange('1999, 3000'), [1999]);
assert.deepEqual(parseRange('1998, 2020'), []);
It means three over par
So... bad
come up with something shorter
i triple dog dare you
06:31
I think I could have done it shorter with reduce
06:56
hi
I have a question
i have one div inside of that i have four div with same class
ok
item
div class="text-center item" style="display:inline-block;margin-right:10px;width:auto;margin-bottom:10px;"><i class="fa fa-folder fa-3x" aria-hidden="true" style="cursor:pointer;color:rgb(254, 248, 182);text-shadow:1px 1px 1px rgba(0,0,0,0.50)"></i><br><span><input class="text-control" type="text"></span></div>
ok
no one is going to read your markup
06:58
ok
ok
ok
@Arrow u ok?
yea I'm ok
07:11
I'm trying to make folder system
with option add rename or delete
Mosho u there
yeah
what's the question?
can u have a look at fiddle
what about it?
i want to make text box editable on edit click
selected one
what have you tried?
07:13
i m not able to find which element has background color
you can check in fiddle
i tried has class
but its giving for all divs
what identifies an active box?
My Ubuntu beoke
background-color
you sure? look at the markup when you pick one
why does the background-color change
thats mean selected folder
07:18
1 message moved to Trash can
@AtalShrivastava Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
you would have an easier time trying to select the class that is applied to an active element
yeah but i'm not getting that
what aren't you getting
just search for active class name ...
i'm trying to get on click of edit button which div have active class
07:20
if there is one then you know the selected one
yes
if i used hasClass its not working in this case
Gutten morgen
@AtalShrivastava use a selector to select the "active" div
ok done that
got it
thanks
Goddamn windows
07:28
i like windows
How to setup html-webpack-plugin so that the generated .js and .html are in different folder?
I want to put .html in /dist while .js in /dist/javascript
using what
07:50
08:09
mm I just love seeing TODO comments in production code
ofcourse they are epic
everyone uses them in production code
TODO : Fix this before deploying to production
noice
tell IDE to throw compiler errors for //todo comments when you build
we do the same with commits
VS has the nice feature of bookmarks
which I strongly prefer over todo
what do bookmarks do?
08:17
How can I easily replace the value of two environment variables in GitLab CI for multiple projects? cc @ssube
I need to replace AWS credentials on like 40 projects
@Wietlol you płace them at Certain lines and can easily jump to each, Also you can give them names and desc.
and are other people able to see them?
Alright, it's the old-fashioned way :P
Hi Guys, In our company they are looking at using ES6 for production code.
@user168983 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.
We want to use babel to transpile to ES5
@user168983 A lot of people are doing that
But I was thinking does babel support all the features. I came across this kangax.github.io/compat-table/es6
08:53
Specify a subset of ES6 features you want to use. You probably don't need/want all of them
Yes Ii will do that.
For example under arrow "operator precedence" seems to be not supported.
Can I find any blog or good explanation of the features not supported.
I checked the babel.io site I could not find any.
@user168983 You probably don't want to have code that relies on operator precendence to function correctly anyway :P
I am new to javascript, So I was not able to understand with terminology like lexical "super" binding in constructors
@ol
@OliverSalzburg may be you are right. But now I dont understand what it is.
These things may not have any relevant effect in practice. They just note that the transpiler is not up to the spec. But that might not be required for your use case
Yes Thank you for the replies. Is there any resource where I can find quirks like these?

« first day (2484 days earlier)      last day (2689 days later) »