I know atleast three people who rage quit advent of code this year because of
day 15. Day 16 was a lot of fun and I'm currently finding time to work on day
17 but I still have nightmares about goblins and elves :(
Talking about killer app or general pattern, I think this recent article is
interesting:
[https://chameth.com/2018/12/09/over-the-top-optimisations-in-nim](https://chameth.com/2018/12/09/over-the-top-optimisations-in-nim)/
* Prototype quickly in a clean high level language - already faster tha
> Do you think that Nim will have a future ?
Definitely. It is open source and liked by thousands of programmers (most of
whom are waiting for it to stabilize and mature). No matter what happens, there
will be some people interested in developing Nim.
As I recently posted, [Nim's package ecosys
It's not about Nim and Rust but about expectation for keywords like let and var
which are used in plenty of other languages (C#, Ocaml, Javascript, Swift,
Julia, ...)
This is the common sense in design I've come to expect.
This may come off as blunt, but if someone wants nim to be rust, they should
just go use rust. Use what works for you.
This works
type
SNodeAny = ref object of RootObj
SNode[T] = ref object of SNodeAny
DNode[T] = ref object
method newDNode(s: SNodeAny) {.base.} =
echo "newDNode base"
method newDNode[T](s: SNode[T]) =
echo "newDNode generic"
meth
Thanks for explaining.
I'll leave this thread and continue discussion in the github issue.
@zevv please report this issue on github.
https://github.com/nim-lang/Nim/issues/10038
> ...may I push this idea again ? :)
You may and I'm hearing you but in the longer run `ref` usage should be
discouraged and then the problem disappears too. And solving problems by
avoiding some language features is much more elegant than yet-another-feature
IMHO.
Pointers are like `goto`, to
> let s = SNodeAny(SNode[float]())
>
> newDNode(s)
s is SNodeAny, is it given? ;/
@mratsim's post should be helpful in this case
[https://forum.nim-lang.org/t/4415#27607](https://forum.nim-lang.org/t/4415#27607)
I think it's because generic is compile-time while what you wanted is in
runtime.
1 year later, I'm still worried about that missed opportunity of stronger
immutability guarantees in Nim.
The whole distinction between var and let feels useless without this. When
looking at a proc signature, I have no way to know if its parameters will be
modified, unless they are value-types
I've been hunting strange behaviour in my code base which I have reduced to the
following snippet.
type
SNodeAny = ref object of RootObj
SNode[T] = ref object of SNodeAny
DNode[T] = ref object
method getStr(s: SNode[float]): string {.base.} = "blahblah"
I am sure theres more on Twitch.
This would be nice as a Nimble module.
Thanks! Indeed, that's tricky a lot 😂
I'd really like to ask this question: what does popularity have to do with
success and future?
Nim has been around for 13 years and is actively developed. It is useful and
productive and the community is helpful. Stability releases are being actively
worked (v0.19.2) and point releases have bee
As long the language and the idea is persisting, it will eventually become
(almost) everyone favorite.
Look Python for example, or Smalltalk and/or Lisp-families that always be
"smart guys" secret weapon.
Nice lists! Maybe there could be a videos section on the Nim website with links
to videos? Could be a page linked from here:
[https://nim-lang.org/documentation.html](https://nim-lang.org/documentation.html)
Is it possible without using custom macros, to get the type of a proc argument?
proc inc(a: int): int = a + 1
template typeArg(p): type = ???
# typeArg(inc) = int
Run
Hello Ar,
I like the pseudo lol
Indeed, I am slow to stability and see later but I really cross the fingers for
this language is successful.
It needs a bit of luck. It cannot compete against the great ones, do not ever
expect nim to become as popular as C#, javascript or python. But once some
important project using nim is announced, nim will receive more visibility.
This is right now hard as it is not common for important projects t
Hello,
In an app I am writing I am getting the following error. This is occurring
inside code which when encountering an exception will sleep(100) and retry.
After 10 retries (1 second) it will close the client and create a newHttpClient.
Rather than catching this exception the app just stops,
Hello the Nims ^^
A friend told me about the language to which he also bought the book and
convinced me of the language, however I remain skeptical on certain points.
1. Do you think that Nim will have a future ?
2. How to make this beautiful language more recognized so that they take more
Hi,
I came accross a real problem that always forces me to cast my values. I coded
my raw socket library with epoll, using available nim libraries (pure and
posix).
Coding in assembly as well, I tend to use uint32 for performance reasons
(uint16_t and uint64_t tend to be slower than uint32_t o
Hi!
It's a little bit tricky :)
macro parseSwagger*(iApi: untyped, fn: string): untyped {.gensym.} =
var
inputJsonStr = slurp($fn).multiReplace([($'\n', ""), ($'\r', ""),
($'\c', ""), ($'\t', "")])
parseJsnMcr = ident(nskMacro.genSym("parseJsn").repr)
p
It would be nice to have either in the standard library, and also to make more
use of options instead of returning -1 or exceptions, even sometimes using
[cheap
replacements](https://nim-lang.org/docs/channels.html#tryRecv%2CChannel%5BTMsg%5D).
27 matches
Mail list logo