Commit Graph

140 Commits

Author SHA1 Message Date
Ozzie Gooen
8fd5c6a1be Merge branch 'develop' into Documentation-auto-generation
* develop: (22 commits)
  components-lint respects components prettierignore
  format main.css and prettierignore base.css
  scoped tailwind preflight, top-level .squiggle wrapper
  grammar: identifiers with modules
  Refactored reducerInterface files
  Added simple scientific units
  Added stdev to table of stats, when needed
  Added stdev and variance to Distribution Operation Constructors
  Quick addition of stdev-variance-min-max-mode
  ⬆️ Bump @types/node from 17.0.38 to 17.0.40
  ⬆️ Bump webpack from 5.72.1 to 5.73.0
  ⬆️ Bump @storybook/react from 6.5.6 to 6.5.7
  ⬆️ Bump ts-node from 10.8.0 to 10.8.1
  ⬆️ Bump @storybook/builder-webpack5 from 6.5.6 to 6.5.7
  ⬆️ Bump peggy from 2.0.0 to 2.0.1
  ⬆️ Bump @storybook/addon-essentials from 6.5.6 to 6.5.7
  ⬆️ Bump @storybook/preset-create-react-app from 4.1.1 to 4.1.2
  ⬆️ Bump @hookform/resolvers from 2.8.10 to 2.9.0
  ⬆️ Bump typescript from 4.7.2 to 4.7.3
  ⬆️ Bump @storybook/manager-webpack5 from 6.5.6 to 6.5.7
  ...
2022-06-09 16:50:46 -07:00
Umur Ozkul
b41e32805c grammar: identifiers with modules 2022-06-08 17:00:17 +02:00
Ozzie Gooen
a15c0fa888 Added simple scientific units 2022-06-06 13:55:51 -07:00
Ozzie Gooen
441ac3c251 Changed the name of select functions 2022-06-05 21:47:29 -07:00
Umur Ozkul
6b25e82f58 typeExpression
type statements

type paranthesis

type paranthesis

comments

TODO

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

all types are expressions

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

all types are expressions

modifiers

typeExpression

type statements

type paranthesis

type paranthesis

comments

TODO

peggy construct functions

apply

all types are expressions

modifiers

0 arg constructors and $ (low priority type modifier)

remove GeneratedParser.js

peggy test helpers

test type parsing

type of test defined

act of binding refactored

recognize all binding functions | "$_setBindings_$" | "$_setTypeOfBindings_$" | "$_setTypeAliasBindings_$"

doBindStatement

bindings default statemetn

doBindExpression

clone type references and type aliases

doSetBindingsInNamespace

member_of, min, max

typeOr

type function

type with expression
2022-06-02 14:20:55 +02:00
Umur Ozkul
ac3fa859c0 Replace $$_block__$$ with {}
More redable language tests
2022-05-29 17:55:01 +02:00
Ozzie Gooen
178ec6f89d
Merge pull request #600 from quantified-uncertainty/issue597
fixed #597
2022-05-28 11:10:27 -04:00
Umur Ozkul
217a783d0a format 2022-05-28 16:02:16 +02:00
Umur Ozkul
ce5f12360a fixed #597 2022-05-28 15:52:35 +02:00
Ozzie Gooen
0da95bd21e Cleanup of SampleSet map 2022-05-27 09:40:49 -04:00
Ozzie Gooen
d3a2f391a7 Added map3 to samplesMap 2022-05-27 09:24:06 -04:00
Ozzie Gooen
1e4aecd4fc
Delete Reducer_Peggy_GeneratedParser.js
I'm pretty sure this should be in the gitignore.
2022-05-24 14:23:26 -04:00
Umur Ozkul
a386eee570 remove unit evaluation test
We provide no implementation
2022-05-23 18:18:30 +02:00
Umur Ozkul
08c73ac22f Merge branch 'Umur-reducer-dev' into reducer-dev
packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.js
packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy
2022-05-23 18:07:50 +02:00
Umur Ozkul
0124181bce Merge branch 'generic-units' into Umur-reducer-dev
packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.js
2022-05-23 18:02:21 +02:00
Umur Ozkul
107bce506f generic unit support 2022-05-23 17:51:38 +02:00
Quinn Dougherty
d32b6bb615 rm generated output
Value: [1e-10 to 1e-4]
2022-05-23 07:10:38 -04:00
Quinn Dougherty
ebcd228232 .gitignore, package.json, .prettierignore: #576
Value: [1e-7 to 1e-3]
2022-05-23 07:05:42 -04:00
Umur Ozkul
4628140069 numbers with units (tested) 2022-05-23 08:13:51 +02:00
Ozzie Gooen
f816f3c200 Ran prettier format 2022-05-22 13:02:54 -04:00
Ozzie Gooen
4b99e0135e Minor cleanup 2022-05-22 13:02:20 -04:00
Umur Ozkul
949b57c426 Error reporting if function arguments are defined
map(arr, toSample) now correctly reports

toSample not found

instead of

macro(Array,Symbol) not defined
2022-05-21 19:18:39 +02:00
Umur Ozkul
2265254531 Filter arguments passed to mathjs calls by type so that error messages are not too weird 2022-05-21 18:05:55 +02:00
Umur Ozkul
feb0284a89 format 2022-05-20 18:20:00 +02:00
Umur Ozkul
a17ea3f5a1 simplify error messages 2022-05-20 18:07:10 +02:00
Umur Ozkul
a314cd46fb . became a post operator that can operate on any expression
Because of
    $x.y[0][0].w + $x.z + $u.v
2022-05-20 17:46:02 +02:00
Umur Ozkul
2a176fac26 $indentified defined. Assignment not allowed 2022-05-20 17:24:06 +02:00
Umur Ozkul
1557c197a0 renamed internal variables starting with $ so that they are not overriden by $ variables in Squigle 2022-05-20 17:11:32 +02:00
Umur Ozkul
870b0c9d4e hidden macros 2022-05-20 17:05:53 +02:00
Umur Ozkul
b165ccac9f floats in scientific notation and optional leading zero 2022-05-20 15:18:27 +02:00
Umur Ozkul
c1f269e9a4 fixed logical operator priority 2022-05-20 00:29:04 +02:00
Umur Ozkul
a51e4be528 format 2022-05-19 20:25:18 +02:00
Umur Ozkul
986e7c744b pegjs->peggy 2022-05-19 19:10:14 +02:00
Umur Ozkul
749fba2877 pr fixes 2022-05-19 19:08:40 +02:00
Umur Ozkul
c496ae5cdd multi-line tests 2022-05-19 18:19:09 +02:00
Umur Ozkul
f547db9d0a multi line problem due to block and lambda ambiguity 2022-05-19 16:35:12 +02:00
Umur Ozkul
7b5fd2b101 Merge branch 'develop' into reducer-dev 2022-05-19 01:28:37 +02:00
Umur Ozkul
db050668d1 parser
toFunction

additive multiplicative

compact

whitespace

pow

relational equality

boolean

whitespace separator

left associative operators

expression

not

identifier

function call

array constructor

string

indexed values

ident

priority

block

outerBlock

optional final expression

statement separator

outerBlock

innerBlock

better errors

note xor

white space and record

unary minus

inner/outer block

statement

lambda

sort

lambda is a value constructor

lambdaCall

ternary

ternary

basicValue

cleanup

quotes

chained Functions

dot operators

unify unary operators

unify unary operatos

notes

notes

notes

notes

parser

priorities set

white space or newline defined

allow newlines

notes

function call has become a post operator

recordElement

recursive index

postOperatorToFunction

better integer

comments

notes

record priority

comment

atom

finalComment

generated parser

type cast

format

initiate test file

test initiated; todo nodeCall; nodeExpression

callIdentifier

recover extra

initiate testing

initial tests pass

tests pass

remove function node

ternary

test parse passed

to

tests pass

notes

sort

toExpression

format

notes

remove unused modules

remove unnecessary nodeLambdaCall

notes

note

fix construct array

comment test

todo

elixir pipe

fix toString

notes

initial to expression test

value test

parsing records

records

comments

ternary

ifthenelse

inner block passed

inner block

lambda

lambda

new parser tested

now test tricks

ternary in expression

to test lambda as argument

to test lambda in structures

Use peggy Parser

expectEvalError

macros tested

remove mathjs parse

reducer test

comparison operator
2022-05-19 01:23:43 +02:00
Ozzie Gooen
eafdfdc7b7 Cleanup to samplesMap() code 2022-05-16 20:11:38 -04:00
Ozzie Gooen
606f24ff24 Cleanup and addition of toInternalSampleArray 2022-05-15 21:34:36 -04:00
Ozzie Gooen
15965b0b05 First simple version of samplesMap 2022-05-15 17:24:54 -04:00
Quinn Dougherty
fd17da83b8 Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-05 20:42:39 -04:00
Umur Ozkul
99f54f596c ternary operator (tested) 2022-05-04 22:36:34 +02:00
Umur Ozkul
888b615445 Merge branch 'reducer-dev-F-ifthenelse' into ternary
packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Builder.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res
2022-05-04 21:51:15 +02:00
Umur Ozkul
ad220ed2b4 foreign function interface 2022-05-04 20:44:46 +02:00
Quinn Dougherty
cfa83e552d Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-04 13:05:40 -04:00
Quinn Dougherty
f5f5be2cfb ?? build broke, had to add a ModuleName. prefix to a constructor
Value: [1e-7 to 1e-5]
2022-05-04 11:43:44 -04:00
Umur Ozkul
5de6aa8e0d map reduce reduceReverse reverse keep 2022-05-04 17:32:25 +02:00
Umur Ozkul
ae48bd6420 pass reducer to dispatch
to define functions that has lambda arguments, dispatching requires a
reducer
2022-05-04 15:33:51 +02:00
Umur Ozkul
33ee0b27d5 remove inspect performance completely
Redesign required on the function interface
2022-05-04 15:14:34 +02:00