Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> arithmetic or geometric

See, that doesn't delight me. OEIS is what's needed here.



Well… that was supposedly considered at some point:

https://youtube.com/watch?v=BJIfPFpaMRI&t=1891 (~1m)


Heh, even Larry Wall says "no, that way lies madness"

(now I want to see it in an esolang precisely because he said that)


This is much like my wanting to eventually resurrect my MicroVAX 2100 ... so I can install Eunice on it ... so I can get perl's Configure script to take the other branch of the test that reports "Congratulations, you aren't running Eunice" for real and take a photograph of it.


Welp now I know what "using it in anger" is gonna look like


Do you want it to take the first match? Inputting a unique prefix doesn't sound practical.


That would lead to weird behavior since the OEIS is sorted by number of references, which I think prefers "interesting" solutions over straightforward ones. For (1, 2, 3), the positive integers are only ranked 5th -- the top hit are the Fibonacci numbers. It's funny to think about.


I thought about that. I thought the compiler could error with "Insufficient data for meaningful answer" until you'd added enough digits that the sequence was unambiguous.

Then I tried it in OEIS and as you say there are too many sequences that start [1,2,3,4,5,...] - I think we may be stuck with generators and yield. But they're not exactly delightful.


Convert https://trout.me.uk/data.jpg to sixels and have the compiler emit that?


> sixels

Thanks! My build scripts just got that little bit more entertaining (for me. not for the other devs).


> "Insufficient data for meaningful answer"

Nice reference, by the way.


oh fuck, i missed that


you could special-case arithmetic sequences


Maybe there's some way to extend the compiler to use OEIS. Is there a "liboeis" that lets you download and interact with the OEIS database offline?


There's must be one or two for either Python or Perl. Well: https://github.com/sidneycadot/oeis




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: