Rob Rix
d7b294e3d0
Merge branch 'master' into batch-copy-terms
2017-03-28 12:57:24 -04:00
Rick Winfrey
2ff5d92d01
Alignment
2017-03-28 09:44:19 -07:00
Rick Winfrey
5aebd2006a
Rework loading of env vars
2017-03-28 09:41:16 -07:00
Rick Winfrey
5e220b620b
Move renderSExpression function
2017-03-28 08:58:27 -07:00
joshvera
980565af05
Don't rewrap VarAssignment and VarDecl
2017-03-28 11:51:39 -04:00
Rob Rix
e1c914d90a
Bump haskell-tree-sitter.
2017-03-28 09:45:19 -04:00
Rick Winfrey
d9ee7ca25d
🔥 a bunch of code, reduce code paths
2017-03-27 17:07:09 -07:00
Rick Winfrey
4eaee89482
SourceText -> Maybe SourceText
2017-03-27 16:43:37 -07:00
Rick Winfrey
854f35759b
🔥 convenience functions
2017-03-27 16:29:41 -07:00
Rick Winfrey
844f54464f
Reflow toJSON definitions
2017-03-27 16:21:30 -07:00
Rick Winfrey
faeaed219f
Move identifierFor
to main where
2017-03-27 16:17:41 -07:00
Rick Winfrey
eaa5873ed7
Merge branch 'master' into gitmon-support
2017-03-27 15:38:18 -07:00
Rick Winfrey
1399166ed0
Print IO exception to stderr
...
- Printing to stdout will cause JSON parsing issues on the dotcom side
2017-03-27 15:27:03 -07:00
Rob Rix
02828cb949
Pass the TSNode through instead of copying the whole Node back over.
2017-03-27 18:19:24 -04:00
joshvera
30c605f0a6
Map variable_declarator to VarAssignment
2017-03-27 18:02:43 -04:00
joshvera
0323f6173c
Map accessibility modifier to identifier
2017-03-27 17:22:23 -04:00
Rick Winfrey
3d20fe58a3
Update comment formatting
2017-03-27 14:16:08 -07:00
Rick Winfrey
f935e1542f
Use BangPatterns
2017-03-27 14:15:58 -07:00
Rick Winfrey
12616f961c
Print IO exceptions rather than swallow them
2017-03-27 14:13:21 -07:00
Rick Winfrey
cc0288f431
Inline error handling for getCurrentDirectory
2017-03-27 14:13:01 -07:00
Rob Rix
f207a70e1c
Spacing.
2017-03-27 16:56:28 -04:00
joshvera
d05e297084
Relax VarDecl and VarAssignment constraints
2017-03-27 16:28:37 -04:00
Rob Rix
5c3a8cac21
Bind the copying functions in the where clause.
2017-03-27 16:19:09 -04:00
Rob Rix
bbc488d12a
Pull getChildren, childNodeToTerm, and range into a where clause.
2017-03-27 16:17:10 -04:00
Rob Rix
bf68679f20
Tidy up the source span.
2017-03-27 16:04:43 -04:00
Rob Rix
23c4a8b6c3
Tidy up how we get child terms.
2017-03-27 16:03:35 -04:00
Rob Rix
32b6ff17e0
Filter non-empty children in getChildren.
2017-03-27 16:02:25 -04:00
Rob Rix
72b5b056de
Don’t pass the range in.
2017-03-27 15:59:48 -04:00
Rob Rix
e6b85848da
We no longer need to evaluate these strictly.
2017-03-27 15:57:11 -04:00
Rob Rix
fa68774cbd
Take a Node, not a Ptr Node.
2017-03-27 15:54:34 -04:00
Rob Rix
19ce10451a
Batch-copy nodes.
2017-03-27 15:48:24 -04:00
Rick Winfrey
862c335213
snake_case -> camelCase
2017-03-27 10:21:28 -07:00
Rick Winfrey
e801ac3f07
Use void for safeGitmonIO
2017-03-27 10:11:30 -07:00
Rick Winfrey
7258550221
🔥 Data.Text pack
2017-03-27 10:11:09 -07:00
joshvera
48d46489d1
Merge remote-tracking branch 'origin/master' into typescript-mapping
2017-03-27 12:05:06 -04:00
joshvera
55f2ac07d1
Map public_field_definition to VarAssignment
2017-03-24 16:32:41 -04:00
Rick Winfrey
397d061ff9
Use Data.Char.toLower
2017-03-24 13:14:54 -07:00
Rick Winfrey
9263008b15
Rename socket' -> sock; use void
2017-03-24 11:29:38 -07:00
Rick Winfrey
69e791c4a1
🔥 disabling of unused do bind
2017-03-24 11:29:19 -07:00
Rick Winfrey
fa206dc250
🔥 note about BangPatterns
2017-03-24 11:29:02 -07:00
Rob Rix
6f51d40cb5
Merge branch 'master' into update-parse-command
2017-03-24 14:27:34 -04:00
Rob Rix
e5f018c619
Just say State.
2017-03-24 14:13:41 -04:00
Rob Rix
66706c31de
🔥 diffAt, Cost, &c.
2017-03-24 14:12:14 -04:00
Rob Rix
fedacdc7d5
🔥 continue.
2017-03-24 14:06:57 -04:00
Rick Winfrey
3b8553f912
Trying to surface error
2017-03-23 17:05:57 -07:00
Rick Winfrey
1604f6ca34
Add back strictness
2017-03-23 16:50:34 -07:00
Rick Winfrey
9fe095474f
Strictness not required
2017-03-23 16:39:06 -07:00
Rick Winfrey
f60f90045d
Remove "\n"
2017-03-23 16:12:11 -07:00
Rob Rix
2a1fb5ad36
Partially apply decompose.
2017-03-23 16:39:57 -04:00
Rob Rix
f8b3d1490b
Index the state array by Diagonal.
2017-03-23 15:57:13 -04:00
Rob Rix
973d873297
Derive an instance of Ix for Diagonal.
2017-03-23 15:54:46 -04:00
Rob Rix
6ca3d56269
Derive an Ord instance for Diagonal.
2017-03-23 15:52:13 -04:00
Rob Rix
ce0b93dd30
Rename slide -> slideFrom.
2017-03-23 15:50:16 -04:00
Rob Rix
ade6a50b30
Use the state array’s bounds to obviate the need for index transformations.
2017-03-23 15:48:29 -04:00
Rob Rix
95d38df8c4
Add a few more exports.
2017-03-23 15:41:56 -04:00
Rob Rix
a5f33b1bc6
Explicitly enumerate the exports from SES.Myers.
2017-03-23 15:40:17 -04:00
Rob Rix
2b01729a6f
Rename StepF to Step.
2017-03-23 15:38:10 -04:00
Rob Rix
5f9899f6fc
🔥 liftShowsQuaternary & liftShowsQuinary.
2017-03-23 15:35:11 -04:00
Rob Rix
7f13ef23a2
📝 all the things.
2017-03-23 15:34:52 -04:00
Rob Rix
70b825ecbb
Move State into the implementation details section.
2017-03-23 14:55:12 -04:00
Rob Rix
af04668fc5
Move ses into its own section.
2017-03-23 14:54:18 -04:00
Rob Rix
8a5d2f1fa7
Represent downward/rightward moves explicitly in the DSL.
2017-03-23 14:51:45 -04:00
Rob Rix
2118ea17d1
SetK takes an endpoint.
2017-03-23 14:34:32 -04:00
Rob Rix
2567d185c8
Placate hlint.
2017-03-23 14:34:04 -04:00
Rick Winfrey
c6300449df
This is equivalent to Ruby regex \A
and \Z
for treating start of line and end of line the start of input and end of input, and ignores newlines
2017-03-23 11:32:49 -07:00
Rob Rix
19c559ab74
Endpoints carry edit scripts.
2017-03-23 14:31:50 -04:00
Rob Rix
347e96f31a
Add phantom type parameters to Endpoint.
2017-03-23 14:22:56 -04:00
Rob Rix
452842b197
Correct the calls into SES from lcs & editDistance.
2017-03-23 14:08:52 -04:00
Rob Rix
759b5515f9
ses is the main entry point.
2017-03-23 13:28:40 -04:00
Rob Rix
7a0efc3391
🔥 the bounds check in runSearchAlongK.
2017-03-23 13:24:38 -04:00
Rob Rix
3130ae48e9
Bounds-check k in searchUpToD.
2017-03-23 13:24:27 -04:00
Rick Winfrey
7371c7d7c2
Merge branch 'master' into update-parse-command
2017-03-23 10:18:32 -07:00
Rick Winfrey
95e751f0e0
🔥 whitespace
2017-03-23 09:38:36 -07:00
Rick Winfrey
37e6929d3b
Use safeGitmonIO for connecting to Unix socket
2017-03-23 09:26:54 -07:00
Rob Rix
77a58106d5
Merge remote-tracking branch 'origin/master' into myers-algorithm-in-proof-refinement-style
2017-03-23 10:58:19 -04:00
Rob Rix
17fad7ce14
Tidy up slide evaluation.
2017-03-23 10:48:51 -04:00
Rob Rix
88b4e5fe06
🔥 getEq.
2017-03-23 10:46:30 -04:00
Rob Rix
ee0554c22b
Read the comparator from the environment.
2017-03-23 10:46:03 -04:00
Rob Rix
41928ba594
Read the edit graph from the environment instead of passing it around.
2017-03-23 10:44:24 -04:00
Rob Rix
a873891ce7
Inline decompose.
2017-03-23 10:29:09 -04:00
Rob Rix
6a3ea32528
Extract bounds-checking for k.
2017-03-23 10:21:33 -04:00
Rob Rix
3568859147
Bounds-check when setting k.
2017-03-23 10:15:55 -04:00
Rob Rix
66d8e618b5
Extract the runSlide evaluator.
2017-03-23 10:14:50 -04:00
Rob Rix
bdb1670f67
Move the ! overload to the top level.
2017-03-23 10:13:40 -04:00
Rob Rix
83efbb56b6
Extract the setK evaluator.
2017-03-23 10:10:40 -04:00
Rob Rix
03808897cf
Extract the getK evaluator.
2017-03-23 10:08:47 -04:00
Rob Rix
3106894876
Extract the moveFromAdjacent evaluator.
2017-03-23 10:07:48 -04:00
Rob Rix
b477a93dba
Extract the searchAlongK evaluator.
2017-03-23 10:06:53 -04:00
Rob Rix
2b1bf43a1e
Pop a couple of call stacks.
2017-03-23 10:05:27 -04:00
Rob Rix
f0e21a1cb4
Extract the searchUpToD evaluator.
2017-03-23 10:05:07 -04:00
Rob Rix
27a608ad7b
Extract the editDistance evaluator.
2017-03-23 10:04:07 -04:00
Rob Rix
5955e7665d
Extract the SES evaluator.
2017-03-23 10:03:03 -04:00
Rob Rix
2ef802e8d7
Extract the failure function to the top level.
2017-03-23 10:02:06 -04:00
Rob Rix
97a6028318
Extract the runLCS evaluator.
2017-03-23 10:00:11 -04:00
Rob Rix
7fe2522e4d
🔥 the shared graph/n/m bindings.
2017-03-23 09:55:56 -04:00
Rob Rix
b9e8fd3e7a
Store inputs & state in arrays instead of vectors.
2017-03-23 09:01:49 -04:00
Rob Rix
f2f5af7d6a
🔥 divideGraph.
2017-03-23 08:55:29 -04:00
Rick Winfrey
a176dda44a
combine safeIO and timeout functionality into a single function
2017-03-22 17:23:36 -07:00
Rick Winfrey
58ce25aa30
Send CPU time in milliseconds, not nanoseconds
2017-03-22 17:23:02 -07:00
Rick Winfrey
bcdf17e0ab
Restrict communication with Gitmon to a single socket connection
...
- Gitmon perceives a socket closing as EOF in the database, and
terminates the record created with the `update` command. This means
that when the `finish` command is issued, the Gitmon database attempts
to insert the process stats as a new record in the Gitmon db.
2017-03-22 17:22:41 -07:00
Rob Rix
1893d2da16
Don’t attempt moves from out-of-bounds diagonals.
2017-03-22 17:18:17 -04:00
Rob Rix
35fb0f62ce
Rename FindDPath to MoveFromAdjacent.
2017-03-22 16:47:58 -04:00
Rob Rix
6bcc0322f7
Skip out-of-bounds values of k.
2017-03-22 16:40:13 -04:00
Rob Rix
1b4e47ca2b
Skip diagonals < -m.
2017-03-22 16:21:36 -04:00
Rob Rix
03f1854c7d
Skip diagonals > n.
2017-03-22 16:19:06 -04:00
Rob Rix
aa4aa4438f
Bounds-check insertions/deletions.
2017-03-22 16:18:49 -04:00
Rob Rix
bd766c70d6
Simplify how we insert/delete elements.
2017-03-22 15:55:22 -04:00
Rob Rix
a520062e37
We build up the edit script backwards, so reverse it.
2017-03-22 15:40:52 -04:00
Rob Rix
d5bd9537dc
Search up to m + n.
2017-03-22 15:31:17 -04:00
Rob Rix
de67e0491e
Allocate exactly m + n + 1 state slots.
2017-03-22 15:27:18 -04:00
Rob Rix
27b0b28954
🔥 the reverse path & control flow.
2017-03-22 15:25:50 -04:00
Rick Winfrey
5ddc4f7074
Manually specify JSON structure (to avoid inclusion of tag
)
2017-03-21 14:51:23 -07:00
Rob Rix
fdc2f551c4
Offset the y coordinates of reverse endpoints.
2017-03-21 15:18:01 -04:00
Rick Winfrey
4207e5f901
Rework the way we read
a userID or repoID from the environment
...
- TIL : mkRegexWithOpts documentation is misleading. The first boolean
option is described as enforcing beginning of line (`^`) and end of
line (`$`) matching, along with not matching newline characters with
`.`. From my testing, I discovered this is not true, and in order to
enforce that regex behavior, I needed to explicitly add `^…$` to my
regex. Because the `mkRegexWithOpts` function was no longer doing what
I wanted, I opted for the simpler `mkRegex` function.
- readInt now returns a `Maybe Int` and expects a single `Just [s]`
match supplied to attempt reading. This function is not general
purpose enough to be safe to use elsewhere, but is safe to use within
the context of `readIntFromEnv` because of the way the regex enforces
matches.
2017-03-21 10:39:14 -07:00
Rob Rix
68a3d5fe16
Extract the index function to the top level.
2017-03-21 12:02:53 -04:00
Rick Winfrey
7d48f6b8ad
Convert to nano secs once
2017-03-20 18:13:11 -07:00
Rick Winfrey
c902c7f393
Send userID and repoID with schedule Gitmon request
2017-03-20 18:12:59 -07:00
Rick Winfrey
b28b8faa05
Add readIntFromEnv function
...
- Allows us to read the Integer value for user_id and repo_id set in
the env when they are prefixed with `uint:`
2017-03-20 18:12:13 -07:00
Rick Winfrey
8737cd0fcc
Add repoID and userID to ProcessUpdateData
2017-03-20 18:10:22 -07:00
Rick Winfrey
16555c54b3
Merge branch 'master' into gitmon-support
2017-03-20 17:03:48 -07:00
Rob Rix
d96931157f
Reformat an if statement.
2017-03-20 13:04:06 -04:00
Rob Rix
bbb95ff030
Add an explicit step for the overlaps check.
2017-03-20 12:46:45 -04:00
Rob Rix
6e0104dbd0
Throw an exception explicitly when failing to find the middle snake.
2017-03-20 11:57:43 -04:00
Rob Rix
10ef21b7c8
Select the correct diagonal in the opposing edit graph.
2017-03-20 11:48:49 -04:00
Rob Rix
54bd6a2a4c
The reverse edit graph is centred around k = 0.
...
This means that we will need to translate between the different diagonal coordinates when looking for overlap, but we won‘t need to adjust the boundaries checked when finding the furthest endpoint along some diagonal k.
2017-03-20 11:45:07 -04:00
Rob Rix
8d4e54a3fa
Avoid recomputing endpoints where feasible.
2017-03-20 11:21:20 -04:00
Rob Rix
e7c954bccc
getK returns an endpoint.
2017-03-20 11:19:18 -04:00
Rob Rix
d4b00fa24a
Bounds-check before getting the (k ± 1)th diagonal.
2017-03-20 10:35:10 -04:00
Rob Rix
4e42d96e0c
Look up the result in the exiting diagonal.
2017-03-20 10:10:09 -04:00
Rob Rix
26dc1c82a3
Use the makeEditGraph convenience in SES.
2017-03-20 09:58:37 -04:00
Rob Rix
1b1ecc20a7
Add a convenience constructor for edit graphs.
2017-03-20 09:43:55 -04:00
joshvera
1b1f85015e
Add ParseCommand changes back
2017-03-17 12:51:22 -04:00
joshvera
1b3110c57a
Revert "Run typescript tests"
...
This reverts commit bb25c8c0f70650f98e76443c143e6fed3dd17a38.
2017-03-17 12:40:06 -04:00
joshvera
6dc9085dcd
Run typescript tests
2017-03-17 12:24:44 -04:00
Rob Rix
d82061ce7c
Clean up inInterval with inRange.
2017-03-17 10:47:56 -04:00
joshvera
e526fdf213
Stub in javascript termAssignment
2017-03-17 10:43:00 -04:00
joshvera
2d06266ef8
add name
2017-03-17 10:38:27 -04:00
Rob Rix
c330c4a44b
Clean up addFor with the direction eliminator.
2017-03-17 10:37:56 -04:00
Rob Rix
05d2ead9b1
🔥 the diagonalFor helper.
2017-03-17 10:37:00 -04:00
Rob Rix
e63935ae09
🔥 the edit distance for direction helper.
2017-03-17 10:36:12 -04:00
Rob Rix
3044fa3a8f
Clean up SetK with the direction eliminator.
2017-03-17 10:34:37 -04:00
Rob Rix
0ed7794118
Clean up GetK a little further with the direction eliminator.
2017-03-17 10:32:49 -04:00
Rob Rix
b180a448ed
Clean up endpointsFor with the direction eliminator.
2017-03-17 10:32:02 -04:00
Rob Rix
f9e00fc560
Clean up SearchAlongK refinement with the direction eliminator.
2017-03-17 10:29:41 -04:00
Rob Rix
562515e93c
Clean up Slide refinement using the direction eliminator.
2017-03-17 10:28:31 -04:00
Rob Rix
2a4c8676fa
Clean up the bounds checks with when
.
2017-03-17 10:25:15 -04:00
Rob Rix
dd4133d228
Clarify the underflow/overflow exceptions.
2017-03-17 10:21:47 -04:00
Rob Rix
b53fa3a283
Clean up FindDPath refinement using the direction eliminator.
2017-03-17 10:21:38 -04:00
Rob Rix
adffda01dc
Add an eliminator for Direction.
2017-03-17 10:16:07 -04:00
Rob Rix
64d8aced70
Encapsulate throwing failures.
2017-03-17 09:54:49 -04:00