« first day (1377 days earlier)      last day (3576 days later) » 

11:01 AM
Otherwise something like that can also be implemented in userland.
 
0
Q: Collection of promises issue

lxm7What is the syntax for writing a series of promises into a series of animations that can be collected at the end? I've read the jquery manual, viewed a couple of relevant SO questions but i can't seem to get the .done() message to fire after all animations complete. Code so far: $.when( $...

 
apparently many things eat parrots, and parrots eat many things
has anyone heard of the new chromebook?
 
How are the nuts hovering ?
 
@Feeds so that was crazy
 
@dystroy ask them
at least you recognized them as nuts :D
that's a big achievement for me
 
11:11 AM
Well, there is "nuts" written above the distance
 
@towc no, I didn't recognize them, there was a text somewhere
 
so, what should be the main enemy? monkeys, owls, eagles, boas, hawks, pythons, humans?
 
laser sharks
 
@dystroy at least you connected them to the images :D
 
or lazer unicorns
 
11:12 AM
@C5H8NNaO4 that'll be the final boss
 
awesome *_*
 
quokkas
quokkas should be the enemies
would make the game totally unrealistic
i mean... look at them
look at them, no harm could ever be done by these fabulous creatures, ever
 
@Feeds that nesting
 
@C5H8NNaO4 I think I'll get them as my monkey enemies!
 
Where is adeneo ? @adeneo, come here !
 
at least now some kind of obstacle has been added copot.eu/matei/games/systic
is the game slow for any of you?
 
not for me. But sometimes the position changes in a wrong way
 
@towc Cool! :) Make sure to make a fat one.
Nope, works like a charm, and i don't have a fast pc
 
perfect
 
@BenjaminGruenbaum And that from T.J.... surprising
 
@dystroy I noticed that too... I think it's just loop skipping...
 
@C5H8NNaO4 not the first time
 
11:48 AM
Yes... his answers often look like... work : not very interesting, slowly doing what's required in any way. I don't know if he has fun answering..
 
dystroy but I have no idea how to fix it
 
does this look familiar to anyone: pastie.margaine.com/…
I'm being told I can "Send this to a windows canvas, and print a resulting form"
Which means nothing to me
 
pastie.margaine.com : it's from @FlorianMargaine
 
@dystroy yeah, that's a good analogy, they look like work :D
 
does this look familiar to anyone: http://pastie.margaine.com/dd98aa75-d835-4e85-b581-93b862b6037e
I'm being told I can "Send this to a windows canvas, and print a resulting form"
Which means nothing to me
*
That was supposed to be an edit
 
11:51 AM
I think he is learning promises now though, so that's a good thing.
 
Learning new stuff is always a good thing :)
 
I'm sure he learns and when he's at work he probably does all the things. It's just... I'm here for fun and learning, not to write long laborious things...
 
Yup
Also, writing poor answers on promises questions grinds my gears :D
Really cool
 
@Benjamin I found a nice pathfinding library for PostGIS
That would allow me to move even more logic to the database
 
12:06 PM
I hate webfonts FFS
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: geometricPrecision;
-webkit-font-variant-ligatures: no-common-ligatures;
-webkit-font-feature-settings: "liga" 0;
<kill me>
 
!! 50 or 100 or 150
 
@C5H8NNaO4 100
 
@BartekBanachewicz not sure that's a good thing, but till sounds nice.
 
If I offer a bounty of 100. And want to award an additional bounty afterwards if the answer was better than expected, then the next bounty would be at 150 for the same question right?
 
yay! someone uses pastie.margaine.com!
 
12:14 PM
0
Q: onscroll table thead fixed and apply tbody td width to thead th

Dhanush Bala$(window).scroll(function(){ if ($(this).scrollTop() > 740 ) { //$(".fixed-div-attendance").append($header); var first=0; var length=$('.table thead tr th').length; for (var i=0; i<length; i++) { console.log(i); var t...

 
I hope that's not how your code is indented in your editor
 
sprites look a bit more pleasing now copot.eu/matei/games/systic
 
@towc I love that I keep passing by the sun
 
I don't know angular but shouldn't this question be asked to google instead ?
0
Q: AngularJS - hello world

fly birdI am trying AngularJS out, but I found the official tutorial download code & pre-defined npm dependence without telling how to create it from beginning. I am on linux (mint mate 17), with nodejs / npm / bower installed, but no more modules, now I want to make a hello world project, which has a i...

(i.e. if you know angular, you should probably cv)
 
too broad
 
12:21 PM
@towc yes but.... right now the way to play is to put an heavy object on the space bar and go play with a toddler do some real work that really should have been done already, right ?
 
@SomeGuy dat bird is pretty fast I admit, and you live in a parallel universe where everything is australia, there are 2 suns, and life is a clone of other life
@dystroy nope, eagles may come and kill you
 
That is very cool. And if you need to know when the process is complete, just add a function to the end of the queue before you start. Very, very nice. — T.J. Crowder 55 secs ago
:lol:
 
This looks like the very basics of promises, to have a function at the end...
 
@towc nice. But please, for the love of god, fix your indentation
 
12:23 PM
or dog, as you're atheist
 
@FlorianMargaine which indentation?
 
lol
why indent ?
 
ooh!
 
GameManager.prototype.drawEntities = function () {
    if (this.entities[0])
        for (var ent = 0; ent < this.entities.length; ++ent) {
            var entity = this.entities[ent];
            entity.draw(this.drawer);
        }
}
oh my god
 
12:25 PM
Hu ?
why this test ?
 
seriously, I don't mind missing braces in most cases. This one is a recipe for disaster though.
 
@FlorianMargaine in that case I should just add brackets if you think it looks bad... fixing the indent would mean getting the for at the same level as the if
 
meh
@towc it's OK
 
the test is useless anyway
 
@towc that's not where I meant to fix the indentation
 
12:26 PM
anyway, fixed
 
Yeah, the if is useless anyway :P
 
window.addEventListener('load', function () {
    console.clear();
    function Config(){
        this.images = {};
        this.imageSrcs = ['playerOnwalk', 'playerOnfall', 'playerOnfly', 'nut','eagle', 'background'];
        this.sounds = {};
        this.soundSrcs = ['nutPing'];
        this.init();

    }
        Config.prototype.init = function () {
            this.setImages();
            this.setSounds();
        }
        Config.prototype.setImages = function () {
            for (var imgN = 0; imgN < this.imageSrcs.length; ++imgN) {
you see nothing wrong there with the indentation?
oh, is that on purpose?
 
@Miszy if there are no entities it would launch an error
 
@towc No, it would not. Your for loop checks for that condition.
 
12:28 PM
@FlorianMargaine I found out that indenting prototypes a bit more than the constructor makes it easier for me to read it
 
if there are no entities the loop should make no iterations
is "not having entities" an erroneous condition?
 
@towc I recommend splitting "modules" into files :P
 
@Miszy it would run once anyway, right?
 
If yes then it should be expressed on the type level.
 
Maybe you wanted if (this.entities) ?
 
12:28 PM
@towc no?
 
@Miszy not yet, but I will later
 
Of course you will :P
 
@towc no!
 
@dystroy it will always be assigned to something, but could still be an empty array...
wait...
 
12:29 PM
see that's what happens if you teach loops to beginners
that's precisely what happens
 
what ?
 
!!>for(var i=0; i<0; ++i) console.log('if I\'m right this should log')
 
@towc All signs point to no
3
 
@towc empty array !== null/undefined/0/""
 
How can they stop being beginners if they're not teached loops ?
 
12:29 PM
taught*
 
@towc "undefined"
 
ok, you're right...
 
@towc we're always right
 
@NickDugger I think I've used "teached" enough times for it to be considered a usual variant
 
@dystroy loops are a low-level concept vOv
teach them as an advanced concept
 
12:30 PM
"teached" is incorrect.
 
!!s/is/was/
 
@dystroy "teached" was incorrect. (source)
 
You can't say, "Well, I've said that 2+2 = 5 enough times, so now 5 is also a correct answer"
 
A language is alive.
 
@NickDugger language isn't math
you can
Teached is (nonstandard, colloquial, dialectal) simple past tense and past participle of teach
 
12:31 PM
sigh
 
:)
 
It's a bastardization and needs to be lynched
 
he isn't a native speaker. I think the occasional mixup is fine
 
so you should be lynched too?
 
@rlemon And it happened in math before too :P
 
12:32 PM
Go die, florian
 
you should not have made English the World language, now we're going to dystroy it
4
 
jco
Hey guys, I need to save simple text data - basic key: value records - from a browser JavaScript app. I don't have access to server-side tools, only file hosting, so I'm looking for a service that would let me save those things and read them later. Got any suggestions?
 
@jco dropbox api
 
jco
12:33 PM
Simplicity is my main criteria
 
ah wait by file hosting you mean "FTP" or what
 
@dystroy isn't the destruction of language essentially how English was formed?
2
 
imgur (just store any value in an image)
 
jco
Basically yes, no PHP
 
@jco localStorage
 
12:33 PM
"no PHP" is always a redeeming statement
 
@jco Do you need access to these values accross different browser sessions?
 
jco
@FlorianMargaine Multiple people need to use the app, and I need to save it in a central storage to analyze later
@Miszy I need people to use the app, and save their data so I can access all of it later from a single computer.
 
@jco again, elaborate on "only file hosting"
 
@jco Use Firebase :P Or one of these: nobackend.org/solutions.html
 
jco
@BartekBanachewicz AFAIK I don't have access to Node, PHP, and server-side stuff. I need to use some third-party service from browser JavaScript
@Miszy Thanks will research it
 
12:35 PM
@BenjaminGruenbaum see from there ^^
It's worth to know, that there are promise implementations which do not enforce that rule, and are used successfully in complex, production released applications. See e.g. github.com/medikoo/deferred (I'm the author) — Mariusz Nowak 4 hours ago
 
          }
        });
      }
    });
  });
});
@dystroy oh well
 
@BartekBanachewicz is that lisp? ;p
 
@BartekBanachewicz yeah, callback hell :P
 
eh still not acknowledging promises as monads is shitty
 
now, what shall the next enemy to add be?
 
12:38 PM
@AwalGarg no, that's lisp. Not so many closing parentheses.
 
@FlorianMargaine )))))
I just can't stand that
Especially considering that one $ solves it
 
@BartekBanachewicz jquery
 
anyway lisp is inconsistent
it doesn't require an opening brace at the beginning of the code
 
@FlorianMargaine {I {can't} reall[y] (se)e wha{t} [you wa]n't t(o) s[a]{y}}
 
llike look at this
(when (get-session slug)
      (new-slug))
 
12:41 PM
what's weird there?
(you don't have the right indentation btw)
;; Creates a new slug
(defun new-slug ()
  (let ((slug (generate-slug)))
    (when (get-session slug)
      (new-slug))
    slug))
 
most of those parens is unnecessary
they are for the computer, not for the humans
 
hm, no :/
 
hm, ye.
the only thing they do from human perspective is hurt readability
 
@FlorianMargaine doesn't matter. he doesn't like your language so he'll be condescending about it. just back away slowly and everything will be okay.
 
hm, nes ;p
 
12:43 PM
@BartekBanachewicz having parentheses or not differentiates between function call and just having a value
 
@rlemon haha lol I just love how if you don't agree with someone, you can't talk with them
@FlorianMargaine there's no effective difference between the function application and a value
 
hence why you see (get-session slug) w/ parens, and slug w/o parens
 
isn't Lisp functional?
 
not really
it's whatever you want it to be
 
no when I dont' agree with someone I can talk to them. it is called social interaction. you often come a cross as condescending when you talk about languages. we've been over this.
 
12:44 PM
ew.
 
if you want it functional, then so be it. You have all the tools you need to make it be.
 
@rlemon yeah I don't agree with you on that so you should back off.
@FlorianMargaine except the syntactic ability to treat function calls as values?
 
@BartekBanachewicz what do you mean?
 
no that is just backwards.
 
my english is failing me, there
 
12:45 PM
well function application is (f x) in lisp
 
you mean you want a syntactic difference between passing a function as value and calling a function?
@BartekBanachewicz indeed
 
what about function composition?
((. f g) x) ?
 
you mean (defun f()) (g (apply #'f x)?
 
uh what's that
I meant (f (g x))
 
oh, my bad
what about it, then?
 
12:48 PM
could you do ((. f g h) x) ?
 
what are . and h?
 
(. f g) = \x -> (f (g x))
dunno how you write lambdas in Lisp TBH
 
yes, that's simple with 2 args, but what about 3 args?
(lambda ())
 
@FlorianMargaine every function takes one argument vOv
 
so you want (f (g (h x)))?
 
12:50 PM
yep.
 
.... and?
I don't see where you want to go
 
I ignored Florian, so now I just see a one-sided conversation by Bartek, lol
 
@FlorianMargaine I'd like to specify it without the ending parens, that's all
 
@BartekBanachewicz oh. But I like my parens.
they're like braces. They clearly define the beginning and the end
they mean I have a very simple AST at my disposal that I can change at will
 
you're using braces in an RPN language
that's the first sign it's doing something wrong.
 
12:53 PM
reasoning?
 
RPN was invented to make parens unnecessary in the first place
 
lisp could be full of braces instead of full of parens, it doesn't change much
 
well why not allow ommitting braces when unnecessary?
 
the point is that your code is still just a bunch of s-expressions
 
I'd consider Lisp a top-quality language if I wouldn't have to write braces where I didn't want to.
 
12:54 PM
@BartekBanachewicz because the parentheses mean something
(f) is different than f
 
shouldn't be vOv
 
it's like in js, function f() {} f(); is different than function f() {} f;
 
but that's because JS/Lisp are impure.
in a pure language there's no difference between f() and f
 
how would you differentiate between function application and function passing? (or whatever term you need to "pass" a function)
 
@FlorianMargaine I can tell you how it's done in Haskell if you want.
application is f x.
 
12:56 PM
@BartekBanachewicz sure
 
it's left-associative, so when you have to do this: f (g x)
 
@NickDugger You're so salty, lol
 
you write this: f $ g x
 
!!urban salty
 
@NickDugger salty A word originating in Philadelphia generally meaning that you just got played, or are looking stupid, either because of something you did, or something that was done to you.
 
12:57 PM
functions that take no parameters are constants.
a = 5.
 
(f g (h x)) is written as f g $ h x in haskell?
 
@FlorianMargaine mhm
 
People call people "salty" instead of "stupid"? Slang is salty.
 
what about (f g (h x) i)?
 
@BartekBanachewicz but I can also redefine what 5 evaluates to in some languages... so thats not constant.
 
12:58 PM
@FlorianMargaine you can keep the braces if that helps
 
brb, I'll read when I go back
 
No, stupid would imply a lack of intelligence.
 
@FlorianMargaine f g $ (h x) i
 
Looking stupid != stupid
 
Looking stupid !== stupid //there is a type check too...
 
12:59 PM
@AwalGarg lol.
 

« first day (1377 days earlier)      last day (3576 days later) »