Preview of coming attractions?

2021-11-14 Thread Araq
The plan is "IC", plain and simple. It allows us to get rid of "nimsuggest" having to run as a server, improving the "tooling"/IDE story. It's ok not to be excited about IC but Nim+ORC+IC is my vision and my dream. I don't personally mind forward declarations and the lack of cyclic imports but

Treat memory allocation as effect?

2021-11-14 Thread carterza
I respect your experience and opinion. You stated you were new to Nim and that your impression of the language differs from mine - that's fine. I've been using Nim since pre-2015 and my impression of the language is different from when I first started. I'm not sure what you mean by "nimble" whe

Treat memory allocation as effect?

2021-11-14 Thread elcritch
> Nim's original design philosophy was to be a lean, simple, powerful, elegant > and efficient garbage collected programming language. ... Personally I'm relatively new to Nim and have a bit different perspective. Initially was a bit confused by all the "features" and different configurations o

Preview of coming attractions?

2021-11-14 Thread carterza
I guess we have completely different expectations from our programming languages then. I expect one I use to be usable, not some theoretical R&D playground. I didn't pick Nim because it was some esoteric language or one suited for academia, I picked it because it seemed like it was attempting to

Preview of coming attractions?

2021-11-14 Thread Hlaaftana
To improve the language as a product, you need to be confident in its design. You need to pretend that the plan you have laid out makes the most sense to implement. Nim is different from languages like Rust or Zig in that it doesn't have a clear general plan for the entire language, but rather a

Treat memory allocation as effect?

2021-11-14 Thread rb3
Like @carterza, I'm also very much a Nim user who reports more bugs than fixes them, and I tend to agree with @carteza's thoughts. Unlike him, however, I do use exceptions and effects, which brought up a thought for me. Maybe I'm a bit out of the loop, but I was curious if there was ever a "Nim

Preview of coming attractions?

2021-11-14 Thread bpr
I don't consider Go a web development language any more than C++ is, so sure, competing with Go for spinning up servers should be in Nim's wheelhouse IMO. I'm glad you prefer Nim to Go for this and I think work to make this better is important. Perhaps if I said "front end development" my intent

what does bycopy mean

2021-11-14 Thread leorize
`{.bycopy.}` means that the structure will always be passed via a copy in Nim, which is C semantics. As such you will see it on structures used to interoperate with C code.

Preview of coming attractions?

2021-11-14 Thread sdmcallister
> IMO, a lot of the effort to make Nim a web development language is pissing in > the wind. That is an interesting take. I have just started using Nim for web development and really enjoy using it vs. Go.

Puzzling compiler error (1.4.8 Windows)

2021-11-14 Thread IvanS
Thank you. My bad. I must have deleted part of the code by mistake, because in a previous version of the file it does say proc getVoiceNames¨(): seq[string] =

Puzzling compiler error (1.4.8 Windows)

2021-11-14 Thread miran
> `proc getVoiceNames*(): seq =` You need to specify the `seq` of what: `proc getVoiceNames*(): seq[string] =`

Readability problems

2021-11-14 Thread haxscramper
Well, it is a domain-specific language for parsing text, so if you are _not_ familiar with the subject it will look unreadable, but at the same time it is still much easier to write and maintain compared to dozens of handwritten loops, checks and conditions like `if str[idx] == '='`.

Puzzling compiler error (1.4.8 Windows)

2021-11-14 Thread IvanS
Hi, In compiling my project, an imported nim source code file (ReTTS.nim) throws an error. However when I compile it seperately, it compiles just fine... The same file compiled also fine when imported in a limited test project setup (only for testing out the working with some basic code in ReTe

Preview of coming attractions?

2021-11-14 Thread bpr
On another thread @carterza [commented](https://forum.nim-lang.org/t/8613#56032) that he was unsure of the direction of Nim and unenthusiastic about the effect system and enhancements to it, and that he'd be more interested in half baked features (concepts) being made solid and less used featur

what does bycopy mean

2021-11-14 Thread JPLRouge
hello type msg_buf* {.bycopy.} = object mtype*: clong mtext*: array[MSGTXTLEN, char] var Q_msg*: msg_buf Run I have a header H with struct msg_buf { long mtype; char mtext [MSGTXTLEN]; } Q_msg; will bycopy share the structure thank you

UFCS issue

2021-11-14 Thread mantielero
I am having an issue with the calling convention. I have the following function: type Consumer* = mlt_consumer ... proc mlt_consumer_close*(a1: mlt_consumer) {.importc, cdecl, impmltDyn.} ... proc close*(a:Consumer) = mlt_consumer_close(a)

Readability problems

2021-11-14 Thread carterza
I don't even know how to reply to this honestly... Your JSON fetish isn't shared by everyone. Yes I have maintained code I wrote years ago - I do it all the time at work. I also maintain code other people wrote years ago. I see little point to your argument. I think you have a very narrow view

htmlgen question

2021-11-14 Thread sdmcallister
I normally use karax and realize it is typically recommended. But how do I use the `var list` to dynamically generate varargs `li("one"), li("two")` for the ul macro? import std/dom import std/htmlgen var root = getElementById("ROOT") var list = @["one",

Treat memory allocation as effect?

2021-11-14 Thread dom96
> Please no more features / additions just for the sake of it or "to see how > things go". The language already has way too much of this cruft. It's not just for the sake of it. It adds a real benefit. In any case, it's not like adding these annotations is a significant new feature that will tak

Treat memory allocation as effect?

2021-11-14 Thread carterza
How many months of development something takes to add or implement into the language isn't the problem here. The problem is the mindset or attitude that continually adding things to the language that will likely go unused is. The compiler continues to become more and more complex as new features

Treat memory allocation as effect?

2021-11-14 Thread dom96
> > Certainly adding these annotations shouldn't hurt us, so why don't we add > > them and see how things go? :) > > Simple, because they do hurt. In what way to they hurt? Is it just that you're worried adding them will surface bugs and/or feature requests? That's understandable, but also hyp

Readability problems

2021-11-14 Thread carterza
This is a pretty ridiculous claim and I think the only place where this even comes close to being true is in the web development world. Nim is a systems programming language, or at least it's supposed to be. It is not supposed to be NodeJS or whatever your favorite web framework is. I don't car

Treat memory allocation as effect?

2021-11-14 Thread carterza
Please no more features / additions just for the sake of it or "to see how things go". The language already has way too much of this cruft.

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread pietroppeter
> I suppose we need 2 more volunteers and we can submit. I think having 5 volunteers will be needed later on and we can already work on the submission. In the submission we can additional _pentabarf_ ids (could be those of volunteers). I created this repo to work on submission proposal, invited

Readability problems

2021-11-14 Thread SolitudeSF
le industry experience has arrived

Readability problems

2021-11-14 Thread xigoi
Macros make code much easier to read. Consider this example from npeg: let parser = peg("pairs", d: Dict): pairs <- pair * *(',' * pair) * !1 word <- +Alpha number <- +Digit pair <- >word * '=' * >number: d[$1] = parseInt($2) Run Imagine

Yet another macro DSL

2021-11-14 Thread PMunch
That was part of the idea behind [`macroutils`](https://github.com/PMunch/macroutils). It doesn't set default arguments, but it creates procedures to create the various kinds of Nim nodes in a simplified way. You also have setters like e.g. `left` and `right` for infix nodes and `body`, `pragma

Yet another macro DSL

2021-11-14 Thread planetis
Nice! Have you looked at [fusion/astdsl](https://nim-lang.github.io/fusion/src/fusion/astdsl.html) btw?

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread moigagoo
Count me in!

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread xigoi
I can help, unless it turns out there's something else that weekend.

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread dom96
I'm in. Happy to be primary contact too if nobody else is interested. So I suppose we need 2 more volunteers and we can submit. Bet you Federico will be interested as well, will ping him.

Yet another macro DSL

2021-11-14 Thread rb3
Did you mean a higher-level API than ASTs? Maybe I can make a separate library for that, but this one is meant to reflect the output of `treeRepr`, so it follows Nim's abstract syntax tree representation closely. This is basically just sugar over normal `newTree` and `newNimNode` calls from `std

compiling to macOS

2021-11-14 Thread Araq
> Specifically, I would like to compile for OSX and iOS without actually owning > mac hardware. How are you gonna test the result? If you have a machine that can do automatic testing, this machine might as well be used to compile your software...

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread PMunch
I can help out, I've already helped out the Minimalistic room organise theirs for a while. It actually started when we where discussing with other languages a couple years ago to create a "Small languages" room. We where invited to join them and that year it was called the "Minimalistic, Experim

Yet another macro DSL

2021-11-14 Thread kobi
nice, but perhaps it's possible to have default arguments as Empty, and just call a nice api where you don't have to specify those? (in other words, don't rely on argument order etc, but show a high level api)

Yet another macro DSL

2021-11-14 Thread rb3
If anyone was looking for yet another DSL for writing macros, here is a crappy one I just finished refactoring: . Sample usage: import mast macro makeMain(body: untyped) = ast: ProcDef: `main` Empty

compiling to macOS

2021-11-14 Thread kobi
Thanks! I'll give it a try

compiling to macOS

2021-11-14 Thread enthus1ast
I've used osxcross to target macos from linux:

How to hide FFI details from implementations of a (C FFI) interface?

2021-11-14 Thread kobi
I believe you just have to convert the types to their equivalents. proc doSomething(num: int) = callBindingCode(num.cint) Run if there are casting, buffers, ptrs etc involved in the C code, you can try to hide them in a nice api. the body of your proc will do t

compiling to macOS

2021-11-14 Thread kobi
Hi! I've been living under a rock for a few years, and wonder how developers are working today when they want to compile to OSes they don't have physical access to. Specifically, I would like to compile for OSX and iOS without actually owning mac hardware. Online services? virtualbox magic? Th

Treat memory allocation as effect?

2021-11-14 Thread Araq
> Certainly adding these annotations shouldn't hurt us, so why don't we add > them and see how things go? :) Simple, because they do hurt. > In general I love the effect system and would like to see it expanded plus > used more. I would also like to add a BlockingIO effect that async can forbid

How to hide FFI details from implementations of a (C FFI) interface?

2021-11-14 Thread lpirl
Thanks for the pointers, it looks quite related, indeed. I'll check in detail next time I have time to dig in.

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread pietroppeter
I think it should be half a day only during devroom but I do not have details, I do not think it should be a big commitment. Thanks for expressing interest and availability!

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread moigagoo
What kind of commitment does it take to be a volunteer? I'd love to help and maybe even do a talk but I'd hate to let you down by not being able to dedicate a full weekend to the event. If it's about being online chatting with strangers for a few hours, I'm in.

Getting error setting up Mysql Database

2021-11-14 Thread enthus1ast
Yes it kinda is BUT you should get the client dll from official sources, most of these dll downloader sites are malware distributers. This could be the right download: /

Getting error setting up Mysql Database

2021-11-14 Thread plgupa
Hi, I was able to solve above problem by downloading the libmysql.dll file from - . Then I kept the file in C:WindowsSystem32 folder. After this the connection to database was established. Please confirm if this is the right approach??

FOSDEM 2022 call for Nim Devroom (deadline tomorrow)

2021-11-14 Thread pietroppeter
[FOSDEM 2022](https://fosdem.org/2022/news/2021-11-02-devroom-cfp/) will happen remotely on the first weekend of February (5-6). **Tomorrow (Nov 15) ends the deadline for submitting a Nim devroom.** In the past we have been welcome in the minimalistic room (likely also this year, see [irc logs]