Re: Nim lang for beginners?

2019-12-03 Thread SolitudeSF
[https://narimiran.github.io/nim-basics](https://narimiran.github.io/nim-basics)/

Nim lang for beginners?

2019-12-03 Thread WhiteleeMartinze
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

Nim extension libs for python

2019-12-03 Thread Jonesmartinze
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

Error running nim hello world from snap installation

2019-12-03 Thread fabian20ro
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

Re: Advent of Nim 2019 megathread

2019-12-03 Thread tradfursten
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)

Re: How to Maintain a Nim Chinese Community

2019-12-03 Thread PMunch
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.

Re: Nim is the friendliest language to start

2019-12-03 Thread PMunch
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.

Re: Error running nim hello world from snap installation

2019-12-03 Thread enthus1ast
Looks like nimble is out of date. I would try to update nimble or nim tools in general

What's wrong with pull requests auto checks?

2019-12-03 Thread foldl
They seem to be unstable and untrustworthy.

Re: Nim extension libs for python

2019-12-03 Thread Araq
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.

[C backend] Environment of closure on stack

2019-12-03 Thread foldl
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, ^_^

Re: Nim lang for beginners?

2019-12-03 Thread juancarlospaco
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

Re: Nim extension libs for python

2019-12-03 Thread mratsim
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) *

Re: [C backend] Environment of closure on stack

2019-12-03 Thread mratsim
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

Re: What's wrong with pull requests auto checks?

2019-12-03 Thread Araq
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.

Re: Nim tutorial -- Kaushal Modi's notes

2019-12-03 Thread Lecale
Thanks I can't get enough of tutorials.

Re: Nim extension libs for python

2019-12-03 Thread juancarlospaco
[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.

Re: Nim is the friendliest language to start

2019-12-03 Thread Willyboar
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.

Re: Nim is the friendliest language to start

2019-12-03 Thread Willyboar
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.

Nim tutorial -- Kaushal Modi's notes

2019-12-03 Thread edu500ac
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

Re: Nim is the friendliest language to start

2019-12-03 Thread Willyboar
Yes. Also, assets, project creation, scaffolding, and all the things make it newbie-friendly but also enough powerfull for advance users.

Re: Nim is the friendliest language to start

2019-12-03 Thread kodkuce
isent it better to have have components then all boundled together

Re: Nim is the friendliest language to start

2019-12-03 Thread juancarlospaco
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.

Re: Question about multithreaded use of filestream.readLine() function

2019-12-03 Thread forcefaction
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

Re: Nim is the friendliest language to start

2019-12-03 Thread Araq
Well what do you consider "full stack"? A database layer and authentification?

Re: Question about multithreaded use of filestream.readLine() function

2019-12-03 Thread mratsim
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

Re: Advent of Nim 2019 megathread

2019-12-03 Thread Kaynato
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)

Re: Nim tutorial -- Kaushal Modi's notes

2019-12-03 Thread carterza
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

Re: Question about multithreaded use of filestream.readLine() function

2019-12-03 Thread forcefaction
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.

Re: How to create a trojan and reverse shell with NIM

2019-12-03 Thread kodkuce
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

Re: Set object field from strings at run time?

2019-12-03 Thread doofenstein
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

Set object field from strings at run time?

2019-12-03 Thread pmags
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

Re: Set object field from strings at run time?

2019-12-03 Thread jasper
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:

Any possibility of a near term Lazarus/C#-like GUI-designer IDE?

2019-12-03 Thread stph
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

Godot and Blender

2019-12-03 Thread Hendrik
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

Sublime Text 3 support

2019-12-03 Thread Hendrik
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.

Re: Godot and Blender

2019-12-03 Thread carterza
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.