Got working as concepts :) : Just had to change the concept definition to use a
variable rather than typedef for Map
type Bot* = concept b
var m: Map
decide(b, m) is Dir
b.name is string
b.key is string
type StatelessBot* = object
name*: string
I got it working after a bit of back-and-forth. I had to upgrade to the latest
version of [astar](https://github.com/Nycto/AStarNim) (with nimble install
'astar@#head'), and move the 'Bot' concept to an object that StatelessBot
inherited from (and moved the decide proc into a closure). Couldn't
+1 for error
it wont even compile
nymph.nim(26, 16) Error: type mismatch: got (Map) but expected 'Graph =
astar'
i was going to leave it running on a vps
Jester relies on Nim's built-in async modules, which are unfortunately built on
a single-threaded _asynchronous_ approach. This means any blocking operation
done on the main thread will stall all operations.
If your aim is to pause a route, I suggest using something like
[sleepAsync](http://for
Hi,
I'm using the following code:
import jester, asyncdispatch
import os
routes:
get "/slow":
sleep(1000)
resp "thanks for waiting"
get "/fast":
resp "whooosh"
runForever()
I can get hundreds of requests per secon
I'd prefer throwing an error (or returning the original string). Splitting with
a delimiter of 'nothing' makes little sense, and doesn't have an intuitive
result.
Unfortunately the only way to do so is to edit Aporia's source code. In the
future this should be configurable though, perhaps it should even take colors
from the GtkSourceView theme used in the source code editing component. Please
report an issue in the Aporia repo for this!
Brilliant! Let's defeat all these other AIs in Nim :D
Hi, I installed the latest version from the above link today and nim support is
included! Go to Help > Installed Plugins - type nim in filter -> activate,
restart now you can create nim projects and files and edit nim files :)
This looks like it would fit Nim far better than classical object-oriented
multi-inheritence.
That's not because templates have priority over procs, but because of argument
types. Say, if you have 2 procs, 1 taking T and another - any (procs cannot
take expr), then the 2nd (with any) will be called. The same if the 1st (with
T) is a template, or if both are templates, or if both are temp
12 matches
Mail list logo