00:13:16 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:38:23 | * | stefanos82 quit (Quit: Quitting for now...) |
01:00:38 | FromGitter | <awr1> float16 to be used how |
01:00:48 | FromGitter | <awr1> software implementation? |
01:01:08 | FromGitter | <awr1> or the weird __fp16 AArch thing |
01:09:49 | * | shomodj joined #nim |
01:57:27 | * | dddddd quit (Remote host closed the connection) |
02:18:00 | * | actuallybatman quit (Ping timeout: 272 seconds) |
02:21:19 | * | theelous3 quit (Ping timeout: 246 seconds) |
02:24:00 | * | theelous3 joined #nim |
02:28:22 | * | theelous3 quit (Ping timeout: 245 seconds) |
02:28:56 | * | lritter joined #nim |
02:29:33 | * | NimBot joined #nim |
02:35:46 | * | theelous3 joined #nim |
02:40:23 | FromGitter | <brentp> software |
03:02:26 | * | lritter quit (Ping timeout: 248 seconds) |
03:03:20 | * | lritter joined #nim |
03:07:36 | * | actuallybatman joined #nim |
03:17:38 | * | actuallybatman quit (Quit: leaving) |
03:50:29 | * | theelous3 quit (Ping timeout: 272 seconds) |
04:01:39 | * | fjellfras joined #nim |
04:18:43 | * | nsf joined #nim |
04:21:06 | * | chimez joined #nim |
04:24:05 | * | mwbrown quit (Ping timeout: 258 seconds) |
04:26:12 | * | carkh quit (Remote host closed the connection) |
04:37:27 | * | snuffdtek joined #nim |
04:37:44 | * | mwbrown joined #nim |
04:37:49 | * | chimez quit (Ping timeout: 246 seconds) |
04:38:05 | * | chimez joined #nim |
04:53:43 | * | dgreen joined #nim |
05:44:04 | * | solitudesf joined #nim |
06:01:50 | * | solitudesf quit (Quit: Leaving) |
06:02:47 | * | absolutejam2 joined #nim |
06:02:53 | FromGitter | <zacharycarter> well - I can't seem to get nim-glm working correctly |
06:03:04 | FromGitter | <zacharycarter> so I guess I'm going back to the half-baked port of bx's math lib I was using before |
06:06:20 | * | chimez quit (Quit: chimez) |
06:12:18 | * | gmpreussner quit (Ping timeout: 248 seconds) |
06:13:55 | * | PMunch joined #nim |
06:16:19 | * | narimiran joined #nim |
06:19:01 | FromGitter | <awr1> did you see the `patchFile()` thing |
06:26:03 | * | absolutejam3 joined #nim |
06:26:45 | * | Vladar joined #nim |
06:27:43 | * | absolutejam2 quit (Ping timeout: 246 seconds) |
06:29:29 | FromGitter | <zacharycarter> I did - thanks for sharing that |
06:30:17 | FromGitter | <zacharycarter> the problem I was facing wasn't related though :/ the pointer to the matrices I was sending to the buffers wasn't working as expected |
06:31:03 | FromGitter | <zacharycarter> and I'm not sure how to fix - plus the math module I'm using seems to work - although the vertices are off by a tenth or so in some cases - but I'm just going to chalk it up to floating point math for now |
06:35:46 | * | gmpreussner joined #nim |
06:47:16 | * | absolutejam3 quit (Ping timeout: 244 seconds) |
06:47:24 | * | dgreen quit (Remote host closed the connection) |
06:50:09 | * | krux02 joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:27 | * | gmpreussner joined #nim |
07:09:59 | * | laaron quit (Remote host closed the connection) |
07:16:11 | * | laaron joined #nim |
07:31:07 | * | solitudesf joined #nim |
07:41:43 | * | absolutejam3 joined #nim |
07:46:09 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:01:07 | * | floppydh joined #nim |
08:03:24 | * | stefanos82 joined #nim |
08:11:53 | * | absolutejam4 joined #nim |
08:14:34 | * | absolutejam3 quit (Ping timeout: 272 seconds) |
08:31:39 | * | Vladar quit (Remote host closed the connection) |
08:36:12 | FromGitter | <mratsim> @brentp, AFAIK float16 is often just a data placeholder for GPU interop |
08:36:55 | FromGitter | <mratsim> I didn't see a full float16 implementation in C/C++ yet, it's often just things like these: https://github.com/halide/Halide/blob/master/src/runtime/float16_t.cpp |
08:37:50 | * | absolutejam4 quit (Ping timeout: 244 seconds) |
08:46:24 | FromGitter | <alehander42> Zevv: i am interested in such a lib |
08:46:39 | FromGitter | <alehander42> would it be able to generate a tree ref object |
08:46:42 | FromGitter | <alehander42> similar to PNode ? |
08:46:46 | FromGitter | <alehander42> (NimNode) |
08:48:58 | * | shomodj joined #nim |
08:48:59 | * | absolutejam4 joined #nim |
08:49:49 | * | solitudesf- joined #nim |
08:52:18 | * | solitudesf quit (Ping timeout: 248 seconds) |
08:59:12 | * | absolutejam4 quit (Ping timeout: 245 seconds) |
09:05:33 | FromGitter | <ahcm> Is there something like python's for ... else? Catching when the iterator is empty? |
09:07:02 | leorize | no |
09:07:35 | * | Vladar joined #nim |
09:13:10 | narimiran | btw, `for ... else` is not for catching when the iterator is empty |
09:13:32 | FromGitter | <ahcm> So can you know whether lines(File) still has something? |
09:22:02 | Zevv | alehander42: that is the idea. I have something in mind, but I'm not sure how to implement this with an explainable API yet |
09:22:14 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
09:22:34 | * | laaron joined #nim |
09:23:59 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:28:59 | * | solitudesf- quit (Quit: Leaving) |
09:29:15 | * | solitudesf joined #nim |
09:37:32 | * | ng0 joined #nim |
09:49:33 | FromGitter | <ohenepee> Can anyone point me to the language's roadmap? Or is there any info on when it'll get stable? |
09:50:48 | * | shomodj joined #nim |
09:50:56 | narimiran | it is already stable |
09:51:06 | narimiran | the current version is 1.0 RC2 |
09:51:51 | narimiran | (the official name for the current version is 0.20.2, which is in fact 1.0rc2) |
09:52:31 | FromGitter | <ahcm> @naimiran, catching non break, case, I mean |
09:53:49 | leorize | you can't check if lines() still have anything left |
09:54:12 | narimiran | @ahcm i guess you can do it with some previously defined flag, e.g. `var wasEarlyStopped = false`, and then the branch which would break, sets it to true, and later on, instead of python's `else` you have `if not earlyStopped: ....` |
09:54:59 | narimiran | not as elegant, but at least it is not as confusing as `for ... else`, because i would say that 90% of people using python don't know what it does |
09:55:20 | FromGitter | <ahcm> I don't like the syntax either |
09:55:37 | FromGitter | <ahcm> just trying to learn as much of nimbuses as possible |
09:55:43 | FromGitter | <ahcm> *nim |
09:56:26 | narimiran | btw, why do you need to know if `lines(f)` is empty? |
09:58:14 | FromGitter | <ahcm> iterator for a file with entries of varying lines, end of entry can be indicated by start of next entry or end of file |
09:59:34 | narimiran | i usually just do `for line in lines(f): ...` and it yields the lines as long as there is some, i never needed to manually check anything. but i might be missing some use case |
10:00:01 | FromGitter | <ahcm> it's wether I need to yield once more or not |
10:01:17 | FromGitter | <ahcm> Also I expected lines to be a closure |
10:01:28 | FromGitter | <ohenepee> @FromIRC @narimiran there are currently 91 open issues with the *Crash* tag in the repo.... most of them are things large projects would stumble upon one way or the other... how is that for stable? |
10:02:28 | narimiran | ok, when does it become stable? when that number is 0, or less than 10, or? |
10:03:49 | leorize | @ohenepee well most compilers have a rather decent amount of crashes |
10:05:17 | FromGitter | <ohenepee> @narimiran when did this convo be come one worth ridiculing? |
10:05:43 | leorize | I'd say you won't stumble on them for big projects |
10:06:05 | leorize | nimbus managed to go really far |
10:06:13 | leorize | and the compiler is a big project on its own |
10:06:24 | FromGitter | <ohenepee> @leorize I'm coming from Go, It's extremely rare to have compiler crashes... have you guys actually looked at there issues https://github.com/nim-lang/Nim/labels/Crash |
10:06:38 | leorize | I'm looking at them |
10:06:54 | leorize | well go don't have generics and meta programming |
10:07:39 | leorize | most of the crashes came from experimental features and/or corner cases in Nim's macro system |
10:08:07 | FromGitter | <ohenepee> I'm not talking about features here... neither am I comparing languages... I'm kinda attracted to Nim... which is why I'm worried to about those specific issues.. at least about half of them |
10:08:57 | FromGitter | <ohenepee> @leorize... I get you now... thanks a lot |
10:08:58 | narimiran | Go has Google backing, Nim is currently (just) three guys working full-time + community contributions |
10:10:03 | leorize | @ohenepee np |
10:10:04 | narimiran | plus Nim has much more features than Go ;) |
10:10:12 | FromGitter | <ohenepee> @narimiran Yh, I'm fully aware of that... thanks.... I guess Leorize's point about the types of issues they're seem valid for a large percentage of them |
10:10:35 | leorize | narimiran: you might want to check if all of them are still valid :P |
10:10:48 | narimiran | unfortunately, it is hard to keep up, and any help regarding those crashes + regressions + high priority bugs is highly appreciated and very welcome |
10:11:10 | narimiran | leorize: i do that periodically. i might do it again, sure |
10:15:05 | * | couven92 joined #nim |
10:15:24 | leorize | narimiran: nim.nvim just got it's first breaking change |
10:15:55 | leorize | I've removed g:nim_fold, set foldenable to off instead if you wanted to disable code folding |
10:20:34 | narimiran | yeah, i don't want folds by default. i realized i just do `zR` for every nim file, and it got annoying, so `autocmd BufRead * normal zR` is in my init.vim since recently :) |
10:20:44 | Zevv | see! |
10:21:13 | leorize | blame those neovim devs :p |
10:21:20 | Zevv | neovim devs: see! |
10:21:41 | narimiran | Zevv: how is your nvim journey going? |
10:22:25 | Zevv | ok I guess - everthing is setup exactly as it always was. The only problem is that I now have to build nvim from source on about every other machine I work on. Which is about a dozen :( |
10:22:43 | Zevv | ancient 16.04, centos7, etc |
10:22:51 | leorize | build an appimage then carry that with you instead |
10:22:56 | Zevv | Bwhah |
10:23:16 | Zevv | I just use nvim on my own laptop, and fall back to vim7 on all other machines - I don't need to do Nim there |
10:23:30 | leorize | Zevv: https://github.com/neovim/neovim/wiki/Installing-Neovim#appimage-universal-linux-package |
10:23:47 | Zevv | soooo much work all that |
10:25:10 | narimiran | oooh, now i see that Zevv has already made a PR to nim.nvim :) nice |
10:25:43 | narimiran | btw, now that i'm looking at that PR: leorize, this morning i realized that `]]` doesn't work in the visual mode.... |
10:27:06 | leorize | make a PR for vmap :D |
10:28:48 | leorize | vnoremap I mean |
10:30:23 | narimiran | i have zero experience with vimscript, but shouldn't `noremap` already cover all modes? (`nnoremap` is just a normal mode, right?) |
10:31:30 | leorize | hmm, yea |
10:32:12 | leorize | maybe something is not quite right with the function logic then |
10:33:02 | leorize | oh, I see now |
10:33:22 | leorize | search() interrupts visual mode |
10:37:16 | * | dddddd joined #nim |
10:41:13 | FromGitter | <mratsim> @ohenepee, if you use Nim like C or Go with no generics, static, macros, or types as value and no templates, you can eliminates 95% of those crash issues |
10:42:08 | FromGitter | <mratsim> Also the crash issues are compiler crashes, so it's caught at compile-time |
10:53:25 | leorize | Zevv: just found out about no_plugin_maps, so... probably I'm gonna get rid of nim_noremap |
10:55:13 | Zevv | Last time I'll PR to your little project dude! :) |
10:56:08 | * | couven92 quit (Quit: Client disconnecting) |
10:56:19 | leorize | was reading some ftplugins from neovim to improve this :P found that one |
10:57:32 | Zevv | makes perfect sense |
10:57:46 | Zevv | but then users can't choose to ignore all plugin bindings or just yours |
10:58:03 | leorize | fine, I'll keep nim_noremap :P |
10:58:23 | Zevv | \o/ |
10:58:24 | leorize | oh there's a convention here |
10:58:35 | leorize | gonna rename it into no_nim_maps |
10:58:40 | leorize | to follow others :P |
11:01:37 | leorize | Zevv: would you like a <Plug> map for section movements? |
11:02:00 | Zevv | The default [[ ]] seems to work, what does it add? |
11:02:12 | Zevv | the vim-defaults, that is |
11:03:08 | * | PMunch quit (Remote host closed the connection) |
11:03:31 | * | sagax quit (Ping timeout: 258 seconds) |
11:06:43 | leorize | Zevv: it actually jumps between procs? |
11:07:02 | Zevv | in practice, yes |
11:07:12 | Zevv | it jumps between blocks wich stick to the left margin |
11:07:32 | leorize | I'm trying the default one and it jumps from {.experimental.} to end of file... |
11:07:42 | * | shomodj_ joined #nim |
11:07:54 | Zevv | what I *would* like it to do is jump to the next block of the indent level I currently am |
11:08:10 | Zevv | so if i'm on an case 'of' and do ]] it jumps to the next of, for example |
11:08:47 | leorize | you can check the current code |
11:08:50 | leorize | it's quite simple |
11:09:02 | leorize | but sure, jumps to next `of` is possible |
11:09:22 | leorize | if it hasn't already done that yet |
11:09:43 | Zevv | probably just a vim default thing already, as it is usable in any language |
11:10:03 | Zevv | [l ]l |
11:10:26 | Zevv | oh no wait, ignore that |
11:11:54 | * | shomodj quit (Ping timeout: 272 seconds) |
11:17:19 | * | PMunch joined #nim |
11:19:50 | leorize | Zevv: g:nim_noremap is kept :P |
11:20:22 | * | clyybber joined #nim |
11:22:24 | Zevv | sweet |
11:31:27 | * | fjellfras quit (Quit: Leaving) |
11:35:59 | * | absolutejam4 joined #nim |
11:36:07 | leorize | narimiran: fixes for visual mode is now in #head |
11:36:07 | FromGitter | <alehander42> -d:nimOldCaseObjects when we use the compiler api |
11:36:09 | FromGitter | <alehander42> directly |
11:36:18 | FromGitter | <alehander42> i didnt realize that: notice to people that use it |
11:40:28 | * | absolutejam4 quit (Ping timeout: 245 seconds) |
11:41:04 | leorize | Zevv: have you tried the plugin's section jumps? |
11:41:27 | Zevv | you will now tell me that does exactly what I want, right? |
11:41:56 | leorize | I haven't tried that on your code :) |
11:42:15 | Zevv | don't have my laptop with me, but will check tonight for sure |
11:43:29 | leorize | and if you like that one I'll make a plug map for it |
11:44:44 | leorize | probably will also look into adding C-] and C-<LeftClick> |
11:46:53 | Zevv | I already mapped your stuff to c-] |
11:46:55 | Zevv | i don't click |
11:47:11 | Zevv | I have only two hands |
11:48:20 | FromGitter | <alehander42> Zevv i currently try to use https://github.com/alehander42/helpful_parser, but mostly because of the trees |
11:48:29 | FromGitter | <alehander42> its very hobby-like |
11:48:45 | FromGitter | <alehander42> (and i also suspect it might be easier to write different lang backends for such a thing) |
11:51:41 | FromGitter | <mratsim> @brentp: fp16 in C C++: https://github.com/Maratyszcza/FP16 |
11:52:10 | Zevv | alehander42: well you got a lot working in only 600 lines there |
11:52:51 | FromGitter | <alehander42> i forgot |
11:52:56 | FromGitter | <alehander42> the text grammar is a todo |
11:53:21 | FromGitter | <alehander42> currently, its only generated by a object : https://github.com/alehander42/helpful_parser/blob/master/src/helpful_parser.nim#L96 |
11:53:50 | FromGitter | <alehander42> so its really tailored to only my usecase |
11:54:19 | Zevv | well, that's just another way of doing it. You could create the object from some kind of DSL with a bit of macros I guess |
11:55:37 | FromGitter | <alehander42> yeah, but i dont remember my reasoning: probably i thought its hard to make a good dsl from macros, but honestly if i have prefix `*` i think it would be all expressable |
11:56:09 | * | solitudesf quit (Quit: Leaving) |
11:56:17 | FromGitter | <alehander42> another thing i think i wanted was like injectable nodes |
11:56:28 | FromGitter | <mratsim> It's not that hard actually |
11:56:41 | FromGitter | <mratsim> the fact that you don't have to implement your own parser is a boon. |
11:56:44 | FromGitter | <alehander42> e.g. you define BigO in Arg List but its "children" are directly added to the children of the parent |
11:56:51 | FromGitter | <alehander42> instead of having a BigO child with children |
11:57:06 | FromGitter | <mratsim> the hard thing is how to avoid getting addicted to make a DSL for every little thing :P |
11:57:09 | FromGitter | <alehander42> e.g. (ArgList => BigO => child becomes just ArgList => child) |
11:57:50 | FromGitter | <alehander42> but this is mostly because i dont have inline rules :P because complicated I think |
11:59:48 | FromGitter | <alehander42> but overally my lib works naively for mostly those rules so i also hope that npeg gets trees |
11:59:49 | FromGitter | <alehander42> :P |
12:01:05 | FromGitter | <alehander42> ahh it also expects having a tree with certain api already : https://github.com/alehander42/helpful_parser/blob/master/pseudo.nim |
12:02:23 | Zevv | alehander42: I'll see where I end up. It is not trivial, and I'm learning all this stuff as I go, I have no formal background on these matters so I'm having a good time chewing through all the papers :) |
12:03:36 | FromGitter | <mratsim> I have no formal background as well. Code generation and Three Address Code / SSA was a bit like a toddler trying to stand up for me. |
12:04:32 | FromGitter | <alehander42> oh me too |
12:04:54 | FromGitter | <alehander42> ive done three address code just once reading something from a book |
12:05:35 | FromGitter | <alehander42> and mostly what i remember is something "this goto/{}/return looks similar to what nim is generating, interesting!" |
12:06:54 | Zevv | so, just a bunch of amateurs trying to change the world, eh |
12:09:39 | FromGitter | <alehander42> wait until you see my toy lang spec |
12:11:00 | FromGitter | <alehander42> but no. btw mratsim how is your nn lib going |
12:12:25 | FromGitter | <mratsim> watching the Status townhall at the moment :p |
12:12:49 | FromGitter | <mratsim> But I now have a DSL symbolic evaluator + compiler: https://github.com/numforge/laser/blob/master/laser/lux_compiler/lux_dsl.nim#L43-L55 |
12:13:10 | * | abm joined #nim |
12:14:04 | FromGitter | <mratsim> So I have a compiler completely implemented in macros and the symbolic evaluation is made so that it can also be done at runtime for JIT compilation |
12:14:47 | FromGitter | <mratsim> I got distracted by multithreading solutions this weekend though: https://github.com/mratsim/weave |
12:16:06 | FromGitter | <mratsim> I found one paper I'm pretty excited about and might perfectly fit Nim's design (even with current thread local GC) + be high performance enough. |
12:18:38 | Zevv | mratsim: I spent an hour on that paper yesterday; on what primitives would you implement this in Nim - reuse the current channels and threads, or build it on OS primitives from scratch? |
12:19:04 | Zevv | It seems that data is sent through channels by address, not by copy, so ownership is moved away - that does not fit in the current runtime, does it? |
12:19:07 | FromGitter | <mratsim> from scratch, the channels are a bit different |
12:20:15 | * | shomodj joined #nim |
12:20:16 | FromGitter | <mratsim> basically if we implement that in Nim we would have per worker: ⏎ ⏎ 1) 1 channel for task queue ⏎ 2) 1 channel for steal requests ⏎ 3) 1 channel (the original Nim channel) for inter-thread communication and results [https://gitter.im/nim-lang/Nim?at=5d35a9ffd44431099272dab8] |
12:20:35 | FromGitter | <mratsim> the first 2 are very specific and so can make a lot of assumptions and optimization |
12:20:38 | Zevv | and what about giving away the data to another thread? That will confuse the GCs, so in the end the pointer has to be returend to the originating thread so the GC can clean up its own stuff. Keep a ref while it is in transit? |
12:21:25 | FromGitter | <mratsim> the first 2 channel can be implemented via ptr as they are internal and never exposed. |
12:21:50 | FromGitter | <mratsim> well I've contacted the author this morning and asked if he had the C code public |
12:22:49 | Zevv | that would help :) |
12:22:52 | FromGitter | <mratsim> he started a new implementation in Rust for reference: https://github.com/aprell/rusty-tasking |
12:23:37 | * | shomodj_ quit (Ping timeout: 244 seconds) |
12:35:32 | * | Kaivo joined #nim |
12:38:49 | FromGitter | <zacharycarter> I couldn't get skrylar's dds loader working with compressed textures - so I went back to uncompressed |
12:38:57 | FromGitter | <zacharycarter> but, now I has grass |
12:39:11 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/1aKg/grass.png) |
12:45:34 | FromGitter | <mratsim> texture compression seems like a mess of formats: https://docs.unity3d.com/Manual/class-TextureImporterOverride.html |
12:48:53 | * | ryukoposting joined #nim |
12:54:19 | FromGitter | <brentp> @mratsim cheers. that looks like it should work |
12:54:27 | FromGitter | <brentp> (FP16) |
12:59:17 | * | JnR joined #nim |
12:59:56 | * | ryukophone joined #nim |
12:59:56 | * | ryukoposting quit (Read error: Connection reset by peer) |
12:59:57 | * | ryukophone quit (Read error: Connection reset by peer) |
13:00:34 | * | ryukophone joined #nim |
13:08:35 | * | absolutejam4 joined #nim |
13:14:36 | * | absolutejam4 quit (Ping timeout: 258 seconds) |
13:21:36 | * | laaron quit (Remote host closed the connection) |
13:23:54 | * | laaron joined #nim |
13:24:46 | * | theelous3 joined #nim |
13:25:19 | * | nsf quit (Quit: WeeChat 2.4) |
13:38:48 | * | sealmove joined #nim |
13:39:29 | * | PMunch quit (Remote host closed the connection) |
13:41:23 | sealmove | does system.cmp() work on objects? |
13:42:27 | lqdev[m] | afaik it works on tuples, but I'm not sure about objects |
13:45:13 | sealmove | yeah, i can use tuples but it's annoying having to write mytuple[3] instead of say mytuple.thirdField |
13:45:35 | sealmove | I wonder why you can't use names to access fields, since they do have names... |
13:45:56 | * | absolutejam4 joined #nim |
13:46:54 | FromGitter | <alehander42> what do you mean |
13:47:13 | FromGitter | <alehander42> you should be able to |
13:47:21 | FromGitter | <alehander42> if you use named tuples |
13:48:37 | sealmove | :O thanks! |
13:48:40 | sealmove | great |
13:53:42 | * | absolutejam4 quit (Ping timeout: 258 seconds) |
14:06:03 | FromGitter | <mratsim> lol |
14:06:13 | * | sagax joined #nim |
14:06:33 | FromGitter | <mratsim> by the way 3rd field is mytuple[2] |
14:07:27 | * | vitreo12 joined #nim |
14:10:52 | * | vitreo12 quit (Remote host closed the connection) |
14:21:03 | * | altarrel joined #nim |
14:26:23 | * | Cea joined #nim |
14:27:08 | Cea | @shashlick I'm alive again! Did you have any luck with the Quickjs nimterop? |
14:27:41 | shashlick | Check irc logs |
14:27:50 | shashlick | I posted a working wrapper |
14:28:29 | shashlick | I had to make manual changes to the generated wrapper from c2nim |
14:29:52 | Cea | @shashlick tyvm! |
14:34:01 | shashlick | Let me know if it works for real |
14:34:11 | shashlick | Just cause it compiles doesn't mean much |
14:35:34 | sealmove | mratsim: true that :D |
14:35:45 | * | sealmove quit (Quit: WeeChat 2.5) |
14:37:23 | Cea | @shashlick for sure, the templite.nim is failing to compile for me, I'm getting: `Error: unhandled exception: /home/dev/.nimble/pkgs/nimterop-0.1.0/nimterop/cimport.nim(603, 12) ret == 0 /tmp/nimterop_1322492663309841081.h(92, 40) Error: did not expect .` |
14:38:57 | Cea | But in the meantime I'll try the one you generated |
14:42:27 | shashlick | that's what i'm saying, i had to manually edit the generated wrapper from c2nim which is what i posted |
14:45:00 | Cea | Ah ok |
14:45:56 | leorize | anyone interested in a nimsuggest management daemon? |
14:46:40 | disruptek | i'm not versed enough to have an opinion, but how that does that relate to the whole lsp thing, and where does that effort stand? |
14:47:23 | leorize | nimlsp is just nimsuggest + a layer to translate from-to LSP |
14:47:35 | leorize | using it means you're spawning a nimsuggest per file |
14:48:28 | leorize | this daemon otoh will run in the background and can manage instances for every project |
14:48:32 | disruptek | so the daemon would maintain state between invocations? would it replace the existing lsp interop? |
14:48:53 | leorize | no, it'd just talk in nimsuggest lingo |
14:49:10 | leorize | users can connect to it via tcp |
14:49:35 | shashlick | why cannot nimsuggest itself manage this |
14:49:41 | disruptek | what's the downside? code written must be supported? |
14:50:12 | leorize | yea, nimlsp is already doing this translation, so it'd not be too much of a prob |
14:50:32 | leorize | shashlick: nimsuggest crashes too much |
14:50:46 | leorize | that's the price for integrating the compiler... |
14:51:26 | leorize | this management server I'm thinking of will handle: |
14:51:34 | leorize | - spawning nimsuggest for a project |
14:51:42 | leorize | - connections to nimsuggest |
14:52:02 | leorize | - and keeping nimsuggest alive |
14:53:18 | leorize | users just have to connect to this server, get a port, then enjoy direct connection to nimsuggest |
14:53:34 | shashlick | then opposite question - why not have nimlsp handle this |
14:53:35 | leorize | the management server will hold this port if nimsuggest dies |
14:53:57 | leorize | because nimlsp is nimsuggest in its current state |
14:54:08 | leorize | the "server" part in language server is deceiving |
14:54:24 | leorize | it means: spawn one per file and talk to it via stdin/out |
14:54:59 | * | JnR quit (Quit: Leaving) |
15:14:13 | * | ryukophone quit (Ping timeout: 245 seconds) |
15:14:39 | * | ryukophone joined #nim |
15:18:55 | Cadey | what are the nim equivalent to go's interfaces? |
15:19:04 | leorize | none :P |
15:19:16 | leorize | there's the interfaced package that provides this |
15:20:23 | FromGitter | <brentp> @shashlick, did you post your quickjs wrapper to github? can't find it. |
15:21:39 | shashlick | i just posted it to #nim - didn't put it anywhere yet |
15:22:31 | shashlick | http://ix.io/1OWi/nim |
15:26:30 | FromDiscord_ | <kodkuce> so, hmm any specific reson to breate nim to more files, atm i have it broken it 2, but now i feel like it would just be easeyer to put it all in 1 file, probbaly a dumb question but asking 😃 |
15:27:09 | FromGitter | <brentp> thanks. his benchmarks say ~2X faster than duktape so I might give it a try. plus nice to have all the newer ES stuff. |
15:27:36 | leorize | @kodkuce: I have zero idea what you're talking about |
15:28:00 | narimiran | leorize: i think he's asking about splitting your code into multiple files |
15:29:09 | leorize | I keep everything in one file until they just doesn't seem to fit anymore |
15:30:02 | * | ryukophone quit (Ping timeout: 245 seconds) |
15:31:08 | Zevv | leorize uses folds, so he doesnt mind about having 20k lines when he doesnt see them |
15:31:13 | disruptek | i find it useful to stash code from myself so i'm not tripping over it all the time like grandma's bong in the bathrub. |
15:31:15 | * | ryukophone joined #nim |
15:31:51 | * | absolutejam4 joined #nim |
15:32:12 | Zevv | disruptek: right. and it always makes me very pround and happy when i implement a feature i need to touch only one or two files |
15:32:37 | Zevv | means it was a clean split. Buf for leorize that always counts of course, he never has to touch more then one file |
15:32:38 | FromDiscord_ | <kodkuce> yep sorry, i need to write more eloqent, me to use folding so am like no reason to spit just gives me import thingy for no reason, for c# its ok for me cuz namespaces and stuff but hmm here i really duno why would |
15:32:40 | narimiran | Zevv: lol |
15:33:37 | leorize | Zevv: folds are awesome, deal with it |
15:33:44 | FromDiscord_ | <kodkuce> xD |
15:33:57 | * | solitudesf joined #nim |
15:34:06 | disruptek | i like the idea of folds, but i've never been able to teach them to my old vi hands. |
15:34:45 | disruptek | hey, leorize is a vi savant. you have to give him some props there. |
15:34:51 | FromDiscord_ | <kodkuce> only thing i find bad about fold is when its last line you have to open it and go to bot again to start new line or i just dumb xD |
15:35:17 | disruptek | the fact that we have to break up files is merely testament to how much better a human he is. |
15:36:07 | narimiran | when i first started using nim, i thought it doesn't support multiple files. all examples i could find were just one very long file.... |
15:36:09 | FromDiscord_ | <kodkuce> i go join him in elite club, bow down peasants 😃 |
15:36:12 | disruptek | koduce surely you can bounce to the end of the paragraph with movement, no? |
15:36:31 | * | theelous3 quit (Ping timeout: 246 seconds) |
15:37:45 | disruptek | quickjs does look pretty neat. it could solve a huge problem for me, too -- how to run appsync push alongside nim. |
15:38:09 | FromDiscord_ | <kodkuce> duno am again using vscode, if its last line unfolded and i go to end of line and press ENTER it first unfolds then inserts new line, but anyway its not really an issue if you allwies leave 1 empty line at bot |
15:38:34 | narimiran | ..which you should |
15:39:18 | FromDiscord_ | <kodkuce> duno on nvim i head that script to auto trim trailling spaces and newlines |
15:39:29 | narimiran | nvim != vscode |
15:40:28 | * | absolutejam4 quit (Ping timeout: 245 seconds) |
15:46:46 | * | nif quit (Quit: ...) |
15:47:43 | FromGitter | <mratsim> Github is down? |
15:48:07 | lmariscal | I can access it |
15:48:41 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/nouH/DeepinScreenshot_select-area_20190722174754.png) |
15:48:46 | FromGitter | <mratsim> can't push commit either |
15:49:17 | lmariscal | https://www.githubstatus.com/ |
15:49:34 | disruptek | welcome, microsoft. |
15:50:34 | * | stefanos82 quit (Quit: Quitting for now...) |
15:53:30 | * | lqdev[m] uploaded an image: image.png (5KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/wQFyjRqWpdowBtuYxfcazdDQ > |
15:53:30 | lqdev[m] | good design |
15:53:59 | leorize | I should start duo-hosting my code on both github and gitlab |
15:54:34 | disruptek | damn that trick knee. |
15:54:42 | Calinou | interesting how they have a separate domain name for their status page nosw |
15:54:43 | Calinou | now* |
15:56:00 | FromGitter | <mratsim> @leorize, why not completely decentralize and shareable by USB disks as well? https://git.scuttlebot.io/%25n92DiQh7ietE%2BR%2BX%2FI403LQoyf2DtR3WQfCkDKlheQU%3D.sha256 |
16:00:45 | ehmry | because nodejs |
16:04:47 | ehmry | actually the Nim JSON pretty printer replicates the nodesjs pretty printer because scuttlebutt makes its signatures over pretty printed JSON, and if indentation changes, all scuttlebutt signatures are invalid |
16:05:31 | disruptek | wut |
16:05:53 | disruptek | i've read that sentence 6 times now and it still doesn't make any sense. |
16:05:54 | * | ryukophone quit (Read error: Connection reset by peer) |
16:06:03 | FromGitter | <mratsim> yeah I'm lost as well |
16:06:03 | * | ryukophone joined #nim |
16:07:20 | ehmry | the scuttlebutt protocol requires printing JSON in a specific way, or it doesn't work |
16:07:27 | ehmry | the whole thing is JS trash |
16:08:22 | disruptek | you just rarely see stuff like this in the wild. |
16:08:47 | disruptek | mostly it's confined to old `fortune` databases. |
16:14:27 | shashlick | is defined(macos) different from defined(macosx) |
16:14:30 | shashlick | extra x |
16:15:25 | * | laaron quit (Remote host closed the connection) |
16:15:54 | FromGitter | <mratsim> I assume they are the same, but I know i would like more documentation on platform/arch dependant constants |
16:16:02 | * | laaron joined #nim |
16:16:25 | disruptek | githubstatus.com went from yellow to red. i guess the servers are actually melted and are not salvagable. |
16:16:38 | FromGitter | <mratsim> for example the iOS check seems like magic to me https://github.com/nim-lang/Nim/issues/9369 |
16:17:44 | shashlick | not sure where to look for platform definitions |
16:17:56 | FromGitter | <mratsim> see my issue |
16:18:09 | FromGitter | <mratsim> platform.nim and osenv.nim, and the wiki |
16:18:13 | disruptek | really, why isn't osios in there? |
16:18:15 | FromGitter | <mratsim> also hostEnv in system.nim |
16:18:40 | FromGitter | <mratsim> basically nim autodetects ios as macosx, so you have to pass ios yourself |
16:19:26 | * | nif joined #nim |
16:19:37 | disruptek | then code needs to be written to express that potentiality. |
16:20:58 | shashlick | i'm working on https://github.com/nim-lang/Nim/issues/10630 |
16:21:19 | shashlick | anyway, does anyone know what current dir and parent dir in RISCOS is? |
16:21:29 | shashlick | still '.' and ".."? |
16:21:31 | FromGitter | <mratsim> that is funny: https://github.com/nim-lang/Nim/issues/10630#issuecomment-462641692 |
16:26:55 | shashlick | yay for duplicate coe |
16:26:57 | shashlick | https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L41 |
16:26:58 | shashlick | code |
16:30:14 | shashlick | okay so macos != macosx |
16:30:20 | * | laaron quit (Remote host closed the connection) |
16:34:58 | shashlick | is curDir wrong for genode? https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L156 |
16:36:02 | ehmry | shashlick: genode doesn't have curdir natively |
16:37:28 | ehmry | shashlick: so its a hack |
16:37:38 | shashlick | thanks |
16:37:49 | shashlick | so riscos is in osseps but not in platform |
16:39:11 | * | theelous3 joined #nim |
16:41:18 | * | zyklon joined #nim |
16:42:51 | * | uvegbot quit (Ping timeout: 250 seconds) |
16:46:14 | FromDiscord_ | <demotomohiro> Hi, I have a question related to template and varargs. |
16:46:14 | FromDiscord_ | <demotomohiro> https://play.nim-lang.org/#ix=1PaC |
16:47:22 | * | shomodj quit (Ping timeout: 268 seconds) |
16:53:13 | FromGitter | <mratsim> I think you would have to use a macro that reconstruct an nnkArgList |
16:57:06 | FromDiscord_ | <kodkuce> template/generic instantiation of `async` from here << Any reason why this shows like warning? |
16:58:06 | FromGitter | <mratsim> maybe you have a warning or a compile-error later in your code? |
17:00:16 | FromDiscord_ | <demotomohiro> @mratsim |
17:00:16 | FromDiscord_ | <demotomohiro> Thank you! I thought there might be a way to solve it without using macro. |
17:01:08 | * | dgreen joined #nim |
17:01:25 | * | dgreen quit (Quit: Leaving...) |
17:01:32 | FromGitter | <awr1> one of these days I need to write up a tutorial or something on macros |
17:02:13 | * | CookieCutter joined #nim |
17:02:19 | * | CookieCutter is now known as dgreen |
17:03:21 | FromGitter | <awr1> i feel like it's nim's most confusing feature and it kinda catches people off-guard - "abstract syntax tree? what is that?" |
17:04:32 | FromGitter | <awr1> since not everyone has a formal CS education |
17:05:22 | FromDiscord_ | <demotomohiro> Do you think this Tutorial is not enough for beginner? |
17:05:23 | FromDiscord_ | <demotomohiro> https://nim-lang.github.io/Nim/tut3.html |
17:06:12 | FromGitter | <awr1> i haven't seen this but let me take a look |
17:06:55 | * | ryukophone quit (Ping timeout: 258 seconds) |
17:07:31 | FromDiscord_ | <demotomohiro> There is a link to that tutorial in macros module document. |
17:08:46 | FromGitter | <awr1> it's okay i guess |
17:08:52 | FromGitter | <awr1> i would probably try to be more visual though |
17:09:51 | FromGitter | <awr1> i would have opened with the dumpTree thing and tried to draw a diagram to the dumped AST repr to parts of the Nim syntax |
17:12:02 | shashlick | https://github.com/nim-lang/Nim/pull/11814 |
17:12:04 | FromGitter | <awr1> the `myAssert()` example could explain a little more: to me it's not clear what `expectKind()` and `expectLen()`are for |
17:13:37 | FromGitter | <awr1> and it also would do well to say: "you need to constantly look at the macros.nim documentation to make sure you're doing it right" |
17:13:55 | disruptek | probably a given. |
17:16:16 | disruptek | if they are anything like me, i think a lot of people are attracted to nim for its metaprogramming. that said, i barely trust myself to code using anything more powerful than a shell script, so anything that helps make nim's metaprogramming more accessible to foolish enthusiasts such as myself is very valuable. |
17:16:38 | FromGitter | <mratsim> a cookbook would be nice |
17:16:55 | FromGitter | <mratsim> with concrete tasks that people might search for |
17:17:24 | disruptek | yeah, and i want to see not just code, but literate code. |
17:18:15 | FromGitter | <mratsim> I don't think it's the most confusing part though |
17:18:35 | FromGitter | <mratsim> most often, the first struggle I see is from people coming from dynamically typed language |
17:18:45 | FromGitter | <mratsim> and asking how to put an int and a string in the same sequence |
17:19:08 | FromGitter | <mratsim> and suddenly you have to explain about types, object variants and inheritance |
17:19:31 | Araq | shashlick: |
17:19:34 | Araq | FileSystemCaseSensitive* = true |
17:19:35 | Araq | ## True if the file system is case sensitive, false otherwise. Used by |
17:19:35 | Araq | ## `cmpPaths proc <#cmpPaths,string,string>`_ to compare filenames properly. |
17:19:37 | Araq | when defined(macos) or doslikeFileSystem or defined(vxworks) or |
17:19:38 | Araq | defined(PalmOS) or defined(MorphOS): false |
17:19:40 | Araq | else: true |
17:19:45 | Araq | ^ does this even compile? cause it shouldn't |
17:20:16 | disruptek | it's under a shashlick: block, so it should. 😉 |
17:20:30 | FromGitter | <mratsim> What does holidays mean to you Araq? Cause I'm pretty sure we don't have the same understanding of the word :P |
17:21:12 | disruptek | the word holiday just means 1kb/s to araq 😁 |
17:23:09 | krux02 | well for me it meens no meeting in the morning |
17:23:19 | clyybber | Araq: Hey, when =moving into tuples as part of a constructor we would need to change a few things, as in constructing the tuple beforehand and then moving into it. I worked around this for now https://github.com/nim-lang/Nim/pull/11248/commits/6503100cb0d2c20974ee9842e6a5c1a21c438de6 |
17:23:50 | shashlick | ugh |
17:24:39 | dgreen | mratsim: I modified the pytorch code yesterday to run on the rosenbrock function to compare for arraymancer, do you want me to include it in the PR? |
17:25:11 | FromGitter | <mratsim> awesome, yes please |
17:26:26 | dgreen | Ok :) I'll be making the PR later today, just gotta clean a few things up |
17:26:46 | Araq | clyybber: meh, iirc object constructions are not done properly yet anyway |
17:28:43 | shashlick | sorry, pushed the updated version |
17:28:58 | shashlick | note that nim doc will render values depending on which OS the docs were generated |
17:29:14 | shashlick | do we want to expand the docs to give more details on what the values will be for specific OS? |
17:30:59 | Araq | nah, just fix the bug |
17:32:05 | Araq | mratsim: I'm happy when my holidays are over... |
17:33:09 | FromGitter | <mratsim> Did you see the paper about channel-based work stealing task scheduler I posted yesterday? |
17:34:28 | * | nif quit (Quit: ...) |
17:34:36 | * | nif joined #nim |
17:36:20 | FromGitter | <awr1> @mratsim that was also a kinda more generalized guide idea i wanted to make. i remember like a year ago trying to teach my friend (who grew up on ruby) about static types and they grew to really like it and so i kinda wanted to make a "static types if all you know are dynamic types" guide |
17:36:24 | * | absolutejam4 joined #nim |
17:37:28 | Araq | mratsim: yeah but it's a long read |
17:39:20 | FromGitter | <mratsim> That will get you occupied :p. ⏎ ⏎ What I find promising is the possibilities to get high performance without having to share state. |
17:40:14 | FromGitter | <awr1> also i saw what you were doing a few days ago and didn't understand how you were getting by without pointers/refs |
17:40:21 | FromGitter | <awr1> for the context |
17:40:49 | FromGitter | <mratsim> there is a very short version at the beginning of the author PhD: http://aprell.github.io/papers/channel_ws_2014.pdf |
17:40:54 | FromGitter | <awr1> in that workstealer library you were working on |
17:41:09 | FromGitter | <mratsim> the one I'm doing is not finished yet |
17:41:50 | FromGitter | <mratsim> probably need a couple days more for a proof-of-concept |
17:44:05 | FromGitter | <mratsim> Basically, there will be a global scheduler (i;e. the "context"), that will dispatch tasks to workers, each with a private deque (https://github.com/mratsim/weave/blob/master/e01_tasks_as_objects.nim#L50-L67). ⏎ ⏎ User code will only see the scheduler, but each worker can access the deque of other workers |
17:44:52 | * | lritter quit (Ping timeout: 258 seconds) |
17:47:03 | Zevv | not directly, right? They can request stealing, but the victim has to cooperate |
17:47:22 | disruptek | we're not supposed to use quote do, right? |
17:47:30 | FromGitter | <awr1> `CacheLineSize = 64`i assume this is just interim right |
17:47:55 | disruptek | they say three lefts equal a left. |
17:48:01 | disruptek | er, three rights. |
17:48:36 | FromGitter | <awr1> i mean most CPUs have 64-byte cache lines but you could always just probe /proc/cpuinfo (or cpuid or w/e) |
17:48:50 | disruptek | don't let araq hear you say that. |
17:49:07 | * | ryukophone joined #nim |
17:49:39 | Araq | too late, there is cpuinfo.nim and cpuload.nim |
17:50:02 | Zevv | mratsim: how would that work, if the victim is busy they can't respond to steal requests - or do I understand wrong? |
17:50:07 | rayman22201 | @Zevv, @mratsim, I was talking about a similar idea with @Dom96 in Private chat (a work stealing threadpool). I knew it was a good idea lol :-P |
17:50:36 | Zevv | rayman22201: you should read mratsims paper. It's a nice ride, lots of history and background, its pretty digestible |
17:51:01 | FromGitter | <mratsim> @Zevv, the victim tasks are in a concurrent deque, the victim pops tasks from the back and the thief from the front |
17:51:15 | FromGitter | <mratsim> so the thief doesn't need to ask, he just needs to check the length of the deque |
17:51:29 | Zevv | @mratsim well no, I'm pretty sure they decided *not* to do that. Let me reread :) |
17:51:32 | FromGitter | <mratsim> For the channel-based work stealing, it is indeed an issue though |
17:51:50 | rayman22201 | this paper? http://aprell.github.io/papers/channel_ws_2014.pdf |
17:51:52 | FromGitter | <mratsim> but I'll know only when I implement it |
17:51:55 | Zevv | @mratsim: section 3.3 |
17:52:22 | FromGitter | <mratsim> @rayman22201: the full version - https://epub.uni-bayreuth.de/2990/1/main_final.pdf |
17:52:42 | rayman22201 | thanks! I will read :-) |
17:52:55 | FromGitter | <mratsim> ah @zevv I thought you were talking about my experiments (a "normal" shared memory work stealing with atomics) |
17:53:14 | Zevv | ah ok. I like this version more :) |
17:53:37 | Zevv | share-nothing |
17:53:41 | * | ryukophone quit (Ping timeout: 258 seconds) |
17:54:45 | FromGitter | <awr1> hmm i should add to cpuinfo.nim sometime |
17:55:02 | * | ryukophone joined #nim |
17:56:21 | * | absolutejam4 quit (Ping timeout: 244 seconds) |
17:56:42 | rayman22201 | Well, with newruntime a "normal" work stealing threadpool will work just fine :-P |
17:57:14 | Zevv | I am naive expecting this to work? http://ix.io/1PaK |
17:58:19 | Zevv | oh wait |
18:02:02 | FromGitter | <mratsim> generic macros? you live in a dangerous world |
18:02:27 | FromGitter | <mratsim> Even I avoid those like the plague |
18:02:51 | Zevv | yeah, but I don't know how to do it without. I want an int not a Nimnode: http://ix.io/1PaO |
18:03:13 | FromGitter | <mratsim> typedesc? |
18:03:41 | Zevv | yeah, I thought so too |
18:03:58 | FromGitter | <mratsim> also your macro should return untyped |
18:04:31 | * | shomodj joined #nim |
18:04:35 | Zevv | yeah, I didn't get that far yet. http://ix.io/1PaR still NimNode |
18:04:41 | FromGitter | <mratsim> wel I don't know if it should but I always do this because any other return value breaks one way or another |
18:05:01 | FromGitter | <mratsim> your input is typed, it should be typedesc |
18:05:18 | Zevv | ohh. wait. does that not give a nimnode?! |
18:05:32 | FromGitter | <mratsim> you cannot convert NimNodes back to typedescs |
18:05:42 | FromGitter | <mratsim> typedesc will give you a typedesc |
18:05:57 | Zevv | still not! http://ix.io/1PaU |
18:06:02 | FromGitter | <mratsim> static T will give you a value of type T, everything else gives a NimNode |
18:06:50 | * | shomodj quit (Client Quit) |
18:07:45 | FromGitter | <mratsim> mmmh bug worthy |
18:07:58 | FromGitter | <mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d35fb7eb2db751dabae0e4f] |
18:08:06 | FromGitter | <mratsim> it's an int in the macro |
18:08:26 | FromGitter | <mratsim> Another one to add to https://github.com/nim-lang/RFCs/issues/44 :P |
18:09:29 | Zevv | you've been there before :( |
18:10:08 | FromGitter | <mratsim> ah sorry it seems like it's a NimNode even within the macro mmm |
18:10:28 | Zevv | typeof(T) is nimnode |
18:10:29 | Zevv | T.repr is int |
18:11:12 | * | ryukophone quit (Read error: Connection reset by peer) |
18:11:25 | * | ryukophone joined #nim |
18:11:37 | Zevv | I kind of painted myself in the corner with npeg - every feature I try to implement causes me troubles with passing types around :/ |
18:11:39 | FromGitter | <mratsim> I was pretty sure typedescs were kept as is but I may remember incorrectly |
18:13:28 | FromGitter | <mratsim> usually what I do is having an untyped macro in the frontend that massages the user input into whatever format is needed, and then it result quote do into a typed macro |
18:13:41 | disruptek | 3-spaces nim indentation spotted in the wild: https://github.com/Skrylar/nim-jack |
18:13:58 | Zevv | yeah, but you want to know why I brought up this discussion? |
18:13:59 | Zevv | 19:47 < disruptek> we're not supposed to use quote do, right? |
18:14:22 | disruptek | i'm still curious, btw. |
18:14:50 | FromGitter | <mratsim> why not? |
18:15:11 | * | carkh joined #nim |
18:15:28 | disruptek | i dunno, it seems to me i've read noises about how it's discouraged. maybe in the manual, maybe the forum, maybe issues. 🤷 |
18:16:56 | FromGitter | <mratsim> You can use it, you have to be aware of a couple of limitations: ⏎ ⏎ 1) interpolating booleans or enums need a `newLit`, using a literal will convert it to an int. ⏎ 2) don't interpolate `result` ⏎ 3) interpolate just an identifier, don't do `foo.field` [https://gitter.im/nim-lang/Nim?at=5d35fd988285d81daa3f4bbf] |
18:17:56 | FromGitter | <mratsim> The implementation is probably complex and tricky hence why there is such bugs and they are hard to fix. |
18:18:15 | carkh | hi, I've been trying to remove debug infos from my produced exe but it looks like the --debuginfo:off flag isn't working at all ? (nim 0.19.0, win64) |
18:18:42 | carkh | invalid argument for command line option: '--debuginfo' |
18:19:27 | FromGitter | <mratsim> mmm, there is lineinfo and stacktraces, those are automatically removed when you compiled with -d:release |
18:20:13 | FromGitter | <mratsim> the switches are detailed there: https://nim-lang.org/docs/nimc.html |
18:20:44 | Zevv | mratsim: but still, is there a solution to my problem afayk, or is this a bug? |
18:20:59 | carkh | mratsim: yes that's where i took the switch from |
18:21:20 | FromGitter | <mratsim> there is no debuginfo flag though |
18:21:45 | carkh | in advanced options |
18:22:00 | FromGitter | <mratsim> @zevv, probably, do you really need to instantiate a generic proc within a macro? would a quote do work instead? |
18:22:29 | Zevv | it might, but I never grokked that and the docs are sparse. Looking into that now |
18:22:56 | Zevv | and I think I really do need to instantiate a generic proc |
18:23:06 | carkh | when i eyeball the produced exe, i see many symbols, that's like half my exe file |
18:23:21 | FromGitter | <mratsim> did you compile with -d:release? |
18:23:24 | * | solitudesf- joined #nim |
18:23:36 | carkh | yes |
18:23:51 | disruptek | but you don't have to worry about interpolating "strings"? |
18:23:56 | carkh | nim c -d:cmdlet=clojure -d:release --debuginfo:off --opt:size -o:clojure.exe clojure.nim |
18:24:42 | FromGitter | <mratsim> curious, can you past like 10 lines of your C output that exhibits those symbols |
18:24:52 | disruptek | you can use debuginfo in your nim.cfg |
18:25:12 | carkh | i'm looking at the exe file actually, i'm all new to nim =) |
18:25:24 | FromGitter | <mratsim> @disruptek no I don't think so, that mainly because bool and enums are represented by ints in the VM |
18:25:27 | disruptek | eg `debuginfo:off` |
18:25:53 | * | solitudesf quit (Ping timeout: 245 seconds) |
18:26:04 | carkh | i'll check this lead right away |
18:26:26 | disruptek | oh, that makes sense. somehow i read your statement as `booleans and ints`. |
18:30:00 | carkh | nope same error, i guess it got deprecated or something |
18:30:30 | * | disruptek recompiles Nim. |
18:30:37 | * | absolutejam4 joined #nim |
18:31:05 | lqdev[m] | well you can also just `strip -s` the executable |
18:32:24 | disruptek | it's working for me under devel. i guess maybe it's new. i think i started with nim around 19.6. |
18:33:03 | carkh | i checked the source code and it's a 5 year old thing it seems, though i don't quite understand it |
18:33:14 | * | solitudesf- quit (Quit: Leaving) |
18:33:28 | disruptek | did you build your compiler? |
18:33:29 | carkh | well anyways it was a "make it perfect" thing, not a very big deal, i'll try on devel |
18:33:33 | * | solitudesf joined #nim |
18:33:33 | * | nsf joined #nim |
18:34:02 | carkh | nope just nimchoose stable i think |
18:34:37 | disruptek | is 0.19.0 the most stable nim now? |
18:34:47 | carkh | that's what it gave me =) |
18:34:57 | disruptek | yeah, i'm just surprised. |
18:35:02 | * | disruptek doesn't use choosenim. |
18:36:15 | carkh | anyways thanks guys, not taking more of your time with this small thing, will fiddle a bit with it and leave it at that if i can't make it work, the exe is 120k, which is already pretty good nowadays |
18:36:41 | disruptek | i'll say. but small things add up when you're trying to win hearts and minds. |
18:36:42 | carkh | or 135k really anways |
18:37:07 | Araq | 120k is pretty big but a lot of it depends on the C environment |
18:37:34 | Araq | 0.19.0 is stable? wtf |
18:37:47 | disruptek | i had an unbelievable experience trying to get cayley setup and tested. so bad that it really made me doubt my future. all down to small things. |
18:54:38 | * | absolutejam4 quit (Ping timeout: 245 seconds) |
18:56:47 | lqdev[m] | Araq: that seems to be a choosenim problem, I had to install versions individually (using `choosenim 0.20.2`), since `choosenim stable` results in 0.19.0 being chosen |
18:57:14 | lqdev[m] | no idea why that happens though, perhaps some database entry thing is not set properly? |
18:57:36 | solitudesf | did you run `choosenim update stable` before? |
18:58:22 | * | ryukophone quit (Ping timeout: 245 seconds) |
18:58:43 | * | ryukophone joined #nim |
19:20:50 | * | sagax quit (Ping timeout: 272 seconds) |
19:21:32 | * | ryukophone quit (Ping timeout: 268 seconds) |
19:22:15 | Cea | @shashlick I've massaged out most of the errors, however I'm getting issues with `proc js_std_eval_binary*(ctx: ptr JSContext, buf: ptr uint8, buf_len: cuint, flags: cint) ` how do I convert an array/seq to a `ptr uint8`? |
19:23:57 | * | floppydh quit (Quit: WeeChat 2.5) |
19:24:27 | Cea | ah I take it back, figured it out, was using const for the array declaration |
19:25:23 | * | vlad1777d joined #nim |
19:29:26 | Cea | got it working! |
19:29:44 | disruptek | dynamite! |
19:31:04 | * | stefanos82 joined #nim |
19:32:51 | Cea | Here's a gist: https://gist.github.com/ImVexed/6340c0dd7c498819dc34911fad794ef1 |
19:33:53 | Cea | Since the templite has to comment out a lot of things in the nimterop quickjs.h you'll have to build off of an unmodified version of quickjs.h. |
19:34:12 | disruptek | var hello holds your `hello world` js bytecode compiled by quickjs? |
19:34:36 | clyybber | Araq: Why is nimAsgnStr implemented as a compilerRtl ? |
19:36:52 | shashlick | @Cea - ya, the last step of the nimterop wrapper is to gitCheckout but you never get around to it since it breaks before that |
19:39:21 | * | absolutejam4 joined #nim |
19:41:49 | carkh | so devel accepts the --debuginfo:off option, doesn't change the exe size at all. Just a headsup, i'll leave it at that. |
19:44:06 | * | dgreen quit (Remote host closed the connection) |
19:51:11 | * | sagax joined #nim |
19:54:21 | * | ryukophone joined #nim |
20:02:42 | FromGitter | <awr1> `when defined(nimdoc):` is what you use to get a conditionally compiled block to show up in docs right |
20:02:56 | FromGitter | <awr1> that could be hidden on other platforms |
20:16:17 | * | ryukophone quit (Ping timeout: 258 seconds) |
20:16:22 | * | PrimHelios_ quit (Ping timeout: 244 seconds) |
20:16:35 | * | ryukophone joined #nim |
20:17:58 | * | nsf quit (Quit: WeeChat 2.4) |
20:18:46 | * | PrimHelios joined #nim |
20:24:05 | FromGitter | <deech> What is the difference between the `benign` and `noSideEffect` pragma and where is the former defined? |
20:24:17 | * | ryukophone quit (Ping timeout: 250 seconds) |
20:25:25 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
20:28:36 | * | narimiran quit (Ping timeout: 272 seconds) |
20:31:09 | shashlick | @awr1 - what's the use case for that? i know it caused issues in osseps.nim |
20:31:22 | * | shomodj joined #nim |
20:38:09 | clyybber | deech: benign is an alias for gcsafe and when locks are enabled for locks: 0. See here: https://github.com/nim-lang/Nim/blob/devel/lib/system/inclrtl.nim#L50 |
20:40:58 | FromGitter | <deech> clybber, thanks! |
20:46:57 | FromGitter | <mratsim> I learned something |
20:48:04 | * | leorize quit (Ping timeout: 260 seconds) |
20:49:34 | * | leorize joined #nim |
20:57:07 | * | vlad1777d quit (Ping timeout: 268 seconds) |
21:12:49 | * | PrimHelios quit (Ping timeout: 250 seconds) |
21:13:22 | * | PrimHelios joined #nim |
21:17:28 | * | ryukophone joined #nim |
21:18:19 | clyybber | deech: np |
21:18:20 | * | ryukophone quit (Read error: Connection reset by peer) |
21:18:20 | clyybber | gn |
21:18:23 | * | clyybber quit (Quit: WeeChat 2.5) |
21:20:13 | * | ryukophone joined #nim |
21:22:40 | FromGitter | <awr1> @shashlick say you want some docs for procs under `when defined(arm):` to show up when you generate docs - that would be the use case |
21:30:17 | dom96 | when defined(arm) or defined(nimdoc)? |
21:31:45 | FromGitter | <awr1> ya |
21:32:41 | dom96 | PMunch: any chance you could disable the auto-indent on the playground? It's wrong enough times to be annoying |
21:41:08 | dom96 | darn |
21:41:27 | dom96 | I can have a `enum` as a function argument, but not a `var enum` |
21:43:06 | dom96 | oooh `proc read*[T: enum](proto: AnyTProtocol, n: var T)` |
21:43:14 | dom96 | But fieldPairs doesn't like my hack D: |
21:45:28 | FromGitter | <awr1> can you even do `var` in a generic param |
21:46:52 | * | leorize quit (Ping timeout: 260 seconds) |
21:48:27 | * | Cea62 joined #nim |
21:48:32 | * | Cea62 quit (Remote host closed the connection) |
21:48:46 | * | leorize joined #nim |
21:49:37 | dom96 | you can |
21:49:46 | dom96 | hah, I knew I was in dangerous territory |
21:49:49 | dom96 | just got a C code gen error |
21:51:27 | * | a_b_m joined #nim |
21:51:47 | dom96 | oh, but this is unrelated to my hacks |
21:52:53 | dom96 | aww yeah, it works |
21:53:08 | dom96 | serialization/deserialization with no macros |
21:53:16 | dom96 | just some good old fieldPairs iterators |
21:53:38 | * | theelous3 quit (Ping timeout: 248 seconds) |
21:54:45 | * | a_b_m quit (Client Quit) |
21:55:03 | * | abm quit (Ping timeout: 244 seconds) |
21:55:28 | * | solitudesf quit (Ping timeout: 245 seconds) |
22:00:45 | * | ryukophone quit (Remote host closed the connection) |
22:00:58 | * | ryukophone joined #nim |
22:04:19 | * | ryukophone quit (Read error: Connection reset by peer) |
22:09:00 | FromGitter | <brentp> I saw the wrapper for quickjs. Are folks successfully using it? I can't do simple things via the C-API. For example, how to push a number onto an array? The .c code defines `js_array_push` but that's not in the header. |
22:09:43 | dom96 | TIL of quickjs |
22:09:50 | disruptek | the demo gist appears to work to invoke bytecode generated by the quickjs compiler; did you try that? |
22:10:47 | FromGitter | <brentp> no. that's not what I need. I need to set up objects and arrays via the C-API and then evaluate expressions. |
22:11:01 | FromGitter | <brentp> but the C-API appears incomplete |
22:11:32 | disruptek | i mean that if you can confirm that the gist works, you can move on to figuring out what's missing from the wrapper. as i understand it, it had to be tweaked by hand. |
22:11:56 | FromGitter | <brentp> ... and I'm talking about the original C code here, not the wrapper. The headers in the original C code do not export most functions. |
22:12:15 | disruptek | ah, the C impl appears incomplete. |
22:12:49 | FromGitter | <brentp> it's implemented, just not exported in the .h files. |
22:12:51 | * | ryukophone joined #nim |
22:14:05 | disruptek | oh, so you have C source signatures for the bits you want exported, but they just aren't exposed in the header. |
22:14:06 | * | ryukophone quit (Read error: Connection reset by peer) |
22:14:35 | FromGitter | <brentp> yes. |
22:14:52 | FromGitter | <brentp> maybe there's another way, to, for example push something onto an array, but I don't see it. |
22:15:17 | * | ryukophone joined #nim |
22:15:36 | disruptek | probably solvable relatively easily with nimterop, though if the header had to be hand-jiggered, that's unfortunate. it's written in C89 iirc. |
22:16:18 | disruptek | cue araq comment about the myriad C idiosyncracies extending back 30 years. |
22:21:08 | FromGitter | <Varriount> disruptek: I think JavaScript has more synchronic behavior than C does. |
22:21:40 | disruptek | no doubt, but it's easier to parse. |
22:30:12 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:33:04 | * | ryukophone quit (Ping timeout: 264 seconds) |
22:33:15 | * | ryukophone joined #nim |
22:35:24 | * | Vladar quit (Remote host closed the connection) |
22:48:17 | shashlick | Quickjs has nested structs which nimterop doesn't support yet hence c2nim and hand edits |
22:49:00 | FromGitter | <awr1> i will add cache info to cpuinfo sometime tomorrow |
22:49:09 | FromGitter | <awr1> but in the meantime i added x86 cpu feature detection |
22:57:04 | * | ryukophone quit (Ping timeout: 264 seconds) |
23:01:28 | * | ryukophone joined #nim |
23:11:31 | * | absolutejam4 quit (Ping timeout: 246 seconds) |
23:12:36 | * | absolutejam4 joined #nim |
23:16:51 | * | ryukophone quit (Read error: Connection reset by peer) |
23:17:03 | * | ryukophone joined #nim |
23:17:07 | * | absolutejam4 quit (Ping timeout: 245 seconds) |
23:18:51 | * | stefanos82 quit (Quit: Quitting for now...) |
23:22:52 | * | ryukophone quit (Ping timeout: 264 seconds) |
23:30:08 | * | ImVexed joined #nim |
23:30:22 | ImVexed | @shashlick Thanks for all the help! https://github.com/nim-lang/packages/pull/1122 |
23:30:58 | shashlick | Awesome! |
23:31:15 | * | ryukophone joined #nim |
23:37:21 | * | ryukophone quit (Ping timeout: 244 seconds) |
23:42:15 | * | theelous3 joined #nim |
23:43:20 | * | krux02_ joined #nim |
23:44:56 | * | krux02_ quit (Remote host closed the connection) |
23:46:16 | * | krux02 quit (Ping timeout: 264 seconds) |
23:58:04 | carkh | Am I correct in assuming that calling $ with a widestring will return an UTF-8 encoded nim string (as per widestr.nim) ? |
23:58:59 | carkh | hum i'm not totally accurate WideCString and widestrs.nim |