The main reason logging is pervasive in the Java world is because of its
checked exceptions that force you to handle exceptions in places where you
don't know what to do, so you log the error instead. Horrible, fragile
practice. Then the process dies and you can look into the log to see
OutOfMe
i'd really like to be able to define arrays like this:
let myArray: array[auto, float32] = [1, 2, 3, 4]
@andrea Coming from the JVM myself, I know exactly how it is. But, IMHO, the
only way around that is to have a super powerful/flexible logging system as
part of the system library, so that no one gets the idea of implementing their
own instead. By the time Java added their own standard logging l
@yglukhov how do you make an ajax or XHR request in nim?
Unfortunately, as common as this is, it is also an endless source of
frustration. Not least, because each library will choose a different logging
library, leading to a nightmare of integrating all of them. I still struggle
every time I have to decide whether to use log4j-over-slf4j or slf4j-ove-
Logging in libraries is pretty common across different languages. It's not
invasive as long as libraries do not explicitly configure loggers to create
files and so on. The application is at the root of a hierarchy of loggers and
can set verbosity and backends for all imported libraries.
(shamel
thank you, that is handy
yes! that is it, thanks!
Alternatively, there was discussion for an 'asArray' macro.
[https://github.com/nim-lang/Nim/issues/6563](https://github.com/nim-lang/Nim/issues/6563)
[https://github.com/nim-lang/Nim/pull/6640](https://github.com/nim-lang/Nim/pull/6640)
Does it work as expected if you only provide the type annotation on the first
element?
You can specify just the first term and the others are inferred.
var gradZ = [
0'f32, 0, 0, 0,
1, 1,-1,-1,
1, 1,-1,-1]
I have a vague memory of someone tweeting me a way to avoid having to put a
type annotation on every field in an array like so:
var gradZ = [
0'f32, 0'f32, 0'f32, 0'f32,
1'f32, 1'f32,-1'f32,-1'f32,
1'f32, 1'f32,-1'f32,-1'f32]
But I can't remember, i
what is the distinction between using nimble install, and nimble develop?
This explains it well (I hope):
[https://github.com/nim-lang/nimble#nimble-develop](https://github.com/nim-lang/nimble#nimble-develop)
Low-level code with pointers and memory may not work in JS as you would expect.
IO in js is different. Closure iterators are not available in js, but they are
pretty specific to their use-cases. Other than that the code is pretty
cross-platform. [nimx](https://github.com/yglukhov/nimx) is one of
I am familiar with how to use 'requires' to pull in a library that is in
package manager. What if I have my own library that is on my filesystem, and
I'm starting a new project and I want to use it, how do I use my nimble file to
point at it?
I think I have figured it out:
use 'nimble install' on the library then you can just refer to it by name with
'requires'
Run `nimble develop` in your library's directory, then simply add a `requires`
in your new project for that library.
Hi. I am a nim beginner. I am considering that nim as my js language. I wonder
that the forum members' experience for the nim backend. How much code share is
possible between plain nim and js nim code?
19 matches
Mail list logo