Commit graph

1,153 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
ec86d5db0f Improved documentation for macros.newProc. 2013-07-31 23:44:09 +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
9589acd00e fixes #532 2013-08-01 00:16:29 +02:00
Araq
3ae6043e7e Merge pull request #533 from gradha/pr_helper_procs
Adds some helper procs
2013-07-31 12:59:22 -07:00
Araq
3ab4b3d58f Merge pull request #530 from EXetoC/master
Missing SDL_image symbols
2013-07-31 12:48:33 -07:00
Araq
c96a4406e4 Merge pull request #523 from exhu/x11fix
X11, cairo bindings fixes
2013-07-31 12:47:41 -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
c5c6ef6e2b Fixes graphics.drawEllipse.
It failed because a Natural cannot be negative but drawEllipse tried to
set negative values to a Natural variable; this variable's type was
changed to an Int.
2013-07-27 11:18:13 +01:00
Dominik Picheta
e33af13ae3 Fixes #543.
Changed signature of SetVideoMode so that the flags param is a uint32.
2013-07-27 11:03:28 +01:00
Araq
fca23d1675 bugfix: system.& for sequences 2013-07-27 01:28:13 +02:00
Dominik Picheta
3ead23cb26 Merge branch 'master' into asyncmacro 2013-07-25 22:16:06 +01:00
Dominik Picheta
e360d048ba Added macros.newIfStmt and macros.newVarStmt. 2013-07-25 22:15:34 +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
3e7ea859ec Merge branch 'master' into asyncmacro 2013-07-25 19:33:08 +01:00
Araq
8ac68a4d94 Merge pull request #527 from jbe/master
export pointer types for SDL event objects
2013-07-24 13:35:20 -07:00
Araq
f9426bfcd5 added macros.genSym 2013-07-24 21:58:17 +02: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
EXetoC
1e3934e464 dynlib 2013-07-18 23:25:29 +02:00
EXetoC
6e4dfc8eb5 Add missing SDL symbols. 2013-07-18 20:28:09 +02:00
Dominik Picheta
f3b4240b87 Fixed libzip path for Arch Linux. 2013-07-17 22:29:21 +01:00
jbe
2c2ae2adb2 export pointer types for SDL event objects 2013-07-17 00:52:32 +02:00
Grzegorz Adam Hankiewicz
2ee228d5d1 Documents copyFile not copying attributes on posix. 2013-07-16 02:56:50 +02:00
Grzegorz Adam Hankiewicz
ec6e267351 Warns to not modify string findAll is iterating over. 2013-07-16 02:00:25 +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
Yury Benesh
02ca9e3b59 Moved complex pragmas for xlib and cairo into separate included files. Fixed xkb bindings. 2013-07-15 16:06:53 +03:00
Yury Benesh
f54cb2e323 Fixed xrender.nim for use_pkg_config 2013-07-09 23:30:11 +03:00
Yury Benesh
3c9864c9d3 Added use_pkg_config, use_pkg_config_static conditionals to xlib, cairo 2013-07-09 21:58:22 +03:00
Araq
dbb87bc557 Merge pull request #504 from ventor3000/master
modules poly and numeric added
2013-07-07 16:06:58 -07:00
Araq
f841447c75 Merge pull request #513 from gradha/pr_extends_align
Extends align proc with default padding parameter.
2013-07-07 16:01:51 -07:00
Yury Benesh
f74e296f84 Fixed XClientMessageEvent struct, added equals operator fot TAtom from unsigned, added xclient union field access proc to XEvent 2013-07-07 23:01:11 +03: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