joebo / microj

MIT License
14 stars 1 forks source link

Added initial functions for p: and q: verbs #9

Closed jonghough closed 9 years ago

jonghough commented 9 years ago

Added functions to handle:

factorization

prime testing - naive algorithm only

prime counting - i.e primes less than y

Not sure how to convert my list of factors into a A type, but hopefully it works correctly.

adrian17 commented 9 years ago

Instead of build.sh, I'd add a simple Makefile that I'm currently using:

MCSFLAGS=-debug -define:CSSCRIPT -r:bin/CSScriptLibrary
MONOFLAGS=--debug

EXECUTABLE=microj.exe

all:
    mcs $(MCSFLAGS) microj.cs -out:$(EXECUTABLE)

test:
    mono $(MONOFLAGS) $(EXECUTABLE) tests.ijs -t

run:
    mono $(MONOFLAGS) $(EXECUTABLE)
adrian17 commented 9 years ago

Commit history looks really messed up. Rebase? Not sure if that's fixable at this point.

joebo commented 9 years ago

jon, thanks for the PR - but this has many changes that appear to be made by visual studio... basically it moved all the brackets to lines and other things. There should be a setting to disable it. Please get latest and submit a new PR with just the changes -- not with all the restyled code.

I can also look to merge just the new functions into the code manually. Let me know if that what I should do

jonghough commented 9 years ago

Sorry. Hang on. I will pull the latest and just add my p: q: functions and make a new pull request.

adrian17 commented 9 years ago

(updated makefile for CSScript support, try it)