Write the shortest program to solve a Quartic equation.
A quartic equation is a polynomial equation of the form:
ax⁴ +bx³+cx²+dx+e=0
A solution for x is a number such that the above evaluates to 0.
Rules
The program must take in the 5 floating point coefficients of the equation ax^4+bx^3+...
What kind of equation is it? What operations does it involve? (is it just polynomials, are there logarithms, are there polynomials inside logarithms, etc.)
@hyper-neutrino schemers.org/Documents/Standards/R5RS/HTML/… there's the do construct that loops in a functional way (no mutation, instead you specify the variables, their initial values, next values, and stopping condition and return value)
@RedwolfPrograms Mostly hardware-related, since I just used the AP app. The keyboard's too small, doesn't have Home, End, Delete, or CapsLock keys, and the screen was really, really tiny
I think they make bigger chromebooks, but the 11.6" ones are most common since they're more portable and lightweight (half the reason you use a chromebook)
there's something really aesthetically pleasing about having two side-by-side 80-column terminals, filled with text, in a compact font*, with zero wasted space
It's got the pg up/pg down/delete/insert/home/end, but they're super annyoing since they tried to fit them in on the right so you hit page down instead of enter half the time
@WheatWizard yep, the unfortunate nature of FGITW and how the HNQ algorithm works around our site :( I'll add this to the subsection of the blog post... speaking of that......
@user definitely depends on the language, some languages only for relatively minor irritants (scheme for example is extensible enough that this can be taken care of within the language) >:P
The fact that Lisps are so extensible is amazing, but it also means that you kinda have to learn a whole new language each time you bring in new macros and stuff
Even if it's intuitive, it makes compiling and IDE suggestions slower (and yes, imo, those are very important for a language used for real-world stuff)
The optimal solution IMO is to have macros be a separate language layer with significant limitations, and ideally not even Turing-complete. Like C's but a little more advanced and less 1970s.
@pxeger I think macros should be Turing complete, but yeah, they shouldn't be allowed to make huge changes (or at least, that should be heavily discouraged)
@pxeger I tried, and even installed a language server for Scala, but it was too hard :(
@RedwolfPrograms You joke, but it really is because of IntelliJ's awesome support for Java that I'm spoiled. It was really disappointing when it turned out IntelliJ doesn't get YAML and Scala that well :(
@user IntelliJ is really good for Python too, but since I learnt vim I've been just as productive even without any autocomplete, and I don't have to deal with a 2GB-RAM bug-fest
One thing that'd be cool but maybe not a good idea is if my NP/SP bots could detect when active conversation is going on and delay posting less important stuff