know timotheecour on
GitHub made an issue in both our repos to make us aware of each others project
but for the others if you want to check out my version it can be found
[here](https://github.com/PMunch/protobuf-nim)
Something which might help a bit, be sure to read the comments as well:
[https://www.reddit.com/r/nim/comments/7dm3le/tutorial_for_types_having_a_hard_time](https://www.reddit.com/r/nim/comments/7dm3le/tutorial_for_types_having_a_hard_time)/
I'm against changing this, and I think a vote is superfluous so **I do not want
a vote**.
When I first found Nim I though the style insensitivity was a bit strange. But
the more I use it the more I like it. And after having had to write some code
in C and Ruby that doesn't have it I'm even
There's a difference between having style insensitivity and writing/editing
code (either manually or by a tool) to let you write your code in different
styles. You could also write a tool to achieve this in C or use define
statements and the like to do the same thing.
This looks pretty neat! Is it possible though to define a conversion and apply
it to multiple fields? Say I had a lot of dates in my database it could get
tedious fast to write {.dbType: "INTEGER", parseIt: timeparser, formatIt:
timeformatter.}.
Barely anything at all, in fact I decided to run a little experiment:
[peter /tmp ] $ cat test.nim
import json
var x = newJArray()
for i in 0..10_000_000:
x.add newJString("Hello world")
x.add newJBool(true)
[peter /tmp ] $ cat test2.nim
type
I recently held a lightning talk at FOSDEM and the video from that got uploaded
today. If you didn't have the possibility to attend FOSDEM you can watch it
here:
Thanks, and yeah we talked about that before the talk but my mind completely
blanked on that when I was on stage.. I chose the mixed audio source though, so
it should've included just about enough of the audio to make out the questions.
Maybe I should transcribe them under the video though..
Thanks a lot, but damn I was sure I heard you say that at some point!
Yeah that was the goal. With only 15 minutes there's only so much you can do,
but I hope I managed to pique the interest of someone in the audience :)
The answer to this is to use object variants
[https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants](https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants)
which is exactly what the JSON module does:
Of course, just add the fields to your exception type:
Nim
type
MyException = ref object of Exception
extraData: string
proc raiseSomething() =
var e: MyException
new(e)
e.extraData = "Hello world"
e.msg = "This is the normal
If you disable the garbage collector and does some tweaks Nim is able to run on
microcontrollers such as an Arduino or Attiny85. So it's definitely possible to
run bare metal. There has even been an OS demonstrator written in Nim:
Hi everyone. For the past couple of years Nim has had some presence at FOSDEM,
and this year we want to things a bit further.
The original idea was to apply for a Nim developer room, but fearing that it
would be too niche to get accepted, I propose the idea of creating a joint
effort "Newer
Recently discovered this site: [https://nim-cn.com](https://nim-cn.com) which
appears to be a translated version of the main page. As for a forum I don't
think there is anything like that, but as others have said it is possible to
use this open source forum and just set up a new version.
For web framework using Jester + Karax is a fairly solid combination. Or if you
don't want a single page application then Jester + your web DSL of choice.
Well, this has already been mailed out, so we can't really change it for
everyone. And thanks for making me aware of that list and the missing name, it
was supposed to be an automatic thing, but we have a PR in to fix it now.
Beat me to it, was about to put up a reminder today :)
Very cool to see that you are supporting Nim! There aren't a whole lot of users
on these kind of platforms using Nim yet, but as you mentioned there are some
really good reasons to do it
GC_ref and GC_unref are required when your Nim code needs to be responsible for
keeping track of memory, but you might end up passing things in and out of Nim
code. In general they aren't used a whole lot for regular C interop. The
important thing to keep in mind here is who is
Well it does require Gtk3..
Well, it was expanded from last years description from the "Minimalistic
languages" room. The official title of the room is "Minimalistic, experimental,
and emerging languages", and the focus of the room really is on any language
that don't have a home in any of the other programming language
Oooh, I would love to see that talk!
This room is a merger of our proposed "Emerging languages" devroom, and the
"Minimalistic languages" devroom from last year :)
We are excited to announce a devroom on minimalistic, experimental and/or
emerging languages (with big ideas) at FOSDEM on Sunday February 2nd 2020!
FOSDEM is one of the most important free software conferences and is hosted
annually at Université libre de Bruxelles in Brussels, Belgium. FOSDEM
I've written a library for options that does exactly this, amongst other useful
things with options:
[https://nimble.directory/pkg/optionsutils](https://nimble.directory/pkg/optionsutils)
It's that time of year again, when all sorts of open source interested people
meet up in Brussels for a free to attend conference with 835 lectures and over
8000 participants! This year Nim is more active than ever before with four
talks over an hour and a half. This will all take place in the
My biggest reason for wanting FFI at compile-time is to be able to use
libraries that are wrappers around C libraries. For example for my Arduino
stuff I wrote a macro that reads an image file and converts that to an array of
bytes that is directly inserted into your code (this is how sprites
I agree that it should be an explicit thing (by using
static(myCompileTimeValue)), but mostly because the compiler can then show you
an error if you do this by accident.
To expand a bit further the `rand` procedure updates the global random state
object. If you still want a random in this case you can use the
[initRand](https://nim-lang.org/docs/random.html#initRand%2Cint64) to create
your own random state object and then pass that to `rand` like so:
It seems like your issue is elsewhere, I tried myself with your cfg and code,
and with this panicoverride.nim:
proc rawoutput(s: string) = discard
proc panic(s: string) = discard
Run
Something like this might interest you:
[https://blogtrottr.com](https://blogtrottr.com)/
I'd be happy to hold a presentation. Not quite sure on what topic though.. And
@treeform, are you launching rockets with Nim now?
Well for your specific usecase you can use
[sample]([https://nim-lang.org/docs/random.html#sample%2Cset%5BT%5D](https://nim-lang.org/docs/random.html#sample%2Cset%5BT%5D))
from the random module. Otherwise the [manual
> Now it becomes a different problem of information hiding. Do I want to have
> these fields visible by users? Are there problems using import? I suppose
> that if I import bar.nim in multiple files, I would get types
> redefinitions... I have to balance the advantages of both solutions.
As
The crown has some history behind it though. It's based on the old name
"Nimrod", which was the biblical king who supposedly built the tower of babel.
So along with being a neat and clean logo it also encapsulates the roots and
initial goal of Nim.
Well it isn't able to find the hello executable. Did you copy it over? Did you
copy it over to the place you thought you did? Are you standing in the correct
folder?
How are you trying to read from the serial in Nim?
I think the most common way of doing this is splitting everything into their
own modules, then include-ing them (instead of import-ing them) into the main
file that the user can import. This means that the main documentation will have
all the things that the various sub-modules have.
As @Javi alluded to NimMain is what sets up the GC. So without calling NimMain
the GC won't work and thus no Nim strings as they require the GC. It's worth
noting though that \--noMain only removes the call to NimMain, the procedure is
still generated. So you can import it into your Nim code as
Not an example, but here is a blog-post that touches on what refs are:
[https://peterme.net/nim-types-originally-a-reddit-reply.html](https://peterme.net/nim-types-originally-a-reddit-reply.html)
Depends heavily on what kind of APIs you're thinking about. For the simple
stuff it's good, but you might run into it lacking a package for a certain
protocol or similar if you need to do something more complex.
Note that an Option[ref T] is just a thin wrapper that checks if the reference
is nil:
[https://nim-lang.org/docs/options.html#Option](https://nim-lang.org/docs/options.html#Option).
Wrapping something that is a pointer in an Option is simply a way to get
Option semantics for pointers.
I liked the idea of that parser so I threw together an even better Nim version:
[https://play.nim-lang.org/#ix=2ogb](https://play.nim-lang.org/#ix=2ogb). It
parses the format on compile-time and creates a parser that returns a tuple
with all the arguments. So now all the arguments have the
44 matches
Mail list logo