Re: Sort a table by value

2020-07-13 Thread jasonfi
The examples I saw for sorting OrderedTable were for the key, not sorting by the value, so I'm not sure if what I need can be done with an OrderedTable.

Re: Sort a table by value

2020-07-13 Thread jasonfi
Thanks, I'll probably just a seq of tuples.

Sort a table by value

2020-07-13 Thread jasonfi
I have a table: > my_table: Table[int, string] How do I sort by the table by the value field?

Re: Why Seq search is faster than Table search

2020-07-06 Thread jasonfi
It could be that the optimizer somehow realizes that your loop will never do anything meaningful and never runs it.

Re: Why Seq search is faster than Table search

2020-07-06 Thread jasonfi
When performing benchmarks previously in C/C++ I noticed that lookup operations on vectors were extremely fast, so fast that I thought that perhaps the code didn't run. All of these tests only performed a simple operation(s) in a loop, similar to what you are doing. I think it has to do with

Re: Connection-Pooling Compile-Time ORM

2020-07-02 Thread jasonfi
Ok, but the general idea is the same, of using an underscore to differentiate code from the typical meaning. To me it's easier to read than those quotes the DSL currently uses.

Re: Connection-Pooling Compile-Time ORM

2020-07-01 Thread jasonfi
What does a multi-line where clause look like? I couldn't find an example, especially of a complex where clause, possibly using exists as one of the lines. It's a pity the from keyword needs to be in single quotation marks. I was trying to think of an alternative (e.g. source), but then it

Re: Parallel coding in Nim (as compared to OpenMP/MPI)

2020-06-18 Thread jasonfi
A link to an article I wrote: [https://onlinetechinfo.com/concurrency-and-parallelism-in-nim](https://onlinetechinfo.com/concurrency-and-parallelism-in-nim) (with lots of links).

Re: Nim's popularity

2020-06-17 Thread jasonfi
Concurrency and parallelism in Nim isn't bad actually: [https://onlinetechinfo.com/concurrency-and-parallelism-in-nim](https://onlinetechinfo.com/concurrency-and-parallelism-in-nim)/

Re: Nim in business

2020-06-08 Thread jasonfi
I wrote an article on the pros and cons of Nim in general: [https://onlinetechinfo.com/pros-and-cons-of-nim](https://onlinetechinfo.com/pros-and-cons-of-nim) My opinion is that Nim can handle what you're asking about. The community is small, but very active and helpful (if you do run into

Configure colors in chronciles

2020-06-05 Thread jasonfi
I'm using Chronicles for logging: [https://github.com/status-im/nim-chronicles](https://github.com/status-im/nim-chronicles) Does anyone know how to configure the colors used in logging to the terminal? Thanks.

Thread-safe cache

2020-06-03 Thread jasonfi
Is there a structure or library that I can use for a thread-safe cache? Keys will be strings.

Re: Creating a seq or openarray on unmanaged memory

2020-05-26 Thread jasonfi
I have just been researching something similar for string slices. I found this RFC: [https://github.com/nim-lang/RFCs/issues/12](https://github.com/nim-lang/RFCs/issues/12) which lead me to this issue: [https://github.com/nim-lang/RFCs/issues/178](https://github.com/nim-lang/RFCs/issues/178).

Re: How mature is async/threading in Nim?

2020-05-21 Thread jasonfi
I've tried to summarize the state of Nim's concurrency and parallelism in this blog post: [https://onlinetechinfo.com/concurrency-and-parallelism-in-nim/](https://onlinetechinfo.com/concurrency-and-parallelism-in-nim/). Some of it was based on this discussion.

Re: How mature is async/threading in Nim?

2020-05-19 Thread jasonfi
Are you using Jester or another web framework?

Re: New blog, with some Nim articles

2020-05-15 Thread jasonfi
What about: Nim is fast by default?

Re: New blog, with some Nim articles

2020-05-15 Thread jasonfi
I've changed that sentence to reflect that C-like performance is always attainable.

New blog, with some Nim articles

2020-05-14 Thread jasonfi
I've started a new blog with three articles on Nim so far: [https://onlinetechinfo.com/tag/nim](https://onlinetechinfo.com/tag/nim)/ The articles include the top reasons to use Nim, some disadvantages of Nim (for now) and avoiding Nim gotchas. I will be adding more content during my journey

How to specify path of OpenSSL libraries

2020-04-14 Thread jasonfi
When compiling Nim how do I specify where to locate the OpenSSL libraries? This is for the Unix build (I'm building on Mac OS). My issue goes back to a SIGILL when running Nimble, I've opened an issue here: