« first day (2304 days earlier)      last day (2867 days later) » 
00:00 - 19:0019:00 - 00:00

00:00
(and not that I'm actually very experienced with webgl/babel/webpack/react, but not sure how else to put it)
Angular 2?
hrmm... is there some kind of default webpack setting that removes console.log() from transpiled output? I can definitely not find them in the console, and would like some logs.. presets react, es2015, using babel-loader
try a fresh webpack project and test
and no, there isn't. If there is, you added it yourself somewhere else
hmmm... ok.
I mean, I normally use logs with webpack, I guess I musta borked something in this config
blaming yourself is always the way to go :)
00:10
welcome to javasript™
also, get lost @CapricaSix, the laast three times I lost to The Game in my life are because of you, in this room. I hope your bytes gets transformed to little endian without telling your OS
@FélixGagnon-Grenier ha, her bytes are already little endian
2
damnit
...turns out firebug is outdated afterall
 
2 hours later…
02:01
Is it a bad idea to initialize class members in constructor, as in this.name = "Sam" and this.die = () => console.log("Sam is dead.")? What if it's either that or not using a class?
As in defining member methods in the constructor?
yes, and properties
Properties are fine
Also allows private members via closure
Functions are a little weird
02:07
I just looked at some code that uses a factory method and realized that using a constructor-only class might be better
What are you trying to do?
Make my code as nice as possible? :P
What I have now is basically, well, a factory method
I think in normal OO you'd either use a factory or extend a base class that accepts name as a paramter
So technically what you're doing would be wrong, but OO is dumb so don't follow their rules
How is a base class nicer?
It's not
02:10
fwiw, I want my code to be largely OO
But it'd allow you to have a Sam and a Dave whereas your implementation would only allow a Sam
That's just an example, the actual values aren't constant
That's a bad example
A slightly more accurate example is...
const canvas = document.querySelector("canvas");
this.ctx = canvas.getContext("2d");
Where canvas is deliberately not exposed
and this.render = () => console.log(canvas)?
02:14
perhaps, yes
Go for it
that's weird
putting all in the constructor, that is
@FélixGagnon-Grenier But is it weirder than using a factory method?
I'd just make canvas public
Or call it _canvas or something
Or private.canvas
As a C# programmer first, I find pseudoprivate members abhorrent
02:29
your day to day life must be either really hard or a yuuuuge lie
this[uuid()].canvas = canvas
@KendallFrey not sure which I find weirder. in JS is the only time I really need to use them [factory methods], but all in constructor is... just really weird.
@Meredith Oh yeah, that reminds me. Non-enumerable Symbol properties would probably count as private.
I never learned how to use those
this[Symbol()][uuid()].canvas = canvas
That should keep it private
Well the symbol needs to be stored or the property is useless
and the symbol is a replacement for the UUID, not an addition
02:34
Yeah you wouldn't be able to enumerate it
And you wouldn't be able to manually access it
Although, hmm, the symbol itself would need to be a private property, which might be kinda circular
this[Date.now()].canvas = canvas
no better than the UUID
Then you can count how many processor cycles since you called it
Do some math
Make some assumptions that probably arent true
Boom, private methods
oh shit, are non-enumerable symbol properties even possible?
defineProperty with enumerable: false doesn't do the trick
oh, non-enumerability apparently doesn't hide anything
only excludes it from for..in et al
02:44
I think I got it
foo[uuid()].bar = md5(value)
Then you access it with while(!(uuid() in foo))
That's still not private, in addition to being useless everywhere
Once you guess the correct uuid, you use a rainbow table to access the value
03:32
yo
@FélixGagnon-Grenier are you in to help me with a tetris positioning algorithm?
tbh, I was just about to go out and drink so hard that I won't remember who I am so.. maybe next time
what time is it there? :)
here 4:50am
just woke up lol
03:47
it's beer o'clock, or 10:45
nn
pm
of course
beer o'clock ahaha
awesome
I fill fight holes alone xD
mmm beer
turns out working at a brewery is... awesome
04:08
@JzInqXc9Dg yeah who'd have thought? ;)
hehehe
hi
04:35
what is the one-word equivalent of: in the best possible way?
user6438653
05:01
Hey guys
user6438653
Hey @neoDev! Saw ya in discord.
One time I thought that it's good organise ourselves ITBWP, expecially for a very good cause. Today I realised that, when we think about dynamics, it's as if time slows down until to stand still and we try to imagine every single combination. Knowledge. Everything can be organised, even this message finds an appropriate allocation in its place.
Many times I thought about how to organise the stuff, every time, I imagine different things.
*ITBWP = In the best way possible
user6438653
true
:)
I am creating a tetris-shapes-positioner algorithm
user6438653
dang
user6438653
05:04
I'm creating a unicorn game.
really?
user6438653
It's another sugested one from my mum.
user6438653
This was the first one stickyballs.heroku.com
user6438653
Move the mouse (on mobile tap the screen) where you want the square to go.
Use the square to suck up pink and purble bubbles.
Don't touch the green one's the're bad.
The blue ones slow everything down.
The yellow ones speed everything up.
The blue ones give x2 score
The yellow ones give x6.66666
user6438653
Sorry, http:// not https://, that was the security warining
05:06
wow
it's so beautiful
user6438653
lol
with mine I only arrived here: jsfiddle.net/hamp6prp.... lol
user6438653
bye js
user6820627
05:22
@shad0wk 3 balls to lose a life? There should be 9 lives!
user6820627
and there should be a tutorial at the beginning
05:41
@SterlingArcher a bit
06:02
Hi Guys, so im trying to pass an object's function through another function
and it's not working
is it even possible?
I was able to pass arrow functions
let _bird = {
            gameObject: new GameObject("Bird GameObject",
                        [new SpriteRenderer(s_bird, [0, 1, 2, 1], 10),
                        new Update("Bird Update", this.update),
                        new Physics2D("Bird Physics2D", 0, 0.25)],
                        new Vector2(60 - s_bird[0].width/2, s_bird[0].height/2)),
            jump: 4.6,
            jump() {
                this.gameObject.getObject(Physics2D).velocity = -this.jump;
            },
            update() {
here's the object in decalring
and this is where the error occurs
new Update("Bird Update", this.update),
06:49
bind
 
3 hours later…
10:15
I wonder, is the Mars One still accepting candidates?
Hey guys
I just have a small question
Do I execute: "npm init" inside of "www" directory or outside of it?
I would be executing it in the project root (which should be a different location from document root)
I see.
Then how will I load a module ?
Cause the node_modules folder will be outside of it?
const module = require('module')
you use some blunder, like webpack to "compile" your code
10:20
okay 1 more thing, while creating a node project, should I use Node to server static files?
or apache for this purpose?
express
const
	express     = require('express'),
	app         = express(),
	server      = require('http').Server(app);

server.listen(process.env.PORT || 8000);

app.get('/', function(req, res){
	res.sendFile(__dirname + '/views/index.html');
});

app.use('/resources', express.static(__dirname+'/public/resources'));
then e.g.: localhost:8000/resources/css/style.css
etc.
just put "resources" inside "public" folder
@ZahidSaeed ok?
Thanks @neoDev
np yw
I'm trying to create a phonegap application
just for learning
I have a little experience with cordova and react-native
cordova is pratically same as doing a normal website
react-native should be more performant as use native stuff xD
I'm still a noob anyway....
!!afk yes, afk.
10:33
What should I go with? React or phonegap?
I didn't knew about react-native
I do know about React
Are they different?
11:10
@ZahidSaeed u there?
Hello Guys I Want to earn Advanced JavScript What should I do?
play around, read docs, books....
Which books ?
uhmm... don't know xD
this is why I'm noob (maybe)...
:D
You've been very helpful
:D
11:16
@MuradSofiyev lurk here.
You'll learn a lot.
Help others.
Rewrite libraries. Work on projects of small to medium scale.
create awesome stuff
Pickup some contract work that's not beyond you.
Yeah i try rewrite library ))
Aug 21 '16 at 16:09, by little pootis
Effective JavaScript, DOM Enlightenment, Third-Party JavaScript and Beautiful JavaScript by Anton.
Read these books.
Do you know open source projects for juniors?
Ok I read it
11:22
!!resources
@MuradSofiyev ^
@MuradSofiyev no idea
@littlepootis @CapricaSix Thank you verry much
yeah, a lot stuff.. didn't know
 
1 hour later…
12:39
🚀Why and how NASA uses Node.js: http://bit.ly/2k9MET6 https://t.co/3bgEt9UQ8x
user6820627
12:52
@neoDev still here?
yep
user6820627
@neoDev wanna try processing?
user6820627
not @ plnkr
sure
user6820627
@neoDev go to discord i will dm you
12:54
I am there and calling you xD
Yeah I'm @neoDev
user6820627
13:31
@neoDev hello?
@LearnHowToBeTransparent you were disappeared
user6820627
@neoDev i went to toilet
i'm there on discord
user6820627
Well, sometimes i disappear to hide my parent too
13:48
> Uh oh, Bitly can't show you the page you are trying to access.
@littlepootis It doesn't like you
yeah
That article is medium.com/@nodejs/… for those who got denied by bitly.
14:14
Anyone knows how I can get C below B and next to A?
Similarly to how floats work?
14:39
flex-direction: column
@BenFortune Hmm
Interesting
I'll see if I can adapt it
I actually don't think I can give a set height
flex: 1 should fill the height
@BenFortune Don't think it will
Unless I give a flex-basis
And IIRC, IE has bugs with that
Ah, okay
15:07
Hello can any help me to figure out why my answer is not attracting attention . stackoverflow.com/questions/881515/…
@DivyanshuRawat 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.
@CapricaSix okay I understand thanks !
@DivyanshuRawat well you answered a nearly 7 year old question and I guess that anyone looking for an answer does not scroll that far down since there already is a load of answers there
thanks @motaa
it will go up though if you get more +1's on your answer but that will take some time :)
15:15
I know it will take time
@motaa Did you find it helpful ?
hard to say because I have never had to deal with namespace in js :) plus currently I don't have much time to carefully read what you have written since I am currently working on my map project that is due on wednesday... Time is pressuring :D @DivyanshuRawat
@DivyanshuRawat needs more axe deodrant
@motaa I understand thank you so much for your time !
@littlepootis what ?
15:38
I'm storing to postgresql
even if datatype is "text", integers, objects can be stored...
assuming I only want to accept alphanumeric, what datatype I have to use?
@neoDev you mean datatype in postgres?
yep
under "text" datatype it says: "variable-length character string"
this means that accepts any character... right?
ye
but
i would go for character varying
tbh basically they are the same "under the hood"
so you can go either text or character varying
yes but, how to allow only alphanumeric?
so basically you have to set a constraint and the linked answer should help you on doing that :)
15:50
so they use character varying(n)
alias varchar(n)
and then apply the regex on it
is a good pratice in your opinion?
as I said varchar and text are the same
internally they are treated the same way
but docs do not say it
but think about it technically
also in the docs text has not the alias varchar(n)
285
Q: PostgreSQL: Difference between text and varchar (character varying)

Adam MatanWhat's the difference between the text data type and the character varying (varchar) data types? According to the documentation If character varying is used without length specifier, the type accepts strings of any size. The latter is a PostgreSQL extension. and In addition, PostgreSQL...

but tbh there is a DB chat on SO where some could be of more help :D
15:59
@motaa thanks but I like this chat. If you don't mind we can agree on that I will stop talking about db exactly now. :)
I like when everybody feel comfortable here ^.^
I don't mind you talking about DBs :)
it was just a suggestion that you might get more help there :D
pss: I've done it anyway xD
let's talk about JS!
it is cool every day more, isn't it?
well I might be the wrong person to ask since I am more a Java dude :D
WTH talked about Java mate?
you can go to Java room if you like it
but currently I am working on a map project that is browser based where I am currently building a fancy map legend
16:04
then you read that even NASA chooses it
what are you saying? :D
3 hours ago, by neoDev
🚀Why and how NASA uses Node.js: http://bit.ly/2k9MET6 https://t.co/3bgEt9UQ8x
hello everyone
ye
I see...Javascript coders
:)
to be honest I have nothing in particular to ask about Javascript right now. Rather I want to know about few experiences that you guys had whilde digging into large Javascript code base.
16:44
github, NOOOOOO
ah what you mean ..github is ofc but I don't know how come someone with some idea abotu javascript can make out the javascript code?
I don't understand what you just said.
I was screaming because github was unavailable, but it came back up (or it was just me).
haha oh sorry
:) I thought you answered my question
The weekends, especially right now, are very dead in here.
does anyone have some experience with d3?
16:50
A little.
actually I think it is more a plain js issue :D
Even better.
I got the following code hastebin.com/wofesofewe.php
and i get the following error: TypeError: layername.features.properties is undefined
the thing is that I have to "feed" d3 with an array of lat lon like explained here bl.ocks.org/phil-pedruco/7745589
Prove that layername.features.properties exists.
the thing is that layername got a features array and thats fine
but that array consits of object
so obviously I can't access iot like layername.features.properties
16:55
can you show me it's shape?
You said features is an array. What do you want from that array? Just the first element?
here is a short paste of the json file hastebin.com/ugalumihay.json
and I need to feed the properties.lat and properties.lon as an array
ohh, i see.
I guess I feed layername.features as data
so, data needs an array (just give it layername.features). Then in .attr("cx", and "cy", you map to the properties "lat" and "lon"
Bingo
d => d.properties.lat
Tomorrow evening, I will be enjoying 70-80 degree weather in Florida for a week. I'm gonna sit on a beach and drink all day.
17:03
watch out for crocodiles
and meth
I'll go swimming with the crocodiles while high on meth
and retirees
I am staying at a Golf resort while I'm there, so...
how'd the interview go dugger?
At Target? I thought it went well, but we'll see. I'll find out while I'm in Florida, probably drunk
This was the first time I had to write actual code on a whiteboard. The principal engineer made me do it, lol. I asked if I could just write pseudo code, and he said no
17:10
> "Does this whiteboard have auto-complete?"
pft, I don't use autocmplete anyways
you can't even spell it.
trueche
I'm gonna have to run to Target or something when I get down to FL to pick up swim shorts.
did you use tabs of spaces
17:25
When I try to set a property which was not there during compilation of model in mongoDB, then it is still getting inserted. I want to throw error in that case. Is this possible?
@rlemon My new electron boilerplate based on what I did to yours: webpack for both main and renderer, babel only transpiles what is needed for electron, not everything, two separate derived webpack configs (main/renderer): github.com/luggage66/electron-boilerplate
No major difference from what you have.. just cleaned up a bit.
@ankitbug94 mongo doesn't care about new properties, since it's schema-less. You just have to enforce your own rules.
I suggest JSON-schema.
You don't need to bundle when using electron
@ndugger I know. I made the same argument
<script>require('./path/to/ui')</script>
tadaa
Lemon was becasue he started from a web project and converted.. but then I thought: maybe it's not a bad idea, so you can use things like webpack's hot reload
But, i agree. I told him to just use babel and skip webpack, originally.
hot reload is one of the things I want to play with, next
I never got around to configuring it in any project of mine, yet.
oops, i commited dist.
wtf.. it was in my .gitignore
17:39
Yeah, last line... I see it too
that's strange
maybe i added it before or something..
There are better boilerplates.. but I am putting it all together so I understand the parts.
I do not understand why my query to postgres database is not working as expected
db.none('insert into users (username, password) values ($1, $2)', ['a', 'b' ])
What's the error?
user exists but it is recreated if I re-execute the query
you mean a duplicate?
17:43
different id, same username, same password
That's the correct behavior.
Either put logic* in your code to check and/or put a "unique constraint" on the field you'd like to be unique.
like the username.
but from docs I read that none() expects no results
this is why I used it rather than query()
anyway...
That is about what you expect to get from the database, not what is does with a command
17:46
@Luggage you mean I have to perform a select to check if username exists
then another query for insert?
or put a unique constraint on username.
then it'll throw an error when it's a duplicate.
I don't understand what you mean by "put a unique constraint on username"
have you googled "postgres unique contraint" ?
oh... understood
do you suggest the double query (select/insert) or the constraint?
Possibly both. The double quesy is good because you app should no being trying to make duplicates at all. It's not logical to make two users with the same name.
And the constrain is good because it'll prevent accidents.
17:49
hmm... I got what you mean. Security at any cost
since duplicate users can be a security risk, the extra check is good.
yes it makes sense. ok. thank you :)
@Luggage How to use JSON-schema in mongoose
18:09
@Luggage That's not necessarily true
A name isn't always a unique identifier
18:25
so, as I can't say that I studied in cambridge, is it okay to mention that I "attracted cambridge's interest"? Full story is that I got accepted into cambridge university, but not at the college I wanted, so the college reccommended me to other colleges (there are about 20), but none of them decided it was a good idea for me to study there
that's called "being pooled", very few people have that
it's not being accepted, but it's much better than being rejected, a very small percentage even makes it to interviews (there's no official statistic, but it's about 1/200), and only about 20% of the interviewed get any further, for the college I applied to
@towc Call it by its name, then. "Pooled in Cambridge" or something like that
you can see how it may get so many employers confused
I'd rather say something simple, and still not deceiving, but gives a good impression
If you want to discuss this as a positive point then great, you've got a conversation piece
Whether you'll be accepted or not won't hang on this nail
when I think of "pooled", I think of "cars" or "he got lost"
I also don't want them asking more questions about my education
right now it's "studied in oxford, and received interest from cambridge university"
heh
18:44
Leaving the for US :D
can I get query params from a post request with express.js without include additional modules?
I can get them from a GET request through req.query, but not from POST request
@neoDev should be the same
it seems to be not the same...
18:59
Webpack's default value for result.extensions is: [".webpack.js", ".web.js", ".js"]
Isn't this redundant?
And is there a downside to removing ".webpack.js"?
00:00 - 19:0019:00 - 00:00

« first day (2304 days earlier)      last day (2867 days later) »