« first day (1324 days earlier)      last day (3847 days later) » 

18:03
Lol, crockford now stopped using Object.create and stopped using this.
lmfao
w.. what?
how about he stops using js?
lol, he doesn't use for loops anymore, he only uses .forEach
Also, he just called .foreach monadic HAHAH
meh, I'm too trolley.
does he have a reason for not using Object.create and this?
Never heard of this Crockford
does he just use closures and the module pattern?
18:07
@FlorianMargaine yeah, they're not monadic, like .forEach
He just uses plain objects
forEach is monadic?
not at all :D
what would define something as monadic?
aha!!!
ha ha haa
A bind operator, a unit, and a way to create it.
18:09
hahaha
ha hhaha
okey I'll stop now
forEach does have bind (2nd argument), and a unit (the array)
not sure what you mean by "a way to create it"
that's a different bind
>>= is bind
yeah, I don't do haskell
@FlorianMargaine you'll totally understand that though, promise adit.io/posts/…
thanks, reading that
18:12
Why does he keep calling prototypical inheritance "stronger" than classical one?
Why would anyone believe that you can't implement prototypical inheritance in a language with classical inheritance?
Learn C the hard way, one of the more popular C books I know of even has a chapter (an early one!) where an exercise is to implement prototypical inheritance in C.
It's dead simple, you just go up a pointer chain until you find the element or return null...
Does it matter? Just write your code and happy and unicorns.
It's trivial to implement in about any language.
@FlorianMargaine @Benjamin or my article!
Monads don't always represent a context though..
well, maybe, if by context you mean a way to look at sequencing stuff.
monads are all about sequencing
18:15
I don't really get it
why not just have a simple function?
@FlorianMargaine ever used promises?
@FlorianMargaine see, read my thing first. That article is great, but dwells on theory.
@BenjaminGruenbaum yeah
Ok
.then is a >>=
or maybe benjamin got it
18:16
afk dinner, keep explaining, I'll read it after
It's an operator that takes a promise (the this), and accepts a function that has its internal value, and returns a promise on that other value
var p = Promise.delay(1000).return("a"); // This is an M string
// This operation takes our M string, and a function, that has a string argument
// and that functions returns a promise on a number (a M number)
// and that whole operation is assigned to `p2` , in our case also an M number
var p2 = p.then(function(val){
    return Promise.delay(100).return(3);
});
@BartekBanachewicz People get the promise example better the "Have you ever written code one" which does something like:
var p = "a"; // the right side expression is the function, p is a M string with the "nothing" monad
var p2 = p+"s"; // the right hand side is the function that uses p, and returns a M string  with the "nothing"  monad
hah :D
uh.
you also should read my article :)
18:20
@bjb568 we're discussing a video, here's the context ustream.tv/recorded/46640057
@BartekBanachewicz that last one was a joke :P
I was gathering feedback, and it was amazingly non-negative so far
@BenjaminGruenbaum I know, come on.
@BenjaminGruenbaum It no load.
Where are you from?
Calif
Hmm, give it time to load
18:25
Hi guys. Do you have any idea on how can I turn a string into an array, like this: (str) "name[one][two]" => (array) ["name", "[one][two]"]
@enzo please be more specific, and show us your attempts so far.
Can you define your logic? Why would the string be split there?
-3
Q: Badges for the website

user3128966We need to create the badges for our website so other website owner can place it on their site. My idea is to create badge for creating the backlink and promotion. My developer suggested 2 methods; 1: Scripting: He told me this is the best way to create badge and track the count, but this will b...

hey!
18:29
oh yes, sorry. The idea is to take an input name, and change it from name[one][two] to test[name][one][two]. So I figured the best way would be to separate name from [one][two] so I can add the brackets between "name"...
Windows does this cute thing where it stops downloads at 3mb
@enzo So you want everything until the first square bracket, and everything after it
@Zirak exactly :)
!!mdn enzo String.indexOf
!!mdn enzo String.slice
No? ok....
!!mdn enzo String.prototype.indexOf
?
!!are you dead?
18:31
@BenjaminGruenbaum Nuh-uh
wat
!!info
@Zirak I awoke on Sat, 31 May 2014 00:01:39 GMT (that's about 1 day ago), got invoked 89 times, learned 273 commands
!!mdn bind
@Zirak oh, that's fine zirak don't worry about the links
18:32
wat
ok...
@Zirak I'm taking a look at indexOf() that takes a fixed position, so that won't work since the "name" part (name[one][two]) is dynamic...
or variable I should say...
dat w3schools citation tho... — RUJordan 6 secs ago
sorry I mean slice()
Which is why I also linked you to indexOf
ohhh I see, I should use the togheter
nice, thanks zirak
18:36
Enjoy
Hey Miaou lovers. As I want more users I made a small promotion/introduction page. Could you please have a look ? Any help on content, English, ideas, look, anything is welcome.
It says pretty much nothing.
The green is pretty bad
@copy I'm no good at colors....
18:45
@TJB4rn3s 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.
@dystroy I'm having the same problem. Maybe ping one of the designers here
@BartekBanachewicz I know this kind of tools, it doesn't help me much
@copy Unfortunately this chat doesn't allow the pinging absent users :(
(and I don't know who's a designer among present users)
@dystroy it has a lot of presets created by users. You can just pick one.
Removed the green
But I'm sure there are other problems than the second background color
18:52
Did you do something special to get this ?
No
And your baby is adorable.
Do you have JS errors in the console ?
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (jquery-2.0.3.min.map, line 0)
loool
needs more jQuery, obviously
@BadgerGirl not a problem, this one
@BartekBanachewicz jQuery will be used for other pages, so I didn't hesitate to use it here even if I use 2% of it
18:56
@dystroy That's all I get
My layout logic is broken. I think I'll have to make it differently
@dystroy I like it, except the colors indeed. I'd put mobile first though.
@FlorianMargaine first ?
oauth 1st, mobile 2nd
yeah, the content
I thought OAuth was a little too technical/boring for most users
that's why it's not first now
(it was first in my initial draft)
19:04
yeah you're right
I think mobile shouldn't be last though
the "enter miaou" link is broken :P
changed the order
> (some languages with weird or or simply badly designed scoping rules require explicit this annotations)
@BartekBanachewicz haha
@FlorianMargaine ;)
> (insert short readable explanation).
@BartekBanachewicz WHERE IS IT
@FlorianMargaine I am working on uni assignments. For now, Wikipedia must suffice :(
Referential transparency and referential opacity are properties of parts of computer programs. An expression is said to be referentially transparent if it can be replaced with its value without changing the behavior of a program (in other words, yielding a program that has the same effects and output on the same input). The opposite term is referential opaqueness. While in mathematics all function applications are referentially transparent, in programming this is not always the case. The importance of referential transparency is that it allows the programmer and the compiler to reason ...
Purely functional is a term in computing used to describe algorithms, data structures, or programming languages that exclude destructive modifications (updates) of entities in the program's running environment. According to this restriction, variables are used in a mathematical sense, with identifiers referring to immutable, persistent values. Other side-effects, e.g. network communication or console output, are represented as function evaluations instead of entities with updated values. To represent computations that perform side-effects in a purely functional programming language, one ...
19:14
@BartekBanachewicz from what I understand, monads are functions used with bind in JS
> Monad is a context
:)
so it's this, when bind is used?
it's more
or rather, it's a "structured" this
sorry, I don't get it then
well, if you only look at keeping state, then it's very similar
19:16
oh, it's more because it allows you to return a new state etc?
no, not that
that's purity.
monads are not just about state
they are a way of describing how the computations are going to work together
State monad says that continuous computations alter the state in sequence
however, Promise chains them in a much different and powerful way, right?
hm... I guess?
"them" being "states"?
Monad as concept means a way to structure those different concepts into one common way of expressing context, defined by >>= (chain) and return
@FlorianMargaine no, computations.
operations, if you prefer.
oh
I think I got it
essentially "programmable semicolon" :)
19:19
yeah
but then, so much explaination around such a simple concept :|
it's because people are used to think in terms of imperative contexts
and they are really only "constants + mutable state" most of the time.
a lot of haskell, monads being no exception, is built around common primitives building common operations; sometimes the shared commonalities aren't often used, and as such, might seem unnatural.
I didn't have trouble learning most haskell concepts tbh
I just never went as far as learning about monads
I might end learning Haskell just to follow discussions in the JavaScript room...
Don't bother, it's a really shitty language.
You're not subtle enough, Bartek won't react :)
19:27
No really, there is nothing you can do with it in practice.
@dystroy it's interesting, but mostly mental masturbation
@BenjaminGruenbaum put the xkcd link pls, onebox gets the title too :P
yes, it's always disappointing to hover and not see the text
Didn't know that :)
better late than never
19:28
Also @BartekBanachewicz agrees with me, so that would not make him 'react'
BTW, that's a feature that Miaou doesn't have
@BenjaminGruenbaum eh.
@FlorianMargaine it has strong mathematical notions. I still find it practical, though.
@BartekBanachewicz @dystroy told you he'll react
19:49
Guys, this is fucking hilarious. doge2048.com
4
@RUJordan I can't stop
pls halp
HAMMERTIME!
so doge D:
!!doge pin,addict,doge
        wow
             very pin
                          so addict
such doge
20:04
@BenjaminGruenbaum such a reaction
@RUJordan ancient
!!s/rea/ere/
@copy @BenjaminGruenbaum such a erection (source)
u so fun @copy
@BenjaminGruenbaum :(
20:11
also, that game is too easy
uh I can't force myself to work on that thing
I broke it too much
ok guys, im back with another question lol
0
Q: Simple preloader that loads all resources and caches them before showing site and running animations

DemorusI am trying to create a simple preloader that will request and preload all resources until everything is cached. Then the website should fade-in. The issue what I am having is that Im not sure if my code below is ok as im still a novice. Also what I cant manage to achieve is stop any css3 animati...

with jsfiddle :D
//<![CDATA[
why
gonna make a coffee :D
oh hang on meredith
@Demorus that always happens
20:18
@BartekBanachewicz what happens?
:D
@Demorus people come back with another question.
hehe indeed
Meredith, I usually add CData for inline scripts. I can remove it but it is kind of a ritual xD
what do you think of my jsfiddle? any idea how I can complete it?
20:37
Would anyone here be interested in a "How to use Bluebird promises with Angular" tutorial?
20:48
@BenjaminGruenbaum why not
@Mosho basically jsfiddle.net/EZ2Kd
Of jsfiddle.net/xKFRB although not sure that's better than a digest jsfiddle.net/xKFRB
lol, started googling some of the things, found an issue you opened on GH
21:02
now one by @FlorianMargaine with some comments by you :X
ok, writing the question :)
0
Q: How do I use Bluebird with Angular?

Benjamin GruenbaumI tried using Angular with Bluebird promises: HTML: <body ng-app="HelloApp"> <div ng-controller="HomeController">{{name}} {{also}}</div> </body> JS: // javascript var app = angular.module('HelloApp', []); app.controller("HomeController", function ($scope) { var p = Promise.delay(100...

@Mosho feedback please :)
!!live
@BenjaminGruenbaum I'm not dead! Honest!
@BenjaminGruenbaum interesting :)
So, you can speak automatically
Anyone can, no one had to manually approve you
not sure I wish such access rights to be applied automatically
21:13
However, room owners can kick you out
!!mute @JonClements 2m
@BenjaminGruenbaum User @JonClements not found
Hah :P tech demo
!!mute JonClements 2m
@BenjaminGruenbaum Muted user 1252759 for 2m
So now you can't speak in the room, again - no one had to manually do anything and the mute expires in two minutes.
!!unmute JonClements
@BenjaminGruenbaum Unmuted user 1252759
21:14
Access control is completely automatic
1
Q: How do I use Bluebird with Angular?

Benjamin GruenbaumI tried using Angular with Bluebird promises: HTML: <body ng-app="HelloApp"> <div ng-controller="HomeController">{{name}} {{also}}</div> </body> JS: // javascript var app = angular.module('HelloApp', []); app.controller("HomeController", function ($scope) { var p = Promise.delay(100...

@BenjaminGruenbaum so the purpose of all that is just to cause a digest?
Yes, to evaluate it on Angular
Morning
21:16
o/
5
Q: Should room owners be allowed to accept <20 rep users to talk in a room

Jon ClementsI'm a fairly heavy chat user - and I think for new users sometimes it's best to direct them to a room related to their question, whereby details can be thrashed out (avoiding a long stream of comments). Thereby, getting a question back into shape and answerable - possibly even answered and posted...

@BenjaminGruenbaum the limit should be 2reps in my opinion
@BenjaminGruenbaum any specific reason why you use $evalAsync rather than $apply?
@Mosho yes, they do different things.
45
A: AngularJS $evalAsync vs $timeout

Mark RajcokI recently answered essentially this question here: http://stackoverflow.com/a/17239084/215945 (That answer links to some github exchanges with Misko.) To summarize: if code is queued using $evalAsync from a directive, it should run after the DOM has been manipulated by Angular, but before th...

yeah, but why do you need either rather than just $apply
21:24
What if a digest is already in progress?
Also, because that's what $q does.
I see
I think I answer that in the question I linked to in the answer about how $q digest works
Anyway - thanks for inviting me @Benjamin
so if you $timeout or $evalAsync angular queues it for the next digest
or appropriate digest
21:28
@t1wc imagine the noobs storming here
@BartekBanachewicz at least they denoobize earlier
otherwise they might never get to the chat...
noob shields can't handle that load
@t1wc too bad.
fuck people who can't read and/or learn
that's precisely why the limit is there
@BartekBanachewicz I do. Every day.
@BartekBanachewicz it took me about 2 weeks to reach the chat
@monners not literally, right?
I started chatting around 1k rep
21:30
Rep has nothing to do with noobishness
I was a big noob before joining the chat
now I'm a small noob
but it's just by chance that I was able to get here
@Mosho if there is no digest running, it will eventually run one.
think of others as me
I'm pretty sure I linked to that code.
$evalAsync: function(expr) {
    // if we are outside of an $digest loop and this is the first time we are scheduling async
    // task also schedule async auto-flush
    if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {
      $browser.defer(function() {
        if ($rootScope.$$asyncQueue.length) {
          $rootScope.$digest();
        }
      });
    }

    this.$$asyncQueue.push({scope: this, expression: expr});
  },

  $$postDigest : function(fn) {
    this.$$postDigestQueue.push(fn);
@Mosho from the source
@copy proof: okok has like 7k rep. Neal has like 50K rep.
@t1wc I just don't think that two upvotes is that much
4 if you ask a good question
my friend asked his first question here and it went to +11 or something like that
21:32
regex, right?
@t1wc Depends on how much they pay for dinner
to +10 actually.
10
Q: std::piecewise_linear_distribution not working under VS2012?

WierzbaI decided to get to know c++11 <random> better, so I wrote such a code: std::mt19937 gen(10); std::piecewise_linear_distribution<> d(Range.begin(), Range.end(), RangeValues.begin()); std::map<int, unsigned int> hist; for (int n = 0; ++n != iterations;) ...

@BartekBanachewicz I think that just being able to get an upvote means that you were able to answer a question or ask one, which I guess is already a good noob-shield
@monners -_-
@BenjaminGruenbaum yeah, I guess I knew that
@t1wc one upvote can be random. 4 give much better certainty, while not being too demanding
21:35
@BartekBanachewicz I don't think compiler bugs make for really good questions, but sure.
wow, such a code
hrh
@BenjaminGruenbaum well we didn't know for sure if it was a bug by then.
also the bug is still active :P
NOOOOOOOO my favourite film freestreamer is down for maintainance!
oh, it's up again
21:57
@user2762365 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.
22:19
2
Q: NodeJS - Deferred function inside a loop

ncohenI have a conceptual problem with NodeJS... I need to call a deferred function within a loop and use the response for the next iteration. How can I do that without blocking? Here is what I did but of course, response.rev doesn't get updated for the next iteration: first.function().then(function(r...

22:49
-1
Q: implement timers in pic microcontroller

randyi need to write a code to implement more than 3 timers thanks in advance.

Holy vamp
lol
@Will thanks for reply. i need to write this in 16f877 pic assmbley not c. — randy May 29 at 13:09
23:37
just finished watching 'Looper'
it was kinda disappointing
Ugh I feel like such a noob right now -_-
m59
m59
@SomeKittensUx2666 still with this
"Usually you use double quotes for strings and single quotes for characters. It may work since it is a string of characters but it should really be double quotes. I had a professor who would take points off for this."
Am I crazy?
m59
m59
Because it seems to me that this "professor" is full of crap.
Depends on the language
m59
m59
23:41
Javascript :)
Yep, that's bad
That's retarded
m59
m59
to what language is that actually relevant?
JAVA
PHP also has different reactions based on quotage
23:42
yessir
Php is php though
REBOL as well
i love php
It does what it wants
It doesn't give a shit
23:44
But yeah I use single quotes if the string is meant to only have 1 character
Just as a standard
what are standards ;)
jk btw... please dont vote me down or something

« first day (1324 days earlier)      last day (3847 days later) »