Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Very satisfying kata. Will definitely check out your other katas.
Not sure you are still an active user here, but here we go .. your solution now works, after the random tests have been updated.
Amazing kata, thank you. I've learned a lot while trying to solve it :)
OK ==> so this time I'll unpublish it ;) ["for real"]
Thanks for the contribution/advice/beta-testing ! ;)
I still think the idea can work, but maybe not with this kata.
@JohanWiltink
OK I guess I'll just have to unpublish it, then
(note: I thought the fact of "handling geometric sequences too" would be "fairly easy, using a simple trick", but the "no letter constraint" would kinda "force the user to use that trick" [or probably make "very difficult" to bypass it], while "allowing letters" would probably also "allow other kinds of [dumb] solutions" ==> so the constraint could be a bit "relevant"... but I guess it's still not "good" :/ so...)
@JohanWiltink
You're still focussing on solving a problem, as well as obfuscating the solution.
OK I do understand that point of view (which does make sense); but the idea could also be "how can I solve such a problem, without using any built-in function [nor keyword]"; in my suggestion, I explicitly mention the
logarithm
: some people might (maybe?) think "how am I supposed to implement that? [or bypass it]" (although for some [most?] people, it will probably be trivial)The idea is: there are -certainly- many ways to build an Extrapolation Algorithm, and I'm pretty sure Haskell certainly gives nice build-ins to do that easily [or probably even libraries], but here the "no letter restriction" forces the user to build it from scratch, and to better understand the mathematical properties of the extrapolations (and Binomial Transform) than just "using all power (functions/keywords/libraries...) the language provides" [NOTE: I'm here talking about the hypothetical version with "detection and handling of Geometric sequences of all kinds, besides polynomial ones"]
In my opinion, no.
As mentioned below: do one thing, and do it well.
Focus on obfuscating source code. Make sure there is interesting code to obfuscate.
( Other opinions are undoubtedly available. )
You're still focussing on solving a problem, as well as obfuscating the solution.
Do one thing, and do it well.
I still think the kata should give the solution code for free and focus on the obfuscation part. That way, you can also make sure to include code that is interesting to obfuscate.
Voile is reverting to form, thinking nothing has merit. Feel free to ignore him; he's just unable to be constructive about anything. ( No, Voile, I have no respect for you. You did nothing to earn it. You just want to get your way - by whining until people give in, while downvoting and downranking. )
@Voile Yesterday, just when going to bed, I had an idea [about how to make this Kata a a bit more "complex/relevant"], I don't know what you'll think of it:
==> What if instead of only handling "Polynomial extrapolation", I required the algorithm to handle Geometric sequences "of all kinds*" too? (* By that, I mean bascally sequences given by a function "whose logarithm is a polynomial") ==> AND I would require the algorithm to be "smart", i.e. "detect if the sequence is polynomial or geometric" (the given sequences will always be either "polynomial" or "geometric (in a generalized way)", with enough terms such that the algorithm can "identify the pattern" (e.g. if it's a polynomial of degree 3, the sequence will have at least 5 (or 6?) terms, so that the pattern is "not too ambiguous") In other words, the algorithm should be able to treat differently sequences like [1,2,4,8,16,32,...] than sequences like [1,2,3,4,5,6,...])
==> would it be "better"? 🙂
About the issue raised by @Voile (this Kata being way too similar to the previous one [sorry]) I had an idea [to make it more "complex"]:
==> What if instead of only handling "Polynomial extrapolation", I required the algorithm to handle Geometric sequences "of all kinds*" too? (* By that, I mean bascally sequences given by a function "whose
logarithm
is a polynomial") ==> AND I would require the algorithm to be "smart", i.e. "detect if the sequence is polynomial or geometric" (the given sequences will always be either "polynomial" or "geometric (in a generalized way)", with enough terms such that the algorithm can "identify the pattern" (e.g. if it's a polynomial of degree 3, the sequence will have at least 5 (or 6?) terms, so that the pattern is "not too ambiguous")In other words, the algorithm should be able to treat differently sequences like [1,2,4,8,16,32,...] than sequences like [1,2,3,4,5,6,...])
==> would it be "better"? 🙂
Good question. It's probably possible, so don't use the line with
tail
and explicitly allow the"module"
line. Also, check the whole line instead of just the start. No, my code is not subtle, and I just overlooked the possibility.Thanks again (also for teaching me
Data.Char.isLetter
, as I said, my current Haskell level is pathetic)So your code does just "Skip the first line"?..
Isn't there a way to "cheat" by "putting letters on the first line" (and using semicolons or stuff like that to put a lot of code in only one line?..)
(I guess your algorithm is probably "more subtle than that", but I'm still asking "just in case"^^)
Some options here.
Ah OK natuurlijk :p
Loading more items...