> But the best thing is to ask #Stefan_Salewski
Not really as he does not use Windows.
I added VTE to gintro some years ago because someone asked for it, but that guy
never came back.
I already asked Google about VTE for Windows, but with no clear result.
When people really intent to use VTE o
That is also covered in my book in detail. Have you starting reading?
[http://ssalewski.de/nimprogramming.html#_allocating_objects](http://ssalewski.de/nimprogramming.html#_allocating_objects)
alloc(), create(), dealloc().
One of the interesting things I remember about Nim is that you can have ptr
object rather than ref object, since ptr object is not garbage collected. How
do you create and destroy an ptr object? For example how do you correctly
instantiate and destroy the two types below?
type
Hochnimisch.
[https://github.com/rprichard/winpty](https://github.com/rprichard/winpty)
there it gives the possibility of doing the same thing as vte
Well, the DSL is more a language than a fixed structure. I gave a small sample
code to feel it but you could have code like:
dsl:
algo1:
evaluate:
# Do something with algo1 result
let x = getValue()
algo2:
# Using x to calculat
Hi all,
I made a small [a small demo
app](https://github.com/deech/libclang_nim_demo_app) that shows how to use Nim
to make standalone applications that use [Libclang
10](https://clang.llvm.org/docs/Tooling.html) . In addition to a full set of
[bindings](https://github.com/deech/libclang_bindi
I solved it for my problems by reading from stdout. This is one part of my
workaround:
[https://github.com/Dankr4d/BF2142Unlocker/blob/master/stdoutreader.nim](https://github.com/Dankr4d/BF2142Unlocker/blob/master/stdoutreader.nim)
[https://stackoverflow.com/questions/6673022/windows-gui-console-output-linux-style](https://stackoverflow.com/questions/6673022/windows-gui-console-output-linux-style)
I agree with you, you only need a program that, like Linux, has an open
terminal-type GUI. for a while i made my terminal in C i
Maybe this was my fault:
`Cygwin is a Linux-like environment for Windows. It consists of two parts: A
DLL (cygwin1.dll) which acts as a Linux API emulation layer providing
substantial Linux API functionality.`
I'm not sure if i can link against cygwin with an application compiling with
mingw.
[https://download.gnome.org/sources/vte/0.60/](https://download.gnome.org/sources/vte/0.60/)
I also sought to help you, maybe you can compile there is the free vte
The project you posted is written with gtk vte and written for linux.
Also I've copied the vte.nim from my linux system to my windows system. But
this fails with an access violation error. Then I tried using the cygwin vte
package you've posted earlier and this is build for gtk2 not gtk3.
And y
[https://play.nim-lang.org/#ix=2lQ8](https://play.nim-lang.org/#ix=2lQ8)
[https://play.nim-lang.org/#ix=2lQa](https://play.nim-lang.org/#ix=2lQa)
in fusion htmlparser this would not be a problem
This is how I would do it
import macros
macro dsl(nodes) =
result = newStmtList()
for n in nodes:
var value: NimNode
if eqIdent(n[0], "algo1"): value = newLit"Foo"
elif eqIdent(n[0], "algo2"): value = newLit(123)
else: error "Unexp
if you want to make your own terminal under windows with gtk
[https://github.com/AS400JPLPC/VteTERM](https://github.com/AS400JPLPC/VteTERM)
even if it is under linux you must not have too much problem in C / C ++ after
you can directly call programs made with nim
The vte.nim file is not generated. I'm assuming you never tested it on windows?
If I want to know how the vte.nim file looks like, i can boot linux. But your
answer sadly do not help me.
For instance, I have a small dsl like:
dsl:
algo1:
evaluate:
echo "Evaluation is " & $value
algo2:
evaluate:
echo "Evaluation is " & $value
Run
The role of `evaluate` is to retrieve the result of calculation using `algo1`
In reference to the original name- I'd love to discuss whether code is "Royale"
enough or not.
I read the 2 just Ok anyway. :P
"niminal" as the key aspect of Nim that I like is it minimal nature.
"nimsy". As in "All nimsy were the borogoves..."
Boring: Simply "idiomatic". The context "for Nim" is usually implied.
Fun: "nimish".
This will be a fun/light post.
The following is idiomatic to Nim:
let myNumber = 3 + 9
Run
whereas the following is not:
let My_Number = `+`(3,9)
Run
Prior to my introduction to Python I really never cared much about being
idiomatic; but i
hello OUHAAA bravo This is what it expects in the vte file in
/pkgs/gintro-0.7.3/gintro/vte.nim
Run
{.warning[UnusedImport]: off.}
import xlib, glib, gdk, gdkpixbuf, cairo, gtk, gobject, pango, gio,
gmodule, atk
const Lib = "libvte-2.91.so.0"
{.pra
I'm implementing a variant object type, where one of the enum cases has no
fields associated with it, but get a syntax error:
type
AuthenticatorType = enum
None,
Basic,
Session,
Cookie
Authenticator = object
it works this way:
type
AuthenticatorType = enum
None,
Basic,
Session,
Cookie
Authenticator = object
case type: AuthenticatorType:
of None: discard
of Basic: username, passwor
The following code gives me a compile time error :
import arraymancer
import nimpy
import nimpy/raw_buffers
proc `+`[T](p: ptr T, val: int) : ptr T {.inline.}=
cast[ptr T](cast[uint](p) + cast[uint](val * sizeof(T)))
proc pyBufToTensor[T](ndArray: PyOb
you can use `numpy.reshape(ndarray, shape)` and `arraymancer.reshape(tensor,
shape)`. The module name can serve as namespacing prefix when calling functions.
Also your object types PyObject vs Tensor should disambiguate what to call for
the compiler so I would be surprised if there was conflict,
It's just a funny way of using command invocation syntax, usually used without
braces:
if unlikely position < 0:
Run
Hello,
I've done some testing with Nimpy and Arraymancer and I've run into a bit of an
issue when trying to use Numpy function (via Nimpy) and Arraymancer because
several functions have the same name.
For a example, I can't use a numpy.reshape on a PyObject because it conflicts
with the reshap
When I use the vte package then there are cygwin dependencies I don't want to
have (and also the header file is missing). So I've decided to use
libvte2.91-devel package (with sources). Now I've added following pathes to
`PATH` environment var (without luck):
* C:\cygwin64\usr\include\vte-2.9
very useful. thank you!
I did a little research and found an interesting post on mixing signed /
unsigned issues, so I guess it's a good idea Nim doesn't like that:
[https://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here](https://critical.eschertech.com/2010/04/07/danger-unsigned-types-used-here)
It
Also in the documentation, I noticed _Garbage-collectable types (string, seq,
ref) cannot be used in keys or values._ and I don't understand the reason for
such warning. If these values are used in the cache, they are live and won't be
garbage collected, aren't they?
We're always improving the documentation but here is a good rule of thumb:
**Whenever you need to analyse the AST, you need a macro.**
Cool. Glad you got it working.
That multiply-rotate hash in my last post does yield a noticeable boost. I get
Python-3.8.2 times of 1.255..1.337, Nim-1.3.3 with default hash times of
0.391..0.531, and Nim-1.3.3 with that multiply-rotate of 0.205..0.347. So, with
a fast, good enough hash Nim is
I was in need of week-of-year procs but couldn't find any so I wrote them.
Putting them here for now because they aren't librarified enough yet to be
packaged- no unit tests or docs yet.
[https://play.nim-lang.org/#ix=2lN4](https://play.nim-lang.org/#ix=2lN4)
Implements algorithms adapted from:
Using the latest Nim 1.3.3 indeed solves the issue. Thanks!
So does it parse as `if unlikely(position < 0)` ?
Couldn't help but notice at
[https://github.com/olliNiinivaara/Nichecache/blob/915317b2349673b1ccf502d39cd3ac3ea4875eb3/src/nichecache.nim#L99](https://github.com/olliNiinivaara/Nichecache/blob/915317b2349673b1ccf502d39cd3ac3ea4875eb3/src/nichecache.nim#L99)
if(unlikely) position < 0
40 matches
Mail list logo