There is a problem similar to a problem python has with floating point. So, it is kind of a cool language, I like the ideas. It is like Pascal, yet also C and Python. It is refreshng and you take a swig of coffee. This day, well I think there is alot to admire about Nim. But, working with dynamic arrays. While I agree about the fine prints, I think it is helpful and not a bug but just a strange problem in why Nim and Python both interpret that algorithm the same way.
What "strange problem" or "that algorithm" are you referring to?
What?!
Well, it is a very interesting language. Oh, well I am studying an algorithm, the ADALINE. It is an elementary artificial neural network. Now, I just am wondering, why the algorithm behaves deterministic in C and Pascal. Yet, when I code it in Python and NIm, it is non-deterministic. I think Nim is cool though, but I am not really sure what it is. It is like Pascal, and Python. Yet, what in the world is it doing? Arrays, they are not really encouraged in the documents. There is only scarce knowledge of seq and why, can I not translate an array I typed like a list [[1,2],[3,4]] to my seq[TYPE]. This is a pretty intense language, so I am only just doing elementary algorithm, without any kind of macro or any of the strange things I have seen the manual hint at, with no idea what at this time it even means.
I know nothing about Nim. I wanted to try it, and see. But, it is very different than C and Pascal for sure. Only, it reminds you of them. But that's it. So, I have no idea what I am doing wrong. But Python, this should work for sure. I know python enough, to shoot myself in the foot. But Nim, well, I am just tying to find documents on the way the language works with seq and how use it.
So the problem I have, is not if it works or doesn't work. It works fine in C and Pascal. yet, that is not accepted way to do it properly in python or nim. Both are strangely similar somehow, yet different. IT is the weirdest language ever so I will just follow it, you can dismiss this I use the wrong channel to address the problem I had.
is this a bot?
Looking into the commit history it seems like a neural network bot trained to create:
I am not a bot. I have discovered the problem. It has something to do with initializing the weights randomly. If you are interested, the codes are in my repo. When I fix the weights to 1.0 in python and Nim, it works. If for some reason, I randomly initialize them, it exhibits unusual non-deterministic behavior at runtime, with weights sometimes exploding. Now, my Nim program is very much a translation from Pascal to Nim, I am learning Nim. I think it is a good language, and I am studying computer science.
Hi @algorithmLOGIC, and welcome to nim, can you provide an example of the problem you are describing? That would help us understand what you mean and help, also the forum is better place to help new users, you might want to try that next time.
@mratsim when you have a hammer, everything looks like a nail :P
Most helpful comment
What?!