<< 14-07-2020 >>

00:04:57*lritter quit (Quit: Leaving)
00:13:04FromGitter<sealmove> https://play.nim-lang.org/#ix=2rzp
00:19:01FromGitter<sealmove> static context, hmm ok I get it now, it works :)
00:22:35FromGitter<ynfle> https://play.nim-lang.org/#ix=2rzr
00:22:39FromGitter<ynfle> Oh ok
00:32:06*Shucks quit (Quit: Leaving)
00:32:37*xet7 joined #nim
00:42:14*Cthalupa quit (Ping timeout: 240 seconds)
00:48:23*Cthalupa joined #nim
00:51:36*vicfred_ quit (Quit: Leaving)
00:51:56*vicfred joined #nim
00:58:54*rockcavera quit (Read error: Connection reset by peer)
00:59:21*rockcavera joined #nim
00:59:39FromDiscord<Yardanico> If someone's curious how my Nim looked like when I first started learning it - https://github.com/Yardanico/nickel/tree/76414b216f3ad7e290e478654f9bae17ea093b3b
00:59:46FromDiscord<Yardanico> apparently I used explicit "return"s too 😄
01:01:16*oriba quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
01:05:56*audiophile joined #nim
01:18:25*RaycatWhoDat left #nim ("ERC (IRC client for Emacs 26.3)")
01:22:33FromDiscord<KingDarBoja> Yesssss
01:29:35*chemist69_ joined #nim
01:32:54*chemist69 quit (Ping timeout: 256 seconds)
01:33:50*endragor joined #nim
01:35:39FromDiscord<Yardanico> btw our parsetoml lib passes most toml tests (found a repo with a lot of them), but not all
01:36:37FromDiscord<Yardanico> well I didn't verify that it _correctly_ parsed, just that it *parsed*
01:36:39FromDiscord<Yardanico> or errored for invalid files
01:41:00FromDiscord<Yardanico> no toml why
01:41:04FromDiscord<Yardanico> "Allow heterogenous values in arrays." 1.0.0-rc1
01:42:36FromDiscord<Varriount> Hm, Nim doesn't appear to have append-or-create as a filemode
01:42:40FromDiscord<Yardanico> well actually with parsetoml it should be easy to add support to that
01:42:43FromDiscord<Yardanico> @Varriount it does?
01:42:46FromDiscord<Yardanico> fmAppend does that
01:42:57FromDiscord<Rika> time to make another box type (TomlNode perhaps lol)
01:43:07FromDiscord<Yardanico> just try it yourself if you don't believe me 😛
01:43:12FromDiscord<Yardanico> @Rika nah I was too fast
01:43:19FromDiscord<Yardanico> parsetoml already boxes all types including arrays
01:43:23FromDiscord<Rika> i see
01:43:28FromDiscord<Yardanico> so it should just be a matter of relaxing rules
01:43:29FromDiscord<Rika> well then theres no issue
01:47:02*fredrikhr quit (Ping timeout: 272 seconds)
01:47:03FromDiscord<Yardanico> I literally commented 3 lines in the parser and now parsetoml can handle mixed-type arrays lol
01:52:55FromDiscord<Zachary Carter> Hit another blocker with my project - ↵```/Users/zacharycarter/.cache/nim/junkers_d/@mjunkers.nim.cpp:1761:22: error: cannot initialize a variable of type 'struct rizz_shader *' with an rvalue of type↵ 'const rizz_shader *'```
01:53:00*Tlanger joined #nim
01:53:06FromDiscord<Zachary Carter> https://github.com/septag/rizz/blob/886295aef6b5cfa8b2b2a55ae25cfc5a9f063a1a/src/rizz/graphics.c#L1738
01:54:12shashlickThat might be a nimterop issue
01:54:25leorizenim code please?
01:54:41FromDiscord<Zachary Carter> the code that's generated by nimterop?
01:55:08FromDiscord<Zachary Carter> `shader_get*: proc (shader_asset: rizz_asset): ptr rizz_shader {.cdecl.}`
01:55:21leorizehow you used it to be exact
01:55:25*Tongir quit (Ping timeout: 264 seconds)
01:55:45shashlickWell maybe not
01:55:46FromDiscord<Zachary Carter> ` let shade = (theGfx.shader_get(gState.boneShader).shd`
01:56:04FromDiscord<Zachary Carter> oops sorry
01:56:08shashlickI was thinking https://github.com/nimterop/nimterop/issues/226 but that's different
01:56:10disbotUsing `ast2` generates `importc` calls for any constants defined in headers which fails when using `dylib="dynlibFile"` ; snippet at 12https://play.nim-lang.org/#ix=2rzL
01:56:11FromDiscord<Zachary Carter> let shade = theGfx.shader_get(gState.boneShader).shd
01:56:44leorizenim don't understand C/C++ const pointers
01:57:06FromDiscord<Zachary Carter> Yeah - I had to fix something similar in my ozz bindings to C++
01:57:29FromDiscord<Zachary Carter> but I'm not sure how to fix this one - maybe I'll just skip the symbol and define the object myself
01:57:29leorize`reinterpret_cast` I guess
01:58:18leorizecan you see what's the C++ code generated by Nim?
01:58:25FromDiscord<Zachary Carter> yeah
01:58:32leorizecan I see?
01:58:33FromDiscord<Zachary Carter> well I can at least see the invocation
01:58:41leorizeyep that should be enough
01:59:07FromDiscord<Zachary Carter> `struct rizz_shader* T59_ = (*theGfx__NsFRuc7gJ63QiZwCUEJyXg).shader_get(gState__R6OSvMNU9cpgjx0L9aUPnGBA.boneShader);`
01:59:42leorizeyea that's your problem
02:01:27leorizeNim don't have the concept of immutable pointers...
02:02:17leorizethis is C code wrapped by nimterop then you use Nim's C++ codegen?
02:02:21FromDiscord<Zachary Carter> yeah
02:02:22FromDiscord<Zachary Carter> :/
02:02:25FromDiscord<Zachary Carter> going to be fun to try to fix
02:02:36leorizenot that hard actually
02:03:06FromDiscord<Zachary Carter> alias the type and cOverride the proc?
02:04:18leorizenah, you'll have to override the const qualifier via casting
02:04:31FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2rzN
02:04:31leorizegenerating (struct rizz_shader*)(expr)
02:05:21leorizethat works too I guess
02:05:33FromDiscord<Zachary Carter> let me try casting first - that's much simpler
02:05:38shashlickis it a nimterop wrapping bug?
02:05:48leorizeyes and no :P
02:06:36leorizeyou ignored the const qualifier but even if you don't ignore it you can't represent it in Nim
02:06:51leorizebecause we don't have the concept of an immutable pointer
02:07:56shashlickya const is not really respected yet
02:08:01disruptekrude.
02:08:14shashlickbut at least we could skip wrapping it or something
02:08:20FromDiscord<Yardanico> ok fixed the "Leading zeroes in exponent parts of floats are permitted." part of 1.0.0-rc1
02:08:27FromDiscord<Yardanico> the fix isn't the cleanest one, but the most minimal at least
02:08:40FromDiscord<Yardanico> so "-0e02" is correctly parsed as -0.0
02:08:52FromDiscord<Yardanico> (and yes that's a valid float, even in Nim itself)
02:09:16shashlick@leorize - did you have any feedback on the candidates branch of lazylib?
02:09:30leorizeI haven't looked at it unfortunately
02:09:40leorizeknees deep in an ancient C++ codebase rn
02:10:34FromDiscord<Yardanico> ok now the scariest contender
02:10:35FromDiscord<Yardanico> str = ''''That,' she said, 'is still pointless.''''
02:10:45FromDiscord<Yardanico> parsetoml doesn't parse it correctly for some reason
02:10:58FromDiscord<Yardanico> ah I know why probably
02:11:28FromDiscord<Yardanico> it fails at the end, probably because it parses first 3 delimiters and then is surprised about last '
02:12:31shashlickleorize - okay will bother you again later
02:13:12FromDiscord<Yardanico> wait do I need backtracking for this?
02:13:25FromDiscord<Yardanico> or I just can't think straight rn
02:13:34FromDiscord<Yardanico> to correctly implement parsing of stuff like data = ''''a''''
02:13:47FromDiscord<Yardanico> where ''' (triple single quote) is the opening/closing of a string
02:13:50FromDiscord<Yardanico> and string itself is 'a'
02:14:03leorizeyou don't need backtracking
02:14:11leorizeyou just need to copy Nim's parsing behavior
02:14:17FromDiscord<Yardanico> sounds simple 😄
02:14:28FromDiscord<Yardanico> but parsetoml is ~1.4k cloc of Nim
02:14:30FromDiscord<Yardanico> fully custom
02:14:37FromDiscord<Yardanico> doesn't even use lexbase 😛
02:14:47leorizewell the lexer code should still give you an idea for how to do it :P
02:15:02FromDiscord<Yardanico> and right now it handles delimiters by simply checking if 3 characters in a row are the delimiter ones
02:15:24shashlicktime to make nimterop wrappers even more standalone, people love islands
02:17:47leorizeYardanico you can just count the continous delimiters until you reach the end :p
02:17:59leorizethen if count >= 3 that's the end
02:18:22leorizenot sure how Nim itself does this, but I would assume it's something similar
02:18:27FromDiscord<Yardanico> yeah I had a similar idea
02:18:30*oprypin quit (Ping timeout: 256 seconds)
02:18:42*FromGitter quit (Ping timeout: 272 seconds)
02:18:56leorize!eval echo """"That," she said, "is still pointless.""""
02:18:59NimBot"That," she said, "is still pointless."
02:19:07leorizeyep it works as expected
02:19:21FromDiscord<Yardanico> well I expect it to be 😛
02:19:28FromDiscord<Yardanico> nim's lexer is pretty stable I think
02:19:48leorizeI think I do support that case in my toml lexer
02:19:51leorizeactually maybe not :P
02:20:04FromDiscord<Yardanico> "Multi-line literal strings are surrounded by three single quotes on each side and allow newlines. " "You can write 1 or 2 single quotes anywhere within a multi-line literal string, but sequences of three or more single quotes are not permitted."
02:22:27*muffindrake quit (Ping timeout: 260 seconds)
02:24:07*muffindrake joined #nim
02:25:45*FromGitter joined #nim
02:25:55*oprypin joined #nim
02:26:42FromDiscord<impbox> hmm maybe closing quotes should have to match number of opening quotes... so """"" has to match """"", that lets you quote """
02:26:55FromDiscord<Yardanico> well not really
02:27:05FromDiscord<Yardanico> TOML only allows for single-character opening/closing quotes
02:27:07FromDiscord<Yardanico> or triple-character
02:27:15FromDiscord<Yardanico> either ', ", ''' or """
02:27:17FromDiscord<Yardanico> no '' or ""
02:27:37FromDiscord<impbox> sorry I was referring to nim not toml
02:29:43FromDiscord<Yardanico> I think I got it
02:29:48FromDiscord<Yardanico> ah, almost
02:30:19leorize@impbox that'd limit their usage
02:30:34leorizeall triple-quoted literals are raw strings
02:31:38*NimBot joined #nim
02:37:48*nikita_ joined #nim
02:39:56FromGitter<ynfle> Is there any way to use `strutils.escape` and have it mimic having the string in triple double-quotes if it's coming from a variable? I don't want it to escape, for example, newlines etc.
02:40:52*nikita` quit (Ping timeout: 272 seconds)
02:41:12FromGitter<ynfle> https://play.nim-lang.org/#ix=2rzR
02:44:56leorize@ynfle so basically you want it to be printed in Nim's raw format?
02:44:58leorizebut why?
02:45:29FromGitter<ynfle> I want to write json but I don't want to have to import json
02:45:40FromGitter<ynfle> Wait to nim remove all the unused functions?
02:45:48FromGitter<ynfle> *procs
02:45:54leorizeyes nim do dead code elimination
02:46:19leorizeif you are super wary of size then there's also packedjson
02:46:48*justsomeguy left #nim (#nim)
02:48:36FromGitter<ynfle> Thx
02:48:51FromGitter<ynfle> But is there a way to convert to raw string?
02:49:16FromDiscord<Yardanico> @ynfle generally nim follows a rule that all optimizations in Nim itself are always enabled
02:49:23FromDiscord<Yardanico> so you don't get different results with -d:debug or -d:danger
02:49:37FromDiscord<Yardanico> that's true for most nim (implemented in the nim compiler itself) optimizations I think
02:49:51leorizetrue for all actually
02:50:03FromDiscord<Yardanico> @leorize well I think I did it, didn't verify that the files are correctly parsed, but they are parsed without errors
02:50:07FromDiscord<Yardanico> although my code looks like a hack
02:50:23FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2rzT
02:50:23leorize!repo alaviss/toml
02:50:24disbothttps://github.com/alaviss/toml -- 9toml: 11Nim TOML parser 15 0⭐ 0🍴
02:50:29FromDiscord<Yardanico> woah
02:50:34leorize^ feel free to take that lexer
02:50:40leorizeI wrote it when I first learned Nim
02:50:55FromDiscord<Yardanico> isn't it easier to have lexer/parser together for a thing like TOML?
02:51:23leorizeor you can have a lexer + state machine
02:51:32leorizethen you have the ultimate flexibility
02:52:29leorizeidk to be honest, I wrote it that way because I saw how parsejson and parsecfg works
02:53:12FromDiscord<Yardanico> well yeah but for now seems like this multiline thing is (maybe) solved
02:53:32FromDiscord<Yardanico> I just feel it's a bit dirty to push last character back into the parser 😛
02:54:28FromDiscord<Yardanico> I certainly will look into lexbase and your lexer 😛
02:54:36leorizehave you tried to build a toml parser out of npeg? lol
02:54:44FromDiscord<Varriount> Yardanico: Why not use NPeg?
02:54:59FromDiscord<Varriount> Oh, leorize beat me too it.
02:55:02FromDiscord<Yardanico> @Varriount well I can
02:55:05FromDiscord<Yardanico> I have some experience with npeg
02:55:09FromDiscord<Yardanico> but isn't it kinda slower? 😛
02:55:35leorizemy lexer can't handle the string problem, but it shouldn't be too hard to fix
02:55:57FromDiscord<Varriount> The only downside to NPeg right now is that it doesn't support streaming input automatically (you can still design your grammar for streaming through),
02:56:00leorizeYardanico: I'm not sure if npeg is slower than the abomination that's parsetoml :P
02:56:13FromDiscord<Yardanico> why so rude 😦
02:56:28FromDiscord<Varriount> It's probably slower than hand-optimized parsers, but then, so is C to hand-optimized assembly.
02:56:28FromDiscord<Yardanico> but yeah toml has a abnf grammar in spec
02:56:36FromDiscord<Yardanico> if shouldn't be too hard to translate to NPeg
02:56:49leorizein fact I wrote that lexer because I hated parsetoml when I first looked at it
02:56:54leorizemaybe it's better now, not sure
02:57:10FromDiscord<Rika> why use toml if you can use a different format /s
02:57:17FromDiscord<Yardanico> @Rika because toml is pretty nice
02:57:32leorizetoml is basically standardized ini
02:57:34FromDiscord<Yardanico> Looks more similar to INI
02:57:34FromDiscord<Yardanico> yeah
02:57:40FromDiscord<Rika> is /s no longer what i think means
02:57:41FromDiscord<Rika> it* means
02:57:46leorizebut then they have to make it work like json, which imo was a terrible move
02:57:48FromDiscord<Yardanico> it is, but why would you ask anyway 😛
02:57:54FromDiscord<Varriount> I'd gladly pay @Zevv money to work on better streaming support for NPeg, (although the problem is more philosophical than technical)
02:57:57FromDiscord<Rika> as a joke
02:58:23FromDiscord<Varriount> leorize: I just want another data language that supports tags like YAML
02:58:36FromDiscord<Rika> cbor
02:58:40FromDiscord<Varriount> And references, for deduplication.
02:58:43FromDiscord<Rika> (lol i'm not super serious
02:58:53FromDiscord<Rika> but i am working on cbor
02:59:05FromDiscord<Rika> if you want references, maybe smile
02:59:24FromDiscord<Rika> but i dont get why you'd want that tbh, since you can just compress the data with zlib or something
02:59:27*waleee-cl quit (Quit: Connection closed for inactivity)
02:59:53leorizeI think they wanted a configuration format for human
02:59:54FromDiscord<Rika> the "binary representation" part is only so that it's easier to process, imo, not so that it's smaller to store
02:59:56FromDiscord<Rika> ah
02:59:58FromDiscord<Varriount> @Rika it's not for size, but readability.
02:59:58FromDiscord<Rika> i see
03:00:14FromDiscord<Rika> i see
03:00:25FromDiscord<Varriount> For example, when you have a configuration file with multiple sections that share almost the same data.
03:00:38FromDiscord<Rika> i'm too focused on my particular usecase (only machine-processed data)
03:01:00FromDiscord<Rika> we're creeping towards scripting language as a configuration language territory here i feel 😛
03:01:07FromDiscord<Varriount> Probably.
03:02:11leorizesomeone did make a scripting but not really configuration language
03:02:14leorizeit didn't fly iirc
03:03:18*leorize quit (Quit: WeeChat 2.8)
03:04:08FromDiscord<Yardanico> dhall
03:04:20FromDiscord<Yardanico> oh, maybe you mean something different
03:05:38*leorize joined #nim
03:07:35leorize[m]yea, dhall
03:07:55leorize[m]why didn't everyone just improve ini instead...
03:08:35FromDiscord<Rika> cuz windows and windows bad /s
03:10:07FromDiscord<Yardanico> too much /ss
03:10:45FromDiscord<Rika> haha okay will stop
03:11:16FromDiscord<Yardanico> jk
03:11:18FromDiscord<Yardanico> you can jok
03:11:21FromDiscord<Yardanico> almost everyone is sleeping anyway
03:12:40FromDiscord<impbox> lua?
03:13:21FromDiscord<Yardanico> js!
03:13:37FromDiscord<impbox> hmm is js easy to use as a config language?
03:13:37FromDiscord<Yardanico> @<@&371760042338287618>s are asleep, post JS questions@@
03:13:39FromDiscord<Yardanico> oh wait
03:13:47FromDiscord<Yardanico> @impbox nah I was joking
03:13:55FromDiscord<Yardanico> but JSON can be easy to use if you don't mind not having comments 😛
03:14:11FromDiscord<Yardanico> for simple configurations json is quite easy to use
03:14:14FromDiscord<Rika> did you just ping admins lmao
03:14:15leorizeI'm pretty sure that's not how the message is supposed to look like Yardanico ^
03:14:22FromDiscord<impbox> json is not really programming though, just declaration
03:14:35*audiophile quit (Ping timeout: 240 seconds)
03:14:36FromDiscord<Yardanico> @leorize how does it look on IRC? I don't think any good
03:14:37FromDiscord<impbox> you can't do conditionals or loops etc or read files
03:14:43Yardanicooh I see
03:14:47YardanicoI don't parse role pings
03:15:02Yardanicodumb discord doesn't send proper text
03:15:11leorizeif you want ini with reference, Nim's parsecfg is a contender
03:15:12Yardanicoit sends an ID of the role instead, and you must get a text representation of it yourself
03:16:46FromDiscord<impbox> is ini standardised now?
03:16:54leorizee
03:16:58leorizenope
03:22:56*krux02_ quit (Remote host closed the connection)
03:22:57FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2rzZ
03:23:49FromDiscord<Zachary Carter> the cpp for that line looks like - `(*theGfx__NsFRuc7gJ63QiZwCUEJyXg).shader_get = reinterpret_cast<tyProc__rzrAFk9aKPYnlD8SFThcbFA>((*theGfx__NsFRuc7gJ63QiZwCUEJyXg).shader_get);`
03:24:16FromDiscord<Zachary Carter> `typedef N_CDECL_PTR(struct rizz_shader*, tyProc__rzrAFk9aKPYnlD8SFThcbFA) (rizz_asset shader_asset);`
03:24:20leorizehave you tried... `cast[ptr rizz_shader](call-goes here)`
03:24:40FromDiscord<Zachary Carter> I think so - but let me try again
03:25:09leorizeif that doesn't work then rope reinterpret_cast over it
03:27:22FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2rA1
03:27:28FromDiscord<Zachary Carter> I'll try the second suggestion now
03:28:58leorizethere's also this stupid lifehack: `(ptr rizz_shader)(pointer(theGfx.shader_get(gState.boneShader))).shd`
03:29:53FromDiscord<Zachary Carter> thanks - if nothing else works I'll resort to that
03:30:44leorizewell if reinterpret_cast doesn't work I don't think anything will lol
03:32:09leorizeI'm actually having a feeling that reinterpret_cast wouldn't work because Nim will try to use a temp var to store the result of that function call before passing it into reinterpret_cast
03:32:28leorizeif that's the case then the lifehack might actually work lol
03:32:45FromDiscord<KingDarBoja> Windows doesnt suck 🙈
03:35:53*debased quit (Quit: WeeChat 2.8)
03:40:48FromDiscord<Yardanico> you forgot the /s /s
03:41:46FromDiscord<Elegant Beef> I mean the fact i went to play a game today, and had it open a "Welcom to Edge" window means it does
03:41:53FromDiscord<Elegant Beef> (edit) '"Welcom' => '"Welcome'
03:43:42FromDiscord<KingDarBoja> ¯\_(ツ)_/¯
03:44:03FromDiscord<Zachary Carter> leorize: yeah that's exactly what's happening
03:44:09FromDiscord<Zachary Carter> the temp var is screwing everything up
03:45:05leorizeif the lifehack doesn't work, your only way out would be to use nimterop's no headers mode
03:45:17FromDiscord<Zachary Carter> bleh
03:45:21FromDiscord<Zachary Carter> that will break everything else 😛
03:45:32leorizeit can be done per-wrapper iirc
03:45:57FromDiscord<Zachary Carter> I'll have to see - I know shashlick made a bunch of fixes for me a couple weeks ago that only worked in header mode
03:47:15leorizethe hack didn't work either? :P
03:47:20FromDiscord<Zachary Carter> yeah the temp var still screws up the life hack
03:47:34FromDiscord<Zachary Carter> ```↵struct rizz_shader* T60_ = (*theGfx__NsFRuc7gJ63QiZwCUEJyXg).shader_get(gState__R6OSvMNU9cpgjx0L9aUPnGBA.boneShader);↵pipDesc.shader = (*((struct rizz_shader*) (((void*) (T60_))))).shd;↵```
03:49:11leorize`cast[proc(shd: rizz_asset): ptr rizz_shader {.cdecl.}](theGfx.shader_get)(gState.boneShader).shd`
03:49:26leorizethe ultimate hack :P
03:49:54leorizeI hate this but it got a chance of actually working
03:50:44FromDiscord<Zachary Carter> lol yup compiled
03:50:52leorizeif that works then `cast[typeof theGfx.shader_get](theGfx.shader_get)` might work as well :P
03:51:09leorizelol
03:52:06FromDiscord<Zachary Carter> thanks again - it's ugly af but at least it works 🙂
03:52:41FromDiscord<Zachary Carter> (edit) removed 'again'
03:52:52FromDiscord<Zachary Carter> one step closer to skeletal animation 😄
03:53:37*vicfred_ joined #nim
03:53:45leorizeyw :)
03:54:47*vicfred quit (Remote host closed the connection)
03:54:48*screens__ quit (Quit: No Ping reply in 90 seconds.)
03:54:48*vqrs quit (Ping timeout: 256 seconds)
03:57:07*screens_ joined #nim
03:57:16*vqrs joined #nim
03:59:59*vicfred_ quit (Quit: Leaving)
04:05:30*rockcavera quit (Remote host closed the connection)
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:39*supakeen joined #nim
04:29:05FromDiscord<malfong> ```↵type Flags = set[ImGuiWindowFlags] # Error: set is too large↵```
04:31:24FromDiscord<malfong> sent a code paste, see https://play.nim-lang.org/#ix=2rA7
04:35:26FromDiscord<Rika> `ImGuiWindowFlags` should be "which bit is set", not "the mask of the flag"↵so not `1,2,4,8,16` but `1,2,3,4,5`
04:36:02FromDiscord<Rika> so in this case you cant do this w/o making another enum i assume...
04:40:01*arecaceae quit (Remote host closed the connection)
04:40:25FromDiscord<malfong> oh, I thought so - - thanks😫
04:41:19*arecaceae joined #nim
04:53:54FromDiscord<Rika> i feel dumb; how do i get how many entries are in a tuple?
04:54:05FromDiscord<impbox> `.len`?
04:54:19FromDiscord<Rika> nope
04:54:36ForumUpdaterBotNew thread by Jasonfi: Sort a table by value, see https://forum.nim-lang.org/t/6542
04:55:34FromDiscord<impbox> @Rika wow, i was sure that was a thing. interesting
04:55:57FromGitter<ynfle> @Rika, https://nim-lang.org/docs/typetraits.html#tupleLen.t
04:56:23FromDiscord<Rika> thanks
04:56:31FromDiscord<Rika> why's it delegated to typetraits though?
04:56:49FromDiscord<impbox> probably because you shouldn't generally care about the length of a tuple
04:56:54FromDiscord<impbox> you care about specific fields
04:57:30FromDiscord<impbox> why do you need the number of entries in a tuple?
04:57:46FromDiscord<Rika> because i'm converting it to a table w/ boxed values
04:57:58FromDiscord<Rika> and i dont want to "overallocate"
04:58:12FromDiscord<impbox> mmmkay
04:58:13FromGitter<ynfle> Just allocate 2 then
04:58:34FromDiscord<Rika> eh if the info's there then why not use it
04:58:49FromGitter<ynfle> I think it's in typetraits because tuple[int, int] is a different type to tuple[int, int, int]
04:59:42FromDiscord<Rika> eh, the "optimization" did barely anything anyway so i'm still hunting for what's taking up 20kb of memory (it says its a Table but i dont know which)
05:00:10FromDiscord<Rika> i mean which amongst the tables i am using
05:00:13FromDiscord<Yardanico> refc is a deferred refcounting GC though
05:00:17FromDiscord<Rika> yes i am already using the heap dump
05:00:22FromDiscord<Yardanico> it might not free some GC'd type instantly
05:00:28*Guest14468 quit (Ping timeout: 246 seconds)
05:00:38FromDiscord<Yardanico> try with arc 😛
05:01:11*Vladar joined #nim
05:01:12FromDiscord<Rika> i already did but i cant use heapdump w/ it i think?
05:01:25FromDiscord<Yardanico> yeah you can't I think, but you can measure RSS right?
05:01:30FromDiscord<Yardanico> with refc and with arc
05:01:33FromDiscord<Yardanico> or maximum peak memory
05:01:35*dadada joined #nim
05:01:38FromDiscord<Rika> ah yes
05:01:53FromDiscord<Yardanico> arc/orc in most cases should use less memory than refc
05:01:59*dadada is now known as Guest29868
05:02:10FromDiscord<Rika> same total mem it seems
05:02:10FromDiscord<Yardanico> even for simple kostay benchmarks (e.g. base64 benchmark) arc uses 2.6mb compared to 8mb with refc
05:02:12FromDiscord<Yardanico> (peak memory)
05:02:17FromDiscord<Yardanico> that's a 3.5x difference
05:02:27FromDiscord<Yardanico> (edit) 'kostay benchmarks' => 'kostya/benchmarks'
05:02:58FromDiscord<Yardanico> well if you're not on latest devel the savings might be not so big
05:02:58FromDiscord<Rika> the table thing i did helped, removed 10kb from usage
05:03:10FromDiscord<Rika> i cant use devel because nimyaml doesnt like it
05:03:12FromDiscord<Rika> eh
05:03:12FromDiscord<Yardanico> because on devel there is scoped destructor thing
05:03:16FromDiscord<Rika> well i can always comment that
05:03:22FromDiscord<Rika> im not using nimyaml anyway
05:03:25FromDiscord<Rika> okay ill test devel then
05:03:36FromDiscord<Yardanico> well although there's currently a regression because of scoped destructors 😛
05:04:11FromDiscord<Yardanico> see e.g https://github.com/nim-lang/Nim/pull/14964 (my testcase https://gist.github.com/Yardanico/d654e8be96ade03ce2fcc18c56ea0108) and https://github.com/nim-lang/Nim/issues/14968
05:04:13disbot[ARC] segmentation fault with `now().utc` ; snippet at 12https://play.nim-lang.org/#ix=2rAa
05:04:33FromDiscord<Yardanico> it's because of using an implicit return 😄
05:05:04FromDiscord<Yardanico> but really the point with scoped destructors is that everything which makes a new scope destroys all variables in that scope after it
05:05:08FromDiscord<Yardanico> not at procedure-level
05:05:33FromDiscord<Yardanico> e.g. if you put some string stuff in a "block: ", when execution of code in that block ends, all destructors for variables inside of it will be called
05:06:17FromDiscord<Rika> nice
05:06:21FromDiscord<Rika> thats real nice
05:07:22FromDiscord<Yardanico> just waiting for https://github.com/nim-lang/Nim/pull/14964 and https://github.com/nim-lang/Nim/pull/14962 to be done and merged 😛
05:07:24disbotWIP: An optimizer for ARC
05:13:16*narimiran joined #nim
05:20:41*maier joined #nim
05:31:35FromGitter<Knaque> This is a bit of an unusual question, but I'm a bit curious... Is there any Nim package that allows for control over the mouse? i.e. clicks, movement, etc.
06:12:16FromDiscord<Varriount> Knaque: are you still there?
06:20:58FromDiscord<Varriount> @Knaque
06:30:54FromGitter<Knaque> Yep.
06:33:30FromGitter<Knaque> I mean, I'm here if you still are. Was about to sign off for the night, but I'll wait a few minutes.
06:38:51*solitudesf joined #nim
06:42:02*charmander quit (Quit: WeeChat 2.8)
06:46:54FromDiscord<reilly> Tell you what, @Varriount, just send it to me via Discord when you see this 😉
06:55:21*solitudesf- joined #nim
06:57:47*solitudesf quit (Ping timeout: 240 seconds)
07:09:49*russellb joined #nim
07:10:24*russellb is now known as ruste
07:11:52*ruste quit (Client Quit)
07:50:35*Guest29868 quit (Ping timeout: 240 seconds)
07:57:55*dadada joined #nim
07:58:18*dadada is now known as Guest55294
08:00:02*oddp joined #nim
08:40:16*fredrikhr joined #nim
08:50:48FromDiscord<Clyybber> Araq: Hi, in case you missed my answer yesterday: The template can't be turned into a proc because of parameter captures
08:56:46*Shucks joined #nim
09:11:49Araqparameter captures?
09:16:38FromDiscord<Clyybber> yeah, like s and c
09:16:52FromDiscord<Clyybber> I can't pass them to the proc because they are var params
09:30:29Araqthat means the code is too complex
09:31:00Araqcan't you find a simpler solution? the one other template that remains proved to be difficult to refactor
09:31:04Araqin fact I gave up on it
09:36:57*krux02 joined #nim
09:39:42FromGitter<gogolxdong> Anyone got a xlsx reader?
09:49:36Araqthere was a Nimble package for it based on COM iirc
09:49:57AraqClyybber: so. it turns out I don't understand cursors all that well
09:50:09Araqcan you move data out of a cursor?
09:50:22FromDiscord<Clyybber> I dont think so
09:50:46FromDiscord<Clyybber> Since they are just views it would modifiy their origin
09:51:06Araqproc p(root: Node): Node =
09:51:06Araq var x {.cursor.} = root
09:51:06Araq result = x
09:51:18Araq^ I claim this is valid
09:51:37FromDiscord<Clyybber> The template is the simplest solution until escape analysis improves
09:51:51FromDiscord<Clyybber> Araq: I think its valid
09:52:05FromDiscord<Clyybber> but only if root is deeply immutable
09:52:46Araqimmutability is irrelevant, I wonder about the RC ops
09:53:04FromDiscord<Clyybber> it can be moved here
09:53:16FromDiscord<Clyybber> I think
09:53:28Araqhttps://github.com/nim-lang/Nim/pull/14962/files#diff-fb6fdacdba17344fa52ce6ed542efcf6R20
09:53:29disbotWIP: An optimizer for ARC
09:53:39Araqis how to write your tests in a more robust fashion
09:54:11*arecaceae quit (Ping timeout: 240 seconds)
09:56:10Araqso 'x' doesn't own a refcount yet we can move from it? how does that work? does it work?
09:57:05FromDiscord<Clyybber> outliving. If it doesn't outlive it its fine
09:57:58FromDiscord<Clyybber> right?
10:01:35AraqI think I'm wrong and it's invalid
10:01:57*matti quit (Ping timeout: 244 seconds)
10:02:05*tyler569 quit (Ping timeout: 246 seconds)
10:02:12Araqwhen you later on do let y = p() we move it into y, p() owns the ref
10:02:23*lain quit (Ping timeout: 244 seconds)
10:03:00Araqa move doesn't incRef so we miss an RC op
10:03:16*tyler569 joined #nim
10:03:20*lain joined #nim
10:03:34*matti joined #nim
10:03:37*Zoom[m] quit (Ping timeout: 260 seconds)
10:03:37*Northstrider[m] quit (Ping timeout: 260 seconds)
10:03:48*Northstrider[m] joined #nim
10:03:53Araqmaybe I should enable .cursor only for non-refs for now, subtle stuff
10:04:03Araqpointers suck :-)
10:04:24*Zoom[m] joined #nim
10:04:49FromDiscord<Clyybber> hmm, but p doesn't store its arg anywhere
10:05:12FromDiscord<Clyybber> the ref should be passing through without any rc ops
10:06:43*Cthalupa quit (Ping timeout: 246 seconds)
10:12:12*Cthalupa joined #nim
10:12:40FromDiscord<Clyybber> so in let x = Node(); let y = p(x) there should be no rc ops
10:13:23FromDiscord<Clyybber> because either p's param was inferred to be a sink param, so x gets moved into it
10:13:53FromDiscord<Clyybber> or p's param is a lent/cursor param and returns a lent/cursor
10:14:13FromDiscord<Clyybber> in the first case =destroy(y) will cause the cleanup
10:14:24FromDiscord<Clyybber> in the second case =destroy(x) will do it
10:16:12Araqhmm my next programming language will lack 'break', 'return' and 'continue'
10:16:18FromDiscord<Clyybber> lol
10:16:37Araqhttps://github.com/nim-lang/fusion/pull/12/files#diff-04a39be152f2be9f427f98252025de5aR69 and on and on it goes
10:16:37FromDiscord<Clyybber> what about try: finally :p
10:16:38disbotAdd webscraper
10:16:50Araqbut hey, at least it's not nested this way.
10:17:01Araqso silly. asm isn't nested either
10:17:17FromDiscord<impbox> in nimble is there a way to use variables? eg. `releaseOptions = "-d:release -d:danger -d:fooBar"` and then pass that to a task `exec nim c {releaseOptions} ...` or something along those lines like i'd do in a makefile
10:18:54FromDiscord<mratsim> yes: https://github.com/mratsim/constantine/blob/master/constantine.nimble#L15-L72
10:19:00FromDiscord<Clyybber> Araq: Does your cursorifier do escape analysis currently?
10:19:32FromDiscord<impbox> @mratsim thanks!
10:20:48FromDiscord<impbox> nice I can import strformat in my nimble file =)
10:22:20AraqClyybber: no, it doesn't. it ignores control flow, pessimizing the results
10:23:29FromDiscord<Clyybber> Ok. Can cursors be passed to regular parameters?
10:23:34*l1x quit (Ping timeout: 244 seconds)
10:23:37FromDiscord<Clyybber> I think they may only be passed to lent params
10:24:02FromDiscord<Clyybber> Since otherwise they may outlive their source
10:24:45*l1x joined #nim
10:25:21FromDiscord<impbox> does nim have an option to clean a nimcache directory before building in it so it doesn't keep unused files there?
10:28:37FromDiscord<impbox> I would just removeDir() but seems that's not available in nimble nimscript
10:28:48*fredrikhr quit (Read error: Connection reset by peer)
10:29:08FromDiscord<exelotl> there's -f / --forceBuild:on but I'm not sure it removes unused files
10:29:14*fredrikhr joined #nim
10:31:04FromDiscord<exelotl> Is nim compiler nimscript not an option? I'm sure you can rmDir in there
10:39:04*abm joined #nim
10:47:47*oddp_ joined #nim
10:47:59*oddp quit (Quit: quit)
10:48:11FromDiscord<Clyybber> Araq: The tests I added don't really serve to test wether something got moved, rather that it doesn't crash and gets destroyed properly
10:48:17*chemist69_ quit (Quit: WeeChat 2.7)
10:48:36*chemist69 joined #nim
10:49:03FromDiscord<Clyybber> And your cursifier will still rely on that behaviour to be correct I think
11:00:19FromDiscord<lqdev> damn my project isn't even that big and it takes 4 seconds to compile :/
11:01:16FromGitter<bung87> hi , I'd like create PR for js backend, a browser api proc accept options, should I using exported custom type or using jsffi's JsObject?
11:05:40Araqpreferably a custom type
11:05:56FromGitter<bung87> ok, Thanks!
11:09:16*endragor quit (Remote host closed the connection)
11:11:41*nikita_ is now known as nikita`
11:27:10*nikita` quit (Ping timeout: 272 seconds)
11:35:47*waleee-cl joined #nim
11:46:31FromDiscord<Clyybber> Araq: My PR is ready for review/finished btw (I only cleaned up a tiny bit in the last commit) :p
11:49:40Araqok, fine
11:49:48Araqbut in an upcoming PR, remove the templates
11:49:57Araqand if it takes callbacks instead, so be it
11:55:10FromGitter<bung87> RootNodeOptions,SlotOptions,ShadowRootInit how's these look ? as a proc parameter type?
11:59:43Araqset of enum?
12:01:24*skelett quit (Quit: WeeChat 2.7.1)
12:03:01*Shucks_ joined #nim
12:05:00FromGitter<bung87> all is js object
12:05:14*Shucks quit (Ping timeout: 256 seconds)
12:05:24*Shucks_ is now known as Shucks
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:33FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f0d9fc9bd3edf666fcdb60a]
12:06:45*supakeen joined #nim
12:07:09FromGitter<bung87> ```proc getRootNode*(n: Node,options: RootNodeOptions): Node```
12:07:29*skelett joined #nim
12:25:13*lritter joined #nim
12:29:20Araqbikeshedding time
12:30:23Araqhow to name the new --expandIr switch?
12:35:09FromDiscord<Clyybber> expandlr?
12:36:44FromGitter<tim-st> is there no difference in type parameters `T: bool` and `T: uint8|char|byte`? it says, both procs are matching
12:37:14Araqhmm doesn't sound right, bool is different from byte and char
12:37:27FromGitter<tim-st> yes, thought so too
12:37:30AraqI went with "expandarc"
12:39:13FromDiscord<Clyybber> tim-st: Does it work with `uint8 or char or byte` ?
12:39:40FromDiscord<Clyybber> Araq: What does the switch do?
12:39:55Araqdump the AST after our ARC related transformations
12:40:10AraqI'm writing tests now that make use of it
12:40:32Araqit's better to test the IR rather than what the end binary
12:40:39Araqproduces
12:40:48FromDiscord<Clyybber> yeah
12:41:03FromGitter<tim-st> Clyybber: it seems to work at upper level to call the proc, not when the generic proc is called in an other generic proc
12:43:44FromGitter<tim-st> https://play.nim-lang.org/#ix=2rBg
12:45:48Araqoh stop the "deepcopy" already
12:46:05FromGitter<tim-st> yes, it was only to get a quick oneliner
12:46:09FromGitter<tim-st> I dont use it normally
12:46:28Araqit doesn't work on openArray anyway
12:46:39Araqat least it shouldn't
12:47:06FromDiscord<Clyybber> Isn't it actually fairly easy to implement a non-magic deepcopy?
12:47:07FromGitter<tim-st> https://play.nim-lang.org/#ix=2rBh
12:47:13FromGitter<tim-st> here without deepCopy
12:47:39FromGitter<tim-st> I wanted `copy(openArray[T])` but it doesnt seem to be implemented
12:48:43Araqthis works fine https://play.nim-lang.org/#ix=2rBi
12:49:13FromGitter<sealmove> what's the equivalent of echo in macros, for debugging
12:49:16Araqthere is a showstopper bug with explicit generic instantiations within generic code that seems to be your bug
12:49:42Araqsealmove: you can use 'echo repr result' to debug a macro's AST
12:49:54*bung joined #nim
12:50:58FromGitter<sealmove> nice
12:51:07FromDiscord<Clyybber> Araq: Is it reported?
12:51:17FromDiscord<Clyybber> I can't find it
12:51:25Araqi marked it with "showstopper"
12:51:40FromDiscord<Clyybber> You mean this one? https://github.com/nim-lang/Nim/issues/14942 ?
12:51:42disbotIncorrect overloaded generic function called ; snippet at 12https://play.nim-lang.org/#ix=2rBl
12:53:18FromGitter<tim-st> Araq: thanks, but I cant fit it to my original code... https://play.nim-lang.org/#ix=2rBm
12:53:34Araqclyybber: yes
12:53:51FromDiscord<Clyybber> Hmm, is it really the same bug?
12:54:05FromGitter<tim-st> Oh, I see, it was just the type parameter
12:54:19FromDiscord<Yardanico> oh nice, I would love to see something like --expandArc
12:54:22FromGitter<tim-st> `sort[T]()` crashes, but `sort()` works, thanks!
12:54:33Araqhttps://play.nim-lang.org/#ix=2rBn
12:55:00FromDiscord<Clyybber> because that bug is just that the function gets semmed even though it doesn't actually get called
12:58:08FromDiscord<Clyybber> https://play.nim-lang.org/#ix=2rBq here it the one tim-st encountered minimized
12:58:20FromDiscord<Clyybber> I remember disruptek fought with that bug too
12:58:56FromDiscord<Clyybber> Araq: Should I make a new issue or append it to the other showstopper?
13:01:26*solitudesf- quit (Read error: Connection reset by peer)
13:01:51*solitudesf joined #nim
13:04:19*solitudesf quit (Client Quit)
13:04:45*solitudesf joined #nim
13:05:10*solitudesf quit (Remote host closed the connection)
13:06:08Araqdon't care
13:06:55*solitudesf joined #nim
13:15:48FromDiscord<Clyybber> Araq: Its already reported https://github.com/nim-lang/Nim/issues/6407 , should we assign showstopper?
13:15:50disbotReal and integer types fails to differentiate in a generic call from other generic ; snippet at 12https://play.nim-lang.org/#ix=2rBu
13:18:42*rockcavera joined #nim
13:21:29Araqok
13:45:40*letto quit (Quit: Konversation terminated!)
13:48:13*letto joined #nim
13:52:17*chemist69 quit (Ping timeout: 260 seconds)
13:52:49*chemist69 joined #nim
13:54:17*mbuchel quit (Ping timeout: 260 seconds)
13:55:05*mbuchel joined #nim
14:00:33*fredrikhr quit (Read error: Connection reset by peer)
14:00:59*fredrikhr joined #nim
14:17:23*narimiran quit (Ping timeout: 240 seconds)
14:24:37FromGitter<iffy> A user of mine is seeing this error `ERROR index 1024 not in 0 .. 1023 ⏎ fatal.nim(39) sysFatal ⏎ asyncfutures.nim(431) asyncCheckCallback` and I'm having trouble diagnosing the cause. Does anything jump out to anyone about this? 1024 seems like a suspicious number. A max size of some data structure?
14:29:02Araqthere is some logic based on MAX_FD
14:29:15Araqwe preallocate based on this
14:33:24FromGitter<iffy> I'll see what the user's ulimit is set to. That seems like a likely guess. `grep -r "MAX_FD" *` is failing to find anything in Nim source. Which file should I be looking at?
14:38:36FromGitter<iffy> okay, maybe ioselectors_kqueue.nim
14:42:59*rockcavera quit (Ping timeout: 240 seconds)
14:45:56FromGitter<iffy> Is this code is leaking file descriptors? http://ix.io/2rBS
14:46:12FromGitter<iffy> (and is there a better way to read asynchronously from stdin?)
14:48:04Araqwell better close the file stream
14:48:23Araqalso I don't know why you need to do
14:48:25Araq var
14:48:25Araq s = newFileStream(stdin)
14:48:25Araq var data = s.readStr(4096)
14:48:27Araq result = $data
14:48:39Araqwhat's wrong with stdin.readLine
14:52:20*audiophile joined #nim
14:54:31*endragor joined #nim
15:16:11*vicfred joined #nim
15:17:24leorize[m]@iffy you know that you can poll on stdin, right? :P
15:17:28leorize[m]well except on windows
15:19:03FromGitter<iffy> @Araq I'm reading netstrings (not newline-delimited) -- I had a version that read char by char, but that seemed like a bad idea
15:19:32leorize[m]you should use a buffering system tbh
15:19:39leorize[m]lexbase got one :p
15:19:44*natrys joined #nim
15:20:18FromGitter<iffy> and this is code for Linux/macOS/Windows so it has to work on all
15:20:38Araquse a UI library :-)
15:21:40Araqand add a UI to your app, yeah yeah I know know yada yada your Linux server has no monitor attached (I keep wondering about this one btw, so .. does it have a keyboard attached?)
15:22:21FromGitter<iffy> well..... this is an Electron app. I'm slowly gouging out the old NodeJS code and porting it to Nim (while keeping the Electron shell until I can replace it)
15:22:37FromGitter<iffy> Here's my actual reading code: http://ix.io/2rC8
15:22:46Araqwhat's stdin for an Electron app?
15:23:06FromGitter<iffy> The Electron app spawns a Nim executable and communicates with it on stdin/stdout/stderr
15:23:11leorize[m]asyncevent do take up fd iirc
15:23:53leorize[m]until rayman got his virtual events thingy merged
15:24:17FromGitter<iffy> Is `close()` the opposite of `addEvent()`?
15:24:17FromGitter<alehander92> i did use an electron app
15:24:30FromGitter<alehander92> it communicated using a socket: this might be easier?
15:24:33FromGitter<iffy> or `unregister()`?
15:24:49leorize[m]unregister iirc
15:24:56FromGitter<alehander92> again with a nim process (which was actually .. probably a sibling process)
15:25:17Araqhow do I redirect stderr again? 2>file ?
15:25:29FromGitter<alehander92> &>
15:25:30FromGitter<iffy> yes
15:25:32FromGitter<alehander92> i just had to do it today
15:25:33leorize[m]yea
15:25:37disruptekit's a fd leak afaik.
15:25:53leorize[m]@iffy you should avoid threadpool for this stuff though
15:26:01FromGitter<iffy> solved with `unregister()` right, disruptek?
15:26:08disruptekyes.
15:26:28FromGitter<iffy> leorize: I'd love to avoid a threadpool, but that's the best way I've seen to cross-platform read from stdin asynchronously
15:26:28FromGitter<alehander92> disruptek i plan on writing a mini container runtime
15:26:39disrupteki pitty the fool.
15:26:42FromGitter<alehander92> do you have any insight in that, as you have like 20 projects
15:26:47leorize[m]@iffy threadpool is designed for threaded computation workload, if you do blocking I/O it will take up a slot in the pool
15:26:51FromGitter<alehander92> so probably you did that by accident
15:26:53FromGitter<alehander92> sometime
15:27:00leorize[m]use normal createThread() and friends instead
15:27:31FromGitter<iffy> As I only have one thread ever being used, is it a problem?
15:28:01disrupteki dunno what "mini container runtime" means but it sounds like a reinvention of the wheel.
15:28:24leorizeAraq: btw use `2>file` instead of `&>`
15:28:29leorize`&>` is bash-only
15:29:07disruptek2>&1
15:29:13leorize@iffy you can never be too careful
15:30:49leorize@iffy unregister and close AsyncEvent after use
15:31:07FromGitter<bung87> alehander92 send a list https://pastebin.com/VQW3Kxfv
15:31:12FromGitter<iffy> Can I do it immediately after `trigger()`?
15:31:30Araqthanks
15:31:47FromGitter<iffy> Or should I do it in the callback?
15:32:06disrupteki don't think it matters, but i wouldn't do it in the cb.
15:32:50Araqwell threadpool is complex code on top of createThread so if you don't need it, better avoid it
15:33:12FromGitter<iffy> k, I'll attempt a change
15:33:29FromGitter<iffy> Hopefully this fixes my fd leak; thank you all!
15:33:33Araqso ... my cursor inference breaks disruptek's "bump" tool
15:34:09disruptekfunny.
15:34:17Araqsoftware development were so much easier without tests
15:34:26leorize@iffy you should do the clean up after Future completion
15:34:29disrupteki knew it should have been a shell script.
15:34:37leorizethat'd be the safest way
15:34:57Araqdisruptek: well I also have "easier" code in the suite that also fails
15:35:22Araqdo we want to conflate cursor inference with "sink inference"?
15:35:25FromGitter<iffy> @leorize how do I do that? I see my only options as "right after trigger" or "in the callback." I don't know how else to know that the Future has completed.
15:35:35leorizefut.addCallback
15:35:41Araqand maybe name the switch "--unsafeOptimizations"
15:35:44Araq?
15:36:20disruptek"aggressive" is more friendly than "unsafe".
15:36:26Araq--winBenchmarkAndFailForComplexCasesButComplexCasesAreIOboundAnyway
15:36:49leorizeshouldn't all optimizations be enabled by default instead?
15:37:01leorizeif it can't be they maybe it's not really worth it?
15:37:13Araqyeah yeah, I'm fixing the bugs
15:37:56disrupteki can't believe anyone wrote code that is simpler than bump, but i guess i know a compiler author who has just such a superpower.
15:41:58FromGitter<alehander92> disruptek yeah
15:42:12FromGitter<alehander92> my plan is to just implement small examples of stuff that exists
15:42:12disruptekdude.
15:42:20FromGitter<alehander92> like mini-package manager
15:42:22FromGitter<iffy> @leorize oh right; I thought the existing callback was that Future's callback. I missed that
15:42:30FromGitter<alehander92> mini-x
15:42:31disruptekwell, i need something that's like a cloudbased runtime.
15:42:38FromGitter<alehander92> NOT MINI
15:42:48disruptekno, it has to be mini.
15:42:53disrupteklike, really mini.
15:43:00FromGitter<alehander92> so what does it do
15:43:20disruptekit's a lib that provides a context you can use to operate the cloud.
15:43:41disruptekit knows how to downgrade its perms and it has a concept of identity.
15:44:47FromGitter<alehander92> ok, learning new terms
15:45:01FromGitter<alehander92> what is identity in cloud context
15:45:22*nikita` joined #nim
15:45:22disruptekthe notion that you can differentiate between yourself and any other.
15:45:34leorizedowngrade its perms? like dropping privilages and setup its own sandbox?
15:45:43disruptekdropping privs is enough.
15:45:52FromGitter<alehander92> ok, easy here
15:45:58FromGitter<alehander92> still trying to understand chroot
15:46:05leorizeI know how to do both if anyone is willing to write a lib :P
15:46:15FromGitter<alehander92> please do it :D
15:46:22disrupteki mean, it's in development.
15:46:27*maier quit (Ping timeout: 256 seconds)
15:46:28disrupteki just don't have time to work on it.
15:46:49disruptekthis is nigel i'm talking about.
15:48:00FromGitter<alehander92> is this the song
15:48:11disruptekyeah
15:48:26FromGitter<alehander92> @bung87 awesomke!
15:48:31FromGitter<alehander92> i knew about bocker
15:48:42FromGitter<alehander92> i am interested in building tho
15:49:22livcdwhat's bocker? or is that actually not a typo?
15:49:39FromGitter<bung87> yeah, someday I was wondering the docker internal, so I collected the list.
15:50:08FromGitter<bung87> it's docker in 100 lines of bash.
15:50:41disrupteki didn't see rain for over a year, once.
15:50:53disrupteknow i cannot escape it.
15:51:19livcdi love rain
15:51:21FromGitter<alehander92> @bung87 yeah exactly
15:51:25leorizedisruptek: for starters just wrap something over bubblewrap (the programmable sandbox software)
15:51:35FromGitter<alehander92> is firejail good
15:51:49leorizefirejail is fine for desktop
15:52:05disruptekyou can add that later. i'm just trying to bootstrap the damned thing.
15:52:06FromGitter<alehander92> maaan chroot runs fine
15:52:15leorizechroot is not a security feature fwiw
15:52:16disruptekmaybe i will work on it today, since everyone is all into this shit suddenly.
15:52:32FromGitter<alehander92> yeah i am just finding out about basic linux stuff
15:52:34FromGitter<alehander92> it seems
15:53:16disrupteknothing's basic.
15:53:37FromGitter<alehander92> but yeah chroot not security
15:53:50disruptekeverything's basically something.
15:53:52FromGitter<alehander92> hm, only perl manages to start fine inside my basic folder
15:53:57disruptekbut nothing at all is basic.
15:54:04leorizeeven docker is not a good way to secure things :P
15:54:05FromGitter<alehander92> visual basic
15:54:11FromGitter<alehander92> leorize oh i assume
15:54:24FromGitter<alehander92> i just want to learn a bit better the linux stuff that containers are based on
15:54:33FromGitter<alehander92> and to make a cool minimal project in c++
15:54:46disruptek!repo criu
15:54:49disbothttps://github.com/checkpoint-restore/criu -- 9criu: 11Checkpoint/Restore tool 15 1159⭐ 273🍴 7& 29 more...
15:55:02leorize[m]in C++? do it in nim and save yourself the hassle
15:55:03FromGitter<alehander92> and yeah many ppl are into this and some of my possible jobs
15:55:13FromGitter<alehander92> leorize i need some projects which are not in nim
15:55:17AraqI'd look into pico kernels or whatever its now called
15:55:21FromGitter<alehander92> its hard to find a job with nim
15:56:01Araqtrue. and sad
15:56:02disrupteki'm more about a runtime kernel than i am about processes, if that helps.
15:56:04FromGitter<alehander92> yeah i remember the idea of running just specialized stuff on bare metal / hypervised (?) metal
15:56:18Araqthere is a new OS developed by google
15:56:18FromGitter<alehander92> but this is somewhere in my long mental todo
15:56:25leorize[m]I'll warn you beforehand that security (on linux) is an endless rabbit hole :P
15:56:25Araqforgot its name
15:56:25FromGitter<alehander92> fuschia
15:56:31Araqyeah, maybe that one
15:56:34FromGitter<alehander92> fuchsia
15:56:47disruptekit beats magenta by a mile.
15:56:54FromGitter<alehander92> leorize i am really not very interested in security
15:56:57disrupteki don't like what i read about it, though.
15:57:02FromGitter<alehander92> like, i am to an extent, but not as an expert
15:57:34disrupteki consider security orthagonal to my work, honestly.
15:57:38leorizesame here, it's fun to look at, and a horror to work on :P
15:57:52FromGitter<alehander92> Araq sorry this wasn't a dig at nim, i actually want to work some time with other languages, currently my nim knowledge suffers as i am not well versed with c++/rust etc
15:58:21Araqno offense taken, it sucks not be Rust
15:58:25Araq*not to be
15:58:38leorizeone day I'll have to learn rust just to get a leg up at jobs :P
15:58:57FromDiscord<Recruit_main707> just create a nim-rust bacjed :wesmart:
15:59:02disruptekit's okay. we will be at the finish line first.
15:59:03FromGitter<alehander92> yeah: i do plan to keep working on the parallel compiler experiment and on some RFC-s
15:59:22FromGitter<alehander92> i have a very annoying rfc planned which people will dislike!
15:59:29Araqthis is so weird
15:59:57Araqmy analysis says "if n is inferred as .cursor it would explain the crash you're seeing"
16:00:09*maier joined #nim
16:00:16Araqproblem is: n isn't inferred as .cursor
16:00:34disruptekarc knows what n is better than you.
16:00:57leorize@alehander92 I'll hate it if you RFC something to get rid of `result` :P
16:01:16leorizeoh wait someone already did that
16:01:23FromGitter<oskca> hi @Araq , how to subclassing an imported C++ class and export it back to C++ world?
16:01:50disruptekagree, i use result in most procedures i write. and i exploit it in most cases. clearly, objectively, i cannot support its removal.
16:02:12Araqoskca: I only got it to work with .emit
16:02:21Araqbut I did get it to work :-)
16:02:59FromGitter<alehander92> leorize sorry, it's only half-prepared in an old chat somewhere
16:03:00FromGitter<oskca> ok, thanks
16:03:09FromGitter<alehander92> but it's not about result :)
16:03:25leorizethen I'm cool :P
16:05:06*maier quit (Ping timeout: 258 seconds)
16:05:54Araqalehander92: tell us about your RFC please :-)
16:18:49*marnix joined #nim
16:19:12livcdoskca: are you the guy that did sciter bindings?
16:21:26*NimBot joined #nim
16:24:12FromGitter<alehander92> Araq i'll try to write it down tomorrow
16:37:31FromGitter<iffy> As I convert my stdin-reader to use createThread, should I return results via FlowVars or Channels?
16:44:15FromDiscord<Clyybber> sent a long message, see http://ix.io/2rCm
16:44:21FromDiscord<Clyybber> Currently it throws an illegal recursion error
16:48:35*Trustable joined #nim
16:49:46*marnix quit (Ping timeout: 256 seconds)
16:50:41*waleee-cl quit (Quit: Connection closed for inactivity)
16:55:33*marnix joined #nim
17:05:48*audiophile quit (Read error: Connection reset by peer)
17:08:42*fredrikhr quit (Read error: Connection reset by peer)
17:10:41*fredrikhr joined #nim
17:12:17*the_pumpkin_man joined #nim
17:12:54the_pumpkin_manHello, I was looking at this language, does it has a working TUI library ?
17:13:11the_pumpkin_manI've looked at nimbox and nim-ncurses, both don't work
17:13:14solitudesf!repo illwill
17:13:14disbothttps://github.com/johnnovak/illwill -- 9illwill: 11 15 110⭐ 11🍴 & 1 more...
17:13:41disruptek!help
17:13:53FromDiscord<dom96> the_pumpkin_man: nimbox doesn't work? I've used it a few years back, might be simple to fix
17:13:59disruptekit was worth a shot.
17:14:25the_pumpkin_mandom96: There's an error about missing termbox.h
17:14:35the_pumpkin_mansolitudesf: Thanks I will try this
17:14:53*waleee-cl joined #nim
17:15:01disruptekyou'll like it.
17:15:23the_pumpkin_manYou should probably add the TUI tag, couldn't find it with `nimble search`
17:16:02FromDiscord<dom96> `sudo apt install termbox-dev`?
17:16:40the_pumpkin_mandom96: no doesn't exist
17:16:50the_pumpkin_manAnd the dev would have mentionned such dependency anyway
17:17:07FromDiscord<dom96> Doubt it
17:17:10the_pumpkin_man(because else that would mean he doesn't care about it)
17:18:11the_pumpkin_manBut illwill perfectly works, so thank you !
17:18:19*bung quit (Ping timeout: 258 seconds)
17:18:35*the_pumpkin_man quit (Quit: WeeChat 2.8)
17:22:03Oddmongeri'm searching for informations about cdecl, but it's not in the index
17:22:27Oddmongerit seems to be used for defining a proc as a C function pointer, but i want to be sure
17:22:44solitudesf~manual
17:22:44disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html
17:23:19disruptek#14976 holy shit
17:23:22disbothttps://github.com/nim-lang/Nim/pull/14976 -- 3escape analysis: enables memory safe views (cf 1st class openarray) and optimizations ; snippet at 12https://play.nim-lang.org/#ix=2rCC
17:23:49Araqdisruptek: yeah it's nice but I cannot merge it because it uses 'continue' everywhere :P
17:23:53AraqXD
17:26:16Oddmongersolitudesf: i've already looked at the manuel, and the index (no entry in the index)
17:26:29Oddmongerthe manuel definition is not clear for me : «The cdecl convention means that a procedure shall use the same convention as the C compiler. »
17:27:08Oddmongerconvention ? Means register/stack parameters passing for example ?
17:27:25Araqyes, that one
17:27:30FromGitter<iffy> How do I pass my `string` to a proc expecting a `var openArray[char]` (I'm looking at `File.readChars`)
17:29:19OddmongerAraq: i'm not sure you were answering to me, but in that case, is it important to specify it for a callback ?
17:29:22FromDiscord<Rika> have you tried just passing it? (i dont know)
17:29:28AraqOddmonger: yes and yes
17:29:41Oddmongerok , thank you
17:30:42FromGitter<iffy> oh, derp... save your file before you run it
17:35:37FromGitter<ynfle> Anyone want to help me debug `SIGSEGV` that aren't consistent across platform?
17:41:04disruptekrika: rude.
17:41:43disruptekwhat's wrong with gram?
17:42:12*junland quit (Quit: %ZNC Disconnected%)
17:42:56*junland joined #nim
17:44:36FromGitter<iffy> @leorize how's this version? http://ix.io/2rCI It assumes AsyncEvent is safe to pass through a channel (and tuples, for that matter). No longer uses streams, and I think it might be more efficient by writing into a string rather than appending to one.
17:45:19FromGitter<iffy> Also, it seems like `event.unregister()` just breaks things, but `event.close()` works
17:46:09FromGitter<iffy> I get `Event is not registered in the queue!` when I call unregister
17:49:13FromDiscord<Rika> disruptek: ???????????????????????
17:49:50FromDiscord<Rika> grim? it takes a fucktonne of ram when the node, edge, and label counts are high
17:52:08FromDiscord<Varriount> iffy: Is the event being unregistered in a different thread from where it was registered
17:54:41FromDiscord<Varriount> ynfle: What's the problem?
17:59:05*rockcavera joined #nim
18:01:26disruptekrika: grim or gram?
18:03:21disruptek!repo gram
18:03:21disbothttps://github.com/disruptek/gram -- 9gram: 11Generic graphs in Nim 15 4⭐ 0🍴 7& 4 more...
18:03:41disruptekgram is pretty heavy, but i've barely done any work on it.
18:03:45FromDiscord<Rika> disruptek: grim, ill take a look at gram
18:04:04disruptekit's more about solving the api problem i had with grim.
18:04:38FromDiscord<Rika> which is?
18:07:55FromDiscord<Clyybber> Araq: https://github.com/nim-lang/Nim/blob/Clyybber-movemoodestroy/doc/destructors.rst#cursor-inference-copy-elision shouldn't it output "destroy" ?
18:10:29disruptekrika: i hated it.
18:12:13FromDiscord<Rika> i see
18:12:19FromDiscord<Rika> ill watch this repo though
18:19:24disrupteksure. i haven't gotten a comment on my bug report from months ago, afaik.
18:22:12FromDiscord<Clyybber> which one
18:22:55FromDiscord<Clyybber> oh, nevermind, thought you were talking about nim
18:26:31disrupteknah; if i hated nim, you'd have heard about it sooner.
18:48:01*Jesin quit (Quit: Leaving)
18:49:02FromGitter<kdheepak> I have a silly nim question. I have a package that is a binary, and I now want to use it as a library in another program. When I nimble install it, nimble doesn't pull in any source files, so I'm not able to import it as a library in the other package. Is there a way to do this?
18:50:57FromGitter<kdheepak> I just have one file in the package as a binary that I want to convert to a library. So I don't need to use a packagepkg folder.
18:51:11shashlickyou can make it a hybrid - you can install just that file or a bunch of files by extension
18:51:41shashlick`installDirs`, `installFiles` or `installExt`
18:51:51shashlicksee nimterop for an example
18:52:19disruptekif you didn't create the package, use `nimble develop` or whatever.
18:53:54shashlickdisruptek: is nimgit2 in a good place now? i see gittyup still asks for git2Git but nimph is updated
18:54:16FromDiscord<Varriount> @Clyybber Is any of the current work on destructors going to place destructors calls in the middle of a function? For example, at the end of a 'for' or 'block' scope?
18:54:52disruptekshashlick: gittyup.nim.cfg has no bearing on nimph.
18:55:13FromDiscord<Clyybber> @Varriount Yeah! Thats actually what was being worked on the last weeks
18:55:23FromDiscord<Clyybber> We place them at the end of scopes
18:55:27shashlickagreed but if anyone else wants to use gittyup directly
18:55:49shashlickwell, even then it won't have any bearing
18:55:52shashlickokay cool
18:55:52disruptekit's only used during development afaict.
18:55:59FromGitter<kdheepak> Thanks shashlick. `installFiles` is what I wanted.
18:56:07shashlickkdheepak - did you see lazylib
18:59:48FromDiscord<Varriount> @Clyybber Oh good, that's what I thought. What are your thought on this then? https://github.com/nim-lang/Nim/pull/14976
18:59:49disbotescape analysis: enables memory safe views (cf 1st class openarray) and optimizations ; snippet at 12https://play.nim-lang.org/#ix=2rCC
19:00:10*debased joined #nim
19:00:44FromDiscord<Clyybber> not sure yet. I think we need escape analysis at some point for views/lent/cursor which are basically the same concept
19:01:02FromDiscord<Clyybber> but I feel like it should be using the dfa
19:01:42skrylar[m]so. i was looking at replacing the derpy bmessage serializer with a tlsf one
19:01:53skrylar[m]although messages are probably so small this wasnt worth it
19:02:04*tane joined #nim
19:02:15FromDiscord<Clyybber> oh, I only now see your comment
19:02:33FromGitter<iffy> Varriount: It's calling `unregister()` in the same thread: http://ix.io/2rCQ
19:03:07FromDiscord<Clyybber> @Varriount yeah, I think its a real issue. It should use the symbolic/destructor scope
19:03:49*marnix quit (Ping timeout: 264 seconds)
19:04:37FromDiscord<Clyybber> (edit) 'symbolic/destructor' => 'lexical/destructor'
19:05:23FromDiscord<Clyybber> at least for types that have a destructor
19:05:23FromDiscord<Varriount> @Clyybber I mean, I know that we shouldn't necessarily be aiming for "perfect" in a proposal like this, but it's important to discuss where such features should eventually reach.
19:06:01FromDiscord<Clyybber> yeah, definitely
19:06:14FromDiscord<Clyybber> I think we should always aim for "perfect" :p
19:07:44*Jesin joined #nim
19:08:09*marnix joined #nim
19:08:54FromDiscord<Varriount> The unfortunate truth is that, with the rise of GC'd languages such as Go, Perl, Python, etc., knowledge of stack vs heap allocation has become less important. Symbolic scope, on the other hand, is still a common concept.
19:09:08FromGitter<tim-st> wouldn't this be good for stdlib: https://play.nim-lang.org/#ix=2rCT (counting sort overload for some int types; O(n) runtime)
19:10:39FromDiscord<Varriount> @tim-st doesn't the stdlib already have a sort function?
19:11:05FromGitter<tim-st> yes, sure, but I think it uses the same for all types
19:11:54FromGitter<tim-st> I tested a huge array which sorted in 6seconds, nims sorting didnt return after 60 seconds
19:12:48FromDiscord<Clyybber> @Varriount Yeah, true. Although regarding destructors it shouldn't really matter. Accessing a destroyed object thats on the stack is definitely a bad idea
19:13:12supakeenBeen toying with Nico, it's so neat!
19:13:17FromDiscord<Clyybber> especially since that object might actually be a custom ref type or similar
19:15:14FromDiscord<Clyybber> interestingly enough the lexical scope isn't exactly the same as the destructor scope
19:16:12FromDiscord<Clyybber> since in `if cond: ...` or `while cond: ...` the cond is considered part of the outside scope as far as destructors are concerned, while its considered part of the inner scope as far as lexical scope is concerned
19:19:43FromDiscord<Varriount> @Clyybber Huh, why is that? Why not make the scopes the same?
19:19:57FromDiscord<Clyybber> its not possible
19:20:13FromDiscord<Clyybber> since cond needs to be destroyed even in the case it evaluates to false
19:21:28FromDiscord<Varriount> Oh, see. Why not place the destructor right after the statement block then?
19:22:16FromDiscord<Clyybber> funny, I just had the same thought :D
19:22:58FromDiscord<Clyybber> I'm thinking if that could also be accomplished by moving the destructors as far up as possible
19:23:21FromDiscord<Clyybber> hmm, I don't think so.
19:24:03FromDiscord<Clyybber> hmm, I think I found the "right" way to think about this in terms of scopes
19:24:25FromDiscord<Clyybber> `if cond:` is its own scope with `: ...` being a subscope of that
19:24:39FromDiscord<Varriount> Yeah
19:25:31FromGitter<iffy> Is there an alternative to `AsyncEvent` that can be triggered multiple times? Or is there a way to have a worker thread cause a proc call in the main thread if the main thread is doing `runForever()`? I'm opening too many file descriptors with the number of AsyncEvents I'm making.
19:26:16FromDiscord<Varriount> iffy: were you able to figure out your other problem?
19:26:35FromGitter<iffy> This is part of the same problem
19:27:45FromDiscord<Varriount> Hm, a workaround could be raising the descriptor limit
19:28:29FromDiscord<Varriount> iffy: Channel + a rescheduling future procedure?
19:28:41FromGitter<iffy> :) yes, in the short term I'll tell my user that
19:29:11FromDiscord<Varriount> Do we have async thread channels?
19:29:38FromGitter<tim-st> should `s.add(s)` work, where `s` is `var seq[int]`?
19:30:23FromGitter<tim-st> `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`
19:30:34FromDiscord<Varriount> tim-st: No, because s isn't an integer
19:30:59FromDiscord<Varriount> That should cause a compile-time error
19:31:05FromGitter<tim-st> Varriount: there is an overload proc
19:31:43FromGitter<tim-st> I would assume this to work, maybe the memory is freed too early
19:32:10FromDiscord<Clyybber> @Varriount Theres an overload that adds a seq to another seq
19:32:43FromDiscord<Clyybber> But the issue is that its illegal aliasing
19:32:51FromDiscord<Clyybber> which ideally the compiler would detect
19:32:55FromDiscord<Clyybber> but doesn't currently
19:34:01FromGitter<tim-st> Clybber: what does this mean? is it only allowed to use other seqs as parameter?
19:34:51FromGitter<tim-st> a simple example works: https://play.nim-lang.org/#ix=2rD1
19:34:59FromGitter<tim-st> maybe the problem is with arc only
19:35:47FromDiscord<Clyybber> Yeah, it might be exclusive to arc
19:36:07FromDiscord<Clyybber> Since add is evaluated left to right
19:36:21FromDiscord<Clyybber> but the RHS parameter of add is sink
19:36:39FromDiscord<Clyybber> Which will invalidate the LHS s
19:36:41FromGitter<tim-st> yes, I checked, my code works without arc
19:36:45FromDiscord<Clyybber> I *think*
19:37:12FromDiscord<Clyybber> Workaround is to use a temporary
19:38:48FromGitter<tim-st> Clybber: thanks! it works with a temp seq
19:46:29FromDiscord<Clyybber> @Varriount Hmm, actually that isn't the "right" way to think about it either, since theres no way we could destroy `cond` in `if cond: ... elif othercond: ...` before the elif part, even though in the elif part cond isn't accessable anymore
19:46:43FromDiscord<Clyybber> Without introducing a lot of unneccessary temporaries that is
19:46:51FromDiscord<Clyybber> (edit) 'unneccessary' => ''
19:47:23FromGitter<iffy> Varriount, leorize: okay this version only uses max 1 file descriptor at a time and doesn't require any polling: http://ix.io/2rD6
19:48:44FromDiscord<Clyybber> hmm, actually we could if we expand the elifs into if: ... else: nestings
19:49:39disruptekthat's the only realistic approach, imo.
19:50:23FromDiscord<Clyybber> yeah
19:50:58FromDiscord<Varriount> iffy: To be honest, I haven't dealt with the async part of the stdlib much.
19:51:01disrupteki have to do the same thing in cps.
19:51:03FromDiscord<Clyybber> Araq: Wdyt? (expanding elifs into else: if: before or during injectdestructors)?
19:52:10FromDiscord<--HA--> I'm probably missing something but is there no sort for sequences?
19:52:29disrupteksee algorithm module.
19:54:15leorize@iffy I'll try to pull off a cross-platform single threaded version for you
19:54:48FromDiscord<--HA--> Thanks disruptek
19:54:51FromGitter<iffy> I will be impressed -- and then make a PR to put it in stdlib :)
20:01:36*narimiran joined #nim
20:01:53*Trustable quit (Remote host closed the connection)
20:02:25FromDiscord<gingerBill> I have been experimenting with Nim's `Channel` type and I found that they the buffered ones dynamically grow. Why do they grow rather than have a fix size and then block? Or not allow for that?
20:06:51FromDiscord<Varriount> @gingerBill Channels can be unlimited or have a max size: https://nim-lang.org/docs/channels.html#open%2CChannel%5BTMsg%5D%2Cint
20:09:11FromDiscord<gingerBill> I'll rephrase my question 😛
20:12:13FromDiscord<Galdor Sereg> Is nim edit ready to use yet?
20:12:49FromDiscord<Rika> nim edit?
20:13:09FromDiscord<Galdor Sereg> https://github.com/Araq/nimedit↵https://nim-lang.org/nimedit/
20:14:09*fredrikhr quit (Read error: Connection reset by peer)
20:14:20FromDiscord<gingerBill> sent a long message, see http://ix.io/2rDk
20:14:25FromDiscord<gingerBill> (edit) 'http://ix.io/2rDk' => 'http://ix.io/2rDl'
20:14:46*Vladar quit (Quit: Leaving)
20:16:10FromDiscord<gingerBill> I was wondering, why allow for the buffered unlimited capacity non-blocking channel case?
20:17:05*lbart joined #nim
20:17:05*lbart quit (Changing host)
20:17:05*lbart joined #nim
20:20:14*marnix quit (Ping timeout: 240 seconds)
20:29:52FromGitter<deech> How do I pretty print an ast generated by a macro?
20:30:21FromGitter<deech> So I guess the macroexpand equivalent for Nim.
20:31:17FromDiscord<lqdev> macros.expandMacros
20:33:24FromGitter<ynfle> `echo result.repr` in the macro
20:36:19FromDiscord<lqdev> or `result.treeRepr` if you want to see what the actual AST is
20:36:56FromGitter<deech> expandMacros worked, thanks!
20:38:52FromDiscord<Yardanico> @Galdor Sereg it's abandoned I think
20:39:54FromDiscord<Galdor Sereg> Well, foop. I was hoping it would become a thing, I'm trying to get NeoVim working with Nim and not having success. But I'll keep at it 🙂
20:40:24FromDiscord<Yardanico> Are you using https://github.com/alaviss/nim.nvim ?
20:40:34FromDiscord<Yardanico> Also @leorize is here :P
20:40:47FromDiscord<Galdor Sereg> Yes, that's the one I'm trying to get up and going 🙂
20:41:08FromDiscord<Galdor Sereg> I'm just not very knowledgeable with Vim, so its a beginner on multiple fronts :p
20:41:12*debased quit (Quit: WeeChat 2.8)
20:41:35leorizewhat is the problem?
20:41:38FromGitter<ynfle> https://github.com/fox0430/moe
20:41:40FromDiscord<dom96> Why are you going with Vim? Why not VS Code?
20:41:57disrupteki think he wants it to work.
20:42:29FromDiscord<Elegant Beef> Well if that was the case, why not use nano
20:42:42FromDiscord<lqdev> because vim is way superior
20:42:50FromDiscord<Elegant Beef> But clearly it doesnt work
20:42:59FromDiscord<lqdev> it does?
20:43:11FromDiscord<lqdev> it's probably an issue with his setup.
20:43:24FromDiscord<Rika> man can we focus on the issue here
20:43:27FromDiscord<lqdev> so let's help him debug.
20:43:31FromDiscord<Rika> we're not here to debate which editor is better
20:43:38FromDiscord<Galdor Sereg> @dom96 I want to use my samsung dex with it. And VS code does not work well on Dex
20:43:49FromDiscord<dom96> ahh
20:43:54FromDiscord<Elegant Beef> I thought it was clear i was countering disruptek's joke with a joke 😦
20:44:04FromDiscord<Rika> it was not
20:44:07leorizeso.. what's the issue?
20:44:09FromDiscord<lqdev> alright @Galdor Sereg, what are you stuck on?
20:45:49FromDiscord<Shucks> I don't like to use editors which are smarter than me... vim ;p
20:46:20FromDiscord<Galdor Sereg> It's probably just user error, but I can't get Nim to start up, like when I start typing it doesn't register as Nim code, just text.
20:46:30FromDiscord<lqdev> hm
20:46:34FromDiscord<Galdor Sereg> I'm thinking its just setup error, cause I've never done it before and I just need to keep at it
20:46:42leorizescreenshots please? :)
20:46:47FromDiscord<Rika> did you save the file
20:47:08FromDiscord<lqdev> you don't need to save the file, keywords like `proc` should be highlighted anyways
20:47:11FromDiscord<lqdev> check that
20:47:26FromDiscord<lqdev> but symbols won't be highlighted until you save
20:47:47FromDiscord<lqdev> for starters, try `:set ft=nim`
20:48:38FromDiscord<Shucks> Damn, nim had its own ide? I would kill to use it.
20:48:53disruptekgood; i have a list of people i need to remove.
20:49:17FromDiscord<Shucks> If you bring up NimEdit I gonna do it.
20:50:58FromDiscord<Yardanico> aporia was there
20:51:01FromDiscord<Yardanico> https://github.com/nim-lang/Aporia
20:51:37*Guest55294 quit (Remote host closed the connection)
20:51:45FromDiscord<Yardanico> but it's gtk2
20:52:20FromDiscord<Galdor Sereg> That's what I get when trying to :set ft=nim https://media.discordapp.net/attachments/371759389889003532/732701031451852831/Neovim_2.JPG
20:52:32FromDiscord<Rika> uh
20:52:35FromDiscord<lqdev> that's odd.
20:52:39FromDiscord<Rika> press escape and try again?
20:53:32FromDiscord<lqdev> look at the bottom right corner of your screen, there's a `c` and it shows you your current movement (or whatever it's called)
20:53:41FromDiscord<lqdev> if you want to bring up the command line it needs to be empty
20:53:48FromDiscord<Rika> so press escape
20:53:52FromDiscord<lqdev> exactly
20:54:00FromDiscord<lqdev> it cancels the current movement
20:54:02FromDiscord<Rika> to cancel the
20:54:02FromDiscord<Rika> yeah
20:54:05disruptekalt-f4 turns on aiming assist.
20:54:12FromDiscord<Galdor Sereg> That time it put it on the screen
20:54:17FromDiscord<Rika> ?
20:54:18FromDiscord<Rika> wdym?
20:54:21FromDiscord<Galdor Sereg> I think I need to go study Vim for a little bit
20:54:29FromDiscord<Galdor Sereg> It typed it into the text area
20:54:29FromDiscord<lqdev> yeah, use :Tutor to get started
20:54:35FromDiscord<Rika> that should be correct yes
20:54:37FromDiscord<Rika> then press enter
20:55:05FromDiscord<Rika> looks like this right? https://media.discordapp.net/attachments/371759389889003532/732701726167138307/unknown.png
20:55:13FromDiscord<Rika> at least the lowest row
20:55:29FromDiscord<Rika> if so, just press enter to run the command
20:55:49FromDiscord<Rika> ~~i learned vim without using the Tutor~~
20:56:16FromDiscord<Galdor Sereg> I'm pretty sure I need the tutor, cause its not doing anything in either place https://media.discordapp.net/attachments/371759389889003532/732702025871261728/Neovim.JPG
20:56:31FromDiscord<lqdev> press i to enter insert mode
20:56:37FromDiscord<lqdev> and type `proc`
20:56:40FromDiscord<lqdev> or some other keyword
20:57:22FromDiscord<Galdor Sereg> Shows up like regular text
20:57:50FromDiscord<lqdev> try the tutor, please.
20:58:05FromDiscord<lqdev> to learn basic movement and stuff
20:58:12FromDiscord<Galdor Sereg> I will 🙂 I tihnk I might need to just reinstall from scratch and try again
20:58:18FromDiscord<Rika> i have a feeling... that you dont actually have the plugin installed
20:58:18FromDiscord<lqdev> no need to
20:58:19FromDiscord<Galdor Sereg> (edit) 'tihnk' => 'think'
20:58:27FromDiscord<lqdev> we can carry on with syntax and stuff after you learn the basics :)
20:58:37FromDiscord<Galdor Sereg> @Rika it's completely possible :p
21:01:00*casaca quit (Excess Flood)
21:01:12*casaca joined #nim
21:02:01FromDiscord<dom96> > https://github.com/nim-lang/Aporia↵@Yardanico Aporia was the shit
21:02:09FromDiscord<Yardanico> ?
21:02:14FromDiscord<Yardanico> you pigned the wrong person I think 😛
21:02:31FromDiscord<dom96> I quoted you 🙂
21:02:43FromDiscord<Yardanico> there's also my fork with some fixes so it at least launches on latest nim, but it still has crashes and stuff https://github.com/Yardanico/Aporia
21:02:56FromDiscord<Yardanico> and I don't know if I translated socket code to async correctly
21:03:00FromDiscord<lqdev> I may have a shot at writing a Nim editor at some point, but not now. I have more important projects on my head, and neovim servers me very well
21:03:15FromDiscord<dom96> Yeah, don't do it. It's a massive time sink.
21:03:33FromDiscord<dom96> If I had the time I would simply create a great plugin for VS Code
21:03:55FromDiscord<Clyybber> Argh, theres an issue when we expand all the elif into else: if:
21:04:25FromDiscord<Clyybber> when the expanded thing is an if expression
21:04:33FromDiscord<Clyybber> because then we'll get a lot of temporaries
21:04:59*narimiran quit (Ping timeout: 240 seconds)
21:05:18FromDiscord<Clyybber> ah, nevermind. I think that could be done without temporarie
21:05:19FromDiscord<Clyybber> s
21:06:12*casaca quit (Max SendQ exceeded)
21:06:13FromDiscord<dom96> holy shit, Guido is turning Python into Nim https://lwn.net/ml/python-ideas/CAP7+vJKsrT-n4rHjaR4PYPRq09JOZcoR54ZjkboOkZcYhB+7oA@mail.gmail.com/
21:06:27*casaca joined #nim
21:06:33FromDiscord<Yardanico> ahhaha
21:07:14FromDiscord<Yardanico> "I believe there are some other languages that support a similar grammar↵(Ruby? R? Raku?) but I haven't investigated." didn't mention Nim smh 😦
21:07:50FromDiscord<dom96> Hopefully he sees my comment https://news.ycombinator.com/item?id=23837893
21:08:34FromDiscord<Clyybber> Araq: Hmm, maybe we really *should* do the statementizing in injectdestructors
21:09:05FromDiscord<Yardanico> @dom96 is he on HN though?
21:09:18FromDiscord<Yardanico> you can post in the mail list since it's public 😛
21:09:42FromDiscord<dom96> Probably not. Also this message is from June
21:10:46FromDiscord<Shucks> huh. This isn't python? Was just wondering why pycharm doesnt works!
21:11:26FromDiscord<Yardanico> ?
21:12:02FromDiscord<Shucks> nvm. Doing bad jokes is something of my best skills.
21:12:43FromDiscord<Yardanico> @tim-st what corruption were you talking about with ARC?
21:12:56FromDiscord<Yardanico> with your example in https://github.com/nim-lang/Nim/issues/14983 I get the exact same results with refc/arc/arc + useMalloc
21:12:58disbotmemory corruption for seq.add(seq) with gc:arc and d:useMalloc ; snippet at 12https://play.nim-lang.org/#ix=2rDE
21:13:10FromDiscord<Yardanico> on latest devel
21:13:15FromDiscord<Rika> @dom96 many people dont like it it seems
21:13:46FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/732706426752991242/unknown.png
21:13:50FromDiscord<Yardanico> I think that clyybber's PR might've fixed it, not sure
21:14:35FromGitter<tim-st> Yardanico: I try to find a newer nightly build for windows and test it again
21:14:52*tane quit (Quit: Leaving)
21:15:04*nikita` quit (Quit: leaving)
21:15:21FromDiscord<Yardanico> try this ones:
21:15:37FromDiscord<Yardanico> https://github.com/alaviss/nightlies/releases/tag/2020-07-13-devel-6cc0061a72826022991262eb8e31b97f6fdf37e9
21:15:43FromDiscord<Yardanico> windows x32 or x64 depending on what you want
21:15:44FromDiscord<Clyybber> oh, did I?
21:15:50FromDiscord<Clyybber> that would be cool if I did fix it
21:16:01FromDiscord<Yardanico> @Clyybber well it works for me correctly as far as I can see
21:16:08FromDiscord<Clyybber> oooooooh, seems like my analysis before was wrong
21:16:18FromDiscord<Clyybber> yeah, this is a case that *should* be working
21:16:34FromDiscord<Yardanico> valgrind doesn't show any errors either
21:16:35FromDiscord<Yardanico> "==17486== total heap usage: 14 allocs, 14 frees, 6,324 bytes allocated"
21:16:35FromDiscord<Clyybber> *probably*
21:16:41FromGitter<tim-st> Yardanico: thanks for the link, I searched a complete page before :\
21:16:58FromDiscord<Yardanico> ah it shows some errors though
21:17:02FromDiscord<Yardanico> "Invalid read of size 8"
21:17:05FromDiscord<Yardanico> hrm
21:17:09FromDiscord<Clyybber> ah
21:17:16FromDiscord<Clyybber> well then I know the cause
21:17:27FromDiscord<Clyybber> its because the seq is getting sinked on the RHS
21:17:39FromDiscord<Clyybber> but is getting evaluated before that on the LHS
21:17:46FromDiscord<Clyybber> now thats not an issue
21:17:49FromDiscord<Yardanico> also, anyone knows how to update locally checked out github PR with git?
21:17:54FromGitter<tim-st> originally I wanted to create the issue from two hours ago, but then I saw this one...
21:17:56FromDiscord<Clyybber> unless add determines it should grow the seq
21:17:59FromDiscord<Yardanico> I mean I checked it out a few days ago, how to pull in latest changes now?
21:18:00FromDiscord<Clyybber> and thus realloc
21:19:00Yardanico!status
21:19:02FromDiscordUptime - 6 days, 12 hours, and 24 minutes
21:19:21FromGitter<tim-st> No, it's not fixed
21:19:25*natrys quit (Ping timeout: 264 seconds)
21:19:33FromGitter<tim-st> same issues on devel from 13th of july
21:19:58FromDiscord<Clyybber> my fixes came in today, but yeah they don't fix it
21:20:35FromGitter<tim-st> ok, I didnt check the commits later than this date
21:21:10FromGitter<tim-st> now I have to reproduce this other issue which created segfault
21:30:36*audiophile joined #nim
21:33:45FromDiscord<Yardanico> @Clyybber just a quick question - orc-specific code (e.g. checking objects for cycles, etc) is inserted in the backend?
21:34:03FromDiscord<Yardanico> or in the compiler frontend before the codegen?
21:41:35FromDiscord<Yardanico> on an unrelated note ircord has been running for 6.5 days without restarts 😛
21:42:09disruptekorc is in the frontend.
21:42:53FromDiscord<Yardanico> wait really?
21:43:51leorizeyea, there's even a new --expandArc which will show you the AST transformation done by destructors in 4raq pending PR
21:44:44FromGitter<tim-st> when I'm using arc and I don't know, if I have a cycle in my code, will the compile see it?
21:44:57FromDiscord<Yardanico> use orc when not sure
21:45:03FromDiscord<Avatarfighter> What is up everyone
21:45:07FromDiscord<Yardanico> well @leorize I'm in the process of toying around with expandArc
21:45:07leorizeunless it's super obvious, the compiler wouldn't know
21:45:10FromDiscord<Yardanico> so I asked
21:45:19FromDiscord<Yardanico> because I don't see orc-specific code in expandArc 😛
21:45:20FromGitter<tim-st> ok, thanks
21:45:23FromDiscord<Yardanico> well it might make sense
21:45:37leorizeuse orc for programs, but design with arc in mind for libraries
21:46:14FromGitter<tim-st> orc has the "stop the world gc" thing, right?
21:46:19FromDiscord<Yardanico> yeah, basically it's better to design data structures without cycles (if it's possible), and use {.acyclic.} when you're sure that your object type isn't cyclic
21:46:25leorize@tim-st nope
21:46:36FromGitter<tim-st> ok, cool :D
21:46:57FromDiscord<Avatarfighter> Stupid question, mostly bc I haven't learned this in school yet but what is a cycle( a GC cycle?)?
21:47:02leorizeorc is kind of a hybrid between a fully thread-safe gc and a thread-local gc
21:47:46FromDiscord<Yardanico> @Avatarfighter it's actually simple
21:48:00FromDiscord<Yardanico> object a points to object b, object b points to object c, object c points to object a
21:48:05FromDiscord<Avatarfighter> oh
21:48:11FromDiscord<Yardanico> that's the simplest example 😛
21:48:14FromDiscord<Avatarfighter> ok yeah
21:48:14leorizeIIRC arc/orc have limited data sharing between threads in the form of graph moving, meaning references must be moved between threads and no two threads can (safely) access the same ref at the same time.
21:48:28FromDiscord<Avatarfighter> I had a rough idea of what you guys meant but I don't want to confuse myself lmfao
21:48:30FromDiscord<Yardanico> @leorize I thought it wasn't implemented yet?
21:48:45FromDiscord<Yardanico> @Avatarfighter and cycle here is because even after no other code uses these objects, their refcounts will be 1
21:48:51FromDiscord<Yardanico> because each of them is references 1 time by the other object
21:48:57FromDiscord<Yardanico> (edit) 'references' => 'referenced'
21:49:11FromDiscord<Avatarfighter> Yeah that makes a lot of sense, just don't make circular code basically lol
21:49:14leorizeYardanico: it should be implemented by now, but query Araq just to be sure
21:49:17FromDiscord<Yardanico> you should watch https://www.youtube.com/watch?v=aUJcYTnPWCg 😛
21:49:28FromDiscord<Yardanico> it explains cycles too, and how orc deals with them
21:49:34FromDiscord<Avatarfighter> I shall 😛 Thank you very much 🙂
21:49:37FromDiscord<Yardanico> 27:00
21:49:40FromDiscord<Yardanico> (edit) 'at27:00 ... ' => 'at27:00about orc'
21:49:46FromDiscord<Avatarfighter> Its been a minute since I've written some Nim tbh
21:49:52FromGitter<tim-st> can I have cycles without ref objects?
21:49:59FromDiscord<Yardanico> well yes
21:50:12leorizecycles can be introduced by closures
21:50:16leorizethose are harder to spot
21:50:33FromDiscord<Yardanico> I mean it's still ref objects in the end, but other way -
21:50:38FromDiscord<Avatarfighter> Nim async has cycles right?
21:50:48leorizeloads of cycles, yes :P
21:50:53FromDiscord<Avatarfighter> noice
21:50:59FromDiscord<Yardanico> https://play.nim-lang.org/#ix=2rDW
21:51:02FromDiscord<Avatarfighter> I feel like I've already asked this like 4 times lmao
21:51:03FromDiscord<Yardanico> no explicitly written "ref object" 😛
21:51:11FromDiscord<Avatarfighter> Nice to see you Leorize btw 🙂
21:51:22leorizeo/
21:51:42FromDiscord<Avatarfighter> ok guys this is really easy actually
21:51:50FromGitter<tim-st> but the compiler would know when it creates a closure and at the same time is in compile mode "arc"?
21:52:35leorizeI don't think the compiler is aware of that atm
21:52:41leorizecycles analysis is really premature
21:52:50leorizeif it's good we wouldn't need orc :P
21:53:05FromDiscord<Yardanico> well it's not possible to cover all cases at compile-time 😛
21:53:08FromDiscord<Yardanico> as far as I know
21:53:11FromDiscord<Yardanico> about detecting cycles
21:53:19FromGitter<tim-st> ok, thanks, that's good to know
21:53:30FromDiscord<Avatarfighter> gotta cover them all pre compile-time :GWjiangoPepeGenius:
21:53:33FromDiscord<Avatarfighter> 😛
21:53:43FromGitter<ynfle> @Varriount, if wanna look at the `SIGSEGV` issue https://github.com/ynfle/nim-test-runner/commit/6cbe2994011bc991a5d6609323f20d99b8e0b603 & https://github.com/ynfle/nim-test-runner/runs/871136877
21:53:47leorizeowned ref will help with that once its finalized
21:54:08FromGitter<ynfle> But it seems to be solved (at least locally) with `--gc:arc`
21:54:42FromDiscord<Yardanico> envToCStringArray hm
21:54:51FromDiscord<Avatarfighter> is arc/orc available in the current stable release of nim or do you still need devel to use it?
21:54:54FromDiscord<Yardanico> maybe it's some weird native OS API interaction issue?
21:54:55FromGitter<ynfle> It's using osproc
21:54:58FromDiscord<Yardanico> @Avatarfighter it's much better to use devel
21:55:00FromDiscord<Yardanico> especially for orc
21:55:14FromDiscord<Yardanico> arc has a lot of new stuff in devel too
21:55:24FromDiscord<Avatarfighter> alright I'll set that up then 🙂
21:55:31FromDiscord<Avatarfighter> gosh it feels good to be back to nim
22:04:34*laqq3 joined #nim
22:06:22*laqq3 quit (Remote host closed the connection)
22:06:34*laqq3 joined #nim
22:07:34FromDiscord<Yardanico> oof
22:08:12FromDiscord<Yardanico> so from kostya/benchmarks (I added packedjson there a month ago) json benchmark for nim. last devel refc - ~0.95s, 381mb peak
22:08:26FromDiscord<Yardanico> ah sorry that's with arc
22:08:26FromDiscord<Yardanico> but!
22:08:34*laqq3_ joined #nim
22:09:07FromDiscord<Yardanico> if I replace when isMainModule with proc main = ... main() the memory usage is much less
22:09:09FromDiscord<Yardanico> 262mb peak
22:09:20FromDiscord<Yardanico> because with when isMainModule apparently the compiler couldn't sink a variable
22:09:31FromDiscord<Avatarfighter> lmao what
22:09:39FromDiscord<Yardanico> well it's generally recommended to use proc main
22:09:41FromDiscord<Yardanico> and not global-level code
22:09:54FromDiscord<Yardanico> but I wonder if it's a limitation of global scope
22:09:57FromDiscord<Yardanico> that variables can't be sinked
22:10:59*laqq3 quit (Ping timeout: 240 seconds)
22:12:01FromDiscord<Avatarfighter> got a link to packedjson btw?
22:12:06FromDiscord<Avatarfighter> sounds really interesting
22:12:21FromDiscord<Yardanico> Ihttps://github.com/Araq/packedjson
22:12:26FromDiscord<Avatarfighter> thanks
22:13:30FromDiscord<Yardanico> although the benchmark in kostya/benchmarks is a bit flawed anyway
22:13:39FromDiscord<Yardanico> all implementations there first fully read the file in memory, and then parse
22:13:55FromDiscord<Yardanico> if I change code to make packedjson to parse the file directly (so it can use streams), peak RAM usage is 156mb with latest arc
22:14:11FromDiscord<Yardanico> compare that with 1281mb with stdlib's json 😛
22:14:29FromDiscord<Yardanico> well actually need to change the stdlib test too for fairness
22:15:40FromDiscord<Avatarfighter> wow thats cool
22:16:25FromDiscord<Yardanico> well yeah, changing stdlib json test to parse from file directly strips of ~100mb too (because that's the size of the file)
22:17:10FromDiscord<Yardanico> although apparently packedjson with refc doesn't suffer from high memory usage even in that case
22:17:18FromDiscord<Yardanico> although it's slower than packedjson with arc (1.25s vs 0.9s)
22:17:26FromDiscord<Yardanico> for parsing a 107mb json file
22:17:42FromGitter<ynfle> > But it seems to be solved (at least locally) with `--gc:arc` ⏎ ⏎ Nvm, wrong branch
22:21:01FromDiscord<Shucks> Holy cow. Did anyone managed to get plug.vim runnign with windows neovim?
22:24:23FromDiscord<Clyybber> @Yardanico Its done in liftdestructors
22:25:15FromGitter<awr1> @Shucks I use Plugged, works fine
22:25:36FromGitter<awr1> You may need to make sure your python providers are working
22:28:09FromGitter<awr1> has anyone ever floated the idea of making a hoogle-like docs system for Nim?
22:28:50disruptekno one of sound mind and body.
22:28:52FromDiscord<Shucks> I guess im actually missing some autoload directory
22:29:13*krux02 quit (Remote host closed the connection)
22:29:55FromGitter<awr1> Meh it's just kinda annoying searching for library documentation on google
22:30:10disruptek!repo ndoc
22:30:12disbothttps://github.com/nodeca/ndoc -- 9ndoc: 11js port of pdoc, with extentions 15 93⭐ 8🍴 7& 29 more...
22:30:16disrupteknot that one.
22:30:19disruptek!repo disruptek/ndoc
22:30:20disbothttps://github.com/disruptek/ndoc -- 9ndoc: 11like pydoc but for nim 15 0⭐ 0🍴
22:30:50FromGitter<awr1> hmmm
22:31:22*audiophile_ joined #nim
22:33:46FromGitter<awr1> good ideas here. TBH it wouldn't need to be completely like Hoogle, as in a centralized web-only service, it should work offline too
22:34:11*audiophile quit (Ping timeout: 240 seconds)
22:34:18*audiophile_ is now known as audiophile
22:34:59FromGitter<awr1> nim already kinda has the infrastructure to generate docs in a useful format, i.e. JSON generation
22:43:45leorize[m]@iffy: here's something for you to play with: https://play.nim-lang.org/#ix=2rEc
22:43:50leorize[m]untested on windows
22:45:20FromDiscord<Technisha Circuit (LGBTQIAP+)> Is there something like https://github.com/kkawakam/rustyline for Nim?
22:45:46FromDiscord<Rika> why?
22:45:49FromDiscord<Rika> we have linenoise
22:45:50FromDiscord<Technisha Circuit (LGBTQIAP+)> It implements history, arrow keys, ctrl c and escape codes
22:45:56FromDiscord<Yardanico> yes, exactly
22:45:59FromDiscord<Technisha Circuit (LGBTQIAP+)> What's linenoise?
22:46:06FromDiscord<Technisha Circuit (LGBTQIAP+)> !repo linenoise
22:46:07FromDiscord<Technisha Circuit (LGBTQIAP+)> ?
22:46:07disbothttps://github.com/jangko/nim-noise -- 9nim-noise: 11Nim implementation of linenoise command line editor 15 22⭐ 3🍴 7& 1 more...
22:46:17FromDiscord<Technisha Circuit (LGBTQIAP+)> This?
22:46:40FromDiscord<Rika> yeah basically
22:46:48FromDiscord<Rika> or uh the nim binding
22:47:00FromDiscord<Rika> no package, since it's in stdlib
22:47:05leorize[m]!repo nimprompt
22:47:06disbotno results 😢
22:47:11FromDiscord<Technisha Circuit (LGBTQIAP+)> Oh okay
22:47:16leorize[m]!repo prompt
22:47:17disbothttps://github.com/icyphox/nicy -- 9nicy: 11:snowflake: a nice and icy ZSH prompt in Nim 15 135⭐ 6🍴 7& 6 more...
22:47:39FromDiscord<Rika> https://nim-lang.org/docs/linenoise.html
22:48:01leorize[m]!repo nim-prompt
22:48:02FromDiscord<Recruit_main707> Regarding Nim rfcs... there are very little milestones, is it because basically 99% of the ideas have been rejected already?
22:48:02disbothttps://github.com/icyphox/nicy -- 9nicy: 11:snowflake: a nice and icy ZSH prompt in Nim 15 135⭐ 6🍴 7& 3 more...
22:48:58leorize[m]!repo status-im/nim-prompt
22:48:59disbotno results 😢
22:49:02FromDiscord<Yardanico> @Recruit_main707 because no one adds these 😛
22:49:10FromDiscord<Yardanico> I mean not 99%
22:49:31FromDiscord<Yardanico> a lot of RFCs are accepted
22:49:36FromDiscord<Yardanico> despite not having an "Accepted RFCs" label
22:49:40FromDiscord<Yardanico> not the majority of course
22:50:01*lritter quit (Quit: Leaving)
22:50:27FromDiscord<InventorMatt> are there any updated libraries nim for converting/importing images to arrays?
22:50:46FromDiscord<Yardanico> what do you mean by that?
22:50:49leorize[m]!repo flippy
22:50:50disbothttps://github.com/treeform/flippy -- 9flippy: 11Flippy is a simple 2d image and drawing library. 15 38⭐ 6🍴
22:50:58FromDiscord<Yardanico> to pixels you mean?
22:51:16FromDiscord<Yardanico> but yeah flippy
22:51:34FromDiscord<Yardanico> it only supports png though
22:51:54FromDiscord<Yardanico> there's https://github.com/define-private-public/stb_image-Nim as a wrapper for stb_image
22:52:03FromDiscord<InventorMatt> well I want to be able to do math operations on the arrays. like how in python numpy can be used for images
22:52:10FromDiscord<InventorMatt> in python
22:52:33PrestigeDoes Nim have any sort of multiple inheritence?
22:52:58FromDiscord<Recruit_main707> Yes
22:53:17FromDiscord<Yardanico> not really
22:53:21FromDiscord<Yardanico> It's single inheritace
22:53:28FromDiscord<Yardanico> but we have multimethods and object variants 😛
22:53:46FromDiscord<Yardanico> @Recruit_main707 "multiple inheritance" usually means something like
22:53:53FromDiscord<Yardanico> "type MyType = object of A, B"
22:54:08FromDiscord<Yardanico> so a type inherits from two types
22:55:44*abm quit (Read error: Connection reset by peer)
22:55:45FromDiscord<Recruit_main707> Ah, sorry, i missunderstood
22:57:15FromDiscord<Recruit_main707> @InventorMatt you can probably use flippy for that, just write a little function or template to do getRgbA of all pixels of an “Image” object
22:57:21PrestigeBeen trying to figure out how ECS is actually implemented but I haven't found any clean examples, but I'll have to keep investigating since we don't have mulitple inheritence
22:59:01leorizeyou can look at some ecs frameworks
23:07:10*xet7 quit (Quit: Leaving)
23:11:20*xet7 joined #nim
23:25:38FromGitter<awr1> ECS is really based more around composition than inheritance
23:27:56PrestigeYeah, I understand ECS conceptually but haven't figured out how I'd implement it in a nice way
23:29:49leorizewe need proper composition in nim :P
23:29:50*laqq3_ quit (Ping timeout: 256 seconds)
23:30:19leorizetoo bad vtref didn't fly
23:32:02*solitudesf quit (Ping timeout: 256 seconds)
23:34:13*ForumUpdaterBot quit (Remote host closed the connection)
23:34:20*ForumUpdaterBot joined #nim
23:37:36*solitudesf joined #nim
23:43:26FromDiscord<reilly> Hey @Varriount, just @ me whenever you want to fill me in on the question from last night.
23:45:11PrestigeHmm okay I think I see (partially) how entt could be implemented in Nim
23:45:44PrestigeWould be a fun project if I can figure it out
23:46:59*solitudesf quit (Ping timeout: 240 seconds)
23:51:09*xet7 quit (Quit: Leaving)
23:51:47FromDiscord<Technisha Circuit (LGBTQIAP+)> How do i make a cstring from a string?
23:51:56FromDiscord<Yardanico> cstring(string)
23:52:00*xet7 joined #nim
23:52:08FromDiscord<Yardanico> cstring("abc")
23:54:22FromDiscord<Technisha Circuit (LGBTQIAP+)> Thanks