Nim 1.6.0 RC1

2021-09-18 Thread pietroppeter
In this thread, e.g. Old `develop` links current library folder in nimble pkgs folder so any change is automatically available for code elsewhere depending on it. Useful for checking if the fix you are doing for a library works for other pieces of code

Direct I2C device access with pure Nim

2021-09-18 Thread takekikuchi
> Yes, but in order to put MSP430 into BSL mode, we need to control the > RESET/TEST pins, so it is specific to a particular board.

Nim 1.6.0 RC1

2021-09-18 Thread Araq
Well the readme can be updated but the "nimble develop" changes are concerning. Can you please tell me again (sorry!) where these differences have been reported/documented/discussed?

Direct I2C device access with pure Nim

2021-09-18 Thread elcritch
@takekikuchi great project! Your project is for flashing the MSP430xx's directly?

How seamless is the Objective-C interop?

2021-09-18 Thread dom96
Calling ObjC code is fairly easy. Inheritance and protocals aren't supported afaik. If you want an example, I wrote this a while ago:

Direct I2C device access with pure Nim

2021-09-18 Thread takekikuchi
This is how I implement it. let res = posix.ioctl(self.fd.getFileHandle, I2C_RDWR, addr packets) Run

db_sqlite prepared statement

2021-09-18 Thread Yardanico
Nim 1.6 will have the feature to import all symbols of a library including private ones, so you could do: import std/db_sqlite {.all.} import std/sqlite3 {.all.} export db_sqlite proc sqlite3_db_handle*(para1: Pstmt): PSqlite3 {.cdecl, dynlib: Lib,

db_sqlite prepared statement

2021-09-18 Thread ingo
> > > I seem to remember a dev mentioning modifying sqlite to add convenient types. > Maybe they handled your problem? > > [...]Perhaps add an issue on github with this forum url. Had made an issue already. For my current project the std lib

config files: Nimscript and Nim compiler documentation inconsistency

2021-09-18 Thread auxym
Does config.nims have a mechanism for defining cross-compiling toolchains? Eg the `arm.linux.gcc.exe` as defined here:

How seamless is the Objective-C interop?

2021-09-18 Thread kappa
I'm new to Nim and I could only find resources on C and C++. Can I just import and call ObjC code as if it was Nim code? Can I just pass objects and functions to Objectve-C? What about advanced features such as inheritance, protocols, etc?

db_sqlite prepared statement

2021-09-18 Thread kobi
Does this help? I seem to remember a dev mentioning modifying sqlite to add convenient types. Maybe they handled your problem? though if you handled it already, then that's fine too. Perhaps add an issue on github with this forum url.

Direct I2C device access with pure Nim

2021-09-18 Thread dxb
The target device address is set via an "out of band" mechanism i.e. it is not part of the datastream written to the device. Instead, it has to be set using an IOCTL on the device file descriptor before writing. See

Direct I2C device access with pure Nim

2021-09-18 Thread Neodim
yes, these type are uint_8 as following from c-code...

Direct I2C device access with pure Nim

2021-09-18 Thread Neodim
yeah, good idea, I'll try

Direct I2C device access with pure Nim

2021-09-18 Thread aEverr
You probably need to flush the file before closing though I’m not sure if it is already automatically done if closing

Direct I2C device access with pure Nim

2021-09-18 Thread mashingan
Is the int actually int32 or int64? Depend on your arch, you need to cast to seq[uint8] instead of converting to uint8. Maybe it should be like this (untested): import sequtils proc i2c_write(busNo, devAddress, regAddress: int64; data: seq[int64]) : int = let

Can I somehow share a C++ class with Nim, either by reading it from a dll or otherwise?

2021-09-18 Thread rforcen
this may help: # cpp integration # compile w/ # nim cpp -r cpp01.nim {.emit: """ class Foo { public: int i,j,k; }; """.} type Foo {.importcpp: "class Foo", nodecl.} = object i:cint j:cint k:cint proc

Nim 1.6.0 RC1

2021-09-18 Thread haxscramper
No. User has to delete old package repository, new format is it not compatible with other one . I can't use any older compiler version with new repository format as well. In addition, 'nimble develop' has been remove and

Nim 1.6.0 RC1

2021-09-18 Thread haxscramper
Also it is not just "lockfiles", it adds half a dozen other features, and they were not discussed anywhere except "zah specifically requested". I did as for short list but no info was provided.

Nim 1.6.0 RC1

2021-09-18 Thread haxscramper
There is no migration guide, so this release as it stands now would be "we changed things that you use, now go figure out yourself how they are supposed to be used". So even if we **do** ship 1.6.0 with 0.14 nimble, this has to be accounted for.

db_sqlite prepared statement

2021-09-18 Thread ingo
That works fine. To sqlite3.nim I added the: proc sqlite3_db_handle*(para1: Pstmt): PSqlite3 {.cdecl, dynlib: Lib, importc: "sqlite3_db_handle".} Run To db_sqlite.nim i added: template exec*( stmtName: SqlPrepared, args: varargs[typed]