Hello guys am trying to install nim on android for fun as per this tutorial
[http://stisa.space/articles/compile-nim-on-android](http://stisa.space/articles/compile-nim-on-android)/
but am getting an error **undefined reference to sigtimedwait** it seems that
the **signal.h** in termux does not
Is there something that can auto format / pretty nim source code?
I am looking for some thing like go format or clang-format. I basically don't
want to have formatting discussions ever again. An auto mated tool should just
do it all. I don't even want configuration options, just that it should l
> If anyone wants to debug this, let me know. I can put together a full
> test-case (via my corporate cloud server). I have 3 test-cases: 75k, 1.4M,
> and 800M. This crash happens only on the largest, but at least it happens
> pretty quickly.
Sure, give me something I can work with.
Besides, you can see in the _gdb_ session that the seg-fault is from
dereferencing `0x10101010`, which is apparently some kind of sentinel, not a
real address.
I don't think OOM is the problem. I watch the process in _top_. The machine has
96GB. The program crashes after 1 to 5 threads have run, and each thread uses <
1GB. In fact, when I use the full 48-thread threadpool, it takes 30 minutes to
run out of real memory (because of fragmentation), while
should have done it a lot earlier
Hi,
In the template I am trying to evaluate the boolean expression that is defined
in terms tuple variable names. With one variable it is clear, we have a number
of examples in the standard library: mapIt, allIt, filterIt and etc. But I am
struggling to extend this approach for multiple variabl
One thing to keep in mind is that Linux and OSX turn out-of-memory into
segfaults thanks to the memory overcommitment.
that is correct. yet
template foo(p: untyped): auto = (block:
1
)
let x = foo:
discard
won't compile, while this will
let x = (block:
1
)
in fact, this compiles as well:
template foo(p: untyped): auto
Nice. Very cool to see my old baby pas2nim receive some love.
For anybody who is interested in converting object pascal to nim, I have
created a fork of pas2nim
[https://github.com/AdrianV/pas2nim](https://github.com/AdrianV/pas2nim) which
parses and converts a big amount of object pascal code:
* class is converted to ref object
* class, object and re
I suppose that the manual should have a more technical explanation of how
object variants work (as it is meant to become the spec, right?) and then the
Tutorial should have an example or two with more user friendly explanation.
I also just noticed a typo which is that it says "As can been seen" when it
should be "As can be seen".
Here's what I'm proposing for those two sentences:
> As can be seen from the example, another advantage to this approach is that
> no conversion between different object types is needed (as w
>From example, if you think that's returning something it's indeed returning
>exactly `not (a == b)` but not returning a `bool` value. It's only be `bool`
>after evaluated in runtime.
Ah, yes, after you mentioned it's indeed confusing. The example given is object
variant but in explanation it's written as object hierarchy.
I think the intended meaning is there's no need to create a whole object isa
but instead opting to object variant is clearer. Also it can throw an error if
Maybe there is still a bug in Thread? I now use threads in a very simple way:
for q in get_seq_data(config, min_n_read, min_len_aln):
var (seqs, seed_id) = q
log("len(seqs)=", $len(seqs), ", seed_id=", seed_id)
var cargs: ConsensusArgs = (inseqs: seqs, seed_id:
You may read it that way, but in that case you are essentially auto-correcting
the error in your head, because that has the exact opposite meaning of what's
written.
I just wanted to confirm the intended meaning from the author if possible.
Thanks hcorion, I went and got the latest version of Source Code Pro fonts and
installed them on my system, and indeed the problem went away. So that's great
for me, but others will likely have this same problem and not know what to do.
TBH, I'm not sure how the Source Code Pro fonts ended up on
@cheatfate, Wonderful! Not just a new feature, but also a fix for a dangerous
bug.
Independent of that, I have found that create/destroy of threads is very fast
(on OSX). So araq's idea of relying of thread destruction for fast memory
clean-up works beautifully.
(Large memory allocation is sti
@Stefan_Salewski, you can also just call the libc memchr (which is what the
current memfiles does to delimit lines aka slices until string conversion). A
good memchr will do the SSE/AVX internally. For example this program:
import memfiles, os, times
var f = memfiles.open(param
@cdunn2001, you are correct. If you saw my PR, then you have seen issue it
fixes
[https://github.com/nim-lang/Nim/issues/4719](https://github.com/nim-lang/Nim/issues/4719).
@cheatfate, Interesting, and good timing.
What about this bit of **test/threads/treusetvar.nim** for your new code:
+for i in 0..(ThreadsCount - 1):
+ var thread: Thread[Marker]
+ createThread(thread, worker, p)
+ joinThread(thread)
+echo p.counter
Shouldn't
@Jehan, reusing is now possible, but if you reuse variable, you must not use
joinThread(s), because it will join only last created thread for this variable.
23 matches
Mail list logo