Please stop spreading these wrong and unfriendly remarks!
> but there isn't any uptodate gtk3 bindings as far as I am concerned.
You did it already in
[https://forum.nim-lang.org/t/5657#35169](https://forum.nim-lang.org/t/5657#35169)
> Same pattern goes for gtk3. The only upto date gtk binding
Note that there are many tutorials available, the "Nim Days" is already
advanced and for special topics. See
[https://nim-lang.org/learn.html](https://nim-lang.org/learn.html). The
official Tutorial part 1 and 2 are a good start.
For your first question: Some people coming from Python have not
Recently, Kate has announced their support for language servers. Which means if
in future, there's any language server for Nim, Kate can offer some basic IDE
features.
Recently, Qt has decided that they will offer their open-sourced libraries only
if you have a Qt account. Furthermore their LTS versions are officially behind
a paywall.
[https://www.qt.io/blog/qt-offering-changes-2020](https://www.qt.io/blog/qt-offering-changes-2020)
I hope to start using the
Who's Nim? Your Korean girl friend?
You can get very far with Nim. It's a programmable programming language.
Hi all, I am very happy to have known this language and I have really loved to
think that I have been learning about Nim for 1 month and a half. My favorite
language was really C # but right now I am in a few moments that I just want to
use Nim Syntax Legible, Clear and Comfortable. I am sure
First off, I'm still getting my head wrapped around the language. I was
considering Rust when Nim caught my attention for a few basic reasons:
1. It compiles to C, so it's not interpreted.
2. It's safer than C and _seems_ comparable to Rust in terms of type safety
and concurrence but
\--d:danger just does all of the possible optimizations.|
---|---
I use --threads:on and when compileOption("threads"): to include or not include
threadpool. See line 3:
[https://play.nim-lang.org/#ix=2bFk](https://play.nim-lang.org/#ix=2bFk)
T and S in square brackets are generic types. You should read `Nim in Action`.
Very nicely written book on Nim.
[https://book.picheta.me](https://book.picheta.me)
Your are right about randomness. I tried this out yesterday and it had a huge
impact on the second output. So I commented it out. But overall same
performance problem. Will try out your other suggestions tomorrow or so. Thank
you.
One quick question: with the danger option you can compile
Awesome. Thanks for your answer!
* I can increase `numDrawings` as I want. It's only getting worse.
* There are no writes. The return values from each thread are just collected
at the end. The return values are very small.
* Every thread is independent of the other. There should be no blocking at
all.
I don't think threads run slower in my case.
I changed your program slightly to support threads and non threads:
[https://play.nim-lang.org/#ix=2bFk](https://play.nim-lang.org/#ix=2bFk)
nim c -d:release -d:danger --threads:on "/p/tmp/prisoners.nim"
time ./prisoners
Succs:
Day 6 of my journey through Nim. I woke up refreshed and eager to understand
the parsecsv module.
Very quickly I got to the point where I wanted to obtain the index position for
a particular value in a sequence. A quick search led me to Stack Overflow
I think your problem might come from:
* trying to do too little work per thread - so thread stuff eats up all the
time.
* trying to write same cache line from multiple threads.
* too much blocking
Its [0 ..< 5]
You want slicing:
[https://narimiran.github.io/nim-basics/#_indexing_and_slicing](https://narimiran.github.io/nim-basics/#_indexing_and_slicing)
See here:
[https://play.nim-lang.org/#ix=2bFa](https://play.nim-lang.org/#ix=2bFa)
Being new to Nim I'm missing basic list/sequence functions like e.g. take.
var lst = @[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
for n in lst.take(5)
echo n
# 1
# 2
# 3
# 4
# 5
Run
I would also assume that there would be an iterator but I couldn't
Just trying to learn Nim by going through the problems on "Rosetta Code". I
wrote a Nim version for the "100 Prisonsers" problem -
[http://rosettacode.org/wiki/100_prisoners#Nim](http://rosettacode.org/wiki/100_prisoners#Nim)
\- and wanted to speed up things by going multi-core. Unfortunately
You shouldn't run it with bash, you should just run it like ./hello after doing
chmod +x hello on the resulting macOS machine
Thank you everyone! Great, I have a virtual box up with latest UBUNTU desktop
installed. Managed to compile easy to Linux (ubuntu) no issues Also , managed
to use mingw-w64 to compile an exe for windows Now, still playing with a way to
compile to MacOS - I got a binary file compiled but cannot
Thank you everyone! Great, I have a virtual box up with latest UBUNTU desktop
installed. Managed to compile easy to Linux (ubuntu) no issues Also , managed
to use mingw-w64 to compile an exe for windows Now, still playing with a way to
compile to MacOS - I got a binary file compiled but cannot
Thank you everyone! Great, I have a virtual box up with latest UBUNTU desktop
installed. Managed to compile easy to Linux (ubuntu) no issues Also , managed
to use mingw-w64 to compile an exe for windows Now, still playing with a way to
compile to MacOS - I got a binary file compiled but cannot
Thanks. I missed that equal case.
I think you just need `hi >= lo` instead of just `>` (the Java code you posted
has that). You should also be told that this is in the Nim stdlib as
`algorithm.binarySearch`, although it does use the simpler -1 return to signal
"not found" rather than `Option[T]` stuff.
Hi, my question is not specific to Nim but I'm asking it here because I'm using
it :)
I am debugging a simple iterative binary search but it seems to fail my test.
Here's my impl:
import options
proc index_of*[T](list: openArray[T]; key: T): Option[int] =
var
Shameless plug: This can help updating the naming style:
[https://github.com/FedericoCeratto/nimfmt](https://github.com/FedericoCeratto/nimfmt)
Oh I'm aware there is a tradeoff here and everybody's time is finite. I only
tried to get the point across **why** some people, me included, prefer code
that uses Nim's naming conventions.
Well, right, but... Look, there are 90+ examples provided for original raylib,
yet almost none of them was converted to Nim. I started translating some more
basic stuff today and I'm completely, absolutely, positively against additional
procname fixing.
Samples conversion is already errartic
28 matches
Mail list logo