« first day (1039 days earlier)      last day (3912 days later) » 

9:00 AM
I'll update my 2D physics engine thing shortly to use Mia for generating the documentation, which will also show how to handle parsing of custom functions (e.g. an extend/inherit mechanism)
@dievardump Usually used for soldiers/agents who are missing but not yet confirmed dead
 
Don't ask me what that would have made sense in this context as it wouldn't.
 
Oh OK. I thought it was again a seks reference.
 
@dievardump lol, you dirty dirty boy.
 
And I'll need some extra code to make it play nicely with Node.js module so it pull's in the requires by itself and generates the whole thing at once
 
Generic sourc and documentation parser for JavaScript :(
 
9:02 AM
seems cool but I did not understand anything @Ivo said :(
 
@phenomnomnominal I know... had more important things to do then adding the description :D
 
GSDPJ, that should have been its name. Way easier to remember than mia. :P
 
@dievardump gist.github.com/BonsaiDen/6262270 it basically takes you code, and spits out a structure of the classes, methods, parameters, properties etc.
which then can be fed to another function which will spit out a structure that can be used in an HTML template to generate doc pages
the magic is that it finds all the classes, inhertiance, super calls etc. by itself and that it's modular
so you can write plugins for you own, custom JS module definition in order to detect the exports, or write a parser to automatically handle any custom class constructs you are using
 
9:05 AM
I was too annoyed with JSDoc (too much annotations are needed in order to make it recognize classes etc.) and there weren't any flexible frameworks around
 
@IvoWetzel looks similar to what I do jsfiddle.net/AXTdj/3
(I made that jsfiddle to argue in HN that JS classes are not verbose) :P
that's why the character comments
 
@Esailija O_O
 
@Esailija I see, but the "class" should be trivial to parse with Mia. Most of the "hard" work is already done under the hood and it has nice helper functions such as getTarget() which will resolve references up to some degree (e.g. it will follow a back to an eventual assignment of a = {})
 
oh I mean I use same "style", nothing to do with annotations :P
since someone complained that he wants "everything inside the same" somewhere
and another complained that it's too verbose to write Person.prototype.. everytime
 
That has to be a joke. checks Node.js HTTP parser code
 
9:10 AM
uh well.... just do Person.prototype = { methodA: ..., methodB: ... } then :P
 
but the additional indentation + deopt in v8
= fuu
but mostly the additional indentation
 
I find it more concise with the = {} style
 
it is
but it's not too verbose if you alias and you get minimal indentation
do you have 80 character limit?
 
btw: that's the code that "Parses" prototypical style sources in mia github.com/BonsaiDen/Mia/blob/master/lib/parser/source/…
 
@ValentinRădulescu Welcome to the JavaScript chat! Please review the room pseudo-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.
 
9:12 AM
@Esailija Sadly, nginx isn't much better github.com/git-mirror/nginx/blob/master/src/http/…
 
I started to use that limit some time ago when I realized I could look at 3 different files at same time on one monitor
 
@Esailija I tend to impose it on myself, I usually have multiple V splits in vim open, and long lines are annoying to work with (and I hate wrapping)
 
one additional indentation is just making me reach 80 sooner
I realize now this is probably a holy war subject
_D
 
@Zirak I'm so happy to find out that I'm not the only one writing horrible code.
 
-3
Q: Contact page is not loading

user2698742I have uploaded all the files using filezilla but the contact page is not displaying. It works fine in local server. I Can't figure out what's the problem. Please check the site here: infinityadv.com.np Edit: <div id="menubar1"> <ul> <li><a href="#">Home</a> </li> <...

 
9:14 AM
@IvoWetzel oh almost forgot that the statement context around methods is awesome
with .prototype = {} it's just a list of methods
e.g. you can do
var passObject = {};
method.distance = function( x, y ) {
    //calculate
    passObject.x = calcullatedX;
    passObject.y = calculatedY
    return passObject;
}
or something like that
 
I see
 
Why would you declare it outside of that function scope?
 
That might be handy for reducing GC load
 
@OctavianDamiean contextual variables for the method without declaring them at the top
other stuff too
 
9:17 AM
like a constant that is just used by that method
 
I've used a similiar approach in the past in code that's been using a lot of Point() like constructs, you just need to make sure that they're not used as references anywhere later on :D
 
yea
 
The physics engine thing is actually doing something similar for contact point information
 
I think I understand. You mean less short-lived objects for a shared use?
 
as well as the manifolds (basically the container for two colliding objects) which are pooled. So all the data is only valid until the next world update
 
9:20 AM
btw I made a mistake.. it is crucial to have x and y in the literal instead of empty literal
 
@OctavianDamiean Yep
 
otherwise they're considered dynamic additions
 
Which would reduce GC stress obviously. Makes sense.
 
and go out of object
 
0
Q: Plugin - including external javascript calling google maps

G4llic4I have developed a javascript plugin retrieving data for my website (no wordpress here). The user can simply add it to its website with a div (the container of the plugin) and a script tag (the plugin). This plugin displays a google map with some fancy information. As wordpress does not allow th...

 
9:20 AM
@Esailija You could also make passObject = new Point(0, 0)
 
there is no 8 prop buffer with literals like there is with constructors
anything outside goes out of object
 
@OctavianDamiean Especially helpful on iOS safari is really bad at dealing with many short lived objects
 
@IvoWetzel any*
 
@OctavianDamiean at least nginx doesn't seem to think that PAH is PUT ? :P
 
Damn ... that reminds me that I wanted to read this article about the JS VM thing. Someone posted a link to an article linking to it.
@Esailija Yea. :D
 
9:27 AM
 
PUN == PUT // cool story bro
Compare the first two characters and disregard all the following characters because why would you care anyway?
 
it compares 2 first? I thought just 1
 
@Esailija Haha, great, I was looking for really harsh code to test it on :) We'll need to teach it the "module" pattern used here(basically the var Class = iife so it knows what the exported name is)
 
@Esailija Nah, as POST and PUSH weren't the same for him.
 
I'm sure there are some missing features in the target resolver (the thing that tracks down assignments) but most of it, if not all, should be parsable :)
I'll work on that later today :) btw: If anyone knows a nice template / theme for doc pages, please ping me, I don't want to do it all from scratch, just need something to dump my data into
 
9:33 AM
this song started to play in my head when I saw your repo name youtube.com/watch?v=ewRjZoRtu0Y
 
@Esailija hahaha that was the first thing that came to my mind when I read the name. :D
 
@Esailija Gnah, blocked
and I'm too lazy for proxying now
 
it was M.I.A. - Paper Planes D:
is it possible there is infinite loop bug ?
this takes forever to run
var mia = require('mia'),
    fs = require('fs');

var source = fs.readFileSync('./src/orderedmap.js', 'utf8');
var module = mia.parse(
    'Module', // Name of the module
    source,
    {
        module: ['iife'], // Detect standard anonymous function wrappers
        source: ['prototypical'], // Detect standrad prototypical classes
        annotation: ['mia'] // Use mia annotations
    }
);

console.log( JSON.stringify(module));
 
@Esailija Might be an issue in the ast.getTarget() function which probably doesn't keep track of circular references right now
    getTarget: function(node, scope, ignoreMembers) {

        if (!node) {
            throw new MiaAstError('getTarget', 'Invalid Node');
        }

        // Fall back to the node scope
        scope = scope || node.$scope;
        if (!scope) {
            throw new MiaAstError('getTarget', 'Invalid Scope');
        }

        // Now follow the node's name until we find the eventual target
        // of its reference
        while(node) {

            // Look up identifiers
            if (node.type === 'Identifier') {
 
hi
 
9:41 AM
I only tested it on a limited subset of code, but I'll look into getting the ordered map parsed later today :)
 
cheers
 
getTarget is the only real loop in there, everything else is just recursion
(it really spends most of its time in ast.traverse :P )
 
there is 2 internal classes the map uses plus those could somehow reference the orderedmap I think
Also this is some weird practice that I did on that project
method.put = method.set = function put( key, value ) {
basically aliasing methods.. dunno if that can mess it up too
 
yep it dies in getTarget
well it hangs
 
yes, infinite loop
 
9:51 AM
yep, circular reference, let me figure out why 'entry.value = value' screws it up
 
D
 
Ahhh I see
it resolves value to the parameter of the put function
then it tries to resolve that again
and ends up at the parameter
just needs to break out in case it finds the same thing
now it dies somewhere else but it doesn't hang anymore :)
 
:D
 
Wake me up before you go-o
 
@Esailija Just an issue with computed member accessors, that should be easy to fix
 
9:57 AM
lol I just realized how confusing this is
function Entry(key, value, next) {
    this.key = key;
    this.value = value;
    this.next = next;
    this.prevEntry = this.nextEntry = null;
}
"what .next and .nextEntry?!?!?!"
 
Yeah, naming is bad there
 
runs through now, can't associate method._foo with the prototype reference just yet, but that's really easy to work around, just need to run over all assignments and resolve their target and build the combined access path before checking for prototype
 
@BenjaminGruenbaum problem is that the entry is a member of 2 separate linked lists at the same time :D
the doubly linked list that manages order
and the singly linked collision chain
 
anyways, I've gotta go pick up my girlfriend before we're heading to the city. I'll fix that bug later on :)
 
ok later
 
10:00 AM
btw: it detected this correctly as a factory
OrderedMap.inAccessOrder = function inAccessOrder( capacity ) {
    var ret = new OrderedMap( capacity );
    ret._ordering = ACCESS_ORDER;
    return ret;
};
\o/
 
nice
 
goes out buying more unicorn dust to sprinkle on the parser
 
@Esailija so give them meaningful names
orderListNext and collisionListNext or something like that
 
I see
 
0
Q: Javascript error in wordpress TypeError: a is undefined

ProudionI am facing an issue in my wordpress admin panel , Not able to drag and drop widgets . It shows a javascript error as Timestamp: 8/20/2013 2:12:22 PM Error: TypeError: a is undefined Source File Line 2

 
10:05 AM
collisionChainNext and orderListNext sound good to me
 
@BadgerGirl Thank you!
@OctavianDamiean Not yet! Another year left for that!
@Zirak Hahaha, wat?
 
Do you know any good gyms near where my hotel is located in Helsinki?
I need someplace to go to for the month I'm there
 
you are staying in Omena hotel, helsinki?
 
holy shit it has 4.5 stars over 18000 ratings
 
10:10 AM
@BadgerGirl Hahaha
 
@Esailija why OrderedMap.inAccessOrder = function inAccessOrder?
 
because v8 disassembler only uses function names
if you don't give function name you get like empty
and the dumps look weird
 
@rlemon Hmph.
 
@Esailija Link?
 
I googled omena hotelli helsinki
 
10:12 AM
Locations during the Program
====================
maps.google.com/maps/…

You are staying at Omena Hotel at Eerikinkatu 24.
You will receive an SMS and/or and email around 24hours before the room booking for you starts. This will have the room number and the door code.
If you are traveling during time when the message would get sent, there is free WiFi at the airport, so *PLEASE* check your email when you land, as I will send a "backup" version via email.
 
no wait, there are many hotels
the one I looked up was on lönnrotingkatu
 
@sqlab Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Well, I think I need a gym next to it
 
if you google "kuntosali eerikinkatu helsinki" (without quotes)
it shows up nice map with the places marked
there are 3 fairly close
 
@user2528177 Welcome to the JavaScript chat! Please review the room pseudo-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.
 
10:16 AM
You know any of them?
 
Back (well kinda at least chat isnt the greatest experience via mobile)
 
no, I live further away from center
 
One issues definitely with computed accessors, but parsing string based ones should be trivial, I might also add a getValue method, although it would only be useful with literals, you could of course start guessing / tracing types but well, that's enough for a whole project on its on
 
@BenjaminGruenbaum does this help i.imgur.com/8oCB1j6.png
:D
 
10:20 AM
Lol, I guess I'll just ask there
 
(lol at using paint when google maps probably has that feature)
 
Yeah, but thanks, it looks good
 
are you using bus to travel to the place where you are going to be working
 
Travel between the city and AppCampus space
=====================================
You can buy a monthly travel card (lowest cost option. N.B. you need a "region" card to cover both Helsinki and Espoo)
hsl.fi/EN/ticketsandfares/salesandservicepoints/Pages/…
hsl.fi/EN/ticketsandfares/Pages/PriceCalculator2013.aspx

To find your way around, you can use this website:
 aikataulut.hsl.fi/reittiopas-pda/en to get a mobile version
 reittiopas.fi/en for the full version
 
Firefox must die!
 
10:26 AM
the instructions are based on lönnrotinkatu but you are staying at eerikinkatu
though they are very close to each other
the only difference appears to be that you walk 0.4km instead of 0.6km :D
 
  KONAMI_KEYS = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]
  do ->
    pressedKeys = []
    $(document.body).on 'keyup', (e) ->
      if e.keyCode is KONAMI_KEYS[pressedKeys.length]
        pressedKeys.push e.keyCode
      else
        pressedKeys = []
      if pressedKeys.length is KONAMI_KEYS.length
        easterEgg()
        pressedKeys = []
Ha
 
@Esailija It's their instructions.. hmm
The hotel looks fine, it's decent right?
I think they're more confused than us
 
9 eur for breakfast every day sounds pretty wasteful and kinda expensive
 
where does it cost that much? although food is expensive in Finland in general yes (compared to say Germany or Netherlands)
 
10:31 AM
Yeah, it's pretty cheap here, I just don't want to eat junk food for a month
I eat way too much junk here anyway
 
well there are grocery stores everywhere though
I mean supermarket style grocery store not kiosks or such
 
Yeah, but unlike hostels (which I like better) I can't really cook in a hotel, and I probably can't cook at work there either
 
Depends on your definition of breakfast.
 
I just don't want to end up eating in McDonalds or anything like that
 
@BenjaminGruenbaum there are probably lot of restaurants offering "daily menu" for <10E
 
10:35 AM
I spend ~10Eur for lunch here too, I'm more concerned about the quality of the food (not as in taste bus as in - not be junk food) than the price.
(Breakfast for 9 eur every day, in addition to 10 eur for lunch and probably some dinner sounds kind of expensive though for a whole month)
 
this is why I should pretend to be a tourist sometime
 
@Esailija How so?
(Not to mention coffee)
 
because then I would know this stuff much better :D
 
Please please tell me you have good espresso coffee and not shitty filter :P
What do you eat for lunch?
 
You should try to prepare the breakfast yourself.
 
10:37 AM
last week I have mostly eat rice and chicken :D
 
Sounds good enough for me :)
 
I cooked 7 days worth of rice at once
 
I usually stay at good quality hostels and avoid hotels when I travel, that way I get a kitchen and I get to interact with people which is really fun
 
@OctavianDamiean @rlemon @Zirak konami code
 
I have never even tasted espresso but I am sure that is available :D
 
10:38 AM
Aw crap, now I know I'm screwed :P
 
filter coffee is kinda popular here though
 
Like, how do you prepare coffee?
:( I really like good coffee, do you have like Nespresso machines and stuff?
 
@phenomnomnominal hahaha, nice
 
@BenjaminGruenbaum you could go to @Esailija for lunch & dinner :D
 
hah
 
10:39 AM
@FlorianMargaine I'll go with him for a beer for sure
 
@BenjaminGruenbaum don't know I pretty much never drink coffee outside school or home, where I drink filter coffee
 
Yeah, that's what I feared XD
 
but guess what... we have amazing rye bread at grocery stores heh
 
rye bread?
 
10:40 AM
I'll probably do whatever the other 30 people at appcademy will be doing anyway.
Rye bread is a type of bread made with various percentages of flour from rye grain. It can be light or dark in color, depending on the type of flour used and the addition of coloring agents, and is typically denser than bread made from wheat flour. It is higher in fiber than white bread and is often darker in color and stronger in flavor. Rye bread has notable health benefits when compared to white bread. Dark rye bread became a staple which lasted to the Middle Ages. Many different types of rye grain have come from places all over Europe such as Finland, Denmark, Baltic countries and G...
 
what a finn will miss while abroad is surely rye bread... (it's much darker than in that picture)
 
Yeah it is, we have it here too in stores, it's just pretty expensive (~4 times normal bread)
 
thing is like 20% fiber
 
10:43 AM
@phenomnomnominal remove the light changing when moving the mouse in the blog part
it's horrible
 
@FlorianMargaine your face is horrible, also, too much effort
 
@Esailija Yeah, it's pretty good though, we eat it here sometimes.
It's a "health food"
 
wtf is concat so slow or does jsPerf mess up this somehow ?
 
btw those do different things
 
I know
anyway, for the case you want to push all values from an array a complete array into an empty array
they both do the same in this instance
 
10:50 AM
I can look into it
 
but it seems like jsPerf doens't handle the assignement well
 
i love angry christians making hard music about fighting hell and all this crap, pure gold
 
well it's obvious now
just look when I tried to make a fair test
both accumulate items
push doesn't have the painter's problem
while concat does
In software development, a Schlemiel the Painter's algorithm (or Schlemiel the Painter algorithm) is a method that is inefficient because the programmer has overlooked some fundamental issues at the very lowest levels of software design. The term was coined in 2001 by software engineer and essayist Joel Spolsky. The algorithm is not to be confused with the Painter's algorithm of image compositing, as the two are completely unrelated. __TOC__ Spolsky's analogy Spolsky used a Yiddish joke to illustrate a certain poor programming practice. In the joke, Schlemiel (also rendered Shlemiel) ha...
because they accumulate items, the painter problem plays in
only the first iteration will be on empty array
(the setup is ran once per sample, not per iteration)
 

« first day (1039 days earlier)      last day (3912 days later) »