<< 22-07-2019 >>

00:13:16*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:38:23*stefanos82 quit (Quit: Quitting for now...)
01:00:38FromGitter<awr1> float16 to be used how
01:00:48FromGitter<awr1> software implementation?
01:01:08FromGitter<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:23FromGitter<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:53FromGitter<zacharycarter> well - I can't seem to get nim-glm working correctly
06:03:04FromGitter<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:01FromGitter<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:29FromGitter<zacharycarter> I did - thanks for sharing that
06:30:17FromGitter<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:03FromGitter<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:12FromGitter<mratsim> @brentp, AFAIK float16 is often just a data placeholder for GPU interop
08:36:55FromGitter<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:24FromGitter<alehander42> Zevv: i am interested in such a lib
08:46:39FromGitter<alehander42> would it be able to generate a tree ref object
08:46:42FromGitter<alehander42> similar to PNode ?
08:46:46FromGitter<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:33FromGitter<ahcm> Is there something like python's for ... else? Catching when the iterator is empty?
09:07:02leorizeno
09:07:35*Vladar joined #nim
09:13:10narimiranbtw, `for ... else` is not for catching when the iterator is empty
09:13:32FromGitter<ahcm> So can you know whether lines(File) still has something?
09:22:02Zevvalehander42: 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:33FromGitter<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:56narimiranit is already stable
09:51:06narimiranthe current version is 1.0 RC2
09:51:51narimiran(the official name for the current version is 0.20.2, which is in fact 1.0rc2)
09:52:31FromGitter<ahcm> @naimiran, catching non break, case, I mean
09:53:49leorizeyou can't check if lines() still have anything left
09:54:12narimiran@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:59narimirannot 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:20FromGitter<ahcm> I don't like the syntax either
09:55:37FromGitter<ahcm> just trying to learn as much of nimbuses as possible
09:55:43FromGitter<ahcm> *nim
09:56:26narimiranbtw, why do you need to know if `lines(f)` is empty?
09:58:14FromGitter<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:34narimirani 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:01FromGitter<ahcm> it's wether I need to yield once more or not
10:01:17FromGitter<ahcm> Also I expected lines to be a closure
10:01:28FromGitter<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:28narimiranok, when does it become stable? when that number is 0, or less than 10, or?
10:03:49leorize@ohenepee well most compilers have a rather decent amount of crashes
10:05:17FromGitter<ohenepee> @narimiran when did this convo be come one worth ridiculing?
10:05:43leorizeI'd say you won't stumble on them for big projects
10:06:05leorizenimbus managed to go really far
10:06:13leorizeand the compiler is a big project on its own
10:06:24FromGitter<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:38leorizeI'm looking at them
10:06:54leorizewell go don't have generics and meta programming
10:07:39leorizemost of the crashes came from experimental features and/or corner cases in Nim's macro system
10:08:07FromGitter<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:57FromGitter<ohenepee> @leorize... I get you now... thanks a lot
10:08:58narimiranGo has Google backing, Nim is currently (just) three guys working full-time + community contributions
10:10:03leorize@ohenepee np
10:10:04narimiranplus Nim has much more features than Go ;)
10:10:12FromGitter<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:35leorizenarimiran: you might want to check if all of them are still valid :P
10:10:48narimiranunfortunately, it is hard to keep up, and any help regarding those crashes + regressions + high priority bugs is highly appreciated and very welcome
10:11:10narimiranleorize: i do that periodically. i might do it again, sure
10:15:05*couven92 joined #nim
10:15:24leorizenarimiran: nim.nvim just got it's first breaking change
10:15:55leorizeI've removed g:nim_fold, set foldenable to off instead if you wanted to disable code folding
10:20:34narimiranyeah, 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:44Zevvsee!
10:21:13leorizeblame those neovim devs :p
10:21:20Zevvneovim devs: see!
10:21:41narimiranZevv: how is your nvim journey going?
10:22:25Zevvok 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:43Zevvancient 16.04, centos7, etc
10:22:51leorizebuild an appimage then carry that with you instead
10:22:56ZevvBwhah
10:23:16ZevvI 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:30leorizeZevv: https://github.com/neovim/neovim/wiki/Installing-Neovim#appimage-universal-linux-package
10:23:47Zevvsoooo much work all that
10:25:10narimiranoooh, now i see that Zevv has already made a PR to nim.nvim :) nice
10:25:43narimiranbtw, now that i'm looking at that PR: leorize, this morning i realized that `]]` doesn't work in the visual mode....
10:27:06leorizemake a PR for vmap :D
10:28:48leorizevnoremap I mean
10:30:23narimirani have zero experience with vimscript, but shouldn't `noremap` already cover all modes? (`nnoremap` is just a normal mode, right?)
10:31:30leorizehmm, yea
10:32:12leorizemaybe something is not quite right with the function logic then
10:33:02leorizeoh, I see now
10:33:22leorizesearch() interrupts visual mode
10:37:16*dddddd joined #nim
10:41:13FromGitter<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:08FromGitter<mratsim> Also the crash issues are compiler crashes, so it's caught at compile-time
10:53:25leorizeZevv: just found out about no_plugin_maps, so... probably I'm gonna get rid of nim_noremap
10:55:13ZevvLast time I'll PR to your little project dude! :)
10:56:08*couven92 quit (Quit: Client disconnecting)
10:56:19leorizewas reading some ftplugins from neovim to improve this :P found that one
10:57:32Zevvmakes perfect sense
10:57:46Zevvbut then users can't choose to ignore all plugin bindings or just yours
10:58:03leorizefine, I'll keep nim_noremap :P
10:58:23Zevv\o/
10:58:24leorizeoh there's a convention here
10:58:35leorizegonna rename it into no_nim_maps
10:58:40leorizeto follow others :P
11:01:37leorizeZevv: would you like a <Plug> map for section movements?
11:02:00ZevvThe default [[ ]] seems to work, what does it add?
11:02:12Zevvthe 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:43leorizeZevv: it actually jumps between procs?
11:07:02Zevvin practice, yes
11:07:12Zevvit jumps between blocks wich stick to the left margin
11:07:32leorizeI'm trying the default one and it jumps from {.experimental.} to end of file...
11:07:42*shomodj_ joined #nim
11:07:54Zevvwhat I *would* like it to do is jump to the next block of the indent level I currently am
11:08:10Zevvso if i'm on an case 'of' and do ]] it jumps to the next of, for example
11:08:47leorizeyou can check the current code
11:08:50leorizeit's quite simple
11:09:02leorizebut sure, jumps to next `of` is possible
11:09:22leorizeif it hasn't already done that yet
11:09:43Zevvprobably just a vim default thing already, as it is usable in any language
11:10:03Zevv[l ]l
11:10:26Zevvoh no wait, ignore that
11:11:54*shomodj quit (Ping timeout: 272 seconds)
11:17:19*PMunch joined #nim
11:19:50leorizeZevv: g:nim_noremap is kept :P
11:20:22*clyybber joined #nim
11:22:24Zevvsweet
11:31:27*fjellfras quit (Quit: Leaving)
11:35:59*absolutejam4 joined #nim
11:36:07leorizenarimiran: fixes for visual mode is now in #head
11:36:07FromGitter<alehander42> -d:nimOldCaseObjects when we use the compiler api
11:36:09FromGitter<alehander42> directly
11:36:18FromGitter<alehander42> i didnt realize that: notice to people that use it
11:40:28*absolutejam4 quit (Ping timeout: 245 seconds)
11:41:04leorizeZevv: have you tried the plugin's section jumps?
11:41:27Zevvyou will now tell me that does exactly what I want, right?
11:41:56leorizeI haven't tried that on your code :)
11:42:15Zevvdon't have my laptop with me, but will check tonight for sure
11:43:29leorizeand if you like that one I'll make a plug map for it
11:44:44leorizeprobably will also look into adding C-] and C-<LeftClick>
11:46:53ZevvI already mapped your stuff to c-]
11:46:55Zevvi don't click
11:47:11ZevvI have only two hands
11:48:20FromGitter<alehander42> Zevv i currently try to use https://github.com/alehander42/helpful_parser, but mostly because of the trees
11:48:29FromGitter<alehander42> its very hobby-like
11:48:45FromGitter<alehander42> (and i also suspect it might be easier to write different lang backends for such a thing)
11:51:41FromGitter<mratsim> @brentp: fp16 in C C++: https://github.com/Maratyszcza/FP16
11:52:10Zevvalehander42: well you got a lot working in only 600 lines there
11:52:51FromGitter<alehander42> i forgot
11:52:56FromGitter<alehander42> the text grammar is a todo
11:53:21FromGitter<alehander42> currently, its only generated by a object : https://github.com/alehander42/helpful_parser/blob/master/src/helpful_parser.nim#L96
11:53:50FromGitter<alehander42> so its really tailored to only my usecase
11:54:19Zevvwell, 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:37FromGitter<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:17FromGitter<alehander42> another thing i think i wanted was like injectable nodes
11:56:28FromGitter<mratsim> It's not that hard actually
11:56:41FromGitter<mratsim> the fact that you don't have to implement your own parser is a boon.
11:56:44FromGitter<alehander42> e.g. you define BigO in Arg List but its "children" are directly added to the children of the parent
11:56:51FromGitter<alehander42> instead of having a BigO child with children
11:57:06FromGitter<mratsim> the hard thing is how to avoid getting addicted to make a DSL for every little thing :P
11:57:09FromGitter<alehander42> e.g. (ArgList => BigO => child becomes just ArgList => child)
11:57:50FromGitter<alehander42> but this is mostly because i dont have inline rules :P because complicated I think
11:59:48FromGitter<alehander42> but overally my lib works naively for mostly those rules so i also hope that npeg gets trees
11:59:49FromGitter<alehander42> :P
12:01:05FromGitter<alehander42> ahh it also expects having a tree with certain api already : https://github.com/alehander42/helpful_parser/blob/master/pseudo.nim
12:02:23Zevvalehander42: 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:36FromGitter<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:32FromGitter<alehander42> oh me too
12:04:54FromGitter<alehander42> ive done three address code just once reading something from a book
12:05:35FromGitter<alehander42> and mostly what i remember is something "this goto/{}/return looks similar to what nim is generating, interesting!"
12:06:54Zevvso, just a bunch of amateurs trying to change the world, eh
12:09:39FromGitter<alehander42> wait until you see my toy lang spec
12:11:00FromGitter<alehander42> but no. btw mratsim how is your nn lib going
12:12:25FromGitter<mratsim> watching the Status townhall at the moment :p
12:12:49FromGitter<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:04FromGitter<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:47FromGitter<mratsim> I got distracted by multithreading solutions this weekend though: https://github.com/mratsim/weave
12:16:06FromGitter<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:38Zevvmratsim: 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:04ZevvIt 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:07FromGitter<mratsim> from scratch, the channels are a bit different
12:20:15*shomodj joined #nim
12:20:16FromGitter<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:35FromGitter<mratsim> the first 2 are very specific and so can make a lot of assumptions and optimization
12:20:38Zevvand 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:25FromGitter<mratsim> the first 2 channel can be implemented via ptr as they are internal and never exposed.
12:21:50FromGitter<mratsim> well I've contacted the author this morning and asked if he had the C code public
12:22:49Zevvthat would help :)
12:22:52FromGitter<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:49FromGitter<zacharycarter> I couldn't get skrylar's dds loader working with compressed textures - so I went back to uncompressed
12:38:57FromGitter<zacharycarter> but, now I has grass
12:39:11FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/1aKg/grass.png)
12:45:34FromGitter<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:19FromGitter<brentp> @mratsim cheers. that looks like it should work
12:54:27FromGitter<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:23sealmovedoes system.cmp() work on objects?
13:42:27lqdev[m]afaik it works on tuples, but I'm not sure about objects
13:45:13sealmoveyeah, i can use tuples but it's annoying having to write mytuple[3] instead of say mytuple.thirdField
13:45:35sealmoveI wonder why you can't use names to access fields, since they do have names...
13:45:56*absolutejam4 joined #nim
13:46:54FromGitter<alehander42> what do you mean
13:47:13FromGitter<alehander42> you should be able to
13:47:21FromGitter<alehander42> if you use named tuples
13:48:37sealmove:O thanks!
13:48:40sealmovegreat
13:53:42*absolutejam4 quit (Ping timeout: 258 seconds)
14:06:03FromGitter<mratsim> lol
14:06:13*sagax joined #nim
14:06:33FromGitter<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:08Cea@shashlick I'm alive again! Did you have any luck with the Quickjs nimterop?
14:27:41shashlickCheck irc logs
14:27:50shashlickI posted a working wrapper
14:28:29shashlickI had to make manual changes to the generated wrapper from c2nim
14:29:52Cea@shashlick tyvm!
14:34:01shashlickLet me know if it works for real
14:34:11shashlickJust cause it compiles doesn't mean much
14:35:34sealmovemratsim: true that :D
14:35:45*sealmove quit (Quit: WeeChat 2.5)
14:37:23Cea@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:57CeaBut in the meantime I'll try the one you generated
14:42:27shashlickthat's what i'm saying, i had to manually edit the generated wrapper from c2nim which is what i posted
14:45:00CeaAh ok
14:45:56leorizeanyone interested in a nimsuggest management daemon?
14:46:40disrupteki'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:23leorizenimlsp is just nimsuggest + a layer to translate from-to LSP
14:47:35leorizeusing it means you're spawning a nimsuggest per file
14:48:28leorizethis daemon otoh will run in the background and can manage instances for every project
14:48:32disruptekso the daemon would maintain state between invocations? would it replace the existing lsp interop?
14:48:53leorizeno, it'd just talk in nimsuggest lingo
14:49:10leorizeusers can connect to it via tcp
14:49:35shashlickwhy cannot nimsuggest itself manage this
14:49:41disruptekwhat's the downside? code written must be supported?
14:50:12leorizeyea, nimlsp is already doing this translation, so it'd not be too much of a prob
14:50:32leorizeshashlick: nimsuggest crashes too much
14:50:46leorizethat's the price for integrating the compiler...
14:51:26leorizethis management server I'm thinking of will handle:
14:51:34leorize- spawning nimsuggest for a project
14:51:42leorize- connections to nimsuggest
14:52:02leorize- and keeping nimsuggest alive
14:53:18leorizeusers just have to connect to this server, get a port, then enjoy direct connection to nimsuggest
14:53:34shashlickthen opposite question - why not have nimlsp handle this
14:53:35leorizethe management server will hold this port if nimsuggest dies
14:53:57leorizebecause nimlsp is nimsuggest in its current state
14:54:08leorizethe "server" part in language server is deceiving
14:54:24leorizeit 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:55Cadeywhat are the nim equivalent to go's interfaces?
15:19:04leorizenone :P
15:19:16leorizethere's the interfaced package that provides this
15:20:23FromGitter<brentp> @shashlick, did you post your quickjs wrapper to github? can't find it.
15:21:39shashlicki just posted it to #nim - didn't put it anywhere yet
15:22:31shashlickhttp://ix.io/1OWi/nim
15:26:30FromDiscord_<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:09FromGitter<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:36leorize@kodkuce: I have zero idea what you're talking about
15:28:00narimiranleorize: i think he's asking about splitting your code into multiple files
15:29:09leorizeI 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:08Zevvleorize uses folds, so he doesnt mind about having 20k lines when he doesnt see them
15:31:13disrupteki 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:12Zevvdisruptek: 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:37Zevvmeans it was a clean split. Buf for leorize that always counts of course, he never has to touch more then one file
15:32:38FromDiscord_<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:40narimiranZevv: lol
15:33:37leorizeZevv: folds are awesome, deal with it
15:33:44FromDiscord_<kodkuce> xD
15:33:57*solitudesf joined #nim
15:34:06disrupteki like the idea of folds, but i've never been able to teach them to my old vi hands.
15:34:45disruptekhey, leorize is a vi savant. you have to give him some props there.
15:34:51FromDiscord_<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:17disruptekthe fact that we have to break up files is merely testament to how much better a human he is.
15:36:07narimiranwhen 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:09FromDiscord_<kodkuce> i go join him in elite club, bow down peasants 😃
15:36:12disruptekkoduce surely you can bounce to the end of the paragraph with movement, no?
15:36:31*theelous3 quit (Ping timeout: 246 seconds)
15:37:45disruptekquickjs does look pretty neat. it could solve a huge problem for me, too -- how to run appsync push alongside nim.
15:38:09FromDiscord_<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:34narimiran..which you should
15:39:18FromDiscord_<kodkuce> duno on nvim i head that script to auto trim trailling spaces and newlines
15:39:29narimirannvim != vscode
15:40:28*absolutejam4 quit (Ping timeout: 245 seconds)
15:46:46*nif quit (Quit: ...)
15:47:43FromGitter<mratsim> Github is down?
15:48:07lmariscalI can access it
15:48:41FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/nouH/DeepinScreenshot_select-area_20190722174754.png)
15:48:46FromGitter<mratsim> can't push commit either
15:49:17lmariscalhttps://www.githubstatus.com/
15:49:34disruptekwelcome, 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:30lqdev[m]good design
15:53:59leorizeI should start duo-hosting my code on both github and gitlab
15:54:34disruptekdamn that trick knee.
15:54:42Calinouinteresting how they have a separate domain name for their status page nosw
15:54:43Calinounow*
15:56:00FromGitter<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:45ehmrybecause nodejs
16:04:47ehmryactually 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:31disruptekwut
16:05:53disrupteki'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:03FromGitter<mratsim> yeah I'm lost as well
16:06:03*ryukophone joined #nim
16:07:20ehmrythe scuttlebutt protocol requires printing JSON in a specific way, or it doesn't work
16:07:27ehmrythe whole thing is JS trash
16:08:22disruptekyou just rarely see stuff like this in the wild.
16:08:47disruptekmostly it's confined to old `fortune` databases.
16:14:27shashlickis defined(macos) different from defined(macosx)
16:14:30shashlickextra x
16:15:25*laaron quit (Remote host closed the connection)
16:15:54FromGitter<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:25disruptekgithubstatus.com went from yellow to red. i guess the servers are actually melted and are not salvagable.
16:16:38FromGitter<mratsim> for example the iOS check seems like magic to me https://github.com/nim-lang/Nim/issues/9369
16:17:44shashlicknot sure where to look for platform definitions
16:17:56FromGitter<mratsim> see my issue
16:18:09FromGitter<mratsim> platform.nim and osenv.nim, and the wiki
16:18:13disruptekreally, why isn't osios in there?
16:18:15FromGitter<mratsim> also hostEnv in system.nim
16:18:40FromGitter<mratsim> basically nim autodetects ios as macosx, so you have to pass ios yourself
16:19:26*nif joined #nim
16:19:37disruptekthen code needs to be written to express that potentiality.
16:20:58shashlicki'm working on https://github.com/nim-lang/Nim/issues/10630
16:21:19shashlickanyway, does anyone know what current dir and parent dir in RISCOS is?
16:21:29shashlickstill '.' and ".."?
16:21:31FromGitter<mratsim> that is funny: https://github.com/nim-lang/Nim/issues/10630#issuecomment-462641692
16:26:55shashlickyay for duplicate coe
16:26:57shashlickhttps://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L41
16:26:58shashlickcode
16:30:14shashlickokay so macos != macosx
16:30:20*laaron quit (Remote host closed the connection)
16:34:58shashlickis curDir wrong for genode? https://github.com/nim-lang/Nim/blob/devel/compiler/platform.nim#L156
16:36:02ehmryshashlick: genode doesn't have curdir natively
16:37:28ehmryshashlick: so its a hack
16:37:38shashlickthanks
16:37:49shashlickso 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:14FromDiscord_<demotomohiro> Hi, I have a question related to template and varargs.
16:46:14FromDiscord_<demotomohiro> https://play.nim-lang.org/#ix=1PaC
16:47:22*shomodj quit (Ping timeout: 268 seconds)
16:53:13FromGitter<mratsim> I think you would have to use a macro that reconstruct an nnkArgList
16:57:06FromDiscord_<kodkuce> template/generic instantiation of `async` from here << Any reason why this shows like warning?
16:58:06FromGitter<mratsim> maybe you have a warning or a compile-error later in your code?
17:00:16FromDiscord_<demotomohiro> @mratsim
17:00:16FromDiscord_<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:32FromGitter<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:21FromGitter<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:32FromGitter<awr1> since not everyone has a formal CS education
17:05:22FromDiscord_<demotomohiro> Do you think this Tutorial is not enough for beginner?
17:05:23FromDiscord_<demotomohiro> https://nim-lang.github.io/Nim/tut3.html
17:06:12FromGitter<awr1> i haven't seen this but let me take a look
17:06:55*ryukophone quit (Ping timeout: 258 seconds)
17:07:31FromDiscord_<demotomohiro> There is a link to that tutorial in macros module document.
17:08:46FromGitter<awr1> it's okay i guess
17:08:52FromGitter<awr1> i would probably try to be more visual though
17:09:51FromGitter<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:02shashlickhttps://github.com/nim-lang/Nim/pull/11814
17:12:04FromGitter<awr1> the `myAssert()` example could explain a little more: to me it's not clear what `expectKind()` and `expectLen()`are for
17:13:37FromGitter<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:55disruptekprobably a given.
17:16:16disruptekif 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:38FromGitter<mratsim> a cookbook would be nice
17:16:55FromGitter<mratsim> with concrete tasks that people might search for
17:17:24disruptekyeah, and i want to see not just code, but literate code.
17:18:15FromGitter<mratsim> I don't think it's the most confusing part though
17:18:35FromGitter<mratsim> most often, the first struggle I see is from people coming from dynamically typed language
17:18:45FromGitter<mratsim> and asking how to put an int and a string in the same sequence
17:19:08FromGitter<mratsim> and suddenly you have to explain about types, object variants and inheritance
17:19:31Araqshashlick:
17:19:34AraqFileSystemCaseSensitive* = true
17:19:35Araq ## True if the file system is case sensitive, false otherwise. Used by
17:19:35Araq ## `cmpPaths proc <#cmpPaths,string,string>`_ to compare filenames properly.
17:19:37Araq when defined(macos) or doslikeFileSystem or defined(vxworks) or
17:19:38Araq defined(PalmOS) or defined(MorphOS): false
17:19:40Araq else: true
17:19:45Araq^ does this even compile? cause it shouldn't
17:20:16disruptekit's under a shashlick: block, so it should. 😉
17:20:30FromGitter<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:12disruptekthe word holiday just means 1kb/s to araq 😁
17:23:09krux02well for me it meens no meeting in the morning
17:23:19clyybberAraq: 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:50shashlickugh
17:24:39dgreenmratsim: 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:11FromGitter<mratsim> awesome, yes please
17:26:26dgreenOk :) I'll be making the PR later today, just gotta clean a few things up
17:26:46Araqclyybber: meh, iirc object constructions are not done properly yet anyway
17:28:43shashlicksorry, pushed the updated version
17:28:58shashlicknote that nim doc will render values depending on which OS the docs were generated
17:29:14shashlickdo we want to expand the docs to give more details on what the values will be for specific OS?
17:30:59Araqnah, just fix the bug
17:32:05Araqmratsim: I'm happy when my holidays are over...
17:33:09FromGitter<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:20FromGitter<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:28Araqmratsim: yeah but it's a long read
17:39:20FromGitter<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:14FromGitter<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:21FromGitter<awr1> for the context
17:40:49FromGitter<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:54FromGitter<awr1> in that workstealer library you were working on
17:41:09FromGitter<mratsim> the one I'm doing is not finished yet
17:41:50FromGitter<mratsim> probably need a couple days more for a proof-of-concept
17:44:05FromGitter<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:03Zevvnot directly, right? They can request stealing, but the victim has to cooperate
17:47:22disruptekwe're not supposed to use quote do, right?
17:47:30FromGitter<awr1> `CacheLineSize = 64`i assume this is just interim right
17:47:55disruptekthey say three lefts equal a left.
17:48:01disrupteker, three rights.
17:48:36FromGitter<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:50disruptekdon't let araq hear you say that.
17:49:07*ryukophone joined #nim
17:49:39Araqtoo late, there is cpuinfo.nim and cpuload.nim
17:50:02Zevvmratsim: how would that work, if the victim is busy they can't respond to steal requests - or do I understand wrong?
17:50:07rayman22201@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:36Zevvrayman22201: you should read mratsims paper. It's a nice ride, lots of history and background, its pretty digestible
17:51:01FromGitter<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:15FromGitter<mratsim> so the thief doesn't need to ask, he just needs to check the length of the deque
17:51:29Zevv@mratsim well no, I'm pretty sure they decided *not* to do that. Let me reread :)
17:51:32FromGitter<mratsim> For the channel-based work stealing, it is indeed an issue though
17:51:50rayman22201this paper? http://aprell.github.io/papers/channel_ws_2014.pdf
17:51:52FromGitter<mratsim> but I'll know only when I implement it
17:51:55Zevv@mratsim: section 3.3
17:52:22FromGitter<mratsim> @rayman22201: the full version - https://epub.uni-bayreuth.de/2990/1/main_final.pdf
17:52:42rayman22201thanks! I will read :-)
17:52:55FromGitter<mratsim> ah @zevv I thought you were talking about my experiments (a "normal" shared memory work stealing with atomics)
17:53:14Zevvah ok. I like this version more :)
17:53:37Zevvshare-nothing
17:53:41*ryukophone quit (Ping timeout: 258 seconds)
17:54:45FromGitter<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:42rayman22201Well, with newruntime a "normal" work stealing threadpool will work just fine :-P
17:57:14ZevvI am naive expecting this to work? http://ix.io/1PaK
17:58:19Zevvoh wait
18:02:02FromGitter<mratsim> generic macros? you live in a dangerous world
18:02:27FromGitter<mratsim> Even I avoid those like the plague
18:02:51Zevvyeah, but I don't know how to do it without. I want an int not a Nimnode: http://ix.io/1PaO
18:03:13FromGitter<mratsim> typedesc?
18:03:41Zevvyeah, I thought so too
18:03:58FromGitter<mratsim> also your macro should return untyped
18:04:31*shomodj joined #nim
18:04:35Zevvyeah, I didn't get that far yet. http://ix.io/1PaR still NimNode
18:04:41FromGitter<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:01FromGitter<mratsim> your input is typed, it should be typedesc
18:05:18Zevvohh. wait. does that not give a nimnode?!
18:05:32FromGitter<mratsim> you cannot convert NimNodes back to typedescs
18:05:42FromGitter<mratsim> typedesc will give you a typedesc
18:05:57Zevvstill not! http://ix.io/1PaU
18:06:02FromGitter<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:45FromGitter<mratsim> mmmh bug worthy
18:07:58FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d35fb7eb2db751dabae0e4f]
18:08:06FromGitter<mratsim> it's an int in the macro
18:08:26FromGitter<mratsim> Another one to add to https://github.com/nim-lang/RFCs/issues/44 :P
18:09:29Zevvyou've been there before :(
18:10:08FromGitter<mratsim> ah sorry it seems like it's a NimNode even within the macro mmm
18:10:28Zevvtypeof(T) is nimnode
18:10:29ZevvT.repr is int
18:11:12*ryukophone quit (Read error: Connection reset by peer)
18:11:25*ryukophone joined #nim
18:11:37ZevvI kind of painted myself in the corner with npeg - every feature I try to implement causes me troubles with passing types around :/
18:11:39FromGitter<mratsim> I was pretty sure typedescs were kept as is but I may remember incorrectly
18:13:28FromGitter<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:41disruptek3-spaces nim indentation spotted in the wild: https://github.com/Skrylar/nim-jack
18:13:58Zevvyeah, but you want to know why I brought up this discussion?
18:13:59Zevv19:47 < disruptek> we're not supposed to use quote do, right?
18:14:22disrupteki'm still curious, btw.
18:14:50FromGitter<mratsim> why not?
18:15:11*carkh joined #nim
18:15:28disrupteki 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:56FromGitter<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:56FromGitter<mratsim> The implementation is probably complex and tricky hence why there is such bugs and they are hard to fix.
18:18:15carkhhi, 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:42carkhinvalid argument for command line option: '--debuginfo'
18:19:27FromGitter<mratsim> mmm, there is lineinfo and stacktraces, those are automatically removed when you compiled with -d:release
18:20:13FromGitter<mratsim> the switches are detailed there: https://nim-lang.org/docs/nimc.html
18:20:44Zevvmratsim: but still, is there a solution to my problem afayk, or is this a bug?
18:20:59carkhmratsim: yes that's where i took the switch from
18:21:20FromGitter<mratsim> there is no debuginfo flag though
18:21:45carkhin advanced options
18:22:00FromGitter<mratsim> @zevv, probably, do you really need to instantiate a generic proc within a macro? would a quote do work instead?
18:22:29Zevvit might, but I never grokked that and the docs are sparse. Looking into that now
18:22:56Zevvand I think I really do need to instantiate a generic proc
18:23:06carkhwhen i eyeball the produced exe, i see many symbols, that's like half my exe file
18:23:21FromGitter<mratsim> did you compile with -d:release?
18:23:24*solitudesf- joined #nim
18:23:36carkhyes
18:23:51disruptekbut you don't have to worry about interpolating "strings"?
18:23:56carkhnim c -d:cmdlet=clojure -d:release --debuginfo:off --opt:size -o:clojure.exe clojure.nim
18:24:42FromGitter<mratsim> curious, can you past like 10 lines of your C output that exhibits those symbols
18:24:52disruptekyou can use debuginfo in your nim.cfg
18:25:12carkhi'm looking at the exe file actually, i'm all new to nim =)
18:25:24FromGitter<mratsim> @disruptek no I don't think so, that mainly because bool and enums are represented by ints in the VM
18:25:27disruptekeg `debuginfo:off`
18:25:53*solitudesf quit (Ping timeout: 245 seconds)
18:26:04carkhi'll check this lead right away
18:26:26disruptekoh, that makes sense. somehow i read your statement as `booleans and ints`.
18:30:00carkhnope same error, i guess it got deprecated or something
18:30:30*disruptek recompiles Nim.
18:30:37*absolutejam4 joined #nim
18:31:05lqdev[m]well you can also just `strip -s` the executable
18:32:24disruptekit's working for me under devel. i guess maybe it's new. i think i started with nim around 19.6.
18:33:03carkhi 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:28disruptekdid you build your compiler?
18:33:29carkhwell 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:02carkhnope just nimchoose stable i think
18:34:37disruptekis 0.19.0 the most stable nim now?
18:34:47carkhthat's what it gave me =)
18:34:57disruptekyeah, i'm just surprised.
18:35:02*disruptek doesn't use choosenim.
18:36:15carkhanyways 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:41disrupteki'll say. but small things add up when you're trying to win hearts and minds.
18:36:42carkhor 135k really anways
18:37:07Araq120k is pretty big but a lot of it depends on the C environment
18:37:34Araq0.19.0 is stable? wtf
18:37:47disrupteki 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:47lqdev[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:14lqdev[m]no idea why that happens though, perhaps some database entry thing is not set properly?
18:57:36solitudesfdid 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:15Cea@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:27Ceaah I take it back, figured it out, was using const for the array declaration
19:25:23*vlad1777d joined #nim
19:29:26Ceagot it working!
19:29:44disruptekdynamite!
19:31:04*stefanos82 joined #nim
19:32:51CeaHere's a gist: https://gist.github.com/ImVexed/6340c0dd7c498819dc34911fad794ef1
19:33:53CeaSince 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:12disruptekvar hello holds your `hello world` js bytecode compiled by quickjs?
19:34:36clyybberAraq: Why is nimAsgnStr implemented as a compilerRtl ?
19:36:52shashlick@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:49carkhso 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:42FromGitter<awr1> `when defined(nimdoc):` is what you use to get a conditionally compiled block to show up in docs right
20:02:56FromGitter<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:05FromGitter<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:09shashlick@awr1 - what's the use case for that? i know it caused issues in osseps.nim
20:31:22*shomodj joined #nim
20:38:09clyybberdeech: 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:58FromGitter<deech> clybber, thanks!
20:46:57FromGitter<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:19clyybberdeech: np
21:18:20*ryukophone quit (Read error: Connection reset by peer)
21:18:20clyybbergn
21:18:23*clyybber quit (Quit: WeeChat 2.5)
21:20:13*ryukophone joined #nim
21:22:40FromGitter<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:17dom96when defined(arm) or defined(nimdoc)?
21:31:45FromGitter<awr1> ya
21:32:41dom96PMunch: any chance you could disable the auto-indent on the playground? It's wrong enough times to be annoying
21:41:08dom96darn
21:41:27dom96I can have a `enum` as a function argument, but not a `var enum`
21:43:06dom96oooh `proc read*[T: enum](proto: AnyTProtocol, n: var T)`
21:43:14dom96But fieldPairs doesn't like my hack D:
21:45:28FromGitter<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:37dom96you can
21:49:46dom96hah, I knew I was in dangerous territory
21:49:49dom96just got a C code gen error
21:51:27*a_b_m joined #nim
21:51:47dom96oh, but this is unrelated to my hacks
21:52:53dom96aww yeah, it works
21:53:08dom96serialization/deserialization with no macros
21:53:16dom96just 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:00FromGitter<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:43dom96TIL of quickjs
22:09:50disruptekthe demo gist appears to work to invoke bytecode generated by the quickjs compiler; did you try that?
22:10:47FromGitter<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:01FromGitter<brentp> but the C-API appears incomplete
22:11:32disrupteki 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:56FromGitter<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:15disruptekah, the C impl appears incomplete.
22:12:49FromGitter<brentp> it's implemented, just not exported in the .h files.
22:12:51*ryukophone joined #nim
22:14:05disruptekoh, 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:35FromGitter<brentp> yes.
22:14:52FromGitter<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:36disruptekprobably 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:18disruptekcue araq comment about the myriad C idiosyncracies extending back 30 years.
22:21:08FromGitter<Varriount> disruptek: I think JavaScript has more synchronic behavior than C does.
22:21:40disruptekno 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:17shashlickQuickjs has nested structs which nimterop doesn't support yet hence c2nim and hand edits
22:49:00FromGitter<awr1> i will add cache info to cpuinfo sometime tomorrow
22:49:09FromGitter<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:22ImVexed@shashlick Thanks for all the help! https://github.com/nim-lang/packages/pull/1122
23:30:58shashlickAwesome!
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:04carkhAm I correct in assuming that calling $ with a widestring will return an UTF-8 encoded nim string (as per widestr.nim) ?
23:58:59carkhhum i'm not totally accurate WideCString and widestrs.nim