Transpile Nim to Dart/Flutter?

2021-05-21 Thread jasonfi
Great, how are procs mapped to classes?

Transpile Nim to Dart/Flutter?

2021-05-21 Thread xigoi
> If successful, such a technique could be used to make other Object Oriented > languages possible as backends in the future, e.g. C++. …C++ already is a backend.

Querying on support to CPS development by compiler devs

2021-05-21 Thread leorize
Thanks for confirming. I have tagged several issues under the new `CPS` tag.

squeeze the sequence: remove empty strings

2021-05-21 Thread alexeypetrushin
import re, sugar, sequtils echo "Hello,%20World@#!".split(re"[^a-zA-Z!]").filter((part) => part != "") Run If yo from Ruby, Nim is uncut Gem. Its core is more powerful and flexible than Ruby. But it's not polished, you need to polish it yourself.

squeeze the sequence: remove empty strings

2021-05-21 Thread bpr
I think `collect` is considered idiomatic for this import regex, sugar var name = "Hello,%20World@#!" var pattern = re"[^a-zA-Z!]" let sq2 = collect(newSeq): for e in name.split(pattern): if e != "": e echo sq2 Run

squeeze the sequence: remove empty strings

2021-05-21 Thread masiarek2
thank you!

squeeze the sequence: remove empty strings

2021-05-21 Thread ElegantBeef
You can use `sequtils.filter` it as follows: # squeeze the sequence: remove empty strings import regex import std/sequtils var name = "Hello,%20World@#!" var pattern = re"[^a-zA-Z!]" var sq1 = name.split(pattern) echo sq1.filterit(it.len != 0) Ru

squeeze the sequence: remove empty strings

2021-05-21 Thread masiarek2
What is the idiomatic way to squeeze (remove empty strings) the sequence # squeeze the sequence: remove empty strings import regex var name = "Hello,%20World@#!" var pattern = re"[^a-zA-Z!]" var sq1 = name.split(pattern) var sq2: seq[string] = @[] for i, e in

Creating a wrapper for an already built C/C++ Library using nimterop

2021-05-21 Thread grishkin
I already have the dlls for the library plus the headers and source files. How do I use nimterop to wrap these? Do I need to use toast? I have read the nimterop page but I am still unsure how to use it. For example, with this directory structure: * > sparselib.h # This is the root folder for

Querying on support to CPS development by compiler devs

2021-05-21 Thread Araq
I stand by that decision, yes. Mark specific bugs with "CPS" and we can see how to solve them.

NimConf 2021

2021-05-21 Thread masiarek2
long live hackathon! @dom96 \- I would love to help with organizing the hackathon or NimConf - just keep in mind I am junior Nimmer in training...

Release candidates for 1.4.8 and 1.2.14

2021-05-21 Thread treeform
Is there a change log of whats new?

Nim 2.0 -- thoughts

2021-05-21 Thread juancarlospaco
Remove all `--legacy:` all switches. Reduce as much as possible all the `--experimental:` switches, make it ON by default if they work, or remove them if they are broken, as example we have 2 "not nil" thingies, one should be removed, do they work together at the same time?. Define what to do

Nim 2.0 -- thoughts

2021-05-21 Thread margin
> We already got a new concepts implementation and should try it out for the > outlined new modules. What is the idea with concepts, will they replace type parametrization in general?

Querying on support to CPS development by compiler devs

2021-05-21 Thread leorize
@Araq I am working on [cps](https://github.com/disruptek/cps). Support was [promised](https://github.com/nim-lang/RFCs/issues/295#issuecomment-744277794) for this endeavor, and I would like to know what is the status of this and whether you still stand by that decision.

Release candidates for 1.4.8 and 1.2.14

2021-05-21 Thread sdmcallister
Installed 1.4.7 via choosenim and so far so good. No issues with Windows Security.

Release candidates for 1.4.8 and 1.2.14

2021-05-21 Thread kaushalmodi
No issues with Windows Security here as well, on Windows 10. Thanks!

Release candidates for 1.4.8 and 1.2.14

2021-05-21 Thread enthus1ast
What was the solution to the antivirus madness?

Release candidates for 1.4.8 and 1.2.14

2021-05-21 Thread pietroppeter
🥳 on my windows 10 with a stock [Windows Security](https://www.microsoft.com/en-us/windows/comprehensive-security) active, I succesfully upgraded to the release candidate with the choosenim command reported above (`nim --version` confirms I am on 1.4.7) and run a quick scan of my antivirus and

Nim 2.0 -- thoughts

2021-05-21 Thread Araq
> Btw, are 'views' expected before 2.0? Well the 2.0 plan is still evolving. I think we'll fix the most pressing view type bugs but I doubt they will make it out of the "experimental" state for 2.0. We should focus on shipping --gc:orc for 2.0 and not let be the perfect be the enemy of the good

JS FFI - getting started

2021-05-21 Thread mantielero
Again, to get me started with another library: [Tabulator](http://tabulator.info/), I am trying: * `tabulator.nim`: import jsffi when not defined(js): {.error: "This module only works on the JavaScript platform".} type Tabulator* = ref object

IRC freenode staff exodus

2021-05-21 Thread gemath
> ..sent a group registration request for Nim on Libera Chat. Good thing, thank you. In the long run, we should have something more multimedia and more secure than IRC by default though. Wikipedia has a nice [table of messaging protocols](https://en.wikipedia.org/wiki/Comparison_of_instant_mess

Transpile Nim to Dart/Flutter?

2021-05-21 Thread bung
I like the idea, this could also be used as web framework's controller or routes that could be mounted.

IRC freenode staff exodus

2021-05-21 Thread euant
> As a curiosity, thanks to this event, I found out that ddevault (the creator > of sr.ht) has been lurking around nim's irc in the last months > > I would say this last bit at least is good news! We use builds.sr.ht for FreeBSD and OpenBSD CI, he's probably been lurking due to our excessive re

Karax steps forward

2021-05-21 Thread alexeypetrushin
Not sure how Karax does it, in React components also used for the performance optimisation. When React calculates the DIFF, it uses components to quickly find changed components (using fast == reference/address comparison for component models, that's the reason why React models have to be immuta

Nim 2.0 -- thoughts

2021-05-21 Thread Arrrrrx2
> ...and I couldn't describe it better than "bureaucratic" :), but what's the > alternative really? const pagesToCstring = block: var result: array[PageMode, cstring] for pm in PageMode: result[pm] = $pm result[PageMode.none] = "home" re

Release candidates for 1.4.8 and 1.2.14

2021-05-21 Thread AMoura
Great there are ARM binaries.

nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B

2021-05-21 Thread miran
The release candidate for Nim 1.4.8 is out and it should fix this problem. Please try it out and report back: Thank you in advance!

Release candidates for 1.4.8 and 1.2.14

2021-05-21 Thread miran
The release candidates for new Nim versions 1.4.8 and 1.2.14 are out. Based on our limited testing, this should fix [the antivirus problem](https://forum.nim-lang.org/t/7830) on Windows encountered with Nim 1.4.6, but we would like you to try it yourself too and report back. * Nim 1.4.7: [li

Transpile Nim to Dart/Flutter?

2021-05-21 Thread Araq
> A file could be mapped to a class. Funny, I'm also working on an RFC about how to do that. But my focus is more on the core language, not how to use this mechanism ("attaching routines to types") for interop with different languages.