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`
`--embedsrc` is not really needed, and can make fat binaries IMHO, but looks
good.
You can still use BTC at 15...
> $ 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
You answer your own question. Get full mingw I think.
That `succ`'s
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
**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.
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 =` ?
Check PyLib on Nimble.
Do it. Seems like a super cool framework...
> import future, sequtils
>
> filterIt(lc[i | (i <\- 0..9), int], it < 3).echo
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
delegate tasks
Theres not much _guessability_ on Markdown + custom plugins neither, I love
Markdown, but Markdown with custom plugins are basically Hacks.
With choosenim is 1 command to switch versions, super friendly.
nimarchive ?.
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).
Templates ?.
If the table is huge it can use more memory than a "naked" switch ?, probably
not, no idea.
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.
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?
https://nim-lang.org/docs/apis.html
`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.
is to allow Debugging.
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.
[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.
I think `&" "` and `fmt" "` wont work inside a macro, use `" " & " "` or
`format( )`.
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.
*
Thanks for the time responding, sounds nice.
`var` is Not read-only.
Custom mark Is planned to get Removed or Fixed?.
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.
Redis lib at Nimble. I also made an `at` wrapper.
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,
Oh, you are just Trollin'
_yawns_
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
[http://nimble.directory](http://nimble.directory) ?
Python DocTests get deleted in the long run (>15 years coding Python).
[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
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
Improve but dont deprecate.
FMT string dont have syntax highlight, autocomplete of html elements, for
loops, while loops, if, else, etc etc.
I `%*`
You dont have to, put it on another file and include it.
`(func: auto = "Lambda")() `
Run
Its Open Source, add the features you want:
[https://github.com/nim-lang/nimforum](https://github.com/nim-lang/nimforum)
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
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`
{. emit: """#define SOMEOPTION""" .}
Run
Literal, For C target.
Some people are just waiting for v `1.0`
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
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
Term Rewriting Templates?.
I never seen C# outside of MS Windows and related.
Just say that indentation brackets on Nim are written like `#{` and `#}` ;P
`markAndSweep` ?.
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,
The code reordering experimental someday can improve this (?).
**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)
Nim does not depend on any `*.go`
Theres `nimlang/nim` docker image.
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.
{. emit: """
#define DOP_COLOR(col) HIWORD(col), LOWORD(col)
""" .}
Run
?
Do it.
I am sure theres more on Twitch.
This would be nice as a Nimble module.
Do it.
Wrap PEG.js
Awesome work!, cool Xmas gift!. ;P
`auto` ?.
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`.
` type RectOrConvex: Rect | Convex `
Run
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.
Wow!, great initiative and interesting lib!. :)
`{.inline.}` and `uint` ?.
nim> for thingy in 0..9:
if thingy mod 2 == 0:
echo thingy
0
2
4
6
8
Run
, 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
`("key".cstring, "value".cstring)` ?, I am not sure if I understand the
question tho...
Use Choosenim ?
`# Compile: nim c --app:lib --out:pymodule.so thisfile.nim import nimpy proc
myfunction*(name: string): string {.exportpy.} = "Hello " & name `
Run
I just do:
`nim --gcc.exe:/usr/bin/musl-gcc --gcc.linkerexe:/usr/bin/musl-gcc --opt:size c
hello`
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
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)
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)
I think most cases are a balance between performance (speed) and resource usage
(RAM). But probably someone else knows better...
[https://gettogether.community](https://gettogether.community) is an open
source Meetup
`currentSourcePath().splitPath.head & "/config.ini"` If you need it compile
time.
Docker for Mac.
Use the int ?. `assert char(10) == '\n'`
Start one!, would be cool to have groups all around the world, even if small
ones. :D
[https://nimble.directory/pkg/xdo](https://nimble.directory/pkg/xdo)
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)
`--nilseqs:on` Cant say more because I dunno which Nim version are you using.
Pass the whole string literal verbatim.
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...
Typo on your code.
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`
I dont understand the question.
The star can do it. If you still need more access you can just include it,
which will be a bug or edge case.
I think both are true, but is good opportunity for ``.
I would mention Compile-Time FFI, Hot Code Reload, the GC options, REPL and
MultiSync, you can not do that on other languages...
I dont like the `EndEnumeration` on Nim.
Maybe the step can be a pragma? `{. step: 3 .}`
1 - 100 of 320 matches
Mail list logo