... okay, I was about to say, "why are you doing this??" Instead, I warn you: you're modifying internal code, so you really want to be sure about what you're doing.
if I were you, I wouldn't modify the global generator prototype, but rather modify it on a per-need basis, e.g., let pytekGenInst = ...; pytekGenInst.prototype.next = Pytek.generatorNext
like "adding characters to a program, that are in the same character set as the program is, won't cause the program to be reinterpreted as belonging to a different character set, thus retroactively changing what those characters were"
I mean, it's fairly obvious that that assumption is incorrect, but without an esolang that pulls this sort of shenanigans as naturally as humans breathe, it's likely nobody would have noticed it was there
@ConorO'Brien I would rather V8 verify that in C. I do have to check things myself occasionally since Pytek is structurally typed but this isn't really one of those situations
sure it would. the prototype is attached to the object. If the object is global, so is the prototype, and the modification to the prototype persists outside of scope
Well, caveat emptor then. It would only be an issue if they included a script first that modified the prototype, then included a script after the Pytek script and expected those modifications
In any other situations they would just end up with mysteriously more efficient and powerful generators
right. there's that. I don't know the extent of the modifications you are making towards the generator prototype, but if it doesn't maintain default JS behaviour (or at least simulate), then scripts / code after and outside of Pytek may not work
e.g., gen.next() should return an object, { value: <thingy>, done: boolean }
I decided a few weeks ago that I didn't care about my raw rep total any more, just Epic/Legendary progress (i.e. the number of days on which I receive 200 points from upvotes)
well the only actual use of reputation once you're over 2k is to offer bounties
(be prepared for a bunch of control characters that don't copy-paste properly to be dumped as part of your output)
-Mutf8 = "literals in the program are encoded in UTF-8" (actually everything else too, but literals are what we care about); -C7 = "stdin/stdout/stderr are encoded in UTF-8"
that'll fix both points in your program where an encoding conversion is needed
I guess 150 for downvotes is where I'd draw the line, being able to discourage people from submitting uninteresting questions is kind-of needed to keep the site usable
@quartata okay, well if you really have to absolutely have to modify the prototype (which I'm 94% you don't need to do), please use Object.defineProperty with hidden enumerability
I had to change my apple password a bunch of times because it didn't tell me I couldn't have spaces but I could accidentally press space when entering my password
or because it didn't tell me the space was ignored when entering it actually
@Pavel OK, I signed up and now I have a Viewer plan. I can look at things and browse documentation, but actually doing something appears to require a trial (barely 15 days) or a subscription ("only" $155 per year). That's not free by any definition of the word.
having two identical answers by different people that were discovered independently is allowed, although the second one is unlikely to be upvoted, and people may well end up downvoting it
if they're in different languages, they aren't identical
when this happens to me, I often write a line like "this turned out the same way as USERNAME's answer"
to make it clear that it's independent but to show the connection
@xnor It uses Newton's method, which appears to diverge for that input. Eventually gives a NaN error since the Pi/factorial no longer fits into a double.
If there exists anywhere an import statement, parse what it's importing for other import statements (without evaluating the module itself) and this way generate the maximal dependency tree even with delayed imports?
I just wanted to get a quick opinion of a challenge idea. To promote my language, would a cops and robbers challenge where cops post golfed code in JavaScript and link whatever code-golf challenge it's for, and robbers attempt to crack the golfed code by submitting a smaller answer in Bean, be something worth trying?
It converges to an incorrect value when I try it in Mathematica `FixedPoint[# - (#! - 1.5)/(((1.001 #)! - #!)/(0.001 #)) &, Log[1.5] // N]`, the output is `65807.7`
hm. it's a meta challenge encouraging golfing (yay) but has two problems: (1) it's too specific (2) and there is a problem when you get to answers that are already optimal
(I am not kidding) I just opened Edge on the new installation to download chrome, and every Google website is blocked with an SSL error "weak signature".