Re: Nim + Flutter == bright future?

2019-05-05 Thread george33
Dart VM is redundant for Flutter. See for example Flutter for Go with no Dart (VM) [https://github.com/go-flutter-desktop/go-flutter](https://github.com/go-flutter-desktop/go-flutter)

Re: Need help with creating a module featuring asynchronous access of Redis

2019-05-05 Thread Akito
Well, I am about to give up, because this is getting crazy. Sadly, your example does not work for me, even with tweaks, as the most important part proc newMyState cannot work, as it couldn't be able to return anything else aside from Future[T] or Future[void]. What is even worse: even if that

Re: Nim vs D

2019-05-05 Thread cantanima
> I wonder if that will affect D's popularity... What does "mainlined" mean? Ada and Modula-2 have had GCC frontends for decades now, but they're still basically invisible. One reason may be that they typically require you to download and/or build a separate compiler. In Modula-2 you have to

Re: Nim vs D

2019-05-05 Thread Libman
Back on topic, [the big news in Dland](https://www.phoronix.com/scan.php?page=news_item=GCC-9.1-Compiler-Released) is: "The D programming language front-end has finally been mainlined in GCC! There is now D support beginning with GCC 9." I wonder if that will affect D's popularity...

Re: Nim vs D

2019-05-05 Thread Libman
> It's may be a strange question, but what do you think about PureBasic ? I don't think about PureBasic, because it's proprietary. I don't hate proprietary software - I'm sure plenty of people find it useful - but I have no use for it personally. It seems like PureBasic had a _raison d 'ĂȘtre_

Re: Need help with creating a module featuring asynchronous access of Redis

2019-05-05 Thread dom96
You should put your data into an object and then pass it around your procs. Don't create "global" state and capture it in closures. Here is what I mean (probably doesn't compile, but I hope you get the idea): import redis, asyncdispatch type MyState = ref object

Re: Need help with creating a module featuring asynchronous access of Redis

2019-05-05 Thread Akito
Same error with waitFor, as this issue is rather scope related, so it seems to me.

Re: Need help with creating a module featuring asynchronous access of Redis

2019-05-05 Thread aredirect
You need to call your async proc with waitFor e.g [https://github.com/xmonader/nim-redisclient/blob/master/tests/testredisclient.nim](https://github.com/xmonader/nim-redisclient/blob/master/tests/testredisclient.nim)

Need help with creating a module featuring asynchronous access of Redis

2019-05-05 Thread Akito
I am currently stuck creating a module that uses the [Redis module](https://github.com/nim-lang/redis) asynchronously. I don't really know how to solve this so maybe you could help me. Here is what I imagined to do: import redis, asyncdispatch # I need this proc to