Hey thanks.
I'll try to play around with the settings to get your code to compile when I
get some time.
On my System76 Gazelle laptop, with I7-6700HQ, 2.6-3.5GHz, 16GB ram, running in
a VB VM for Manjaro KDE, using Nim 0.17.0 compiled with: **$ nim c --cc:clang
--d:release ssozp5.nim**
I get
So, what I basically want to know is if what I wrote is valid and sound Nim
code.
It seems to work, though.
Thanks!
I searched for 'concept' but it failed me - I even looked at the section you
linked to, but managed to overlook the (prominent) section on concepts ;p
Yes, even though I am a programmer - and thus prone to overthinking - I guess
I'd get the basics down before moving on to unchartered te
> I guess I can't find them because they are unstable, right?
They're in the [language
manual](https://nim-lang.org/docs/manual.html#generics-type-classes), right
after `type classes`, as they used to be known as "user defined type classes".
Beware that some
[parts](https://nim-lang.org/docs/m
> Generally Nim's docs = [..] concise and legible.
Exactly. And one of the main reasons why I have decided to prefer Nim
You probably need to specify a path while importing. For example, running from
./bin "prime_bench.nim" file:
from ../src/lib/lib_euler_primes import primeSieve
from os import commandLineParams
from strutils import parseUInt
let arguments = commandLineParams()
Generally Nim's docs = Nim's manual, and generally to find an answer in it
takes seconds, it's concise and legible.
I tried the run your code but the compiler doesn't see the euler libraries.
eulerprimes.nim(24, 6) Error: cannot open 'lib_euler_math'
How do I get all the libraries to get it to run?
I'd be interested in benchmark times. Can you post your hardware specs and the
times for coun
Any good docs on concepts in Nim ?
I failed to find it in the tutorial - perhaps I should browse the manual as
well ?
You can also try concepts
I am very new to Nim, and am trying to port the libtcod tutorial written in
Python - here: [Complete Roguelike Tutorial, using
python+libtcod](http://www.roguebasin.com/index.php?title=Complete_Roguelike_Tutorial,_using_python%2Blibtcod)
\- to Nim.
For the most part, it is smooth sailing, but n
> Please note the biggest problem of inheritance-based interfaces: you cannot
> add one to a type already in existence when you define the interface
Certainly you cannot; that is the point - not interfaces state, what types
satisfy (implement) them, but the other way round, types state, what the
> two interfaces or concepts requiring a routine of the same name and arguments
> either have to share it
type
A = concept x
p x
B = concept x
q x
C = distinct int
D = distinct int
proc p(v: C) = discard
proc q(v: D) = discard
proc
This is an odd request
Yes, there are languages that _has support for audio read/write_ \- but the
point is that those languages has that support by means of packages/libraries -
that kind of functionality is never in the core language.
So, if Nim doesn't have it, I guess it's because Nim user
I see. Good to know I'm not the only one who would write it this way. I had had
some break from Nim language and I was pretty excited to use heap-allocated
containers in compile-time contexts, especially for moving data between
compile-time and runtime. Sadly, I found these features quite faulty
I tried use NimNode for that sketch initially. ׃)
[https://github.com/nim-lang/Nim/issues/6313](https://github.com/nim-lang/Nim/issues/6313)
@LeuGim It seems to me you made a type factory, actually. That's not something
I would like to see, actually. Especially considering the fact I can't add
concepts to types already in existence which is, by far, the greatest advantage
of concepts over inheritance/interfaces.
I tried something li
@Araq What Nim version? It fails with "object constructor needs an object type"
on my fresh-downloaded Nim 1.17.0...
By the way, it is counter-intuitive, I guess. It wouldn't be so if the syntax
was available for any type, e.g. arrays. It's a bit misleading as casts can
look a bit similar to co
I did a lot of video processing in the past.
What you want is a frameserver like
[Avisynth](http://avisynth.nl/index.php/First_script) (Windows-only,
multithreading an afterthought, custom scripting language) or
[Vapoursynth](http://www.vapoursynth.com/doc/gettingstarted.html#example-script)
(
Hey, welcome to Nim,
If you like learning with mathematical challenges, I started Nim and many other
languages with Project Euler, which gives you small mathematical challenges for
your programming languages craving.
[https://projecteuler.net](https://projecteuler.net)/
Here are my [solutions
Well, for me the BEST "interfaces" would be explicit, namespaced concepts,
actually (hello, Rust!). Please note the biggest problem of inheritance-based
interfaces: you cannot add one to a type already in existence when you define
the interface. Also, both interfaces and Nim's concepts are, let'
Excellent, thanks. That's all I need is a variable for the key. I'd never
looked into tables.
Hi Nim'ers
I was introduced to Pascal in 1986 in high school, and it was my first
language, not counting the very few lines of Commodore Basic I had under my
programming belt before that.
Then, a long pause, and I got into programming again in 1997. This time Visual
Basic, very quickly follow
23 matches
Mail list logo