« first day (2497 days earlier)      last day (2678 days later) » 

00:02
🚽
00:40
@MadaraUchiha why not type the injected properties?
good morning lovelies
ello
hi All good morning
i am working on Reg ex for Card Expiry Date , mm\yyyy.
The data validation should require the date entered by the applicant to be a future date.
but htis expression accepting the mm/yy format also can any one help me
^(0[1-9]|1[0-2]|[1-9])\/(1[4-9]|[2-9][0-9]|20[1-9][1-9])$"
0
Q: Regex expiration date MM/YYYY

Ayoubich EscobarI'm trying to find a regex pattern to validate credit card expiration date. The format is MM/YYYY 00/0000 -> Not accepted 02/0000 -> Not accepted 00/2016 -> Not accepted 02/2016 -> accepted 12/2016 -> acceptedenter code here 13/2016 -> Not accepted the two number of the year must be 20 the yea...

00:51
but then you'll have to update the regex each month if you go down that route
A K
A K
need quick sql help
!!tell AK welcome
A K
A K
given a table, print all names of pairs of employees where the first employee's salary is lower than other
@AK 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.
A K
A K
wut, i'm a regular here lol...
00:53
> need quick sql help
you sure? :P
A K
A K
lol...
thank u @ster
thank u @SterlingArcher
> Ster
@SterlingArcher We should join forces and become Ster Frey
only on SterFreydays
nailed it
but this is accepting the past years (0[1-9]|10|11|12)/20[0-9]{2}$
its accepting 2015
00:56
@SterlingArcher Fun fact: I own freyed.ca. It's not a strong pun, but it's a pun nonetheless.
im afreyed that's not a very good pun
@derp That's because you're pronouncing my name wrong
can you spell it phoentically?
fry
it's not complicated
@GayathriMohan then you'll have to customize that with the current date, making sure that 20[0-9]{2} takes into account that it needs to be greater than 2015. Of course, that logic, you'll have to change it in the year 2100
01:00
@SterlingArcher i m not that familiar so far i managed to 20[1-9]{2} which is accepting from 2011
Regex is absolutely the wrong solution for comparing dates.
Like, ridiculously wrong
^
You're better of with something like
Like Date
or moment.js
eh i don't feel like writing it all out. Get the input, split on "/" and compare against the current date
has anyone setup a local dev situation where you can save a file a rebuild your build and have the browser refresh?
i mean.. i know webpack-dev-server does this, and i wasn't using it, but I found myself needing to create my own server and now i have lost this save-to-reload feature
01:08
meteor does that automatically, but it doesn't cache anything so it's super slow
not sure what meteor is
the thing i'm worried about is i have to re webpack my source and that takes a couple seconds alone. webpack-dev-server serves your build from memory i've heard which seems difficult to reimplement yourself
so my ganja dealer thought I was an underground cop because I was too polite, and ditched me when I asked for bigger quantities at a time.
why would you re-implement it
kids: don't be too polite
i probably wouldn't
01:12
@FélixGagnon-Grenier Kids: don't buy illegal items/drugs
but let me expand, i had to create my own express server so that i could improve my situation with react-router. this issue where you reload and it servers you a non existent route.
but now that i'm using my own server, i lose the webpack-dev-server caching of build and all its features etc..
@Loktar hmmmmyeah ok, that is fair
not fair that things are seemingly arbitrarily illegal though :p
oh. ooohhhh I see ;)
@AlexBollbach github.com/remy/nodemon for nodejs auto -- and I think webpack has a flag you can set so it rebuilds on change without dev server
01:16
i already use nodemon
not sure if that reloads tho?
> nodemon will watch the files in the directory in which nodemon was started, and if any files change, nodemon will automatically restart your node application.
no, that's what the webpack hotloader is for
nodemon restarts the server, hot loader restarts the client
the thing with webpack dev server is it serves from memory so its fast. i hope the webpack flag you mentioned isn't something that just runs webpack in working dir on save. because i could write a SH-script to do that and it'd be too slow
ill look into it, you know the flag name?
not off the top of my head
sorry
sigh. i made a front end node project, and an api node project and now I want to merge the two to run as one application and nothing works
I search global variable of javascript and it returns window.variable, tried to declare variable in the 1st script then transfer it to the second one. the value is undefined.
why it isn't working?
01:24
something weird about how <script> is implement.works i guess??
<script>

var boo = window.test
</script>
<script>
window.test = "test"
alert("test")
</script>

<script>
alert(window.test)
</script>
last script tag alerts "text"
go figure..
where does it get text from
yes where does the text came from
window isn't defined in jsfiddle
var test="1";
var boo = window.test;

console.log(window.test);
run this in your console
"window isn't defined in jsfiddle" . -- yes it is
Uncaught SyntaxError: Unexpected token <
ohhh so ill test it on sublime instead
01:28
window is defined in jsfiddle
it has its own window independent of your tab
2
Q: In JSFiddle, why is this global variable not defined on `window`?

Sushant PrasadI have this code in a fiddle: var a = 1; function b() { var a = 10; alert(window.a); } b(); Why is a is undefined here? It's already defined in global namespace, i.e., window. (See the fiddle for an example of this unexpected behavior.)

it needs a specific wrapper
use "no wrap <head>" option
Oh it is working on sublime. I wanted to test it first at jsfiddle cus its easy to compile but then the result isn't what i expected. Error Btw thanks for thelp!
Hello a question about the meaning of a sentence from mdn docs: *The executor function is executed immediately by the Promise implementation, passing resolve and reject functions (the executor is called before the Promise constructor even returns the created object). * Who pass what to whom?
Oops, I've update the link~
I understand that, exactly when a Promise is created from new Promise() the executor (that which will execute the asynchronous action and resolve it with its provided resolutions) is called.
I'd hazard that "the executor is called Before [...]" really means that the executor starts executing the async action in the Promise's constructor
01:43
Do you need a license plate ready if you buy a used motorcycle privately?
function executor (resolve, reject) { console.log(resolve, reject); };
a = new Promise(executor);
lol, sorry I'm still not clear about the subject of passing...
Does it mean that the two handlers be passed to the Promise object? or?
Or it means the Promise implementation pass ... ?
[Function] [Function]? @phenomnomnominal
@Niing pass
o_o !?
02:00
@Niing no, the Promise itself has no knowledge of resolve or reject.
unless you add them with then and catch. stuff added through then and catch will be passed, in turn, the result of what is called inside the executor function for both resolve and reject
@Niing Have a look at this: jsfiddle.net/LgLey900 I've made a fake promise class that just console.logs which method was called (instead of calling .then like a real promise would). The place where resolve/reject get PASSED into the executor function has a comment above it
hnmmm, it would seem my limited understanding was really off the mark
@Niing The Promise implementation passes resolve and reject functions into the executor function that you pass into the Promise constructor.
thank you :) I'm thinking
!!>( promise = new Promise((resolve,reject)=>resolve('I am resolved')),promise.then(x=> x))
02:12
@Arrow "I am resolved"
Now why does that evaluate to a value
Must be a Caprica thing
magic
it's because of globals brah
Morning!
promise is a global variable
02:15
Well yeah, but Caprica returned a string
the result of the expression is a promise, not a string
you are also forgetting the comma operator
No I'm not
!!> Promise.reject("Nazis")
@KendallFrey "Nazis"
weird
!!> new Promise(() => {})
@KendallFrey Maximum execution time exceeded
02:18
well shit
she awaits on promises? that's neat
AHA
@Zirak I simultaneously love you and hate you
!!>fetch('https://rest.zk.io/test/1').then(x=>x.json())
well that makes sense now
@david "ReferenceError: fetch is not defined"
02:22
no fetch? how limiting
It is slightly humourous to see a German localization of a game label a health bar "Gesundheit"
async is going to make promises obsolete
web assembly is going to make javascript obs... still good.
@Arrow Er no, async is going to make promises more useful
it's funny how the word Gesundheit sounds like the worst part of the sneeze. the part where the mucus gurgles in your throat
02:32
You must sneeze differently than everyone I've ever met.
how,
how would you use them together?
async and promises?
ya, I feel like you use one or the other not at the same time
async and promises are like hamburgers and beef. You can eat beef without a hamburger, but it's so much better in a hamburger.
Hamburgers are made with beef. async is made with promises.
can you come up with any examples?
02:38
Of... what?
async with await with promise chain
What does a promise "chain" have to do with anything?
(What does that even mean here?)
O your point is that async is made with promises, not that you would ever use them together
You can't use async without promises...
user6820627
Can I use yield with promises?
02:43
I can't believe I was trying to read bluebird source code just for learn a little bit more about promise.
has anyone gotten react-hot-loader to work?
@LearnHowToBeTransparent ya they are in the works. I don't think async generators are out yet
I think generators were a way to do something like async before async
user6820627
but what are generators for?
to stop execution of the function at a value
02:48
@LearnHowToBeTransparent for generating an array-like list of values on demand
user6820627
@KendallFrey so it's lazy array?
kinda
an iterator, to be precise
is there something easier that react-hot-reload. it seems awfully involved just to get page reload on save
isn't hot reload the one that doesn't reload the page on save?
it just swaps out the new/old components?
reloading on save kinda just happens by default
with the dev server
yea but the dev server had a problem with react-router
it would reload on some route and Cannot Get /route
so i create my own server to address that
user6820627
Why in this function, 4 isn't logged?
user6820627
function* counting() {
	while (1) {
		let x = yield 0;
		console.log(x);
	}
}
const gen = counting();
gen.next(4);
gen.next(6);
gen.next(1);
@AlexBollbach You just need to add historyApiFallback: true to your devServer section in the webpack config file
you don't need to create your own server
ok let me try that..
for arguments sake tho, what if i did want to control the server and use my own?
then it will be more work
03:00
I told you it stops execution of the function
@david now i just get "Cannot Get /" when I run webpack-dev-server
i noticed that the OP on that SO question has a couple of additional elements in his entry array in his webpack config
i just have the location to my App component
we all had Stacy's mom growing up.
03:17
@Shrek I won a 1v4 with Fiora in URF. They didn't know what hit them.
:O
HOLY FUCK I wanna play
@Shmiddty you got skype?
err discord?
03:32
first time using induction stove
fucking science
lol I set it to high and it destroyed my burgers in 60 seconds
i might burn me some popcorn
Why would you put burgers on a stove?
does anyone here use express.js? i've written my api, but it's just got about 40 lines of app.get, app.post etc for all the end points. is this just how it is, or is there another way to declare a lot of api end points/routes?
@littlepootis because they taste exactly the same
true
03:49
@Shrek what are you playing?
@hsimah i'm learning it too, i think you use the express router to section out your code?
@david League of Legends
also, did hyou get answered :3
like app.use('/calendar', calenderRouter);
i uhh...don't know
@derp ah, I'll look into that
let me know what you find!
03:51
it's annoying because there are so many tutorials that use a basic router, which is fine. but there's a big jump to the next level and very few how-to or best-practices. I've just muddled through, and it all works fine. Somtimes I just wonder if I am being a numpty or not lol
sounds like my career
lol
@Shrek It was kinda a half answer, but had some good ideas
Since express is not opinionated, that's what it is, no best-practices.
I will probably advocate switching to a system of migration files that get checked in with the rest of our code
similar to the knex migrations we use to keep our DBs in sync
I just need to figure out how to make them not get run multiple times
and some way of dealing with failures
03:55
ive spent the last 4 hours trying to get live reload to work in webpack ..........
what the hell is wrong with your web people,, why do you have so many thingsssss
Is this article about promise still apply? should I read it?
@AlexBollbach because we have the attention span of squirrels and are attracted by new shinies?
@Niing How about you read it and let us know?
i just want to CODE.. not spent my entire night preparing to
I'm finding resources to learn more about promise, but it's an 2012 article :\ I'm reading it
03:58
@AlexBollbach Most of a career in software is reading and preparing. Welcome to the fastest moving sector in business!
i'm talking about my own projects.. not my career! hah
@Niing Did you start with the MDN docs?
ok somehow one of the random and not knowingly made changes caused reload to work with react router finally..
Basically, just make sure you're learning about native promises, not promise frameworks
i think the crux of it might have been making webpack output its bundle to my project root instead of, previously, my /dist dir
03:59
@AlexBollbach You could just use create-react-app
Yes, but I stuck at mdn docs
Comes boxed with live reload and HMR
i was using that
but i'm a masochist and i don't like to use things that make my live easier
but i think my fix involved this..
Project is running at http://localhost:8080/
webpack output is served from /
404s will fallback to /index.html

before the 404's would fallback on .. i think / .. but my index.html was actual in the dist/ dir

so by making webpack build the bundle to / i think i resolved that problem. though this seems like an imperfect solution because i should be able to build bundles to /dist or /build or w/e and not have react router routes break!!
04:02
localhost:8080/webpack-dev-server/
Facepalm in 3... 2.... 1....
This is why you RTFM
Hell, pretty sure it tells you that in the commandline output when you spin up a new app from create-react-app
[checks]
I still not very clear about the part it say passing resolve and reject ... from mdn docs @monners
you can facepalm even harder because i don't even know what you said
And I found a rabbit hole explaining it here
Life is short, but docs.
not sure which FM I should R either since there's always like 50 manuals for any react/webpack/hot-loading/babelified-component-loading-bundler-task
A K
A K
what's so hard about promises?
04:07
ohhh please!!
why do people do that
"whats so hard about [x]"
A K
A K
:D
what's so hard about everything
@AlexBollbach You're running your app by running npm start, correct?
whats so hard about quantum electro dynamics..
no, webpack-dev-server
A K
A K
what's the purpose of your app?
But you started with create-react-app, right?
A K
A K
04:08
are you setting up your own back end?
to generate annoying questions for this chat room ;)
i was earlier this evening..
argh. in my dev env my stuff works fine. deploy it and now webpack is throwing up a million errors
but no i'm just running webpack dev server, atm
A K
A K
what are you using to serve your app?
@AlexBollbach Did you, or did you not, start this project by running create-react-app?
04:09
@AK
I don't care how you're running it
@Niing the resolve and reject is how the promise knows when the promise is 'done'
@monners
did not
A K
A K
he created his own webpack config from scratch
but he's struggling with configuring react hot reload
now i'm asking, what are you using for your server
10 mins ago, by Alex Bollbach
i was using that
04:10
thats right. i'm trying to figure out why react-router wasn't working on page reloads. to be clear, i solved it. i just don't know why what i did solved it.
and once the promise is 'done', it'll know that it can run the next thing which is usually chained with then
I give up, you're on your own.
you are starkly not understanding what i've said @monners
i think you've exhausted monner's care factor today xD
A K
A K
he's asking you details so he can give you the proper guidance
04:11
i said a bunch of times that i got hot reload to work. but that i wanted to understand why it wasn't working
@derp Tag! It's all yours, buddy
ohhi
I'm gonna go drink enough to forget this ever happened
are there a lot of craft brews in melbourne?
the plan was to drink until the pain's over. but whats worse, the pain or the hangover?
04:13
hey anyone have any experience with generating word docs from node?
@derp Yes.
@monners, any brews you'd recommend in particular?
i'm going vacationing down there next week
It's James Squire, they have seasonal microbrews that they make at the hotel
sweet!
A K
A K
what's the taste of an average au beer? for example, american beer taste like watery piss
04:16
that's like asking what does food taste like
A K
A K
haha
I'll tell ya what it doesn't taste like: American beer
australian beer is like american beer but weaker
though there are lots of smaller breweries making better stuff these days
04:17
And what is Australian beer?
well, XXXX, VB, Coopers
i like coopers...
wouldn't touch the other two though
come to think about it....i don't usually see VB on tap in most pubs
A K
A K
@derp not sure how to do that, but i used fs.writeFile and i write .docx as the extension
Tooheys
but overseas...its everywhre
04:18
Oh, you mean like the commercial crap. I can't remember the last time I drank beer that wasn't at least an IPA
Wild Yak's pretty good
Can get that everywhere in Melbourne
I went to a novelty Australian bar in London. They had Tooheys New in bottles. Bottles shipped from Australia. It was cheaper to buy, in the bar, in London, than it is to buy at a bottle shop here.
@AK nah i need to generate it from a bunch of data and format it in a certain way, thanks anyways thoguh
@hsimah probably because it was on clearance
oh if you ever come to canberra, bent spoke does some pretty good beer
I was in Tassie a few years ago and theres a cascade stout not available in Qld
it was the bomb
A K
A K
sounds like its going to be a really messy job
I also like White Rabit Dark
A K
A K
04:21
st. bernardus on top is amazing
tap
but it's so hard finding it
@AlexBollbach are you using the HtmlWebpackPlugin?
i dont really drink much these days though. i drank too much bundy draught in my twenties lol
When I run my project I get very similar output to you, but I have an extra line:
`Content not from webpack is served from /Users/david/[blah]/dist`
A K
A K
you need to serve static content
@hsimah Ugh, that stuff's so tart.
04:38
;( i also love gin
not a fan of dark beers @monners?
I love dark beer, just not that one
James Squire's Ace of Spades is amazing
So I'm buying my bike next week. I can't decide between a 2009 ducati monster 696 or a 2017 kawasaki z650
Ducati, obviously
Am I likely to have a lot of negotiation power if I'm paying in cash?
04:41
@david yes i just started using it an hour ago
Are you buying from a store?
Then yeah, should do
Just remember to walk away if they don't budge (and you're not being entirely unreasonable)
The ducati is 6500, but the KBB retail suggestion is 5300
Any suggested "firm price"?
That's entirely down to you
Start an 200 below suggested retail and work from there?
04:47
Oh, and I assume a personal check is not a valid form of payment here?
Nor literal cash xD
i was staying at the beach a few years ago and was bored, so we went into an open house for a unit for sale. it was $600,000
there was some arab dude asking if he could pay in cash and get a $100,000 discount
he meant literal cash too
lol
They don't even drink water, to them wine is water.
Islam is a non-drinking religion o.o
!!/quote
Well that didn't work
do I need fs as a dependency in my package.json file? it looks like it is part of node itself

« first day (2497 days earlier)      last day (2678 days later) »