i found a c++ ui library that runs in android, ios, windows, mac, linux named
Run
which has Its core dll less than 1.5Mb and uses html like syntax. Also it is
MIT licensed. But i cant find any tutorial to clone c++ library in nim. If
anyone has any tutorial please provide link.
I couldn't find any posts covering Dialog-Based WinGUI apps, so I decided to
play with it.
Using ResEdit and windres, I didn't have to code any of the GUI objects.
Example is in this repository:
[Demo](https://github.com/Airr/Nim-Dialog-Based-Win-GUI)
I looked into this in response to several
If `foo` has `typed` argument then `bar()` is evaluated first and then
resulting AST is passed as argument. Note that `bar`'s output AST would be
**fully** expanded before being passed to `foo`
macro bar(): untyped = newLit("bar-expanded")
macro foo(arg: typed) = echo arg.t
Is there any way for a macro to expand nested macros during its evaluation?
For example, if there are macros foo(x) and bar() and we write:
foo(bar())
Is it possible for foo to access the AST which would be generated by bar?
You can simply use `ptr T`, destructors and custom memory management...
Yes, thanks, I missed the visibility sign `*` in the example, of course it
should be present.
I think your first issue is that read() is not exported at all. I would assume
that "export fs" can work at all only with proc read*() with export marker.
After thinking, it's possible to rewrite `fs.nim` as code below, and get the
desired effect
type FS* = object
const fs* = FS()
proc read(fs: FS, path: string): string = "content of some file"
Run
Module `fs.nim`
proc read(path: string): string = "some content"
Run
Module `base.nim`
from ./fs import nil
# I want only the fs namespace to be exported, not its content
# export fs as fs - this doesn't work
export fs
Run
M
This came up quite a bit when we introduced `\p` and IMO defaulting to `\n`
(LF) is usually most convenient, even on Windows machines: All the tools
understand LF perfectly fine these days and copying files over to Macs/Linux
then does not cause incompatibilities.
Thanks. You should really use objects, not tuples for these things. The
compiler re-uses generic instantiations for "identical" tuples.
Hi all,
Not sure to be right but it seems that on Windows WriteLine end line by a n,
which is not aligned with platform convention.
May be it should be better to end by p which is platform specific, cn on
Windows.
May be I missed something and it is not the good function to write lines in a
t
I see.
It means that Nim thought it was a combination of a constructor and a named
tuple, not a function call, doesn't it. (I don't know why they don't consider
it a function call) I can use `collect(newSeq) do:` to do what I want to do, so
solved my problem.
Thank you very much.
Nim thinks `toString(collect(newSeq): etc)` is an object constructor with
`toString` as the type, `collect(newSeq)` as the name of one of the fields of
that object, and `for aa in a: aa * 2` as the value of that field. If you
change it to:
var c = toString(
(collect(newSeq)
the only solution i've found is:
1. rethink heap mrg. in 'nim way'
2. careful dealloc created memory
15 matches
Mail list logo