Introducing taskpools, a small lightweight ARC/ORC threadpool

2022-01-11 Thread elcritch
Looks great! Does the async work with ARC only or does it require ORC?

F-bound polymorphism in C++ and(?) Nim

2022-01-11 Thread ElegantBeef
Are we sure this is still the case, I did fix some stuff with recursive generics which released with 1.6, the follow does compile. type Task[T] = object of RootObj data: ref T doThingInternal: proc(a: T) {.nimcall.} FibTask = object of

Module typing, code reuse and separate compilation

2022-01-11 Thread Sixte
I deeply apologize for the inconvenience. A bit of an irony here: I took the quotes entirely from section 6.3 , headline "practicum". They are the least technical part of the entire paper. I added some context about the motivation , side effects and relevance for imperative languages. If you

Module typing, code reuse and separate compilation

2022-01-11 Thread ElegantBeef
Every time you make a post like this a little part of me hopes you've discovered plain english and code examples to explain the subject, but alas to my small mind you just come off as rambling technobabble. I do wish to understand the subject and point of these posts but as I'm not an academic

Module typing, code reuse and separate compilation

2022-01-11 Thread Sixte
I just recently stumbled over a paper from Karl Crary: which aims to solve the “avoidance problem” aka “implicit abstraction” problem. Implicit abstractions occur, if a program does take advantage of a type that it doesn’t know about. The

How to import all identifiers from module

2022-01-11 Thread ElegantBeef
If one wants to add it in the docs they'd PR it [here](https://nim-lang.org/docs/manual.html#modules-import-statement)

How to import all identifiers from module

2022-01-11 Thread ynfle
That's for defining a const through the command line. This is not the same.

simple event system

2022-01-11 Thread sky_khan
No need for me but maybe others can give a fix / suggestion

simple event system

2022-01-11 Thread enthus1ast
I've patched it a little, to use const hashes and copy the api I previously had. Can post it later if you like, even if its slower I still consider useing it.

simple event system

2022-01-11 Thread sky_khan
IDK, You may encounter bugs if you make a class hierarchy from EventBase as @jyapayne said but I dont think it would be 2x slower if you change it as yours. I mean, I was lazy and used type name as keys instead of hash and used sequence as container for events. That must be the reason, I guess

simple event system

2022-01-11 Thread enthus1ast
Not only this, but its also quite slow I've benchmarked @sky_khan s system (I like it) but it's twice as slow than mine with pointers

Can I haz splat operator

2022-01-11 Thread bg
It's not hard to roll your own (which I know many have done). eg:

Additional Httpclient request methods

2022-01-11 Thread beshr
Thanks! I'll try to do that then.

Can I haz splat operator

2022-01-11 Thread adigitoleo
Just learned about `tupleLen` from `std/typetraits` which could make things a bit less clunky at the cost of a manual loop. However, I'm a bit tired so I can't work out how to fix this: import typetraits var t = (1, 2, 3) var a:array[tupleLen(t), int] for i in

Can I haz splat operator

2022-01-11 Thread adigitoleo
Yes, I noticed that it is only for tuples :( This is unfortunate. Performance considerations aside, concise unpacking seems like a very convenient thing to have. Maybe I'm still holding too tightly to my dynamic typing ways, but in Julia/Python I enjoy using small namedtuples and unpacking

Can I haz splat operator

2022-01-11 Thread SolitudeSF
i would advise using standalone version since fusion version isn't maintained and fusion itself is code graveyard.

Can I haz splat operator

2022-01-11 Thread Hlaaftana
There is a [module in fusion for pattern matching](https://nim-lang.github.io/fusion/src/fusion/matching.html). There have been efforts to move this to the standard library but it seems like the goal has been changed to have an implementation in the language itself as shown in the

Introducing taskpools, a small lightweight ARC/ORC threadpool

2022-01-11 Thread Araq
Awesome project, thanks for sharing! Nitpicking: The readability of let x = tp.spawn async_fib(n-1) let y = async_fib(n-2) Run is really bad though. Would following NEP1 improve it? let x = tp.spawn asyncFib(n-1) let y = asyncFib(n-2)

How to import all identifiers from module

2022-01-11 Thread adigitoleo
We should put it in the docs, it's static right? So it could go [here?](https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas)