[https://narimiran.github.io/nim-basics](https://narimiran.github.io/nim-basics)/
Does anyone know of beginner Nim tutorials… or knows how to use it and could
create some? All of the tutorials I have seen assume that you’re coming over
from another language and thus don’t need certain concepts explained. Also
example code that looks like it wouldn’t work on its own
I've been looking at using nim to create extension modules for python. I would
typically do this using cython and C/C++ with the workflow: Write in python ->
profile -> re-write slow functions in cython -> compile to shared object (via
c). Using the nimpy lib, I've been doing essentially the
Here are the the commands I ran on my Ubuntu 18.04:
$ sudo snap install nim-lang nim-lang-docs
$ mkdir hello-nim
$ cd hello-nim
$ nim-lang.nimble init
(chose binary and c)
$ nim-lang.nimble run .
Error: Could not read package info file in
Here is my repo. Solving in nim and then doing some in Elixir as well
[https://github.com/tradfursten/advent_of_code_2019](https://github.com/tradfursten/advent_of_code_2019)
Recently discovered this site: [https://nim-cn.com](https://nim-cn.com) which
appears to be a translated version of the main page. As for a forum I don't
think there is anything like that, but as others have said it is possible to
use this open source forum and just set up a new version.
For web framework using Jester + Karax is a fairly solid combination. Or if you
don't want a single page application then Jester + your web DSL of choice.
Looks like nimble is out of date. I would try to update nimble or nim tools in
general
They seem to be unstable and untrustworthy.
You can bundle different C codes via `niminst` but I'm not sure how useful that
is for Python interop. But please keep me in the loop, it's definitely a
usecase we seek to support well.
Hi all,
Env-s are allocated on heap by `newObj`. Is it possible to put them on stack?
There are some cons, such as closure can't live out of a function's scope. But,
in the case of truly embedded systems with only several KiB RAM with
`-gc:regions`, env-s on stack is good enough, ^_^
The Nim book is also really nice. If you are just starting, ignore Pointers and
MetaProgramming for now, practice basic constructs, thats like making a Python
"Hello World" using CTypes. ;P
3 people at least managed to ship Nim libraries on Conda:
*
[https://github.com/fragcolor-xyz/nimtorch/tree/master/conda/nimtorch](https://github.com/fragcolor-xyz/nimtorch/tree/master/conda/nimtorch)
*
I also require more ways to manipulate closures or being able to implement my
own from macros.
This would allow me to emulate the OpenMP API or the `parallel` API in my
multithreading runtime.
I still have to explore the liftLocal pragma or the `owner` macro though
There is only a single unstable test case as far as I can tell that keeps
triggering. We already increased the involved timeout, not sure if that solves
it for good or not. If not, we can disable the test.
Thanks I can't get enough of tutorials.
[https://github.com/yglukhov/nimpy/wiki#publish-to-pypi](https://github.com/yglukhov/nimpy/wiki#publish-to-pypi)
I use Docker for Windows on Windows, and most people seems to be using Docker
anyways, for other OS, both languages have a construct named `if` that can be
used to branch the build.
I agree. Both are awesome tools. But I am talking about a full stack web
framework. Something that attract more people in the Nim community because is a
huge market.
I agree. Both are awesome tools. But I am talking about a full stack framework.
Something that attract more people in the Nim community because is a huge
market.
This is to bring you up to date with the Nim tutorial that the Della-Vos group
is writing. Vernon started working on Kaushal Modi's notes. These notes are
very instructive and cover very basic material, which could be quite helpful
for beginners. Therefore, we decided to place Kaushal Modi's
Yes. Also, assets, project creation, scaffolding, and all the things make it
newbie-friendly but also enough powerfull for advance users.
isent it better to have have components then all boundled together
It has project creation/scaffolding `nimwc --initplugin`. Frontend, NimF or
Karax is recommended, but it is JavaScript framework Agnostic. Plugins,
Components, same stuff, you can bundle all assets, files, folders together.
Thank you for your time and the detailed explanation , now i understand and it
works across many physical cores.
Because i have to write data into a single file the lines are now mixed up, i
think i need channels (?) to solve this, i will read how that works try it out
and ask again if i have
Well what do you consider "full stack"? A database layer and authentification?
The issue is that to write to a file, you basically need to serialize the
writes. Multithreading will only help you for compute tasks that are CPU-bound.
Writing to disk is very very very **very** slow, even a SSD, to give you an
idea:
>From [What every programmer should know about
Relatively new to nim but decided to have fun learning with this year's AoC
(and practicing on previous years' for speed). This is probably filled with
non-idiomatic and misc. bad practices.
[https://github.com/Kaynato/AdventOfCode](https://github.com/Kaynato/AdventOfCode)
1. Did you ask Kaushal Modi if this was okay?
2. Why don't Vernon / other authors post about these updates themselves and
why do multiple authors post messages through this single account?
3. Is Chapter 11 ever going to become something coherent / relevant, or is
explaining to the Nim
Hm yes that makes sense.
The input fie contains a URL per line which has to be checked and the result
should be written into a file. Because this depends on Network latency i
thought it would speed up the program if i spawn many connections ~300-400
concurrently. But maybe i'm mistaken.
beh evil is overated, anyway i would help you if i know how, i newer writed a
trojan but if converting python to nim guess it isent uber complicated
Nim is a compiled language, this means when you access a field the regular way
the constant relative memory location of an object field has to be known at
compile time, which in turn forbids these things.
While it is possible to associate this offset with strings, either yourself
(offsetof is
I'm trying to write a template to set a value to an object's field, at run
time, where the field name and the value are passed to the template as strings.
The code below illustrates what I'm trying to do. Is there a way to accomplish
this? i.e. is there some equivalent of my hypothetical
One possible implimentation with fieldPairs:
import std/strutils
from std/macros import expandMacros
type Foo = object
ival: int
fval: float
proc setField[T: int](val: var T, str: string) =
val = parseInt(str)
proc setField[T:
This is my first post - and I confess I've not used Nim -- but I LIKE what I
see: it looks like Python. And I'm aware of the benchmarks showing run speed
incredibly close to C. What stops me from getting really excited is that there
doesn't appear to be good GUI support, nor any clearly
I want to put forward a suggestion of maybe NIM support for Godot and Blender.
Both are open source and Blender especially now since 2.8 have jumped in
potential. Godot is improving by a lot and many people are moving from Unreal
and Unity to it. The only problem its got is it is slow which I
Was wondering if anybody got NIM to work with Sublime text 3? It is the editor
I am using and I enjoy it quite a bit I can't seem to get NIM to work. I
installed a package for NIM but it doesn't seem to be updated for a year.
Godot already has Nim support via GDNative. If you want Nim support for
Blender, it would be better to suggest it to the Blender folks. Or you could
add it yourself.
37 matches
Mail list logo