Re: More convenient awk-style text processing with Nim

2020-06-12 Thread kaushalmodi
> includes a convenience iterator, rows, Looking at your example code, I think that `rows` should be `cols`? Because in your example, `r[0]` points to the first field or column and `r[1]` points to the second?

Re: What is -> in Nim?

2020-05-29 Thread kaushalmodi
I have some notes on that "proc type" syntactic sugar `->` here: [https://scripter.co/notes/nim/#proc-type-sugar](https://scripter.co/notes/nim/#proc-type-sugar)

Re: Doc generation fails

2020-05-28 Thread kaushalmodi
This issue is now fixed on devel, but there's another regression with `nim doc` \+ `runnableExamples`: [https://github.com/nim-lang/Nim/issues/14485](https://github.com/nim-lang/Nim/issues/14485) .

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
After [https://github.com/enthus1ast/nimAsyncHttpTools/pull/2](https://github.com/enthus1ast/nimAsyncHttpTools/pull/2), `simplehttpserver` compiles and runs well on my machine (RHEL 6.8).

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
@bung You do not have an Issues section on your fork. I wanted to ask you if the dependency on libzip can be made optional? (See [my message above](https://forum.nim-lang.org/t/6386#39399) ). The original `nimhttpd` builds and runs fine on my machine (RHEL 6.8), but trying to run your fork fail

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
Awesome! That is the winner! @Araq It would be now cool to bake that into nim :)

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
OK, it builds find after uninstalling `zip` and doing `nimble install zip@#head`. So the correct fix is: 1. Cut a new release of the `zip` nimble package 2. Cut a new release of your `finder` package with updated zip version in its dependency 3. Finally update your `static_server` package

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
ok. .now it compiles, but doesn't run: > could not load: libzip(|2).so(|.4|.2|.1|.0) I'll have to figure this out later. I am using an admin managed OS, a very old OS: RHEL 6.8 (Linux).

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
I tried your repo as well. I cloned it and did `nimble build`, but it failed with this: [http://ix.io/2nAa/text](http://ix.io/2nAa/text) It looks like the `psutil` dependency needs to be updated for a backward incompatible change that happened in nim 1.0.0. Now we have `isDigit` taking only `ch

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
The aim of my post was if there's a way that Just Works for kicking off an adhoc server, like `python3 -m http.server` does, **and** then have that baked into nim as well.

Re: Is there a command line one-line to start an HTTP server using Nim?

2020-05-28 Thread kaushalmodi
Hello, I cloned your repo and did `nimble build`. It failed with this error: [http://ix.io/2nA6/text](http://ix.io/2nA6/text) I am using the latest nim devel.

Is there a command line one-line to start an HTTP server using Nim?

2020-05-27 Thread kaushalmodi
Using python, one can trivially fire off an HTTP server to serve the files from the current directory using: python3 -m http.server Run Is there an equivalent one-liner for Nim?

Re: Can I "prune" directories with walkDirRect?

2020-05-27 Thread kaushalmodi
Wow!.. why is it in **cligen** though? It looks like it can be a separate `find`-competition package :)

Re: Doc generation fails

2020-05-27 Thread kaushalmodi
I have reported this in issue [https://github.com/nim-lang/Nim/issues/14473](https://github.com/nim-lang/Nim/issues/14473) . Thanks for providing that minimal example.

Re: Doc generation fails

2020-05-27 Thread kaushalmodi
I have seen a similar issue on nim devel too. I am trying to create a reproducible example for that. I also see runnableExamples trying to get executed from sequtils.. My Nim module does import sequtils, but there are no runnableExamples in it. Also, I think this issue happens when I have \--pa

Re: Doc generation fails

2020-05-27 Thread kaushalmodi
This happens on nim devel (the version should be 1.3.5). I see that you are using nim stable 1.2.0.

Re: GitHub Actions: workflow to cross compile and release to GitHubRelease

2020-05-22 Thread kaushalmodi
It's on my list to learn GitHub Actions. I just had a comment about the NimScript task archive. You can put that into a global config.nims of yours which you pull in before building all of your projects. I have started using [this minimal config.nims](https://github.com/kaushalmodi/ve

Re: Checking the gcc/g++ versions used to compile nim program vs the dyn linked .so

2020-05-20 Thread kaushalmodi
Turns out that this issue was because of some mixup in the LD_LIBRARY_PATH. Once was was fixed, the nim program built with even g++ 9.1.0 links fine with the external_lib_64.so built with g++ 6.3.0.

Checking the gcc/g++ versions used to compile nim program vs the dyn linked .so

2020-05-20 Thread kaushalmodi
Hello, Today I came across this run time error when running a nim compiled program that dynamically linked with an external c++ library .so (let's call it `external_lib_64.so`) could not load: external_lib_64.so compile with -d:nimDebugDlOpen for more information

Re: Conflict of nfatype.Regex and nre.Regex

2020-05-15 Thread kaushalmodi
glob anyways imports the regex module ( [https://github.com/nitely/nim-regex](https://github.com/nitely/nim-regex) ). So you might as well just use that instead of importing nre. nre will introduce a dependency on PCRE on your app, while the nim-regex module won't.

Re: Markdown test

2020-05-13 Thread kaushalmodi
Thanks, except for those bold/italics, other rendering (especially the Markdown link syntax) is nicely supported in the newer nimforum version: [https://forum.my-toolbox.xyz/t/6](https://forum.my-toolbox.xyz/t/6)

Markdown test

2020-05-13 Thread kaushalmodi
Testing quote block: > some quote echo "hello" Run _[Italics](https://forum.nim-lang.org/postActivity.xml#italics) **Bold** _ **Bold and italics** _ [Nim website]([https://nim-lang.org](https://nim-lang.org)) ## heading level 2 ## heading level 3

Re: runnableExamples Question

2020-05-11 Thread kaushalmodi
This is now fixed in nim devel. Now I auto-generate the docs for Std::Vector Nim wrapper ( [https://github.com/kaushalmodi/std_vector](https://github.com/kaushalmodi/std_vector) ) to [https://kaushalmodi.github.io/std_vector](https://kaushalmodi.github.io/std_vector)/ .

Re: runnableExamples Question

2020-05-08 Thread kaushalmodi
@timotheecour has this feature addition in a pending PR in [https://github.com/nim-lang/Nim/pull/14278](https://github.com/nim-lang/Nim/pull/14278) . It should be merged soon it seems :)

Re: Nim's strutils.split() slower than Python's string split()?

2020-04-25 Thread kaushalmodi
@krtekz Awesome! Also make sure you share your optimized final code here for anyone who ends up on this thread in future :)

Re: What's the most favourable way to get documentation as an automated process?

2020-04-23 Thread kaushalmodi
@shashlick Did you have something in works that generated JSON Nim docs?

Re: How to write shell scripts in Nim

2020-04-05 Thread kaushalmodi
I have a bit involved NimScript: [https://github.com/kaushalmodi/nim_config/blob/master/config.nims](https://github.com/kaushalmodi/nim_config/blob/master/config.nims) See if going through it and referring to docs helps you.

Re: Nim 1.2 is here

2020-04-03 Thread kaushalmodi
> I think it's for reducing unneeded allocations? Is it correct? That would be my guess. But I am not on expert on that. Hopefully someone else can give a thorough answer for that. > dup stands for "duplicate"? Yes.

Re: Nim 1.2 is here

2020-04-03 Thread kaushalmodi
I have taken the `dup` example from the 1.2 release notes and have refactored it a bit to help better explain this feature: [https://play.nim-lang.org/#ix=2gxD](https://play.nim-lang.org/#ix=2gxD) Basically the `dup` macro helps **resuse** a proc that had (1) mutable arg and (2) no return type

Re: Announcement: The Nim compiler is rewritten in Python with some modules optimized in C

2020-04-01 Thread kaushalmodi
Read that post, peek at the calendar and have a laugh ;-)

Re: ggplotnim - pretty native plots for us

2020-03-22 Thread kaushalmodi
ggplotnim is an amazing library and @Vindaar's support has been excellent! I have been using it in a convoluted (pun intended) way -- using to plot FFT's of analysis done in MATLAB via its exported-to-C libs importc'd into Nim.

Re: examples or documentation of Source Code filters

2020-03-21 Thread kaushalmodi
It can be used to generate any templated file you like. I have used it to generate SystemVerilog and HTML files. What are you trying to achieve and where do you need help with the Source Code Filters?

Re: FFI: how to avoid naming arguments in C functions

2020-03-08 Thread kaushalmodi
Also related to your C library wrapping project, have a look at [https://github.com/nimterop/nimterop](https://github.com/nimterop/nimterop). Using that, I have successfully wrapped quite a few C libraries, and this is coming from someone who has never coded in C (of course, some learning curve

Re: FFI: how to avoid naming arguments in C functions

2020-03-08 Thread kaushalmodi
Related to your plotting application, also have a look at ggplotnim: [https://github.com/Vindaar/ggplotnim](https://github.com/Vindaar/ggplotnim) . It helps me make things like:

Re: Nested list comprehension

2020-03-06 Thread kaushalmodi
> how about you first get familiar with the correct Nim syntax for them? link Wait, you are linking against the deprecated lc syntax. I believe the closest non-deprecated solution is [https://github.com/alehander92/comprehension](https://github.com/alehander92/comprehension) ?

Re: Nim's float issue?

2020-02-25 Thread kaushalmodi
Wow! I didn't know of [https://float.exposed/](https://float.exposed/). Cool website!

Re: Nim's float issue?

2020-02-25 Thread kaushalmodi
Your answer was nice but I think you it was equally helpful without: > It's a bit hard to believe that this is a serious question because of.. and > But maybe you missed that and have no CS experience. I think most people would have stumbled across this in one programming language or another.

Re: Generate XML file with xmltree [nesting format issue]

2020-02-24 Thread kaushalmodi
I have attempted to fix this issue in this PR: [https://github.com/nim-lang/Nim/pull/13482/files](https://github.com/nim-lang/Nim/pull/13482/files) XML/xmltree experts: Please review that PR and help me make it better!

Re: Generate XML file with xmltree [nesting format issue]

2020-02-24 Thread kaushalmodi
It's probably because you are using `newXmlTree` for both **channel** and **rss** tags. May be you should use `newElement` for **channel** too? _PS: I am just guessing; I haven 't used this library._

Re: Pipe operator in Nim

2020-02-16 Thread kaushalmodi
In case you weren't aware you can indent . chaining in Nim like this too if you like: [https://play.nim-lang.org/#ix=2bRv](https://play.nim-lang.org/#ix=2bRv)

Re: I made a simple tutorial on how to create a CLI with Nim

2020-02-08 Thread kaushalmodi
> slightly less flexibility Re help messages. Now you're just being modest. `cligen` is awesome!! I can't think of starting a new CLI project without cligen now. What "slight less flexibility"? It has much more flexibility than I can think of (this is a compliment) :)

Re: Nim 1.0.6 is out!

2020-01-28 Thread kaushalmodi
Oops! In hurry, I pointed to a 1.0.6 nightly build.

Re: Nim 1.0.6 is out!

2020-01-28 Thread kaushalmodi
Windows builds are also done. Try this few days older nightly build which has windows too: [https://github.com/nim-lang/nightlies/releases/tag/2020-01-23-version-1-0-89b39ee](https://github.com/nim-lang/nightlies/releases/tag/2020-01-23-version-1-0-89b39ee)

Re: runnableExamples Question

2020-01-27 Thread kaushalmodi
Yeah that's a local hack (that works).. the back is in the associated closed PR. The real fix is pending because I don't know yet how to add the `--backend` switch just to the `doc` subcommand.

Re: runnableExamples Question

2020-01-27 Thread kaushalmodi
I needed this feature few weeks back and opened this issue: [https://github.com/nim-lang/Nim/issues/13129](https://github.com/nim-lang/Nim/issues/13129). It's on my list to try to implement the suggested `-backend` switch for `nim doc` that uses the specified backend for compiling and running th

Re: How to find the path to nim lib from the command-line

2020-01-24 Thread kaushalmodi
Yes, that code relies on the directory containing the nim binary (usually bin/) and the Nim lib/ directory to have the same parent directory. But the PR that timothee has submitted should resolve that issue.

Re: How to find the path to nim lib from the command-line

2020-01-23 Thread kaushalmodi
I do it this way: [https://scripter.co/notes/nim/#nim-stdlib-path](https://scripter.co/notes/nim/#nim-stdlib-path)

Re: What is the keyword "end" reserved for?

2020-01-16 Thread kaushalmodi
**end** is used (and required for `if`) in the [Nim Source Code Filters](https://nim-lang.github.io/Nim/filters).

Re: Nim wrapper for C++ std::vector? [request]

2020-01-10 Thread kaushalmodi
I made some progress! @mratsim, the `[]` proc imports from your snippet proved very useful. I can finally loop through the `Vector` values. The only puzzle is.. how do I use the `VectorIterator` imported from the vector lib? My updated wrapper: [https://play.nim-lang.org/#ix=271H](https://play

Re: Nim wrapper for C++ std::vector? [request]

2020-01-10 Thread kaushalmodi
@deech Thanks. That will serve as a useful reference. I looked through it, but it doesn't give an example on how to use the `vector::iterator` type. Just by fluke, I replaced the `begin` and `end` proc types to be `ptr T` instead of the iterator, and it returns the begin and end pointers.. thou

Re: Nim wrapper for C++ std::vector? [request]

2020-01-10 Thread kaushalmodi
Also, this construct: type Vector* {.importcpp: "std::vector", header: "vector".} [T] = object Run gives this warning: > Warning: pragma before generic parameter list is deprecated [Deprecated] What is the right way to import that type so that I do not get that

Re: Compilation error after upgrade to 1.0.2 from 0.19

2020-01-09 Thread kaushalmodi
This works on the latest Nim release (should work on 1.0.2 too): [https://play.nim-lang.org/#ix=26Zl](https://play.nim-lang.org/#ix=26Zl)

Nim wrapper for C++ std::vector? [request]

2020-01-09 Thread kaushalmodi
Hello, Has anyone written a Nim wrapper for the C++ std::vector library (even incomplete)? I started putting it together using bits and pieces I found from googling, but as I don't know C++, I reached a roadblock very soon when I tried to map the std::vector::iterator and associated procs like

Re: Advent of Nim 2019 megathread

2019-12-07 Thread kaushalmodi
My first time participating in Advent of Code! [https://github.com/kaushalmodi/aoc2019](https://github.com/kaushalmodi/aoc2019) :)

Re: Help with set

2019-12-05 Thread kaushalmodi
> there is not need in auto inferring, since type of x well-known before, and > it can not be changed implicitly by Nim rules. It's the job of the compiler to ensure that the type of the value on right hand side matches with the type on left hand side. I cannot rely on the user always doing the

Re: Help with set

2019-12-05 Thread kaushalmodi
> why does it work with char?

Re: Help with set

2019-12-05 Thread kaushalmodi
Nim is a compiled language. So at the time of compilation, it checks if the value assigned to a variable fits the type of the variable in the declaration. Nim auto-infers the type looking at the **right hand side** of an assignment. So .. type CharSet = set[int16]

Re: Help with set

2019-12-05 Thread kaushalmodi
Specifying the type only for the first literal also works.. [https://play.nim-lang.org/#ix=23CE](https://play.nim-lang.org/#ix=23CE).

The authors of the Nimacros project stopped working on that book

2019-11-23 Thread kaushalmodi
Hello, Today I was surprised to see this commit where the Nimacros authors stopped working on that project and deleted all the past work from the repo: [https://github.com/FemtoEmacs/nimacros/commit/bcadfcd40fcd4070f566accf8daaada781e9386c](https://github.com/FemtoEmacs/nimacros/commit/bcadfcd40

Re: Get nimble file directory from within nimble file hook

2019-11-20 Thread kaushalmodi
Can you show with an example where the "original directory" is, where the .nimble is, and what path you are trying to get?

Re: difference between ; and , as proc parameter separator

2019-11-17 Thread kaushalmodi
See the first 3 examples in [https://nim-lang.github.io/Nim/manual#procedures](https://nim-lang.github.io/Nim/manual#procedures). `;` is used to explicitly break the type propagation. In most use cases though (when not using `using`), there's not much distinction between `;` and `,`.

Re: Array vs tuple for procs returning multiple values of same type

2019-11-16 Thread kaushalmodi
I'd just use a tuple or object for that.

Re: Nimdoc: example of nimscript

2019-11-14 Thread kaushalmodi
I have few NimScript tasks which you can see in my repo's README: [https://github.com/kaushalmodi/nim_config/blob/master/README.org#list-available-tasks](https://github.com/kaushalmodi/nim_config/blob/master/README.org#list-available-tasks) Those tasks are defined in the config.nims in that

Re: ``Table.take`` should be ``Table.pop`` -- discuss

2019-11-13 Thread kaushalmodi
+1 for pop.

Re: how return false or value?

2019-11-08 Thread kaushalmodi
Have a look at [https://nim-lang.github.io/Nim/options](https://nim-lang.github.io/Nim/options) .

Re: A super newbie git-related question

2019-11-08 Thread kaushalmodi
> git rebase is much better than git merge for branches because it keeps the > history clean. Yes, please do not do merges if the commit history can be linear (using rebases, cherry picks, etc).

Re: Using Shared Libraries written in Nim via FFI

2019-11-06 Thread kaushalmodi
I have ended up with the same set of questions today. Hopefully someone can answer.

Re: Nim equivilent of Python's slicing with step list[start: end: step]

2019-11-03 Thread kaushalmodi
Not exactly what you were looking for, but here's a related fun little snippet: [https://play.nim-lang.org/#ix=20Hp](https://play.nim-lang.org/#ix=20Hp)

Re: Nim equivilent of Python's slicing with step list[start: end: step]

2019-11-03 Thread kaushalmodi
If you use countUp in the loop, it will optimize your code a bit as it accepts the step size.

Re: Creating a type that is a non-contiguous subset of char?

2019-10-30 Thread kaushalmodi
May be something like this? [https://play.nim-lang.org/#ix=20nQ](https://play.nim-lang.org/#ix=20nQ)

Re: Why aren't uin64 and usize ordinal types?

2019-10-01 Thread kaushalmodi
Nim internally has an int128 to fully handle uint64. Now to fully support uint128, it will need an internal int256! :P

Re: Lambdas?

2019-09-28 Thread kaushalmodi
Being a Lisp fan too (Nim fan of course), I have a section for ["Lambdas in Nim"](https://scripter.co/notes/nim/#lambda) in my Nim notes.

Re: How do nim users who have some proficiency in Lisp compare the two?

2019-09-28 Thread kaushalmodi
tps://nim-lang.github.io/Nim/macros#lispRepr%2CNimNode)), Nim templates can be redefined as you can do lisp expressions, you can easily introspect the types of variables and procs, as you can do in lisp. I even started this fun project [elnim](https://github.com/kaushalmodi/elnim). > Are the

Re: Newbie experience with the documentation

2019-09-28 Thread kaushalmodi
You got the colon and parens in reverse order. But I came to say here this. Once you know the consistent style of proc signatures, it's really easy to search for things. The procs are defined as: proc foo(arg1: Type1; ..): ReturnType = Run So to search for procs retu

Re: Nim source size

2019-09-27 Thread kaushalmodi
yeah, but I would be surprised if a GNU/Linux distribution did not have gcc, git, curl and find (that script is for a GNU/Linux system).

Re: Nim source size

2019-09-27 Thread kaushalmodi
On Linux, I just run this for deploying Nim at work: [http://ix.io/1X9Y/bash](http://ix.io/1X9Y/bash) It results in a meager 19MB install size.

Re: How to change C compiler globally on Linux?

2019-09-26 Thread kaushalmodi
> seems weird to me that they are closed even though it still doesn't work. I think you should open new issues with recipes to reproduce the problem.

Re: How to change C compiler globally on Linux?

2019-09-25 Thread kaushalmodi
I'm on RHEL 6.8. I put a `config.nims` in `$XDG_CONFIG_HOME/nim/` and that works fine.

Re: The Practical Dev section

2019-09-16 Thread kaushalmodi
This post is probably referring to [https://dev.to/t/nim](https://dev.to/t/nim).

Re: Split on whitespace except for between quotes

2019-09-07 Thread kaushalmodi
Assuming that that input is from the command line, you can use the inbuilt commandLineParams() instead of manually parsing it (example in my notes: [https://scripter.co/notes/nim/#command-line-parameters)](https://scripter.co/notes/nim/#command-line-parameters\)). Though, I use the **cligen** pa

Re: How does the pass statement differ from python?

2019-09-06 Thread kaushalmodi
> So I'm wondering why does the following code get compiled Because it comes from jester: [https://github.com/dom96/jester/blob/dc74a797ebca15e4f1b46a7f2e1f4e733b1c5ee2/jester.nim#L588](https://github.com/dom96/jester/blob/dc74a797ebca15e4f1b46a7f2e1f4e733b1c5ee2/jester.nim#L588)

Re: Linters in Emacs

2019-08-29 Thread kaushalmodi
I haven't used flymake, and I have used flycheck only for shell scripts (it checks Bash scripts using shellcheck, and it's pretty awesome).

Re: Linters in Emacs

2019-08-29 Thread kaushalmodi
I believe it has to do with nimsuggest. I tried using flycheck about a year ago and nimsuggest froze more often than not.. so I ended up disabling nimsuggest, and thus flycheck for nim-mode.

Re: how to run single test among all tests?

2019-08-21 Thread kaushalmodi
> Can I turn off all the hints? In your test directory, you can create a `config.nims` and put this in there for all the hints that you want to hide: hint("Processing", false) # Do not print the "Hint: .. [Processing]" messages when compiling Run

Re: Can the return value of a proc be a variable marked {.global.} ?

2019-08-20 Thread kaushalmodi
> I don't think it really argues/advises against @mratsim's warning/hint > solution. Correct. The hint is fine. I was just saying that setting the default to `-d:release` would just switch to the other problem bucket.

Re: Can the return value of a proc be a variable marked {.global.} ?

2019-08-20 Thread kaushalmodi
I have come across a scenario where the gcc -O2/-O3 "over-optiimized" the code and that resulted in a buggy behavior. So I needed to put a note to **not** pass the `-d:release` switch for that project. The discussion was on Nim IRC few months ago.

Re: Nim vs. Python & Groovy (string splitting): Why is string splitting so slow in Nim?

2019-08-19 Thread kaushalmodi
This needs some nice exposure. Please consider blogging about it somewhere :)

Re: Default implementation of generic proc

2019-08-08 Thread kaushalmodi
Dumb question.. wouldn't it then make sense to define your "default type proc"? proc returnZero[T]() : T = return T(0) proc returnZeroDefault() : float = return returnZero[float]() echo returnZeroDefault() echo returnZero[int]() Run [ht

Re: What text editor are you using for Nim?

2019-08-07 Thread kaushalmodi
> Nah, it's a pretty known fact. This is a case that Spiderman's uncle talked about: "With great power comes great responsibility". With the possibility to tweak Emacs anyhow one likes, that also increases the chances of one badly tweaking Emacs. One should not blindly paste configs from other

Re: What text editor are you using for Nim?

2019-08-07 Thread kaushalmodi
> And Emacs itself tends to be somewhat unresponsive, as evidenced by the very > first posts in this thread. That's a grossly incorrect generalization. I agree that Emacs has a weak spot when handling long lines. I have been using Emacs for 14+ years, and I never came across that limitation, ma

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
Oops, I was playing with the longlines.nim and did not run nimpretty on that last modified version. But rest assured, that asdf was manually typed by me :D

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
You are right; may be nim-mode is exacerbating the slowness issue. I haven't come across this issue as I limit the number of chars per line to around 80. Try using `nimpretty` that ships with Nim. With a `longlines.nim` ( [http://ix.io/1QnF](http://ix.io/1QnF) ), running `nimpretty longlines.n

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
> Emacs slows down when you have long lines I agree, but that would be a rare case where you have a single line unprettified JSON or something like that. How long are your lines in Nim? I default to 80 chars per line. For Emacs, "too long" lines would be in the range of upper hundreds of chars

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
> I am using version 25.1 The latest stable release as of today is 26.2, which I would recommend upgrading to. I am on the latest master build of emacs (27.x).

Re: What text editor are you using for Nim?

2019-08-02 Thread kaushalmodi
Emacs here, using mostly the default key bindings. About the slowness, you probably just need to disable the `nimsuggest-mode`. I haven't noticed any slowness when editing Nim code (or anything) in Emacs.

Re: Passing a type through a macro?

2019-07-23 Thread kaushalmodi
I don't have the full solution, but I believe a `static` type `typedesc` arg will get passed without conversion to NimNode? I think there's an example in tut3.

Re: get a type via a string?

2019-07-20 Thread kaushalmodi
This is very related: [https://forum.nim-lang.org/t/5027#31537](https://forum.nim-lang.org/t/5027#31537). Does that help?

Re: Get AST for type in macro

2019-07-18 Thread kaushalmodi
You are welcome! I am surprised I was able to answer a macro-related question :D (Well, my Nim macro knowledge is limited to just about that :P).

Re: Get AST for type in macro

2019-07-18 Thread kaushalmodi
@GULPF Do you mean something like this? [https://play.nim-lang.org/#ix=1MUr](https://play.nim-lang.org/#ix=1MUr) (click Run, and if the tab next to is says "Showing: output", click on that so that it switches to "Showing: debug").

Re: Get AST for type in macro

2019-07-18 Thread kaushalmodi
Using your example: [https://play.nim-lang.org/#ix=1OOM](https://play.nim-lang.org/#ix=1OOM)

  1   2   >