« first day (40 days earlier)      last day (3085 days later) » 

12:17 AM
@TinyGiant Bergi answered my question. He made me more confused.
 
user4639281
He can do that
 
Like, a lot
I fail to see how Symbol.species act here. FF 44.0a2 may not yet support it, but in your example the log is false when I expected it not to be. Also, the MDN example and the spec seem to say it must be a function but you just defined a field. I have just tested the MDN example without the static Symbol, and the behaviour of logs don't change at all. I don't get how map would use the Symbol. Could you please show an example, a diff, where Symbol.species makes a real difference (assuming FF is not broken)? If I'm vampiring, pass me the stake and I'll handle myself. — Kyll 3 mins ago
Well, anyway
The doc is literally a two-liner
No one probably has the slightest idea whatever the fuck this Symbol is supposed to do
Someone barfed it in the table, everyone thought it looked smart and didn't remove it
 
user4639281
Great explanation, still can't see how it is useful. — Tiny Giant 9 secs ago
 
Wait, you got it?
 
user4639281
Yeah, I got the general idea.
 
12:21 AM
I mean
In the example codes, MDN's or his
Symbol.species does not influence the outputs
So why the hell does it even exist? What kind of purpose does it have?
 
user4639281
Nope, it does not. It's one of those Moar Magick things.
 
Yes, it does need more. I asked for it.
 
user4639281
I'm sure that it will actually be useful at some point. I just don't see any use for it right now that cannot be solved using existing methods more simply.
 
Also, I love how hasInstance would help me so much these days (Fighting with a library crippled with this awful constructor pattern) but has not been implemented anywhere
 
user4639281
lol
 
12:27 AM
Let me show ya real quick
 
user4639281
I just wrote two apps, then realized that I only used one if statement all together. That's what educated guesses get you.
 
It's a package used to make stuff like check(userInput, Number)
 
user4639281
ok
 
Thing is
They thought it'd be smart to allow devs to make their custom things
Like check(someValue, Match.Where(myCondition))
Which is great because that way you can just run your own thing
Thing is, the smartness stopped there because Match.Where(condition) returns new Where(condition), in which Where is a local variable
 
user4639281
lol
 
12:30 AM
So let's say I want to use my own objects
Compose them and stuff
Be modern and all, use mixins, factories, beautiful things
Well I'm screwed, because check ain't having none of it. He wants his own little local variables and that's all
I'm making a composable, chainable beauty of an API to make patterns
 
user4639281
That's kind of useless... not very educated guess-like (from this point forth referred to as magical)
 
To write things like let goodNumber = K.Pattern.Number().min(42).max(100)
 
user4639281
I honestly love it when people look at my code and think "how in the hell does that end up as that?"
 
And because I want dem users to have the least amount of da work to do, I'd like them to be able to write check(50, goodNumber)
@TinyGiant I know the feeling ^^
 
user4639281
@Kyll looks cool
 
12:34 AM
So to do this check(50, goodNumber) I somehow have to convince check to use my own goddamn functions
Which he does if it's a Match.Where pattern...
So I have to write crap like let patternProto = Match.Where() to trick instanceof
Issue being it looks disgusting and make composing stuff very clunky
So yeah. Started rewriting check too, as K.check. Obvious advertisement
Better error messages, better testing, better extensibility
Also my hatred for the constructor pattern grew a lot when trying to make things work
 
user4639281
Yeah, I hate other people's code.
 
Well I love other people's code when it's written so that it can accept my own code
One of the thing we'll include in K.check is a complete override through a Symbol. You'll have something like K.check.overrideSymbol which you would add to any object. On the Symbol should be a function, which will be used by K.check instead of all the other stuff.
So you could do stuff like :
let exactValue = {
  value : 42,
  [K.check.overrideSymbol](value) { return _.isEqual(value, exactValue.value) }
}
That would be dumb because we'll have the case covered with a pattern of our own, but you could do that
 
user4639281
Should use bit shifting.
 
user4639281
Nah, too much work.
 
Good thing with Symbols is you could also place them on objects which have no idea you're doing it to them
 
user4639281
12:44 AM
but the symbol idea would work.
 
Say you use foo objects which have a bunch of states and prototypes and all, and you sneak in the Symbol also. Well congrats, you've just made that object a working pattern you can use with K.check(value, foo)
Without making any actually noticeable changes to foo's API, unless it's actively looking for that Symbol
Hey, do you know stampit?
 
user4639281
Nope
 
user4639281
I'll have to look more into it when I have some time.
 
11:03 AM
@Tiny Bergi updated answer, I think it makes sense now
Plop!
 
 
2 hours later…
1:01 PM
Hello, lonely @Kyll
 
@TinyGiant Looks like Jon made it private.
 
Sam
Hiya
 
1:17 PM
Hi!
 
Plop guys
 
1:34 PM
Howzit
Wow, Madara is hopping right on things! stackoverflow.com/questions/27361413/…
 
@Mogsdad Madara?
Ah
Why do you link to the answer when you wanna show the question? -.-
 
Testing you.
(It was the link I first followed, so was in the address line.)
 
2:16 PM
@Mogsdad Yeah, right? It's great to have a moderator by our side
But, well... Now there's always Madara, bluefeet, and Jon
I wonder what we did to deserve that honor
 
 
3 hours later…
5:07 PM
@Kyll And josilber, too. An embarrassment of riches!
 
 
1 hour later…
Sam
6:34 PM
... and there comes rene.
 
user4639281
No fun allowed, didn'cha know?
 
Sam
 
user4639281
 
Sam
:o
 
 
4 hours later…
10:52 PM
@Siguza Yo
 
Stalkedy stalk...
So Tiny's not here, huh?
 
Sam
He left maybe half an hour ago
 
@Tiny Sup
 
user4639281
Here I am!
 
Sam
Wb lol
 
10:57 PM
Nice timing
 
user4639281
Lol.
 
So @Tiny I think it's kinda ok for now
 
user4639281
K, whatever you figure.
 

« first day (40 days earlier)      last day (3085 days later) »