Suppressing non-exported fields in nim doc

2022-01-15 Thread cantanima
Looking further, this seems the easiest way short of modifying compiler types. Another alternative might be to add a boolean field to `TIdent` that indicates whether the identifier is exported. That would remove the need for the `nkPostfix` arrangement, as well as make the `isVisible` procedure

Nim Community Survey 2021

2022-01-15 Thread ElegantBeef
Way to remind me I need to make the writeup more detailed, it's an ok writeup mainly introducing how macros work (and I generally write them), but there are more detailed things it needs. Talking about typed vs. untyped is a big one I've been meaning to add. I dont think explaining the AST is th

Nim Community Survey 2021

2022-01-15 Thread ynfle
Are you asking for yourself or just commenting that Beef's article doesn't address that?

Nim Community Survey 2021

2022-01-15 Thread xioren
I hadn't seen that guide and I appreciate the effort, but speaking frankly it didn't "demystify" anything. Macros are one of the more complex aspects of Nim and require comprehensive and compounding explanations. This just isn't a topic you can gloss over. An issue with a lot of guides that I se

Suppressing non-exported fields in nim doc

2022-01-15 Thread cantanima
> There is currently no way to do that... OK, but is the current behavior desirable? Seems to me it's mistaken. Nim doc doesn't ordinarily display non-exported symbols. > ...but it would easy to improve the docgen. "Easy" may be a relative term. :-) Here's what I've figured out: * `T`'s fiel

Nim Community Survey 2021

2022-01-15 Thread ynfle
Have you seen @ElegantBeef's ?

Nim Community Survey 2021

2022-01-15 Thread xioren
Well I think there is a **strong** need for a full fledged macros tutorial. That is one place where the docs falls short imo.

Nim Community Survey 2021

2022-01-15 Thread xigoi
Agreed. I could write a tutorial, but I personally haven't found anything missing in the available resources, so I'd need to know what other people would want to see.

Namespaces for non-enums without customizing the import statement?

2022-01-15 Thread PMunch
The simplest way of doing this is to make your "namespace" an empty type and use it as an argument: type myNamespace = object proc test(_: typedesc[myNamespace], argument: string) = echo argument myNamespace.test("Hello world") Run This forces y

Namespaces for non-enums without customizing the import statement?

2022-01-15 Thread Arrrrrx2
Tuples maybe? let myNameSpace = ( val1: 1, proc1: proc = echo "hello world" ) myNameSpace.proc1() echo myNameSpace.val1 Run

Nim Community Survey 2021

2022-01-15 Thread hugogranstrom
I'm curious, have the graphs been made using Nim this year? Otherwise, tell us to remind you next year ;)

Nim Community Survey 2021

2022-01-15 Thread AMoura
About of the lack of tutorial, a survey to know on which subject to make new tutorials would be a good idea.

Nim Community Survey 2021

2022-01-15 Thread Araq
> This is the fourth year I'm observing and second I'm participating in the > survey, and I feel I don't fully get the methodology sometimes and don't > really understand what's the point of some questions. I bring this up every time before we start the survey and as a result the set of questio

Nim Community Survey 2021

2022-01-15 Thread Zoom
This is the fourth year I'm observing and second I'm participating in the survey, and I feel I don't fully get the methodology sometimes and don't really understand what's the point of some questions. > Do you use Nim? -> No, I've never used it. What do you measure here? People with enough inte

Python For Beginners

2022-01-15 Thread rishab
Python is a programming language that process needs to be done an introduction. Programming, web development, machine learning, and data science are just a few of the industries that use it. Python is considered as of the most basic programming languages to learn. That's one of the reasons Pytho

How can I implement a conditional access operator?

2022-01-15 Thread geekrelief
Thanks! The code referenced seems way shorter than what I came up with I'll have to look look more closely to see how I could simplify things. I attempted an anonymous proc approach earlier lik

How can I implement a conditional access operator?

2022-01-15 Thread rishab
great! thanks for sharing.

How does the pass statement differ from python?

2022-01-15 Thread rishab
great! thanks for sharing.

How does the pass statement differ from python?

2022-01-15 Thread rishab
Great! thanks for sharing.

Namespaces for non-enums without customizing the import statement?

2022-01-15 Thread argl
@xigoi well, give me the benefit of doubt and assume I would use it when useful and helpful, not to terrorize users of my lib. ;)

Namespaces for non-enums without customizing the import statement?

2022-01-15 Thread xigoi
Why would you want to force your preference to use a namespace on your library's users? Nim doesn't like namespaces because they make UFCS impossible. You can rewrite `join(words)` as `words.join`, but how would you rewrite `strutils.join(words)`? `words.(strutils.join)`? That's hideous.

Namespaces for non-enums without customizing the import statement?

2022-01-15 Thread argl
Motivation: In c++ I often used namespaces to group symbols within a header file. The intention being to ensure code using these symbols remains easy to read in regard which symbol is called. Omitting the namespace might be convenient for writing code but makes reading it harder. If needed, the

Nim Community Survey 2021

2022-01-15 Thread Araq
> If I recall correctly, I think I gave high priority to the “Fixing compiler > bugs” question, not because I’ve experienced serious bugs, but because I felt > it’s important _in principle and also because it was the closest question to > “improve the compiler” (e.g. improve the error messages…)

Nim Community Survey 2021

2022-01-15 Thread didlybom
If I recall correctly, I think I gave high priority to the “Fixing compiler bugs” question, not because I’ve experienced serious bugs, but because I felt it’s important _in [principle](https://forum.nim-lang.org/postActivity.xml#principle) and also because it was the closest question to “improv

llvm wrap

2022-01-15 Thread rforcen
thankx!, i sawed the nim-llvm, that's the 'whole thing', my idea was to build something that being practical is small and easy to understand as a starting point for something bigger

Novice Question: Implement the Step functionality in VBA

2022-01-15 Thread Araq
I've rarely seen a `while (if` construct. Nice one! :-)

Nim Community Survey 2021

2022-01-15 Thread Araq
My personal consequences from the survey: * We'll ask the community of which bugs to focus on (concrete issue number or issue "tag") for 2022. Maybe via a new survey? :-) * We're doing great in breaking nobody's code (ignoring the 1.6.2 fiasco that broke parts of the FFI) -- time to work on

How can I implement a conditional access operator?

2022-01-15 Thread PMunch
Have you tried the one in optionsutils? . It works on options and not "nullity" but you should be able to adapt it fairly easily.

Suppressing non-exported fields in nim doc

2022-01-15 Thread Araq
There is currently no way to do that but it would easy to improve the docgen.