Re: Nim should be your language of choice for IoT

2020-06-21 Thread dponyatov
Portability and speed are not enough, I added some requirements here: 
[https://github.com/nim-lang/needed-libraries/issues/81](https://github.com/nim-lang/needed-libraries/issues/81)


Re: Can't install the bin tarball of nim 1.2.2.

2020-06-21 Thread shashlick
https://github.com/nim-lang/Nim/issues/14748


Re: Can't install the bin tarball of nim 1.2.2.

2020-06-21 Thread halloleo
Sorry for the lack of detail:

  * OS is RHEL7
  * Install process:

> 1. Tar ball downloaded from 
> [https://nim-lang.org/download/nim-1.2.2-linux_x64.tar.xz](https://nim-lang.org/download/nim-1.2.2-linux_x64.tar.xz).
> 2. Unpacked it.
> 3. Ran install.sh with directory /data/opt.





Re: On my first 'greet.nim' I get a C compiler error on RHEL 7

2020-06-21 Thread ZadaZorg
@halloleo you need to verify your installation. Kind of issue you have there 
and problems with building 1.2.2 you mention there and in other thread suggest, 
that something wrong with installation.

I'm suggest completely remove nim installed, verify there there no any 
artifacts left, ensure, that there no any outdated "system" nim versions.

Then follow steps in 
[https://nim-lang.org/install_unix.html](https://nim-lang.org/install_unix.html)
 and verify downloaded tarball with sha256 checksum.

Also, as an option, you may consider using of 
[https://github.com/dom96/choosenim](https://github.com/dom96/choosenim)

Hope this troubles will not prevent you from investigation of nim.

Good lack.


Re: Has anyone wrapped zlib or reimplemented deflate?

2020-06-21 Thread wltsmrz
This may be of interest 
[https://github.com/wltsmrz/nim_zstd](https://github.com/wltsmrz/nim_zstd)


Nim embedded inside Python

2020-06-21 Thread juancarlospaco
[https://github.com/juancarlospaco/nimscript4python#nimscript4python](https://github.com/juancarlospaco/nimscript4python#nimscript4python)

Done after the talk of Nim Conf 2020. 


Re: Can't install the bin tarball of nim 1.2.2.

2020-06-21 Thread shashlick
What method are you using to install? And which OS? 


Can't install the bin tarball of nim 1.2.2.

2020-06-21 Thread halloleo
I had tried to install the bin tarball of 1.2.2 but couldn't, because I got the 
error: 'nim-gdb missing'. The 1.2.0 tar ball worked though.

Hoeever I am asking this her beacuse it was recommended to to install 1.2.2 
instead of 1.2.0...


Re: Idea: Nim Online Conference

2020-06-21 Thread didlybom
I watched several of the talks and they were all great. I also saw a lot of 
discussion in hacker news which I think is also a very good sign.

Thanks a lot to all the presenters for taking the time to prepare these great 
talks!


Re: Idea: Nim Online Conference

2020-06-21 Thread miran
NimConf 2020 was streamed yesterday, and IMO it was a great success!

It was the first time for us doing such a thing, and it went quite smoothly. 
There are some details we would like to improve for NimConf 2021, for which we 
are hoping it will be even better — if you have a feedback about NimConf 2020, 
we would like to hear it!

We would like to thank all of our presenters for coming up with the interesting 
topics, recording the videos, and for answering all the questions that came up 
during the live chat with the audience.

Also thanks to all who participated as live audience! We hope you had fun 
watching the talks and interacting with the authors, and learned something new 
about Nim, its libraries and cool projects.

* * *

If you have missed any of the talks, the whole conference (15 talks!) is 
available for later watching in our [NimConf 2020 
playlist](https://www.youtube.com/playlist?list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx).


Re: Experimenting with a FreeRTOS OS Port

2020-06-21 Thread Araq
There is also [https://github.com/zevv/nimcsp](https://github.com/zevv/nimcsp) 
which is better suited for embedded development, it deserves more attention and 
development.


Re: Passing a sequence by reference to a data type

2020-06-21 Thread solo989
Use ref seq instead. shallow only works inside procs and not globally. Also 
it's meant for optimization only and shouldn't be relied upon to provide 
reference semantics since it may choose not to if it's more efficient not to. 
It really should only be used in the case where your copying from a var 
variable but don't plan to ever touch that var variable again so copying it by 
reference is harmless. Regardless it's probably a premature optimization in 
most cases.


Re: Passing a sequence by reference to a data type

2020-06-21 Thread Stefan_Salewski
Yes, SolitudeSF is right:


type
  lis = ref object of RootObj
v : ref seq[int]

var s : ref seq[int] = new seq[int]
s[] = @[1, 2, 3, 4, 5]
let list = lis()
list.v = s
echo list.v[]
s[].add(13)
echo list.v[]


Run

We have to call new explizit in this case. And I was a bit surprised that we 
need actually the subscript operator in the second last line, as often the 
dereference operation is not needed in Nim.


Re: Passing a sequence by reference to a data type

2020-06-21 Thread SolitudeSF

var s = new seq[int]


Run

this should work