Re: NEWBIE - cannot find libraries when linking

2018-08-06 Thread juancarlospaco
You just need the full path to `x86_64-w64-mingw32-gcc` and nimble on the `$PATH` everything else is not required. Example: `nim c --cpu:amd64 --os:windows --gcc.exe:/usr/bin/x86_64-w64-mingw32-gcc --gcc.linkerexe:/usr/bin/x86_64-w64-mingw32-gcc hello.nim`

Re: A tutorial for cross-compiling to Windows on a Linux machine?

2018-08-12 Thread juancarlospaco
`--embedsrc` is not really needed, and can make fat binaries IMHO, but looks good.

Re: Can you leave a link to download the Nim in Action book in pdf / djvu format?

2018-08-12 Thread juancarlospaco
You can still use BTC at 15...

Re: A tutorial for cross-compiling to Windows on a Linux machine?

2018-08-09 Thread juancarlospaco
> $ mkdir /tmp/test_nim_crosscompile > > $ cd /tmp/test_nim_crosscompile/ > > $ echo 'echo "Hello World"' > hello.nim > > $ nim c --cpu:amd64 --os:windows --gcc.exe:x86_64-w64-mingw32-gcc > --gcc.linkerexe:x86_64-w64-mingw32-gcc hello.nim > > $ wine hello.exe > > Hello World Crosscompile

Re: Cross-compiling [Win->Lin]

2018-08-17 Thread juancarlospaco
You answer your own question. Get full mingw I think.

Re: subrange and succ()

2018-07-22 Thread juancarlospaco
That `succ`'s 

Re: Using the MEGA API

2018-08-31 Thread juancarlospaco
On that repo they recommend to use [https://github.com/meganz/megacmd#megacmd---command-line-interactive-and-scriptable-application](https://github.com/meganz/megacmd#megacmd---command-line-interactive-and-scriptable-application) as an high level lib/app if you are not interested on the core and

Re: [Help]ending "" instead of new line in echo and no need to delcare var to use the proc

2018-09-04 Thread juancarlospaco
**1** import pylib print("Hello " , endl=" ") Run This needs `nimble install pylib`. **2** import strutils var s = " hello ".strip() Run **3** I dont understand. The Forum uses RestructuredText as markup.

Re: How to use com in Nim ?

2018-09-09 Thread juancarlospaco
I know dont about COM and Windows in general, but if you dont put a return type it does not return. Try `proc GetExcelObject(): auto =` ?

Re: easy way to convert between different data types?

2018-09-06 Thread juancarlospaco
Check PyLib on Nimble.

Re: Has anyone wrapped GR?

2018-08-30 Thread juancarlospaco
Do it. Seems like a super cool framework...

Re: Sequtil Question

2018-09-07 Thread juancarlospaco
> import future, sequtils > > filterIt(lc[i | (i <\- 0..9), int], it < 3).echo

Re: runnableExample considered harmful / good feature to deprecate before 1.0?

2018-10-05 Thread juancarlospaco
The problem is one thing is what you write here as Design in Theory, and other different is what happens in Practice in real life. Python also has this "Code on Comments", almost all IDE wont give you the features (highlight, lint, etc) on the code portion of the comments, basically they

Re: how to increase velocity for merging PRs?

2018-10-07 Thread juancarlospaco
delegate tasks

Re: runnableExample considered harmful / good feature to deprecate before 1.0?

2018-10-08 Thread juancarlospaco
Theres not much _guessability_ on Markdown + custom plugins neither, I love Markdown, but Markdown with custom plugins are basically Hacks.

Re: Trying to learn templates, but its hard to understand.

2018-10-11 Thread juancarlospaco
With choosenim is 1 command to switch versions, super friendly.

Re: Need gzopen(filename, mode...) proc with similar behaviour to open(filename, mode...)

2018-10-12 Thread juancarlospaco
nimarchive ?.

Re: should we deprecate nim.cfg in favor of config.nims format?

2018-10-23 Thread juancarlospaco
If you dont have a config that is not code it can be considered a Blocker to adopt the new technology. If its code it needs Unittests. (Always talking about corporate environments).

Re: R-style logical vector operations in Nim?

2018-10-31 Thread juancarlospaco
Templates ?.

Re: should `computedGoto` be always implied ? (ie make computedGoto noop)

2018-11-01 Thread juancarlospaco
If the table is huge it can use more memory than a "naked" switch ?, probably not, no idea.

Re: Proper compiler options for release build

2018-11-02 Thread juancarlospaco
If you need smaller binary `-d:release --opt:size`. Linux and OsX should have a `strip` command to strip binaries with `strip --strip-all`. I think MinGW has that on Windows too.

Re: should `computedGoto` be always implied ? (ie make computedGoto noop)

2018-11-02 Thread juancarlospaco
I was wondering how long your `switch` needs to be to use stuff like `computedGoto` or `linearScanEnd` ?. Because if you have >100 lines of `switch` obviously it makes sense, but if you use it on a switch that only has like 3 options, is considered bad style?

Re: Do we really like or need single letter prefixes like w, m... in public libs?

2018-11-09 Thread juancarlospaco
https://nim-lang.org/docs/apis.html

Re: What do I call this Part?

2018-11-10 Thread juancarlospaco
`runnableExamples` are runnable examples, named runnable examples and its the only name for it, they run with `nim doc file.nim` and generate self-documentation, they can be indented by 4 spaces, but best practice is indented by 2 spaces.

Re: Proper compiler options for release build

2018-11-10 Thread juancarlospaco
is to allow Debugging.

Re: What do I call this Part?

2018-11-10 Thread juancarlospaco
They can live outside too, I add them at the bottom of the main file for example, they get rendered on the Documentation as Examples of how to use the code, etc.

Re: Macro that generates procs

2018-11-16 Thread juancarlospaco
[https://github.com/juancarlospaco/nim-presentation-slides/blob/master/ejemplos/avanzado/macros/macro_from_string.nim](https://github.com/juancarlospaco/nim-presentation-slides/blob/master/ejemplos/avanzado/macros/macro_from_string.nim) More examples on the same folder.

Re: Macro that generates procs

2018-11-16 Thread juancarlospaco
I think `&" "` and `fmt" "` wont work inside a macro, use `" " & " "` or `format( )`.

GC V2 features

2018-11-05 Thread juancarlospaco
I was reading about the 6 GC that Nim has to choose, I cant find any documentation and `V2` is not a concrete algorithm, can someone explain please ?. TLDR description: * `markAndSweep`: Fastest, uses more RAM. * `Boehm`: Slowest, uses less RAM. * `Go`: Go lang like implementation. *

Re: GC V2 features

2018-11-06 Thread juancarlospaco
Thanks for the time responding, sounds nice. 

Re: why var can not be declared this way?

2018-11-05 Thread juancarlospaco
`var` is Not read-only.

Re: GC V2 features

2018-11-06 Thread juancarlospaco
Custom mark Is planned to get Removed or Fixed?.

Re: GC V2 features

2018-11-06 Thread juancarlospaco
Thanks!. I was thinking Regions were a "Copy" GC that one that moves everything into another place of the memory. Nice to see the RefC is custom like that, sounds interesting.

Re: Any suggestion on scheduling a job in nim?

2018-11-14 Thread juancarlospaco
Redis lib at Nimble. I also made an `at` wrapper.

Re: runnableExamples should generally be preferred to `.. code-block:: nim`

2018-10-03 Thread juancarlospaco
Some of my `runnableExamples` also has `.. code-block:: nim` ;P Actually I changed from `when is_main_module:` to `runnableExamples` (for libs), is the correct way. I think is an awesome feature, because other lang have DocTests or the like (Python, Rust, etc), but the code is on comments,

Re: runnableExample considered harmful / good feature to deprecate before 1.0?

2018-10-04 Thread juancarlospaco
Oh, you are just Trollin' _yawns_

Re: runnableExample considered harmful / good feature to deprecate before 1.0?

2018-10-04 Thread juancarlospaco
Nims RST also can chew some Markdown too, just try it. All Nim code is "real" I guess. Rust uses "Code on Comments" and often not highlighted, linted, smart autocompleted, etc as actual code. (Yes Ive used some Rust on modern IDE) You can just write runnableExamples on a separate file and

Re: AddOns to Nim? (a bit similar to rubygems.org + projects)

2018-10-08 Thread juancarlospaco
[http://nimble.directory](http://nimble.directory) ?

Re: runnableExample considered harmful / good feature to deprecate before 1.0?

2018-10-09 Thread juancarlospaco
Python DocTests get deleted in the long run (>15 years coding Python).

Re: Quick Start Documentation

2018-10-10 Thread juancarlospaco
[https://github.com/juancarlospaco/nim-presentation-slides/blob/master/nim-en.md#intro-to-nim](https://github.com/juancarlospaco/nim-presentation-slides/blob/master/nim-en.md#intro-to-nim) [https://github.com/juancarlospaco/nim-presentation-slides/tree/master/ejemplos/basico](https://github.com

Re: runnableExample considered harmful / good feature to deprecate before 1.0?

2018-10-10 Thread juancarlospaco
The word _Test_ is blurry, are you referring to Unittests or just test, you can add an `assert` anywhere, `assert` are removed when compiled for Release :P

Re: Are Source Code Filters still needed now that we have strformat?

2018-10-01 Thread juancarlospaco
Improve but dont deprecate. FMT string dont have syntax highlight, autocomplete of html elements, for loops, while loops, if, else, etc etc.

Re: unary operators are often best replaced by explicit names, eg: `%*` => toJson

2018-10-04 Thread juancarlospaco
I  `%*`

Re: runnableExamples should generally be preferred to `.. code-block:: nim`

2018-10-04 Thread juancarlospaco
You dont have to, put it on another file and include it. 

Re: Type inference and pragma issues in lambdas

2018-10-07 Thread juancarlospaco
`(func: auto = "Lambda")() ` Run

Re: Nim forum features

2018-09-20 Thread juancarlospaco
Its Open Source, add the features you want: [https://github.com/nim-lang/nimforum](https://github.com/nim-lang/nimforum) 

Re: Please help me to understand templates in nim

2018-09-20 Thread juancarlospaco
You are mixing a lot of Nim stuff on the same question, and get confused. Function calls: echo "a" echo("b") echo"c" "d".echo "e".echo() Run * `echo"c"` is equal to `echo( r"c" )`. The minimal possible example of Templates: template

Re: httpclient issues with iterating and requesting items in seq

2018-09-21 Thread juancarlospaco
You can use `strformat` then `fmt"some literal string with {variables} inside {1+1}"` Kinda like Python3 F-Strings. `content.split(“\n”)` I think can be `content.splitLines`

Re: Nim source equivalent to C #define

2018-09-26 Thread juancarlospaco
{. emit: """#define SOMEOPTION""" .} Run Literal, For C target.

Nim developer retention data and out-of-date packages

2018-09-26 Thread juancarlospaco
Some people are just waiting for v `1.0`

Re: Nim alternative to "With" in VB.Net and other basic dialects

2018-09-25 Thread juancarlospaco
If you giving pure source code nim files, then they have Nim in their PC, to compile/run it, if they have Nim they also have Nimble, because it comes with Nim, then they have Cascade because Nimble gets it for you. If you giving Compiled nim files, they dont need Nim nor Nimble nor Cascade nor

Re: Nim alternative to "With" in VB.Net and other basic dialects

2018-09-25 Thread juancarlospaco
Feel free to explore the Examples folders, it has 1 ~ 5 lines examples, all can run by itself: [https://github.com/juancarlospaco/nim-presentation-slides/tree/master/ejemplos/basico](https://github.com/juancarlospaco/nim-presentation-slides/tree/master/ejemplos/basico) Theres also

Re: How to achieve "mechanical substitution" like C macro

2018-12-29 Thread juancarlospaco
Term Rewriting Templates?.

Re: Convincing my friend about Nim

2018-12-31 Thread juancarlospaco
I never seen C# outside of MS Windows and related. Just say that indentation brackets on Nim are written like `#{` and `#}` ;P

Re: [help needed] nim version of: COMPARING PYTHAGOREAN TRIPLES IN C++, D, AND RUST

2019-01-02 Thread juancarlospaco
`markAndSweep` ?.

Re: Nim Advocacy & Promotion Strategies

2019-01-06 Thread juancarlospaco
Nim can take on Typescript, and should try. Nim types are a lot better than Typescript types. Typescript sucks, they suppose to innovate with types on vanilla JS, but in fact several langs has better types, even CoffeeScript was more revolutionary at its time than Typescript is nowadays,

Re: Global procedure access?

2019-01-16 Thread juancarlospaco
The code reordering experimental someday can improve this (?).

Re: Arraymancer - v0.4.0 (May 2018)

2019-01-16 Thread juancarlospaco
**Intro to Tensors** [https://github.com/juancarlospaco/nim-presentation-slides/tree/master/ejemplos/avanzado/tensorflow#intro-to-tensors](https://github.com/juancarlospaco/nim-presentation-slides/tree/master/ejemplos/avanzado/tensorflow#intro-to-tensors)

Re: Building Minimal Docker Containers for nim Applications

2019-01-17 Thread juancarlospaco
Nim does not depend on any `*.go` Theres `nimlang/nim` docker image.

Re: proposing new doc terminology for "compile-time" and "runtime"

2019-01-20 Thread juancarlospaco
You recommend changing compile time to analysis?, that sounds even more confusing. CT FFI may not be a primitive literal value, or does not feel like it. I feel that for JavaScript and NimScript runtime makes more sense that execution, no one says executing on the browser.

Re: yet another question on code substitution with templates

2019-01-17 Thread juancarlospaco
{. emit: """ #define DOP_COLOR(col) HIWORD(col), LOWORD(col) """ .} Run ?

Re: Purpose of this forum

2019-01-19 Thread juancarlospaco
Do it.

Re: Nim video lists

2018-12-18 Thread juancarlospaco
I am sure theres more on Twitch.

Re: How to parse JSON at compile time?

2018-12-18 Thread juancarlospaco
This would be nice as a Nimble module.

Re: Functional Programming in Nim

2018-12-20 Thread juancarlospaco
Do it.

Re: PEG.js-like API for the pegs module

2018-12-26 Thread juancarlospaco
Wrap PEG.js

Re: Arraymancer - v0.4.0 (May 2018)

2018-12-23 Thread juancarlospaco
Awesome work!, cool Xmas gift!. ;P

Re: How can we define a function that returns a type like a Union type?

2018-12-24 Thread juancarlospaco
`auto` ?.

Re: My experience with nim so far

2018-12-24 Thread juancarlospaco
If you type a lot, then you need Macros and Templates. You checked `byte` type?, up to 255, can be useful. Check the docs about defining compile variables, like `-d:somethingCustom` then `when defined(somethingCustom): # code here`.

Re: Need help for a generic object field

2018-11-24 Thread juancarlospaco
` type RectOrConvex: Rect | Convex ` Run

Re: What'd I miss?

2018-11-21 Thread juancarlospaco
The `func` is more funky now. The `future` is now `sugar`. `httpbeast` is fastest Server (for JSON data). A lot of cool modules on Nimble.

Re: TDD reference project

2019-01-03 Thread juancarlospaco
Wow!, great initiative and interesting lib!. :)

Re: [help needed] nim version of: COMPARING PYTHAGOREAN TRIPLES IN C++, D, AND RUST

2019-01-02 Thread juancarlospaco
`{.inline.}` and `uint` ?.

Re: New "Learn Nim" page

2019-01-10 Thread juancarlospaco
nim> for thingy in 0..9: if thingy mod 2 == 0: echo thingy 0 2 4 6 8 Run

Python Modules & why Python is better

2019-01-11 Thread juancarlospaco
, and taking some functions that often slows down your scripts, they result on 4 ~ 20 times faster. `pip install faster_than_requests` [https://github.com/juancarlospaco/faster-than-requests#faster-than-requests](https://github.com/juancarlospaco/faster-than-requests#faster-than-requests) * Faster simple

Re: openArray[(cstring,cstring)] parameter

2018-12-28 Thread juancarlospaco
`("key".cstring, "value".cstring)` ?, I am not sure if I understand the question tho...

Re: [Help]update nim ubuntu package

2018-09-13 Thread juancarlospaco
Use Choosenim ?

Re: Cannot call function with argument of Nim from Python3

2018-09-17 Thread juancarlospaco
`# Compile: nim c --app:lib --out:pymodule.so thisfile.nim import nimpy proc myfunction*(name: string): string {.exportpy.} = "Hello " & name ` Run

Re: Help with optimizing config.nims to create a musl target (static binary)

2018-09-13 Thread juancarlospaco
I just do: `nim --gcc.exe:/usr/bin/musl-gcc --gcc.linkerexe:/usr/bin/musl-gcc --opt:size c hello`

Re: Nim + Flutter == bright future?

2019-04-01 Thread juancarlospaco
I feel better with Bulma CSS Framework + Material Design Theme for Bulma, or Spectre CSS framework, or NimX. I tried Kivy, all the screenshots looks awesome, but the feel of the use is kinda clunky, you can check Kivy IDE made on Kivy on Desktop feels weird and alien, feels too Tablet'y. For

Re: How to compile and run a Nim program on the Android?

2019-04-01 Thread juancarlospaco
On Arch Linux theres a package named `android-sdk-ndk` and it installs everything by itself and all, then you can just compile for Android and it runs on Android Tablets (x86)

Re: How I feel about Nim

2019-04-01 Thread juancarlospaco
If you find the most libs from the most prominent members of Nim community too complex and sophisticated to use, then report a Bug. Believe it or not Developers cant read minds, so User feedback is very appreciated. (at least for my projects)

Re: Question about strutils

2019-04-07 Thread juancarlospaco
I think most cases are a balance between performance (speed) and resource usage (RAM). But probably someone else knows better...

Re: Nim Language group in London

2019-02-26 Thread juancarlospaco
[https://gettogether.community](https://gettogether.community) is an open source Meetup

Re: Config file location for loadConfig

2019-02-27 Thread juancarlospaco
`currentSourcePath().splitPath.head & "/config.ini"` If you need it compile time.

Re: Cross compile (Osx to linux) - how to

2019-03-01 Thread juancarlospaco
Docker for Mac.

Re: Convert string to char

2019-02-21 Thread juancarlospaco
Use the int ?. `assert char(10) == '\n'`

Re: Nim Language group in London

2019-02-22 Thread juancarlospaco
Start one!, would be cool to have groups all around the world, even if small ones. :D

Re: Can I use headless browser and capture the page?

2019-03-22 Thread juancarlospaco
[https://nimble.directory/pkg/xdo](https://nimble.directory/pkg/xdo)

Re: Msgpack to JSON (deserialisation)

2019-02-09 Thread juancarlospaco
Use `toJsonNode` and `fromJsonNode` to interact with stdlib's json module. [https://github.com/jangko/msgpack4nim/blob/master/tests/test_json.nim#L29-L56](https://github.com/jangko/msgpack4nim/blob/master/tests/test_json.nim#L29-L56)

Re: can not run nimedit

2019-02-13 Thread juancarlospaco
`--nilseqs:on` Cant say more because I dunno which Nim version are you using.

Re: how to use PassC/PassL pragma?

2019-01-28 Thread juancarlospaco
Pass the whole string literal verbatim.

Re: for loop with tuple returns reference to tuple member

2019-01-29 Thread juancarlospaco
let temp2 = (1,2,3,4,5) for x in temp2.fields: x = 10 echo temp2 Run I am not sure what you need the code to do anyways...

Re: for loop with tuple returns reference to tuple member

2019-01-29 Thread juancarlospaco
Typo on your code.

Re: Internationalization of unmodified source code at compile time i18n

2019-01-29 Thread juancarlospaco
Theres no `getAppDir()` at compile time. Change the language according to LANG with `-d:LANG` where LANG is an ISO lang, eg `-d:EN_US`

Re: Auto import file with config.nims

2019-04-16 Thread juancarlospaco
I dont understand the question.

Re: Is there a 'protected' or module-local scope modifier?

2019-05-27 Thread juancarlospaco
The star can do it. If you still need more access you can just include it, which will be a bug or edge case.

Re: I think we can really do better...

2019-05-28 Thread juancarlospaco
I think both are true, but is good opportunity for ``.

Re: I think we can really do better...

2019-05-28 Thread juancarlospaco
I would mention Compile-Time FFI, Hot Code Reload, the GC options, REPL and MultiSync, you can not do that on other languages...

Re: Extending Enumerations to Support Step and Binary Enums

2019-06-06 Thread juancarlospaco
I dont like the `EndEnumeration` on Nim. Maybe the step can be a pragma? `{. step: 3 .}`

  1   2   3   4   >