Ugh.. this lang is going to be *terrible* for golfing. I'm still going to use it.
Preview: Factorial function
: factorial ( n -- n! ) 2 swap inc range { * } swap fold ;
I can't quite get the hang of formatting code in here...
So I was wondering about this earlier: given an alphabet of N characters. Are there more even-length strings or more odd-length strings over this alphabet? Possible argumentations:
a) as N goes to infinity the role of even and odd length strings becomes interchangeable so there's the same amount. b) for every even-length string of length X, there are N strings of length X+1, so only 1/(N+1) strings have even length. c) the same is true the other way round, but then you get one additional even-length string (the empty string), but that still converges to 1/(N+1) but for odd strings.
@Bálint yeah, but that takes forever to debug. It's similar to most command-line debuggers, but in Safari, you don't have to keep clicking step. You can see exactly where your code broke, what the call stack was, the local variables, and the passed data to a given function, inspect classes, etc.
@Bálint that's about as annoying as console.loging everything though. If I was developing a large app, like Cheddar, I have like 80 files all processing a single string, it's a pain in the ass navigating throughout all of that using the debugger, or placing debugger/console.logs everywhere
@Bálint every JS engine supports those, those aren't very helpful as traces in V8 usually just show the internal stack. Try throwing to resolve a circular dependency error