Commit Graph

32 Commits

Author SHA1 Message Date
cooldome
4028514eeb fixes #13013, reverts previous changes to readLines() (#13036) [backport]
* Revert "remove default argument for readLines (#12807) [backport]"

This reverts commit c949b81efd.

(cherry picked from commit a3df1b55f3)
2020-01-05 10:40:13 +01:00
cooldome
78f9933b8f remove default argument for readLines (#12807) [backport]
(cherry picked from commit c949b81efd)
2020-01-05 10:39:55 +01:00
Andreas Rumpf
5f77d5ad85 fixes #12491 [backport]
(cherry picked from commit 8a599fb571)
2019-10-30 10:30:47 +01:00
Federico Ceratto
fa7f5742d3 Fix spellings (#12277) [backport]
(cherry picked from commit 39290cf88c)
2019-09-30 18:43:35 +02:00
Andreas Rumpf
8397554315 fixes #12125 (#12131)
* fixes #12125
2019-09-06 07:23:59 +02:00
Miran
ab48d7901e hashes: implement murmur3 (#12022)
* hashes: implement murmur3
* refactoring; there is only one murmurHash and it works at compile-time via VM hooks
* fixes JS tests
* makes toOpenArrayByte work with C++
* make it bootstrap in C++ mode for 0.20
2019-09-01 00:04:10 +02:00
nc-x
d5840e1e3d Implement isExported for symbols in macros (#11963)
* Implement isExported for macros

* Reimplement isExported using VM callback mechanism

* VM does not support exceptions, use stacktrace() instead.
2019-08-18 11:51:28 +02:00
Oscar Nihlgård
50e921bb94 VM exception fixes (#11868) 2019-08-02 22:59:04 +01:00
cooldome
041d15392a Compiler plugin for implementing incremental computation in user space (#10819)
This plugin provides essential building block for implementing incremental computations in your programs. The idea behind incremental computations is that if you do the same calculation multiple times but with slightly different inputs you don't have to recompute everything from scratch. Also you don't want to adopt special algorithms either, you would like to write your code in standard from scratch manner and get incrementality for free when it is possible.

The plugin computes the digest of the proc bodies, recursively hashing all called procs as well . Such digest with the digest of the argument values gives a good "name" for the result. Terminology loosely follows paper "Incremental Computation with Names" link below. It works well if you have no side effects in your computations. If you have global state in your computations then you will need problem specific workarounds to represent global state in set of "names" . SideEffect tracking in Nim also useful in this topic.

Classical examples:

Dashboard with ticking data. New data arrives non stop and you would like to update the dashboard recomputing only changed outputs.
Excel spreadsheet where user changes one cell and you would like to recompute all cells that are affected by the change, but do not want to recompute every cell in the spreadsheet.
2019-04-11 23:09:11 +02:00
Araq
84d10f7d8a fixes #10585 2019-02-07 15:04:05 +01:00
Timothee Cour
c4e3c4ca2d add getCurrentCompilerExe to vmops (eg allows to get nim compiler at CT); add tests for vmops (#9925) 2018-12-18 09:07:12 +01:00
data-man
b0a977fe41 Don't use deprecated fmod in VM 2018-12-01 23:23:51 +05:00
Randy Smith
6c7abe6e5b Fixes #9671 (#9750) 2018-11-19 09:22:21 +01:00
Andreas Rumpf
8d850f7a69 deprecated ospaths (#9665) 2018-11-09 16:36:49 +01:00
skilchen
da178e4090 make mod on floats available in the VM (#9591)
* make `mod` on floats available in the VM
* add testcase
* removed no longer needed imports
2018-11-05 09:36:28 +01:00
Andreas Rumpf
86556ebfdb compiler refactoring; use typesafe path handing; docgen: render symbols between modules 2018-09-07 19:21:16 +02:00
Andreas Rumpf
688c54d8f1 compiler API: final cleanups; improve security by diabling 'gorge' and friends 2018-05-29 09:07:24 +02:00
Andreas Rumpf
05724645f8 more modules compile again 2018-05-12 11:58:44 +02:00
Andreas Rumpf
47335aab41 introduce nkTupleConstr AST node for unary tuple construction; breaking change 2018-04-13 17:45:58 +02:00
genotrance
c3cc52087f Added a few useful os calls to VM (#7440) 2018-04-12 13:59:14 +02:00
Andreas Rumpf
0895064983 getEnv now supports a 'default' parameter; refs #6019 2017-10-30 17:21:05 +01:00
Yuriy Glukhov
c3117e1aba Fixes #6336 (#6337) 2017-09-06 22:55:09 +02:00
Araq
9d488261df added system.gorgeEx that includes the exitCode; refs #4874; fixes #1994 2017-01-07 02:38:26 +01:00
Andreas Rumpf
60b187513e stdlib and compiler don't use .immediate anymore 2016-07-29 23:51:01 +02:00
Anatoly Galiulin
807784db82 Add `readFile` implementation for nimvm 2016-04-13 16:45:22 +06:00
Araq
2aff716134 os.walkDir is available at compile time 2015-11-10 15:31:21 +01:00
Yuriy Glukhov
04a4f35400 VM produces objects. 2015-09-05 14:18:37 +03:00
Araq
0c947f31ba system.locals is now a plugin for education 2015-04-24 02:08:06 +02:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
Araq
b2f577df23 fixes #1473 2014-11-12 02:36:59 +01:00
Araq
4298553de4 system.writeFile works at compile-time 2014-10-02 10:52:32 +02:00
Araq
1f85b3b5d3 VM supports math and a few os procs 2014-08-30 16:37:27 +02:00