Re: Can the nim compiler run in the browser? Experimenting Nim to template web pages

2020-06-09 Thread mitai
really interesting! Is there a TODO list on which i can help?


Re: Nim programming book for kids

2020-04-08 Thread mitai
Awesome!


Re: 1.0.0 is here

2019-09-23 Thread mitai
Congratulations to the devel team! 


Re: nimble is not installing nimongo

2019-07-25 Thread mitai
I also had problems with manjaro package. I prefer now to install from github, 
it works better


Re: An Attempt to Access NumPy Array Data rom Nim

2019-01-29 Thread mitai
there is also: 
[https://github.com/mratsim/Arraymancer](https://github.com/mratsim/Arraymancer)


Re: Should we get rid of style insensitivity?

2018-11-19 Thread mitai
I don't want a vote. It's a great feature that already saved me many hours of 
unproductive discussion. There are more pressing topics to focus on to v1.0


Re: collections of procs[T]()

2018-09-29 Thread mitai
Thank you!

this does work:

> 
> type
>   Data*[T] = object
> contents: T
> subscribers: seq[proc(d: T)]
> 
> proc createData*[T](t: typedesc[T], c: T): Data[T] =
>   result = Data[T]()
>   result.contents = c
>   result.subscribers = @[]
> 
> proc addSubscriber*[T](d: var Data[T], cb: proc(d:T)) =
>   d.subscribers.add(cb)
> 
> proc callSubscribers[T](d: T) =
>   for n in d.subscribers:
> n(d.contents)
> 
> var dd = createData(string, "data")
> proc print[T](d: T) =
>   echo $d
> 
> dd.addSubscriber(print)
> 
> dd.callSubscribers()
> 
> 
> Run


Re: collections of procs[T]()

2018-09-29 Thread mitai
Thankyou for your reply @mratsim

I tried the following:


type
Data*[T] = object
  id: string
  contents: T
  subscribers: seq[proc(d: T)]
  
  
  proc addSubscriber*[T](d: T, cb: proc(d:T)) =
d.subscribers.add(cb)
  
  proc callSubscribers[T](d: T) =
for cb in d.subscribers:
  cb(d.contents)
  
  var dd = Data[string]()
  dd.contents = "a content"
  dd.id = "1"
  dd.subscribers = newseq[proc(d: string)]()
  dd.addSubscriber(proc(d: string) = echo $d)
  
  dd.callSubscribers()



Run

> but I get this error:


  testproc.nim(19, 3) Error: type mismatch: got 
  but expected one of:
  proc addSubscriber[T](d: T; cb: proc (d: T))
first type mismatch at position: 2
required type: proc (d: T){.closure.}
but expression 'proc (d: string) = echo [$d]' is of type: proc (d: 
string){.gcsafe, locks: 0.}
  
  expression: addSubscriber(dd, proc (d: string) = echo [$d])


Run

it seems I'm missing something


collections of procs[T]()

2018-09-28 Thread mitai
is there a way to have a collection (seq or better: Tables) of procs with 
generic types? 


Re: Version 0.19.0 is out

2018-09-27 Thread mitai
Great job!


link broken from standard library documentation page

2018-03-08 Thread mitai
fs monitor:

[https://nim-lang.org/docs/fsmonitor.html](https://nim-lang.org/docs/fsmonitor.html)


Re: tools documentation link is broken

2018-03-06 Thread mitai
in the same page, backend integration link is broken

[https://nim-lang.org/docs/backends.html](https://nim-lang.org/docs/backends.html)

All other links seems to work


tools documentation link is broken

2018-03-05 Thread mitai
from documentation page: 
[https://nim-lang.org/documentation.html](https://nim-lang.org/documentation.html)

Tools Documentation 
[https://nim-lang.org/docs/tools.html](https://nim-lang.org/docs/tools.html)

is broken


Re: Hiring Nim Devs for Ethereum Implementation

2017-12-23 Thread mitai
Is there a repository of this project where I can start contributing?


Re: Version 0.17.0 released!

2017-05-18 Thread mitai
Congratulations!