<< 08-08-2019 >>

00:01:09disruptekiirc, he comes close to saying "if you want real software, use real programming languages." which is, i think, the best encapsulation of the problem: you ship a dsl because you want to constrain use to a smaller set of semantics. if you don't want that, don't choose that.
00:03:51shashlickBut isn't the problem more that such embedded engines are also limited in terms of tools support
00:04:39shashlickHard to deal with when bugs need to be root caused and fixed
00:05:22shashlickI'm having that exact problem - even though I'm using dlls, when I run into memory or crash issues, they are a pain to figure out
00:05:34disruptekof course. but when you choose a little language, everything is little.
00:05:52shashlickI've spent more time with such issues than actual dev for feud
00:06:31disrupteki'm sorry, what's in the dlls. i know you've explained this and i just wasn't paying close attention.
00:08:21FromDiscord_<Shield> lua may be little but it's not fun to debug
00:08:27shashlickAll the editor functionality is in the dlls
00:08:39shashlickThe main exe is mostly just a plugin system
00:09:10disruptekit sounds pretty ambitious to me.
00:09:47shashlickSo this way any user plugin gets the same capability as the core editor
00:10:02shashlickWell it works, except for the gc issue
00:10:22shashlickI think Nim makes it very easy to pull such stuff off
00:10:34shashlickThat's why I'm really keen on pushing this further
00:11:10shashlickAdding new capabilities is super easy and very fast
00:11:34disruptekyeah, i get it, i mean, i have big plans for nim. i'm taking a much longer view, i guess.
00:12:39FromDiscord_<Shield> when does it break btw?
00:13:15FromDiscord_<Shield> I need to go through your code multiple of times to get the whole thing, it seems that you have a nice dependency handling in there
00:13:55shashlickWell in 0.19.6, everything works but I need to use boehm since I was doing sharing across threads with string and seq which isn't correct
00:14:53shashlickWith 0.20.x, everything fell apart, probably because I the gc was fixed or perhaps changed for some reason
00:15:14FromDiscord_<Shield> threads? are you making a new thread per plugin?
00:15:30shashlickSo an object allocated in the main exe gets passed to a dll which modifies it and sends it back
00:15:52shashlickAnd somewhere in there it messes up and the object gets cleared or filled with garbage
00:16:01shashlickWith boehm that is
00:16:13shashlickWith native gc, it just asserts and crashes
00:16:47shashlickWell the thread is for code monitoring and recompile of the dlls
00:16:56shashlickRight now all dlls are loaded in the main thread
00:17:27shashlickSome of the dlls spawn threads of their own
00:17:31disrupteki last used boehm like 25 years ago, but it blew my mind at the time.
00:17:51shashlickThe remote plugin for example runs a listener thread with nng
00:17:53disrupteki can reproduce this bug on your master branch or w/e? for feud?
00:18:24shashlickYes, it should crash
00:19:17shashlickThere's also an Araq branch with some minor cleanup
00:19:34disruptekoh, do i want that?
00:19:37shashlickI replaced hash set with seq due to the issue I opened
00:19:48disruptekah, okay.
00:19:49shashlickYa try that, it gives a better stack trace too
00:20:24FromDiscord_<Shield> did you try lockfree approaches? instead of modifying in place, you copy and basically do anything to avoid memory conflict, it may double memory usage tho
00:20:32shashlickAlso, you can minimize the plugins loaded by adding a plugins/allow.ini with just one line - config
00:21:16shashlickThat's a good idea to try @Shield
00:21:58shashlickBuild with `nimble debug`
00:22:05shashlickIt will build all plugins
00:23:15shashlick@Shield - how do I copy tho - have to be careful such that I transfer data between exe and dll without involving the gc on either side
00:24:36*krux02_ quit (Remote host closed the connection)
00:25:07FromGitter<Varriount> Memory map?
00:25:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
00:27:04*laaron joined #nim
00:27:51*theelous3 joined #nim
00:28:23FromDiscord_<Shield> passing by value or using something like channels? maybe try to make a copy of the object as soon as you get it
00:28:57FromDiscord_<Shield> I'm digging through the various gcs to see which works better
00:29:22shashlickOne idea I've had is to have each dll in a separate thread and use rpc to interact
00:29:31shashlickBut I think that will be slow comparatively
00:30:09disruptekah, toast was in my path but not installed via nimble, so it was puking.
00:30:19shashlickI'll probably use alloc and cast to avoid the gc
00:30:38shashlickHow do you use memory maps in Nim? Any examples @varriount?
00:31:16shashlickChannels seems sad since they all are in the same thread
00:32:06FromDiscord_<Shield> channels are used to communicate between threads
00:32:11shashlickI wonder if someone has written a lib to use objects which are alloc dealloc instead of the gc
00:32:54shashlickRight but all these dlls run in the same thread so using channels doesn't make sense
00:33:46shashlickAnyway, really appreciate any feedback
00:34:03FromDiscord_<Shield> I meant the same concept, channels copy their data before doing any work, I believe http does the same, it reserves a copy of the string you passed so it doesn't get gc'd while being used
00:34:23shashlickIdeal goal will be to extract the plugin capability from feud and make it a package so that others can use it too
00:34:27FromDiscord_<Shield> but using pointers to hold a copy of the object and passing those instead can work
00:35:01shashlickK I'll be look into it, at least avoid Nim objects from doing that
00:36:40shashlickDo you have an example of copying @Shield? I'll take a look
00:36:44disruptekwow, i'm getting a gcc error trying to build this; it actually looks like i may have broke my gcc.
00:36:56shashlickWhat version of gcc
00:37:19shashlickCause Araq was also using 6.3.0 and it couldn't find string_view
00:37:23disruptekit's a link error.
00:37:26disruptek/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/crtbeginT.o: requires dynamic R_X86_64_32 reloc against '__TMC_END__' which may overflow at runtime; recompile with -fPIC
00:37:36*endragor joined #nim
00:38:05shashlickThis is windows
00:38:37shashlickFeud is only working on windows right now
00:38:44disruptekoh, really?
00:38:56shashlickThough the plugin system should be able to work anywhere with minor changes if any
00:39:21shashlickYa, using mfc for gui
00:39:24disruptekwhat's missing on linux?
00:39:47shashlickScintilla for gui, need windows for events etc
00:40:10shashlickJust haven't ported but should be possible since both scintilla and nim support cross platform
00:40:44shashlickSorry I should have mentioned earlier
00:40:56disrupteki'm just a little disappointed. :-/
00:41:26shashlick(
00:41:36shashlickAnyway, thanks for trying
00:41:58*endragor quit (Ping timeout: 246 seconds)
00:43:02disrupteki'll mess with it and see how far i get.
00:43:28FromGitter<zetashift> do I need to run nimble release to compile feud?
00:43:57*a_b_m joined #nim
00:47:26FromDiscord_<Shield> I'd like to ask if using the normal gc for the exe and regions for the dll would cause gc conflict and vice versa
00:48:16*abm quit (Ping timeout: 268 seconds)
00:49:25FromGitter<zetashift> mhmhm weird getting a scintilla error
01:00:16rayman22201@shashlick IIRC told you before to try channels, but you didn't like it. You told me you that you really wanted to used shared mem instead of copying.
01:00:41rayman22201* s/told you/I suggested/
01:02:39rayman22201might be worth benchmarking it. It might not be as slow as you think.... FYI, Go and Erlang uses channels, and it works alright for them.
01:14:37*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
01:17:02*laaron joined #nim
01:34:13*deech quit (Ping timeout: 245 seconds)
01:45:34FromDiscord_<Shield> does anybody has an example about using gc:none? or any explanation?
01:48:49rayman22201explanation? lol. It means no gc at all. complete manual memory management, like C.
01:51:14*sagax_ joined #nim
01:51:24*sagax quit (Remote host closed the connection)
01:51:50rayman22201most of the stdlib won't work in that mode. It's mostly useful for embedded development. I.E. you want to use Nim to build an Operating System, or run it on a tiny device like an arduino.
01:52:25FromDiscord_<Shield> do you still use normal variable and ref declaration or you're stuck with pointers only? it's unclear to me, an example would've helped
01:52:50FromDiscord_<Shield> I didn't see any destructors or pointers being called in the kernel example
01:53:47rayman22201normal vars and refs work just fine with gc:none
01:54:21rayman22201I should be more specific, you can create a ref, but it degrades to a normal pointer.
01:54:37rayman22201since all the gc tracing operations become noops
01:55:04rayman22201which means destructors also don't work iirc
02:03:35*a_b_m quit (Quit: Leaving)
02:10:57FromDiscord_<Shield> I'll stick to testing regions then, it forces good habits, as in not allocate things randomly
02:11:23FromDiscord_<Shield> the price you pay to let other people use nim for shared libraries
02:11:58FromDiscord_<Shield> does anybody knows why boehm works at all for that issue?
02:15:56rayman22201I highly recommend regions. I think regions are very underrated.
02:18:16rayman22201all the gc's have known issues with shared libraries iirc. Only gc:none, gc:regions, and newruntime work well for shared libraries.
02:28:02rayman22201bah. Everyone is probably asleep now. I possibly have a choosenim and/or a nim bug.
02:28:02rayman22201I did a fresh install of choosenim on my windows 10 machine, and I noticed that it downloaded an old version of mingw (version 4.9.1). The recommended version on the nim website is mingw 6.3.0
02:29:19rayman22201I noticed this because nim cpp appears to be broken for me on windows. not even `echo "hello world"` seems to work. It compiles but produces no output.
02:37:11*mal`` quit (Quit: Leaving)
02:41:46*theelous3 quit (Read error: Connection reset by peer)
02:46:41*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:47:25*laaron joined #nim
02:47:44*mal`` joined #nim
02:57:07*mal`` quit (Ping timeout: 245 seconds)
02:59:13*mal`` joined #nim
03:03:26FromDiscord_<Shield> I'm going through the forums and Araq suggested to not use nimrtl for a certain issue, so you can have multiple instances of the gc
03:03:50FromDiscord_<Shield> I see a good amount of people trying to make this approach for plugins to work but without a result
03:05:55rayman22201The most successful plugin system that I know of is shashlick with Feud
03:06:07rayman22201and he had much trouble, as you know
03:06:22rayman22201newruntime should make this much better though
03:06:31*lritter quit (Ping timeout: 246 seconds)
03:07:25*lritter joined #nim
03:14:02*fjellfras_ joined #nim
03:14:40*fjellfras_ quit (Max SendQ exceeded)
03:15:12*fjellfras_ joined #nim
03:15:50*fjellfras_ quit (Max SendQ exceeded)
03:16:21*fjellfras_ joined #nim
03:35:15*fjellfras_ quit (Ping timeout: 244 seconds)
03:52:54*seni_ quit (Quit: Leaving)
03:53:53FromGitter<gogolxdong> There is a question, what's the underlying reason of gcc 4.7+ requirement? There is some specific systems don't support gcc package install, they have to build from source , as I tried before, it's frastrating.
03:56:12leorizeprobably due to the amount of gcc-specific functionality used
03:56:19leorizetry clang if you don't have new gcc
03:56:24*dddddd quit (Remote host closed the connection)
03:56:43*endragor joined #nim
03:57:06*fjellfras_ joined #nim
04:20:56FromDiscord_<Shield> not using nmrtl seems to work for strings, stdlib is usable unless that was fixed, but that may be due the fact that strings are copied by value
04:26:41FromGitter<mratsim> @Araq, I agree with @deech. {.compileTime.} should only be matched by static or macro. Otherwise use a const
04:27:11FromGitter<mratsim> or available in macro*
04:27:37FromGitter<mratsim> This way it's also easy to know what code ends up in the binary or not.
04:37:38*lritter quit (Quit: Leaving)
04:38:23*fjellfras_ quit (Remote host closed the connection)
04:38:49*fjellfras_ joined #nim
04:40:09*nsf joined #nim
04:54:45FromGitter<mratsim> BTW, should I open a RFC on Nim multithreading runtime? I do have some ideas but I probably miss some use-cases or nice patterns seen in other libraries/languages and probably also homemade parallel libraries.
05:00:56*fjellfras_ quit (Ping timeout: 258 seconds)
05:24:15rayman22201@mratsim. Yes, definitely open an RFC.
05:28:01*fjellfras_ joined #nim
05:34:41*solitudesf joined #nim
05:41:37*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
05:42:27*laaron joined #nim
05:49:14*laaron quit (Remote host closed the connection)
05:51:27*laaron joined #nim
05:55:03FromGitter<mratsim> Also maybe this should be started as a library (or at least as "experimental") this will allow competing designs.
05:56:00FromGitter<mratsim> We should just agree on the end user API / concept / interface so that people can switch/plug-and-play schedulers and libraries
05:57:27FromGitter<mratsim> This may also allow re-using industry-proven C or C++ schedulers if we can add a thin wrapper on top of them to conform to Nim interface
06:01:50*laaron quit (Remote host closed the connection)
06:02:20rayman22201It's a good idea. Being more formal about the api but not the implementation should also help prevent another political fiasco like async / Chronos.
06:04:05FromDiscord_<Shield> story time?
06:04:53*laaron joined #nim
06:07:30FromGitter<zacharycarter> How many runtimes will we end up with haha?
06:07:40FromGitter<zacharycarter> And will any of them be compatible
06:24:38AraqIMO you can extract an interface after you have two or more different implementations
06:24:49Araqotherwise you end up with an interface that simply doesn't work
06:25:22Araqesp if you are after speed and every allocation counts
06:26:06Araqfor instance, there is only so much you can do when 'read' is required to return a fresh Future[string] (two allocs at least)
06:30:53rayman22201Good point
06:32:57Araqand of course, as always, basic math bites back. So you have 3 schedulers and 2 async frameworks and 3 Nim versions you claim to support. Tada: Text matrix's size is 18.
06:33:09Araq*Test matrix
06:34:45Araqof course, you also support Linux, OSX and Windows (factor 3) and 2 different CPU archs...
06:35:43Araqand 2-3 different C compilers that are invoked by Nim...
06:36:55Araqwhich is also why semver cannot ever work, the only factor that works is 1. 1*1*1*1 is still 1, how cool is that?
06:40:36*fjellfras_ quit (Ping timeout: 258 seconds)
06:54:36*fjellfras_ joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:41*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:01:54*laaron joined #nim
07:04:04*krux02 joined #nim
07:04:37*gmpreussner joined #nim
07:05:55*laaron quit (Remote host closed the connection)
07:08:29*laaron joined #nim
07:14:05*gokr_ joined #nim
07:18:48FromGitter<alehander42> ok hello
07:19:34FromGitter<alehander42> back from vacation
07:19:54FromGitter<alehander42> time to open nim issues
07:22:08*solitudesf quit (Ping timeout: 245 seconds)
07:24:43FromGitter<zacharycarter> welcome back!
07:24:59*laaron quit (Remote host closed the connection)
07:26:58FromGitter<alehander42> https://github.com/nim-lang/Nim/issues/11911
07:28:17FromGitter<alehander42> i want to open PR-s for those, but firstly opening an issue to make sure
07:29:20FromGitter<alehander42> 1) https://github.com/nim-lang/Nim/issues/11912
07:29:41FromGitter<alehander42> (tagging @dom96 as well, as its about asyncdispatch ^)
07:29:51FromGitter<alehander42> hey @zacharycarter
07:30:38*laaron joined #nim
07:36:10*fjellfras_ quit (Ping timeout: 272 seconds)
07:37:13FromGitter<bevo009> Hi all, noob query- I made a proc to iterate over a tuple, ⏎ but when I call it I need to prefix it with echo, or it won't compile ⏎ I must be missing something obvious :( ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d4bd1295178a724764d0e83]
07:37:57FromGitter<alehander42> so, discard
07:38:11FromGitter<alehander42> you can't just call a function that returns value
07:38:18FromGitter<alehander42> you have to either use the return value
07:38:24FromGitter<alehander42> or to `discard` it (in most cases)
07:38:38FromGitter<alehander42> probably you want just a void function here
07:38:47FromGitter<alehander42> printT(a: tuple) = ..
07:39:45FromGitter<bevo009> Sorry..swear I tried that
07:39:47FromGitter<alehander42> otherwise you have to either doSomethingWith(printT(tup)) (like echo) or discard printT(tup)
07:39:50FromGitter<bevo009> ta
07:40:02FromGitter<alehander42> no problem
08:04:11FromGitter<bevo009> One more noob query :) ⏎ So this template iterates over an array, string or sequence ⏎ Is it modifiable so it will take a tuple as an argument? Or perhaps using a macro? ⏎ untyped won't match a tuple parameter, is there a more generic way? ⏎ ... [https://gitter.im/nim-lang/Nim?at=5d4bd77bc87a0963e7324907]
08:04:26*NimBot joined #nim
08:05:43*tjmac joined #nim
08:05:44*shomodj joined #nim
08:05:59FromGitter<alehander42> it should take a tuple parameter
08:06:45FromGitter<alehander42> it does match as you see
08:07:00FromGitter<alehander42> oh the error is that it doesnt have `items` sorry
08:08:03FromGitter<alehander42> so you probably
08:08:05FromGitter<alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d4bd865aa5ef4596c571f4e]
08:10:32FromGitter<bevo009> ahh, haven't used 'when' yet...that's perfect
08:10:45FromGitter<alehander42> yes, when is a compile time if
08:10:47FromGitter<bevo009> Thanks for all the help Alexander!
08:10:50*floppydh joined #nim
08:10:50FromGitter<alehander42> no problem
08:11:34FromGitter<bevo009> I do try to solve them myself first...googling Nim questions doesn't always yield much
08:12:13FromGitter<bevo009> learned something else, really appreciate it :)]
08:12:24Araqyou're in the right channel
08:12:40Araqwe can also give you links where to find docs
08:12:42FromGitter<alehander42> its hard, no much material indeed, but the manual + channel is good
08:13:31FromGitter<bevo009> is searching the manual the best method?
08:14:51ZevvThe manual is big and dense, I tend to miss things. I just ask here and have other people solve my problems :)
08:15:45FromGitter<bevo009> I did search the manual for how to iterate over a tuple, I don't think there's an example? ⏎ But I did find the answer here: https://stackoverflow.com/questions/48762646/how-to-iterate-over-a-tuple-in-nim
08:16:16FromGitter<alehander42> help is nice
08:24:49*solitudesf joined #nim
08:27:22*solitudesf quit (Read error: Connection reset by peer)
08:29:42*fjellfras_ joined #nim
08:33:33krux02bevo009: you should try to avoid iterating over a tuple
08:35:33*fredrik92 is now known as couven92
08:37:48*solitudesf joined #nim
08:45:03FromGitter<bevo009> @krux02 Sure thing, that function was just for examining containers while I learn ( and to see if it could be done :) )
08:45:44FromGitter<mratsim> Fields is not a real iterator
08:45:53FromGitter<mratsim> It's just masquerading as one
08:46:40FromGitter<mratsim> You should use for f in fields(mytup): result.add $f
08:47:24FromGitter<mratsim> Then it makes sense to have a string return value
08:47:49FromGitter<mratsim> Otherwise you return an empty string
08:48:04Araqcontainers all come with '$' in Nim.
08:48:14Araqyou can simply echo them
08:48:49FromGitter<alehander42> the guy is just trying to exercise on templates/iterators
08:49:11FromGitter<bevo009> I use that too, echo <container>
08:49:26FromGitter<bevo009> Just working out the rules here :)
08:49:31FromGitter<alehander42> i still dont understand why one cant echo ref objects
08:49:48FromGitter<alehander42> but yeah `.repr` kinda works
08:49:54FromGitter<RayoGundead> dir
08:49:55FromGitter<bevo009> Is this all the info on fields? https://nim-lang.org/docs/iterators.html#fields.i%2CT
08:52:29shashlick@Shield - that's option 2 - regular gc for exe, regions for dll, but still need to be careful with passing data back and forth
08:53:35leorizecouldn't you make the second dll also depend on libnimrtl?
08:54:06shashlick@rayman22201 - the channels discussion was between threads. I dealt with that by using boehm and more recently creating the shared package
08:54:20krux02alehander42: if you add ``proc `$`*[T](arg: ref T): string = $arg[]`` you might end up in infinite recursion.
08:54:32krux02you would need cycle detection
08:54:46shashlickThis is more about passing data between the main exe and dll both of which are in the same thread. The multiple gc issue
08:55:05FromGitter<alehander42> krux02 but the fact is `repr` seems to work for ref
08:55:18FromGitter<alehander42> so why can't the same mechanism be reused
08:55:43krux02yea, repr is not overloadable. It is just there, builtin.
08:55:47FromGitter<alehander42> one can always use just a "ref <whatever>" for e.g. os:standalone
08:56:06FromGitter<alehander42> my point is, $ for ref can just call repr then
08:56:14krux02no
08:56:27leorizeshashlick: if you use libnimrtl then wouldn't there only be one GC?
08:56:29FromGitter<alehander42> i cant imagine why $ should work only on a subset of all types
08:56:40krux02true
08:57:09krux02but no, repr is something on our todo list out of the language, because it is redundant.
08:57:30krux02I would like to have a better stringification algorithm.
08:58:13FromGitter<alehander42> so do you plan to only leave `$` or what would happen
08:58:23krux02something that has cycle detection, works on everything, and can be overloaded if the default doesn't work
08:58:49krux02well I personally dislike `$`, because it allways creates these intermediate objects.
08:58:51FromGitter<alehander42> souns good
08:59:41FromGitter<alehander42> well, it might be possible to somehow preallocate a buffer for the top-level $ when you have a deep $ object traversal?
08:59:55krux02I thought about building ``$`` on top of formatValue, because formatValue can be overloaded, and it doesn't create all these intermediate string objects.
09:00:24*leorize quit (Quit: WeeChat 2.4)
09:00:35krux02be we also need a better overload resolution for it. Because often when there is an overload for `$`, it is often not seen by the compiler because of some imports and module visibility etc.
09:01:06krux02so until that part got solved, there is just `$` and `repr`.
09:01:30krux02it's not too bad, because it generally is only used for debug printing, or at least that is what it should be used.
09:01:38krux02maybe some visualizaiton in a gui
09:02:05krux02I would like to make it usable as well in situations where performance matters.
09:02:26krux02(e.g. stream processing in the unix world)
09:02:55krux02but that is all scheduled for not now, because we still have way too many bugs for my preference.
09:03:00FromGitter<alehander42> how does formatValue fix it?
09:03:06FromGitter<alehander42> passing an argument with a buffer?
09:04:01krux02formatValue is not the procedure that you eventually call to crate a string.
09:04:36shashlick@leorize yes I did try but got some other issues
09:04:37krux02there is this string interpolation context that creates a string where formatValue is allowed to append.
09:05:00FromGitter<alehander42> yes, thats what i imagined with the buffer arg
09:05:03shashlickOverall, I need to open pointed issues so that they can be debugged and fixed
09:05:54FromGitter<genotrance> Here's the first https://github.com/nim-lang/Nim/issues/11906
09:07:46*leorize joined #nim
09:08:04*nif quit (Quit: ...)
09:08:13*nif joined #nim
09:11:31*fjellfras_ quit (Ping timeout: 248 seconds)
09:13:16*endragor quit (Quit: Leaving...)
09:19:57*fjellfras_ joined #nim
09:22:14leorizeshashlick: I think I found the main problem
09:22:37leorizejust initializing a HashSet[string] with nimrtl already produced a crash
09:22:47leorizeno dll needed
09:22:57leorize(note: this is with gcassert)
09:30:03shashlickwow cool
09:30:08*Vladar joined #nim
09:30:17shashlicki replaced the hashset with a seq in a branch, that crashes too, but in a different way
09:31:15leorizealso, {.exportc.} != {.cdecl.}
09:31:38leorizean `{.exportc.}` function is still `{.nimcall.}` by default
09:31:49leorizeso you might want to fix that
09:32:24shashlickso even if i import a nim dll from nim exe, it still needs cdecl explicitly?
09:33:19leorizenot sure what you mean by that
09:33:30leorizeI'm talking about this: https://github.com/nim-lang/Nim/issues/11906
09:33:40leorizecasting it to a `{.cdecl.}` is not entirely correct
09:34:00shashlickyes, same thing, that's a minimal sample of feud
09:34:19leorizeit should be either `{.nimcall.}` or you annotate the `onload` with cdecl
09:34:49leorizefor one param on linux that doesn't change anything, but might be of importance on windows
09:36:16shashlickdo I just say {.exportc, dynlib, cdecl.}
09:37:40leorizeyea
09:39:25*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:47:05*sagax_ is now known as sagax
09:50:11leorizealright, here's all needed to trigger a GC assert spree (with nimrtl): import sets; discard initHashSet[string]()
09:54:19*ng0 joined #nim
09:56:12FromGitter<alehander42> many parts of the stdlib needs fixing to work well with nimrtl iirc
09:58:31leorizeshashlick: https://github.com/nim-lang/Nim/issues/11914
10:00:12*endragor joined #nim
10:00:24shashlickjust tried with nimrtl and program doesn't even run
10:01:38leorizeI guess you haven't built libnimrtl?
10:02:08shashlicki have, trying to post a stack trace
10:02:30shashlickhttps://pastebin.com/Hig4HiT7
10:05:32*shomodj joined #nim
10:05:33leorizehow can I try that?
10:05:35*shomodj quit (Client Quit)
10:05:42Cadeyhow do i extract query parameters from a URL/URI?
10:06:22FromDiscord_<Shield> mixing gc types doesn't help either
10:06:35Zevvwoohoo, who made the compiler accept its command line options in random order! \o/
10:07:42leorizeCadey: via JS backend or the C backend?
10:07:46CadeyC
10:07:59leorizeI assume you're not using jester?
10:08:28Cadeyi'm scraping HTML
10:09:30leorizeyou need this https://github.com/nim-lang/Nim/pull/7761
10:09:52FromGitter<alehander42> leorize i cant understand how does incRef goes into recursion
10:11:27*shomodj joined #nim
10:11:57leorizehidden goodies: https://github.com/nim-lang/Nim/blob/ca4b971bc81b2e751e0388d80896fde7079b1679/lib/pure/collections/sharedstrings.nim
10:14:50*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
10:15:19Araqleorize, that's dead code
10:16:34leorizethen it should probably be removed?
10:16:35shashlick@leorize - probably by using --threads:on
10:16:47Araqleorize, agreed.
10:17:04shashlickcheck out https://github.com/genotrance/shared - has shared string and shared seq
10:17:25leorizethe last commit to touch that was the HCR commit, so not sure if it's used there
10:17:37shashlick@leorize - i tried with cdecl but didn't make a difference
10:19:02*laaron joined #nim
10:19:30*laaron quit (Remote host closed the connection)
10:21:49*laaron joined #nim
10:24:16*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:27:53*clyybber joined #nim
10:27:54*laaron quit (Remote host closed the connection)
10:27:56*laaron- joined #nim
10:31:17*stefanos82 joined #nim
10:34:08*solitudesf quit (Ping timeout: 272 seconds)
10:56:11leorizeAraq: we got some chinese spam on the forum
10:58:17FromDiscord_<Shield> gc:regions has compilerRtl pragma but if you try to use it with nimrtl it will say "could not import: nimrtl_nimGCvisit" which is only defined in the normal gc
10:58:31Araqleorize, I'm waiting for a translation
10:59:45leorizerunning it through gtranslate shows something that looks like an ad
11:00:08leorizefor some diploma faking service?
11:01:08Araqok, deleting it
11:02:34leorizeon the bright side, looks like Nim is taking off in China :P
11:05:28*user0 joined #nim
11:05:41*user0 is now known as user0457
11:05:44*dddddd joined #nim
11:06:00user0457Hi. Is there any online Nim -> ASM compiler like godbolt?
11:06:16leorizerayman22201 is working on Nim support for godbolt iirc
11:09:09Cadeyi think i found a bug in the parseuri proc
11:10:05Cadeyparsing http://download.linuxjournal.com/pdf/get-doc.php?code=2c230d54e20e7cb595c660da48be7622&tcode=epub-301- eats the & before tcode
11:12:13*user0457 quit (Quit: user0457)
11:13:30krux02dom96: I have a problem in nimble can you help me?
11:14:22krux02I made nim semantic checking a bit stricter and now nimble has problems.
11:14:24*user0 joined #nim
11:14:52krux02basically I need to know what nimble does to run a task.
11:22:33Araqkrux02, you can also ask shashlick
11:22:49Araqsince he wrote the new Nimble task integration code
11:23:01krux02ok
11:23:08krux02shashlick, are you around?
11:23:56krux02Araq: I copied everything that I thought would be necessary to run a task in a local scratch.nims file. Magically here is no problem at all.
11:24:27Araqnimble --verbose --debug does give some info
11:24:32krux02it doesn't help that the error message just prints a single line. I have the feeling that there are more lines of error messages and they are automatically stripped away.
11:24:39krux02ah, ok
11:24:42Araqbut for me it deleted the .nims file in my TEMP so I couldn't look at it
11:25:04krux02yea, nimble is productivity killer.
11:25:27krux02I think it is great to define the build process and the tests in a nimscript file, but there sould be less magic.
11:26:18Araqwell the setup is actually really good, way better than before
11:26:26Araqif only it would keep the temporary files...
11:26:32Araqcan't be hard to fix this
11:26:37krux02especially when something went wrong
11:26:41Araqyup
11:27:08krux02dumping /tmp with crap isn't at all that bad.
11:27:56Araqit's /tmp, nuke it when you do a restart, don't care otherwise
11:43:46*nullnullnull joined #nim
11:43:59nullnullnullwhat's the easiest way to parse string to int?
11:45:32user0https://nim-lang.org/docs/parseutils.html#parseInt%2Cstring%2Cint%2Cint
11:45:49shashlickthe nims file should be in /tmp/nimblecache
11:46:19shashlickwhat's the error you are seeing?
11:47:33*deech joined #nim
11:49:30shashlick@krux02 ^^
11:49:37nullnullnull@user0, but mate, why I should put a new variable to parse int? isn't it a bit heavy?
11:50:45user0https://nim-lang.org/docs/strutils.html#parseInt%2Cstring
11:51:52*fjellfras_ quit (Quit: Leaving)
11:52:17nullnullnullok thanks mate ;)
11:52:47krux02shashlick: the error is this: http://ix.io/1R11
11:53:30krux02the problem is, the nims file is not in /tmp/nimblecache, it is deleted
11:53:36krux02I can't see it
11:54:07krux02and the error message is a bit sparse, I need context.
11:54:22krux02because in all local tests that I did, I had no problem with that variable.
11:55:27shashlickthe nims file is created once and stored in tmp, it gets copied into the project directory on every run since folks tend to refer to files and imports relative to project path
11:55:53krux02wherever it is, it is deleted.
11:55:56krux02I can't inspect it.
11:56:10krux02after the error message, the file is gone
11:56:46shashlickhttps://github.com/nim-lang/nim/blob/devel/lib/system/nimscript.nim#L194
11:57:54shashlickthere will be a /tmp/nimblecache/nimquery_hashvalue/ directory
11:58:00shashlickin that there should be an ini file and nims file
11:58:29shashlickalso, seems like you are calling the log() template in a place where it cannot be handled at compile time
11:59:54krux02I did not change the log template, I change the compiler to detect such illegal usages.
12:00:19krux02either my detection is wrong, or nimble was wrong all the time.
12:00:32shashlickokay then the problem is line 194 in nimscript.nim - what should it change into
12:02:20krux02all this file generation and file copying are weird complications. They should be removed from nimble.
12:02:54krux02in my opinion, nimble should be a package to import
12:03:11shashlickI agree - if Nim can allow changing relative, we can avoid this
12:03:16krux02then you build, `nim e mymain.nimble`
12:03:38krux02how about, ``cd``
12:04:03shashlickimport uses currentSourcePath
12:04:07shashlickSo that won't work
12:04:22krux02the entire file generation in /tmp ..., that is just a horrible idea to begin with. It makes everything harder to understand.
12:04:38krux02nimble files should just start with ``import nimble``
12:04:45shashlickAnything Nim specific won't work care for cwd
12:05:22shashlickThe way this is done is to avoid having to change every l nimble file out there
12:05:25krux02yea, I am not 100% sure how path handling works in Nim, especially the nim specific rules. But I have a feeling there is room for improvement.
12:05:44shashlickI'd prefer not doing it this way
12:06:11krux02I have done a few transitions until now.
12:06:16Araqthe rules are great and I spent months on them. I doubt you can suggest anything that won't be shouted down from me.
12:06:36shashlickI'm also overriding system procs so it brings its own workarounds
12:06:43krux02Araq: what rules do you mean?
12:06:52shashlickLook at nimscriptapi.nim
12:08:34krux02I would like to have a build process that, when I am looking at it I instantly see: "Ah that is what it is doing", for people who don't write build scripts.
12:08:42krux02Just some clean instructions and definitions.
12:09:23Araqwell I can't disagree with that, you used the word 'clean'.
12:09:41shashlickConsidering nimble now uses Nim externally, we could add some code into Nim to handle nimble files differently
12:10:03AraqI'm not sure it means anything though. Yeah, don't remove the generated nimscript file in /tmp, problem solved.
12:10:10shashlickThen just Nim e file.nimble will work
12:10:21krux02Not the horrible nightmare that I experienced in sbt for scala, wher they advertised with "it's just scala code", but they defined 100 operators all with their special meaning of dependency management and everything fully and purely functional, with it's own standard library to operate on those collections. As a scala developers I did understand nothing. It wis it's own super compicated lengauge, just to define the dependencies and tasks.
12:10:23shashlickThe file is in tmp, it is removed from the project directory after execution
12:10:59shashlickIt is only generated once and saved in tmp, copied over for each execution
12:11:13shashlickFiguring out the folder isn't easy if course
12:11:24shashlickCause I have to generate a unique name
12:11:32shashlickHence the hash
12:11:48krux02I would like to have a non copy files around solution.
12:12:27krux02I once suggested to have a module level macro. This would be a use case for it. You would just write a macro that does these imports and the last line.
12:12:38shashlickThen two ideas - one is to allow changing currentSourcePath - doesn't seem like Araq likes that
12:12:57Araqthis discussion is too early.
12:13:02Araqfix the problem.
12:13:04krux02I mean, nim is about metaprogramming, and then for build scrpits, the metaprogramming doesn't work? Why?
12:13:09shashlickAnother is Nim e nimble support which adds more nimble code into Nim - which isn't the general direction either
12:13:20Araqafterwards we can see what to change and where the real problem was.
12:13:35krux02ok
12:13:37Araqright now we're in lalala "all I want is simple, nice, clean" land
12:15:34krux02funny thing
12:15:47krux02nimble runs nim e --hints:off --verbosity:0 -p:/tmp/nimblecache /home/arne/proj/nim/nimquery/nimquery_10988.nims and it fails
12:15:57krux02I run that on the command line: no error
12:16:23krux02Araq: yes, I always want to be there.
12:16:30krux02I am working to get there though.
12:16:37FromGitter<mratsim> A language to define dependencies and tasks, that sounds like an interesting start for a task parallel scheduler :p
12:18:25Araqand let me say it again because shashlick is too modest: What he did was considered impossible by me. I thought using 'nim e' instead of importing the compiler won't work out.
12:20:44Araqofftopic, but important enough: https://thenextweb.com/security/2019/08/06/researchers-discover-troubling-new-security-flaw-in-all-modern-intel-processors/
12:20:53krux02an example, sbt introduces (and uses heavily) the operators <<= <+= <++=
12:21:19krux02those don't exist in the scala standard library. To be certain that it will confuse everybody.
12:21:45krux02they might seem familiar if you know tha haskell pattern of things, but scala is not haskell.
12:22:02krux02nimble also has it's own operators and special synax.
12:22:04krux02for example task
12:22:25Araqtask is a template like any other.
12:22:41Araqis 'withLock' also "its own special syntax"?
12:22:58Araqmakes no sense to me.
12:23:06krux02task introduces a new syntax to define a function.
12:23:11nullnullnulldam why so many var-types there, "type mismatch: got (string) but expected 'TaintedString = distinct string'"
12:23:15krux02Would it be so hard to use just the proc syntax
12:23:29krux02proc myTask(arg: string): void {.task.} = ...
12:23:51Araqwhy? because you never read any manuals?
12:25:13krux02depends
12:25:43*deech quit (Ping timeout: 268 seconds)
12:25:44Araqand how does {.task.} make it better anyway, how do you then describe its --help entry
12:25:56krux02doc comment
12:26:13Araqbut you have to learn this too then.
12:26:24krux02not really.
12:26:28Araqin this case the doc comment is then transfered to the command line
12:26:32Araqin other cases it's not.
12:26:45Araqthere is hardly any difference.
12:26:48Zevvnullnullnull: how do you mean "put a new variable"
12:27:08Zevvoh wait - old scrollback, nevermind me
12:27:41nullnullnullZevv, I need to get rid of that "taintedstring" it's from args :P
12:27:54nullnullnullparamStr(1)
12:28:24krux02when I have an interactive help window (the command line), what else should it print if not tho doc comment?
12:28:49Araqhttps://gist.github.com/Araq/8f79e6a5448817281e367eb4c44846c8 this is the orginal implementation of 'task'
12:28:52Zevvnullnullnull: just string() or .string it
12:28:58Araqif you can't see the beauty in that, then so be it.
12:29:19nullnullnullZevv, btw how can I convert from string to taintedString? (the opposite way)
12:29:53Zevvnullnullnull: TaintedString(x)
12:29:54Araqbut it's objectively a tiny design. Much less code than your .task macro would be.
12:30:02nullnullnullZevv, thanks mate ;)
12:30:10Zevvhttp://ix.io/1R1c
12:31:03krux02Araq: I don't see the beauty in it.
12:32:19shashlickThanks Araq
12:32:24krux02anyway, I can't reproduce the problem when I just copy paste the command that nimble prints.
12:32:29shashlickGot to go now, later
12:33:31nullnullnullZevv, after I converted it, still shows the error: "Error: type mismatch: got (string) but expected 'TaintedString = distinct string'"
12:33:55nullnullnullTaintedString(paramStr(1))
12:33:58krux02never mind, my bad, got it
12:34:33*laaron- quit (Remote host closed the connection)
12:38:23*laaron joined #nim
12:43:30*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
12:44:12*laaron joined #nim
12:51:13*xet7 quit (Remote host closed the connection)
12:51:48*laaron quit (Remote host closed the connection)
12:52:48*xet7 joined #nim
12:53:48*laaron joined #nim
12:59:03*user0 quit (Quit: user0)
13:00:58lqdev[m]shashlick: I tried compiling taudio on a VM again, using 3 different compilers and each time it throws the same error http://termbin.com/p9t3
13:01:24lqdev[m]I'm already so frustrated with windows I might resort to using these damned dlls.
13:05:47*solitudesf joined #nim
13:07:33Zevvnullnullnull: can you dump your complete code somewhere in a pastebin so I can take a look?
13:13:36*tjmac left #nim ("-bye")
13:19:43lqdev[m]I give up. time to wrap sokol_audio
13:19:44lqdev[m]
13:21:30lqdev[m]at least it should go really smoothly since the library is only 1 header, also it provides all the features I'll ever need
13:21:53Zevvhmm does anyone know what the error message "Error: the field 'data' is not accessible" might be caused by, I'm not doing anything with objects with a field called 'data', but I might be doing invalid things with macros and quote do and consts...
13:22:13*shomodj joined #nim
13:27:21nullnullnullZevv, https://pastebin.com/LcgvXdUz
13:27:43nullnullnullit's about the taintedstring thing
13:27:57nullnullnull"type mismatch: got (string) but expected 'TaintedString = distinct string'"
13:28:45ZevvparamStr() is of type TaintedString, and your code converts this to a TaintedString
13:29:08Zevvtry http://ix.io/1R1E
13:29:08nullnullnullhmm but strange why I get this error, it's from the same type
13:29:27Zevvconnect takes a string, not a taintedstring
13:29:36nullnullnullhmm
13:30:09Zevvthe taintedstring stuff feels a bit cumbersome, but it is for a good reason. It makes your sit on your hands and think before your type when handling string data from a potentially unsafe source.
13:30:58nullnullnullbtw got the same error with string(paramStr(1)
13:31:03nullnullnull)
13:31:11Araqthe taintedstring is usually disable and taintedstring is just an alias for string
13:31:17Araq*disabled
13:31:29nullnullnullyes I used this --taintMode:on
13:31:30leorizetaintedstring is enabled by default actually
13:31:47leorizeor maybe not :P I haven't got bumped by this for a while so...
13:32:41*endragor quit (Remote host closed the connection)
13:33:00nullnullnullthis is the full error line: "lib/nim/pure/net.nim(1252, 10) Error: type mismatch: got (string) but expected 'TaintedString = distinct string'"
13:33:29leorizethat's weird
13:33:54leorizeanyhow, here's the fix https://play.nim-lang.org/#ix=1R1I
13:33:56nullnullnullmaybe I need to put it into variable?
13:34:46nullnullnulloh same error with .string
13:36:09nullnullnullwait I think I know what could be
13:36:10nullnullnullsec
13:36:16nullnullnullI have this line: from strutils import parseInt;
13:36:56nullnullnullah no, the same error :|
13:37:26leorizecan you dump the entire code to the playground?
13:37:29FromGitter<Vindaar> what nim version are you using? and can you paste the full code you're trying to run + how you compile it?
13:37:34nullnullnullsec
13:38:29Zevvnullnullnull: complete and working: http://ix.io/1R1J
13:38:56Zevvyour are bitten by the horrendous choice of having 2 'parseInt()' implementations in the stdlib
13:39:44nullnullnullhttps://pastebin.com/k0YuBvF4
13:40:13nullnullnullZevv, but I think the error is on the string, not the int
13:43:10nullnullnullif i disable the taintedmode it will "compile" but will not work properly
13:44:30FromGitter<Vindaar> if I fix line 3 and 8 it also compiles fine with taint mode on devel
13:45:13leorizenullnullnull: can you try your code on the playground?
13:45:18leorizethere's a share button there
13:45:37nullnullnullsec
13:47:18nullnullnullhttps://play.nim-lang.org/#ix=1R1S
13:52:53*laaron quit (Remote host closed the connection)
13:56:04*laaron joined #nim
14:03:26*user0 joined #nim
14:04:48*gokr joined #nim
14:04:51*gokr_ quit (Ping timeout: 248 seconds)
14:06:01nullnullnullstrange, I removed everything related to args and parsing , but still getting that error
14:06:05nullnullnullwhat happened here sec
14:06:35leorizenullnullnull: that code is running on the playground
14:06:44leorizeso... what's your nim version?
14:07:02leorizealso, you can import multiple modules in one statement, no need for the `;` nesting
14:07:20nullnullnullmaybe it's something related to this lib/nim/pure/net.nim(1252, 10)
14:07:27nullnullnullbut why
14:07:48leorizewhat's your Nim version?
14:07:49leorizerun nim -v
14:08:00nullnullnullNim Compiler Version 0.17.2 (2018-02-05) [Linux: amd64]
14:08:06Araqmaybe it's just a stdlib bug since we don't use --taintMode:on
14:08:13Araq0.17.2?!
14:08:20nullnullnullyes mate
14:08:25Araqyou're my hero
14:08:33nullnullnullme? :P
14:08:38Araqyep. :D
14:08:43leorizeyou're running a 2 yrs old Nim
14:08:46nullnullnullit's a heroic version?
14:08:50nullnullnulloh
14:09:16nullnullnullbut wait i installed this from ubuntu
14:09:22nullnullnullapt-get install nim
14:09:25nullnullnullsomething like that
14:09:40federico3sure, but from an older Ubuntu release
14:09:56user0This is why installing from choosenim should be encouraged
14:09:57federico3https://launchpad.net/ubuntu/+source/nim
14:09:58nullnullnulloh
14:10:01leorizefederico3: do you have a ppa for old ubuntu releases?
14:10:19federico3why a ppa?
14:10:28nullnullnullbut wait , I wanna stay a hero
14:10:36nullnullnulllet me fix this bug first :P
14:10:40federico3user0: no thanks
14:12:04leorizefederico3: some people want/have to use old Ubuntu versions
14:12:11leorizea ppa would help (i think)
14:12:34nullnullnullbut I dont think it's about old version of nim (that error)
14:13:03federico3leorize: no, that's what snapshots is for https://snapshot.debian.org/package/nim/
14:13:41nullnullnullok u know what , i will install it and see
14:13:45nullnullnullmaybe im missing some files
14:13:55Araqwe also have nightly builds with Linux binaries
14:14:02leorizenullnullnull: you should use a newer version anyway
14:14:15leorizethere's a fair share of breaking changes over the years
14:14:59nullnullnulldamn
14:15:01nullnullnullit worked!
14:15:04nullnullnullwtf :|
14:15:11nullnullnulli was missing some files there
14:15:36nullnullnullthanks guys ;)
14:17:50*nullnullnull quit (Remote host closed the connection)
14:18:14*nullnullnull joined #nim
14:27:52*clyybber quit (Quit: WeeChat 2.5)
14:28:13*endragor joined #nim
14:32:51*endragor quit (Ping timeout: 258 seconds)
14:44:27FromGitter<Vindaar> ha, funny. While searching a specific commit, I just stumbled on this: https://github.com/nim-lang/Nim/commit/40c5509a02c74740e020336708c3f26c838e36f7 ⏎ Been fixed only recently
14:49:49Araqis --taintMode:on popular?
14:50:13Araqwe could enable it per default but I only found it annoying
14:51:54FromGitter<Vindaar> I like the idea of it, but for the stuff I write it falls into the "annoying" category too
14:52:55Araqin practice output validation works much better, have a typesafe SQL/HTML tree that always quotes your strings
14:54:13*gokr quit (Ping timeout: 246 seconds)
14:54:15*gokr_ joined #nim
15:05:19*nsf quit (Quit: WeeChat 2.4)
15:05:56FromDiscord_<Kiloneie> How did you guys find out about Nim btw ?
15:06:26leorizefree pascal forum :p
15:07:10leorizethere were a lot of noises about Nim being the better pascal there
15:07:41Araqoh? I've only seen the usual FUD
15:07:48FromDiscord_<Kiloneie> I found it by googling Python alternative and found this page: https://www.slant.co/options/110/alternatives/~python-alternatives
15:08:20FromDiscord_<Kiloneie> and seeing the like to dislike ratio and pros vs cons, and the language syntax, instant, welp that's mine O,O
15:08:43FromDiscord_<Kiloneie> it's also top in this category: https://www.slant.co/topics/5984/~productivity-enhancing-well-designed-and-concise-rather-than-just-popular-or-time-tested-programming-lang
15:09:04*user0 quit (Quit: user0)
15:11:24leorizeAraq: well I've found some of the mentions while scraping the mailing list to deal with all the problems I was having with fpc's generics
15:22:20Araqwell generics are hard ;-)
15:23:05Araqand Nim was written with them in mind and yet we got them pretty much wrong. but at least they are usable for containers which is what matters most
15:31:00Araqand they have no runtime indirections ;-)
15:31:48*endragor joined #nim
15:35:53*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
15:36:54*laaron joined #nim
15:38:42*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:39:21*floppydh quit (Quit: WeeChat 2.5)
15:54:29shashlick@lqdev - do you think you need c++ mode
15:54:55lqdev[m]likely not
15:56:55rayman22201@shashlick: just catching up. Regarding channels. I misunderstood the context. I understand now. Thanks for the clarification 👍😁
16:00:54shashlickNp
16:01:25shashlickAm going to try @Shield suggestion and use alloc + pointers
16:01:28shashlickWon't be able to use any Nim objects which is sad
16:01:42shashlickI might make a poor man's alloc based object
16:02:19shashlickLike SharedSeq
16:02:29leorize[m]make your own shared_ptr and unique_ptr then
16:05:23rayman22201I wonder if you can solve it with some set of procs to change gc ownership. Gc_unref from gc A. Pass the now non-gc-ref to a proc owned by gc B, and gc_ref there.
16:07:09rayman22201The idea of two gcs on a single thread just seems like asking for trouble either way. 😕
16:07:27shashlickCool ideas
16:07:27Araqyou can't change "ownership" between different heaps
16:07:45shashlickWell the object really belongs to the main exe
16:07:49Araqit's fundamentally impossible, which is why --newruntime abandons the idea
16:07:53shashlickThe dlls should be able to modify
16:08:03shashlickBut ya the dll gc will have no clue
16:08:53Araqwhat you can do: var x: array[100, MyObject] and use fixed size arrays for everything :P
16:09:18Araqyou would be surprised how far you can get with it, old Pascal worked this way
16:09:30Araqand I maybe Cobol still does.
16:09:33shashlickBut won't changing the fields still involve the gc
16:09:38shashlickStrings
16:09:54AraqString --> array[30, char] :P
16:16:18shashlickNo what if an object has a string field, it will still be managed by the gc right?
16:16:29shashlickSo I'll have to make an object with array fields
16:19:51Araqexactly
16:20:45FromDiscord_<Kiloneie> if a procedure creates a sequence, then adds new elements to it in a loop, can you access those from outside the loop ?
16:22:55Araqyou can't add elements unless it's 'var'
16:23:44shashlickOk I have an option now
16:27:45nullnullnullbtw guys, is there any performance improvement if i import part of "os" instead of "import os;"?
16:29:26Araqno
16:30:00FromDiscord_<Kiloneie> it should be in compilation a bit no ?
16:30:28FromDiscord_<Kiloneie> or do you actually need to use a procedure from imported module ?
16:30:31Araqyou won't be able to measure it
16:30:54FromDiscord_<Kiloneie> insignificant then
16:31:17FromDiscord_<Kiloneie> would it be measurable if you imported all of Nim's modules though ? or stll no ?
16:31:47nullnullnullhmm
16:32:09Araqthat's a different question.
16:32:09nullnullnullso why they made that thing if it's not doing anything
16:32:42Araqimport os vs from os import copyFile # hard to measure
16:32:45nullnullnulllike what's the difference between importing os; and "from os import paramStr;"
16:32:56Araqimport os, strutils, tables, .... # adds up
16:34:03Araqnullnullnull: the difference is what you have in scope afterwards.
16:34:14nullnullnullmaybe bigger file? or more memory
16:34:27nullnullnullcompilation or something
16:34:46shashlickThe code still needs to be read
16:35:31nullnullnullim imagining it like reading the whole library vs reading a function from library
16:35:43nullnullnullloading*
16:35:57FromGitter<alehander42> It has nothing to do with filed because of dead code elimination
16:36:03FromDiscord_<Kiloneie> so in a really big program where you use a few procedures from idk, every module, you would want to include only those procedures right ?
16:36:50FromGitter<alehander42> It's mostly because when you analyze code it's easier when only the functions you use are explicitly imported
16:37:42FromGitter<alehander42> And sometimes also because functions from different modules might both match :same name and types
16:37:47Araqjust use what you like more
16:38:06Araquntil you understand the differences and grow an opinion on this issue
16:38:24disruptekthis.
16:38:58AraqI often start with 'from os import stuff' and then if the list grows I don't want to maintain it further and do 'import os'
16:40:02Araqand has no difference on the binary size or runtime speed and the compile-time difference will get even smaller with IC.
16:41:17FromDiscord_<Kiloneie> best left for after the program is finished
16:45:27*endragor quit (Remote host closed the connection)
16:45:40leorizeI usually do `import` then if too many symbols collide I switch to `from import` or `import except`
16:45:53*endragor joined #nim
16:47:09shashlickI like the new hint when an import isn't used
16:47:12shashlickVery nice
16:50:04*endragor quit (Ping timeout: 246 seconds)
17:04:29FromGitter<mratsim> I agree, super useful for large projects
17:30:26Zevvhmm, how can I pass a generic pointer/length combo as openArray?
17:33:25Zevvis toOpenArray() with UncheckedArray[] the way to go?
17:34:03leorizeyea
17:34:11leorizeit's added precisely for that reason iirc :P
17:37:13Zevvsweet, like a charm
17:37:34Zevvnpeg can now parse zero-copy through memfile
17:37:50leorizenice
17:37:50*kungtotte quit (Read error: Connection reset by peer)
17:38:37*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:38:42ZevvI got most of my wishlist, but I'm still stuck with unwilling macros to make stuff composable.
17:39:05rayman22201That's very awesome! congrats @zevv
17:39:53shashlickZevv: why does npeg use prefix mode
17:40:08Zevvbecause nim syntax does not allow suffixes
17:41:06ZevvI could just parse pegs from strings, but I wanted to define grammar as valid Nim so that grammar and nim code can be freely mixed.
17:42:14*laaron joined #nim
17:42:22FromGitter<mratsim> there is the postfix *
17:42:43Zevvis there?
17:42:57rayman22201@shashlick, did you see my choosenim bug report from yesterday?
17:43:10rayman22201or maybe I should ping @Dom96?
17:43:27rayman22201idk who is more active on it atm.
17:44:11shashlickI didn't see it
17:45:23FromGitter<mratsim> it’s the one for proc foo*(x: int): int
17:45:27shashlickYou posted two
17:45:37rayman22201I did. one is more of a feature request
17:46:39rayman22201the real bug is https://github.com/dom96/choosenim/issues/129
17:46:49rayman22201might also be a nim bug? I'm not sure.
17:47:01rayman22201Should the latest nim devel work with Mingw 4.9.1?
17:49:36*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:49:51Zevvmratsim: true, but that's the odd one out
17:49:52shashlickI thought it installs 630
17:50:43*laaron joined #nim
17:51:56rayman22201could be my environment? I did a fresh install and still got 4.9.1
17:53:52rayman22201I was looked through the code (very briefly), and it looked like it might not re-download if it finds the zip file already exists. Maybe It saw the the old version mingw from the old choosenim I had, and re-used that?
17:54:52rayman22201if that is the case, it is still a bug, but a caching bug.
17:55:04shashlickCould be ya
17:55:12leorize@mratsim that one is a special token, only in specific places would the compiler parse that
17:55:15shashlickBut 630 is what is been for a long time
17:55:29leorizeiirc someone tried to write a macro that make use of that but got refused by the compiler
17:55:44rayman22201I had a very old version of nim on my windows box. I hadn't used nim on windows for a long time.
17:58:47rayman22201possibly related, possibly not, but I had to re-install libcrypto after I changed mingw versions (which nimble requires, but windows doesn't necessarily come with).
18:00:55rayman22201I think choosenim should probably install libcrypto on windows if it is also going to install mingw.
18:01:35FromGitter<mratsim> @leorize: someone —> you? :P
18:02:31*gokr_ quit (Ping timeout: 246 seconds)
18:06:55FromGitter<mratsim> @Araq, I’m writing your old concurrency blog posts, are they still relevant, btw i guess the “shared” annotation never made it to the language right? (https://nim-lang.org/araq/concurrency.html and https://nim-lang.org/araq/concurrency2.html)
18:17:21rayman22201@shashlick check this out. I just tried a fresh install again. I still get Mingw 4.9.1 https://www.irccloud.com/pastebin/6wzppGsQ/
18:18:21rayman22201and it shows it downloading a fresh copy of mingw
18:18:31rayman22201so it's definitely getting the wrong version somehow
18:19:00rayman22201Does anybody else have a windows machine that they can verify it's not just me?
18:23:37rayman22201I figured it out. The hard coded link here is wrong: https://github.com/dom96/choosenim/blob/master/src/choosenim/download.nim#L17
18:23:49rayman22201it should be https://nim-lang.org/download/mingw32-6.3.0.7z
18:24:12rayman22201so that is real bad for people who want to use choosenim on windows lol
18:33:11rayman22201First time I created a PR completely from the web lol. Using only the github UI. :-P https://github.com/dom96/choosenim/pull/132
18:42:30*rockcavera quit (Ping timeout: 268 seconds)
18:43:21*rockcavera joined #nim
18:43:21*rockcavera quit (Changing host)
18:43:21*rockcavera joined #nim
18:52:37Araqmratsim: yes. 'shared' is the wrong idea.
18:58:55Araqthe lock levels and .guard are still quite good and once the heap is not shared anymore we can use them way more often :P
19:04:03*gangstacat quit (Quit: Ĝis!)
19:08:02*nsf joined #nim
19:09:27*huuskes joined #nim
19:24:00FromGitter<zacharycarter> shashlick: I'm working on that macro for NimScript - nimLUA is giving me a good starting point
19:35:52shashlickExcellent
19:36:07*nsf quit (Quit: WeeChat 2.4)
19:36:27shashlick@rayman22201 I need to update 630 to 810 on the web and CI as well
19:36:52shashlickWill be good to have a way for choosenim to detect rather than have to hard code
19:40:22FromGitter<Varriount> mratsim: I don't suppose you've done any work on perfect hash algorithms, have you?
19:40:50FromGitter<Varriount> Araq: I thought the heaps were already seperate, due to GC complications?
19:44:05rayman22201@shashlick: understood. My PR is a quick fix, because right now choosenim is completely broken on Windows.
19:48:08rayman22201Is the plan to keep hosting our own copy of mingw? Is there a reason choosenim can't grab it from the mingw servers directly?
19:48:31rayman22201I never understood why Nim mirrored it's own copy.
19:50:54FromDiscord_<treeform> So that it does not go away for some reason?
19:51:04FromDiscord_<treeform> I mirror everything...
19:56:04rayman22201Sure, but are you also maintaining a code distribution tool used by a (relatively) large community? It's a cost benefit analyses.
19:58:14rayman22201Mingw is unlikely to go away, it's a big project. Much bigger than Nim.
20:07:54rayman22201Let me put my comment in a different way. Choosenim is broken because of a hardcoded link that was not updated and not properly version labeled. Choosenim must get smarter with regards to checking the mingw version. But, If we choose to mirror, the mirror must also get smarter, or at least more organized about version labels.
20:07:57rayman22201Or, we can take advantage of that fact that Mingw has done this organization already, and just link there.
20:09:01*gangstacat joined #nim
20:09:22leorize[m]rayman22201: I think it's more of being a tested mingw version than mirrored
20:10:12rayman22201We can make choosenim download the tested version from mingw. It doesn't have to come from a nim server.
20:11:22rayman22201I understand the "tested version" concept. That's fine. I don't have a problem with that. But who cares where it gets downloaded from?
20:13:01rayman22201Mingw 6.3.0 is the minimum required version. If I download MinGW 6.3.0 from the Nim servers or from github, or from joeschmoe.net, who cares? as long as the checksum matches and it works.
20:13:48leorize[m]true
20:13:51rayman22201I understand the point about servers going away. There is a reason for corporate code mirrors. But I just think it's too paranoid in this particular case.
20:14:33rayman22201and it will save an already small team of developers a lot of work to not mirror.
20:15:04leorize[m]not that choosenim ever checked the checksum :p
20:15:13rayman22201that's another story lol
20:15:58leorize[m]to be fair it's not that complicated to mirror
20:17:40leorize[m]I'm more concerned about how are the dlls produced
20:17:46Araqwe mirrored because the original mingw it uses freaking sourceforge with always changing links and a super confusing structure
20:17:53disruptekthere was probably a point in time when specific versions mattered.
20:18:41rayman22201Meh. Fair enough. I'm just mad about choosenim being broken in such a stupid way. We need to do better.
20:19:30Araqhow was it broken? *our* download links never change
20:20:06Araqlooks to me choosenim doesn't use our mirror and that's how it got broken...?
20:20:34rayman22201Nim devel no longer works with mingw 4.9.1 but the hardcoded link still points to that version
20:21:04*deech joined #nim
20:21:43rayman22201Is the mirror not https://nim-lang.org/download/mingw32-6.3.0.7z?
20:21:58dom96rayman22201, choosenim cannot extract 7z files
20:23:18leorize[m]it's weird, fwiw 4.9 were what devel was being tested against
20:23:37rayman22201@dom96 Shit. I forgot about that. Well that's even worse.
20:24:01leorize[m]I only adjusted it to 6.3 recently as that's what everyone will get from the homepage
20:24:05rayman22201Is Nim cpp being tested? It's coo mode that is broken specifically
20:24:35rayman22201Nobody who uses choosenim will get the correct version. I just tested this. Twice.
20:25:01leorize[m]no, cpp is being tested on osx exclusively
20:25:06leorize[m]which uses clamg
20:25:26leorize[m]clang*
20:25:27rayman22201There you go. That is probably why the bug wasn't found.
20:25:36Araqshrug. Not my bug. I didn't write choosenim and said "fuck you koch.nim & finish.nim, I can't be bothered to read Araq's code"
20:25:46dom96wow
20:27:49leorize[m]the test matrix should probably be expanded a bit
20:28:21leorize[m]but then there aren't many parallel jobs to begin with
20:36:56*Vladar quit (Remote host closed the connection)
20:38:44krux02dom96, I just realized you are around
20:39:03krux02I could really need your help with nimble, because I am dealing with your code right now
20:41:08dom96sure, feel free to ask questions
20:42:16krux02it not really just a question I need to resolve a problem and you know the architecture.
20:44:12krux02I just wrote on github that I have a problm with my pr, where nimble causes problems.
20:48:12*nullnullnull quit (Quit: Leaving)
20:48:50*laaron quit (Remote host closed the connection)
20:50:41*laaron joined #nim
20:54:05*shomodj joined #nim
21:05:12*Kaivo quit (Quit: WeeChat 2.5)
21:10:09rayman22201Can someone with access to the nim-lang.org website please update http://nim-lang.org/download/mingw32.tar.gz to point to the newer version of mingw?
21:20:56shashlickI really need to get nimarchive working so that choosenim can extract 7z
21:24:02Araqall you need to do is to copy code from finish.nim and ship 7z.exe
21:24:54Araqthere is also code in there to set the PATH variable
21:25:46Araqand code that creates a start menu entry
21:36:42*Jesin quit (Quit: Leaving)
21:46:52dom96Araq, but then you'd be d-uuuu-ppplicatinggggg codeeee :P
21:47:24Araqduplicated code is still better than broken code
21:47:30Araqor missing code
21:48:03Araqand you could patch finish.nim, make it importable as a module and import it from choosenim
21:48:12Araqbut I'm not even asking for that...
21:49:21*Jesin joined #nim
21:49:50dom96Araq, very true
21:53:02dom96on the other hand, you could also just update the .tar.gz
21:53:07rayman22201this is all great, but it will take 5 minutes to change the .gz file on the server, and it will make choosenim work right now :/
21:54:05rayman22201@shashlick can you refresh my memory. what is broken with nimarchive right now?
21:55:37dom96rayman22201, is this something you want for your own use?
21:56:02rayman22201mostly just curious.
21:56:24dom96rayman22201, I mean the change in mingw
21:57:09rayman22201I just built nim manually already. Now it's just the principle of it :-)
21:58:08dom96nothing stops you from installing your own mingw btw
21:58:15dom96choosenim only downloads it if it's missing
21:58:15rayman22201I did that too
21:58:32rayman22201That is how I figured out that was the problem.
21:59:02Araqrayman22201: I'm willing to login *now* if you can give me instructions that treat me as amoeba
21:59:14Araqas it's late here :P
21:59:33rayman22201hahaha. Amoebaraq, a new species :-P
22:00:46Araqhttps://youtu.be/dGareAFJ1qc?t=50
22:00:58Araq^ like that
22:01:15dom96This seems like a good thing to invest into: https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/
22:01:21rayman22201lol
22:02:23Araqwell?
22:03:36rayman22201the steps are. 1. Unzip the 6.3 version. 2. Re-zip the 6.3 version as a .gz 3. upload the .gz to the server
22:03:51rayman22201I'm trying to see if I can do step 1 and 2 for you and just send you the file
22:03:54rayman22201give me 5 minutes
22:10:46*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:11:47FromGitter<zacharycarter> if I have a compile time proc that takes in an argument, and inside that proc I generate and call a macro - how can I pass that argument as a parameter to the macro?
22:12:03FromGitter<zacharycarter> in the macro invocation that I generate
22:12:55deechWhat editor are Nim compiler devs using? Emacs doesn't seem to work well ...
22:14:07FromGitter<zacharycarter> VSCode if you can stand electron
22:14:20FromGitter<zacharycarter> if you want a modal editor I think people use neovim with nvim or something
22:14:24FromGitter<zacharycarter> krux02 uses emacs
22:15:16*ng0 quit (Quit: Alexa, when is the end of world?)
22:17:10rayman22201and extracting is taking forever....
22:18:12FromGitter<zacharycarter> I figured I just needed to do `bindSym`
22:18:41FromGitter<zacharycarter> but if I use `bindSym` with the NimNode itself - I get the error: `cannot evaluate at compile time: tn`
22:18:55FromGitter<zacharycarter> and if I do it with `bindSym("tn")` nothing seems to happen
22:20:40FromGitter<zetashift> @deech I also switched to vscode, nim support is really nice here. Emacs was great but Nim support is okay-ish and my elisp-fu is too weak to contribute :(.
22:20:52FromGitter<zacharycarter> hmm I think I may have figured out a way to make it work
22:23:07*nif quit (Quit: ...)
22:23:16*nif joined #nim
22:25:12*aq60 joined #nim
22:25:46rayman22201@Araq: http://www.filedropper.com/mingw32tar
22:25:52aq60Hi, one question: can you use ref with the new runtime?
22:25:54deech@zetashift, Emacs seems to work ok for non-compiler Nim dev, completion etc. is more or less ok. It falls apart on the compiler code itself. I'll try VSCode.
22:27:28rayman22201@aq60 yes (might need to add owned ref annotation to places, but yes)
22:27:33aq60This is the error: type mismatch: got <ref MyType>but expected one of:proc new[T](a: var ref T; finalizer: proc (x: ref T) {.nimcall.})
22:27:58rayman22201what is the code that caused the error?
22:28:03FromGitter<zacharycarter> still can't get this to work bleh
22:28:10*solitudesf quit (Ping timeout: 246 seconds)
22:28:41aq60well, I have var r: ref MyType
22:28:49aq60new r
22:29:14*shomodj joined #nim
22:29:30rayman22201@aq60 that's not how new works
22:30:01rayman22201you do `var myR = new r`
22:30:49aq60it works with the old runtime, with linked list, iterators, no errors, the data is ok
22:31:13aq60ill check it out now
22:31:35rayman22201you haven't shown any real code snippets, so I don't know enough to help you
22:32:22rayman22201actually, I made a mistake. it should be "var myR = new MyType"
22:33:03rayman22201that' is your problem. the `new` function takes a type, you are passing a pointer.
22:34:11rayman22201`var myR` in my example will be inferred to be of type `ref MyType`
22:35:10*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:37:01aq60let me check it quickly, i'd give you the example
22:37:52*shomodj joined #nim
22:40:53*laaron quit (Remote host closed the connection)
22:41:44aq60now i have: `if condition: new myR`
22:41:52aq60it works like that
22:42:25aq60i have to instance it in the 'if' block
22:43:08*laaron joined #nim
22:43:09rayman22201new myR is wrong. it should be new MyType
22:44:02rayman22201If the condition works, it's probably because it's not being evaluated. But that should not work either.
22:45:39rayman22201new is sugar for a function that takes a type. it can be written as `new[Type]()`. you are essentially writing `new[myR]()` which makes no sense.
22:54:57aq60there is the simplified example: https://play.nim-lang.org/#ix=1R5k
22:58:21FromGitter<zacharycarter> how would I do: `for item in seq[1..^]: ...`
23:01:02aq60for item in 0 ..< seq.len(): ... ?
23:02:32FromGitter<zacharycarter> I want a slice of 1 to len - 1
23:02:42FromGitter<zacharycarter> that would give me an integer
23:02:57FromGitter<zacharycarter> I want an item from the sequnce
23:03:01*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:03:16FromGitter<zacharycarter> I mean yes I can index the seq - but if there's a shorter way like what I described, I'd rather do that
23:03:47rayman22201@aq60: it should be like this: https://play.nim-lang.org/#ix=1R5o
23:04:10rayman22201also, just fyi, the convention is that types should start with a capital letter.
23:06:28rayman22201@zacharycarter, the items iterator doesn't let you specify the range. I think you have to index it by hand.
23:06:44FromGitter<zacharycarter> gotcha - thanks rayman, that's what I figured
23:06:56FromGitter<zacharycarter> alternatively I could create a slice but that's more verbose
23:07:24rayman22201You could also create your own iterator that takes a range :-P
23:15:00aq60tnx rayman22201
23:15:18rayman22201np :)
23:15:33aq60i had to comment one line to compile, but it works with the newruntime too
23:15:49*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
23:16:03rayman22201🎉 awesome!
23:19:06*krux02_ joined #nim
23:19:49FromGitter<mratsim> For those still awake, here is a draft of the RFC I will submit for Nim’s multithreading runtime. https://gist.github.com/mratsim/f1cb710b640e7a4cf8ba5f22ee34ab7b ⏎ ⏎ I’m going to sleep, too tired.
23:20:50*laaron joined #nim
23:21:00FromGitter<mratsim> need to generate the table of contents and do some formatting
23:21:26FromGitter<zacharycarter> https://play.nim-lang.org/#ix=1R5r
23:21:31FromGitter<zacharycarter> can someone help me with this template?
23:23:05*krux02 quit (Ping timeout: 268 seconds)
23:24:42*PrimHelios joined #nim
23:25:20FromGitter<mratsim> easy, don’t use strings :p
23:25:32*PrimHelios_ quit (Ping timeout: 272 seconds)
23:25:37FromGitter<zacharycarter> well - I start with a string
23:25:47FromGitter<mratsim> or use a macro that accepts static string and creates an ident from it
23:26:00FromGitter<zacharycarter> the string will not be static
23:26:06FromGitter<zacharycarter> as it's coming from a PNode from the VM
23:26:37*Jjp137 quit (Ping timeout: 246 seconds)
23:27:00FromGitter<mratsim> but it’s known at compile-time right?
23:27:13FromGitter<mratsim> you can reuse the examples I put in this thread: https://forum.nim-lang.org/t/5000#31345
23:27:15FromGitter<zacharycarter> I guess so
23:27:33FromGitter<zacharycarter> thanks I will check that out
23:27:52FromGitter<mratsim> for “runtime” dynamism
23:28:07FromGitter<mratsim> of if compile-time, just use untyped parameter
23:28:36FromGitter<mratsim> and pass setField(myObject, bar, footer)
23:28:48FromGitter<mratsim> setField(myObject, bar, foobar)
23:28:57FromGitter<mratsim> without the “” for strings
23:29:02*Jjp137 joined #nim
23:29:08FromGitter<mratsim> this way it’s an ident, and the template will inject it
23:30:44*couven92 quit (Quit: Client disconnecting)
23:30:47FromGitter<zacharycarter> well - that's not going to work in my scenario but I'll see if I can use a macro to create an ident
23:30:56krux02_deech: I use emacs regularly on the compiler. But I disabled nimsuggest, too much frustration with it.
23:32:45krux02_rayman22201, About types to start with capital letter: I even went so far and said in emacs everything that starts with a capital letter is a type. It's incorrect, but for anything except constants it works
23:33:12rayman22201lol. good enough
23:33:23FromGitter<bevo009> I was just reading the earlier discussion about imports ⏎ So is this macro that makes you use qualified names a bad or useless idea? :) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d4cb1432612bb718c3417d0]
23:33:42*stefanos82 quit (Quit: Quitting for now...)
23:34:12*nif quit (Quit: ...)
23:34:20*hogeland quit (Remote host closed the connection)
23:34:21*nif joined #nim
23:34:32aq60Why its so important for types to start with capital lettter?
23:34:59disruptekit helps their self-esteem.
23:35:29*shomodj joined #nim
23:36:41FromGitter<zacharycarter> meh - I think I'm going to give up on this macro
23:36:52rayman22201@a60 it's just the convention: https://nim-lang.org/docs/nep1.html
23:38:54rayman22201@aq60 even
23:42:45*arecaceae quit (Remote host closed the connection)
23:43:09*arecaceae joined #nim
23:43:41krux02_aq60, it is not important to start types with capital letter. Many types in system don't start with capital letter, e.g. int float string seq set
23:43:57FromDiscord_<Kiloneie> Can someone help me with this code: https://play.nim-lang.org/#ix=1R5s
23:43:57FromDiscord_<Kiloneie>
23:43:57FromDiscord_<Kiloneie> I don't know how to do this with objects
23:43:58krux02_but it helps to see that an identifier is a type
23:45:18krux02_Kiloneie: well, you search for an object with age: 0
23:45:24krux02_default initialization
23:45:32krux02_even if you don't write it is is there
23:50:44aq60@krux02 one thing I'm not fond of in Nim is the 576 different ways to do things
23:51:04krux02_yea me neither
23:51:05aq60for ex. instantiation
23:51:15krux02_what instantiation?
23:51:27krux02_with instantiation I don't have a problem.
23:51:28aq60instancing, sry
23:51:48krux02_can you give an example?
23:53:30aq60for ex. this: https://play.nim-lang.org/#ix=1R5o and this https://play.nim-lang.org/#ix=1R5k
23:54:28aq60both fill the data, the second example doesnt work with newruntime
23:54:57rayman22201@kiloneie: try this https://play.nim-lang.org/#ix=1R5u
23:55:02*lritter joined #nim
23:55:36krux02_aq60: we had a discussion recently about exactly this, thanks for giving the same feeding, that pushes it up on my priorities list.
23:56:10krux02_basically the consesuls was the deprecate the ``new value; value.x = 123`` approach
23:56:46krux02_it is very confusing for people who come from languages where ``new`` works differently ``all langages I can think of``
23:56:59aq60yes it is :)
23:57:05rayman22201@aq60 Krux02_, I personally think it should always be `new Type`, `new value` is a bug.
23:58:18FromDiscord_<Kiloneie> rayman thank you !
23:58:54krux02_I wouldn't call `new value` a bug, as it clearly works. But yes it is redundant, and confusing.
23:59:21rayman22201I consider confusing and redundant to be a bug :-P
23:59:26rayman22201a human bug