It is a strange thing to be told that to understand something in Nim you first
have to go and understand it in another language. The prevalence of the `ref`
issue is a clear indication that the existing didactic material is insufficient.
Nice !
I wrote this just for myself and never ever expected to make it public! I will
modify the code as suggested and try to make a PR, having never done so before.
(I am just an amateur programmer)
I would like to offer the following code ,which I modified from a previous post
a few years ago my apologies to the original poster). This is far from elegant
or efficient, but it does the job.
import terminal
type Cursor* = tuple[x,y: int] # for the getcursorpos procedure
var cursor*: Cursor
Thanks, this is much appreciated. I am starting to get it now
Thank you for your comments. I have just read Harper and it helps in
understanding the theoretical side of the matter. But I still don't know what
static type I should use to replace strings (pre-defined arrays of characters
?). I have Sedwick (Pascal examples) and will re-consult it but only af
"As your programs grow bigger, avoid the string datatype. string indicates a
lack of structure, it's effectively dynamically typed code. Use the static type
system to the best of your abilities."
Another example of a simple sentence that, as an amateur (beginner) programmer
will have me scratch
Or you can simply calculate the difference in their Julian day numbers.
All is well now. Thank you
After updating choosenim I tried 'choosenim update stable' and got the
following message;
Error: unhandled exception: SSL support is not available. Cannot connect over
SSL. Compile with -d:ssl to enable. [HttpRequestError]
Indeed, word meanings depend on the contexts.
But why do you define it as a func rather than a proc? Is there some spatial or
chronometric advantage or is it just a personal preference? I am new to Nim and
I just want to better understand the difference between the two.
My mathematical bent cringes at the notion of a function that does not return
anything. Why not define it as a proc ?
12 matches
Mail list logo