@andrea: in addition to what @mmierzwa said (which is the main reason for all
of this), there are also the problems of convenience and generality.
In short, I don't want to cast an array[int] to a seq[int] each time I want
element-wise operation because such casts would occur at nearly each
No problem. Anyway it was Rust being slower but that's an ARM specific bug that
should have been fixed a long time ago here:
[http://llvm.org/viewvc/llvm-project?view=revision=259657](http://llvm.org/viewvc/llvm-project?view=revision=259657)
@petevine: oops... well, I read the post and the answers this morning and then
I noticed that Nim's version was twice as slow. I got back to it this evening
and completely forgot that this was absolutely not the question here but only
something I was curious about. Sorry about that!
We have lots of people pitching ideas they can't seem to implement themselves.
Common problem. Other people could implement those ideas, but time and energy
are finite. Also a common problem.
What we need is some sort of NimLancer broker system that would make it easy
for people to hire a
@lltp What problem exactly? Is there a performance hit on 64-bit perhaps?
[http://nim-lang.org/docs/osproc.html#execProcess,string,openArray[string],StringTableRef,set[ProcessOption]](http://forum.nim-lang.org/postActivity.xml#http-nim-lang-org-docs-osproc-html-execprocess-string-openarray-string-stringtableref-set-processoption)
Duuude! "Namespace pollution" is, like, a bummer for like them like twentieth
century square types in neckties and polished shoes, whose boss like reads code
in Notepad and stuff. We got some way new far out ideas here, bro, like major
consciousness expanding nimXperience! Embrace the anarchy,
If I understand what you need, to convert a "string" to "WideCString", you can
do the following:
# Convert a "string" to "WideCString".
proc toWideCString(str: string): WideCString =
var
i : int = 0
ret : WideCString
new(ret)
Here's an incomplete idea that may or may not be helpful...
There might be some fancy Windows API tricks for interacting with other console
windows, but then your code would be more difficult to port. I would first
consider the simplest solution: startProcess start / cmd with [the needed
Andrea, whilst its true, it is on library creator side, whilst we may want to
decide how it would look like in our code, when there are two libraries where
their creators did not use distinct type.
(by the way, I think that the right way to handle different products is to
actually use the symbols that are in common use and allow to write
let x = v ⊗ w
maybe as an alias for
let x = v.tensor(w)
for the case when one does not want to copy paste the
> If you want Nim to become popular in audiovisual computing - Computer Vision
> for self-driving cars or Video Processing for Film & Television for example -
> I strongly suggest that the language comes with basic image/audio/video
> read/write capabilities by default.
Yes, we do. So why
Just one quick comment. Quoting the OP
> Well, then it is useless. I am from a domain (science) where similar concepts
> are generally called a similar way and where clashes occur a lot because
> something as simple as * has a gazillion meanings depending on the context
> (and all of them
Hi
I am trying to open new console window and be able to write to it. My attempts
failed. How to do that? (currently using MinGW)
During my attempts I tried to create process using startProcess I noticed that
I can get then FileHandle for process. However I do not know how obtain File to
Ok, but no ETAs. Also: We need to decide if return types are considered too.
from json import type JsonNode
let x = parseJson()
Valid? Invalid? Why?
> There is an automatic conversion from nimcall to closure but not in tuple
> constructors (for better or worse).
What are the precise conditions under which one should choose a tuple over an
object? I'd use them for points in n-space for small n, and other tasks where I
wrap up a very small
So, I experimented quite a lot...
**@Araq**: you were completely right: a from Foo import type Bar would actually
be awesome! Can we have that?
@ jlp765
We video and image processing guys tend to be highly specialized in "pixel
operations" and "image processing operations".
i.e. once we can get at the actual video RGB pixels or audio sample data we
know what to do with them
But we suck at things like setting up video file I/O -
In this specific case, the "problem" seems to arise from the use of int instead
of int32.
**Stefan_Salewski:** _And I had not assumed that it makes 30 ns difference for
a proc call._
The reason is that a copy of the string is being made. This requires a memory
allocation and copying the string. 30ns are 60-90 clock cycles on a 2-3GHz
machine and are pretty easy to hit.
**petevine:** _It would be good for usability if the nim compiler offered
automated profiled builds as well as pass the expanded CFLAGS via --passC
automatically in release mode._
You can do this via a `.nims` config file, e.g.:
import strutils, sequtils
let cflags =
They are not the same, the proc type is `.closure` the proc is `.nimcall`.
There is an automatic conversion from nimcall to closure but not in tuple
constructors (for better or worse).
But I don't like environment variables, they are global shared state affecting
the build environment... No thanks, it's already hard enough to figure out
which set of options is passed to anything.
C compilers don't expand shell variables so the short answer to my questions
seems to be no and no, use --passC
It would be good for usability if the nim compiler offered automated profiled
builds as well as pass the expanded CFLAGS via --passC automatically in release
mode.
using this point as the reference of query, a link on arch linux forum was
discovered
[https://bbs.archlinux.org/viewtopic.php?id=91655](https://bbs.archlinux.org/viewtopic.php?id=91655)
SOLUTION
the following steps were undertaken.
* re-install texlive-fontsextra (sudo pacman
i took the following approach to troubleshooting the situation.
Instead of running the command
./koch pdf
or
pdflatex doc/manual.tex
i tried the following steps
cd doc
latex manual.tex
dvips manual.dvi
ps2pdf manual.pdf
as
Indeed -- putting all that test code in a proc make differences disappear!
I am aware of performance problems of code outside of procs, but I really had
not thought that that was the problem in this case. And I had not assumed that
it makes 30 ns difference for a proc call.
I think in future I
There is no ~/.texlive directory !
so how to export _double only in the DLL?
The Nim compiler knows nothing about CFLAGS and related things, however the C
compiler it uses should (if you're using GCC or Clang). You can also pass in
arguments via `--passC` and `--passL` arguments.
When benchmarking, it's good to remember some things:
* Nim's `int` datatype is
Two questions:
1) How would I build the docs on Windows (not LaTeX here w/o GNU) [Yes, I know,
I could... => but this is more of a principal question... Is there perhaps
another way to provide the source docs?]
2) Where would I download the readily compiled docs? [Yes, I know => "The
Index",
proc compile(code: string): {.compileTime.} NimNode =
This is a syntax error because the proper syntax would be:
proc compile(code: string): NimNode {.compileTime.} =
Partly related: Ada is in a similar state. In the rationale of Ada 83, pragmas
were described as
> For instance, why introduce {.pure.} with enums to require full
> qualification? If the compiler does not respect the pragma, there are syntax
> errors in the code. Typing and naming should be enough to avoid enums names
> clashes.
Wouldn't work with Nim's disambiguation rules. Think of enum
a quick search with pacman shows that the font _is_ installed as it is part of
the _texlive-core_ package.
[strikr@victory nim]$ sudo pacman -Q -l texlive-core |grep ec-lmbxi10
texlive-core /usr/share/texmf-dist/fonts/tfm/public/lm/ec-lmbxi10.tfm
texlive-fontsextra is installed.
[strikr@victory ~]$ sudo pacman -S -s texlive-fontsextra
extra/texlive-fontsextra 2016.42286-1 (texlive-most) [installed]
TeX Live - all sorts of extra fonts
yes, arch linux is the platform and 'nim' sources were 'git clone'd directly
from github [https://github.com/nim-lang/nim](https://github.com/nim-lang/nim)
_instead_ of arch aur nim-git.
[strikr@victory ~]$ uname -a
Linux victory 4.9.5-1-ARCH #1 SMP PREEMPT Fri Jan 20 12:11:50
running pdflatex doc/manual.tex shows a _missing_ font
...
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+120/600 --dpi 720
ec-lmbxi10
mktexpk: don't know how to create bitmap font for ec-lmbxi10.
mktexpk: perhaps ec-lmbxi10 is missing from the map file.
I'm discovering Nim and I'm in the learning phase reading the documentation.
I'm impressed by the language that combines elegance and power, without
sacrificing security. But I've strange feeling regarding the use of pragmas in
Nim. This preamble is to justify my naive view of the language and
**@videobuddha - what do you currently use (language/libraries/codecs/...)?**
There are a few Nimble packages that wrap external libraries already:
**audio**
* nim-ao
* nim-ogg
* nim-vorbis
* nim-portaudio
* nim-sndfile
* sndhdr
* nshout
* taglib
* sdl2 (for gaming)
39 matches
Mail list logo