Commit graph

624 commits

Author SHA1 Message Date
Dominik Picheta
b3469c43a6 Implemented 'await connect' fully. Fixed a buffering and 'reqReg' bug.
* reqReq did not reset lastReq to reqNil, this caused problems in the
new tasyncitermacro test. (await accept stopped accepting requests after
some arbitrary amount have been accepted).
* Rewritten and moved tasyncitermacro to tests/run/ so that the tester
actually tests whether it works at runtime.
* tasynciterraw is now a copy of tasyncitermacro after macro expansion.
It will be used as a control test, useful if the macro starts generating
incorrect code.
2013-08-03 14:19:17 +01:00
Dominik Picheta
ab534804c6 Merge branch 'master' into asyncmacro 2013-07-31 23:44:47 +01:00
Dominik Picheta
e42f877664 Optimised `await` on custom async procs.
* The async proc is now invoked immediately after the 'await' request
is processed. This means that the iterator is executed until it yields
with a request which cannot be immediately satisfied (e.g. readLine)
after which point a
select() call will need to be made. Previously the async proc would only
be added to the list of requests, the event loop would need to start
over and thus would need to go
through each request again before invoking the iterator and reaching a
request which could not be immediately satisfied.
* This was implemented by recursively calling the processWorker
procedure in asyncio.nim. In the future it may be of benefit to also
perform this for reqReg.
* When the awaited user-defined async proc finishes, the parent worker
will be executed, the same optimisation has been used for that case.
* The way that this optimisation is implemented means that even multiple
levels of awaited user-defined procs will be quickly processed. (Look at
the tasyncitermacro test, the auth procs are arranged this way to test
this)
2013-07-31 23:27:07 +01:00
Araq
3ae6043e7e Merge pull request #533 from gradha/pr_helper_procs
Adds some helper procs
2013-07-31 12:59:22 -07:00
Dominik Picheta
70d67daa14 Introduced 'reg' keyword, and changed the await behaviour for custom
procs.
2013-07-31 19:28:37 +01:00
Dominik Picheta
ae64089e53 Fixed crash when worker has just been registered and didn't get executed
yet.
2013-07-28 18:28:50 +01:00
Dominik Picheta
426c2d6c01 Implemented default arguments for async procs. 2013-07-28 14:41:09 +01:00
Dominik Picheta
2330c95b22 Implemented genSym for async function calls. 2013-07-28 13:50:32 +01:00
Dominik Picheta
c5ff9650f7 Changed some asyncio macro code to use the new genSym. 2013-07-25 22:13:37 +01:00
Dominik Picheta
d8659eaaa2 Another docs fix for asyncio. 2013-07-21 15:18:44 +01:00
Dominik Picheta
1e1a583903 Fixes problems with async docs. 2013-07-21 14:51:25 +01:00
Dominik Picheta
a1a8925692 Calling an async proc with invalid arguments will now fail at compile-time. 2013-07-21 14:28:02 +01:00
Dominik Picheta
d15e67e020 Better param passing. Implemented send, readLine and support for
documentation stubs.
2013-07-21 13:58:54 +01:00
Dominik Picheta
84ea209fe1 Merge branch 'master' into asyncmacro 2013-07-21 11:09:20 +01:00
Dominik Picheta
325c167e2a Fixes OSError deprecation warning. 2013-07-21 11:08:28 +01:00
Dominik Picheta
75893d1b36 First implementation of the async/await-like system with macros. 2013-07-20 23:42:10 +01:00
Araq
84534ce4b8 Merge branch 'master' of github.com:Araq/Nimrod 2013-07-20 20:18:21 +02:00
Grzegorz Adam Hankiewicz
55bcd0ba1e Adds findAll() convenience procs to xmltree. 2013-07-20 00:06:23 +02:00
Grzegorz Adam Hankiewicz
e7be3d873f Notes kind() getter is used to read TXmlNode.k field. 2013-07-19 23:25:22 +02:00
Grzegorz Adam Hankiewicz
c0b78276e8 Adds convenience expandTilde proc around getHomeDir. 2013-07-19 23:20:06 +02:00
Grzegorz Adam Hankiewicz
68cfb25c11 Adds convenience copyFileWithPermissions to os module. 2013-07-19 22:52:11 +02:00
Araq
bfbdb1f028 refactorings for the eval engine; bugfix: clean templates as accessors 2013-07-19 22:22:20 +02:00
Grzegorz Adam Hankiewicz
2ee228d5d1 Documents copyFile not copying attributes on posix. 2013-07-16 02:56:50 +02:00
Grzegorz Adam Hankiewicz
67cea2b9b5 Explains parseHex initialization quirk. 2013-07-16 01:11:20 +02:00
Grzegorz Adam Hankiewicz
b5811cc73c Adds some examples to JoinPath and / procs. 2013-07-16 00:47:49 +02:00
Araq
dbb87bc557 Merge pull request #504 from ventor3000/master
modules poly and numeric added
2013-07-07 16:06:58 -07:00
Robert Persson
5a18100816 Fixed some minor stuff in module poly
Removed the stupid initPolyFromDegree which only served ro re-allocate
results. Also fixed some minor stuff with nil return values in roots.
2013-07-07 01:50:10 +02:00
Robert Persson
0d2f8d5079 Optimized integrate function in module poly
Rewrote the integrate function since the old one was quite hacky. The
new one is about 7 times faster in release and 3 times faster in debug
2013-07-07 01:26:00 +02:00
Grzegorz Adam Hankiewicz
65b899030d Extends align proc with default padding parameter. 2013-07-05 21:37:30 +02:00
Grzegorz Adam Hankiewicz
dd60372226 Silences debug echo. 2013-07-04 16:18:36 +02:00
Robert Persson
ce1399db2d Optimized divMod in poly
Made a huge speed improvement in debug mode. Only a few % in release,
but the memory load should be somewhat lower.
2013-07-03 12:44:26 +02:00
Robert Persson
2cae55ae04 Fixed a mixed bag of stuff poly and numeric 2013-07-03 01:15:31 +02:00
Robert Persson
d1a90c6ec6 Cleanup of poly an numeric modules
Removed some test code
2013-07-02 20:55:27 +02:00
Robert Persson
85dbc2d306 Added poly and numeric modules 2013-07-02 16:01:41 +02:00
Araq
6c8e740b57 made parseBiggestFloat faster for large exponents 2013-07-01 00:33:11 +02:00
Araq
52851b722d --os:standalone works again 2013-06-30 21:15:28 +02:00
Araq
b6f2902905 Merge branch 'master' of github.com:Araq/Nimrod 2013-06-27 19:57:24 +02:00
Araq
83876b1b81 bugfix: rendering of typ|typ2 2013-06-27 19:57:01 +02:00
Dominik Picheta
a9f2c3ffaf Fixed OSError + recvLine deprecation warnings. 2013-06-27 15:06:30 +01:00
Araq
e599fdd60d bugfix: marshal supports unsigned numbers 2013-06-27 08:39:41 +02:00
Araq
82ceca0717 fixes #492 2013-06-27 07:43:04 +02:00
Araq
3ff572ffcd Merge branch 'master' of github.com:Araq/Nimrod 2013-06-27 01:05:19 +02:00
Araq
a674c039fb fixed a long standing xml parser bug; html parser bugfixes + speed improvements 2013-06-27 01:04:56 +02:00
Dominik Picheta
9686d92bfc Fixed OSError deprecation warnings. 2013-06-26 00:00:07 +01:00
Dominik Picheta
bacb20a379 Deprecated OSError, and modified it to require an explicit OS error code.
The deprecated functions include the OSError and OSErrorMsg, the name did not change however the signature of the new functions did. They now require a TOSErrorCode value be passed to them. This value can be retrieved using OSLastError. The reason this was done is because on Windows any win api call can reset the last error code to 0, this change allows the user to immediately grab the error code and worry about the string representation later if needs be.
2013-06-25 20:10:28 +01:00
Dominik Picheta
9540a93d95 Fixed terminal module so that it doesn't raise an EOS exception when stdout is redirected. 2013-06-22 19:57:12 +01:00
Dominik Picheta
d23d14897a Symlinks are now expanded in os.getAppFilename on Mac OS X. 2013-06-22 00:15:07 +01:00
Dominik Picheta
2bb4a853ec Send buffer will be respected now when closing async SCGI clients. 2013-06-21 16:01:31 +01:00
Dominik Picheta
a1e823b038 Added an asyncio.isSendDataBuffered procedure. 2013-06-21 16:07:13 +02:00
Araq
8f97f3180a made tests green 2013-06-10 00:17:10 +02:00