« first day (1782 days earlier)      last day (3161 days later) » 

4:00 PM
For every element
 
> The map() method creates a new array with the results of calling a provided function on every element in this array.
 
@corvid .map() iterates over an array, applying a function to every element, and returns a new array of the results
 
@MadaraUchiha delegation/bubbling and all that stuff?
 
If they grasp for loops the leap to map should be small
 
@AwalGarg Yeah
Also, probably xbrowser
I didn't care about xbrowser that much, IE11-10 was fine for me, so I just rolled with native events
 
4:01 PM
I have a html link like this:
www.example.com/folder/file.php?arg1=one&artg2=two&arg3=three
and I need to convert it to a ajax method: (specially arguments)
$.ajax({
    url :  'www.example.com/folder/file.php',
    type : 'GET',
    data : {"arg1": "one", "arg2": "two", "arg3": "three"},
    dataType : 'JSON',
is it possible ?
 
Why not
 
I need to regex ?
 
$.ajax({
    url :  'www.example.com/folder/file.php?arg1=one&artg2=two&arg3=three',
    type : 'GET',
    dataType : 'JSON',
What's wrong with this? ^
 
it will work ?
 
Did you try? :)
 
4:03 PM
no, but I think it does not work
 
@BenFortune I think he's confused about scoping
 
@Sajad I think it will.
 
@MadaraUchiha Oh dear Lord ! thanks !!
 
Bundles.find().map(function (bundle) {
  return _.reduce(Products.find({ bundleId: bundle._id }).map(function (product) {
    return product.price
  }), function (price, sum) {
    return sum + price;
  }, 0);
});
Like that kind of thing
 
@MadaraUchiha Maybe you should remove the last , though if there is no more content...
 
4:07 PM
@JohnSnow I directly copy-pasted his example
I assume he's got more items on that list and only included extra lines for context
@corvid wat
 
Yeah, I know. But I wanted to add to it. He might not know that you can't have a , on the last element
 
_.reduce
@JohnSnow Technically, you can.
 
@MadaraUchiha this iteration of mongo doesn't have the mapReduce or reduce operators, so roundabout solution
 
!!> var foo = { a: 1, b: 2, c: 3, }; foo
 
@MadaraUchiha So if you're building an application that's very similar to what Quora is, then you use it?
 
4:08 PM
@MadaraUchiha "undefined"
@MadaraUchiha {"a":1,"b":2,"c":3}
 
@JohnSnow ^
@DemCodeLines I actually don't know what Quora does :P
I've heard the name but never used it
 
@MadaraUchiha Well, it blows up in my face if I try it
 
@MadaraUchiha Q&A
 
@DemCodeLines Yeah, that's a usecase for nosql
For a document store, in general
 
Avoid NoSQL except for caching, srsly.
None of you scale enough to even consider it, mongodb is retarded.
 
4:10 PM
@BenjaminGruenbaum SQL server ftw
 
SQL server is awesome.
 
@BenjaminGruenbaum Really?
 
oracle ftw
 
We serve 400 million items per hour, we use Cassandra
 
Oracle is awesome, sql systems have tens of years of development in them, mongodb is a summer project gone wrong.
@MadaraUchiha yeah, for what you do at work I'd consider nosql for sure, that's not a typical workload though.
Also, cassandra isn't retarded like mongo, it's a decent piece of software
 
4:11 PM
@BenjaminGruenbaum Mongo has advantages over both of those
 
mongo > postgres
 
The more I use MongoDB the more MongoDB feels like a toy not a tool
 
Mainly in its criteria API and the ability to modify parts of a tree without having to do it on the application level
 
@Nick lolno
 
4:11 PM
pls
 
MongoDB drops writes or has terrible performance.
 
Stupid question: people say think of using mongodb when you really need to scale. I would need to scale when I have heavy traffic, at which point, re-thinking my architecture and restarting is the last thing I want to do.
 
praise mongo
 
It's not really eventual consistent, it has no joins and it sucks.
 
if you want to use noSQL, go with coutchDB
 
4:12 PM
@DemCodeLines on the contrary, you want to constantly refactor and rethink your architecture, that's a part of the process.
 
@DemCodeLines I almost always separate data storage from application
 
if you use something like an ORM, switching your database technology can be seamless
 
Hide it behind my own API
 
Don't make an overkill system to begin with and only get to production using the assumptions from last year after a year.
You want to get to production Fast and then release often.
@Nick that's some wishful thinking :D
Mongo is still terrible, namely because no joins or transactions.
 
Hey, a girl can dream!
 
4:13 PM
@Nick Yeah, not really.
 
Also for dropping writes.
 
@BenjaminGruenbaum c'mon it is "webscale" after all... right? RIGHT?!?!
 
@Nick if you use ORM, you probably are doing it wrong
 
no, it just means you're lazy
 
@tereško Not necessarily
 
4:14 PM
@BenjaminGruenbaum I am surprised to see you say "Oracle is awesome". Most other people I've heard have bad things to say about Oracle.
 
Does anyone know if there is a desktop emulator for Mobile IE? were having some javascript issues in the browser and currently don't have a way to debug it.
 
@AwalGarg If you need sharding and can't use SAAS and don't have complex logic in the DB but have enough complex logic to not use redis and can't use couch.
 
Maybe they were talking about Oracle, Inc. and not Oracle DB
 
Then maybe consider Mongo, maybe.
 
Well, aside from the tight coupling to the underlying storage service
 
4:14 PM
@tereško would you prefer some lighter abstraction like php's pdo instead?
 
@AwalGarg Data mappers ftw
 
Still no.
 
*uses write behind cacheing with Galera cluster, Memcached, and Beanstalkd
 
@BenjaminGruenbaum hahahahaha that makes a lot of sense
 
@AwalGarg I don't think you really understand what PDO is in php
 
4:15 PM
@tereško we use ORMs and they work out beautifully for us, we have an index problem and some terrible code bad programmers wrote, but that's the case for everything anyway.
 
@BenjaminGruenbaum And if your DBA was transformed into a hamster...
@BenjaminGruenbaum lol
 
You use C#, there's no chance in the world you'd ever switch a database engine in a million years
 
@MadaraUchiha why?
 
Also, if you're fine with having your objects looking very similar to your table entities, then an ORM is perfect
 
4:16 PM
We can technically switch to MySQL or PostgreSQL tomorrow, there are adapters, we're just pretty content.
 
madara the disqus troll?
 
@MadaraUchiha oh no, they don't do that, we map.
 
@BenjaminGruenbaum You technically have the ability, which is the best kind of ability.
 
Oh look it's @BartekBanachewicz
 
4:17 PM
@r3wt ..?
 
continuation-local-storage alternatives ITT
 
@BartekBanachewicz pouchdb?
 
@BenjaminGruenbaum yeah
 
hey bananu-something I forgot your username lol
 
Also syncs to couch, speaking of. Pretty decent.
 
4:17 PM
@MadaraUchiha just ignore him .. I already do
 
@MadaraUchiha you better get going soon.
 
@BenjaminGruenbaum I specifically need to be able to pin state to a particular request
 
@BenjaminGruenbaum Yup
 
because apparently it's hard in node
 
And you better finish work soon :P
 
4:18 PM
@BartekBanachewicz pin what state to what request?
You want a session? Is that it?
 
@tereško douche
 
I guess.
 
That's not hard in node at all...
 
@r3wt yes, if you run windows then the windows phone emulator works.
 
4:19 PM
@BenjaminGruenbaum alright thanks, i'll check that out
 
@BartekBanachewicz wait, do you want context for a request on the client side or do you want context for the request on the server side or do you want arbitrary context for async chains?
 
Alright, I'm heading out @BenjaminGruenbaum @Zirak
 
Hide your kids, hide your wives, hide your dogs
 
@BenjaminGruenbaum the 3rd one, I think
 
4:20 PM
@Mosho hide good doge
 
how can I combine a string to a variable in js ? it is in php:
$('.l_voteup').attr('href')."$tf=1"
 
@Sajad use + for concat in JS
 
var h = $('.l_voteup').attr('href');
$('.l_voteup').attr('href', h + "$tf=1");
 
@BartekBanachewicz ok, because the first two are very easy. The third one you can use domains for but probably shouldn't. With bluebird you have promise#bind for chains, but typically it depends.
 
@Sajad that is... invalid in php -_-
 
4:22 PM
@r3wt good, tnx
@AwalGarg I know, I meant was "." for combining
 
@BartekBanachewicz terrible :D
 
@BartekBanachewicz very well, tnx :-)
 
@BenjaminGruenbaum IKR
 
@Sajad start reading: eloquentjavascript.net (free online book)
 
@Sajad don't do it, it's just an illustration
 
4:23 PM
@Sajad be careful, they'll soon hate you as much as they hate me
 
document.querySelector(".l_voteup").href += "$tf=1";
 
Why would you even use jQuery for that.
 
@BenjaminGruenbaum I was thinking about Bluebird actually. if I can present a PoC that work we could rewrite our thing for that (it's for my new job)
 
4:24 PM
@BartekBanachewicz Then bluebird has a .bind function that binds a chain to a context.
 
we're using CLS right now, but it has issues
 
@tereško ok I will, but why are you in this room ..! it is not php !! any way tnx ;-)
 
@BartekBanachewicz yeah no shit
 
hrhr
there's another thing I'm going to try out, but forgot the name
 
@Sajad I am a regular here (10'000+ lines)
 
4:25 PM
Active Listener?
something like that
Async Listener I guess.
 
wat?
Just use babel for transpiling ES7 and use async/await
That's what everyone else does.
 
@r3wt ok :-)
 
"Program has no main function"... well that's new...
 
@BenjaminGruenbaum mmm
I don't feel comfortable enough in JS to recommend a full rewrite carelessly
 
Then don't
 
4:28 PM
is the babel async/await fixed now?
 
I'm going to evaluate things first.
 
@AwalGarg Fixes is a broad term, it works pretty well.
 
@BenjaminGruenbaum well a lot of users around here were complaining it outputs mixed es6/es5 which doesn't quite work in es5 environments
although, I never checked it myself
good call, I should do that now
 
JS Users, As per the reviewers observation there are some serious issues in the MDN content as mentioned here. stackoverflow.com/questions/32357179/… Please work accordingly.
 
I can run a none-argument (function voteup(){}) like this: $(voteup);
how can I run it : function voteup(arg){} ?
 
4:33 PM
http://www.commitstrip.com/en/2015/09/02/coder-discussion/
CommitStrip - Blog relating the daily life of web agencies developers
Coder discussion
CommitStrip
1441211505
 
@AwalGarg I'm one of those people.
bluebirdCoroutines transform in babel output es6 (generator functions)
you need to run through babel again to turn them into es5, but that double-translates some things and makes a mess
 
so... is that fixed now?
 
no idea. lemme try.
 
Looking at ES 6 I wonder, whether a Java convert will ever realise that even though he is writing class A extends B. It's still a prototype chain being formed.
 
4:43 PM
@Sajad voteup() would call the function, but why do you surround the entire function in parentheses? if it's not an IIFE, you don't need those.
 
@AmoghTalpallikar it doesn't matter
 
@NathanJones I need to send some arguments to my function and then run it ...
 
@Sajad what do you mean "send some arguments ... and then run it"?
 
@AwalGarg still 'broken' in latest babel
 
function ChangeName(newname){}, I need to send newname to my funcftion
so, how to run a function containing some argument ? I just need to run it
 
4:45 PM
ChangeName('bob'); ?
 
@ssube : You mean one will never need to understand the intricacies of prototype pattern and chaining once everyone moves on to ES6?
 
No, you still need to know.
 
@AmoghTalpallikar IT doesn't immediately matter how inheritance is implemented.
It's like understanding how memory works in a reference-based language. Useful once you get into it, but not required right away.
 
can I get some help with styling jquery ui autocomplete in codepen.io/Feners4/pen/ZGZORX
 
the new syntax helps you use a useful pattern without understanding it, but the understanding is still needed to really 'get' it.
 
4:47 PM
@Sajad if your function declaration doesn't define arguments, you can't pass any in when you call it.
 
i need it have that drop down effect like it should..
 
@Sajad and "sending arguments" and "running the function" can be done in the same step, when you call the function.
 
@NathanJones ah ok
 
@NathanJones *can be done in the same step
you can always bind a function to arguments before you call it
 
@ssube I think I disagree. Knowing about the prototype chain can help you do more with es6 classes. implement mixins, etc.
 
4:48 PM
@ssube thanks, corrected.
 
so, I got a slightly glitchy extremely basic 3d engine going XD codepen.io/towc/pen/rONXYe
 
I prefer prototypical to classical inheritance, but there definitely are pitfalls sometimes
 
no backculling, but it should work anyway, even if it is not optimal
adding light stuff is literally just boring formulas
so...
 
@towc I did a software rasterize in C# as a learning project: github.com/luggage66/gangurru-software-rasterizer
 
Why are you even doing 3D on a 2d canvas? Seems like a neat learning experience, but lots of work for something that will be less efficient
 
4:50 PM
@Loktar Your kids may enjoy this khanacademy.org/partner-content/pixar
 
@SomeGuy woah nice, my daughter will for sure
thanks!
 
Sure
 
you're welcome
 
@Nick this is much easier than learning webgl ;)
 
lol, I suppose that's true
 
4:51 PM
is it a correct syntax ? $('.l_voteup').attr('href')+"&tc=1";
 
@towc looks liek you draw each triangle?
 
@towc Haha, that's how I felt too!
 
@Sajad what are you trying to do?
 
Long ago, when I'd initially tried
 
@Luggage unless it's behind you or too close
 
4:52 PM
Then I just used ThreeJS
 
@SomeGuy but you know how I feel about libraries, so... :P
 
@Nick well, technically, it does parse. It's just bad.
 
i draw each pixel in a triangle in mine, and check a z-buffer. more like the way video cards do it
 
Yeah, I'm the same way. But here, ThreeJS seems kind of necessary, really
 
@Nick so surly I need to store current url and then add a new string to it, ok well, tnx
 
4:53 PM
but a whoel fuck-load slower
 
@towc It's not easier than three.js, though
 
surly? surly beer?
I like surly beer
 
@Sajad I don't think you do.
 
@Luggage I don't really know the maths of triangle filling, but I guess that with 2d canvas that would actually be more resource expensive
 
!!wiki surly beer
 
4:53 PM
To understand WebGL, you first need a nice overview of all the things that are happening without the complicated code to do that. You can do that with studying the theoretical background, sure, but it feels easier to learn practically
 
@JanDvorak No result found
 
!!wiki surly brewery
 
@Nick The Wikipedia contains no knowledge of such a thing
 
ThreeJS gives you part of that, which makes it easier to understand the WebGL code later
 
@towc neither did I. I had to learn
 
4:54 PM
well, fuck you then
 
32 mins ago, by Bartek Banachewicz
var h = $('.l_voteup').attr('href');
$('.l_voteup').attr('href', h + "$tf=1");
 
@Luggage although I do understand that my method doesn't work for intersecting triangles for example
 
@Sajad ew
 
The Surly Brewing Company is a Brooklyn Center, Minnesota-based craft brewery, noted for well-reviewed beers and primarily canning, rather than bottling. Initially available only in and around the Minneapolis–Saint Paul metropolitan area, it has since begun to expand distribution to include all of Minnesota and several nearby states. Surly has been growing rapidly; it had a projected production of over 15,000 barrels in 2010, 21,000 in 2012, and 28,000 in 2013. Surly's brewing system is a 30 beer barrel (BBL) Sprinkman, one of four identical systems produced by Sprinkman of Wisconsin. == History... ==
 
@Luggage thing is, I'm not going to bother yet because I know it would still be very resource expensive with the tools I'm using
 
4:54 PM
@towc What are you doing, pre-sorting triangles?
 
@Sajad This is why jquery is bad...
 
@KendallFrey yeah. Don't hate me for that
 
no, sorting is a useful tactic.
 
I mean, it works, that's all I care for now XD
 
@Nick :-)
 
4:55 PM
@Sajad element.href += '$tf=1'
 
now I just need to improve it
 
sorting isn't terrible
 
even if you rasterize per-pixel, sorting can be helpful.
 
it's less efficient than a z-buffer though
(big-O)
 
@Nick like this? $('.l_voteup').attr('href') += "&tc=1";
 
4:56 PM
You can't always sort triangles back-to-front, even if they don't intersect
 
@Sajad no
don't use jquery for it
 
@JanDvorak explain
 
@Nick but I need to select this class: l_voteup
 
just what you are doing, i think. drawing the furthest ones first.
 
@Sajad you don't need jquery for that
 
4:57 PM
@towc triA lies on top of triB, triB lies on top of triC, triC lies on top of triA
 
!!tell Sajad mdn querySelector
 
Neither of them is in the front
 
@JanDvorak right...
how do you do that without them intersecting?
or curving
I just can't visualize it
 
@Nick well well well, I had not seen using of the robot until now. good job
 
4:58 PM
anything is possible in non-euclidean space. :)
 
@Luggage -_-
 
ignore that.
 
yeah, I should have
;)
oh, and there's something extremely weird going on in the demo: the rotation is pretty messed up...
it's like you were rotating around a point in front of you
 

« first day (1782 days earlier)      last day (3161 days later) »