Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sqrt(Time)

Pages: 1 [2] 3
16
Math and Science / Re: Calculus help?
« on: September 21, 2011, 08:56:19 pm »
I'm not sure this is the most elegant way of solving it, but it sure should work...

Call the place where it touches the first curve (a,a^2). You find the derivative at the point a, and so you can find the slope and y-intercept of the line - as a function of a. You should have something like
m=f(a)
intercept=g(a)

Now call the place where it touches the second curve (b,-b^2 + 6b -5). You can also find the derivative there, and find the slope and intercept as a function of b, too - something like m=h(b) and intercept=i(b).

So now you have
f(a)=h(b)
g(a)=i(b)

Solve these two equations for a and b, then plug either of one of those into your functions to get the slope and intercept of the lines.
Spoiler For Spoiler:
f(a) and h(b) should be linear, and g(a) and i(b) should be quadratic.

17
TI Z80 / Re: Water Surface Simulation
« on: September 21, 2011, 06:51:40 pm »
The amount fluctuates because it's just a very rough approximation - this is based off the "wave equation", a simplification which ignores under-the-surface swirling, and only really holds true if the waves stay nearly linear (i.e. the slope at any point doesn't get much bigger than, say, a half). Also, the way he applies the suction/friction with the cubes allows them to sort of "draw water up" around them without necessarily depleting the water elsewhere. (This would be currents under the surface, which as I said, are ignored by the wave equation.)

18
Web Programming and Design / Re: Making a webcomic: "dynamic hyperlinks"
« on: September 21, 2011, 06:44:49 pm »
Zymic is a little-heard-of, but very nice one in my experience... they also give you MySQL databases, and limited .htacess allowance,

19
TI Z80 / Re: Water Simulation w/ Track Drawing
« on: September 21, 2011, 12:13:45 am »
I came here expecting a full Navier-Stokes simulation (wow!) - but this is nice! Relaxing.
Imagine a (softly colored) JavaScript implementation, that you had as the background of a website... that would be really nice... ^_^

20
Other Calculators / Re: I need help..
« on: September 20, 2011, 11:04:28 pm »
Your question was a little vague, but I think what you want is something like:
-Make a variable for storing the number of slides so far - start it with 0.
-When users does a slide, add one to that variable.
-After the slide has been completed, check if they've won; assuming they have, thentell them and the game.
-Else, check if the number of slides so far = the limit; assuming they have, then tell them they've lost. Else, wait for the next move.

21
Miscellaneous / Re: Why Johnny Can't Code
« on: September 19, 2011, 08:58:35 pm »
...I don't like BASIC.
~ducks tomatoes/rocks surely being hurled~
I just mean, in order to introduce people to programming, you don't HAVE to use it. Show them console programs, echoing, then adding, then doing Fibonacci numbers, then blackjack... it's really not any more "fancy" than Basic if you're doing it right. (Just don't do Visual Whatever - those are the worst!)

Then, you can tell them more about how each thing is working lower down - maybe just gloss over compilation with something like, "What you type gets converted from English to numbers that the computer can understand" - since, for one function programs, that's pretty much all that's involved (what's a optimizing compiler?)...
You can delve as deep as you need to, but it's important to give people something they can work with at the same time. BASIC's syntax has also become a little arcane. Start them with C/C++/Java/Python, I say.

It's not a problem with any one language, it's just a sad shift in the teaching style.

For the record, I started with Visual Basic at ~7, made a program to calculate Pi using the Leibniz formula, tried Java, couldn't get the compiler to work, dropped programming for a couple years, made a Cellular Automata program in Javascript (you give it the rule number and range, it draws it), learned Java with more vim because I wanted speed, decided to go back to my Java book to learn it well, realized I already knew it all, did a ton of USACO problems to get good, realized that I hated Visual Basic now, learned C++ (or at least the parts I wanted to i.e. manual memory management) learned Haskell (or the parts I wanted to i.e. craps of recursion/currying, now I'm learning ASM and designing a CPU with my friend for Minecraft.

So that's my bias, just FYI.


You may now proceed to to hit me. Hard.

22
Well... in 4D you can solve any knot...
Hmm... MIEGAKURE FOR THE 84 ANYONE??

23
Other / Re: smartphones to replace consoles soon!
« on: September 18, 2011, 09:18:27 pm »
It seems Ralphdspam forgot a very important contingent of game console lovers - the TI contingent. ;-)

24
TI Z80 / Re: Bouncedown
« on: September 18, 2011, 08:55:15 pm »
Nice! I loved that game.
Is this Axe or assembly?

25
TI Z80 / Re: Prime Tester benchmarks
« on: September 18, 2011, 03:03:50 pm »
Well, there are several arbitrary precision systems; and I don't really know anything about AKS beyond that it's polynomial time in the number of digits, but looking at the Wikipedia article it looks all you need to implement are arbitrary size addition, subtraction, and multiplication?

26
Math and Science / Re: A Math... Question :)
« on: September 18, 2011, 02:56:48 pm »
Sent it in a PM.

27
Math and Science / Re: A Math... Question :)
« on: September 18, 2011, 02:33:51 pm »
Well, I got a slight improvement... don't know if it really counts as different from the factorial solution, though. It has 51 digits, and goes 525...[45 digits]...632. (just to not spoil it for everyone else, while letting others check if they got the same solution)

edit for typo in a digit

28
TI Z80 / Re: Prime Tester benchmarks
« on: September 18, 2011, 02:17:44 pm »
Considering he said it uses "A and Ans", it definitely sounds like BASIC. Which makes this whole thing rather awkward considering you could probably get an order of magnitude faster or something by using ASM. Not to mention, you could get some pretty fancy-schmancy arbitrary size factoring... (AKS anyone?)  <_<

29
ASM / Re: The worst TI code I've ever seen
« on: September 18, 2011, 02:01:11 pm »
TI originally designed a whole system for app signing, where you could either sign it with a free key and distribute it freely... or you could sell your app, but in order to do that you would need to buy an a key to sign it with from TI. Frankly, I don't think TI ever sold ever more than 2 of those keys tops...
As you may have deduced, everyone here uses the free key. (And yes, you CAN get everything good for free. ^_^)

30
TI Z80 / Re: Jazz: JavaScript TI-83 Plus emulator
« on: September 17, 2011, 08:37:25 pm »
Looking at your Javascript, you're using eval() a lot, and that will slow things down a lot. Better to have an associative array connecting the name of each function to the actual function (one of the cool features of JS!), and then find the function from that array and call it. Something like
Code: [Select]
o={"adc_aa":adc_aa,"adc_ab":adc_ab,"adc_ac":adc_ac};
/* ...stuff... */
o[$('select').val()]();
Naturally, you can (and should!) eliminate the other evals too.
The Jquery can be sluggish, so it'll be good to do something along the lines of
Code: [Select]
selectBox=$('select');
/* replace everything else with the variable selectBox instead.. */

I'm not saying that a browser wouldn't be able to run this comfortably already, but with each layer of interpretation and emulation things get slower, and *especially* eval() will slow things down by a factor of 20 (maybe 100? maybe less..) easily.

Pages: 1 [2] 3