@xyz32: That `#? braces` parsing mode was never documented and will be removed
again. It's already out of sync with the latest parser/grammar changes.
> What amazes me is that Nim is a bit faster than some recent languages who
> compiles directly to machine language.
That should not be _so_ surprising. A major aspect of the "speed" of a language
is how much effort went into writing the backend of the compiler. C/C++
compilers have seen by
Author said that only one PR to godot engine left
Unfortunately this binding needs a forked version of the engine. You must
consider this binding as a W.I.P.
Anyway it's nice work and I hope this will be completed soon.
Haven't seen any, good idea. Should be pretty easy for seqs, arrays, strings
and pretty useful when debugging.
I'd also be interested if it's possible to demangle identifiers so that we can
tell GDB what the mapping between original identifier and C identifier is, like
the #line pragma.
Why do you set the keepalive flag? I'd like to experiment, but i can't find
windows binaries of the server.
Unless the socket was out of scope, it should (kinda) able to `receive` the
message from server. The problem is server won't know whether its message
received by client or not. So I cannot follow how UDP server knows the
connection closed?
UDP, in simple term, only sends without caring whether
Hi, I trying to ease my pain debugging Nim. Thinking if anyone already
implemented GDB pretty printers for Nim basic types.
Visual studios natvis debug custrom visualizers will also work.
Thank you
@Ar,
[https://systembash.com/a-simple-java-udp-server-and-udp-client](https://systembash.com/a-simple-java-udp-server-and-udp-client)/
@mashingan, I just created a new nim project and copy pasted your UDP client,
and changed
mystatus = "I'm sending for " & $count & "
@xyz32, could you show the revised version of your Nim UDP client? By
definition, UDP is connection-less so it works that way.
Also, please show in what way it should work properly, because, like I said,
UDP is connection-less.
This may not be directly related to your goal, but under [Future
directions:](https://nim-lang.org/docs/manual.html#types-memory-regions) we
have that seq and string may get memory regions.
Ok the problem is somewhere in the garbage collecter. It tries to create an
object and fails. My motivation to fix issues with the GC is pretty low. I
would spend my time rather on removing the dependency on the GC than to fix the
problem with it.
Thanks, but still doesn't solve the issue.
I am trying to build a client library for the roboCUP 2D simulation server
(rcssserver). You can find documentation here:
> How reliably can Nim translate to C or C++?
As with any other compilers: nothing but [a bunch of test
cases](https://github.com/nim-lang/Nim/tree/v0.17.0/tests), which is why code
generation bug can still exist because covering all cases is almost impossible.
Compiler's basic building block
Uesful page
[https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler](https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler)
>From the example:
# Copyright 2017 Xored Software, Inc.
import strutils
import godot
import engine, label, resource_loader, packed_scene
gdobj FPSCounter of Label:
var lastFPS: float32
method ready*() =
setProcess(true)
@aedt, you should know there's
[AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) for each statement
and expression. It's the AST that converted to C, so that's how compiled it
correctly.
Of course, using the same AST, you can compile directly to assembly too but I
think kudos for Nim
Use
[sorted](https://nim-lang.org/docs/algorithm.html#sorted,openArray\[T\],proc\(T,T\))
version for returning new sequence.
For UDP, you don't `send` / `recv` but `sendTo` / `recvFrom`.
See this stackoverflow [answer](https://stackoverflow.com/a/1829480) for
detailed answer.
For simple UDP server/client in Nim. Here's the example:
`server.nim`
import net
var server = newSocket(AF_INET,
well I did something in that direction on a branch. I have a problem with the
nim compiler to crash here and there. How do I enable debug information again
in the compiler? And why is is such a hassle in nim to get debug information?
Debug builds should have them.
Hi
I was wondering
1\. how you would sort a string by characters
For example:
fn main() {
let mut x = "bad cab".chars().collect::>();
x.sort();
println!("{}", x.into_iter().collect::());
} // prints " aabbcd"
2\. if there is any equivalent to
I wonder how the Nim particular OOP works with the Godot Engine and his huge
inheritance tree. Maybe it does not matter... But anyway, this engine is
gradually gaining popularity and it can help Nim language to be more spreaded.
What amazes me is that Nim is a bit faster than some recent languages who
compiles directly to machine language.
[https://github.com/pragmagic/godot-nim](https://github.com/pragmagic/godot-nim)
Yay, proper GDNative bindings!!!
Thanks for the help, but that is not the issue.
There is a UDP server running and listening on port 6000. That is why the java
client works. The Nim client works as well but just for the first message.
After that the server console tells me that the client has disconnected. The
connection is
well are you open for a pull request for that. I think that's easy to implement.
That would be consistent and logical. But (IMHO) pragmas are ugly...
27 matches
Mail list logo