!IpFtPSbgfrZrVcVyti:envs.net

Nim #science

747 Members
Scientific computing in Nim. Discuss computations for physics, biology, data science, statistics, etc. here. https://github.com/nim-lang/needed-libraries/issues/776 Servers

Load older messages


SenderMessageTime
18 Jan 2021
@_discord_454991120028663809:t2bot.iohugogranstrom Yeah I'll stick to my Tensors as long as I can 11:25:15
@_discord_454991120028663809:t2bot.iohugogranstrom Btw couldn't get toTorchView to work yesterday when I wanted to try passing an IntRefArray to a function 11:26:13
@_discord_454991120028663809:t2bot.iohugogranstrom Oh no wait, I might not have compiled ut with arc... 11:26:40
@_discord_454991120028663809:t2bot.iohugogranstrom Nope didn't make a difference:
\raw_bindings\tensors.nim(72, 14) Error: invalid type: 'lent UncheckedArray[int64]' in this context: 'proc (ar: ArrayRef[system.int64]): ptr UncheckedArray[int64]{.cdecl, noSideEffect.}' for proc
11:29:03
@_discord_454991120028663809:t2bot.iohugogranstrom * Nope didn't make a difference:
\raw_bindings\tensors.nim(72, 14) Error: invalid type: 'lent UncheckedArray[int64]' in this context: 'proc (ar: ArrayRef[system.int64]): ptr UncheckedArray[int64]{.cdecl, noSideEffect.}' for proc
11:30:59
@_discord_454991120028663809:t2bot.iohugogranstrom This was when running poc03 11:31:09
@_discord_570268431522201601:t2bot.iomratsim what if you pass --experimental:views 11:55:10
@_discord_570268431522201601:t2bot.iomratsim we might need a "tensors.nim.cfg" with --experimental:views" like I did for interop 11:56:06
@_discord_454991120028663809:t2bot.iohugogranstrom Ah yes that solved it, don't know why I thought it was already enabled in some config file. Now the c++ compiler is complaining instead though 11:59:30
@_discord_570268431522201601:t2bot.iomratsim It was but in a .nims file 12:00:18
@_discord_570268431522201601:t2bot.iomratsim in flambeau .nims, I deleted it because those are applied only if you compile from the project directory 12:00:45
@_discord_570268431522201601:t2bot.iomratsim and would have to be copy-pasted if you use flambeau in your own code for example 12:01:04
@_discord_570268431522201601:t2bot.iomratsim I deleted it when i introduced interop.nim.cfg but forgot about ArrayRef 12:01:22
@_discord_454991120028663809:t2bot.iohugogranstrom Ok, that might have been it then 12:02:37
@_discord_454991120028663809:t2bot.iohugogranstrom The part that c++ is complaining about seems to be
    T4_ = (NI64*)0;
    T4_ = t__9bjO9cCSag10Z9adt9cTzQW9a4A.sizes().data();
12:08:10
@_discord_454991120028663809:t2bot.iohugogranstrom On the second line it gives this error:
error C2440: '=': cannot convert from 'const T *' to 'NI64 *'
        with
        [
            T=int64_t
        ]
12:08:44
@_discord_570268431522201601:t2bot.iomratsim try with noInit on "data" 12:11:06
@_discord_454991120028663809:t2bot.iohugogranstrom Didn't solve it :/ 12:11:56
@_discord_570268431522201601:t2bot.iomratsim can you create a gist or a branch with the issue, will look int he evening 12:13:17
@_discord_454991120028663809:t2bot.iohugogranstrom It's in the current master 12:14:10
@_discord_454991120028663809:t2bot.iohugogranstrom Can write up an issue in an hour or so 12:15:52
@amysdante:matrix.orgamysdante joined the room.14:15:04
@_discord_454991120028663809:t2bot.iohugogranstrom From what I've been able to google myself to, it has to do with the fact that ArrayRef.data gives us a const ptr to the data. But we have a non-const ptr as the type of our variable. And the variable seems to be initialized even though I added noInit on data and sizes 14:57:12
@_discord_208199869301522432:t2bot.ioShalokShalom#6109 changed their profile picture.16:02:59
@_discord_312654963694108674:t2bot.iokonsumlamm joined the room.17:16:43
@_discord_350708685481312257:t2bot.ioAwici joined the room.20:54:22
@awici:matrix.orgawici joined the room.20:55:20
@_discord_221105222984925185:t2bot.ioMini joined the room.21:23:08
@_discord_486998692683841566:t2bot.iocji joined the room.21:58:40
19 Jan 2021
@_discord_750923216641458308:t2bot.ioQuibonoRedacted or Malformed Event00:42:07

There are no newer messages yet.


Back to Room List