Tuesday, 29 September 2015

nerdamer To Do Sept 29 2015

I am halting development of nerdamer for a while. But if I ever resume, here is a to do list:

Short term:
  • Fix Fourier transform's reliance on text replace for substitution
  • Add more tests
  • Add RESTFUL API
  • Update website

Long term:
  • Add ODEs
  • Add ODE solver
  • Add graphing API
  • Finish integration
  • Finish Forward Fourier transform
  • Start Inverse Fourier transform
  • Add arbitrary precision

Sunday, 27 September 2015

Flaws of bower

bower is very inferior to npm as of Sept 2015. bower has no system of depreciation, maintainers, and caching.

  1. npm has a depreciation system called npm deprecate .With it you could depreciate old versions of a package. You also could give warnings about bugs and patches. In bower, it doesn't exist so users could install broken packages. This would cause a lot of broken code caused by the bower dependencies.
  2. bower relies on a single repository with a single maintainer. Most of the time it authenticates with GitHub. You have to use bower login to do  read/write operations. This is a single point of failure as it relies on a single repository and a single account. This leads to another problem.
  3. To switch permissions and ownership to another maintainer you will have to ask the bower core team. Why isn't this automated?
  4. bower only caches the most recent version. If you want to retrieve older versions, it uses tags and retrieves the correct version from releases(GitHub again). This means you could change old versions of package without the users knowing. For example, User A install beep 0.7.0 (old version). User A check package and thinks it a good package. User A build the API on top of beep 0.7.0 . Maintainer changes beep 0.7.0's API to something else. When User A deploys beep 0.7.0, all the deployed systems breaks down with incompatible API.
In conclusion, just use browserify.

Monday, 21 September 2015

LyX and minted

Guide for using minted on lyx. minted is TeX package that provides syntax highlighting. It is useful for displaying code.



Tools -> Preferences



File Handling -> Converters
Select Latex -> PDF
Add "-shell-escape" to converted
Click Modify
Hit Save



Document -> Settings



Select LaTeX Preamble
Add "\usepackage{minted}"
Hit Ok



Insert -> TeX code



Add the code and done!

Friday, 18 September 2015

nerdamer Single variable Talyor Series Sept 18 2015

Single variable Taylor series expansion is a straight forward method.
f(a)+\frac {f'(a)}{1!} (x-a)+ \frac{f''(a)}{2!} (x-a)^2+\frac{f'''(a)}{3!}(x-a)^3+ \cdots.
The code:



Starting at 1. It takes a function f and takes the derivative and evaluates it at point a. Then it divides it by a factorial. Then it moves on to the next term and so on...


The applications:

Approximating solution of hard integrals:




Solving ODEs

Tuesday, 8 September 2015

nerdamer Fourier Transform cosine and sine Sept 8 2015

I managed to get cosine and sine function to work by converting it to exponential form and evaluating it.

So far the tests:



The new tests contain cosine and sine functions with frequency shifts.
The forward Fourier Transform is about 40% done.
It still needs:
  • Differential equations(important)
  • Convolution
  • Integral equations
  • Amplitude modulation
  • Special functions(e.g. cos(at^2))
  • Frequency differentiation
  • Frequency integration

It might be the last update for a while since I have other work to do.

Saturday, 5 September 2015

Circuitsolver specification

Circuitsolver is the core library of Circuit Simulator. It was created to solve circuit problems.

Specification for inputs in the DC solver. DC solver accepts an array of arrays.

Example of DC solver input:



Types of elements:

 

Wire:


Other types:


Keep in mind the solver reads from the end to the front. The front of the array could have other values and arrays.




Tuesday, 1 September 2015

Travis CI auto push gh-pages with grunt

Get the token

Go here https://github.com/settings/tokens and get the personal token. Check public_repo for public repositories.

Encrypt it with travis encrypt



Place it in secure in .travis.yml




Create package.json


Be sure to have grunt,grunt-gh-pages,and grunt-contrib-copy as dev dependencies.


Create Gruntfile.js


You need to copy correct files to the correct directory which is 'dist' with
grunt-contrib-copy.




Enjoy.