« first day (1896 days earlier)      last day (3276 days later) » 
00:00 - 21:0021:00 - 00:00

crl
crl
21:51
needs some code to change [o1,o1,o2,o2,o2,o3,o4,o4] in [o1,o2,o3,o4], where o's are objects
_.unique()
crl
crl
hmm I'm not using lodash or underscore
copy paste it
but really, it's a reduce
crl
crl
ok, yeah like new Set(array) maybe, but it's not well supported
arr.reduce((ret, next) => {
    if (ret.includes(next)) {
        return ret;
    }
    ret.push(next);
    return ret;
}, []);
21:54
Merry Christmas to everyone that celebrate it today:
https://jsfiddle.net/q1f5t2Lr/
crl
crl
ok, thanks (include -> ~indexOf )
or arr.reduce(((ret, next) => ret.includes(next) ? ret : ret.concat(next)), [])
@crl yeah, es6
easily shimmable
crl
crl
ah, didn't know
function unique(arr) { return arr.reduce(((ret, next) => ret.includes(next) ? ret : ret.concat(next)), []); }

unique([1, 1, 2, 2, 2, 3, 3, 3, 3]); // [1, 2, 3]
crl
crl
yes, thanks Florian, maybe I'll tune it since my values are contiguous, just need to check ret[ret.lengt-1]===next
22:00
well, you got the gist of it
crl
crl
yep
writing such a function is pretty easy
and I'm really surprised I could copy paste this snippet in chrome and it worked
I had an idea for a second of adding types to coffeescript
includes, fat arrow
feels really good.
but then ... I realized
22:01
@Abhishrek typescript?
coffee + types = Java.
@FlorianMargaine yeah kinda like a mix of typescript and coffeescript
so not a good idea
I am staying with typescript
@Abhishrek what's going on with you? wanting to write new languages every day these days
@Abhishrek learn common lisp for a while
@FlorianMargaine I did :D
I am not writing new langauges, I am just exploring a ton of them, their AST's how their tool chains work
22:03
@Abhishrek how far did you go?
the good the bad and the ugly
what came out of CL? :)
@FlorianMargaine Ended up erasing everything I wrote in my notes
Common Lisp is almost VPL'able directly
VPL?
virtual programming language?
Visual Programming
although nobody would want to do that.
@FlorianMargaine I used this gigamonkeys.com/book
to learn
it's a great resource
it doesn't mention reader macros though
the gist I shared shows you how to define a completely new syntax (here, JSON)
yep reading that :D
The experimental VPL I am working on now stores the program in something that looks like lisp. (that came out of lisp)
22:48
I use uncommon lisp. You probably haven't heard of it.
crl
crl
I just realie we shouldn't do document.querySele.. but rather document.body.querySele..
i think both are valid, right? Or are you saying that document.qs is not to spec?
crl
crl
it is spec, but I guess it will check the <head> for nothing
ah, i see.
23:03
@MadaraUchiha, I read your profile. I like your idea to encourage high-quality answers. I always have quality, completeness and future reference in mind when I post an answer. In terms of your bounty idea for canonical answers, would this be a candidate? stackoverflow.com/a/33856609/3597276
crl
crl
it really lacks a justify-content: space-same where the spacing is [ -A- -B- -C- ]
or maybe your margin trick does this
@Michael_B yup
@crl space-around
crl
crl
a bit different, I want a space always the same, even between the border and the first element
@crl space-around
crl
crl
but that could be achieved with a margin on the container actually, hmm no
`[-A-  -B-  -C-]`  space-between
`[ -A-  -B-  -C- ]`  space-around
`[  -A-  -B-  -C-  ]` space-same
23:14
@crl Right, my bad
crl
crl
23:26
too bad we can't do documentFragment.innerHTML = something
function S(html){
  var el= document.createElement('div');
  el.innerHTML=html;
  return el.firstChild;
}
var t=S('<table><tr><td>3')
23:49
@crl, space-same is not a value offered in the spec for `justify-content`... however, you may be able to achieve the equivalent effect with pseudo-elements on the container:

`#container::before,
#container::after { content: ' '; }`
crl
crl
ah clever, space-between with that would work
I believe so, but haven't tested it.
@MadaraUchiha, thanks for the recognition. Always happy to contribute something useful.
00:00 - 21:0021:00 - 00:00

« first day (1896 days earlier)      last day (3276 days later) »