00:00:02 | * | junland quit (Quit: %ZNC Disconnected%) |
00:01:12 | * | stefantalpalaru joined #nim |
00:01:49 | * | junland joined #nim |
00:02:43 | * | stefantalpalaru quit (Changing host) |
00:02:43 | * | stefantalpalaru joined #nim |
00:10:04 | * | Amun_Ra quit (Read error: Connection reset by peer) |
00:12:33 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
00:22:25 | * | norm joined #nim |
00:22:47 | * | norm is now known as Guest86127 |
00:26:07 | * | krux02_ joined #nim |
00:30:03 | * | krux02 quit (Ping timeout: 265 seconds) |
00:30:40 | * | Guest86127 quit (Quit: Leaving) |
00:51:31 | * | tklohna quit (Ping timeout: 252 seconds) |
01:50:38 | * | uu91 quit (Read error: Connection reset by peer) |
01:50:56 | * | uu91 joined #nim |
02:03:46 | FromDiscord_ | <onelivesleft> Is there a way to write into an object member when you know the object address and the offset to the member? |
02:10:02 | blackbeard420 | how do you get nimble to link to an external c library? |
02:24:34 | FromDiscord_ | <exelotl> @onelivesleft something like this? https://play.nim-lang.org/#ix=22Hp |
02:27:45 | sealmove | hey, regarding nimble project structure, how does "private" folder work? what does it do in practice? |
02:29:29 | * | uu91 quit (Read error: Connection reset by peer) |
02:29:47 | * | uu91 joined #nim |
02:30:33 | * | uu91 quit (Read error: Connection reset by peer) |
02:30:47 | * | uu91 joined #nim |
02:34:18 | * | uu91 quit (Read error: Connection reset by peer) |
02:34:31 | * | uu91 joined #nim |
02:35:56 | * | uu91 quit (Read error: Connection reset by peer) |
02:36:11 | * | uu91 joined #nim |
02:39:25 | FromDiscord_ | <WilliamDraco> I'm trying to write a seq[array[3, string]] out to file: new-line for each seq with the array concatenated. This is problematic both due to: |
02:39:25 | FromDiscord_ | <WilliamDraco> 1. I need to preserve escape characters from the strings within the array |
02:39:26 | FromDiscord_ | <WilliamDraco> 2. It's crazy slow the way I am doing it. |
02:39:26 | FromDiscord_ | <WilliamDraco> https://play.nim-lang.org/#ix=22Ht |
02:39:26 | FromDiscord_ | <WilliamDraco> Suggestions for a better way would be much appreciated. |
02:41:39 | FromDiscord_ | <onelivesleft> @exelotl excellent, thanks! |
02:42:43 | * | leorize quit (Quit: WeeChat 2.5) |
03:24:52 | * | uu91 quit (Read error: Connection reset by peer) |
03:25:05 | * | uu91 joined #nim |
03:25:42 | * | krux02_ quit (Remote host closed the connection) |
03:57:15 | * | nif quit (Quit: ...) |
03:57:25 | * | nif joined #nim |
04:11:24 | sealmove | Zevv: I need your help desperately! In npeg I get an error "wrong number of arguments". I suspect it is caused because I don't run the grammar .nim file directly. :S |
04:13:32 | sealmove | https://github.com/sealmove/nimitai/tree/master/tests |
04:14:14 | sealmove | I get the error when trying to compile test.nim (the one from the above link) |
04:15:07 | sealmove | nimitai/nimitai/private/ksypeg.nim(68, 18) Error: wrong number of arguments |
04:15:20 | sealmove | Has to do with captures. |
04:18:50 | * | chemist69 quit (Ping timeout: 246 seconds) |
04:21:03 | * | chemist69 joined #nim |
04:22:01 | * | kotrcka joined #nim |
04:25:21 | sealmove | Hmm, I had the grammar in a proc which takes static[string] as argument. As soon as I changed the argument to plain string the error disappeared. |
04:25:31 | sealmove | Can't see how it's related, but whatever |
04:34:55 | sealmove | Something strange happened there (error msg was very weird), but ultimately it doesn't seem like a problem worth investigating. Sorry for the heads-up... |
04:35:49 | sealmove | .ksy parsing is done :-) !! now it's codegen time |
04:37:31 | disruptek | !repo sealmove/ yaml |
04:37:32 | disbot | no results 😢 |
04:37:35 | disruptek | hmm. |
04:37:42 | disruptek | !repo yaml |
04:37:43 | disbot | https://github.com/flyx/NimYAML -- 3YAML implementation for Nim 7& 5 more... |
04:37:49 | disruptek | !repos yaml |
04:37:50 | disbot | https://github.com/flyx/NimYAML -- 3YAML implementation for Nim |
04:37:50 | disbot | https://github.com/nim-appkit/yaml -- 3Robust YAML parser for Nim. |
04:37:52 | disbot | https://github.com/nonylene/yaml2json -- 3Convert yaml to json 7& 3 more... |
04:37:56 | sealmove | !repos nimitai |
04:37:56 | disbot | https://github.com/sealmove/nimitai -- 3Implementation of Kaitai Struct as a macro in Nim |
04:38:50 | disruptek | !repos yaml stars:>3 |
04:38:50 | disbot | https://github.com/flyx/NimYAML -- 3YAML implementation for Nim |
04:38:51 | disbot | https://github.com/nim-appkit/yaml -- 3Robust YAML parser for Nim. |
04:38:52 | disbot | https://github.com/disruptek/openapi -- 3OpenAPI Code Generator for Nim |
04:42:49 | disruptek | !issue author:disruptek cpp |
04:42:51 | disbot | https://github.com/nim-lang/Nim/issues/11081 -- 3DateTime field on Exception produces inconsistent C/++ handling |
04:42:58 | disruptek | la la la |
04:45:39 | * | uu91 quit (Read error: Connection reset by peer) |
04:45:56 | * | uu91 joined #nim |
05:14:36 | * | uu91 quit (Ping timeout: 240 seconds) |
05:14:39 | madprops | is there a case `of "a" or "A"` thing? |
05:16:01 | * | uu91 joined #nim |
05:20:37 | * | bacterio joined #nim |
05:35:01 | shashlick | of "A", "a": |
05:38:25 | * | njoseph quit (Ping timeout: 265 seconds) |
05:51:27 | * | theelous3 quit (Ping timeout: 252 seconds) |
06:05:42 | * | njoseph joined #nim |
06:06:28 | * | nsf joined #nim |
06:34:10 | * | solitudesf joined #nim |
06:39:24 | * | dddddd quit (Remote host closed the connection) |
06:54:59 | * | nixfreak quit (Ping timeout: 276 seconds) |
06:56:12 | * | nixfreak joined #nim |
06:57:18 | * | kotrcka left #nim (#nim) |
07:16:32 | * | thomasross is now known as Guest33074 |
07:16:32 | * | thomasross_ joined #nim |
07:16:32 | * | Guest33074 quit (Killed (karatkievich.freenode.net (Nickname regained by services))) |
07:16:32 | * | thomasross_ is now known as thomasross |
07:18:34 | shashlick | Araq: how does nimble scanning work? lazyPaths gets loaded but isn't used anywhere |
07:19:42 | * | narimiran joined #nim |
07:22:57 | * | uu91 quit (Read error: Connection reset by peer) |
07:23:21 | * | uu91 joined #nim |
07:24:32 | madprops | not sure how to store this type in a seq.. http://i.imgur.com/lFSmvX4.png |
07:24:48 | madprops | seq[(PathComponent, string)] doesn't work |
07:24:53 | madprops | neither adding kind: and path: |
07:38:19 | madprops | nvm |
07:38:23 | madprops | just had to copy it exactly |
07:46:56 | * | solitudesf quit (Ping timeout: 240 seconds) |
07:47:48 | * | thomasross quit (Ping timeout: 245 seconds) |
07:48:51 | Zevv | sealmove: oi |
07:50:25 | * | Zevv quit (Quit: leaving) |
07:51:15 | * | Zevv joined #nim |
07:53:57 | * | thomasross joined #nim |
07:53:57 | Zevv | disruptek: you again inspired me to learn new things in life. For example, this morning I read the irssi documentation to find an option to protect me from the (quote the manual) "angry fruit salad syndrome in some channels" |
07:58:19 | madprops | is there an inline echo ? |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:48 | * | gmpreussner joined #nim |
08:08:26 | FromDiscord_ | <Kaynato> I seem to be able to use arraymancer to build for -d:mkl now, but it hangs on -d:cuda and says cudnnCreate is undefined for -d:cudnn, strangely enough |
08:09:19 | FromDiscord_ | <Kaynato> Starting to get the impression that my system environment is completely unsuited for proper development and also that I am probably clueless about C++, haha... Spent a couple more hours trying to get nimtorch to work, to no success whatsoever. Decided that I might as well try to get libtorch working on C++ so I could settle for using nimline with libtorch, but the resulting EXE couldn't find an ordinal in torch.dll, which I don't know the |
08:10:06 | FromDiscord_ | <Kaynato> All this is exceptionally strange since I am definitely able to use torch with CUDA+CUDNN properly in python |
08:24:33 | FromGitter | <mratsim> @kaynato did you change the path were the nim.cfg looks for Cuda on windows? |
08:33:00 | * | lritter joined #nim |
08:35:53 | FromDiscord_ | <Kaynato> Yes |
08:36:30 | FromDiscord_ | <Kaynato> All the nvccs point to the right place, include and lib were also moved |
08:37:08 | FromDiscord_ | <Kaynato> I was able to get just plain nimcuda examples working, though that probably doesn't count for much |
08:41:40 | FromDiscord_ | <kodkuce> @WilliamDraco if you want to echo /n too put it in """/n""" |
08:41:44 | FromDiscord_ | <kodkuce> i think 🙂 |
09:19:58 | * | NimBot joined #nim |
09:24:39 | * | tklohna joined #nim |
09:42:59 | * | narimiran quit (Ping timeout: 265 seconds) |
10:07:41 | * | fanta1 joined #nim |
10:32:40 | FromDiscord_ | <mratsim> After 2 years |
10:32:40 | FromDiscord_ | <mratsim> |
10:32:41 | FromDiscord_ | <mratsim> community/nim 0.18.0-1 1.0.2-1 -6.28 MiB 5.61 MiB |
10:33:07 | FromDiscord_ | <mratsim> @Kaynato does neo works on GPU for you then? |
10:33:07 | livcd | what's that ? |
10:33:12 | FromDiscord_ | <mratsim> Archlinux |
10:42:10 | * | solitudesf joined #nim |
10:42:54 | * | solitudesf quit (Client Quit) |
10:43:15 | * | solitudesf joined #nim |
11:00:00 | sealmove | Zevv: oi |
11:19:23 | * | krux02 joined #nim |
11:22:35 | * | ng0 joined #nim |
11:44:43 | * | krux02 quit (Remote host closed the connection) |
11:47:01 | * | Perkol joined #nim |
11:48:05 | livcd | https://embark.status.im/news/2019/11/18/nim-vs-crystal-part-1-performance-interoperability/ |
11:49:55 | * | clyybber joined #nim |
11:52:05 | FromGitter | <zetashift> uses json instead of packedjson welp |
11:53:18 | Zevv | sealmove: whats up |
11:53:48 | sealmove | making progress :) |
11:53:52 | sealmove | you? |
11:59:00 | * | Perkol quit (Remote host closed the connection) |
12:00:14 | * | tribly quit (Quit: WeeChat 2.6) |
12:00:57 | * | tribly joined #nim |
12:07:49 | sealmove | now trying to generate relative paths in a macro |
12:11:33 | Zevv | Nothing much here. Doing some MQTT stuff |
12:16:43 | sealmove | intresting! |
12:17:49 | Zevv | not really, actually :) |
12:18:01 | * | nsf quit (Quit: WeeChat 2.6) |
12:18:17 | Zevv | The protocol is dead simple, the most complicated stuff is getting state logic right to get stuff to be robust and reconnect and stuff |
12:18:41 | sealmove | what do you need it for? |
12:19:54 | Zevv | I've been building industrial DSL/WWAN routers for one of my customers over the last years, and we need a provisioning system. Embedded side is lua, but for the central side I want to make the stuff in Nim and wasn't too happy with the existing mqtt libs |
12:22:13 | sealmove | Using Nim for work, I'm jealous |
12:22:40 | Zevv | I just don't tell my customers until after it's too late to change it to anything else :) |
12:23:09 | Zevv | I do "proof of concepts" in Nim. And everyone knows how it goes met POCs - it's just put in production in the end |
12:23:21 | sealmove | :D |
12:23:38 | enthus1ast | Zevv: wrapped an mqtt lib? Have repo link? |
12:25:49 | Zevv | no it's native nim |
12:25:50 | Zevv | not wrapped |
12:25:55 | enthus1ast | even better |
12:26:03 | enthus1ast | is it public? |
12:26:11 | Zevv | sure: https://github.com/zevv/nmqtt/ |
12:26:31 | Zevv | work in progress tho, no docs and tests, but it's functional |
12:26:47 | enthus1ast | nice will have a look |
12:27:22 | sealmove | if you do `import x`, can you learn where x imported from? is there a way to detect it? |
12:27:23 | * | ng0 quit (Remote host closed the connection) |
12:27:37 | Zevv | Hm how do I get only the message from an exception? The .msg field has the whole stack in there |
12:27:46 | Zevv | sealmove: I always ask nim.nvim :) |
12:27:57 | enthus1ast | getCurrentExceptionMsg |
12:28:17 | sealmove | but I want to use this info to generate import statement in macro |
12:28:28 | * | ng0 joined #nim |
12:28:36 | sealmove | or well... people will use nimble to install package, can I assume a path? |
12:28:51 | Zevv | enthus1ast: no, also has a full stack in there |
12:32:01 | enthus1ast | mqtt's "#" is super hardcore , i bet there's a lot of fishy things going on on these test hubs |
12:32:48 | sealmove | I think this answers my question: https://forum.nim-lang.org/t/3547A |
12:38:36 | * | luis_ joined #nim |
12:40:57 | sealmove | oh nim.nvim? |
12:41:11 | sealmove | i misread it for nim vm lol |
12:50:11 | * | luis_ quit (Ping timeout: 246 seconds) |
12:53:04 | sealmove | oh $hit... I think I have to generate npeg grammar with macros |
12:53:14 | sealmove | is that even possible? |
12:53:50 | sealmove | I mean, how does npeg usually goes? You parse, then you use the information stored from parsing to generate code in a macro, right? |
12:54:22 | sealmove | But the information is stored in vars, and vars can't be evaluated at CT |
13:03:09 | sealmove | npeg -> var stack -> macro generate() doesn't work :( |
13:03:47 | sealmove | ping Zevv |
13:10:26 | * | solitudesf quit (Ping timeout: 240 seconds) |
13:15:16 | * | kcvinu joined #nim |
13:15:30 | kcvinu | Hi all |
13:17:39 | kcvinu | Assume that i write a constructor proc with one int parameter for a type (say "Person"). |
13:18:34 | kcvinu | Then is it possible - var aPerson = new Person(30) |
13:18:54 | kcvinu | Does this call the constructor ? |
13:19:07 | sealmove | there is no constructor in Nim |
13:19:37 | enthus1ast | Person(age: 30) or your proc newPerson(30) |
13:19:41 | sealmove | you use this syntax: `Person(field1: val1, field2: val2 ...) |
13:20:00 | Zevv | i think we can make that work, but ther might be a better way |
13:20:36 | sealmove | Zevv I used {.compileTime.} pragma for vars, but I get the usual "Error: VM is only allowed to 'cast' between integers and/or floats of same size" error |
13:20:48 | sealmove | which I don't understand |
13:20:57 | Zevv | look into parsegrammar.nl, there npeg parses nim ast to build its IM |
13:21:11 | Zevv | you can skip that step and build IM yourself |
13:22:32 | sealmove | where is parsegrammar.nl? |
13:23:52 | kcvinu | sealmove Thanks for the reply |
13:23:54 | sealmove | but... I am able to build IM just fine, the problem is that I want to use this IM to generate Nim code (with macro) |
13:25:30 | Zevv | sorry, it's parsepatt.nim |
13:25:44 | Zevv | it uses primitives from patt.nim to build the grammar |
13:25:48 | Zevv | you can call these primitives yourself |
13:26:18 | Zevv | then we only need a way to get this manually generated grammar back into npeg |
13:26:25 | Zevv | but that should be fairly trivial |
13:27:18 | sealmove | hmm |
13:27:36 | sealmove | do you have any clue regarding the above error? |
13:27:42 | Zevv | let me see if I can whack up an example |
13:28:09 | sealmove | .nimble/pkgs/npeg-0.21.1/npeg.nim(142, 39) Error: VM is only allowed to 'cast' between integers and/or floats of same size |
13:28:15 | sealmove | I get this quite often |
13:28:22 | kcvinu | sealmove - you use this syntax: `Person(field1: val1, field2: val2 ...) |
13:28:45 | kcvinu | that syntax is not attractive when you have 10 or 15 properties |
13:29:44 | sealmove | kcvinu: The idiom is to create procs like enthus1ast suggested. From example `newPerson(30)` |
13:30:09 | Zevv | sealmove: one thing at a time :) |
13:30:18 | kcvinu | sealmove, So there is no other way. |
13:30:29 | Zevv | sealmove: are you trying to do matchFile in the VM? |
13:30:37 | Zevv | doesn't work - use readFile()/staticRead() and then match() |
13:31:08 | sealmove | kcvinu: well, there is no real constructor in Nim. But you can use `Person(field1: val1, field2: val2 ...)` syntax without having to initialize all fields. |
13:31:36 | sealmove | Zevv: oh! I hope this it! |
13:31:53 | sealmove | yes I am doing matchFile... |
13:31:58 | sealmove | let me see |
13:32:07 | Zevv | hm manual consruction of grammars is possible, but I need to export a lot more |
13:32:08 | kcvinu | sealmove , Um. Okay, but that is not what i wanted. Anyway, i can manage with procs |
13:32:09 | Zevv | and wors - document all that |
13:32:47 | * | abm joined #nim |
13:33:06 | sealmove | kcvinu: do you dislike having to name a proc? |
13:33:19 | sealmove | instead of simple `new Person`? |
13:34:15 | kcvinu | sealmove No. I better use "newPerson(value : int)" |
13:34:22 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
13:34:34 | sealmove | Zevv: I think I don't need manual construction of grammar in this case after all, but it's an interesting idea, possibly useful. |
13:35:22 | Zevv | still I'm trying to see how far I can go with this |
13:40:59 | sealmove | after using staticRead: `Error: internal error: (filename: "vmgen.nim", line: 179, column: 16)` |
13:41:44 | * | kcvinu quit (Remote host closed the connection) |
13:42:35 | Zevv | yeah and there you have it - what I was afraid of |
13:42:40 | Zevv | we're overstressing the VM |
13:42:43 | sealmove | yup |
13:42:54 | Zevv | I had this one before, something runs out of 0x7fff something somewhere |
13:43:05 | sealmove | that's correct |
13:43:37 | sealmove | the line 179 is: `internalAssert(c.config, -0x7fff < diff and diff < 0x7fff)` |
13:44:37 | * | krux02 joined #nim |
13:44:51 | Zevv | Yep. I've seen it but not yet reported it |
13:44:55 | Zevv | This Is The Time for that |
13:50:08 | sealmove | well, keep me up to date please! |
13:50:20 | * | tklohna quit (Ping timeout: 276 seconds) |
13:51:33 | Zevv | you file it? |
13:51:35 | Zevv | or me? |
13:52:44 | Zevv | hm the infrastructure for manual parsers is almost there, but not quite |
13:52:47 | sealmove | I think it's easier for you to reproduce in a minimal example? But if you are busy I can do it. |
13:53:42 | Zevv | but it would look something like this: http://ix.io/22JD/nim |
13:53:45 | sealmove | what advantage will manual parser bring to table? |
13:53:56 | Zevv | well, you can build parsers programattically |
13:54:16 | Zevv | but it hurts my head thinking about the working of the whole thing then :) |
13:54:40 | * | tane joined #nim |
13:54:56 | sealmove | but isn't the whole point of npeg to have parsers auto-generated, and not build them programatically? |
13:55:06 | Zevv | yes but no but yes but no but |
13:55:21 | Zevv | let me rephrase that correctly: you can build *grammars* programatically |
13:57:57 | sealmove | and the code snippets that run when a match happens? |
13:58:00 | sealmove | what happens with them? |
13:59:04 | disruptek | shashlick: i can tell you anything you need to know about lazypaths. |
14:06:26 | * | dddddd joined #nim |
14:06:54 | * | nsf joined #nim |
14:11:36 | FromDiscord_ | <mratsim> @Clyybber, any idea what generates those blitTmp? all my procs use sink arguments so I think it' destructors related |
14:11:42 | FromDiscord_ | <mratsim> |
14:11:42 | FromDiscord_ | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/648163841191968822/DeepinScreenshot_select-area_20191124150943.png |
14:14:08 | clyybber | thats sink arguments |
14:14:20 | clyybber | it is too prevent an edge case with self assigns |
14:14:32 | clyybber | I plan on eliding those where possible |
14:14:46 | clyybber | But so far you have to bet on the C compiler to optimize these out :/ |
14:18:17 | Zevv | sealmove: good question :( |
14:20:17 | FromDiscord_ | <mratsim> not the issue, I can't compile anymore |
14:20:26 | FromDiscord_ | <mratsim> I'll open an issue |
14:20:28 | clyybber | yeah |
14:20:36 | clyybber | I'll check it out later, kinda busy rn |
14:23:07 | sealmove | Zevv: is it possible (yet less convinient) to do everything that you would do in these matching snippets, just using the `captures` proc? |
14:24:10 | Zevv | it would I guess |
14:24:26 | Zevv | but were kind of pulling npeg up a pole by its guts like this |
14:26:42 | * | fanta1 quit (Quit: fanta1) |
14:28:12 | sealmove | well, it doesn't have to be beautiful |
14:28:20 | sealmove | most users will use the peg macro |
14:28:38 | sealmove | this is for edge cases where you want npeg in a macro |
14:28:48 | sealmove | if it works it's fine with me |
14:29:43 | sealmove | let me know if manual peg construction is ready! |
14:34:22 | sealmove | do you think I should hand-write the .ksy parser for now? until npeg and/or nim vm is up to the task? |
14:34:59 | sealmove | (switching from weechat to discord) |
14:35:00 | * | sealmove quit (Quit: WeeChat 2.6) |
14:42:06 | * | Hideki_ joined #nim |
14:44:03 | * | drewr quit (Ping timeout: 245 seconds) |
14:49:23 | * | Mister_Magister quit (Excess Flood) |
14:50:43 | * | Mister_Magister joined #nim |
14:50:53 | * | onionhammer quit (Ping timeout: 268 seconds) |
14:51:15 | * | onionhammer joined #nim |
14:52:03 | FromDiscord_ | <mratsim> I'm restarting your 32-bit job @narimiran, it failed with "Failed to deploy" https://travis-ci.org/nim-lang/Nim/jobs/616209430 |
14:59:16 | FromDiscord_ | <sealmove> might be related: http://github.com/nim-lang/Nim/issues/11084 |
15:11:25 | * | solitudesf joined #nim |
16:02:59 | Zevv | dom96 here? |
16:03:24 | FromDiscord_ | <funcmike> "The effect system (raises: []) does not work with async procedures." -> any plans to fix this? |
16:03:54 | dom96 | Zevv, yes |
16:04:05 | * | uvegbot quit (Ping timeout: 246 seconds) |
16:04:57 | * | sealmove joined #nim |
16:05:10 | Zevv | ah sweet - do you happen to know: the async recvInfo docs say it will return *up to* the requested amount |
16:05:53 | Zevv | is this really the case for async? |
16:06:45 | * | uvegbot joined #nim |
16:07:39 | dom96 | yes, it is |
16:08:02 | Zevv | hm ok thanks for confirming |
16:08:05 | * | Hideki_ quit (Remote host closed the connection) |
16:09:10 | Zevv | since I get 0 bytes in some cases, related to SSL it seems |
16:09:14 | * | Hideki_ joined #nim |
16:09:27 | dom96 | 0 bytes means the socket has been disconnected |
16:09:47 | Zevv | yes, but afaik it hasn't - investigating |
16:12:33 | * | MrAxilus left #nim ("User left") |
16:13:38 | * | Hideki_ quit (Ping timeout: 245 seconds) |
16:13:54 | Zevv | if feels like something fishy is happening in the SSL layer. the socket itself is not disconnected from the other side, some data has been sent to and fro and then I get 0 bytes just like that. a pain to debug ssl stuff though |
16:14:21 | * | Hideki_ joined #nim |
16:15:36 | * | Hideki_ quit (Remote host closed the connection) |
16:20:23 | * | Hideki_ joined #nim |
16:23:16 | sealmove | Zevv did you reproduce the 0x7fff error? |
16:24:13 | Zevv | yeah but not with a simple example. I need a hefty parser at compile time |
16:25:43 | dom96 | Zevv, is this easily reproducible>? |
16:26:10 | Zevv | dom96: not yet, and I'm probably wrong |
16:26:20 | * | Hideki_ quit (Ping timeout: 276 seconds) |
16:26:23 | shashlick | @disruptek I see code where lazyPaths gets populated |
16:26:23 | Zevv | it is usually just me with this kind of tings |
16:26:40 | shashlick | But where does it get used? |
16:26:59 | disruptek | you mean, where in the compiler? |
16:29:09 | sealmove | how is parser's "heftiness" measured? |
16:29:52 | * | narimiran joined #nim |
16:30:31 | shashlick | Yes |
16:30:37 | * | Trustable joined #nim |
16:32:31 | shashlick | Basically I want to find out how the compiler figures out where nimbleDir is |
16:32:58 | disruptek | it doesn't really work that way. |
16:33:03 | * | theelous3 joined #nim |
16:33:41 | disruptek | nimbleDir is just a hint to the compiler that means, "add any package-looking directory within to your search paths" |
16:33:56 | shashlick | Yes there's a flag where you can set it |
16:34:01 | disruptek | nimph supports multiple nimbleDirs now. it all just works. |
16:34:23 | shashlick | But there's no active code to look in ~/.nimble or AppData |
16:34:38 | disruptek | yes, because it's set in the config. |
16:34:55 | disruptek | it only gets used when the compiler actually needs to search. |
16:35:11 | disruptek | see `rawFindFile2()` in compiler/options.nim |
16:36:45 | disruptek | the user can setup any combination of nimbleDirs and the compiler will use them best it can. it's pretty neat. |
16:37:12 | disruptek | really makes using nimterop much easier, because it's always tricky to install in localdeps. |
16:37:32 | disruptek | now i can just point to userdeps for nimterop and localdeps for anything else. very nice. |
16:37:57 | shashlick | Ok so the default nimbledir simply comes from nim.cfg |
16:38:02 | disruptek | right. |
16:38:36 | shashlick | https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L46 |
16:39:03 | shashlick | I don't even think that's complete |
16:39:19 | disruptek | whaddya mean? |
16:40:00 | shashlick | If not windows sets it to global value |
16:40:09 | shashlick | Which means it shouldn't look in home |
16:40:21 | shashlick | But that's not how the compiler behaves on posix |
16:41:22 | disruptek | nimblePath is cumulative; it sets both those directories. |
16:41:46 | shashlick | Ok that makes sense |
16:41:49 | * | tklohna joined #nim |
16:42:13 | shashlick | Ok I get it now |
16:42:30 | * | nerian joined #nim |
16:42:53 | disruptek | the whole thing works much better if you don't try to fight the tools the compiler gives us. |
16:43:24 | narimiran | clyybber: believe it or not, that commit that should not be related to the failings *is* the cause of them :) |
16:43:39 | Zevv | sealmove: I'll tell you when we know the source of 0x7fff |
16:44:07 | sealmove | Zevv: I am currently investigating it |
16:44:07 | Zevv | 0x1fff is not hefty, 0x3fff is pretty heft, 0x7fff is _very_ hefty, and anythin above is *too* hefty |
16:44:33 | sealmove | but what is this number? pointer to internal vm memory? |
16:44:39 | sealmove | index i mean |
16:46:06 | * | Hideki_ joined #nim |
16:47:16 | solitudesf | what the heck, nimble doesnt install disruptek's github wrapper, literally just skips src/ directory |
16:47:52 | Zevv | sealmove: this is my test case http://ix.io/22KC/nim |
16:47:54 | Zevv | protobuf compiler |
16:49:14 | sealmove | yeah, I have something very similar: https://github.com/sealmove/nimitai/blob/master/nimitai/private/ksypeg.nim |
16:49:30 | Zevv | sealmove: indeed it seems to be a relative offset that gets placed in code ("patched"), and it needs to fit in the upper 16 bits of a 32 bit word |
16:49:55 | Zevv | this feels like the small memory model in DOS where you relative jumps could only be 32K |
16:50:17 | * | Hideki_ quit (Ping timeout: 246 seconds) |
16:51:01 | sealmove | this is so frustrating because the limitations are not clearly explained |
16:51:01 | Zevv | so it seems to be some hard limit of the VM instruction format |
16:51:15 | Zevv | TInstr is 32 bit |
16:51:20 | Zevv | if it doesn't fit, it doesn't fit |
16:51:35 | sealmove | where should you draw the line and not use VM? |
16:51:42 | sealmove | nobody knows |
16:52:00 | Zevv | what restrictions would one expect of a VM? |
16:52:21 | Zevv | best case it can run any 'reasonable' size program, where 'reasonable' should probably be limited by the host |
16:52:58 | sealmove | so you are saying this is definately a bug to be adressed? |
16:53:14 | Zevv | Not up to you or me, but we should file it |
16:54:09 | sealmove | it will be sad if it doesn't get fixed, because Nim should shine in metaprogramming |
16:54:44 | sealmove | unless what we are trying to do is considered not a use-case of the VM |
16:54:45 | disruptek | we're already running into those limitations, and it's early days for what's possible (read: probable) with nim's mp. |
16:55:23 | sealmove | mp? |
16:55:30 | sealmove | ah metaprogramming |
16:57:36 | Zevv | https://github.com/nim-lang/Nim/issues/12727 |
16:57:39 | disbot | ➥ Error: internal error: (filename: "vmgen.nim", line: 179, column: 16); snippet at 12https://play.nim-lang.org/#ix=22KE 😏 |
16:58:19 | Zevv | Why the _hell_ is there a *smiley* there? Are we, like, 13 years old? |
17:01:28 | disruptek | yep. |
17:04:04 | Zevv | \o/ |
17:05:04 | sealmove | thanks for reporting, I'll try my best to make a as-minimal-as-possible example. |
17:05:13 | FromGitter | <Willyboar> nope but we feel like 13 :P |
17:05:25 | Zevv | I think you should be able to generate just some kind of long program with loops or braches and you should be able to hit it |
17:05:36 | FromGitter | <Willyboar> !help |
17:05:56 | FromGitter | <Willyboar> !disbot |
17:06:07 | sealmove | first I'll check if the problem is npeg + staticRead |
17:15:09 | * | dillonb joined #nim |
17:17:32 | disruptek | solitudesf: sorry; i don't really test it with nimble. |
17:25:19 | solitudesf | can you at least add the `bin` field |
17:25:41 | * | abm quit (Quit: Leaving) |
17:25:47 | disruptek | what would that do? |
17:26:10 | solitudesf | enables `nimble build` |
17:26:18 | solitudesf | but i guess thats not a priority for you |
17:27:00 | FromGitter | <Willyboar> https://embark.status.im/news/2019/11/18/nim-vs-crystal-part-1-performance-interoperability/ in this article somewhere in the middle says about native nim html DSL. There is such a thing? |
17:27:18 | FromGitter | <Willyboar> I only know htmlgen |
17:27:43 | disruptek | solitudesf: what would that even do? it's a library, not a binary. |
17:28:03 | solitudesf | huh, i guess im retarded then |
17:28:13 | disruptek | what are you trying to do? |
17:28:53 | solitudesf | wait, but it uses cligen |
17:29:11 | FromGitter | <Willyboar> A! Sorry it is an external library. |
17:29:38 | disruptek | solitudesf: what package are we talking about? i thought you said `github wrapper`. |
17:29:48 | disruptek | !repo disruptek/github |
17:29:49 | disbot | https://github.com/disruptek/github -- 11github api v3 for nim |
17:31:00 | solitudesf | its two separate issues |
17:31:28 | solitudesf | nimble install on this package doesnt install src and its contents |
17:32:30 | disruptek | maybe a nimble person can tell me how to fix that or submit a pr. |
17:34:54 | FromDiscord_ | <krab4t> -opt:speed test? |
17:43:15 | * | nif quit (Quit: ...) |
17:43:26 | * | nif joined #nim |
17:43:30 | * | kcvinu joined #nim |
17:43:38 | kcvinu | Hi |
17:43:49 | kcvinu | How to use timer in Nim ? |
17:44:12 | sealmove | Zevv: https://play.nim-lang.org/#ix=22KQ |
17:44:33 | kcvinu | I need to start a timer and after a few milliseconds, i want the elapsed time |
17:44:40 | Zevv | sealmove: and *boom* it goes |
17:44:42 | sealmove | a proper error message is shown on Nim Playground |
17:45:25 | disruptek | solitudesf: what's the 2nd issue? |
17:46:07 | sealmove | "npeg-0.21.0/npeg/codegen.nim(133, 15) Error: VM problem: too many registers required" |
17:46:19 | sealmove | now Nim blames you Zevv |
17:46:21 | sealmove | lol |
17:46:28 | Zevv | nimversion? |
17:46:49 | sealmove | "latest" from playground |
17:46:55 | sealmove | just run it online |
17:47:40 | Zevv | on my machine with devel I get the 'Error: internal error: (filename: "vmgen.nim", line: 179, column: 16)' |
17:48:09 | FromDiscord_ | <Rika> kcvinu, https://play.nim-lang.org/#ix=22KR |
17:48:34 | sealmove | yes, I get the same on my machine |
17:48:53 | FromDiscord_ | <Rika> i think https://nim-lang.org/docs/monotimes.html would be best if you're only doing durations |
17:49:23 | * | solitudesf quit (Read error: Connection reset by peer) |
17:50:26 | kcvinu | FromDiscord_ Thanks, :) |
17:51:58 | Zevv | sealmove: the VM registers was fixed by araq quit recently |
17:52:11 | * | solitudesf joined #nim |
17:52:27 | sealmove | ah I see |
17:52:43 | Zevv | we just need to extend the VM instruction type to 64 bits |
17:53:10 | sealmove | yes!! |
17:53:42 | * | Hideki_ joined #nim |
17:54:27 | sealmove | jezz 0x7fff is only 16bit |
17:54:53 | sealmove | make it 32bit if not 64 |
17:55:31 | Zevv | no the TInstr is 32 bit, and the 16 of that re used for offsets, or something like that |
17:58:06 | sealmove | This is a real block for me. I mean, even if I hand-write the parser, there is no guarantee it will run at CT. |
17:58:28 | disruptek | get someone to write it who can make that guarantee. |
17:58:38 | sealmove | how? |
17:58:52 | disruptek | threaten the safety of their family. |
17:58:56 | sealmove | lol |
17:59:01 | sealmove | I think nobody can guarantee it |
17:59:24 | disruptek | who have you threatened so far? |
18:01:18 | disruptek | solitudesf: what's the 2nd issue you ran into? |
18:02:04 | FromDiscord_ | <Kaynato> @mratsim Neo works for me |
18:04:49 | sealmove | I am scared there is a good reason Araq used 32bit instructions |
18:06:59 | * | sealmove quit (Quit: WeeChat 2.6) |
18:08:08 | * | sealmove joined #nim |
18:08:43 | solitudesf | disruptek, its the library/binary misunderstanding. whatever. |
18:09:14 | disruptek | okay; i'll fix it soon. lemme know if i can help otherwise. |
18:11:56 | disruptek | solitudesf: if you want a github client, checkout `hub`. |
18:14:53 | * | Hideki_ quit (Ping timeout: 276 seconds) |
18:16:59 | lqdev[m] | all right. still highly WIP, but tell me what you think about the concept https://github.com/liquid600pgm/rdgui |
18:21:24 | FromDiscord_ | <Kaynato> Getting arrayfire bound to nim. Just trying out the old binding library from a few years back and it seems that `clong` and `cint` are equivalent types? It's not allowed to define an operator for both? |
18:24:07 | FromDiscord_ | <Kaynato> If cint == clong for some architectures, I should check that and only define both procs when it's not the case...? |
18:25:45 | * | kcvinu quit (Remote host closed the connection) |
18:27:20 | clyybber | narimiran: HUh, how? |
18:27:52 | narimiran | clyybber: no idea how, but reverting that helped |
18:29:02 | clyybber | narimiran: Interesting, btw regarding the range op syntax |
18:29:26 | clyybber | I was the one who changed it in the compiler to be spaced |
18:29:39 | clyybber | But in hindsight I don't think it was a good idea |
18:30:08 | clyybber | It looks more like a range if its together as it shows that its some kind of connection if that makes sense |
18:30:22 | clyybber | At least I find it more readable |
18:33:52 | * | solitudesf- joined #nim |
18:34:10 | * | narimiran quit (Ping timeout: 265 seconds) |
18:34:44 | Zevv | sealmove: I go a 10 line reproduction. Just create AST with a long while so the JumpBack can not be encoded in the VM op |
18:34:57 | * | narimiran joined #nim |
18:35:07 | sealmove | Zevv: great! |
18:35:14 | narimiran | clyybber: sorry my net is wonky |
18:35:26 | narimiran | so you probably didn't see my previous message |
18:36:04 | clyybber | yeah |
18:36:19 | narimiran | yeah, i get your reasons for no spaces, but now nimpretty "likes" spaces and stuff is automatically formatted with spaces |
18:36:41 | * | solitudesf quit (Ping timeout: 252 seconds) |
18:36:44 | clyybber | Oh :( I thought nimpretty just wants consistent spacing .. |
18:36:54 | * | PMunch joined #nim |
18:36:54 | narimiran | i personally am undecided, sometimes i like spaces, sometimes they feel like they don't belong there |
18:37:19 | sealmove | Zevv: can I adopt this snippet in my README.md? |
18:37:40 | Zevv | nope, it's copyrighted by me. I do sell licenses, though |
18:38:45 | Zevv | dude, seriously, is there any reason you could *not*? :) |
18:40:35 | FromDiscord_ | <mratsim> @Kaynato ah but Neo doesn't use Cudnn, so that would mean Cuda works but not cudnn |
18:41:13 | sealmove | ':] |
18:42:45 | Zevv | sealmove: I might be mistaking, but it seems that the VM instructions for jumps have 8 bits unused |
18:43:08 | Zevv | the 32 bits are split into opcode, regA regB and regC, or regBx which is B+C |
18:43:20 | Zevv | Offsets are stored in regBx only, while regA *seems* unused in these cases |
18:43:33 | Zevv | so we can introduce a 24 bit regaX |
18:43:52 | Zevv | until araq comes along and mentions something obvious I missed |
18:45:45 | Zevv | oh wrong already. PNode is in rega. what is PNode |
18:46:33 | Zevv | no not true. I shall shut up now until I know what I'm talking about |
18:48:26 | sealmove | Although I am a bit disappointed, this topic is very interesting. I am excited to hear what Araq has to say. |
18:49:23 | clyybber | Zevv: A PNode can |
18:49:29 | clyybber | t fit into 32 bit |
18:49:36 | clyybber | its a ref object |
18:49:43 | Zevv | no of course not, I was just rambling |
18:49:48 | clyybber | kk |
18:50:16 | Zevv | but my earlier statement seems to hold that there is always 0 in rega for opJmpBack at least |
18:51:01 | clyybber | nice |
18:51:18 | clyybber | the vm also has support for large instructions fwiw |
18:51:27 | sealmove | HOW? |
18:51:47 | sealmove | tell me there is a compiler switch :D |
18:53:01 | clyybber | https://github.com/nim-lang/Nim/blob/devel/compiler/vmdef.nim#L247 |
18:53:19 | sealmove | I see |
18:53:36 | sealmove | But we are talking about the whole adressing mode |
18:54:00 | sealmove | Or just jmps? |
18:54:11 | Zevv | for now it's jumps, until we run into something else |
18:56:37 | * | uu91 quit (Read error: Connection reset by peer) |
18:56:51 | * | uu91 joined #nim |
18:57:16 | clyybber | mratsim: THe only changes the last two days to destructor stuff were https://github.com/nim-lang/Nim/commit/8b2f8f5430e8c328efe5bce94e397f15e3c501af and https://github.com/nim-lang/Nim/commit/c85e266d1d6553fe14ecd28af7a58687672c859d afaik |
18:57:23 | clyybber | And one of them has been reverted now |
18:57:31 | clyybber | So maybe you should try again |
18:57:55 | Zevv | well, this fixes it for my 'while' example, see if I can make it more generic |
19:08:21 | FromDiscord_ | <mratsim> @Clyybber I've added the offending commit at the bottom of my issue |
19:09:01 | FromDiscord_ | <mratsim> it's this one: https://github.com/nim-lang/Nim/commit/c85e266d1d6553fe14ecd28af7a58687672c859d |
19:09:12 | FromDiscord_ | <mratsim> basically destructors were never injected in the past |
19:09:28 | FromDiscord_ | <mratsim> but the codegen doesn't properly declare the related temporaries |
19:21:51 | * | solitudesf-- joined #nim |
19:24:55 | * | solitudesf- quit (Ping timeout: 265 seconds) |
19:27:26 | * | nif quit (Quit: ...) |
19:28:40 | * | nif joined #nim |
19:30:12 | FromDiscord_ | <Kaynato> I think I am getting closer to getting this working. is `operators_broadcasted_cuda.nim.cpp` supposed to be `.cu`? |
19:32:07 | * | ng0 joined #nim |
19:51:58 | FromDiscord_ | <Kaynato> Wait, how am I able to get cuda working with neo while being unable to get it working with arraymancer |
19:55:17 | * | nerian quit (Quit: Leaving) |
19:57:18 | * | lritter quit (Ping timeout: 265 seconds) |
19:58:13 | FromDiscord_ | <Kaynato> @mratsim: Should I be seeing nvcc being called at some point when compiling with -d:cuda? From what I can tell, compilation throws errors on ` gcc.exe -c -w -mno-ms-bitfields -DWIN32_LEAN_AND_MEAN -I"E:/Program Files/nim-1.0.2/lib" -IE:/Cloud/Sync/Sync/Dev/_Project/nim/test/src -o C:/Users/MAIN/nimcache/array_d/@m..@s..@s..@s..@s..@s..@s..@s..@s..@sC@c@sUsers@[email protected]@[email protected]@stensor@soperators_broadcasted_cuda.nim |
20:06:50 | * | luis_ joined #nim |
20:17:13 | clyybber | mratsim: Ah, I see |
20:26:17 | * | krux02 quit (Remote host closed the connection) |
20:27:19 | Zevv | sealmove: just looked another minute into this, but it's not going to fit for other generic cases. There's also FJump which is 'jump if expression', where the other bits are used |
20:30:41 | madprops | hmm seems somePath.joinPath("../something") doesn't work |
20:30:51 | madprops | it's not taking into account the ".." |
20:32:10 | madprops | path = getCurrentDir().joinPath(path) |
20:32:15 | madprops | path is "../sym" |
20:32:43 | madprops | ohh nvm |
20:32:51 | madprops | my fault, im running it from a subdir |
20:34:47 | * | nsf quit (Quit: WeeChat 2.6) |
20:50:57 | * | drewr joined #nim |
20:54:51 | FromDiscord_ | <onelivesleft> the compiler can weed out const conditions without using templates, right? like if I do `const debug = false` `if debug: blah`, the compiler will skip it? |
20:55:21 | clyybber | when debug: blah |
20:55:25 | clyybber | then yeah |
20:57:02 | sealmove | Zevv: Ok so we want 64bit instructions |
20:58:54 | FromDiscord_ | <onelivesleft> ty |
20:58:58 | Zevv | yeah, I'm trying to see how far I can push that without understanding all the details. My ops are now 64 bits with 16/32 bit registers |
20:59:24 | Zevv | but the bit fiddling is in several places, so I need to catch'em all |
20:59:28 | sealmove | wow you are doing it, nice |
21:01:30 | Zevv | nah, just playing around to learn how stuff works for now |
21:02:21 | * | solitudesf- joined #nim |
21:04:04 | FromDiscord_ | <Kaynato> I'm calling a function imported from c that takes `*float` as an arg, since it consumes arbitrary length float arrays. How do I pass it the right value from nim? |
21:04:57 | * | solitudesf-- quit (Ping timeout: 240 seconds) |
21:05:16 | PMunch | Hmm, when using nimterop is there a way to specify which GCC it should use for the preprocessing? |
21:05:56 | * | narimiran quit (Ping timeout: 265 seconds) |
21:06:31 | * | luis_ quit (Quit: luis_) |
21:06:57 | * | luis_ joined #nim |
21:07:21 | shashlick | You can get $CC |
21:07:24 | shashlick | Set |
21:08:47 | PMunch | Hmm, well that worked. But it doesn't pass on "passC" definitions either.. |
21:11:49 | Zevv | sealmove: time for ZzZzz. I see no reason why this would not work, but downside is of course double the code size. Alternative would be to add double-word "long jump" alternatives, which increases vmgen and vm complexity. |
21:12:46 | sealmove | maybe we can make compiler switches for this |
21:12:51 | Zevv | bah |
21:13:04 | sealmove | why not, it's nice to be able to control such stuff |
21:13:07 | Zevv | noone ever said "there's only 173 of those yet, so 174 is probably just fine as well" |
21:13:54 | sealmove | well, we need to hear from Araq before thinking anything :P |
21:14:02 | sealmove | gn! |
21:14:06 | Zevv | sure, you too |
21:14:08 | Zevv | later! |
21:24:41 | shashlick | @PMunch passC go thru Nim, I don't intercept them |
21:24:48 | shashlick | What do you need to pass |
21:25:12 | PMunch | I managed to get one through cDefine |
21:25:25 | shashlick | Ok cool |
21:25:37 | PMunch | But -mmcu=atmega328p wasn't possible to define that way |
21:26:20 | PMunch | So I made a little shell script with "avr-g++ -mmcu=atmega328p $@" in it |
21:27:50 | PMunch | But now it's generating a "type" block, but it skips both the types so it just outputs the type keyword and a bunch of comments which makes Nim fail.. |
21:28:16 | shashlick | You could just define CC like that for now |
21:28:21 | shashlick | Not sure if that will work |
21:28:24 | PMunch | Not that I really see why it's skipped.. |
21:28:31 | shashlick | But a good requirement |
21:28:42 | PMunch | Oh I could define CC directly like that? |
21:28:49 | shashlick | You could try |
21:29:03 | PMunch | Yeah it worked |
21:29:14 | PMunch | Or well, it fails on the same error |
21:38:37 | shashlick | Sorry have to run for an event but will help later if you need |
21:49:00 | * | Trustable quit (Remote host closed the connection) |
21:58:26 | * | tane quit (Ping timeout: 240 seconds) |
22:00:55 | * | PMunch quit (Read error: Connection reset by peer) |
22:01:13 | * | clyybber quit (Quit: WeeChat 2.6) |
22:05:56 | * | uvegbot quit (Ping timeout: 240 seconds) |
22:10:39 | * | uvegbot joined #nim |
22:11:21 | * | Hideki_ joined #nim |
22:16:01 | * | Hideki_ quit (Ping timeout: 265 seconds) |
22:17:27 | * | uu91 quit (Read error: Connection reset by peer) |
22:18:31 | * | uu91 joined #nim |
22:19:30 | planetis[m] | dump question ahead: how can i count the number of iteration of countup with a step bigger than 1? |
22:19:57 | disruptek | division? |
22:22:40 | planetis[m] | thanks disruptek |
22:40:38 | madprops | working on this. still early stages https://github.com/madprops/lq |
22:56:02 | * | solitudesf- quit (Ping timeout: 240 seconds) |
22:57:05 | FromDiscord_ | <krab4t> make it for windows too 🙂 |
23:06:35 | * | luis_ quit (Quit: luis_) |
23:07:03 | * | luis_ joined #nim |
23:13:56 | * | uu91 quit (Ping timeout: 240 seconds) |
23:14:26 | * | uu91 joined #nim |
23:20:18 | FromDiscord_ | <onelivesleft> What is the best practice for when your module requires another module to work? For instance, I have a module which creates a macro with an `init_table` in it; if my module is imported then `tables` must also be imported, or `init_table` will not be found. |
23:22:49 | * | uu91 quit (Read error: Connection reset by peer) |
23:23:11 | * | uu91 joined #nim |
23:27:46 | zedeus | you can export that function or the entire module |
23:28:02 | zedeus | or use bindSym in the macro |
23:29:02 | FromDiscord_ | <onelivesleft> cool, ty |
23:43:17 | * | tklohna quit (Ping timeout: 246 seconds) |