« first day (2352 days earlier)      last day (2505 days later) » 

6:03 AM
That implies a decomposition of $n$: $b(b^{z-1} - 1) = n$
 
Me: Where is everyone to answer my question? Me: Oh crap it's 2am
 
1
Q: Product of Divisors

musicman523Challenge Given a positive integer, return the product of its divisors, including itself. This is sequence A007955 in the OEIS. Test Cases 1: 1 2: 2 3: 3 4: 8 5: 5 6: 36 7: 7 8: 64 9: 27 10: 100 12: 1728 14: 196 24: 331776 25: 125 28: 21952 30: 810000 Scoring This is code-golf, so the sho...

 
So our question is, are there three distinct $a, b, c$ such that
$a(a^{x-1} - 1) = b(b^{y-1}-1) = c(c^{z-1}-1) = n$
 
I just installed MathJax for chrome but everything still shows up unformatted for me, any idea what's going on?
 
6:10 AM
I just got hive (the non-board game)
 
@musicman523 ATaco's userscript AutoChatJax
 
@Mendeleev I installed the script and ChatJax but nothing is happening still :(
 
@musicman523 in the top right of the url bar, does it say blocked unsafe scripts?
you might have to allow it
at least for the one I linked
actually that shouldn't happen with the latest version
 
it is not blocked
At least I don't think so
 
6:28 AM
@LeakyNun it's not very hopeful oeis.org/A057896
 
@orlp not really
you just need to search for $b$
instead of $n$
 
@LeakyNun for each $n$ there are limited $b$
and none of these $n$ work
so therefore we need a bigger $n$
 
@orlp no, for most $n$ there is not even one $(b,z)$
so if we iterate on $(b,z)$ instead, we will be more productive
 
@LeakyNun yes, but this list contains $n$ such that at least two (b, z) form it
 
@orlp so?
 
6:34 AM
and this list has no next term until at least 10^17
@LeakyNun if you iterate over $(b, z)$ the chance will be astronomical of finding $(b, z) = (b', z')$ and you need tons of memory to store all $(b, z)$ so far.
 
@orlp no, you don't
i'll write you an algorithm later
it uses the fact that $f(b,z)$ is increasing in both direction anywhere
@orlp and if you iterate over $n$, the chance will be astronomically astronomical.
 
@LeakyNun well I just tried all (b, z) with b < 5000 and z < 50 and didn't find anything
while trying 50000 and 50 my laptop crashed due to running out of memory
 
@orlp but as you try so, you've already tried n=[very big]
which is what I meant when I said that it's much better than iterating over n
 
I think in order to manage memory requirements you should choose some appropriately sized prime p and then store numbers mod p
and then test for false positives
 
basically my memory is kind of iterating over possible values of $f(b,z)$ in an increasing manner
and I only require as many pointers as $z$
it is possible because $f$ is increasing in both directions
but I don't have the time to write down the algorithm yet
1. store [(0,0)]
2. check the smallest item in the set under $f$, and let it be $(b,z)$
3. if the smallest item has the largest $z$, then add $(b,z+1)$ to the list
4. otherwise, change the item to $(b+1,z)$
5. repeat steps 2-4
this is my algorithm
 
6:51 AM
anyway, I gotta go, my stepsister is getting married today and I'm reciting this
 
@orlp nice
 
7:41 AM
I have an idea
a challenge idea
its about counting bytes of ti 84 codes
 
@SIGSEGV What is it?
 
but we need a whole lot of tables
 
;_; I got up to the womb in binding of isaac, but then I got killed by spikes because my d key is broken
;_;
 
@SIGSEGV We need Bobby here
:P
 
;_; its not funny
 
7:53 AM
@DestructibleLemon How did you type binding and killed then
and d
 
it's not that kind of broken
 
what kind then?
 
the kind where I accidentally run into spikes because I'm under pressure from the key kind of being annoying and the top part of it coming off
 
8:11 AM
@DestructibleLemon What laptop do you have?
 
8:40 AM
btw can anyone make a useful APL program with the source in the shape of an Apple
 
9:21 AM
define useful
 
9:36 AM
@DestructibleLemon what game is that?
oh that's the game
 
@Dennis Are you here now ? If you read this later, I just wanna say that for focusing on some exams, I have scheduled to delete all my SE account - will the chat account be deleted too ? (I want that)
 
7 hours ago, by Destructible Lemon
earlier in this chatroom, I asked if anyone had any suggestions for a terminal game I might make. does anyone have any now?
I would like if people could make suggestions maybe?
 
@AlexKChen I'm fairly certain a chat account cannot exist without a parent, but not 100% sure.
 
@Dennis so my chat account would be deleted too, I hope ?
(Also erm are you a kid ? Your profile picture is ... erm... suspicious hehe )
(Also, what does the "eleven" means, in your chat description eh ?)
 
@AlexKChen careful or you will get eleven'd
 
9:50 AM
What does that mean ?
 
oh man my browser just reloaded tnb and I thought I got 11'd
@AlexKChen it means he uses his mod powers on you
 
Why it's called "eleven" ?
 
@DestructibleLemon a multiplayer rogue-like
I've already got ideas
 
ok but I still don't know server things ;_; >_>
@KritixiLithos ? it would have to at least be a roguelite
 
I probably know less server things than you ;_; <_<
 
9:57 AM
hmm
wanna make a room?
 
also what should it be called..
 
"terminal game" for now
if you're talking about the room
 
Random destructions with game, and terminals or something like that
 
;_; your words cut me deep
 
9:58 AM
 
10:18 AM
Hi
 
10:32 AM
@AlexKChen mod abuse!!!!1!1!!1!​**11**​!!!
 
11:10 AM
Is there a Pyth built-in for The divisors of a number?
or is there just the prime factors built-in P??
 
@Mr.Xcoder this
 
@ASCII-only ?
 
There's no divisors builtin
 
if pyth has powerset, you can do prime factors, powerset, product of each, unique, product
 
Byte-waster
 
Okx
11:29 AM
codegolf.stackexchange.com/questions/129965/… this hasn't been deleted yet and really should be
 
another bytewaster: factors -> combinations -> map with product somehow -> unique
 
@Okx Consensus is to give the poster ~48 hours to fix their answer before deleting it.
 
Okx
11:46 AM
It lookit saws 2 days ago, however.
It says 2 days ago, however*
 
Oh, yes. It still was yesterday 20 minutes ago.
I don't know Scratch at all. How do you take input?
 
IIRC you can ask the user for input
scratchblocks.github.io/…*(((a)%2B(b))%2B(c
um
http://scratchblocks.github.io/#ask[]and%20waitset(a)to(answerask[]and%20waitset(b)to(answerask[]and%20waitset(c)to(answerask[]and%20waitset(d)to(answersay(((c)-((a)%2B(d)))%2B((4)*(((a)%2B(b))%2B(c
 
12:17 PM
CMC: given an array of strings, pad each string with spaces at the end so that they will all be of the same length, ie the length of the longest string
["a", "bc", "def"] => ["a ", "bc ", "def"]
Note: the strings will not always be in ascending order of length
 
SOGL, 1 byte: â–“
 
@KritixiLithos Pyth, 3 bytes: C.t
@dzaima encoding?
 
@dzaima alright
 
@dzaima where is the online interpreter for SOGL?
nvm
what does the arrow do?
Dyalog APL, ↓↑ if the output is an array, ↑ if the output is a matrix
 
12:20 PM
that program expects input on stack, that arrow JS-evaluates a string from the input
and it also leaves output on stack. SOGL automatically joins on newlines on output (in fact (ideally) array of strings == newline string)
 
Charcoal would be similar just more bytes :P
@KritixiLithos JavaScript (ES7), 60 bytes: a=>a.map(s=>s.padEnd(a.reduce((p,c)=>(d=c.length)>p?d:p,0)))
@KritixiLithos Charcoal, 5 bytes: ï¼·ï¼³«Î¹â¸¿
 
@KritixiLithos Python, 52 bytes: lambda n:[x+' '*max(len(i)-len(x)for i in n)for x in n]
 
12:37 PM
that moment when an answer that is invalid gets as many votes as your highest voted answer ;_;
 
which answer are you talking about?
 
;_; the scratch one
 
Hmmm... I think that padding the start instead of the end would be more challenging, for my CMC
 
@DestructibleLemon Users with +340 challenges aren't entitled to complain about voting. :P
4
 
;_; but still
 
12:55 PM
Language design question (non-esoteric): one thing that I'm interested in is structural typing (basically like duck typing but static). But I've noticed that, in order for structural typing to be powerful enough to be useful, there have to be some restrictions placed on how the properties of objects can be added/removed. And so I'm wondering what y'all think of that tradeoff.
For example, prototyping as in Javascript (modifying what functions you can call on a particular object) can't produce "global" changes. Since then the properties of an object while inside of a function, can change within that function call.
Example:
def f(x):
    x.foo()
    x.bar()
From this, we would typically want to reason that, whatever x is, it must implement both foo() and bar(). But in order to do that, we must exclude the possibility that x gains the property bar() because of the call to foo().
 
1:15 PM
Ehh, I guess that's just part of dynamic programming that I'll have to give up. There can still be ways to add/change functionality of objects, but they will either have to be upfront (computable before code is executed), or scoped so that they are not visible from beyond the block in which they are created.
 
@PhiNotPi Not sure what you mean, monkeypatching is a thing in many JS implementations.
 
Could you work around that by giving x a placeholder .bar() and allowing .bar() to be changed by .foo(), just not added from scratch? Would that give you the flexibility you want while keeping compile time error checking (or at least some of it)?
I'm guessing Phi means "we can do this in JS, but is it possible to do something similar in a statically typed language?"
 
@mınxomaτ Badly worded, I meant that "prototyping (as in similar to Javascript) couldn't produce global changes (like they can in JS)"
@trichoplax yeah this
 
I don't think the restrictions of property-based type systems make them inherently more useful.
JScript.NET (a compiled language) actually has a compiler switch that will disable monkeypatching (but only on global, intrinsic objects) for the sake of type and scope safety. It's enabled by default.
It also produces slightly fewer assembly instructions. Type errors in this mode will still be runtime errors, if the variables weren't annotated.
 
What I'm aiming for is actually something along the lines of "dependent typing".
Wherein the type inference/checking system can actually reason about the values of variables/objects themselves.
 
1:32 PM
A way of implementing this would be to have assertion constructors of type members. The compiler can then rely on the IR's type checks.
 
I... don't really know what that means.
 
Let's take the first example of "pair of integers where the second is greater than the first". The assertion T.b > T.a would need to be checked at access. The assertion lives in the type definition (the syntax of which is up to you). The code generator needs to emit a check for each (unique) access.
 
@mınxomaτ If I understand you correctly, produces the same effect as having an assert statement each time the object is accessed?
 
Yes, although by reasoning about the previous and following accesses, you can optimize this.
 
Word for lagging still on computer except not related to the internet?
 
1:45 PM
lagging
 
lagging
 
I felt lied to. I was told it only had to do with the internet XD
 
items = [(2,2)]
values = [2]
max_z = 2
f = lambda b,z: b**z - b

def insert(b,z):
	global items, values
	fbz = f(b,z)
	L,R = 0,len(values)-1
	while L <= R:
		m = (L+R)//2
		test = values[m]
		if test < fbz: L = m+1
		else: R = m-1
	items = items[:L] + [(b,z)] + items[L:]
	values = values[:L] + [fbz] + values[L:]

while values[:1]*3 != values[:3]:
	if values[:1]*2 == values[:2]:
		print(items[:2])
	b,z = items[0]
	items = items[1:]
	values = values[1:]
	insert(b+1,z)
	if z == max_z:
		insert(b,z+1)
@orlp @Qwerp-Derp this program prints the following when terminated at 53.246 s (because of some buffering issue, it won't print anything if it surpasses the 60-second limit
[(2, 3), (3, 2)]
[(6, 2), (2, 5)]
[(15, 2), (6, 3)]
[(16, 2), (3, 5)]
[(13, 3), (3, 7)]
[(91, 2), (2, 13)]
[(280, 2), (5, 7)]
[(4930, 2), (30, 5)]
 
@WheatWizard I'm still mulling it over - if you want to take the idea and run with it, feel free. I might do both and but I think doing one in Haskell and one in Python is different enough anyway.
 
2:03 PM
@Dennis Users with +210 answers aren't entitled to complain about voting. :P
 
2:24 PM
@StepHen Posted
 
Pls no do x without y
And language specific? C'mon
 
@totallyhuman How would you make it not-language specific?
 
IDK, if I did, I'd be making challenges
But the question manages to do two things people dislike
IDK
If I did, I'd be making challenges
 
Why is SE in read-only mode? I... oh, I thought this was next weekend for some reason
 
weren't there like 4 dates when read-only would happen?
 
2:34 PM
site is read only
oh no now I can't answer challenges D:
 
@dzaima The 8th and the 22nd at 14:00 UTC
Apparently... I thought it was the 15th for some reason
 
at least chat works atm...previously unexpected errors occurred
> Oops! Something Bad Happened!
 
@ETHproduction avg(8,22)? :P
 
well he's an average person
 
haha..
 
2:36 PM
YAY READ ONLY GONE
 
2:47 PM
This site being read only is like removing SO search functions (includes google listings)
 
-2
Q: Sort a list without builtin functions

Wheat WizardSorting a list would make a pretty fun code-golf challenge, but all the builtins make it boring! Its no fun when you spend all of your time golfing a function and then you see that someone else has a shorter answer just using a builtin! The best way to solve this problem is to ban builtins, but ...

1
Q: Maximum number of distinct substrings

user1502040Description Given a length n, and an alphabet size k>0, your program must determine the number of strings with those parameters which have a maximal number of unique substrings. In the case of k=2, this generates OEIS A134457. Test Cases n k output 0 5 1 1 3 3 5 1 1 9 ...

 
@Community Nice going. Delete my open challenge.
 
Probably because it's at -5, hasn't been touched in 2 weeks, and doesn't have any answers
But it probably didn't need to be deleted
 
the help center link explains the situation...
it's indeed a dead question
 
0
A: Sandbox for Proposed Challenges

flawrnot-sort code-golf permutation sort Given a list of at least three distinct positive integers, output a permutation of that list that isn't sorted in ascending- nor in decending order. Examples 1,2,3 -> 2,1,3 or 3,1,2 1,2,3,3 -> 2,1,3,3 or 3,1,2,3 or 1,3,2,3 etc.. Related: The Strange Unsor...

 
3:44 PM
Programming pet peeve #54: Going through my old code and finding 17 different places where I wrote var l = this.length; and then proceeded to use l exactly once, on the next line ಠ_ಠ
 
@ETHproductions in a for loop?
 
No, it's literally just function(x){var l=this.length;x=pm(fb(x,0),l);return this[x]}
 
._.
 
ikr...
 
wait are you golfing non code golf code? :|
 
3:48 PM
I did that with the Japt interpreter because I had like 150 lines just like that, but most were longer
This was at the same time that I included the absolutely unnecessary l as discussed above -_-
 
@Downgoat he's memory golfing variables he only used once :P
 
@Downgoat I'm not golfing it, I'm removing extra code. oh wait
 
@ETHproductions *unnecessary
@ETHproductions golfing is removing code that makes code readable
 
I'm actually un-golfing these very 150 lines right now to make them more readable
 
@ETHproductions Wait... if most of them were the same, couldn't you "automate" that section?
or are the 150 lines not all really similar
 
3:51 PM
	t: function(x,y){y=fb(y,this.length);return this.slice(x,x+y)},
	u: function(){for(var i of [].slice.call(arguments))this.unshift(i);return this},
	v: function(){return this.shift()},
	w: function(){return this.reverse()},
	x: function(x,y){x=functify(fb(x,function(z){return z}),y);return this.reduce(function(a,b,i,z){b=x(b,fb(y,i),z);return a+(isNaN(+b)?parseFloat(b)||0:+b)},0)},
	y: function(){var t="string"==typeof this[0],n=t?this.map(function(t){return t.split("")}):this,x,y,z=n.reduce(function(p,q){return Math.max(p,q.length)},0),a=[];for(y=0;y<z;y++)a[y]=t?Array(n.length).fill(" "):
^ excerpt (before ungolfing)
 
I think he's talking about 150 lines which declare all he functions
 
I could run it through a prettifier, but I have several other changes I have to make on a function-by-function basis
 
Wait why no arrow function but using for..of loop?
 
^^
 
I know, that's one of the things I'm changing
And at some point here I'm going to experiment with webpack so I can use ES6 features in "production" code
 
3:53 PM
> {var i=0;return r.join("")}
3
:P
 
You're trying to get command line args working right? at some point
 
@Downgoat wait what the hell
@youngerETHproductions: ಠ_______________ಠ
 
@ETHproductions why haven't you fixed them then?
 
@LeakyNun I'm working on it, these are the ones I haven't gotten to yet
 
@ETHproductions alright
 
3:54 PM
@Downgoat what is so star-worthy about this? ELI5?
 
@flawr It's dumb code
 
@flawr the fact that i=0 is declared but never used
(it's a function)
a more complete excerpt would be function(r){var i=0;return r.join("")}
you can find it in another excerpt posted by @ETHproductions just a few messages above
have I explained like you're five?
 
yep thanks :)
 
TBH five year old wouldn't have attention span to read al message
 
> function(z){return z}
what is that
 
3:56 PM
Next question: is there a better alternative for that one?
the identity function
 
@StepHen Golfed in Haskell, 2 bytes: id
 
:| was just about to ask same thing :P
 
I had a few function(z){return!!z}s that I changed to Boolean
 
You could use Object.valueOf maybe? That's longer than arrow function though
 
@ETHproductions why no lambda?
 
3:58 PM
@LeakyNun Because not everyone has ES6 features yet, though I'm guessing 99% of the coding population does...
 
z: function(n){return this.split("\n").z(n).join("\n")}
is this recursion?
 
@ETHproductions cough babel cough
 
@ETHproductions Don't write for IE :P
 
@LeakyNun No, it's a string function that's splitting itself at newlines, calling the array equivalent, and then rejoining with newlines
Wait, where'd you find that? Are you looking through the Japt code?
 
@ETHproductions yes
@ETHproductions oh, right
 
3:59 PM
Find all the problems with old code
What's that quote
 
@LeakyNun I did that quite a lot because it's much easier than rewriting the same function for strings
 
@ETHproductions but then how do you explain the excerpt on the starboard?
what was the intended use of i?
 
> Any code of your own that you haven't looked at for six or more months might as well have been written by someone else. - Eagleson's Law
 
@LeakyNun I have no freakin' clue
 
@LeakyNun He probably removed the need for i but forgot to refactor i out
 
4:01 PM
@StepHen yes I know which is why I asked
@StepHen which shows how quickly we change...
 
@LeakyNun How far back does the Git commit log go? :P
 
@StepHen I probably haven't touched that function since I wrote it... I'll check though
 
I could probably find some really really crappy VB code I wrote when I first started
 
Yeah, the previous change to that line removes the stupid function
 
lol
 
4:05 PM
how did you maintain code like that 0.o
 
Idea: type sensitive japt, would help make more readable code while being short. Eg "foo"a do different than [1 2 3]a
@StepHen you don't :P
Though with teascript I just fiddled with things until they worked
 
@Downgoat Um, it already does
I mean, look at c for the various types
> Number.c(n=1): Returns this rounded up to the nearest multiple of n.
> String.c(n=0): Returns the char-code at index n in this.
> String.c(f): Like .m(f), but performs on char-codes; "Abc"cX{X+1} -> "Bcd".
> Array.c(): Flattens this, i.e. expands all sub-arrays into the main array.
> Array.c(a): Appends a to this.
> Date.c(): Returns this.getMinutes().
> Function.c(): Returns the first integer in 0, -1, 1, -2, 2, -3, etc. that returns a truthy value when run through this.
7 different uses for one letter
@StepHen As Downgoat said, you don't :P That's why I'm ungolfing it right now
 
hi all
if anyone feels like adding an answer... codegolf.meta.stackexchange.com/questions/13231/…
 
4:21 PM
like why on earth does "i" alone require capitalization
you don't do that for other pronouns
you don't do that for other one-letter words
you don't do it for other cases of this pronoun
 
@LeakyNun there aren't any other one letter pronouns are there?
 
@Lembik no there isn't
 
@ETHproductions :| oh
 
it just looks good :)
and I am important :)
 
@LeakyNun Probably because that's what they did in the KJV Bible, just like all of English's other idiosyncrasies
 
4:24 PM
> I (and only this form of the pronoun) is the only pronoun that is always capitalized in English.[i] This practice became established in the late 15th century, though lowercase i was sometimes found as late as the 17th century.[2]
two centuries before KJV
 
Question: Why does JSHint say "Don't create functions within a loop"? (cc @Downgoat)
 
@ETHproductions because you recreate them each time the loop runs?
 
Does it use a lot of memory?
 
@ETHproductions it seems kinda counter intuitive at least, like declaring a constant inside a loop
 
But I mean for (var i = 0; i < this.length; i++) this[i] = this[i].map(function(x) { ... }); isn't really counter-intuitive
 
4:27 PM
@ETHproductions Nope, you're right (if function(x) { ... } changes at all), JSHint probably just doesn't recognize what you're doing
 
I'll just keep using that then
 
@ETHproductions Is the contents of function(x) affected by i at all, or does it do the same thing each time?
 
So far (through the giant code cleanup I'm doing) I've only stuck with 8 things that JSHint doesn't like
 
If it does the same thing each time JSHint is right
 
@ETHproductions I don't see any point keeping it inside the loop
 
4:30 PM
@LeakyNun Unless it gets the value of i
 
@StepHen which it doesn't
 
	for (var index in arr)
		if (+index === arr.indexOf(arr[index]))
			perm(arr.slice(0, index).concat(arr.slice(+index + 1)), len - 1).map(function(b) {
				result.push([arr[index]].concat(b));
			});
 
oh, lol
 
It does rely on a variable changed by the loop
 
Yup JSHint is wrong, you'd have to pass it index too for it to be able to be refactored out (maybe you should though)
@ETHproductions why the heck are you doing a for... in loop
@ETHproductions for... in loops on arrays should never happen
if you just make that a for (index = 0; index < arr.length; index++) loop you can remove the if (I think)
 
4:34 PM
@StepHen The if is there to make sure that we only run the rest of the code once for each unique item in the array
Also, why are for...in loops so horrible?
 
@ETHproductions oh, gotcha, that makes sense
@ETHproductions order isn't guarenteed
 
you're not guaranteed to go 0,1,2,3,4... on an array in a for... in loop
 
For a second there I was confused :P But... that's terrible
 
@ETHproductions and then on objects you have to know what you're doing for sure because it can do some weird stuff
@ETHproductions for... in loops enumerate the properties of the object, in no particular order
 
4:37 PM
But don't all modern engines go through array indices in order, at least? I've never seen one that didn't
 
> Note: for...in should not be used to iterate over an Array where the index order is important.
 
The index order is not important in this case, as long as all indices get hit
 
@ETHproductions yup, I thought it was at first, sorry
 
This may be one of the rare cases where none of the idiotic parts of for...in affect anything
 
you could still fix it up though
 
4:39 PM
well...
Yeah, why not
 
something like for (index in arr.filter((val, i, self) => self.indexOf(val) === i))) and get rid of the if
 
@ETHproductions oh no 0/10 for in is evil it will enumerate all properties not explicitly declared un-interable
 
@Downgoat Idea: Could I just use babel to do ES6 -> browser JS, and skip webpack altogether?
 
@Downgoat but that's OK as long as he didn't give the arr random properties, right? This is an array not a object
 
@ETHproductions well you shouldn't but lambda are OK. I reccomend using ESHint instead of JSHint btw for new ES feature
 
4:42 PM
Cool, I'll switch when I switch to ES6/babel
 
@ETHproductions yeah that works fine, but webpack means you can also use react, sass, and node modules
 
@ETHproductions Just use jQuery
 
@StepHen well japt probably declare lot of properties on array prototype
 
@Downgoat right
 
@Downgoat I have never used react or sass, but perhaps modules would be nice
 
4:43 PM
JSX specifically is like best thing ever
 
@Downgoat I declare them as { enumerable: false, writable: true } just like built-in properties so that shouldn't be an issue
 
Oh ok
@ETHproductions do you know if there's a way to check if an object or a property of an object is mutated?
i was just thinking about how React does work and it seem to magically know when variable changed
 
Eyes on this? Sandbox
 
@Downgoat ...I have no idea
AFAIK that's not even possible
 
4
Q: Is it a weak prime?

Wheat WizardA prime is weak if the closest other prime is smaller than it. If there is a tie the prime is not weak. For example 73 is a weak prime because 71 is prime but 75 is composite. Task Write some computer code that when given a prime as input will determine if it is a weak prime. This is a stand...

 
4:46 PM
without keeping track of every property and its value
 
I mean you could use a setinterval + hashmap
 
this is not a JavaScript-esque solution
but only change them with setters :P
 
By setters, do you mean hooks that fire when you assign to a property? Javascript has that.
 
Yeah but you need a proxy to watch child value mutations
 
4:50 PM
Yes
 
I don't see how that prove your point
 
Why?
 
Well how do it? It doesn't mention anything about child property calling setter
 
I'm an idiot... if Number.a() calculates absolute value, why not have Number.a(n) calculate absolute difference? :P
Just like Number.n() is -this, and Number.n(n) is n-this
 
4:54 PM
It explicitly says that setting a setter for bar on foo calls that setter then foo.bar is set. When do you want it to be called?
 
:O idea: propose functional operators to TC39
@JanDvorak yes but if I do foo.bar.goat = Downgoat it won't call foo.bar seter
 
Then set the setter for goat on foo.bar in the bar setter on foo.
 
But there is no setter
the only way to do this is proxy
 
@JanDvorak But how can you if you don't know that foo.bar.goat is going to be set ahead of time?
 
eh?
 
4:58 PM
@JanDvorak foo.bar = {}; foo.bar.goat = "goat";
 
Actually, how can you detect any variable created at runtime using setters?
 
@ETHproductions like on an object or anywhere?
 
Well everything's on a object, whether it's window/global or anything else
 

« first day (2352 days earlier)      last day (2505 days later) »