pro/cons in using nimpy

2020-09-25 Thread gour
> I haven't tried it but it looks interesting as well. Yeah, it's interesting...however, some years ago when I was looking at IUP, I was told by one of the main developers that there are certain issues with the IUP toolkit: * no native support for Mac OS * poor UTF-8 support and localizatio

pro/cons in using nimpy

2020-09-25 Thread gour
> We have more than a dozen GUI toolkits for Nim now, Too many, imho. :-) > I would suggest you to start with one of them and only come back to GTK when > the other toolkits are not powerful enough. So, you are not for the option to possibly do UI-part with some more mature wrappers (Qt, wxpyt

get raw command line

2020-09-25 Thread cdunn2001
Result: $ ./foo 1 "2 3" 4 1 '2 3' 4 Run

get raw command line

2020-09-25 Thread cdunn2001
It doesn't exactly "remove" the quotes. The shell interprets them and stores into command-line arguments without them. A C program works the same way. I think you want `shellQuote`. import os import strutils import sug

get raw command line

2020-09-25 Thread sflennik
Is there a way to get the command line string before it's parsed? The commandLineParams proc almost works but it removes the quotes. import os import strutils echo commandLineParams().join(" ") $ bin/tests/t -l=asdf --filename="file name with spaces" -l=asdf --fi

Can I use generic type without interface?

2020-09-25 Thread shirleyquirk
Yes, I did realize I hadn't read your previous post properly, and I missed your point entirely. To continue to miss your point for a second, may I point out that either `{. experimental: codeReordering.}`, or adding `mixin process` to `run` both produce the desired result and allow removing `pro

using db_odbc with ms sql server on windows 10

2020-09-25 Thread sdmcallister
Thanks for the suggestion @shirleyquirk When I look here: It appears that I might get an init error first if the db returned SQL_SUCCESS_WITH_INFO: # allocate environment h

Can I use generic type without interface?

2020-09-25 Thread cumulonimbus
I understand the general use case, but I think this case is very confusing and should be flagged. Simplified version: (play in : ) type SomeJob = object id: string # one order proc process1[J](job: J): string = "generic va

using db_odbc with ms sql server on windows 10

2020-09-25 Thread shirleyquirk
Maybe database is returning SQL_SUCCESS_WITH_INFO, which Nim should probably not throw an exception for, maybe there's a real error.

how to set C/C++ compiler, eg: `nim c --cxx:/usr/bin/g++-7 main.nim`

2020-09-25 Thread timothee
thanks, that works! good enough although could be made more discoverable, maybe in `nim --fullhelp` and here's another example on OSX for C++: nim r -b:cpp --clang.cpp.exe=/usr/bin/clang++ main.nim Run > you're usually better off using a custom nim.cfg file. sure, i

how to set C/C++ compiler, eg: `nim c --cxx:/usr/bin/g++-7 main.nim`

2020-09-25 Thread Araq
`--cc:gcc --gcc.exe=path` but you're usually better off using a custom `nim.cfg` file.

Nimpretty --maxLineLine seems broken

2020-09-25 Thread Clonk
The problem is that I'm using Nimpretty in a Vim config file as a parameters for the ALE Plugin () : let g:ale_fixers = { \ '*': ['remove_trailing_lines', 'trim_whitespace'], \ 'nim': ['nimpretty'], \ } Run And it

using db_odbc with ms sql server on windows 10

2020-09-25 Thread sdmcallister
When I try something seemingly straight forward like: import db_odbc var db = open("100.10.10.10", "user", "password", "dbname") echo "Worked" db.close() Run I get the error: db_common.nim(100) dbError Error: unhandled exception: Erro

Enu - 3d live programming and game dev in Nim

2020-09-25 Thread dsrw
The initial release will mostly be for education. People (mainly kids) could use it to learn the basics of coding, and maybe put together a few interesting worlds. I run a coding club with a group of 10 year olds, so we'll be using it there. Sort of a 3D Scratch alternative. Eventually, I'd lik

how to set C/C++ compiler, eg: `nim c --cxx:/usr/bin/g++-7 main.nim`

2020-09-25 Thread timothee
how to set C/C++ compiler, eg: `nim c --cxx:/usr/bin/g++-7 main.nim` ? Ideally something like: `nim c --cxx:/usr/bin/g++-7 main.nim` `nim c --c:/usr/bin/gcc-7 main.nim` (both flags could be used in case nim programs requires using both c and c++ compilers)

Nimpretty --maxLineLine seems broken

2020-09-25 Thread timothee
or even better, allow customizing the hardcoded value of 80 and make all such references to it point to that configurable value

Enu - 3d live programming and game dev in Nim

2020-09-25 Thread xigoi
I remember the NimConf talk! I'd like to ask, what kinds of stuff do you imagine this being used for?

Enu - 3d live programming and game dev in Nim

2020-09-25 Thread dsrw
Thanks for the feedback. I've added Godot to the description, and will explicitly mention it in the next video.

Enu - 3d live programming and game dev in Nim

2020-09-25 Thread juancarlospaco
It has a lot more work than just "only run c2nim".

stdlib pattern matching feedback

2020-09-25 Thread haxscramper_
It might be a question of terminology mostly, but in my mind * `all` means "every element without exception" (replace with `each`, `every` ?) * `any` \- at least one, maybe more, test all elements in sequences regardless * `none` \- none. Inverse with `all`. * `first` or `find` \- at leas

Update on --gc:arc

2020-09-25 Thread elcritch
Fantastic! Found a flag `nimAdaptiveOrc` that works. In the future it may make sense to make `defaultThreshold` fully user adjustable, but it seems 128 is a decent default for ESP32 chip. I'll make a PR for another flag if it becomes an issue. Also, the `GC_fullCollect` is useful. I'll add them

Enu - 3d live programming and game dev in Nim

2020-09-25 Thread Stefan_Salewski
Nice. For me this is the first video about Nim programming where watching a video has indeed some advantages over reading a tutorial :-) I have already watched some minutes, which is my personal record for videos about computer programming. You told that you made it with Nim, which would be gre

stdlib pattern matching feedback

2020-09-25 Thread Araq
> but that could be fixed by injecting matches: seq[int] in the scope. Do you > think it is necessary to do this? Why a seq? `any` can stop after the first found match.

Enu - 3d live programming and game dev in Nim

2020-09-25 Thread dsrw
At Nim conf 2020 I did a quick talk about Enu, a 3d live programming environment that I've been working on. It's still a few weeks from an initial release, but I recorded another video and I thought I'd share it: The code is at . Than

Nimpretty --maxLineLine seems broken

2020-09-25 Thread Araq
I think Nim's lexer produces the warning and is used by nimpretty. Disable via `--hint[LineTooLong]:off`.

Nimpretty --maxLineLine seems broken

2020-09-25 Thread Clonk
Hello, I recentry used `nimpretty --maxLineLen:120` to override the 80 default value and it seems it's not doing anything. I still have the same `Hint: line too loog` for line over 80 character. Is there something I missed in Nimpretty usage or is this option not working as intended ?

stdlib pattern matching feedback

2020-09-25 Thread haxscramper_
Currently `any` captures all elements in `@val`, not just first one. I agree this might be confusing, so maybe renaming it to `findAll` and `find` might be a good idea. Indices of matched elements are not accessible in any predicates right now, but that could be fixed by injecting `matches: seq

stdlib pattern matching feedback

2020-09-25 Thread Araq
Beware of `any`, people will use it and then need to know which element really did match. And if that's not available they have to use `find` afterwards. And then we have the typical performance vs convenience tradeoff. But it's a tradeoff Nim doesn't have to make with its DSL powers.

stdlib pattern matching feedback

2020-09-25 Thread haxscramper_
It is really similar to the python version (e.g. a lot of similar features and syntax). Sequence pattern matching is more feature-full, with support for things like `all`/`none`/`any` \- closely matching templates from `sequtils` module (namely `allIt` and `anyIt`), so you should be able to writ

Compiler Reading

2020-09-25 Thread swiftsafe
IoT is a platform to connect the things which have an internet. A connected device is a complex solution, with various potential entry doors for an attacker. A connected device pentest IoT includes tests on the entire object ecosystem. That is electronic layer, embedded softwares, communications

HTTPS requests in Nim

2020-09-25 Thread enthus1ast
Just guessing, but it could also be an 32/64 bit mismatch.

pro/cons in using nimpy

2020-09-25 Thread sdmcallister
I've seen IUP listed near the bottom here: I haven't tried it but it looks interesting as well.

ARC/ORC cpu intensive loop bug?

2020-09-25 Thread mratsim
> Could you please kindly point me to that audit. Thanks. The audit of SHA2, HMAC and HKDF was part of reviewing this In general our crypto primitives audit issues are on the respective repos: *

pro/cons in using nimpy

2020-09-25 Thread Stefan_Salewski
Yes, my personal view on GTK is very similar, see the begining of my GTK4 book: We have more than a dozen GUI toolkits for Nim now, I would suggest you to start with one of them and only come back to GTK when the other toolkits are not powerful enough.

HTTPS requests in Nim

2020-09-25 Thread SebastianM
Guys, I've got the same problem in GNU/Linux. Hint: 88119 LOC; 12.865 sec; 89.07MiB peakmem; Debug build; proj: /home/seba/Pobrane/netw.nim; out: /home/seba/Pobrane/netw [SuccessX] Hint: /home/seba/Pobrane/netw [Exec] could not load: libcrypto.so(.1.1|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|.47|.46

pro/cons in using nimpy

2020-09-25 Thread gour
> Imho gintro (gtk) is the most mature gui library for nim. But afaik it does > not support android. There are few issues I have with gintro (gtk): * although I use GTK on my desktop (Xfce) and like it, I heard too many stories how GTK is not very developer friendly - many projects moved from

pro/cons in using nimpy

2020-09-25 Thread gour
> You missed the gintro library Actually I missed to mention `wxNim ` and wonder why it is not listed in the official list of GUI options mentioned above...