> GTK apps to the web? What about mobile?
GTK has no mobile support unfortunately, I think I said that in the GTK4 book.
For Web there is the Broadway module -- thanks for that hint, I should
investigate that and write some lines about broadway.
GTK is definitively not suited for you as a begin
Hi
Congratulations on the new PC!
Not sure I can help with the choosenim install issues, I would guess with all
the ' _fun_ ' you have been having trying to install in different ways, there
may be some residual install left over of something...
On Ubuntu, the easiest way to get the Nim depende
@Stefan Thank you for the tutorial. The question that I wonder about, are there
tools to bring GTK apps to the web? What about mobile? Nimx looks amazing in
that respect, but I've already ran into the issue that I can't compile
emscripten and you're right, it just doesn't look that great.
@tree
If your object is really a "ref object" then this does it:
cast[ByteAddress](this)
I came across an interesting problem in Nim: how to get the address of an
object, defined as the memory location of the first byte of the object, in a
printable form (uint/string), such that it can be included in a $ operator.
I tried
cast[ByteAddress](this.unsafeAddr)
You can easily create aliases:
from mod1 import greeting
from mod2 import greeting
const
greeting1 = mod1.greeting
greeting2 = mod2.greeting
echo "Jhon".greeting1() # => Jhon, hello from mod1!
echo "Adam".greeting2() # => Adam, hello from mod2!
> Indeed, in cryptography you always have an upper-bound that is known at
> compile-time.
Thank you! It's nice that modern machines' vector instructions make O(1)
complexity possible. I'm a bit surprised that programming languages haven't
generally made this available even in standard libraries
That won't work in all cases though - there's
[https://github.com/nim-lang/Nim/pull/11992](https://github.com/nim-lang/Nim/pull/11992)
but I don't know what's the status of it
this is very much an edge case which atleast I in a few years of Nim never
stumbled upon. And if it does, as you already presented there is a work around
for this.
Achievement unlocked: Necromancer
On devel a new experimental mode has arrived called "strictFuncs". See also
[https://github.com/nim-lang/RFCs/issues/234](https://github.com/nim-lang/RFCs/issues/234)
For example:
{.experimental: "strictFuncs".}
type
Node = ref object
le, ri: Node
We could also add this information to our wiki.
To answer my own question, this works:
> ... autofocus = "")
Let's imagine we have two modules (from different developers) and their both
purposes are to extend some standard type (e.g. string). These two modules have
procedures with the same signature but different logic:
# mod1.nim
proc greeting*(name: string): string = name & ", hello
I recently bought a new PC, and I'm trying to install nim in WSL, since the
default version with Ubuntu isn't current.
The first issue I had, is choosnim said I had no C compiler. I installed clang,
but choosenim still said there was no compiler, although simply calling "clang"
showed it was th
How do I deal with missing attributes in htmlgen? For example I want to add the
autofocus attribute to an input control, but I get this error:
> htmlgen.nim(106, 14) Error: element input cannot be nested
the new nimlang code on github does not report `SIGSEGV: Illegal storage
access.` any more
but
1\. while compiling
import winim/com
comScript:
var fn = r"r:\test.xlsx"
var excel = CreateObject("Excel.Application")
var wbIn = excel.Workbooks.Open(fn
How serious is your project? Figma looks amazing, so I would go with it even
though it's alpha, if it's ok that you run into problems that might need to be
worked out.
Fidget is still alpha...
I would love to know where you get stuck with fidget, so that I could fix it.
Well, when you have already decided that you will use one of them then it
should be easy, maybe just try both. I think NimX is the most fun, as it is
pure Nim. But it may be very restricted and may not look that nice. Fidget
looks nice, but it may be restricted too compared to a mature toolkit.
@federico
> A little reminder for other readers: timing attacks pop up often when people
> implement their own cryptography or other security functions that require
> string equality checks.
>
> Unless you have very strict performance requirements, there are well-know
> cryptographic libraries
This is a bit of a distraction from your main point, but from your GitHub:
> As cryptography rely in big integers computation, a constant time big int
> implementation is needed.
Out of curiosity: that's not really possible, is it? unless you bound "big". My
definition of "big" is arbitrary-siz
@federico3, for a web-app there may also be "autonomy"/non-dependency
requirements. A Nim lib for assembly may be no better than a C lib for that,
though.
But this is not a criticism of @mratsim. The idea is good and can also help
performance in cases where it is not easy to guide compilers in
Hello,
I'm doing my first GUI project in Nim (I'm new) and trying to pick a
cross-platform library. I've settled on Nimx and Fidget, and now just have to
pick the one.
Some specific questions that I was not able to find answers to:
* Is Nimx cross-platform support better than Fidget?
* Are
A little reminder for other readers: timing attacks pop up often when people
implement their own cryptography or other security functions that require
string equality checks.
Unless you have very strict performance requirements, there are well-know
cryptographic libraries that have Nim wrappers
> To protect cryptography secrets you need to ensure that the code generate
> will not use secret dependent branches as by timing the procedure we can
> recover part of the properties of the secret (or in the worst case each
> individual bits that compose it).
Yes! So true. Programming language
Well a certain amount of confusion is expected when you read documentation for
version X while using version Y. But it's like this:
We have multiple "GCs" since a long time. Though in retrospect GC should have
been called "memory management strategy". There are two new GCs in development,
ARC a
The updated dstructors manual is
[here](https://nim-lang.github.io/Nim/destructors.html)
Some notes I gathered:
1)
[=sink](https://nim-lang.github.io/Nim/destructors.html#lifetimeminustracking-hooks-eqsink-hook)
can be omitted, the compiler can it infer it for you but you still need to
declar
For my cryptographic and big integer needs, I regularly have to fight compilers
in exhausting kind of ways. So instead of trying to bend them to my will I
wrote an inline assembler for Nim.
This is part of my elliptic curve crypto library. For now I don't plan to
release it as standalone as the
This might help. This is a book I wrote with security auditors in mind to
explain Nim semantics and features in particular how they relate to security:
[https://status-im.github.io/nim-beacon-chain/auditors-book](https://status-im.github.io/nim-beacon-chain/auditors-book)/
30 matches
Mail list logo