« first day (2010 days earlier)      last day (2956 days later) » 

1:11 AM
haha
 
user5020521
1:21 AM
hi guys I'm trying to geocode multiple fields and I noticed a difference between my coords and the google maps coords
 
user5020521
i.e. the last numbers of my coords are not equals
 
@Riccardo990 spherical ?
@SterlingArcher o/ bro!
 
user5020521
I can't understand you
 
user5020521
what is spherical?
 
@Riccardo990 when deriving coordinates do you keep in mind earth is a sphere ?
 
user5020521
1:23 AM
mmm I assume to keep it in mind
 
user5020521
but I'm not sure whether what you asked has to do with my problem
 
user5020521
and I don't know if it is important to say it but I'm using google maps geocoder class
 
user5020521
var address = document.getElementById("via").value;
    address += " " +document.getElementById("civico").value;
    address += " " +document.getElementById("cap").value;
    address += " " +document.getElementById("citta").value;
    address += " " +document.getElementById("prov").value;
 
user5020521
these are the field values that I'm attempting to pass to geocoder class
 
2:34 AM
is it possible to import a module like this?

var foo = './components/foo'
require(foo)
 
@Darick Should be. Have you tried it?
 
@KendallFrey its not working
cannot find module './components/foo'
 
3:24 AM
I snapped you all the summary of my drunken night out
baes
im drunk g2g buywe
@SterlingArcher
@phenomnomnominal
 
It was the best night out ever
there was this blonde girl and we became bffs
 
@BadgerCat I did won a hack-a-thon hungover and spent the rest of the day in bed with a migraine :( Glad you had fun, be safe!
!!afk watching ant man
 
3:47 AM
@BadgerCat Hahaha sounds like you had a fun time :p
 
 
2 hours later…
6:14 AM
0
Q: Why run method of this module isn't run?

user4913383In following example there are three modules, first one is required by second module. And this works when referenced using ng-app in div. But third module that goes by the name of someonesApp does not work. It's run method is not run when second module is being referenced using ng-app. Without fi...

 
@user4913383 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.
 
 
2 hours later…
7:55 AM
@littlepootis fuck I'm hungover
 
@BadgerCat Drink all the water you can fit in your stomach, feel better :)
 
Thanks
 
or get more alcohol, feel even better
 
No, I had too much yesterday
Everytime copy doesn't come with me to party, I get too drunk
He's the one moderating my drinks
 
8:39 AM
twitter.com/AylaMitten/status/721493430057066497 why do people find this so cute. it is just a stupid cat
 
youtube.com/watch?v=T5CSJMoxi7M why do people find this so cute. it is a just a stupid singer
 
no u >:(
 
@BadgerCat My trick is to stock up with water back at the apartment, and drink as much as possible before going to bed
 
@BadgerCat same, migrating a wordpress site is worse.
 
I may get up to pee in the middle of the night, but I'd get up with 75% less hangover.
 
8:45 AM
Why not just prevent it in the first place? There are ways, you know.
They've worked for me.
 
It is called "living in India"
 
@littlepootis Aside from not drinking alcohol?
 
@AwalGarg I'm more interested in how you found that thing
 
Drinking water is the best countermeasure I've found
 
and eating
 
8:48 AM
Better than commercial products and pills
 
@littlepootis someone I follow on twitter retweeted it
 
Eat kebabs
 
@BadgerCat Yeah, but you're coming home wasted at 3AM, water is far more likely to be handily available :P
 
Bae made me a quesadilla when I came home drunk
 
Eat while drinking.
 
8:49 AM
@MadaraUchiha if you sleep after 3 AM, how do you wake up to pee in the middle of the night?
wait, when do you even get up?
 
@AwalGarg Because when you sleep after 3AM, you turn off the programmer module and don't ask stupid questions about semantics
 
I am confused :(
@MadaraUchiha nananana that ain't never gonna happen!!
 
@AwalGarg Because you live in India :)
Right, lunch time
 
I successfully migrated a WordPress website. i feel alive
 
github.com/karliekloss?tab=activity look at all the commit messages
 
8:59 AM
@AwalGarg Done.
 
hmm... this karliekloss drama is interesting. on the one hand I appreciate the attempt for getting women in code and whatever, but... seriously the way they are doing this just makes them look stupid. if they want people to take them seriously, they'd have to ensure they don't look like jokers.
 
Oh wait, it's that woman.
 
yeah... that's the catch
 
9:47 AM
@AwalGarg To be fair, look at the other PRs on those repos
 
9:58 AM
Is there any way to pause setInterval when the browser tab is not in focus and resume when the page is reloaded and the tab is in focus?
 
requestAnimationFrame should do the trick
 
^--
 
@MadaraUchiha Hmm, was thinking about that request/response thing you said the other day. Maybe we should have/write a lib/framework whatever for node which abstracts it away the same way as php does. Hopefully that will equal the number of PHP and server-side-JS newbies :D
 
she's not the first person with non-meaningful commit messages. On work, i always advice to list changes made (in words), followed with == AUTHOR: name. By this, it's very easy to use git history to track changes ( + made by whom )
 
@AwalGarg PHP abstracts it away in the form of superglobals
 
10:09 AM
@MadaraUchiha we can do the same thing in a better way with compiled functions! (see node's require which appears to be a PHP like superglobal but is actually local to every module)
I mean, it sort of makes sense on PHP's part. There is no reason to not abstract that part. Atleast I couldn't think of one, when I tried. But I was pretty sure that this "feature" of PHP is bad.
 
@AwalGarg compiled functions?
 
Why should your framework tell you which variables are superglobal?
 
@AwalGarg It works well in PHP because PHP runs the same script for each request.
 
@MadaraUchiha Function(fs.readFileSync(someFileName))
 
@AwalGarg Aha, I see
 
10:12 AM
@AwalGarg slooow
 
@JanDvorak Yeah, but if you only do it once, no one cares.
!!> var fn = Function(["$_GET"], "console.log($_GET)"); fn("foo");
 
@MadaraUchiha no, that is not the reason why it works well for PHP. And PHP does not do that, the server does :)
 
@MadaraUchiha "ReferenceError: $_GET is not defined"
@MadaraUchiha "SyntaxError: malformed formal parameter"
 
Bah, I forgot the syntax.
@AwalGarg You know what I meant...
PHP scripts are run once per request
 
Hi guys, what is this chat ofr exactly?
 
10:14 AM
@frankenapps 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.
 
@MadaraUchiha how is that different from express running your request handler callback once per request?
 
@AwalGarg in javascript you can put stuff to global
 
@AwalGarg It's different in that in PHP, you don't deal with the framework.
 
In PHP, the framework deals with you
 
@MadaraUchiha "undefined" Logged: "foo"
 
10:15 AM
There we go
You know, that could actually work, @AwalGarg
 
right. for such a thing to work for JS, we'd likely have to provide a binary which autoadds the framework or whatever and it make things as close to PHP as possible.
I know I know. I am going to get world domination so soon. \o/
 
A single index.js file that accepts a directory of .jsphp scripts, which are plain js function bodies, and they're run based on the requested path
 
@AwalGarg What's your address? I've already ordered an axe.
 
Oh god the horror
Let's do it!
 
NOW YOU GET IT. THE REAL PHP DEVELOPER IN YOU AWAKES!
 
10:17 AM
runs away to Java
 
This is going to be so horrible and so awesome at the same time
 
> This by itself doesn't deserve a WAT. It's just how awesome the language is. Now, if you ever actually do it.. WAT.
 
I appoint @FlorianMargaine as our technical advisor and @MadaraUchiha as the core contributor. @JanDvorak can be the technical support guy.
 
@JanDvorak Perfect.
 
@frankenapps I live here
hai
 
10:20 AM
hello guys
You think, its good to use jquery mobile + bootstap 3 ?
 
@AwalGarg Move it under the JS room's org
 
how do I do that
 
Already did it :P
(Do you have access to the JSR org?)
 
I have no idea
how to check?
 
10:24 AM
8 mins ago, by Madara Uchiha
A single index.js file that accepts a directory of .jsphp scripts, which are plain js function bodies, and they're run based on the requested path
holy
shit
no
 
@littlepootis don't you "holy shit no" on my ideas
 
in SO Close Vote Reviewers, 3 mins ago, by Jan Dvorak
Leaving PHP? Feel the shackles fall off your wrists and the smell of summer caress your nose.
 
Nodepache?
 
So, yes. Holy shit no.
 
Nodephpache
 
10:26 AM
const express = require('express');
const app = express();

app.get(function handler(req, res) {
	Function('echo', fs.readFileSync(__dirname + req.path))(res.write.bind(res));
});
something like this should work
 
@littlepootis flagged
 
@AwalGarg Check your email
@AwalGarg God that looks horrible :D
At the very least make it nonblocking :D
 
lemme first run this and have fun for a while :D
 
@MadaraUchiha heh why? You have to emulate PHP's slowness somehow.
3
 
@AwalGarg just use jquery
 
@MadaraUchiha I can't push :( says access denied
 
!!> (function() { return [].slice.call(arguments); })("foo", 2, {hello: "baz"});
 
@MadaraUchiha ["foo",2,{"hello":"baz"}]
 
@AwalGarg Now try?
@AwalGarg Also, did you check your email?
 
no
 
10:46 AM
Check your email
 
it worked! github.com/JavaScriptRoom/JSHP guys clone, npm install, and run ./start. place your route files in the same folder and use the echo function to echo stuff. and browse on localhost:8080/<filename>.js
you don't need to restart the server either if you change any file! it evals again on every request :D
 
11:00 AM
it... works
 
@littlepootis github.com/JavaScriptRoom/JSHP/commit/… what do you mean? it is markup after all...
 
It didn't work on my PC, ehm
 
merged, thanks
 
Knu
11:15 AM
anyone knows if there's a name for the concept of ~locking~ a variable to a certain Type? So let's say for example the variable a is of type number and can only be re-assigned to a number or ++ --
I know it must exist in other languages
hence it must have a name
 
strict typing?
 
no, JS is dynamically typed. You might wanna look at TypeScript for FlowType annotations though.
 
Knu
I know JS
 
Might achieve that through getters and setters, though
 
Knu
I am asking about the denomination of this concept in other languages
 
11:17 AM
strict typing
 
static typing
 
ahh, the name. yeah, "static typing" it is.
 
Knu
so a statically typed language would not allow var a = 13; a = "test";?
 
> in general, a strongly typed language is more likely to generate an error or refuse to compile if the argument passed to a function does not closely match the expected type.
 
correct :)
 
11:19 AM
Doesn't static typing has more to do with non-existence of type inference?
 
> Static type checking is the process of verifying the type safety of a program based on analysis of a program's text (source code). If a program passes a static type checker, then the program is guaranteed to satisfy some set of type safety properties for all possible inputs.
 
Knu
Are you sure about that Awal?
 
@littlepootis not really. statically typed languages can do type inference as well. rust comes to mind, but I am sure there are others.
 
Knu
why would resetting a variable throw? I am surprised
 
@Knu it really depends on the language itself, but in general that is the idea. yes.
 
Knu
11:22 AM
I thought it would need specific annotation to enforce such a thing
 
Haskell is strongly statically typed, yet it can infer almost everything
 
@Knu here is an example with rust: is.gd/6PgaYi. @JanDvorak can give one quickly for haskell, I think.
err, ignore the comments on the top
 
Knu
interesting
 
x = "hi" + "ya" doesn't compile
 
Knu
so it's the default behaviour
and not something you switch on/off
 
11:24 AM
 
strong static typing, yet no type annotation. + is defined to operate over numbers yet a string isn't a number.
 
@BenjaminGruenbaum y u do dis >:(
 
Hello!
 
@fillotassi 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.
 
@MadaraUchiha revoke write rights from @BenjaminGruenbaum right now >:(
 
Knu
11:27 AM
is there a term or a character common to several languages that switch that behaviour? (variable being reassignable to a different type)
would static be correct?
or does it have other meanings?
 
dynamic typing
 
@Knu dynamic typing
<interactive>:37:1: Not in scope: `q'
*Main> let f True = 1; f False = "one"

<interactive>:38:14:
    No instance for (Num [Char]) arising from the literal `1'
    Possible fix: add an instance declaration for (Num [Char])
    In the expression: 1
    In an equation for `f': f True = 1
 
Knu
no I am talking about the antonym
 
static typing = the compiler knows the type
 
I'm trying to include a dat.GUI element in my project, but placing any code in the script makes it stop working
I haven't probably understood the order in which it has to be executed
 
Knu
11:31 AM
@JanDvorak so you think using static would be universally understood; I think it could be confusing for someone coming from C
 
C is technically statically typed, but there is so much UB you can generally assign anything to anything and you just get a segfault in return :P
 
union FTW
 
11:54 AM
Hi,
This question is silly .. why cant i run console.log(sum(range(1, 10))); in firebug?
 
@IndrajithIndraprastham What's sum(), what's range()?
 
I am learning javascript and is in first page of Eloquent JavaScript
this is the code they gave..
I can execute it directly from the website.. But not from the console..
 
@IndrajithIndraprastham Unless the functions are globally exposed on the page, they won't be available in the console.
Which they probably aren't.
 
I thought it might be some inbuild function.
 
no, they aren't
 
11:59 AM
@IndrajithIndraprastham They aren't. EJS implemented it themselves.
 
why do you think they included this in first page?
 
> Finally, here is what the program could look like if we happened to have* the convenient operations range and sum available
if we did. we don't.
 
@littlepootis that explains it. Thank you
which book do you suggest some one for learning javescript with a basic understanding of c and python.
 
The book you're reading is a good one.
 
12:08 PM
> Finally, here is what the program could look like if we happened to have the convenient operations range and sum available, which respectively create a collection of numbers within a range and compute the sum of a collection of numbers:
 
@MadaraUchiha Yea , I thought we have those functions inbuilt like in python. I could run it from the page and not from the console directly which made more confusion.
 
12:35 PM
@AwalGarg because webscale.
webscale is the secret sauce that makes node fast
in order to do webscale you must use callbacks
 
@BenjaminGruenbaum but it needs to be slow
 
@littlepootis oh it is slow don't worry.
 
i finally got factorio.
 
@Luggage And?
 
12:43 PM
got me, still on the training campaign
playing blind. barely seen a video about it.
 
I'm hoping to get it...eventually
Everyone's talking about how great it is
 
I did two training 'missions' then jumped into game
eventually you might find yourself looking up how trains work and more efficient science factories.. otherwise it is a great game to just 'jump into'
 
the combat seems out of place.
 
Factorio is pretty awesome. Can get ridiculously hard
 
@BenjaminGruenbaum npm install webscale
Sort of wanted to do this in a half-seriously way but I think the funny way could be fun too :D
 
12:53 PM
do grabbing arms only grab from the far side of a belt?
 
nope. But they do only put stuff on the far side of the belt
 
then i'm not sure why these would'nt put coal in boilers..
redoing it anyway
 
The boiler already has coal in it or the arms have no power or the arms are facing the wrong way
 
the boiler has coal, but isntt full, the arms have power and the arrows point from belt to boiler
 
the arms dont fill stuff up. They only keep 2 or 3 coal. Same with furnaces. They only really fill up chests
 
1:00 PM
ahh, ok.
 
@AwalGarg wow
 
user5992646
1:42 PM
How to make different elements in a container adjust equally to container's width each?
 
flexbox
 
user5992646
ok. thank you.
 
2:13 PM
@BenjaminGruenbaum I reverted your trolling, it may be a silly idea, but who know, maybe it'll come out to be an interesting project.
 
user5992646
I discovered today that I'm a slow slow learner. Earlier I used to think I was just a slow learner.
 
user5992646
Hello Madara. :)
 
user5992646
Hope you are having a great time. :)
 
@MadaraUchiha do something useful and write some unit tests
Also, you need to cluster by default and abort failed requests more gracefully. Otherwise the project is useless @MadaraUchiha
 
2:17 PM
@BenjaminGruenbaum I intend to take a look at it when I'm finished here
@BenjaminGruenbaum It's hardly even a PoC at this point
Might make for an interesting project to try and see if we can replicate PHP's... ahem... "special" abstractions in JS.
 
you don't say, it should also cache functions and pass used variables as arguments.
Define _GET and _POST, make database access appear synchronous with implicit async await, and so on.
 
@BenjaminGruenbaum It can't cache functions, because then you'd need a server restart for editing script files
Which is not the cycle PHP devs know
 
@MadaraUchiha I intended it to be helpful to newcomers to JS. FWIW I am ok with benji trolling on that repo for a while (or forever, it is just one repo). I'd dedicate the next weekend and do it seriously anyways.
@MadaraUchiha can just test if the source has changed and hot-reload the module. no biggy
 
@AwalGarg Fair enough
 
2:27 PM
It has to use cluster and it has to abstract async APIs.
 
But then @BenjaminGruenbaum, how would you simulate the trademark PHP slowness?
 
//For example, I'd expect
var x = db.getDataFromDatabase();
This has to work
 
@BenjaminGruenbaum if you're using clustering, you can just use sync operations and not worry about async at all, couldn't you?
 
It has to work both if getDataFromDatabase returns a promise or it takes a callback
@MadaraUchiha most APIs don't have sync APIs, and even if they do it's significantly slower.
 
@MadaraUchiha i'm curious why he got an idea to create a PHP compiler in PHP.
 
2:29 PM
@KarelG ask him @ircmaxell
 
@KarelG He made a blog post about it too
 
@KarelG Because why not?
 
@BenjaminGruenbaum that won't, but yield db.ge... would.
 
was just reading that
 
2:31 PM
@AwalGarg Yeah, so he's saying that you'll have to abstract that.
 
point 5 is quite valid
 
Can you even create generator functions with the Function constructor?
 
@BenjaminGruenbaum @MadaraUchiha I don't want it to be a dropin replacement for PHP... that'd be silly and useless. just that I think a lot of newbies coming from PHP find http in node confusing. This could aid them a bit, or just pave a way even.
@MadaraUchiha not with that, no. A different constructor which is hidden by default.
 
@AwalGarg Although it would be interesting to see how close could we get
We could even use AST tools to manipulate var x = db.getData() into var x = yield db.getData()
 
@MadaraUchiha that'd incur a lot of performance penalty in cases where the yield is not required.
 
2:34 PM
@AwalGarg Are you trying to make production apps, or are you trying to transition people from PHP to Node?
No matter what we do here, it's very unlikely that this will be any good in an actual production env
 
@MadaraUchiha it'd incur penalties that matter even for demo apps. You'd have to convert every single Expression and ExpressionStatement to yielded ones, and also change function calls to their bound equivalents to preserve this context.
not to mention parsing and code-generation itself is way too slow
 
@AwalGarg Yeah, but you do that only once per file change
 
@BenjaminGruenbaum if you want to make JS feel more PHP-ish, please leave the crap parts of PHP out…
 
@bwoebi so all the things? :P
 
very funny :-P
 
2:44 PM
@AwalGarg @bwoebi @BenjaminGruenbaum
 
3:20 PM
I know the answers is very subjective, but I'm looking to transition from a traditional php/mysql environment to a javascript framework friendly stack. Vue.js has worked really well for me, but persisting json to a DB is painful. What are everyone's thoughts/stacks when using a good JS framework?
 
3:31 PM
have you tried not using a framework? Don't follow my advice on this btw, but it's food for thought
 
Of course. I started out using raw js, then jquery. I really like the functionality that comes with Vue, and using components is so.damn.nice
 
@MadaraUchiha old.
 
oh shit I have an exam tomorrow morning :( I dunno graph theory
 
@AwalGarg @MadaraUchiha you guys should do a CGI node module.
@BenjaminGruenbaum still empty
 
wait no, just graphs in discrete mathematics whatever that should mean
 
3:46 PM
That's graph theory
Most graph theory is discrete mathematics.
 
@BenjaminGruenbaum ^ how difficult is that to learn? exam is in 10 hours and I need 8 hours of sleep
 
@AwalGarg gg no re
 
Meh, a graph is a set of pairs.
 
wat
 
Good luck, have fun.
 
3:47 PM
After that it's all gibberish
 
You're not going to have a good grasp of graph theory in 10 hours. Even if you don't sleep.
 
Hello! Do somebody use bower?
 
Many people use bower.
 
@QueueOverflow Hello, this is 2014, we don't really use bower anymore, thanks.
:P
 
@BenjaminGruenbaum What do you use instead?
 
3:47 PM
@BenjaminGruenbaum check hangouts
 
Are you a time traveler?
isn't it 2016?
 
@QueueOverflow np
 
npm
 
@SuperNoob do you merge all bower components in single file?
@BenjaminGruenbaum np? O_o
 
3:50 PM
@BenjaminGruenbaum do you use npm to install the client side packages, like jquery plugins or angular modules?
 
@QueueOverflow Correct.
 
@QueueOverflow yes of course.
You can also use jspm or webpack but oh well.
 
Except if you're using Polymer (lol), then you're screwed.
 
@BenjaminGruenbaum except people on projects started in 2014...
 
@MadaraUchiha what advantages over bower has your approach?
 
3:52 PM
True
 
(yeah, I use bower at work...)
 
@QueueOverflow not have two package managers.
 
@BenjaminGruenbaum do you use Gulp/Grunt? If yes, could you describe in a nutshell the process of building that packages?
 
@QueueOverflow Have a look at webpack or browserify (and projects that use webpack or browserify, as examples)
Alternatively, jspm, or, you could just copy them over with a Grunt target, that's what we used to do before bundlers were really a thing
 
@QueueOverflow sure, we use gulp, we load the external libraries through something like browserify that builds modules out of them.
(We use jspm, but I'm not a fan, I'd probably start with webpack today)
 
3:59 PM
Thanks! I will try to use Browserify in my small Angular project :)
 

« first day (2010 days earlier)      last day (2956 days later) »