Enhancing Nim vtable implementation vs subtype checking

2023-12-20 Thread ringabout
Here is the PR for the documentation of vtables for methods =>

Escape characters for fmt

2023-12-20 Thread Araq
FWIW I stopped using `strformat` altogether (though `&` **is** much nicer than `fmt` IME) because no tool finds the bug in: exec "gcc {a}" vs exec &"gcc {a}" Run I think I have a better design but never got to write the RFC...

Escape characters for fmt

2023-12-20 Thread amadan
Would the better design be implemented in the compiler or still be implemented as a macro?

Escape characters for fmt

2023-12-20 Thread RegularAlias
Ahhh I see now. I attempted the following: template `%`*(pattern: string{lit}): string {.callsite.} = fmt(pattern, '{', '}', dummyForLineInfo) Run and you're right, it behaves exactly like `&`. I think I will just use `&` as Calonger suggested lol. Thanks so muc

Escape characters for fmt

2023-12-20 Thread exelotl
> My guess is that & allows for escape characters even without whitespace is > because it is concatenating string literals, something inherent to the & > operator? No, I believe the reason is simply that `&` is not an identifier, therefore the parser doesn't see `&"foo"` as a raw string literal

Escape characters for fmt

2023-12-20 Thread RegularAlias
The construct identifier"string literal" (without whitespace between the identifier and the opening quotation mark) is a generalized raw string literal. It is a shortcut for the construct identifier(r"string literal") Run I see so `echo"hello\n"` also produces "hellon" in the

Escape characters for fmt

2023-12-20 Thread exelotl
There's nothing special about `fmt`. This is just how Nim treats any occurrence of `xyz"string"` where there is no space between them. See [Raw string literals](https://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals) and the section _" Generalised raw string literals"_ below

Advent of Nim 2023

2023-12-20 Thread denise_amiga
fixed the fault was in the management of the crosses, it only controlled a maximum of 9 ... of '2' .. '9': discard ... Run

Escape characters for fmt

2023-12-20 Thread RegularAlias
# consider deprecating this, it's redundant with `fmt` and `fmt` is strictly # more flexible, readable (no confusion with the binary `&`), self-documenting, # not to mention #18275, bug #18278. Run >From reading this I get a sense that it would be a win to add es

Escape characters for fmt

2023-12-20 Thread Calonger
Use & instead of fmt , & escape characters fmt do not ( raw string ) .

Nim v2: what would you change?

2023-12-20 Thread PMunch
I frequently interop with C without issue. Not sure why you believe this isn't something you can do in Nim

Escape characters for fmt

2023-12-20 Thread RegularAlias
template fmt*(pattern: static string): untyped {.callsite.} = ## Alias for `fmt(pattern, '{', '}')`. fmt(pattern, '{', '}', dummyForLineInfo) .replace("\\\", "\u200E") .replace("\n", "n") .replace("\t", "t") .replace("\v", "v") .replace("\r", "r") .replace("\b", "b") .replace("\f", "f")

Sitemap Parser

2023-12-20 Thread coneonthefloor
Thank you, that is really helpful feedback. I have seen the "dot" syntax, I wasn't sure of how/when to use it. So I'll look into that. Good to know about the `error` too.

Sitemap Parser

2023-12-20 Thread ElegantBeef
Looking at the code there are a few things I'd suggest although relatively opinionated. Modules imported from stdlib should be prefixed with `std/[a, b, c,]`. proc hasURLSet(sitemapContent: string): bool = let doc = q(sitemapContent) let urlset = doc.select("urlset")

Nim v2: what would you change?

2023-12-20 Thread xigoi
> That is hindered by The Thing Which Cannot Be Mentioned. How so? As has been pointed out a million times, you can and should rename identifiers imported from C.

Nim v2: what would you change?

2023-12-20 Thread cdunn2001
I keep wanting to return to Nim. It's such a great language in so many ways. But the most compelling reason to use Nim -- the easiest argument to make with a team of developers -- is C/C++ interop. That is hindered by The Thing Which Cannot Be Mentioned. So I'm back to wishing Zig had macros. B

Advent of Nim 2023

2023-12-20 Thread denise_amiga
Hello everyone: I have a problem and I think there is some bug in the compiler or can you help me debug my code, because I am not able to understand why ONLY those entries do not work, the rest without problems but thoses 4 entries goes into a loop, doesn't even show the first entry on the map.

Sitemap Parser

2023-12-20 Thread coneonthefloor
Hi. I wrote this sitemap parser as a way to learn more about Nim and it's ecosystem. I would appreciate a code review and some general feedback, if anyone has time. Also it may be useful someone out there. Thank you, Brian

dApp Development Company | Decentralized App Development

2023-12-20 Thread Isofruit
Elaborate on why your post should not be regarded as Spam.

dApp Development Company | Decentralized App Development

2023-12-20 Thread elisa
dApp Development are helping you develop a sustainable decentralized project that can disrupt and excel in the blockchain landscape.Whether you are into finance or any other business, unlock the capabilities of decentralized app development with iMeta. As a leading blockchain dApp development co

Smart Hemp Gummies Australia - FACTS, SCAM UPDATED PRICE 2023

2023-12-20 Thread weberkami
Smart Hemp Gummies Australia :- Before delving similarly into the subject of protection, it is vital to notice that Smart Hemp Gummies Australia do now not treat or remedy health conditions or sicknesses. On the alternative hand, they're extremely effective at treating symptoms and preventing co