It's certainly useful that entities can be exported. This way we can skip long
paths. However, what actually happens is JUST passing an entity for visibility.
No docs exporting, no module hiding. Which is quite weird for me.
Why I think submodules would be useful?
* better encapsulation
*
I work in HPC myself (mostly using Fortran). I liked your slides very much.
However I have a few a few questions. For now, I'll focus on the one that
puzzles me the most.
Am I misunderstanding the purpose of your ArrayObj type? It seems to me your
implementation of macro indexArray*(x:
overloading may be an option as well:
proc a(x:int) =
discard
proc a() =
discard
a()
a(1)
> Why isn't this obvious?
Blog didn't register with me as being what I was looking for.
For sake of completeness:
import options
proc xxx(param1: string, param2, param3 = none(int)) =
if param2.isSome:
echo "param2: ", param2.some
if param3.isSome:
echo "param3: ", param3.some
xxx("a", param2 = some(1))
xxx("b", param3 =
Actually there's no need for external libs or rolling your own solution. The
standard library has an `Option[T]` and is exactly suited for this.
> However, the new web site doesn't make that easy to do. The files sit in the
> webnews directory of the repository, but how you access them from the web
> site is a mystery to me.
You access them from the blog:
[https://nim-lang.org/blog.html](https://nim-lang.org/blog.html). Why isn't
this
proc p(x: int, xIsSet: bool) = ...
or smth like
type IntOrNil = object
x: int
isSet: bool
proc p(x: IntOrNil) = (if x.isSet: echo x.x else: #[ something else ]#
discard)
# additional procs may be added for such a type
proc `$`(x:
> better concept system from @zahary?
Yes, [docs](https://nim-lang.org/docs/manual.html#generics-concepts) (except
VTRef).
Thanks. I will have a look.
Changelog for 0.17.0
[https://nim-lang.org/blog/2017/05/17/version-0170-released.html](https://nim-lang.org/blog/2017/05/17/version-0170-released.html)
In home page of the web, there's section for featured project like Karax (a
Single Page Application framework), and zengine (game framework).
You should be able to look at the **release notes** from the past releases.
However, the new web site doesn't make that easy to do. The files sit in the
`web\news` directory of the repository, but how you access them from the web
site is a mystery to me.
I've been away from Nim for about 9 months. Can anyone give me a quick update
about what happened in this time to help me get back on track?
A summary of the last things I did and my level of understanding Nim at that
time:
**Issue**:
Need `int` type parameters to be optional, and to test whether the
parameter has been passed to the `proc` or not, BUT the `int` type does not
allow a `nil` value
So, how do you do the equivalent of
proc xxx(param1: string, param2: int = nil, param3: int = nil)
I did a little searching and compiling and I'd have to say Jehan is right here
about "absence of evidence". See, [this stackoverflow
thread](https://stackoverflow.com/questions/21214875/gcc-accuracy-of-strict-aliasing-warnings)
for a very simple example to people that is (still in 2017) too
15 matches
Mail list logo