00:02:10*luis quit (Quit: luis)
00:02:21*luis joined #nim
00:04:21FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/766089036262801418/unknown.png
00:04:28FromDiscord<nikki> sets of enums compiling down to bit sets is pretty great
00:06:07Yardanicobuilt-in nim sets are bit sets :)
00:06:26Yardanico{'a'..'z'} is a bit set too
00:08:53*bung joined #nim
00:13:29*bung quit (Ping timeout: 256 seconds)
00:13:56*luis_ joined #nim
00:14:03*luis quit (Quit: luis)
00:14:11*luis_ is now known as luis
00:15:26FromDiscord<juan_carlos> When is says `Error: type mismatch` at CT whats that `Defect` ?.
00:16:09FromDiscord<juan_carlos> is not `ValueError`.
00:20:45Yardanico@juan_carlos can you repeat the question with more info? :)
00:21:45FromDiscord<Elegant Beef> Any clues to why my `const` is clearly populated at compiletime but is empty at runtime?
00:22:29FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2AKi
00:22:32FromDiscord<Elegant Beef> Code in question
00:23:04FromDiscord<Elegant Beef> Use of a sequence i assume?
00:23:08FromDiscord<juan_carlos> I am trying to use `doAssertRaises()`, must provide a `Defect` type as argument, I need to do `var foo: array[1, string] = []` inside, that raises, but I dont know what kind of Defect is it.
00:24:03*Vindaar quit (Remote host closed the connection)
00:24:08Yardanicoyou can't catch a compile-time error
00:24:11Yardanicowith doAssertRaises
00:24:20YardanicodoAssertRaises is for runtime exceptions
00:24:28FromDiscord<juan_carlos> Yes, I just noticed, makes sense.
00:24:37Yardanicofor checking if something compiles you can use "compiles"
00:24:44Yardanicobut it won't give you specific error
00:24:54FromDiscord<juan_carlos> yes thanks, `when compiles`
00:25:25Yardanico@Elegant yeah something like that, can't remember the exact issue name
00:25:29Yardanicothere are workarounds though
00:26:39FromDiscord<that_dude> Still trying to learn the language, but how do I chose between making a type and using a table?
00:27:18FromDiscord<Elegant Beef> `import tables` followed by `let a = initTable[T1,T2]()`
00:27:35FromDiscord<Elegant Beef> https://nim-lang.org/docs/tables.html
00:27:42Yardanico@that_dude wdym "making a type and using a table"?
00:27:46FromDiscord<that_dude> sorry, I'm not asking how to do it, I'm asking when I should use one over the other
00:27:46Yardanicothose are two different things
00:28:07Yardanicoah, well, if your object will look something like a map/table/dict, then you might just use the tables module
00:28:08FromDiscord<that_dude> as far as I can understand, both become containers that hold named data
00:28:10Yardanicoto not reinvent the wheel
00:28:14Yardanicotables are key:value mappings
00:28:24FromDiscord<Elegant Beef> Tables are for storing key value pairs, in a connected relationship, objects are for grouping data for specific logic to work on
00:28:26Yardanicoobjects can be anything
00:28:32Yardanicotables are objects internally too
00:28:44Yardanicobut tables module gives you a lot of procedures to work on those objects
00:28:48FromDiscord<Elegant Beef> Accessing fields from tables is slower than normal object fields
00:29:15FromDiscord<Elegant Beef> Are you coming from JS where objects are practically just tables? 😛
00:29:20FromDiscord<that_dude> I'm comming from python
00:29:26FromDiscord<that_dude> (edit) 'comming' => 'coming'
00:29:32FromDiscord<Elegant Beef> Yard any insight in afformentioned "Workaround" 😄
00:29:32Yardaniconim tables are python dicts (mostly)
00:29:50Yardanicoexcept the fact that nim tables can't have multiple types for keys and values, there can be only 1 key type and 1 value type for each table
00:30:07FromDiscord<Elegant Beef> Do i just abuse an array of an overly silly size and use that to hold them 😄
00:30:07FromDiscord<nikki> tables are for dynamic grows / lookups while objects are for data that has many instances with the same structure -- mostly
00:30:19Yardanico@Elegant why?
00:30:25FromDiscord<Elegant Beef> Why what?
00:30:29Yardanicowhy use an array
00:30:48FromDiscord<Elegant Beef> Cause the sequence isnt working and you seemed to indicate it was the sequence that was the issue
00:31:06Yardanicocan you give a reproducable example so I can quickly fix it
00:31:15YardanicoI mean the one which gives you an empty seq when you add values at comp-time
00:32:21FromDiscord<nikki> @that_dude a big distinction is nim has a "compile time" / "runtime" difference -- if the member names and layout are fixed at compile time that's when an object makes a lot of sense. at runtime it's just a memory offset (on native backends) vs. looking up the key dynamically
00:33:06FromDiscord<Elegant Beef> It works fine for the manually written version on latest
00:33:09FromDiscord<Elegant Beef> So weird
00:34:23FromDiscord<Elegant Beef> Well a minimal example also works on devel
00:34:30Yardanicoyeah something was fixed
00:35:05FromDiscord<Elegant Beef> Well i guess i'll have to find what is causing this behaviour
00:35:12FromDiscord<Elegant Beef> Nothing is clear to why it is
00:35:21FromDiscord<Elegant Beef> Thanks anywho
00:37:07FromDiscord<that_dude> thanks nikki I think I understand now.
00:37:16Yardanicoyeah, please don't think of nim as "compiled python" :)
00:37:33Yardanicoreally the only similar thing between python and nim is the off-side rule (indentation-based syntax)
00:38:03FromDiscord<nikki> i think given only a background where objects are dynamic like that, the introduction of this distinction is a new concept
00:38:08FromDiscord<that_dude> I'd say I'm trying not to, but all I know comes from my little knowledge in python and lua so I'm trying to kinda equate it
00:38:26Yardanico@nikki well I've only used Python before Nim as well :)
00:38:30FromDiscord<nikki> JIT's tend to optimize a lot though. i think V8 optimizes for small JS objects with sinilar layouts
00:38:39FromDiscord<nikki> (edit) 'sinilar' => 'similar'
00:38:47Yardanicowell, I'm not talking about performance
00:39:00FromDiscord<nikki> oh for sure. i'm just laying out all the relevant info
00:39:09FromDiscord<nikki> to continue what i was saying earlier
00:39:43FromDiscord<nikki> i think it spreads over expressiveness, semantics, performance, ...
00:40:42*xioren quit (Quit: leaving)
00:41:35FromDiscord<nikki> in python too like the concept of a class is such a distinct new thing. like for a more pure mappy lang-- there are things like lua or js
00:42:15FromDiscord<nikki> like dicts and classes are distinct concepts in python while in many langs they're relationships between the same world of "maps"
00:42:24FromDiscord<nikki> (edit) '"maps"' => '"maps/tables"'
00:42:55FromDiscord<that_dude> While I'm here, when I use type, should I use rootObj or ref of rootObj? I feel like when I was trying to read about it, I was getting confused in the abstract way it was described. I guess what do I gain for using the ref?
00:43:15YardanicoRootObj is only for when you need inheritance
00:43:21Yardanicoif you don't have inheritance, you don't need it at all
00:43:23FromDiscord<that_dude> I get that
00:43:26Yardanicoand can just have "object" or "ref object"
00:43:34FromDiscord<that_dude> object for non inheritence
00:43:46FromDiscord<that_dude> but thats not what I'm asking
00:43:49Yardanicoif you need to inherit from an object *and* use methods for runtime dispatch - you call it as "ref object of RootObj"
00:43:53FromDiscord<nikki> https://www.reddit.com/r/nim/comments/7dm3le/tutorial_for_types_having_a_hard_time/dpz9vue/
00:43:56FromDiscord<nikki> found this recently
00:44:03FromDiscord<nikki> this particular comment
00:44:08Yardanicoif you just need inheritance without actually using runtime dispatch - you don't need ref or RootObj
00:44:24FromDiscord<that_dude> sorry but what is runtime dispatch?
00:44:36Yardanicowhen the program decides which routine (method) to call at runtime
00:44:38FromDiscord<that_dude> just calling it?
00:44:42FromDiscord<that_dude> got it
00:44:45Yardanicoprocs are statically bound (compiler knows which proc will be called at compile-time)
00:44:50FromDiscord<nikki> i think ref, in a way that's orthogonal to inheritance, is more about reference semantics of the = operator
00:44:59Yardanico"I guess what do I gain for using the ref?" "ref object" vs "object" is reference vs value semantics :)
00:45:06Yardanicoref object is a managed reference to an object
00:45:14FromDiscord<nikki> like when you do v = u --> modifications to v later modify u
00:45:15Yardanicolives on the heap
00:45:20Yardanicoyes, with ref it will be like that
00:45:22Yardanicoref semantics
00:45:29Prestigeranges don't support high to low for iteration, right? Like if I wanted to iterate from 9..3
00:45:37YardanicoPrestige: there's countdown
00:45:52Yardanicobut yeah, .. proc doesn't support iteration from high to low
00:45:58Prestigeneat, thanks
00:46:03Yardanicosorry, iterator*
00:46:07Yardanicowhen you do "for a in 3 .. 5" you actually call the .. iterator
00:46:17Yardanicoranges are not involved here
00:46:24FromDiscord<nikki> if they're not ref objs then v = u makes v be a copy of u but modifications don't affect each other from here on
00:46:28Prestigeah I see
00:46:33Yardanico@nikki yes
00:46:44FromDiscord<nikki> just trying to explain value semantics
00:46:50YardanicoPrestige: https://nim-lang.org/docs/system.html#...i%2CT%2CT
00:46:59FromDiscord<nikki> i think the gc comes about cuz to impl ref semantics on current machines, you need gc
00:47:22Yardanicoyeah, but many people associate gc with a "tracing garbage collector" like in Java
00:47:26Yardaniconot something light like reference counting
00:47:28Yardanicowhich ARC does
00:47:54Yardanicofor some info about ARC/ORC you can read https://github.com/Yardanico/website/blob/yard-arc-orc-article/jekyll/_posts/2020-10-14-what-are-arc-and-orc-in-nim.md btw :)
00:47:54FromDiscord<nikki> yeah i've seen ppl be on either side of that meaning. probably the most important distinction is determinism
00:48:10FromDiscord<nikki> read this one when you posted it earlier today 🙂
00:48:16FromDiscord<nikki> it's good!
00:48:22Yardanicothis one is with a few edits
00:48:27YardanicoI've taken down the dev.to version for now
00:48:34FromDiscord<nikki> oh word
00:48:36Yardanicoso we can get it published on the nim blog and then share it on reddit/hn/etc
00:48:46Yardanicoand then I'll unhide it on dev.to and make a russian translation to habr.com too
00:49:07YardanicoI just forgot about nim blog's guest posts when I was writing that article on yesterday's morning
00:50:17*luis quit (Read error: Connection reset by peer)
00:50:38FromDiscord<nikki> i think nim can be a good language to redo some concepts i've been exploring in c++
00:50:56Yardanicofor sure :)
00:51:08Yardanicothere are other interesting guest posts in the nim blog btw (if you haven't seen them already)
00:51:08Yardanicolike https://nim-lang.org/blog/2020/06/30/ray-tracing-in-nim.html
00:51:40FromDiscord<nikki> yeah i saw that title but haven't read it yet :0
00:52:05FromDiscord<nikki> i think i should rest my eyes lol, been using screens a lot
00:54:49FromDiscord<nikki> got sucked in, this is a good article @Yardanico !
00:54:58Yardanicoit's by github.com/mratsim :)
00:55:27FromDiscord<nikki> good article @mratsim 🙂
00:55:41Yardanicohe made arraymancer, weave and a lot more stuff for Nim
00:58:11FromDiscord<nikki> if i paste a picture in discord, would that be visible to you @Yardanico ? or should i imgur it
00:58:16Yardanicoof course it will be visible
00:58:24Yardanicothe bridge will send the link to the media to IRC
00:58:29FromDiscord<nikki> cool
00:58:37FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/766102695203045376/unknown.png
00:58:58FromDiscord<nikki> something from the game engine -- you can see the data types in C++ on the right, and on the left there is an auto-generated editor UX. the engine is running in the browser through wasm
00:59:02FromDiscord<nikki> and the UI is using the DOM
00:59:04Yardanicowow nice
00:59:05FromDiscord<nikki> but it also compiles to native
00:59:34FromDiscord<nikki> it's "ECS"-ey -- you can see how the sprite drawing rule just queries for entities with Position and Sprite
00:59:44FromDiscord<nikki> anyways I think nim is a great fit for this kinda stuff
01:00:15FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/766103099856257054/unknown.png
01:00:28FromDiscord<nikki> esp. cuz of this weird DSL-like immediate mode API i have to render HTML from C++-wasm lol
01:02:20FromDiscord<nikki> excited to dig into nim further. right now i'm working my way through the "nim in action" book just to get some coverage of the lang and ecosystem, while continuing to work on my stuff in other langs
01:04:12*luis joined #nim
01:04:32FromDiscord<Yardanico> good luck :)
01:04:44FromDiscord<nikki> thank you 🙂
01:12:57*apahl quit (Ping timeout: 260 seconds)
01:13:53*apahl joined #nim
01:15:59*luis quit (Quit: luis)
01:16:10*luis joined #nim
01:17:22FromDiscord<William_CTO> How do I get nim to output the C/c++ code instead of compiling all of it?
01:18:02FromDiscord<Yardanico> @William_CTO well, you certainly can do that with --compileOnly, but *are you sure* this is what you want?
01:18:13FromDiscord<Yardanico> try nim c --nimcache:mydir --compileOnly file.nim
01:18:23FromDiscord<William_CTO> I just want to see the C it outputs
01:18:31FromDiscord<William_CTO> what is the nimcache for?
01:18:32FromDiscord<Yardanico> well it always outputs the C code
01:18:43FromDiscord<Yardanico> nimcache is where nim stores C/C++/ObjC files and object files
01:18:50FromDiscord<Yardanico> ~/.cache/nim on linux by default
01:18:51disbotno footnotes for `/.cache/nim`. 🙁
01:19:02FromDiscord<William_CTO> kk
01:19:11FromDiscord<Yardanico> also you'll see a lot of scary C code if you compile with the command I've shown above
01:19:21FromDiscord<Yardanico> to remove all of the safety checks and exceptions checking, try the same but with -d:danger
01:19:46FromDiscord<William_CTO> ok thanks a bunch
01:22:05FromDiscord<William_CTO> looks like I won't be doing that again 😄
01:23:00FromDiscord<Yardanico> well, don't be scared of it
01:23:21FromDiscord<Yardanico> Naive Nim code can be more efficient than naive C code, believe it or not
01:23:24FromDiscord<Yardanico> in some isolated cases, but still
01:23:53FromDiscord<William_CTO> I'm not, but now I know what it looks like
01:23:53FromDiscord<Yardanico> you can also make the output even smaller with a few other things (it would be much better if you're on latest nim devel or at least on 1.4 release candidate)
01:24:06FromDiscord<Yardanico> nim c --gc:arc -d:danger --panics:on -d:useMalloc -d:noSignalHandler
01:24:32FromDiscord<William_CTO> Also, I only found out about nim when looking for a different language to write my Discord bot in. Its currently written in python
01:24:42FromDiscord<Yardanico> oh, nice, so from the discord api server
01:24:46FromDiscord<William_CTO> mhm
01:24:55FromDiscord<Yardanico> yeah, the discord bridge is using
01:24:58Yardanicoircord as well
01:25:03YardanicoI mean dimscord*
01:25:05FromDiscord<William_CTO> Don't get me wrong, d.py is great, but when your bot is in 100+ servers ...
01:25:25FromDiscord<William_CTO> Yeah, I was looking at using dimscord (great name)
01:25:38FromDiscord<Yardanico> the discord <-> irc bridge used here is the first real deployment of dimscord :)
01:25:41FromDiscord<Yardanico> !repo ircord
01:25:42disbot12https://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 9⭐ 1🍴
01:25:48FromDiscord<Yardanico> the code isn't the best, but it (usually) works :D
01:25:51*Tanger joined #nim
01:26:48FromDiscord<Yardanico> it bridges all channels except <#753721959308853319> in the Primary section and all channels in the Community section
01:27:12FromDiscord<Yardanico> irc -> discord uses webhooks, discord -> irc receives updates from discord and posts via the irc library
01:27:31FromDiscord<William_CTO> "Ircord only depends on OpenSSL (for https), everything else is pure-Nim." What exactly does this mean? Is there not an ssl lib within nim?
01:28:03FromDiscord<Yardanico> well, there's no pure-nim SSL library for Nim (yet)
01:28:07FromDiscord<Yardanico> and creating one is a very big and expensive task
01:28:16FromDiscord<Yardanico> since it's a very security and performance-critical thing
01:28:45FromDiscord<Yardanico> so yeah, nim uses openssl for SSL like most other languages
01:28:52FromDiscord<William_CTO> Ah
01:28:54FromDiscord<William_CTO> Gotcha
01:28:56FromDiscord<Yardanico> you can also use libressl or similar though (if they're compatible with openssl)
01:28:58*xioren joined #nim
01:29:02FromDiscord<Yardanico> even statically link libressl
01:29:08FromDiscord<William_CTO> First day with nim so I'm still learning the syntax
01:29:17FromDiscord<Yardanico> did you see https://nim-lang.org/learn.html ?
01:29:33FromDiscord<Yardanico> there are text articles/small books and also a video series
01:29:37FromDiscord<William_CTO> following https://nim-lang.org/docs/tut1.html currently
01:29:37FromDiscord<Yardanico> and of course dom's book "Nim in Action"
01:30:01FromDiscord<William_CTO> Yeah, I want to read it, but broke college students don't usually have $40 to drop on language books lol
01:30:11*dddddd quit (Ping timeout: 240 seconds)
01:30:55xiorenis there a python bytes.decode("utf-8") analog in nim?
01:30:57FromDiscord<Yardanico> you can also view some parts of it for free by manning's livebook
01:31:07FromDiscord<Yardanico> @xioren there's usually no need since Nim's strings are just byte sequences
01:31:15FromDiscord<Yardanico> do you need to handle utf-8 ? can you please elaborate a bit more
01:32:30*FromDiscord quit (Remote host closed the connection)
01:32:33xiorenim reading a binary file which has utf replacements. in python i read in with .decode() and then use the ord() of each. reading the same binary file with nim gives the wrong order.
01:32:44*FromDiscord joined #nim
01:32:57xioreni can only get the correct order with the Runes procs in unicode
01:32:59Yardanicoxioren: oh, so you need to handle utf8 characters specifically?
01:33:01Yardanicoyeah that's right
01:33:11Yardanicoyou need to use the unicode module for that
01:34:15*apahl quit (Ping timeout: 272 seconds)
01:34:19xiorenyeah i figured its just giving me hell because it converts the string to a seq
01:34:34Yardanicostrings are seqs in a way :)
01:34:47xiorenright but i need to decode then split
01:35:21xiorenstring.split that is
01:35:23Yardanicowhy split?
01:35:40Yardanicosplit by space or something else?
01:36:11Yardanicobecause if you want to split by some ASCII character (like space or newline), then you can first split and only then decode the string into runes
01:36:11*apahl joined #nim
01:36:59xiorenim implementing this https://github.com/kmike/text-unidecode and thats just how his binary is set up
01:37:30xiorenin python its bytes.decode('utf-8').split('\x00')
01:37:46xiorenand then use the ord of chars as the index
01:37:55xiorento do the swaps
01:38:09Yardaniconot sure why do you need to port that library to nim? isn't
01:38:14Yardanicothere's https://nim-lang.org/docs/unidecode.html
01:38:15Yardanicoxioren: ^
01:39:07Yardanicoit's the exact port of that lib :P
01:39:09Yardanicoand it's in stdlib
01:39:21xiorenis that unidecode.dat part of stdlib?
01:39:31xiorenor do i need to make my own?
01:39:36Yardanicoto the first question
01:39:45xioreninteresting, gonna go try that, thanks.
01:39:53Yardanicoit's 229kb
01:39:56*dddddd joined #nim
01:40:00Yardanicoand it'll be embedded in your program's binary
01:40:21FromDiscord<Avatarfighter> dude
01:40:22Yardanicoyou can just check the description of unidecode
01:40:26FromDiscord<Avatarfighter> 229kb is so good
01:41:07Yardanico T5_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(((NI) (ptrdiff_t) ((*p))), ((NI) 16));
01:41:19FromDiscord<Avatarfighter> 😐
01:41:24xiorenholy cow that makes my life so much easier
01:41:25FromDiscord<Avatarfighter> yard hide that black magic 😛
01:41:36Yardanicoxioren: nim standard library is larger than one might think ;)
01:41:52Yardanicowe even have an asyncsmtp module in the stdlib lol
01:42:04Yardanicoyou can always check https://nim-lang.org/docs/lib.html
01:42:31xiorenyeah i usually always have that open in a tab but i guess i overlooked unidecode
01:43:51Yardanicoand of course you can always check how unidecode is implemented if you want
01:44:34Yardanicooh interesting it uses <=% which is a rare nim operator :DDD
01:44:41Yardanicocompares two ints as unsigned and returns a bool
01:45:04FromDiscord<Rika> people use that?
01:45:08FromDiscord<Rika> isnt that an old proc
01:45:42Yardanicoi guess it's rarely used, but it exists
01:52:25FromDiscord<flywind> Does anyone know `nimforum` is compiled with `-d:release` or `-d:danger`?
01:52:45Yardanicosince it uses nimble
01:53:14Yardanicoactually wait
01:55:26FromDiscord<Yardanico> @flywind if they're using this task - then no https://github.com/nim-lang/nimforum/blob/master/nimforum.nimble#L28
01:55:34FromDiscord<Yardanico> ask @dom96 when he goes online
01:55:41FromDiscord<Yardanico> we can't know for sure :)
01:55:46FromDiscord<flywind> Thanks!
02:02:32*FromGitter quit (Ping timeout: 260 seconds)
02:03:25*oprypin quit (Ping timeout: 240 seconds)
02:09:52*bung joined #nim
02:13:17*rockcavera is now known as Guest62781
02:13:17*rockcavera joined #nim
02:14:54*bung quit (Ping timeout: 272 seconds)
02:15:43*rockcavera quit (Killed (beckett.freenode.net (Nickname regained by services)))
02:15:43*rockcavera joined #nim
02:17:01*oprypin joined #nim
02:17:08*Guest62781 quit (Ping timeout: 260 seconds)
02:17:09*FromGitter joined #nim
02:17:38*rockcavera quit (Remote host closed the connection)
02:18:09*rockcavera joined #nim
02:25:19*madpata_ joined #nim
02:28:50*madpata quit (Ping timeout: 272 seconds)
02:29:58FromDiscord<SirJosh> hmm nim isn't on here <https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html> :(↵has there been any previous attempts to get nim on benchmarks game? i kinda wanna try get nim on there for fun
02:30:20*bung joined #nim
02:30:43Yardanicoauthor of it explicitly said that he won't accept languages like Nim or Crystal
02:30:54Yardanicoand that people are free to fork it if they want to add these languages
02:31:25*lbart quit (Ping timeout: 240 seconds)
02:32:34*rockcavera quit (Remote host closed the connection)
02:36:06*lbart joined #nim
02:36:07*lbart quit (Changing host)
02:36:07*lbart joined #nim
02:41:55*muffindrake quit (Ping timeout: 240 seconds)
02:44:20*muffindrake joined #nim
02:45:51*luis quit (Read error: Connection reset by peer)
02:49:26FromDiscord<Rika> which is kinda discriminatory ngl
02:52:50Prestigewhy would he not, laziness?
02:55:48disruptekiirc it's because such languages are too easy to create.
02:57:41*krux02 quit (Remote host closed the connection)
03:04:00FromDiscord<flywind> I use `typora` to write markdown docs, but it doesn't support Nim syntax highlight. So I choose `vscode` instead.
03:04:15FromDiscord<flywind> https://github.com/codemirror/CodeMirror/issues/6165
03:04:15disbot➥ 5Need syntax support for nim Programming language
03:04:57*luis joined #nim
03:20:45*xioren quit (Quit: leaving)
03:27:09FromDiscord<Rika> disruptek, do you believe it is easy to create nim
03:27:23*luis quit (Read error: Connection reset by peer)
03:27:38FromDiscord<Elegant Beef> I mean python is there so it cant be that 😄
03:27:38*luis joined #nim
03:28:39Yardaniconim c -d:danger --gc:arc --panics:on -d:noSignalHandler -d:useMalloc --cc:clang -d:strip -d:lto --opt:size c1.nim
03:28:46Yardanico strip -R .comment -R .note -R .note.ABI-tag c1
03:28:53Yardanicowc c1 => 5184 bytes dynamically linked
03:28:58Yardaniconow lets try with musl
03:29:43Yardanico6288 statically linked with musl
03:29:59Yardanicoi actually forgot --os:any -d:posix
03:30:14Yardanicowith it it's 5616 bytes statically linked hello world with musl
03:31:16Yardanicohttps://github.com/Yardanico/random-stuff/blob/master/c1 the binary if you want to try
03:31:25Yardanicoc1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
03:33:57*bung quit (Ping timeout: 258 seconds)
03:59:57FromDiscord<Avatarfighter> @Elegant Beef the guy must be too afraid of Crystal and Nim 😛
04:01:54FromDiscord<Avatarfighter> wow
04:02:02FromDiscord<Avatarfighter> someone wrote WASM -> LLVM IR lmao
04:02:44FromDiscord<Avatarfighter> oh wow I think im stupid and just mixed up LLVM IR -> WASM
04:02:58FromDiscord<Avatarfighter> this is just in: I'm not https://github.com/WAVM/WAVM
04:03:04FromDiscord<Avatarfighter> ^ really cool
04:05:35*luis quit (Quit: luis)
04:05:47*luis joined #nim
04:06:02*supakeen quit (Quit: WeeChat 2.9)
04:06:38*supakeen joined #nim
04:27:37*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:27:44*njoseph joined #nim
04:30:06FromDiscord<Yardanico> @leorize from the =copy PR - you can check the diff and see that old = is still supported
04:39:40FromDiscord<iWonderAboutTuatara> Why are nim function params immutable?
04:40:08FromDiscord<iWonderAboutTuatara> I know idiom is to shadow, by the way
04:40:17FromDiscord<iWonderAboutTuatara> More a language design question than a practical one
04:41:05FromDiscord<Rika> idiom is not to shadow but to use another name is it not?
04:41:20FromDiscord<Rika> you can modify them if they are var or ref
04:41:41leorize[m]@iWonderAboutTuatara because it's common to not modify the parameter
04:41:47FromDiscord<Elegant Beef> Nim attempts to default immutable
04:41:57FromDiscord<Elegant Beef> Hence having the `let` keyword 😄
04:42:16leorize[m]knowing that the parameter can't be modified allows the compiler to perform optimizations like passing by reference if the object is too big
04:42:23FromDiscord<iWonderAboutTuatara> Oh I see
04:42:29FromDiscord<iWonderAboutTuatara> Speed reasons
04:42:39FromDiscord<Elegant Beef> Also to protect yourself from yourself
04:42:42FromDiscord<iWonderAboutTuatara> @Elegant Beef idk I default to var
04:42:55FromDiscord<iWonderAboutTuatara> Even when things can be let, I just use var
04:42:56FromDiscord<Elegant Beef> Well idiomatic only uses var when you're mutating
04:43:01FromDiscord<iWonderAboutTuatara> Agreed
04:43:08FromDiscord<iWonderAboutTuatara> I wouldn't say Nim is immutable first
04:43:11leorize[m]you should default to `let` and `func` :P
04:43:19FromDiscord<iWonderAboutTuatara> I should I agree
04:43:24FromDiscord<Rika> i agree with let, but not really with func
04:43:25FromDiscord<iWonderAboutTuatara> My issue with func is debugging
04:43:32FromDiscord<Rika> until strict func is default
04:43:40FromDiscord<iWonderAboutTuatara> If I want to print something from inside a func
04:43:44FromDiscord<Elegant Beef> It's really designed to only have the data you need mutable, mutable
04:43:47FromDiscord<Rika> there is debugecho
04:43:48FromDiscord<iWonderAboutTuatara> I have to change it and everything that calls it to proc
04:43:55FromDiscord<iWonderAboutTuatara> Debugecho?
04:44:01FromDiscord<Rika> can print in func
04:44:04FromDiscord<Elegant Beef> it's a no side effect echo
04:44:04FromDiscord<Rika> no error
04:44:10FromDiscord<iWonderAboutTuatara> Oh that's really solid
04:44:27FromDiscord<Elegant Beef> ~~Solid like my poops~~ Channelling my inner diprustek
04:44:27FromDiscord<iWonderAboutTuatara> Is there a better way of debugging than print?
04:44:41FromDiscord<Elegant Beef> Using actual debug tooling
04:44:52FromDiscord<iWonderAboutTuatara> Never heard of either
04:44:59FromDiscord<iWonderAboutTuatara> Never used an actual debugger for anything
04:45:04FromDiscord<iWonderAboutTuatara> I always just print
04:45:15FromDiscord<Elegant Beef> Debuggers let you mark lines to stop the program at so you can do introspection and see what's happening
04:45:37FromDiscord<Elegant Beef> Then continue the program until another breakpoint
04:45:43FromDiscord<iWonderAboutTuatara> Oh so like checking what happens to a value after each operation?
04:45:51FromDiscord<Elegant Beef> Well i'm at a loss to why my const seq is getting reset 😄
04:46:10FromDiscord<iWonderAboutTuatara> Weird
04:46:26FromDiscord<Yardanico> @Elegant Beef try something
04:46:32FromDiscord<Elegant Beef> I... uh have
04:46:45FromDiscord<Yardanico> If you have a compiletime seq like myseq try this
04:47:12*vicfred quit (Quit: Leaving)
04:47:34FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2AL6
04:47:40FromDiscord<Yardanico> it's silly but who knows
04:49:08FromDiscord<Yardanico> I hope the stuff you're storing in the comptime seq doesn't have refs?
04:49:45FromDiscord<Elegant Beef> This is it https://media.discordapp.net/attachments/371759389889003532/766160863181668372/unknown.png
04:50:22FromDiscord<Yardanico> so did you minimize it in 1 file so I can test? :)
04:50:28FromDiscord<Elegant Beef> The minimiize worked
04:50:59FromDiscord<Yardanico> then you minimized it wrongly :P
04:51:04FromDiscord<Yardanico> Is the source open?
04:51:22FromDiscord<Elegant Beef> Nope
04:54:52*mwbrown quit (Ping timeout: 244 seconds)
04:55:53*mwbrown joined #nim
04:56:38FromDiscord<Elegant Beef> Like this is almost exactly what i've got but it seemingly doesnt work for some weird reason inside my project https://play.nim-lang.org/#ix=2AL8
04:58:25FromDiscord<Elegant Beef> But here check for yourself, got one big ol' nasty macro in there https://github.com/beef331/nimscripter
04:59:02FromDiscord<Elegant Beef> Was just a proof of concept mostly so didnt really want to make a repo until it was more concreate and useable
04:59:08*leeooox joined #nim
05:05:01*leeooox33 joined #nim
05:05:36*leeooox33 quit (Remote host closed the connection)
05:08:56FromDiscord<Elegant Beef> *needs devel afaik*
05:17:10FromDiscord<Yardanico> What a fine morning, eh?
05:23:12FromDiscord<Elegant Beef> About as fine as that code is clean
05:28:47*solitudesf joined #nim
05:30:16*narimiran joined #nim
05:30:22*bung joined #nim
05:34:55*bung quit (Ping timeout: 260 seconds)
05:35:27*apahl quit (Ping timeout: 260 seconds)
05:36:29*apahl joined #nim
05:38:01*luis quit (Quit: luis)
05:38:18*luis joined #nim
05:41:03FromDiscord<lqdev> about as fine as forced school during covid is
05:41:31Yardanicowe too have to go to the uni :)
05:41:42Yardanicoalthough not every day (our schedule is pretty light right now)
05:42:59FromDiscord<lqdev> let me go hooooome
05:43:09FromDiscord<lqdev> i wanna work on my game
05:43:23FromDiscord<lqdev> rather than divide polynomials to hell
05:43:39FromDiscord<Elegant Beef> Time to do programming like technisha, program on your phone 😄
05:43:47FromDiscord<lqdev> oof
05:46:02FromDiscord<PizzaFox> why does choosenim use the `-f` flag in their curl snippet for installation↵> (HTTP) Fail silently (no output at all) on server errors
05:46:11FromDiscord<PizzaFox> that seems like a bad thing to do in an installer
06:13:15*luis quit (Read error: Connection reset by peer)
06:25:02*luis joined #nim
06:30:23*PMunch joined #nim
06:32:13*luis quit (Quit: luis)
06:32:24*luis joined #nim
06:37:13*maier joined #nim
06:37:29*maier is now known as kenran
06:41:28*luis quit (Read error: Connection reset by peer)
06:41:41*luis joined #nim
07:02:45*bung joined #nim
07:15:29*user0_ joined #nim
07:17:28*user0 quit (Ping timeout: 246 seconds)
07:40:52*apahl quit (Ping timeout: 260 seconds)
07:41:47*apahl joined #nim
07:50:06*luis quit (Quit: luis)
07:50:40narimiranYardanico: you around?
07:50:50Yardanicosir, yes sir
07:51:07narimiranis the article ready or you need to do some more changes?
07:52:21Yardanicowell, I'm not sure if the name is fine
07:52:39Yardanicomaybe something like "Introduction to ARC/ORC in Nim" would fit better
07:52:54Yardanicobut generally it seems to be ready, yes
07:53:08narimiranok, let me quickly re-read it one more time
07:53:21narimiranand i like "Introduction to ARC/ORC in Nim"
07:53:36Yardanicowell, guess I'll change that :)
07:55:40narimiranwow you even made a diagram!!
07:55:59Yardanicoyes, I used some online diagram maker
07:56:03*lum joined #nim
07:56:13Yardanicothey had SVG export and I used that, although I felt like i want to clean the svg from some metadata that website left
07:56:22YardanicoI spend more time on cleaning the svg than on the diagram
07:56:32Yardanicobut it's not much anyway
07:58:25Yardanicochanged the article name
07:58:42Yardanicooh wait
07:58:44Yardanicono need for a dot
07:58:49narimiranand the date? ;)
07:59:03Yardanicochange to today? :D
07:59:54narimiran"you can try a 1.4 release candidate" - missing a dot
08:00:03Yardanicooh right
08:00:37Yardanicoactually I think I'll change "But if you're eager to try them out, you can try a
08:00:38Yardanico[1.4 release candidate]" to "But if you're eager to try them out, there's a 1.4 release candidate available"
08:00:53bunganyone have time review my code ? https://play.nim-lang.org/#ix=2ALK
08:01:25narimiranYardanico: hmm, or maybe point that to the current latest devel nightly?
08:01:35narimiranbecause everything in current devel will become 1.4
08:01:41Yardanicois it possible?
08:02:02Yardanicoi mean we don't have an always-latest link?
08:02:12narimiranlet me try to find the link to use
08:02:29Yardanicoah found it
08:02:33Yardanicoby cheating and replacing 0 with 4
08:02:51narimiranleorize, leorize[m], leorize[m]1 - we have only one asset per nightly? :/
08:03:03Yardaniconarimiran: wdym?
08:03:06narimiranYardanico: nah, not that one
08:03:27narimiranbefore it was like 9 different versions per build
08:03:27Araqlesson learned in 2020. if you re-use old compiler code written for different assumptions... don't.
08:04:34narimiranoh, it is at the bottom of that page
08:05:14narimirani don't understand current way of nightlies
08:05:39narimiran"Latest successful build for branch ....." will always be updated with the latest stuff, right?
08:06:01narimiranbut how do i get nightlies for a given date, e.g. for today/yesterday?
08:06:50narimiranhttps://github.com/nim-lang/nightlies/releases/tag/latest-devel -- this is the current latest devel, but the contents of it will be changed tomorrow, right?
08:07:18narimiranand it says it is alias for https://github.com/nim-lang/nightlies/releases/tag/2020-10-15-devel-a4c28394beab558a160671ab216e736b36276a94 - but there is only one tar.xz
08:08:18Yardanico@leorize ping ping?
08:09:35Yardaniconarimiran: but what's the problem with https://github.com/nim-lang/nightlies/releases/tag/latest-version-1-4?
08:10:17narimiranit is currently outdated
08:10:40narimiranit is 2020-10-07 version
08:11:23narimiranit is not a big deal, but now i realized i cannot pick anymore a nightly from any given date
08:12:29narimiranif somebody reads your article in 2 months, that latest link will lead to completely different version
08:12:54Yardanicobut can't we edit it later? when 1.4 gets released for example
08:13:02Yardanicoor is that bad? :P
08:13:18FromDiscord<that_dude> Sorry for the late night question, but there is something I hope you guys can clarify for me. I have some code that looks like this. var data: seq[(int, int)] and it bugs me that it isn't var data: seq[tuple[int, int]] or something similar. Is there a behind the scenes reason that just doesn't work?
08:13:40Yardanicowell, the tuple[] syntax is for named tuples
08:13:47Yardanico(int, int) is "anonymous" tuples
08:15:44FromDiscord<that_dude> I guess I get that, but does tuple[] have to be for named ones? I feel like it wouldn't be that complex for the compiler or whatever to notice the data isn't named. Sorry for my lack of knowledge in stuff like this
08:16:20Yardaniconarimiran: so what do we do with the 1.4-release candidate link?
08:21:55narimiranYardanico: let me think for a bit. (and maybe leorize comes in the mean time :))
08:22:02Yardanicoit's okay, there's no rush :)
08:23:10Araqthat_dude: it's a valid point but '(int, int)' is just as good, get over it and use it.
08:23:39FromDiscord<iWonderAboutTuatara> Should I make a PR for qsort proc/func in the algorithm stdlib module?
08:23:39Araqif we support tuple[int, int] too there would be yet another way to write the same
08:24:02FromDiscord<iWonderAboutTuatara> Irs supposed to be more efficient for smaller sets, which is not uncommon to be dealing with
08:24:10FromDiscord<iWonderAboutTuatara> So I think there's space for it
08:24:24Araqand then the Nim purgers would come along and demand all old usages of (int, int) must be purged
08:25:38Araqbecause "omg, inconsistent! makes the language harder to learn". so what. if you stop the constant language hopping you only need to learn it once.
08:25:44FromDiscord<iWonderAboutTuatara> Also it's a lot more efficient on memory, which is nice if space complexity is an issue
08:26:45FromDiscord<iWonderAboutTuatara> The only issue is that the `cmp` thing is super confusing
08:32:58FromDiscord<iWonderAboutTuatara> Ok, the use of cmp vs the enum for sortorder is super confusing
08:34:40*lum quit (Quit: WeeChat 2.8)
08:34:50FromDiscord<that_dude> Araq: I don't think that people would get mad at (int, int) if tuple[int, int] were implemented because the first one would just become sugar or something. Also isn't consistency in general a good thing to have? I feel like I spent way too long trying to figure out why the compiler was mad at me for this.
08:39:01*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:43:46*newUser joined #nim
08:45:25newUserHi, I have an exercise to translate from C++ to Nim (I have no idea...): https://play.nim-lang.org/#ix=2ALU
08:46:12supakeennewUser: As in homework?
08:46:25newUserno, only for me
08:46:36FromDiscord<iWonderAboutTuatara> Pretty insane if your homework involves nim
08:46:37FromDiscord<iWonderAboutTuatara> Oh
08:46:52supakeenOk well, but it's still meant for learning so we won't throw out the answer :)
08:46:59supakeenCan you tell me what the C++ program does?
08:47:01FromDiscord<iWonderAboutTuatara> https://nim-by-example.github.io/files/
08:47:20FromDiscord<iWonderAboutTuatara> Should help you a bit if you were confused about reading from files
08:47:22supakeenBecause if you can describe that (to yourself) then you probably know what you need to write it in Nim.
08:47:42newUserif I put an file via main, I get the output to the file, if not to cout
08:48:00newUserbut I only want to have one proc
08:48:08Araqthat_dude: consistency can mean many different things. How about using ()'s consistently with the code out there which already uses it
08:48:25FromDiscord<mratsim> We don't talk about consistency here, it's a trigger word
08:48:54FromDiscord<mratsim> I do like the tuple[re: float64, im: float64] possibility though
08:48:58FromDiscord<iWonderAboutTuatara> I value consistency, Nim is pretty good with it
08:49:03FromDiscord<Rika> nim embraces an interesting balance between convenience and consistency
08:49:12FromDiscord<mratsim> maybe (re: float64, im: float64) would be a little less verbose
08:49:15supakeenI mean the C++ code is broken as well, but sure, you can open a file in Nim and write to it those functions are called `open` and `write` respectively and are in the link iWonderAboutTuatara gave you.
08:49:15Araqthere is a reason why natural languages are constantly changing. it's never "consistent"
08:49:25supakeenWhat is the bit you're stuck on?
08:49:37FromDiscord<iWonderAboutTuatara> Right, but natural languages are hard to learn @Araq[IRC]#0000
08:50:01FromDiscord<iWonderAboutTuatara> You can spend years and know barely enough to hold a basic conversation
08:50:04FromDiscord<mratsim> Yeah, in French COVID changed from masculine to feminine
08:50:15FromDiscord<Recruit_main707> @iWonderAboutTuatara something like this: https://play.nim-lang.org/#ix=2ALX
08:50:25Araqwell but native speakers who had no trouble learning their mother tongue evolve them
08:50:30FromDiscord<iWonderAboutTuatara> Programming languages are constructed and do enjoy the benefits of consistency and directed evolution
08:50:45FromDiscord<iWonderAboutTuatara> @Recruit_main707 wrong guy lol
08:50:46Araqoften indeed new stuff is added with some consistency wrt the old rules
08:51:05FromDiscord<Recruit_main707> oh, i scrolled until i saw an url :P
08:51:07FromDiscord<iWonderAboutTuatara> Well, no language has a governing body that's taken seriously
08:51:07FromDiscord<Recruit_main707> sorry
08:51:16*Vladar joined #nim
08:51:22FromDiscord<iWonderAboutTuatara> Lol npnp
08:51:24FromDiscord<Recruit_main707> > Yeah, in French COVID changed from masculine to feminine↵@mratsim same in Spanish, i dont know why tf they do it
08:51:24Araqyet they never are "consistent".
08:51:48FromDiscord<Rika> > Programming languages are constructed and do enjoy the benefits of consistency and directed evolution↵but has the downside that breaking changes are harder to execute; you can always teach people small changes really easily, good luck with compilers and code
08:51:48FromDiscord<iWonderAboutTuatara> Obviously, you can't have 100% consistency
08:51:55newUsersupakeen : an Idea is proc WriteElem(cout: Stream) or so
08:52:10FromDiscord<Recruit_main707> newUser, the example i sent does that
08:52:13FromDiscord<iWonderAboutTuatara> That just causes a bad product, you have to make exceptions some times for usability. But they shouldn't be too common
08:52:35FromDiscord<mratsim> @Recruit_main707 I think in French it's because disease is feminine
08:52:39supakeenRecruit_main707: In Spanish they made it 'la COVID-19' but 'el coronavirus' ;)
08:52:56FromDiscord<Recruit_main707> its still pretty retarded
08:52:56FromDiscord<iWonderAboutTuatara> @Rika I think that's a specifically programming languages not conlangs in general
08:53:04newUser<Recruit_main707>: thx =D
08:53:08FromDiscord<iWonderAboutTuatara> Yeah the spanish authority on language is really weird
08:53:08FromDiscord<Recruit_main707> np
08:53:12FromDiscord<Rika> @iWonderAboutTuatara and indeed that is what i was addressing
08:53:15supakeenBecause they made it the same as 'enfermedad'
08:53:39FromDiscord<iWonderAboutTuatara> All the language auths are weird
08:54:04FromDiscord<iWonderAboutTuatara> Never heard one speaker of a language speak well about the governing body of it
08:54:05FromDiscord<Recruit_main707> ^
08:54:13FromDiscord<iWonderAboutTuatara> And nobody really respects any of their decrees
08:54:21FromDiscord<that_dude> I think I'm following you guys, and I'm am not suggesting removing (int, int), but just making both possible. In my case I feel like it make defining the type I was working on messier and messed with the structure of it.
08:54:26supakeenTo be fair, the Dutch one is authorative.
08:54:46supakeenAs in, if they decide that's how it's taught in school; it might take a while before those people start correcting you but it does happen ;)
08:55:00AraqI have never seen a "consistent" programming language, I'm beginning to think it doesn't mean anything. Python uses 'class' for 'define class' and 'def' for 'define method'
08:55:04FromDiscord<Rika> well ar/q already expressed their opinion on why having both could be a massive issue
08:55:33FromDiscord<iWonderAboutTuatara> @Araq[IRC]#0000 well I mean, you have to forgo consistency for usability some of the time
08:55:56FromDiscord<iWonderAboutTuatara> But doing this doesn't harm usability or learnability
08:56:42FromDiscord<iWonderAboutTuatara> Tuple [] is immediately obvious, and () sees enough use that people will understand it
08:57:00FromDiscord<iWonderAboutTuatara> I would prefer the less verbose option () but I don't see any reason to not give choice
08:57:15FromDiscord<iWonderAboutTuatara> Unless it's technically difficult of course
08:57:20FromDiscord<that_dude> ^
08:57:26FromDiscord<Rika> see what ar/q said ↵> and then the Nim purgers would come along and demand all old usages of (int, int) must be purged↵> because "omg, inconsistent! makes the language harder to learn". so what. if you stop the constant language hopping you only need to learn it once.
08:58:03Araqhere is one reason: the two syntaxes likely are different ASTs and the macros need to understand them both
08:58:24FromDiscord<iWonderAboutTuatara> That's a very good reason
08:58:25Araqother Nim programmers need to know both syntaxes because they might be used in the wild
08:58:28ZevvI almost converted someone to Nim, and now he's pointing to Zig
08:58:31Zevvquick, what do I tell him
08:58:36FromDiscord<that_dude> what is ast?
08:58:39FromDiscord<iWonderAboutTuatara> Metaprogramming
08:58:47FromDiscord<iWonderAboutTuatara> @Zevv[IRC]#0000 macros are cool and fun
08:58:49FromDiscord<mratsim> What does he want to write?
08:58:53FromDiscord<mratsim> start from his needs
08:59:09FromDiscord<iWonderAboutTuatara> @that_dude basically, each expression you write is a node in a big tree
08:59:10FromDiscord<Rika> maybe zig is a better fit for some people
08:59:16FromDiscord<mratsim> product don't sell with a laundry list of features now, they sell because they are a solution to a problem
08:59:43FromDiscord<iWonderAboutTuatara> Each node is of some type, which has some unique behavior
08:59:54FromDiscord<lqdev> AST = Abstract Syntax Tree
08:59:55FromDiscord<mratsim> that was marketing from the 80s "This car has foo, bar, baz, and also radio and airbags)
09:00:12FromDiscord<iWonderAboutTuatara> If you're a Godot user, they're nodes in the scenetree
09:00:39FromDiscord<iWonderAboutTuatara> Nim allows you to (through Nim code) directly modify the nodes, their position, their type, their value, etc
09:00:49Zevvmratsim: system programming, networking, video processing
09:01:16FromDiscord<iWonderAboutTuatara> So you can write code that reads and modifies code dynamically, super useful and fun
09:01:30FromDiscord<Rika> Zevv: i'm interested in why theyre leaning towards zig
09:01:41FromDiscord<mratsim> Does he need C++ libraries like OpenCV?
09:01:46FromDiscord<iWonderAboutTuatara> Yeah that's extremely weird
09:01:55FromDiscord<mratsim> because Zig doesn't have seamless interface with C++
09:02:01FromDiscord<iWonderAboutTuatara> I don't think there's a remotely mature video processing library for zig
09:02:07FromDiscord<mratsim> or Nim
09:02:09FromDiscord<iWonderAboutTuatara> But there is for C, and c2nim is nice
09:02:18FromDiscord<Rika> maybe he is not familiar about the libraries
09:02:20*luis joined #nim
09:02:26FromDiscord<Rika> (edit) 'libraries' => 'library* support of each language'
09:02:29FromDiscord<mratsim> does he use Avisynth for video processing? because someone wrote a wrapper
09:03:19FromDiscord<mratsim> for networking what kind? if he happen to use P2P networking, I'm pretty sure Zig doesn't have the wealth of library we wrote at Status
09:03:31YardanicoZig is still a very very new language
09:03:34FromDiscord<mratsim> and even for non-P2P there are stuff like Protobuf that take time to write
09:04:00FromDiscord<Rika> zig's younger than nim right?
09:04:07FromDiscord<Rika> is zig more popular?
09:04:25ZevvRika: he's at the point where I was a few years a go, sick&tired of what he uses now and looking for the next thing to invest time in
09:04:34Zevvso logically he's looking at all viable options
09:04:43Yardanico@Rika no lol
09:04:45FromDiscord<Rika> ah i see
09:04:48YardanicoZig is very new
09:04:49FromDiscord<Rika> no lol to which
09:04:55FromDiscord<lqdev> a little less popular i'd say
09:04:56Yardanicozig is much younger than nim
09:05:00Yardanico@lqdev it's much less popular
09:05:05FromDiscord<Rika> new languages can be more popular than some older ones
09:05:10FromDiscord<lqdev> V
09:05:12Yardanicothere's still no package manager
09:05:15YardanicoV isn't popular either
09:05:17FromDiscord<Rika> ????????????
09:05:19Yardanicostar count doesn't matter
09:05:24FromDiscord<Rika> ZIG HAS NO PACKAGE MANAGER???
09:05:30FromDiscord<Rika> holy shit thats a massive L
09:05:37Yardanicothere's only one small abandoned attempt at https://github.com/zigtools/zpm
09:05:53disbot➥ 3package manager
09:05:57FromDiscord<Rika> that is really unfortunate
09:06:08FromDiscord<lqdev> *meanwhile V was supposed to be at 1.0 in december 2019. it's october 2020 and it's still not at 0.2*
09:06:24FromDiscord<Rika> lol
09:06:31FromDiscord<lqdev> at least they're working on it
09:06:46FromDiscord<lqdev> who knows what'll come out of it
09:06:52FromDiscord<lqdev> it's definitely not the language for me.
09:07:19FromDiscord<Rika> i dont know, i dont find it particularly interesting
09:07:36FromDiscord<Rika> comparing it with nim, rust, go, zig, V doesnt really have anything to stand out no?
09:08:00FromDiscord<Rika> other than the controversy but that's not because of the language itself
09:08:30*newUser quit (Remote host closed the connection)
09:08:31*lum_unreg joined #nim
09:08:33Yardanicodeciding language syntax by twitter polls is really outstanding imo
09:08:38Yardanicono one have done that before
09:08:39*lum_unreg quit (Client Quit)
09:13:08Araqwe need to attract more commercial parties, who cares if the hobbyists still prefer Basic or one of the newer languages.
09:13:51*lum_unreg joined #nim
09:13:52AraqWe should copy what makes Go and Rust and C++ successful languages.
09:13:55*lum_unreg quit (Client Quit)
09:14:18Araqand that means not adding yet another syntax for tuple declarations, sorry.
09:14:41Yardanicowe should just make a proprietary Nim fork, like one japanese company did to Zig :D
09:14:51Araqit means professionalism, caring about backwards compatibility
09:15:00Yardanicothey were dissatisfied with Zig's creator handling of PRs and other stuff, and just forked it https://zen-lang.org/
09:15:26Araqand bugfixing.
09:15:43Araqand following our 2020 plan
09:17:18supakeenstability would be preferred for me
09:17:29supakeencurrently we only use nim at work for jobs that take less than one working day
09:19:22Zevvthat's because coding in nim is so fast, right
09:19:41supakeenZevv: honestly the reason is so that *if* we hit a bug we can rewrite in another language within a day as well
09:20:08supakeenand to give a no pressure way for people to try it out and get familiar with it
09:20:08Araqfor example
09:20:28Araqmratsim is telling us what to add to fusion
09:20:43ZevvMy new toy project (GPL) is now commercially used at my $customer, and time I spend on it are payed. Hope this might cause some traction for Nim in the company.
09:20:57Yardanicooh, the event viewer?
09:21:03Araqcan anybody please help us with that? I think it's pretty important
09:21:21supakeenZevv: That's also the reason why I have started my toy project because we have a need for it at work.
09:22:05supakeenAraq: You mean the different channel implementations?
09:22:28AraqI mean the atomic refcounting but new channels are welcome too
09:22:54supakeenFor now I'll be busy with my PRNG implementations but after that I do want to toy with concurrent things.
09:23:09FromDiscord<mratsim> I've created an org for parallel Nim 😛 https://github.com/weavers-guild
09:24:01Yardanicoinb4 "'let's create a #multithreading channel on discord" :P
09:24:12Araqatomic refcounts are vocabulary types, they need to be in fusion or in std
09:24:55FromDiscord<mratsim> it was more for concurrent data structure, taskpools, moving weave there and experiments with multithreaded and/or threadsafe async
09:27:01*newUser joined #nim
09:28:08narimiranYardanico: the current link will be just fine for now. no need to wait any more. (but please add a dot after that link :))
09:28:16YardanicoI did that :)
09:28:25Yardanicoah wait no I didn't commit
09:28:32YardanicoI changed the text to But if you're eager to try them out, there's a [1.4 release candidate](https://github.com/nim-lang/nightlies/releases/tag/2020-10-07-version-1-4-3b901d1e361f49d48fb64d115e42c04a4a37100c) available.
09:28:41*narimiran thumbs up
09:29:03Araqah and he did it again, https://forum.nim-lang.org/t/6920#43378
09:29:23narimirancrazy guy that mratsim!
09:29:33Yardanicomaybe it's multiple people under the same account?
09:29:45narimiranYardanico: that's the most plausible explanation!!
09:29:45Araqwe can create issues and put bounties on it if that's what it takes to make #nim more productive
09:29:46newUserI'm searching for an equivalent std::ofstream::is_open, or can I use often in my code: if outFile.open("ForBlaBla.txt", fmWrite): ?
09:30:26Yardaniconarimiran: pushed the change
09:30:46narimiranYardanico: i was notified :) merging it and then it's time for some promotion :)
09:30:53Araqalso, we might want to have fusion/json2.nim and don't care about the compile-time-ness of JSON. you can always use staticExec anyway
09:30:54*lum_unreg joined #nim
09:31:28Araqand omg, this new json2 wouldn't work on node.js either, terrible :-)
09:31:31Yardaniconarimiran: pls mention @yardanic0 (my twitter) in the nim_lang tweet :P
09:31:56narimiranYardanico: will do! and if you want, you can post it on reddit and HN for some sweet karma points :)
09:32:12Yardanicowow how did you update the website so fast
09:32:22narimiranYardanico: time-bending
09:32:25*luis quit (Ping timeout: 272 seconds)
09:32:56*luis joined #nim
09:33:48*Kiloneie joined #nim
09:34:11narimiran(i'll wait with tweet until reddit and HN posts are alive, so i can link to them too)
09:34:50Yardanicoyeah posted them
09:35:03Yardanicohttps://www.reddit.com/r/programming/comments/jbkerv/introduction_to_arcorc_in_nim/ https://reddit.com/r/nim https://news.ycombinator.com/item?id=24786649
09:35:25YardanicoI guess you don't need to mention the r/nim one :P
09:35:34Yardanicobut thanks a lot :)
09:36:39narimiranyeah, i prefer r/programming one
09:37:39FromDiscord<Ricky Spanish> anyyone know if nimterop maintains a list of acceptable types? i get ```#define ORT_API_CALL __declspec(naked)``` ``` # const 'ORT_API_CALL' has unsupported value '__declspec(naked)'``` this define producing this warning but it doesent seem to matter if its __stdcall or __declspec or any other type i put in, it seems to fail to convert
09:38:08*newUser quit (Remote host closed the connection)
09:38:28Yardanicotime to get ready to answer questions on reddit an HN (if they get some traction) :P
09:38:34ee7[m]gets notification of blog post merged
09:38:46Yardanicothanks for all of your fixes!
09:38:56ee7[m]No problem. You're welcome.
09:41:32supakeenI can only give two suggestions: Remove the "simple" words and I think "main difference between ARC and Nim GCs is that ARC is fully deterministic" Nim GCs should be refc?
09:41:41supakeenNice article :)
09:42:15Yardanicowe also have markAndSweep, boehm, go
09:42:22Yardanicosupakeen: thanks a lot :P
09:42:37supakeenThen "current Nim GCs"?
09:42:42supakeenMaybe it's nitpicking.
09:42:52Yardanicowell, we try to not call ARC a GC :P
09:42:59supakeenAhhh that I did not know.
09:43:01supakeenThen it makes sense.
09:43:08Yardanicobecause most people associate GCs with tracing GCs
09:43:15supakeenOf course, yea.
09:44:05Yardanicoalso I'm curious if we'll get more nim users on the discord today than normally
09:45:23*superbia quit (Quit: WeeChat 2.9)
09:46:37FromDiscord<Kiloneie> why ?
09:46:54supakeenBecause Nim might be a bit more in the spotlight today if the post gains traction.
09:47:14Yardanico@Kiloneie generally we see an influx of new discord users with each new release
09:47:28Yardanicoand even just for new nim blog posts
09:47:48Yardanicoso more people who don't know Nim might see a post about it in their feed on reddit/HN/twitter
09:48:32*Tanger quit (Remote host closed the connection)
09:48:55FromDiscord<Kiloneie> Well i know that you can do that on reddit, as long as it's not the same person spamming into the same topic the same thing... smthing smthing self promotion xD
09:49:26Yardanicoit's not self promotion if it's a blog post :)
09:50:05FromDiscord<Kiloneie> well... reddit and rules not my thing xD
09:50:25FromDiscord<Kiloneie> i think metaprogramming should get another blog post
09:50:30supakeenI've posted a semi-accusative reply so if someone can set me straight on HN, please do :)
09:52:42*luis quit (Ping timeout: 260 seconds)
09:53:50supakeenThank you :)
09:54:32*luis joined #nim
09:59:53*luis quit (Quit: luis)
10:07:50*luis joined #nim
10:08:09narimiransupakeen: thank you for asking the question there (and not here) to start the discussion, and the answer will be visible to the wider audience
10:08:15*luis quit (Remote host closed the connection)
10:08:26supakeenThat's why I did that.
10:08:28*luis joined #nim
10:08:31supakeenIt's a common criticism.
10:08:32*narimiran thumbs up
10:08:46FromDiscord<Rika> inb4 downvoted
10:09:02*luis quit (Disconnected by services)
10:09:09supakeenLuckily downvotes don't work on HN unless you have a whole bunch of pts.
10:09:33narimiranbut there is HN algorithm working in background that can demote your post
10:10:46narimiranbtw, supakeen, nice avatar on twitter
10:10:56supakeenThank you :) It's what the nickname comes from anyways.
10:11:06narimiranyeah, i just realized that :)
10:11:25Yardanicothat feeling when I posted my own post on the discord server in announcements :P
10:11:28Yardanicoand mentioned myself :DD
10:12:34narimiranyo dawg....
10:13:38*lum_unreg quit (Quit: WeeChat 2.8)
10:14:26*FromDiscord quit (Remote host closed the connection)
10:14:40*FromDiscord joined #nim
10:16:26*lum joined #nim
10:17:30FromDiscord<lqdev> lmao
10:17:53FromDiscord<Yardanico> apparently some people already use discord's follow channel feature
10:18:12FromDiscord<Yardanico> there are 4 discord servers subbed to the announcements channel
10:19:40FromDiscord<kaletaa> penis
10:19:43FromDiscord<Varriount> While ARC is a big step forward in terms of destructor & move functionality, I feel like the concept itself is being a tad over-hyped
10:20:09supakeenPerhaps it's the step itself that gets hyped, not the concept :)
10:20:10*letto quit (Quit: Konversation terminated!)
10:21:58*letto joined #nim
10:23:26*krux02 joined #nim
10:24:50FromDiscord<mratsim> ORC is more interesting than ARC due to cycle-counting for RC
10:25:09FromDiscord<mratsim> ARC itself is something that C++, Swift, Rust already have
10:25:19Yardanicowe need 4raq to make an in-depth article about ARC/ORC :P
10:25:29FromDiscord<Varriount> Isn't it just mark & sweep?
10:25:41FromDiscord<Varriount> (for the cycle counting)
10:25:41Yardanicoit's a completely different algorithm
10:26:41FromDiscord<mratsim> It's Beacon & Dingle coloring algorithm
10:26:49Yardanicoisn't it Bacon?
10:26:54FromDiscord<mratsim> a hidden paper
10:26:58FromDiscord<mratsim> yeah Beacon Bacon 😉
10:27:40FromDiscord<Rika> same thing
10:27:55FromDiscord<mratsim> Bacon is a beacon for my lunch
10:29:08*narimiran quit (Quit: leaving)
10:29:40FromDiscord<Varriount> Anyone know the status of the thread subgraph stuff?
10:30:02FromDiscord<mratsim> WHat's this?
10:30:22disbot➥ 3'isolated' data for Nim ; snippet at 12https://play.nim-lang.org/#ix=2sjf
10:30:35FromDiscord<Varriount> Yes, that
10:31:29*testtestettettts joined #nim
10:33:26Yardanicohi lum
10:34:03Yardanicoyou're lum
10:34:26testtestettetttsYardanico: yes, but i am test
10:34:51Yardanicoguess I had too much 'echo "test"'s today...
10:34:58testtestettetttsokay, bye
10:35:43*testtestettettts quit (Remote host closed the connection)
10:41:12FromDiscord<kaletaa> poor test
10:41:42FromDiscord<Ricky Spanish> is it possible to modify nimsymkind in nimterop to set the type of a value being converted?
10:44:07FromDiscord<aooo> In nim, is it possible to replace stdin as it's typed? Example, if I'm typing the letter A can it be automatically replaced with B?
10:44:46FromDiscord<Rika> maybe in the terminal's raw mode, but im not skilled in that
10:44:49Yardanicowell, if it can be done in some other language, it can be done in nim :P
10:45:00PMunchI mean you can send a clear character and then the B character
10:45:01FromDiscord<mratsim> if you can do it in C you can, but I'm not sure you can do it in C
10:45:20FromDiscord<mratsim> but the stdin is only read once you press enter
10:45:26Yardanicoah right
10:45:32Yardanicoso you need two programs
10:45:35FromDiscord<Rika> it isnt if you change terminal properties
10:45:50FromDiscord<mratsim> in custom prompt you can though (like ncurses or less or vim or fzf)
10:45:57FromDiscord<Rika> if it was only read on enter, then stuff like linenoise wouldnt work
10:46:38PMunchhttps://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode.html < this might help you
10:46:44*TomDotTom joined #nim
10:46:46FromDiscord<aooo> How is it that some text editors can replace tab length or even replace tabs as spaces?
10:46:57FromDiscord<Rika> > maybe in the terminal's raw mode, but im not skilled in that↵i cry
10:47:23*opal quit (Ping timeout: 240 seconds)
10:47:45Yardanico@aooo are you sure that they do it right in the stdin?
10:48:01Yardanicowouldn't they just receive tabs from the stdin and then convert them to spaces?
10:48:09PMunchThat is impossible, stdin is append only afaik
10:48:23FromDiscord<Rika> yall please look into the link pmunch sent
10:48:24PMunchOr rather it's a stream
10:48:27FromDiscord<Rika> yall making me cry
10:48:43Yardanicoi didn't sleep for quite a long time
10:49:30FromDiscord<aooo> I think it would just be easier to remap my keyboard tab as spaces.
10:51:49Yardanicoseems like HN post didn't really succeed :) we're 47 in new
11:02:18*opal joined #nim
11:05:58AraqYardanico, we'll resubmit with the release of 1.4
11:06:06Araqwhich is btw done as far as I can tell
11:06:07FromDiscord<neow> hello, can I have a quick question? how do I most cleanly check if two ref variables are the same (that is, point to the same memory address)
11:06:21Araqbut I said that last week ago too
11:06:22*nature joined #nim
11:07:05FromDiscord<Rika> neow i think == does that already
11:07:20Araqah no, this is a showstopper
11:07:26disbot➥ 3dbQuote additional escape regression ; snippet at 12https://play.nim-lang.org/#ix=2AMM
11:08:32*nc-x joined #nim
11:08:39nc-xthere's also https://github.com/nim-lang/Nim/milestone/8
11:09:05FromDiscord<neow> > neow i think == does that already↵@Rika well for ref Table, nope https://play.nim-lang.org/#ix=2AMN
11:09:40nc-x1.4 is turning out to be good. if nil checking, arc/orc, and concepts get completed for 1.6 it would be great :D
11:09:50Yardanicobecause tables have their own comparison operator @neow
11:10:22Yardaniconot sure how you would compare them as refs though
11:10:28Yardanicoby casting to an empty ref object? :P
11:10:41Araqcast it to 'pointer'
11:10:48Yardanicoah yah that
11:10:57Araqbut I consider it a bug
11:11:22Araqprobably not worth changing it now but this shouldn't have survived the 1.0 review
11:11:43AraqTableRef should have ref equality
11:12:01Yardanicohttps://github.com/nim-lang/Nim/commit/79891b6b9b0cb324081dbd6b558534f91ec134fe introduced ref tables and this operator ;)
11:13:53Araqyeah and this is why every successful language has these "gotchas" and "quirks", it takes decades to develop a PL and ideally different authors are involved and when we added TableRef there was no experimental: "strictFuncs" to tell us what a bad idea this really is
11:14:44Araqnc-x, I long for IC for 1.6
11:15:03Araqnil checking is done but pending my review
11:15:27Araqconcepts are yours to take over, my branch is commented well :P
11:16:32*narimiran joined #nim
11:17:57FromDiscord<neow> so, casting to ptr Table will remain the way to compare ref Table's for pointer equality?
11:18:23Araqno need for 'ptr Table', cast[pointer](mytableRef) does the job
11:18:26nc-xwhat is remaining for the concepts branch to be completed?
11:19:49Araqa way to infer static-T values
11:20:11Araqand maybe a way to opt-in into the old non-declarative style
11:21:19Araqof course these can be combined, if you have the latter, static-T would be covered automatically
11:22:14Araqoh and a way to write "type T needs to be movable, copyable, trivially destructible"
11:22:32Araqmaybe we can cover this later tho
11:22:52Araq(the syntax should be obvious)
11:27:00*landerlo joined #nim
11:27:11*lritter joined #nim
11:30:27FromDiscord<neow> sent a code paste, see https://play.nim-lang.org/#ix=2AMU
11:31:04FromDiscord<neow> https://play.nim-lang.org/#ix=2AMV in case the bridge misformated it
11:33:55Yardanicoit's disabled by default
11:35:43PMunchHmm, I really wish we had a better docopt implementation..
11:38:01FromDiscord<neow> > it's disabled by default↵@Yardanico[IRC]#0000 why does the same code execute fine for Tables?
11:38:17Yardanicobecause they have .add defined for the ref type itself
11:38:22Yardanicofor TableRef
11:38:27Yardanicoalso you shouldn't use add for tables
11:38:31Yardanicouse normal [] instead
11:38:57Yardanico^that's the compare as unsigned operator from system
11:39:18Yardanico!echo -3 <=% 1
11:39:20FromDiscord<Rika> auto-deref only works for fields by default afaik
11:39:21FromDiscord<neow> I see, so in case it's syntactic sugar .() I need to deref myself, but if it's polymorphism for ref types, I don't
11:39:26Yardanico!eval echo -3 <=% 1
11:40:42PMunch!eval -1 <=% uint.high
11:40:43NimBotCompile failed: /usercode/in.nim(1, 4) Error: type mismatch: got <int literal(-1), uint>
11:40:51Yardanicoit's for comparing two ints as unsigned :)
11:40:53Yardanicoit casts them
11:41:15PMunch!eval -1'u32 <=% uint32.high
11:41:16NimBotCompile failed: /usercode/in.nim(1, 1) Error: type mismatch: got <uint32>
11:41:33PMunch!eval -1 <=% uint32.high.int
11:41:34NimBotCompile failed: /usercode/in.nim(1, 4) Error: expression '-1 <=% int(high(uint32))' is of type 'bool' and has to be discarded
11:41:43PMunch!eval echo -1 <=% uint32.high.int
11:42:18PMunchAh, wait..
11:42:20FromDiscord<neow> !eval echo -1 <=% int.high
11:42:20PMunchDamn it
11:42:39PMunch@neow, it's about twice int.high
11:43:05FromDiscord<neow> !eval $uint(int.high)
11:43:06NimBotCompile failed: /usercode/in.nim(1, 1) Error: expression '$uint(high(int))' is of type 'string' and has to be discarded
11:43:12PMunch!eval echo -1 >% int.high
11:43:21FromDiscord<neow> !eval echo $uint(int.high)
11:43:32FromDiscord<neow> !eval echo $uint(-1)
11:43:33NimBotCompile failed: /usercode/in.nim(1, 11) Error: -1 can't be converted to uint
11:43:50FromDiscord<neow> what
11:44:04PMunch-1 can't be uints :P
11:44:08Yardanicoyou can't convert -1 to an uint :P
11:44:12Yardanicouint() is a conversion, not casting
11:44:19PMunch!eval echo cast[uint](-1)
11:44:21Yardanico!eval echo cast[uint](-1)
11:44:30FromDiscord<neow> !eval echo cast[uint] (-1)
11:44:34PMunchHaha, nice :P
11:44:39*nc-x quit (Ping timeout: 245 seconds)
11:49:53*rockcavera joined #nim
11:56:04*oculux joined #nim
11:58:43*oculuxe quit (Ping timeout: 260 seconds)
11:59:18*TomDotTom quit (Ping timeout: 260 seconds)
12:03:19*TomDotTom joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:38*supakeen joined #nim
12:09:45FromDiscord<krisppurg> !eval echo cast[uint] (-2)
12:10:20PMunchHmm, X is weird..
12:10:42PMunchI try to position a window on a certain monitor, but that is apparently not as straight forward as you'd think..
12:14:47*Kiloneie quit (Quit: Leaving)
12:22:39lum!eval echo "/ban lum"
12:22:41NimBot/ban lum
12:22:48FromDiscord<Rika> lmao
12:22:57FromDiscord<Rika> not how irc works
12:32:24FromDiscord<Rika> why?
12:32:44PMunchXGetGeometry tells me the window is on position 3940, but XMoveWindow to 100, 100 doesn't change it
12:32:54*clyybber joined #nim
12:33:24FromDiscord<Rika> lol
12:33:28FromDiscord<Rika> that sounds broken
12:33:51PMunchWell, my right monitor starts at 3840
12:34:00PMunchSo it's 100 pixels to the right of that
12:34:12PMunchBut I can't find any way to move it to actual 0, 0
12:34:17PMunchOr 100, 100
12:37:33PMunchScreenCount also returns 1
12:37:47PMunchAnd getting the size of it returns the combined size..
12:38:18PMunchAnd they have the same parent
12:38:57FromDiscord<Vindaar> to be honest when setting up screen resolutions with `xrandr` I'm already confused by everything. So I'm not surprised by what you're sayingf
12:39:26PMunchI never got the hate for xrandr, I rarely have any issues with it
12:48:01PMunchAh, the "move the window in the expose event" trick works in i3, but not in nimdow..
12:48:35FromDiscord<Vindaar> I don't hate it, I just don't think it's intuitive, haha
12:52:05*TomDotTom quit (Ping timeout: 265 seconds)
12:53:28FromDiscord<Clyybber> @Varriount Isolated[T] already exists
12:57:36PrestigePMunch: what do you mean?
13:03:30*TomDotTom joined #nim
13:07:28PMunchPrestige, not sure what part you didn't understand. But I just figured out how to do this both in i3 and nimdow
13:07:52PMunchI simply had to set override_redirect to true
13:08:39PrestigeJust the "trick" part
13:10:26leorize[m]narimiran: just woke up and I heard something is wrong with nightlies?
13:10:45PrestigeAnd yeah that should work, but if you want it managed by nimdow I think you can just configure the window
13:11:16narimiranleorize[m]: from here on: https://irclogs.nim-lang.org/15-10-2020.html#08:05:14
13:11:34PMunchPrestige, well I don't want it managed, that's the whole idea :P
13:11:44*dv3lood joined #nim
13:11:53PrestigePerfect, then you're doing the right thing
13:12:37leorize[m]narimiran: I know what's the issue, gonna push a fix real quick
13:13:25*dv3lood quit (Remote host closed the connection)
13:17:54leorize[m]fix pushed
13:18:06leorize[m]hopefully windows/osx keep working or I'll be mad :P
13:21:57federico3there was a thread on the forum regarding https://nim-lang.org/features.html months ago but nothing changed it seems
13:23:37leorize[m]I wrote a thread about the frontpage but school is taking time away from actually working on that
13:24:41narimiranYardanico: your article finally hit HN frontpage :)
13:24:53narimiranHN's algorithm works in mysterious ways
13:25:07Yardanicolol nice
13:25:35narimiran(now go and write some answers :P)
13:26:39narimiran"Is Nim a systems programming language?" might become new bikeshedding battleground!
13:27:01narimiranif anybody wants to give their answer to that question: https://news.ycombinator.com/item?id=24787956
13:27:07FromDiscord<Rika> oh my GOD
13:27:10FromDiscord<Rika> i was just gonna say
13:27:16FromDiscord<Rika> i'd cry if someone legitimately asked that
13:27:19FromDiscord<Rika> i gues im crying
13:29:00narimiranalso, it has been x-posted to r/ProgrammingLanguages and mratsim is there answering: https://old.reddit.com/r/ProgrammingLanguages/comments/jbkual/introduction_to_arcorc_in_nim/
13:29:02*landerlo quit (Remote host closed the connection)
13:30:15FromDiscord<whisperdev> How do I modify and save environment variable on Windows?
13:30:19FromDiscord<whisperdev> via Nim
13:30:36FromDiscord<lqdev> idk i just use `setx` via cmd
13:31:04leorize[m]you can do some registry hacks but tbh cmd is very convenient :P
13:31:16FromDiscord<flywind> `putEnv` in `os` stdlib
13:31:35*Kiloneie joined #nim
13:32:23FromDiscord<whisperdev> for some reason it looks like putEnv is not changing the setting 😦
13:33:04leorize[m]@flywind they want to save it, and on windows you need to either use `cmd setx` or do some registry modification like `finish.nim`
13:33:20*rockcavera quit (Remote host closed the connection)
13:33:21FromDiscord<Rika> why is it that i always see only criticism of nim in these forum comments? is this just the natural programming community's behaviour?
13:33:21FromDiscord<lqdev> narimiran: https://media.discordapp.net/attachments/371759389889003532/766292630358851624/unknown.png
13:33:26FromDiscord<lqdev> just send them this image
13:33:32FromDiscord<lqdev> anyone who asks this question.
13:33:40FromDiscord<Rika> theyll ask why you consider it a systems proglang
13:33:48FromDiscord<flywind> yea, it works only in application level I guess.
13:34:47leorize[m]@Rika it's just community behavior tbh, people who like Nim will participate in Nim development, so you don't hear too much there
13:34:50FromDiscord<lqdev> HN is a joke lol
13:35:07FromDiscord<lqdev> >However, this article says that ORC, a non-deterministic and non-hard-realtime GC system, is likely to become the new default GC in the future.
13:35:11FromDiscord<lqdev> >orc
13:35:14FromDiscord<lqdev> >non-deterministic
13:35:22FromDiscord<Rika> it is nondeterministic afaik
13:35:27FromDiscord<Rika> arc is deterministic
13:35:27FromDiscord<lqdev> is it?
13:35:44FromDiscord<lqdev> idk what these HNers have against GCs
13:35:45FromDiscord<Recruit_main707> r/woooosh
13:35:49FromDiscord<lqdev> they should go back to circlejerking rust
13:35:53leorize[m]yes it is
13:36:06leorize[m]well Java imprinted that GC is evil on everyone :P
13:36:11FromDiscord<lqdev> ORC is deterministic from what i understood listening to 4raq's nimconf talk
13:36:29FromDiscord<lqdev> it's basically ARC with a cycle detector
13:36:34leorize[m]ORC is not deterministic, it requires traveling of pointers at runtime
13:36:36FromDiscord<Recruit_main707> collector*
13:36:43FromDiscord<flywind> @whisperdev https://nim-lang.org/docs/registry.html
13:36:55FromDiscord<lqdev> leorize: understood
13:37:23FromDiscord<lqdev> i guess that destroys its deterministic-ness, but really, what's all the hype for anyways
13:37:26leorize[m]I think most people just don't understand what hard-realtime is tbh
13:37:32FromDiscord<lqdev> yeeeeeeah
13:37:51FromDiscord<Ricky Spanish> i uh just dont understand why anyone wouldnt view the ability to turn on/off gc as being nothing but an advantage tbh thats my main struggle of thought...like learn 1 language and use it for either by choice and then dip into C when you wanna feel dirty win-win in my books but even when its mentioned the debates seem to ignore it and focus on arguing over specific gc's
13:37:52FromDiscord<whisperdev> hmm so putEnv does not save it?
13:38:59leorize[m]@whisperdev putEnv change the environment of your process and the processes you're launching afterwards
13:39:12leorize[m]for "saving" it you have to modify the registry because Windows
13:39:19leorize[m]well I mean same goes for Linux
13:39:26FromDiscord<Recruit_main707> @Ricky Spanish gc:none will be getting deprecated, so that argument wont be useful
13:39:29leorize[m]just that Windows have a standardized way to save those
13:39:43leorize[m]@Recruit_main707 --gc:none is alive and well
13:39:54FromDiscord<lqdev> we should stop calling --gc options GCs really
13:40:12FromDiscord<lqdev> deprecate --gc:x and rename it to --mman:x 🤔
13:40:13leorize[m]Araq already said --gc is a misnomer
13:40:29FromDiscord<lqdev> leorize: yea i remember
13:41:05FromDiscord<Recruit_main707> leorize: that doesnt change what i said
13:42:39FromDiscord<Recruit_main707> we still have gc:none, but it is most likely getting deprecated
13:43:11FromDiscord<lqdev> >--gc:none is alive and well
13:43:17FromDiscord<lqdev> --gc:none has its uses dude
13:43:25FromDiscord<lqdev> it doesn't need to be deprecated
13:43:33FromDiscord<lqdev> we just need to point beginners away from it. 😉
13:43:51FromDiscord<lqdev> slap a million warnings all over it
13:44:01FromDiscord<lqdev> oh wait. it already _has_ a million warnings all over it
13:44:02FromDiscord<lqdev> *sigh*
13:44:40FromDiscord<Recruit_main707> dont tell me, tell 4raq, i like to have the option
13:44:50FromDiscord<Recruit_main707> https://github.com/nim-lang/RFCs/issues/177#issuecomment-696113293
13:44:51disbot➥ 3Unify Nim's GC/memory management options ; snippet at 12https://play.nim-lang.org/#ix=24Ua
13:45:19FromDiscord<Recruit_main707> ?
13:45:50FromDiscord<lqdev> i wonder why Araq wants --gc:go to stay
13:46:05FromDiscord<lqdev> even though there isn't much Go interop in the wild
13:46:25FromDiscord<lqdev> feels like quite a hurdle to maintain something that isn't gonna have much use.
13:47:02leorize[m]maybe it's being used in some proprietary software that we don't know of
13:47:13leorize[m]@Recruit_main707 hmm, I stand corrected then
13:48:20FromDiscord<Recruit_main707> so am i
13:48:28FromDiscord<Recruit_main707> had a stroke there
13:48:31FromDiscord<Recruit_main707> nvm
13:49:48leorize[m]anyone wanna try converting this person lol: https://news.ycombinator.com/item?id=24788467
13:50:02PMunchAdded some missing features to the randr wrapper: https://github.com/nim-lang/x11/pull/38
13:50:03disbot➥ 3Add wrappers for xrandr monitor functions
13:50:29Araqlook, if argued well, --gc:none can stay
13:50:42Araqbut so far I don't understand the arguments for it
13:51:03Araqthat's probably my fault, I'll look into it
13:51:49FromDiscord<Recruit_main707> we could open a forum thread to discuss it?
13:51:55FromDiscord<whisperdev> Where can I find finish.nim?
13:51:55*TomDotTom quit (Remote host closed the connection)
13:52:19*TomDotTom joined #nim
13:52:20narimiranmaybe we should emphasize more that ARC can (sometimes) replace gc:none?
13:53:38narimiranleorize[m]: PMunch just did :)
13:54:00leorize[m]so reading https://github.com/nim-lang/RFCs/issues/177, I think the issue here is that vitreo don't want destructor injections?
13:54:01disbot➥ 3Unify Nim's GC/memory management options ; snippet at 12https://play.nim-lang.org/#ix=24Ua
13:54:25Araqleorize[m], no he want --exceptions:setjmp which is still available
13:54:36Araqand unrelated to gc:arc
13:54:46Araq(except that we consider it the better default for arc)
13:55:02leorize[m]isn't the bunch of `if`s are part of `try-finally` generation?
13:55:10leorize[m]even with setjmp we would still see them, no?
13:55:52PMunchAraq, is ARC a perfect solution for microcontrollers? If not then I'd like gc:none to stay..
13:56:53federico3I hope so
13:57:12FromDiscord<Recruit_main707> lets just open a thread for people to discuss it
13:57:30PMunchIf it doesn't add a single byte of overhead when no GC'ed types are used then I'm fine with it
13:58:04PMunchA --warngc option would be nice though if it is removed and you really want to avoid the gc
13:58:29AraqPMunch, I'm not aware of a byte of overhead when no GC'ed types are used
13:58:40YardanicoPMunch: nim does that since forever with gc:none :)
13:58:44Araqhowever --exceptions:setjmp might be better than indeed
13:59:00Yardanicoit warns you for every time you've used something involving a GC
13:59:20*PMunch quit (Remote host closed the connection)
13:59:47*PMunch joined #nim
14:02:16Araqnarimiran, I think it's more convincing to refer naysayers to https://forum.nim-lang.org/t/6916
14:02:20narimiranfederico3: while you're here - are the initial problems with 1.4RC resolved now with the last week's RC?
14:02:43Araqnarimiran, btw the devel we have right now is 1.4, last RC
14:03:03disruptekthe reason to keep --gc:none is that it gives us a rebuttal to the "but gc bad" crowd. it's silly, but it's worth the cost of supporting it.
14:03:16narimiranAraq: ok
14:03:58Araqdisruptek, hah, ok. I have to admit that's convincing
14:04:16leorize[m]hmm, I kinda dislike it that arm nightlies are so slow to build
14:04:25*PMunch quit (Client Quit)
14:04:32disruptekif it was hard to support, you could make a better case against it.
14:04:46leorize[m]I'll need to invent a cross-compiling stategy for those. Running the arm compiler on x86 is too slow.
14:05:04disruptekwhy does the speed matter?
14:05:31FromDiscord<Rika> because dev time i assume]
14:05:47leorize[m]it kinda matters when everything else finishes 2-3x faster
14:06:07*arecacea1 joined #nim
14:06:13disruptekbut why is that important?
14:06:40leorize[m]because if nightlies get out faster I can test them faster
14:06:55disruptekso you're saying that you're having trouble testing arm.
14:06:56leorize[m]the only reason I'm building nightlies like this is so that the compiler see some testing done
14:07:20leorize[m]but shashlick is working on a solution to test the generated compilers, so it doesn't make sense to have nightlies as the bottleneck
14:07:45disruptekwhat doesn't make sense is to introduce grief about performance that doesn't matter.
14:07:57disrupteki don't care if nightly builds take 3 days as long as they complete.
14:08:26narimirandisruptek: i care.
14:08:41disrupteki hear that but i don't hear any logical reasoning.
14:09:18narimiranbecause when Araq says "go go go", i don't want to say "slo' bro, see you in 3 days"
14:09:36leorize[m]https://github.com/nim-lang/nightlies/actions/runs/308652046 <- lol github broke
14:10:31disruptekso you're saying that arm is so unstable that you need a faster feedback loop?
14:12:38narimiranleorize[m]: i cannot push currently. it really might be broken
14:12:51leorize[m]it's because the current process is insanely inefficient
14:13:26leorize[m]though this is a problem that can be solved either by just throwing better hardware in or I do some magic software trick
14:14:11disruptekmy opinion is that you are adding constraints that don't need to exist and it's really not even clear what would constitute success: 6hrs? 2hrs? 20mins?
14:14:34disruptekbut, in the immortal words of our BDFL, "i don't care."
14:14:58leorize[m]it used to be 6hrs, I made it 2hrs now
14:16:02disruptekin the business of free software, people will always work on what's important to them.
14:16:22leorize[m]I work on these when I'm bored, really :P
14:19:32Zevvyay Yardanico on HN fp \p/
14:20:06leorize[m]Araq: can you enable GH pages for fusion?
14:20:23leorize[m]we're building the docs but if you don't enable the option in repo settings github won't publish them afaik
14:21:27disruptekgood. fusion is better left a dirty secret. 😁
14:22:57FromDiscord<lqdev> disruptek: just out of sheer curiosity, why do you think fusion is bad?
14:24:28*narimiran quit (Ping timeout: 246 seconds)
14:25:37FromDiscord<Recruit_main707> https://forum.nim-lang.org/t/6930#43398 i created a thread so that it can be discussed in-depth, i hope it doesnt fall into the void and is just ignored
14:26:03disrupteki didn't support the formal argument for the idea in the RFC and outlined reasons there. the implementation has proven to be quite a bit different, and my arguments are even stronger against it. it's basically untested software that we cannot version with the fidelity we expect from package management. basically, we're tying poorly tested and widely disused code to particular compiler releases.
14:27:27FromDiscord<Rika> your reason sounds sensible to me
14:27:39disruptekyou should expect nothing less.
14:28:46AraqI don't feel like arguing it again, you read my RFC which wasn't about fusion, apply it to fusion and then complain that it doesn't follow the RFC's ideas
14:28:56disrupteki can, but so can you.
14:29:05disruptekno point in beating the dead horse.
14:29:08Araqleorize[m], how to enable it?
14:29:28disrupteki support your right to embark on experiments. i'm just not supporting this one with participation.
14:30:25leorize[m]Araq: go to repo settings and you should find "Github Pages" around the bottom
14:30:50leorize[m]just tell it to build against the `gh-pages` branch
14:30:59Araqwell I don't see it
14:31:28*narimiran joined #nim
14:31:45Araqoh wait
14:31:56AraqGitHub Pages is designed to host your personal, organization, or project pages from a GitHub repository.
14:31:56Araq Your site is published at https://nim-lang.github.io/fusion/
14:32:04narimiranoh, you didn't see my messages because of my wonky internet connections
14:32:14narimirani enabled it in the mean time
14:32:31leorize[m]it seems to be working now
14:32:33narimiranbut it says it should be at https://nim-lang.github.io/fusion/ which doesn't exist
14:32:43Araqah good because I'm about to leave, see you later
14:33:37leorize[m]because timothee PR don't rename/copy theindex -> index
14:34:00narimiranclassic "i'll leave the details for somebody after me"
14:35:01AraqI think it's more like "I did 20 things at once and still delivered 50-80% of the solution"
14:35:18*leorize[m] uploaded an image: 20201015_09h34m34s_grim.png (31KiB) < https://matrix.org/_matrix/media/r0/download/envs.net/c418df92fdc9010bcea74fb87a2561d9f994e1f0/20201015_09h34m34s_grim.png >
14:35:39leorize[m]hmm this is weird, is this a change in nim's docgen?
14:35:43narimiranleorize[m]: yes, it is proc grouping
14:36:03narimiransee system's docs for a better example
14:36:25narimirane.g. scroll to https://nim-lang.github.io/Nim/system.html#int16 and see TOC on the left
14:36:51leorize[m]it looks very weird to me but I guess I'll get used to it
14:38:13leorize[m]can't we use a simplified render like ``` `[]=`(T, I, sink S) ```?
14:38:47leorize[m]this sort of colon separated values is kinda weird
14:39:55FromGitter<ynfle> Why won't this compile? https://play.nim-lang.org/#ix=2AO2 can't `int` be converted to `R`?
14:40:54narimirando `1.R`
14:41:14narimiran`let x = [1.R, 2, 3, 4, 5]`
14:42:28FromGitter<ynfle> Ok
14:42:54*Vladar quit (Quit: Leaving)
14:48:37*madpata_ quit (Ping timeout: 258 seconds)
14:51:21FromDiscord<Clyybber> > Yardanico: your article finally hit HN frontpage :)↵HN has a revive feature, where a post has a chance to reappear after sometime
14:51:46disruptekit's always amazing to me how few people that comment seem to have read the articles.
14:52:11*hnOsmium0001 joined #nim
14:53:22disruptekand i'm one of them. so i dunno what that should teach me, but /something/, i guess, right?
14:55:52*landerlo joined #nim
14:55:59FromDiscord<Clyybber> orc is deterministic, strictly speaking
14:56:39FromDiscord<Clyybber> as in that theres nothing random about it. The only thing that could make it seem non-deterministic is that it starts collecting cycles after a certain threshold
14:56:55*NimBot joined #nim
14:57:26disruptekwell i already made my one HN comment for the year.
14:57:49disrupteksomeone else can correct these knuckleheads.
14:57:53leorize[m]I was going to make one about newruntime but didn't
14:59:02disruptekthere's still FUD, but it's more along the lines of "why should i nim when i can rust?"
14:59:10FromGitter<ynfle> what's the easiest way to test `proc` with random array? something like np.random.randint()? Is there a `proc` that outputs an array?
14:59:21FromGitter<ynfle> s/array/seq
14:59:51disrupteki would probably make a new seq with the size i want and then map random onto it.
15:00:58leorize[m]!eval import sequtils, random; randomize(); echo newSeqWith(random(), 10)
15:01:01NimBotCompile failed: /usercode/in.nim(1, 61) Error: type mismatch: got <>
15:01:04FromDiscord<lqdev> wrt proc grouping, i don't like that non-overloaded procs are grouped anyways
15:01:57leorize[m]!eval import sequtils, random; randomize(); echo newSeqWith(10, rand(100))
15:02:02NimBot@[100, 44, 51, 41, 67, 41, 56, 99, 54, 26]
15:02:40disruptekneat. i have never used that, ever.
15:03:48disrupteki wonder if you could make a distinct int that is always initialized to a random value, using default() or something.
15:04:18leorize[m]doesn't seem like you can override the default value yet
15:04:26leorize[m]it'd be useful for range types
15:05:10*Vladar joined #nim
15:06:45disrupteki'm suffering a rare treat today:
15:06:51disruptekcream in my coffee.
15:07:07leorize[m]gah, the nightly build would have been successful if GH Actions didn't just die randomly
15:09:24leorize[m]narimiran: you can restart nightlies if you want to have 1.4.0 rc built
15:09:42FromDiscord<exelotl> "renamed '=' to '=copy'" - I like this, feels consistent rather than clever :)
15:09:42narimiranleorize[m]: can i do it just for 1.4 or everything will be rebuilt?
15:09:57leorize[m]everything, sadly
15:10:18narimiranok, then there's no better way (yet) than i was already doing
15:10:19*kenran quit (Ping timeout: 256 seconds)
15:10:38leorize[m]but whatever that doesn't change won't get a rebuild
15:10:39leorize[m]so don't worry
15:11:10leorize[m]this is one of the time I want arm builds to be faster...
15:13:03disruptekyeah, okay, twice a year.
15:13:26*luis_ joined #nim
15:13:26*xioren joined #nim
15:14:36disrupteknimph should let me diff an upgrade of a dependency.
15:15:15disruptekleorize[m]: hey, what mergetool research do i need to do? just google it?
15:15:32leorize[m]git mergetool --help :P
15:15:43leorize[m]I think Zevv also knows a thing or too if you wanna ask him
15:15:52disruptekah, tool-help.
15:16:00leorize[m]or since you use nvim you can checkout that fugitive.vim screencast I sent
15:16:15disrupteki discarded fugitive for some reason.
15:16:28leorize[m]`:Gdiff` is the only thing I love about fugitive.vim
15:16:42leorize[m]apparently someone cloned magit to vim now
15:16:56disruptekthat's the one i use.
15:17:37disruptekso your nimsuggest change will make it to 1.4.
15:17:40disruptekthat's sweet.
15:18:13leorize[m]it's pretty cool but I don't use vim to this level: https://github.com/jreybert/vimagit
15:18:57disrupteki do stage individual hunks sometimes.
15:19:22disrupteki don't know how to commit it yet though. i'm so lazy about my editor.
15:19:30disruptekit's ridiculous. such a major weakness of mine.
15:19:46*tsujp quit (Ping timeout: 246 seconds)
15:20:00disruptekin my old age i really have come to understand how it happens that old people get old.
15:20:04leorize[m]you can press `?` in magit buffer and it will show you the shortcuts
15:20:23disrupteki don't even enter the magit control-flow.
15:20:34disruptekactually, there was a time i did but i gave it up.
15:21:34disruptekanyway... think about this, youngsters: there was a time when python was a very high level language and the only reasonable alternative for most systems work was C.
15:21:52disruptekof course we abandoned c in droves.
15:22:07*tsujp joined #nim
15:22:48disruptekthe arrival of high level stuff was game changing in a way that may be hard to appreciate having grown up in an era of choice.
15:24:16*kenran joined #nim
15:24:29disruptekleorize[m]: actually, it looks like i'm just using gitgutter for staging.
15:24:39disruptekdo you use gitgutter?
15:24:43FromDiscord<speckledlemon> Magit really is amazing, even coming from the usual CLI
15:25:09leorize[m]I use gitgutter for the fancy indicators
15:25:49disruptekyeah, i had turned off vimagit for some reason while messing with nim.nvim.
15:26:31leorize[m]oh and now with `:NimReferences` working properly I may add the "mass rename" feature to nim.nvim
15:26:44disruptekhah, that would be amazing.
15:28:37disruptekjust changing permissions in git clones into .vim/bundle has been a perfectly effective package management strategy for me.
15:29:06*kenran quit (Ping timeout: 272 seconds)
15:30:14*madpata joined #nim
15:34:49*vicfred joined #nim
15:39:52*letto quit (Ping timeout: 272 seconds)
15:53:45FromDiscord<nikki> commit in magit is 'cc' from the status page
15:53:48FromDiscord<nikki> magit-vim
15:54:00FromDiscord<nikki> do you stage with eg. 's'?
15:54:51FromDiscord<nikki> ohhhh jk i use fugitive lolol. which actually has a status page that's v similar to the emacs magit that i used for a while
15:58:18nikki93hmm i should maybe try nim.nvim. i kept trying nvim and going back to vim8 for various little reasons
15:58:32nikki93using nimlsp through coc.nvim on vim8 now
15:58:50PrestigeI use nim.nvim and coc.nvim with neovim
15:58:57Prestige(with nimlsp)
15:59:06*arecacea1 quit (Remote host closed the connection)
15:59:20*luis_ quit (Remote host closed the connection)
15:59:32*arecacea1 joined #nim
15:59:38nikki93huh word. do your completions come from nim.nvim or nimlsp-coc.nvim?
15:59:41leorize[m]I do know that nim.nvim work well enough that it pulled Zevv over to the dark side and never return :)
15:59:44leorize[m]but I'm the author so I'm biased
16:00:56nikki93leorize[m]: yeah i might try again xD
16:01:13Prestigenikki93: everything through coc.nvim, I just use nim.nvim for syntax highlighting
16:01:41PrestigeI need the error reporting :P
16:01:48nikki93ah i see. that should be equivalent to what i'm getting then.
16:02:03nikki93huh does nim.nvim on its own not do error reports
16:02:14leorize[m]not yet
16:02:20nikki93coc is nice cuz it works really well for many of the other langs i use (typescript, c++, ...)
16:02:21nikki93ah word
16:02:42Prestigenikki93: same, I use coc for everything
16:02:44leorize[m]there are like several ways to do error reporting and every plugin just invent their own
16:02:52leorize[m]not a big fan, which is why I don't have it in yet
16:03:05nikki93yeah i think i agree for a lang-specific plugin
16:03:26nikki93i think with coc it actually works out bc. i set manage to set common bindings and looks across all langs which is nice
16:03:29Prestigeleorize[m]: I think that's why lsp is so big now, and with nvim's built in lsp it will be even more true
16:03:52nikki93i ran into one thing which i'm curious whether it happens in both nim.nvim and nimlsp -- if i define a proc within a proc, it actually doesn't autocomplete it in that local scope
16:04:13leorize[m]once PMunch got semantic highlighting + actually got nimlsp to be bundled with nim, I'll gladly switch to it
16:04:26leorize[m]Prestige: the problem I'm referring to is within neovim ecosystem
16:04:43Prestigeah I see what you mean
16:05:01leorize[m]you have the quickfix list, and now you have this "virtual text" annotation thingy
16:05:23nikki93yeahhh. when i was trying builtin lsp it was using that latter thing
16:05:24PrestigeI think coc does both
16:05:51leorize[m]and then signs and key bindings, etc.
16:06:02leorize[m]there isn't a central api to hook in within neovim itself
16:08:49*letto joined #nim
16:10:15*rockcavera joined #nim
16:12:55disruptekvirtual text seems to work well. i use it for reading commit messages for a given line.
16:15:14disruptekdid 1.0.10 release? 'cause a bunch of stuff is failing suddenly.
16:18:27disruptekah, yep. 10 vs. "10".
16:20:22disruptek/home/runner/work/criterion/criterion/criterion/tests/test1.nim(14, 24) Error: internal error: expr: param not init input_19410020
16:20:26*luis_ joined #nim
16:21:00disrupteki dunno how, but criterion fails even though it's in important packages.
16:21:19FromDiscord<Clyybber> on devel?
16:21:27FromDiscord<Clyybber> try --useVersion:1.2 please
16:21:44disruptekwhy would i do that?
16:21:51FromDiscord<Clyybber> I wonna know
16:21:59disruptekit's last night's ci on devel.
16:22:03FromDiscord<Clyybber> if it works
16:22:05narimiran@clyybber does that exist with 1.0.x?
16:22:06FromDiscord<Clyybber> ah
16:22:11FromDiscord<Clyybber> nope
16:22:12disrupteki will test it locally in a sec.
16:22:41narimirandisruptek: i've pushed nimble fix for that, maybe a similar fix is needed somewhere else?
16:22:48narimirandisruptek: or you need a newer nimble?
16:22:56disruptekno, it's fine now.
16:23:03disruptekyou pushed it after my ci ran, i think.
16:23:25disruptekcriterion is a separate issue.
16:29:12kinkinkijkinI can't seem to use async sockets for unix sockets
16:29:39kinkinkijkinspecifying AF_UNIX returns protocol not supported, though i am not on windows
16:29:52*madpata quit (Ping timeout: 256 seconds)
16:30:57FromDiscord<aooo> When should I use a const rather than let? If both const and let more or less do the same thing, why ever use const if let works more?
16:31:14disruptekconst is at compile-time while let is at runtime.
16:32:02FromDiscord<aooo> You got an example of when compile time would be better than at runtime?
16:32:14disruptekkinkinkijkin: did you look at my swayipc?
16:32:27disruptek!repo jason
16:32:28disbot12https://github.com/disruptek/jason -- 9jason: 11JSON done right 🤦 15 30⭐ 1🍴
16:32:32FromDiscord<lqdev> @aooo when your data is not determined during your program's runtime, but rather directly in your code, use const.
16:32:52FromDiscord<lqdev> const is useful for things like lookup tables
16:32:55FromDiscord<lqdev> which never change
16:33:04FromDiscord<Rika> runtime will add time to your program run, compile time will do that much less
16:33:14kinkinkijkindisruptek i did but not deeply
16:33:19kinkinkijkincan you relink it to me?
16:33:23disruptek!repo swayipc
16:33:24disbot12https://github.com/disruptek/swayipc -- 9swayipc: 11swayipc (i3ipc) for Nim 15 5⭐ 0🍴
16:33:38FromDiscord<aooo> So using let far more than const will result in a bigger and slower binary?
16:33:59disruptekkinkinkijkin: the error message you see reminds me of the one i got while writing swayipc; there is some subtlety there that my code may clear up.
16:34:11FromDiscord<lqdev> @aooo not really
16:34:27FromDiscord<lqdev> the C compiler is smart enough to optimize compile-time literals away
16:34:35FromDiscord<lqdev> so that they're stored in the executable
16:34:57FromDiscord<lqdev> you use `let` when the content of the variable is determined at runtime
16:35:04FromDiscord<lqdev> so eg. with `readLineFromStdin()`
16:35:24FromDiscord<lqdev> or when you're doing some stuff in a proc argument
16:35:28FromDiscord<lqdev> (edit) 'in' => 'on'
16:35:54FromDiscord<lqdev> it's kinda hard to explain
16:36:04disruptekit's a legibility thing, too.
16:36:15disruptekconst expresses a semantic that other programmers recognize.
16:36:44FromDiscord<aooo> What would be an example of something that would require compile time rather than runtime?
16:37:00FromDiscord<lqdev> really, not much stuff *requires* compile time eval
16:37:02FromDiscord<lqdev> it's an optimization
16:37:09FromDiscord<lqdev> and as disruptek said, legibility improvement
16:37:22disruptekintrospection is largely compile-time in nim.
16:37:42disruptekany kind of meta-programming is pretty much entirely compile-time domain.
16:38:06disrupteki mean, sure, you /can do it/ and we do, obviously, in the compiler.
16:38:24FromDiscord<lqdev> yea but they were asking for what would require `const` i think
16:38:43disrupteki mean, i read "compile time rather than runtime".
16:38:43leorize[m]you can ask @mratsim :P
16:39:07disruptekyeah, the better question is when you should use let over const.
16:39:14disruptekmuch more interesting.
16:39:20FromDiscord<aooo> My question now is should I default to let or const?
16:39:30disruptekdefault to const for anything compile-time.
16:39:46FromDiscord<lqdev> there is no default
16:40:13disruptekeh i don't agree; i'd say you should default to const when it's available.
16:40:22FromDiscord<lqdev> whatever you put into a const ends up in the resulting binary, so you cannot modify it afterwards
16:40:32disruptekconst:let square:rectangle
16:40:37FromDiscord<lqdev> and it cannot use things determined at runtime, eg. user input
16:40:40leorize[m]semantic wise, do you ever modify `let` variables? :P
16:41:04disruptekno, but they can have different qualities than mere mutability.
16:41:21kinkinkijkinyeah disruptek this isn't helping much
16:41:24disruptekconsider a ref let, for example.
16:41:33disruptekkinkinkijkin: can you show us some code?
16:41:35disbot9paste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. -- 7disruptek
16:41:37leorize[m]my biggest usage of const was to construct a lookup table at compile time
16:41:59FromDiscord<aooo> If I had the choice between let or const, and I had to pick one, should I prefer to use const or let if either compile time or runtime will work? I think that's where I'm confused.
16:42:07FromDiscord<lqdev> const.
16:42:10kinkinkijkinOH WAIT error changed
16:42:24kinkinkijkinnow it's connection refused, time to figure that one out
16:42:41disrupteknow you're cookin' with grease.
16:42:52disruptekaooo: again, prefer const.
16:42:57FromDiscord<nikki> @aooo i vote for const also
16:43:49FromDiscord<nikki> one other reason is that if the computation fails, it'll fail at compile time vs. at runtime
16:44:03FromDiscord<aooo> Thank you. I'll use const by default and let if gives me an error try let.
16:44:57FromDiscord<nikki> cool 🙂 it does depend on the error -- like if the error isn't because your usecase actually requires runtime initialization, it may be that you should still use const but fix the error elsehow
16:45:14disrupteknarimiran: with 1.4 release, we are no longer backporting to 1.2, correct?
16:45:30disruptekand by `we`, i mean `you`. 😁
16:46:01FromDiscord<lqdev> disruptek: i'm starting to promote nimph in my readmes btw
16:46:09disruptekany problems?
16:46:13FromDiscord<lqdev> not yet
16:46:27disruptekmaybe it's not actually running.
16:46:32FromDiscord<lqdev> mainly because i haven't really used it too much. didn't need to install any packages lately
16:46:53disruptekyeah, it helps that it's an app you only run when you need something from it.
16:46:55narimirandisruptek: probably not quite true
16:47:02disrupteknarimiran: whatfer status reasons?
16:47:07narimiranideally we don't, but in practice....
16:47:20narimirandisruptek: yes, status-dependent
16:47:32disruptekjust curious whatfer gitnim reasons.
16:53:14FromDiscord<Clyybber> disruptek: Did --useVersion:1.2 work?
16:54:49*TomDotTom quit (Ping timeout: 264 seconds)
16:54:54disruptekholdon, i'm busy breaking gitnim because i'm dumb.
16:57:31FromDiscord<Clyybber> nice
16:58:41disruptekturns out that gitnim doesn't understand the difference between 10 and "10".
16:59:25FromDiscord<Clyybber> lol, those who did not sin shall throw stones
16:59:50disruptekdid i say gitnim? i meant /nimble/
17:00:20disruptek1.0.10, 1.2.8, 1.3.7, and 1.4.0 are released:
17:00:24disbot9gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- 7disruptek
17:00:40FromDiscord<Clyybber> and why did you not receive mirans fix?
17:00:56disrupteki just got it after my ci ran.
17:01:19FromDiscord<Clyybber> ah
17:01:34FromDiscord<Clyybber> wait, gitnim is a seperate binary right?
17:01:49FromDiscord<Clyybber> the website says to run `git nim`
17:02:01FromDiscord<Clyybber> note the space
17:02:06FromDiscord<Clyybber> mind the gap
17:02:06disruptekyeah, the guy that wrote it is really good looking.
17:02:15FromDiscord<Clyybber> he minds the gap
17:02:24disruptekhe's got magic hands.
17:02:38FromDiscord<Clyybber> and throbbing [redacted]
17:02:56disruptekyou never saw gitnim?
17:03:04FromDiscord<Clyybber> I never used it
17:03:18FromDiscord<Clyybber> yeah
17:03:36disruptekfunny. i really dunno why i do this shit.
17:04:04FromDiscord<Clyybber> I mean, I never used choosenim either
17:04:12FromDiscord<Clyybber> so I'm probably not the target audience
17:04:25disruptektrust me, it improves your life.
17:05:02FromDiscord<Clyybber> more versions never improve my life
17:05:21FromDiscord<Clyybber> I'm happy to live in devel land
17:05:28FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2AOJ
17:05:39FromDiscord<brainproxy> (edit) 'https://play.nim-lang.org/#ix=2AOJ' => 'https://play.nim-lang.org/#ix=2AOL'
17:06:46FromGitter<sealmove> hey, is it possible to define a proc that accepts any (an arbitary type of) enum?
17:06:57disruptekuse `enum` as a typeclass.
17:07:08FromGitter<sealmove> great
17:07:14FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2AOM
17:07:16*letto quit (Ping timeout: 272 seconds)
17:08:34FromDiscord<Clyybber> hmm, probably the ar used in Github Actions doesn't support providing the args in a file
17:09:22FromDiscord<Clyybber> but we have github actions CI for mac
17:09:31FromDiscord<Clyybber> So I'm not sure whats wrong
17:09:57FromGitter<sealmove> and how do I get the underlying int of an enum? I mean if it has holes you can't do ord(myEnum).
17:09:59FromDiscord<Clyybber> disruptek, leorize, narimiran and shashlick are the CI wizards
17:10:26disrupteki don't even know what you're talking about. maybe discord dropped a message.
17:10:50FromDiscord<Clyybber> it probably pasted it into play.nim-lang
17:11:03disruptekyeah, i ignore those.
17:11:09FromGitter<sealmove> oh, `ord` works, that's surprising
17:11:11narimiran@Clyybber i'm not in the same league with them
17:11:11FromDiscord<Clyybber> sealmove: Huh? ord works with holy enums
17:11:36FromGitter<sealmove> since holy enums are not ordinals i didn't expect it ><
17:11:42disrupteki use leorize's ci with minor hacks. i can't be bothered to learn it myself.
17:11:56FromDiscord<Clyybber> sealmove: ord existsto convert *to* an ordinal
17:11:59disruptekit's not really hard to hack, honestly.
17:12:35leorize[m]@brainproxy the file is used as a way to bypass windows small argument limit
17:12:56disrupteknoone should ever need more than 64-bits for a JSON integer.
17:13:08leorize[m]it's supported by binutils, not sure what you're using there
17:13:14disrupteknoone should ever need more than 640kb of memory.
17:13:35FromDiscord<Clyybber> disruptek: So is that a typo on the site?
17:13:36FromDiscord<brainproxy> ah! leorize is it possible that the logic that checks number of arguments is faulty and it's doing that even if it's not Windows?
17:13:40disrupteknoone should ever need command-line arguments in excess of 2048 characters.
17:13:50FromDiscord<brainproxy> @Clyybber I've had good luck with GHA on macOS for the most part
17:13:57FromDiscord<brainproxy> I think leorize is onto something
17:13:58disruptekclyybber: what site?
17:14:04FromDiscord<Clyybber> gitnim.com
17:14:18FromDiscord<Clyybber> so git supports tasks?
17:14:28FromDiscord<Clyybber> damn
17:14:34leorize[m]disruptek: turns out you need that for big projects
17:14:37FromDiscord<Clyybber> why are we building package managers again?
17:14:44disrupteki don't know.
17:14:52disruptekleorize[m]: /s
17:14:55leorize[m]@Clyybber I wager that git do it even better than nimble ever will
17:15:12FromDiscord<lqdev> 1.4 is not ready
17:15:16FromDiscord<lqdev> concepts seem to be broken
17:15:19leorize[m]rust also follows that with cargo btw
17:15:23disruptekgit's underlying structure is very elegant.
17:15:41disruptekit's a good place to store data of the sort we have.
17:15:45Prestigehow are they broken?
17:15:52FromDiscord<Clyybber> @lqdev doubt
17:15:57leorize[m]@brainproxy that feature should be cross-platform for the most part
17:16:03disruptekthey've been this way for a long time afaict.
17:16:05FromDiscord<brainproxy> well clearly it's not
17:16:09FromDiscord<Clyybber> if its not a regression then its ready
17:16:11FromDiscord<lqdev> @Clyybber http://ix.io/2AOQ
17:16:12FromDiscord<brainproxy> bsd `ar` refuses to do it
17:16:16FromDiscord<lqdev> this compiled in 1.2.6
17:16:23FromDiscord<lqdev> but not on devel
17:16:29FromDiscord<lqdev> (latest nightly)
17:16:51FromDiscord<lqdev> git hash 4ef255b69d00d66e4554bad72fab1780578792f5
17:17:02leorize[m]@brainproxy why do you use that abomination again... what's your gh action setup?
17:17:05FromDiscord<lqdev> too bad i can't make a small example
17:17:15FromDiscord<lqdev> because concepts are absolute pain to debug
17:17:24FromDiscord<brainproxy> > why do you use that abomination↵which one specifically?
17:17:27FromDiscord<Clyybber> Hmm
17:17:32FromDiscord<brainproxy> lots abominations in play
17:17:38FromDiscord<brainproxy> (edit) 'lots ... abominations' => 'lotsof'
17:17:51disruptekit's some kinda var issue but i can't think of anything that changed.
17:18:08FromDiscord<Clyybber> disruptek: Call off your disbot
17:18:09disrupteki think araq did want to change this, though.
17:18:14FromDiscord<Clyybber> he tagged me in <#707912794246217758> lol
17:18:33FromDiscord<Clyybber> he pinged me in the <#707912794246217758> discord channel
17:18:40FromDiscord<Clyybber> because lqdev pinged me
17:18:46FromDiscord<Clyybber> he forwarded it somehow
17:18:52disrupteki dunno what that number means.
17:18:52leorize[m]@brainproxy can i see the code?
17:19:00disrupteknim-news, i guess.
17:19:05FromDiscord<Clyybber> @lqdev How big is the current repro?
17:19:10FromDiscord<Clyybber> disruptek: Yeah
17:19:16FromDiscord<Clyybber> but why am I nim-news
17:19:43FromDiscord<lqdev> about 400 lines, but should be relatively easy to distill as most code is irrelevant
17:19:47leorize[m]it's a "feature"
17:19:54*luis_ quit (Quit: luis_)
17:19:59FromDiscord<lqdev> https://github.com/liquid600pgm/rapid/blob/42dba70a2d97c0ecd5632de039e74df17775524c/src/rapid/game/tilemap.nim
17:20:11FromDiscord<Clyybber> 400 lines is fine
17:20:16FromDiscord<Clyybber> if you can get it down more thats great
17:20:38*narimiran quit (Ping timeout: 256 seconds)
17:21:06FromDiscord<Clyybber> more important is that its self contained
17:21:13FromDiscord<Avatarfighter> Disruptek this is what he means https://media.discordapp.net/attachments/371759389889003532/766349974283485234/image0.png
17:21:15*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:21:43*luis_ joined #nim
17:21:57FromDiscord<brainproxy> leorize: this link *should* take you to the line where GHA failed:↵https://github.com/status-im/nim-status/runs/1260263121?check_suite_focus=true#step:10:689↵below that line is some `|| true` stuff and `echo`s I added to try to figure out what's happening
17:22:11FromDiscord<Clyybber> @lqdev Maybe its related to a regression I've encountered too after https://github.com/nim-lang/Nim/pull/15211
17:22:11disbot➥ 6fix some issues overloading with generics and inheritance
17:22:23FromDiscord<Clyybber> Can you try with that change reverted?
17:22:53*ehmry joined #nim
17:23:22*TomDotTom joined #nim
17:23:49FromGitter<ynfle> > Compiled test files return the number of failed test as exit code ⏎ ⏎ What does this line from `unittest`? Is just ⏎ ⏎ ```nim c tests/t.nim ⏎ tests/t ⏎ echo $?``` [https://gitter.im/nim-lang/Nim?at=5f8885a5eb82301c1a2a3d21]
17:24:03*lritter quit (Quit: Leaving)
17:24:48FromDiscord<lqdev> disruptek: does gitnim support building from a specific commit?
17:24:52FromDiscord<nikki> @Clyybber i may also just live in devel land haha. weirdly mostly so that my nimlsp will just take me to stdlib in a repo ....
17:24:56FromDiscord<Clyybber> ynfile: The docs have been updated, it returns 1 on failure, not the amount of failed tests
17:24:58FromDiscord<brainproxy> https://github.com/nim-lang/Nim/blob/51e3e0c7c43e82932d9bbae2e6ccc876d29b9fab/compiler/extccomp.nim#L918-L923↵looks like even if it's not Windows environment, if the length exceeds 32_000 then it will use the `linkerArgs.txt` approach
17:24:59FromDiscord<lqdev> i wanna free myself from choosenim's headaches with the stdlib.
17:25:07FromDiscord<Clyybber> @nikki heh, nice
17:25:58FromGitter<ynfle> Thanks @Clyybber. I assume it'll be updated with the release of 1.4? Also, is there a way to get the number of failed test other `fail()`ing manually
17:26:03leorize[m]@brainproxy so osx ar doesn't support that stuff?
17:26:09FromDiscord<nikki> @Clyybber is https://github.com/nim-lang/Nim#compiling the best instructions to look at?
17:26:09FromDiscord<brainproxy> it does not
17:26:12FromDiscord<Clyybber> ynfile: Hmm, sorry I don't know
17:26:23FromDiscord<Clyybber> But yeah it should be updated with 1.4
17:26:25FromDiscord<brainproxy> loerize, I mean apparently it does not
17:26:32FromDiscord<Clyybber> the devel docs already are updated
17:26:34leorize[m]I'm looking at status build system and I'm scared lol
17:26:45FromDiscord<nikki> @lqdev what are the problems you're having with choosenim and the stdlib, outta curiosity?
17:26:47leorize[m]yep doesn't seem to support
17:26:48FromDiscord<Clyybber> @nikki yeah
17:26:54FromDiscord<nikki> @Clyybber do u use nimble at all or nah
17:26:55FromDiscord<Clyybber> I do ./koch boot -d:danger
17:27:04FromDiscord<Clyybber> @nikki not much, for testing stuff
17:27:13leorize[m]@brainproxy: --app:staticlib is kinda under utilized so we never caught all the issues
17:27:13FromDiscord<Clyybber> for my own repos I prefer submodules
17:27:14FromDiscord<lqdev> @nikki doesn't work very well when you build nim from the git repo
17:27:30FromDiscord<brainproxy> loerize, scared by the nimbus-build-system thing? is that what you were referring to?
17:27:31FromDiscord<nikki> @lqdev like with `devel --latest` or `#head`?
17:27:33FromDiscord<Clyybber> mainly because those allow me to let people build my stuff without being forced into a pk
17:27:38FromDiscord<Clyybber> (edit) 'pk' => 'pm'
17:27:52FromDiscord<lqdev> @nikki no, when building from nim's git repo.
17:27:59FromDiscord<lqdev> like, when you clone and bootstrap it.
17:28:11FromDiscord<nikki> @lqdev huh i see. so then you're not using choosenim right? or is there some mix of the two
17:28:25FromDiscord<nikki> @Clyybber i see. i may end up doing git submodules tbh bc. i kind of like the clarity they provide
17:28:25FromDiscord<lqdev> hm maybe it's not a problem with choosenim
17:28:34FromDiscord<lqdev> but with testament
17:28:45disrupteklqdev: gitnim is just a git repo with a tool that helps you fetch/list/checkout different nim branches.
17:28:48FromDiscord<Clyybber> yeah submodules are great
17:28:54FromDiscord<nikki> i do submodules / vendoring in c++ and other things and it's just so much clearer when the files are just there and you can just go to them
17:29:03FromDiscord<Clyybber> yeah, same
17:29:16FromDiscord<Clyybber> (edit) 'yeah, same' => 'yeah'
17:29:21FromDiscord<nikki> i can see how if you make a ton of small projects for cli tools or something a package mgr could be nice? idk
17:29:44leorize[m]@brainproxy just not a fan of your make-based build system
17:30:11FromDiscord<brainproxy> yeah, I don't love it either 🤷‍♂️
17:30:13disruptekanother idea behind gitnim is that it puts the source to gitnim adjacent to the compiler, so development of the tooling is concident with compiler development.
17:30:36leorize[m]but anyway, it appears that Nim only support binutils ar :/
17:30:36leorize[m]maybe if you switch to llvm-ar it will work
17:30:46FromDiscord<haxscramper> It is not possible to get original documentation string when using `jsondoc`, correct? The only possible way would be to either re-parse proc definition manually (using `line` and `col` fields) or to parse `description` field, correct?
17:31:07leorize[m]jsondoc gives you the original docstring iirc
17:31:39FromDiscord<nikki> @Clyybber the one way in which choosenim has been nice is i have 3 platforms i frequent to dev on (mac, win, lin) to make sure my stuff works on everything; and maybe it's easier to install / manage nim just using choosenim vs. dealing with the build setup on each platform
17:31:52FromDiscord<nikki> but, maybe the effort is worth it for the control / clarity
17:32:21FromDiscord<haxscramper> leorize: no, I get `Documentation string for proc <tt class=\"docutils literal\"><span class=\"pre\">test</span></tt>` , `` ## Documentation string for proc `test` ``, which could be parsed back relatively easily, but I just want to make sure I haven't missed anything.
17:32:27FromDiscord<nikki> i think it's especially more true given nim's dev'y status (vs. if it were a more mature / stable thing that does releases every year or sth)
17:32:30FromDiscord<Clyybber> Yeah, I only have 1 main machine
17:32:44FromDiscord<lqdev> @Clyybber hm, i'm unable to make a smaller reproducible case
17:32:52FromDiscord<Clyybber> Is it one file?
17:32:59FromDiscord<lqdev> i think so
17:33:10FromDiscord<haxscramper> `s/I get <>/ I get <> from/`
17:33:16FromDiscord<dom96> lqdev: what problems are you having?
17:33:23FromDiscord<dom96> with choosenim?
17:33:53FromDiscord<brainproxy> leorize, just checked and the command in GHA is 33671 characters while on my laptop it's 30010, because of differences in the absolute paths
17:34:08FromDiscord<Clyybber> @lqdev Then its fine, no imports and incudes?
17:34:10FromDiscord<brainproxy> anyway, I guess I'll file an issue on the Nim repo
17:34:36FromDiscord<lqdev> @Clyybber there are a couple of imports for some small modules + std/tables
17:34:43FromDiscord<nikki> do you guys suggest mostly working against devel and not stable? if you're just learning the language and want to do gamedev'y things
17:34:43FromDiscord<lqdev> and nim-glm
17:34:58FromDiscord<Clyybber> hmm, might be nice to get rid of them
17:35:03FromDiscord<Clyybber> if possible
17:35:18FromDiscord<Clyybber> @nikki stable is fine, I'm on devel because I work on the compiler sometimes
17:35:34FromDiscord<nikki> i see. the main thing that inspired me to try devel was hearing that arc has more bugfixes on it
17:35:34FromDiscord<dom96> now that Nim is past the 1.0 release, stable should be more than fine
17:35:56FromDiscord<Clyybber> @nikki oh, yeah for arc devel is the way to go
17:36:07FromDiscord<Clyybber> but with the release of 1.4 stable should be fine too
17:36:19FromDiscord<nikki> yeah makes sense. are we close to 1.4 or far 😮
17:36:33FromDiscord<Clyybber> it was planned to release today afaik ;P
17:36:46FromDiscord<nikki> the main usecase for arc for me was gonna see how it perfs vs. regular gc on ->C->wasm target
17:37:06leorize[m]@brainproxy an easy fix would be to write an `ar` wrapper that takes a `@file` argument and translates it into `normal arguments`. You can use xargs for that
17:37:08*luis_ quit (Remote host closed the connection)
17:37:12leorize[m]eventually we will want that fixed over on nim side
17:37:33FromDiscord<brainproxy> and just give it higher precedence on the path?
17:37:53leorize[m]or if you have llvm-ar just use that
17:41:01FromDiscord<nikki> interesting so i was having this bug yday where nimlsp wasn't working for 'goto def' within the stdlib. like if i follow goto def to the definition of `=>` then goto def of `nnkLambda` from there -- and it turns out it fails when using choosenim devel, but works fine when using choosenim stable
17:41:14FromDiscord<nikki> i did a workaround by giving nimlsp an explicit path to my own checkout of devel
17:41:24FromDiscord<nikki> i may just stick with stable for now
17:41:39leorizeoh I should ping PMunch to handle the recent changes
17:42:29nikki93leorize: oh nice you're here :o yeah it's the issue we were discussing on yday
17:42:55FromGitter<sealmove> Is there a common way to see if an ident (a NimNode) matches a string?
17:43:06leorize[m]I did a fix for nimsuggest recently to travel to the implementation of a symbol
17:43:33Prestigeleorize: thanks for that, btw
17:43:34FromDiscord<lqdev> @Clyybber managed to get it down to 252 lines http://ix.io/2AP2
17:43:47FromDiscord<lqdev> 258*
17:43:56leorize[m]yea but nimlsp will need a fix or that will be a bit finicky
17:44:44FromGitter<sealmove> ah there is `eqIdent` nice
17:45:36*mipri joined #nim
17:48:03nikki93leorize: do you think that sounds related to why goto defs within my own files would work but -> stdlib -> from there would fail (i was basically mostly testing the => --> nnkLambda case)
17:49:17leorize[m]not sure, I haven't actually looked at nimlsp architecture
17:49:34leorize[m]so can you tell me how you do your goto defs?
17:49:55leorize[m]I can try to see if I can reproduce it with nimsuggest
17:51:59nikki93hmm yeah. i wonder if i can find how to make nimlsp just log its nimsuggest requests or something so i can give you a proper log
17:52:07nikki93but; speaking in terms of just UX actions i'm taking...
17:53:46nikki93i have a simple file where i do `import sugar` then later use the `=>` macro to define a lambda. now if i do 'goto def' on the `=>`, i get to the definition of that macro fine. in the implementation of it, it mentions things like `nnkLambda`. if i cursor over to one of those and do another goto def, that ends up not doing anything (when i have `choosenim devel --latest`. if i have `choosenim stable` the last step works)
17:54:49leorize[m]can I have this example file?
17:55:16nikki93yeah one sec
17:56:18nikki93https://gist.github.com/nikki93/3571568c1abcaa7942936872b14c97b6#file-scratch-nim-L94 <-- i highlighted the line in question. literally learning nim from the basics right now haha and this is my file to mess around in. i think a minimal repro may just need that paragraph.
17:57:15nikki93oh another thing (orthogonal to this ^ issue) is -- does nimsuggest only work after you `nim c` the file once or something? i think it's failed for me unless i've done that at least once but it may just be a nimlsp thing.
17:58:03Prestigenimlsp requires a file change and save iirc
17:58:16PrestigeMaybe just a file write
17:59:17nikki93Prestige: you mean just once at the beginning to have a file work from then on with in-mem changes too? or do you always have to save to pick up new decls in the file
17:59:47PrestigeIn only checks on file write
18:00:18leorize[m]seems to work here https://asciinema.org/a/H48YVd9M3LyYZJom8x8wExt4p
18:00:19FromDiscord<nikki> oh i'm talking about autocompletion. checks yeah i noticed it's file write only and i'm actually fine with that (otherwise gets spammy lol)
18:01:23nikki93leorize: the goto => definitely works in both cases. i'm talking about then moving your cursor down to eg. `nnkLambda` or something in the implementation of => after the first jump, and jumping to the def of that
18:02:09nikki93in that long description above i had two jumps. first one works fine. second one doesn't in devel, does in stable.
18:03:02nikki93basically the usecase i care about is being able to navigate the stdlib code using lsp once i get there -- for discovery / learning
18:03:16leorize[m]you mean this? https://asciinema.org/a/58E1k2bTxbfnoU21rIBh39g63
18:03:59nikki93yep! cool. and that's on nimsuggest in devel? if that's the case then yeah i think it may be a nimlsp issue.
18:04:22*luis_ joined #nim
18:04:22leorize[m]yea it's probably nimlsp
18:04:35nikki93thanks for trying and recording!
18:05:16leorize[m]np :) it's quick to record these
18:05:55leorize[m]some neovim shilling if you haven't seen it yet: https://asciinema.org/a/276278
18:06:46*luis_ quit (Remote host closed the connection)
18:07:22nikki93nice :o the main thing here being integrated debugger experience?
18:07:25*luis_ joined #nim
18:07:46nikki93i've used vimspector for that most recently in c++-land with somewhat good but intermittently lacking success
18:08:01leorize[m]yea I made it when I found out about termdebug
18:08:09leorize[m]there are probably better plugins
18:08:33FromDiscord<nikki> nice
18:08:37*mipri left #nim (#nim)
18:08:59leorize[m]fun fact: termdebug was actually vim invention
18:09:41leorize[m]though iirc it only works well on gvim
18:09:43leorize[m]not sure how does that work nowadays
18:11:22disruptekclyybber: cannot reproduce on 1.4.0 release.
18:11:46disruptekhash cac0e017256175f79641a3473061aecc45d582d0
18:12:06disrupteki guess i'll rerun ci.
18:13:38nikki93leorize[m]: another thing i was wondering was (again not sure if this is a nimlsp or nimsuggest thing) is -- if i have a line eg `let s = "hello, world"` and then i cursor to the `s` and do the 'hover' action it doesn't tell me the type of `s`
18:13:51*Ven`` joined #nim
18:13:51nikki93in lsps for other languages it usually does that, which is really helpful in langs with type inference
18:14:13nikki93if i mention `s` after the initial declaration, it does actually tell me the type when i do the hover action on that later mention
18:14:50voidpiweird question, is the nim runtime somewhat like the jvm?
18:15:11leorizenikki93: it's a nimsuggest thing
18:15:16leorizevoidpi: not even close
18:15:36voidpileorize: because it only takes care of gc?
18:15:59nikki93voidpi: there is no bytecode interpretation of your stuff happening at runtime. if you use some backend that does that, you are on a VM for that backend though (eg. if you do Nim -> JS then run on a JS VM)
18:16:18nikki93i think that's a big difference
18:16:29leorizenikki93: nimsuggest process the symbol before it's fully finalized, so at the point where your cursor sits the compiler has not finalized the symbol yet
18:16:33*cyraxjoe quit (Write error: Connection reset by peer)
18:16:34*nisstyre quit (Write error: Connection reset by peer)
18:16:36leorizeso you get no info
18:16:39voidpinikki93: yeah, that's a big one
18:17:02leorizeif you reference this symbol later on, then the compiler can provide you some detailed information :P
18:17:11leorizeit's a weird quirk
18:17:19nikki93leorize: oh i see. would put in a small request for if we could get that to work for the first symbol :D
18:17:33*nisstyre joined #nim
18:17:46leorize[m]Araq knows how to do it
18:17:52*cyraxjoe joined #nim
18:18:02nikki93there's a lot of cases where i write like `let result = someWeirdStuff.someWeirdFunc(...)` and it'd be nice to immediately find out what the type of result is. not a huge deal tho bc. i can do the hover action on `someWeirdFunc` and find out
18:18:05leorize[m]in fact there are like several hooking points used by nimfind and nimsuggest
18:19:01nikki93in general this is stuff works really well though. good job folks :)
18:19:24nikki93like it's impressive, given the amt of breakage and manual setup other 'more mature' langs have in tooling
18:20:30leorizehmm is matrix.org bridge go weird again...
18:20:52leorizeyes, yes it does, my last few messages didn't reach here
18:21:14nikki93o noes
18:21:23leorizenothing too important :P
18:21:25nikki93i guess i should get on nim matrix too
18:21:31disbot9matrix: 11Nim channels on Matrix can be found at +nim:asra.gr (https://matrix.to/#/+nim:asra.gr) -- 7leorize
18:22:19leorizenikki93: 4raq was ahead of the time, nimsuggest was a language server before that's even a thing :P
18:22:39*letto joined #nim
18:22:55FromDiscord<dom96> welllll
18:23:04FromDiscord<dom96> nimsuggest wasn't even a server for a long time
18:23:21FromDiscord<dom96> I might have had something to do with that approach 😄
18:23:46leorizeI still don't know who puts EPC into nimsuggest
18:23:55*nikki93[m] joined #nim
18:25:06*gmaggior joined #nim
18:25:23leorize[m]looks like matrix is working again?
18:25:23leorize[m]oh wait or is this homeserver not federating with matrix.org...
18:28:32FromGitter<sealmove> how can I traverse a NimNode tree and prefix every identfier with something?
18:28:39FromGitter<sealmove> There are no mutable procs
18:32:20leorize[m]NimNodes are ref object
18:32:21leorize[m]why do you need mutable procs?
18:33:10FromGitter<sealmove> hmm, so I can modify them without having vars?
18:34:05FromDiscord<Teodor> sent a long message, see http://ix.io/2API
18:35:38FromGitter<sealmove> but what if for example I want to replace some nnkIdent with an nnkDotExpr?
18:36:26leorize[m]then you need to replace the reference itself
18:36:44leorize[m]note that NimNode's `sons` is a simple `seq[NimNode]` so you can use a mutating iterator on them
18:36:54FromDiscord<Recruit_main707> @Teodor might want to create a thread in the forum, this wil scroll up very quickly
18:37:26FromGitter<sealmove> got it, thx
18:38:42FromDiscord<Recruit_main707> what would be some good tests to benchmark different gcs performance?
18:39:39leorize[m]4raq's favorite is `thavlak` (you can find it in Nim's source)
18:41:01*TomDotTom quit (Ping timeout: 264 seconds)
18:43:24FromDiscord<haxscramper> > @Teodor might want to create a thread in the forum, this wil scroll up very quickly↵Or maybe ping someone and post in announcements. Telegram chat has a lot of people too which don't usually read discord (from my understanding) so worth posting there too (I suppose)
18:43:45FromGitter<sealmove> leorize: my problem is that nim complains with "x can't be assigned to" because the parameter is not annotated with `var`. I have to dereference it or something?
18:44:29leorize[m]@sealmove code please?
18:45:04FromDiscord<Recruit_main707> can you do `sleep(1)` in nimscript? or something similar
18:45:24FromGitter<sealmove> https://play.nim-lang.org/#ix=2APO
18:47:28FromDiscord<Avatarfighter> Congrats to the future Nimgineer that'll be working with Status 😄
18:48:12leorize[m]@sealmove can you add your mutable logic in?
18:50:28*luis_ quit (Quit: luis_)
18:53:08*luis_ joined #nim
18:57:13disrupteksealmove: if you mean you can't c = lookup...() it's because the loopvar is immutable.
18:57:21FromDiscord<Teodor> > Or maybe ping someone and post in announcements. Telegram chat has a lot of people too which don't usually read discord (from my understanding) so worth posting there too (I suppose)↵@haxscramper @Recruit_main707 - Cheers for the tip guys, will do both
19:00:56FromDiscord<Teodor> Hey @Yardanico - would you be OK with sharing our role in the announcements channel? Status.im and Nimbus team would kill to have someone from this community joining forces.
19:01:26*TomDotTom joined #nim
19:01:33*FromDiscord quit (Remote host closed the connection)
19:01:47*FromDiscord joined #nim
19:04:52FromGitter<sealmove> leorize: for example replacing `result` with `expr` obviously doesn't work https://play.nim-lang.org/#ix=2AQ4
19:05:30*Ven`` quit (Quit: Textual IRC Client: www.textualapp.com)
19:06:16*Ven`` joined #nim
19:07:52*grorkster joined #nim
19:08:01*Ven`` quit (Client Quit)
19:10:14FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2AQ8
19:14:16*avass joined #nim
19:14:49disruptekclyybber: cannot repro locally with --useVersion:1.2 on 1.4.0, either.
19:14:58disruptek(the tests take awhile to run)
19:15:18*Ven`` joined #nim
19:15:21*FromDiscord quit (Remote host closed the connection)
19:15:36*FromDiscord joined #nim
19:24:00FromDiscord<Clyybber> disruptek: cannot repro as in it works?
19:24:07disruptekyeah, just not in ci.
19:24:59disruptekhmm, ci is getting a43202ea57f49a3b49927f114669335a7d40dbb2
19:25:00FromDiscord<Clyybber> it doesn't work in the CI with --useVersion:1.2?
19:25:31disruptekoh i'm dumb.
19:26:58disruptekthe ci is using head.
19:34:56*bung quit (Ping timeout: 256 seconds)
19:40:06disruptekand criterion isn't in important packages anyway.
19:41:09*bung joined #nim
19:44:43avasshey! just checking if this is the place to talk about choosenim issues. since I found out that there's no nice non-interactive way of installing choosenim with the curl|sh helper script, so I created a pull request to try to resolve that: https://github.com/dom96/choosenim/pull/230
19:44:44disbot➥ 3Allow non-interactive install with helper script
19:45:36avassI saw that someone else had already raised an issue about it :)
19:45:59*bung quit (Ping timeout: 260 seconds)
19:49:51*bung joined #nim
19:51:18*rockcavera quit (Ping timeout: 272 seconds)
19:51:43FromDiscord<Avatarfighter> @dom96 ^
19:52:37*luis_ quit (Quit: luis_)
19:54:31*bung quit (Ping timeout: 260 seconds)
19:57:49*TomDotTom quit (Ping timeout: 264 seconds)
19:57:57*bung joined #nim
20:02:27*bung quit (Ping timeout: 260 seconds)
20:03:26*bung joined #nim
20:11:23FromDiscord<lqdev> `/home/daknus/Coding/Nim/rapid/src/rapid/physics/chipmunk.nim(734, 1) Error: cannot bind another '=copy' to: Arbiter; previous declaration was constructed here implicitly: /home/daknus/Coding/Nim/rapid/src/rapid/physics/chipmunk.nim(389, 25)`
20:11:31FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2AQn
20:11:42FromDiscord<lqdev> uh, how does that happen?
20:11:46*bung quit (Ping timeout: 258 seconds)
20:11:51FromDiscord<lqdev> i *have* overriden `=` to error out btw
20:12:00FromDiscord<lqdev> but i don't see the copy?
20:12:04*bung joined #nim
20:13:52disrupteki don't get it.
20:14:17FromDiscord<lqdev> i also don't get it.
20:14:37disruptekwhy do you set the callback value at all?
20:14:37FromDiscord<lqdev> i have the non-copyable type `Arbiter`
20:14:46FromDiscord<lqdev> C wrapper
20:15:25FromDiscord<treeform> Zevv, "typography together with sdl", I think there is an SDL example. https://github.com/treeform/typography/blob/master/tests/sdlexample.nim
20:15:32FromDiscord<treeform> there are like 4 different ways of doing it
20:15:45disruptekoh, i see. it's just to make it wrap.
20:15:46FromDiscord<lqdev> disruptek: this `wrap` template works in other places, just fails here for some reason
20:16:14disruptekit's not a ufcs problem?
20:16:14*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
20:16:19FromDiscord<lqdev> nope
20:16:32FromDiscord<lqdev> tried with `wrap(rawArbiter)` and even `Arbiter(raw: rawArbiter)`
20:16:44disrupteklooks totally fine to me.
20:16:52FromDiscord<lqdev> yeah same
20:17:00FromDiscord<lqdev> then why does it not work
20:18:11*Kiloneie_ joined #nim
20:18:25FromDiscord<lqdev> how is there a copy involved
20:18:35FromDiscord<lqdev> creating a temp variable and `move`ing it also doesn't work
20:20:00disruptekwrap works in other places?
20:20:24disrupteklike, other code that precedes this?
20:20:45FromDiscord<lqdev> yeah totally
20:20:54FromDiscord<lqdev> the only thing i see different is the order of parameters in `iterate`
20:21:04*bung quit (Ping timeout: 272 seconds)
20:21:12FromDiscord<lqdev> trying to make a minimal example now
20:21:34*Kiloneie quit (Ping timeout: 260 seconds)
20:22:37disruptekwhat's the =copy message point to?
20:22:45disruptekthe error message, that is.
20:23:28disruptekvan morrison can kiss my ass.
20:23:46*Lord_Nightmare joined #nim
20:24:54*bung joined #nim
20:24:57FromDiscord<lqdev> the error itself points to my copy hook: proc `=`*(dest: var Arbiter, source: Arbiter) {.error.}
20:25:05FromDiscord<lqdev> the error message points to the line where i call the callback
20:26:52Zevvtreeform yeah, I figured it out, I wanted to do without flippy if not needed
20:27:07Zevvbut I must admit I fell back to sdl_ttf
20:27:57*madpata joined #nim
20:28:38leorize[m]1I've played with vimagit a bit, this thing is insane
20:28:39leorize[m]1I can stage changes within the same file in different parts \o/ awesome for commit history
20:29:52FromDiscord<lqdev> guess i could disable my error copy hook for the time being
20:29:56*bung quit (Ping timeout: 272 seconds)
20:29:58*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:30:06FromDiscord<lqdev> but this copy is quite strange
20:30:21FromDiscord<lqdev> (it also happens on devel, i already checked)
20:30:26*narimiran joined #nim
20:30:55*bung joined #nim
20:33:00FromDiscord<lqdev> hm wait
20:33:08FromDiscord<lqdev> so somehow nim infers a `=`
20:33:13FromDiscord<lqdev> even though i override it
20:33:19FromDiscord<lqdev> guess i should move my declaration upward?
20:33:44FromDiscord<lqdev> oh shit i think this may be it
20:33:53FromDiscord<lqdev> because the other usages are below my copy hook
20:35:16FromDiscord<lqdev> yeah i moved it upward and it works now
20:35:19FromDiscord<lqdev> how confusing.
20:36:01FromDiscord<Elegant Beef> Hey i properly minified my const issue https://play.nim-lang.org/#ix=2AQy
20:37:08FromDiscord<Elegant Beef> And the the const placement changes it https://play.nim-lang.org/#ix=2AQA
20:38:37avassleorize[m]1: ooh that looks nice
20:43:09*bung quit (Ping timeout: 260 seconds)
20:43:36FromDiscord<Elegant Beef> the `static(scriptedTable)` causes the issue in the above example...
20:45:12*bung joined #nim
20:56:37*bung quit (Ping timeout: 264 seconds)
20:57:43*bung joined #nim
21:07:25*bung quit (Ping timeout: 240 seconds)
21:09:45*narimiran quit (Ping timeout: 240 seconds)
21:11:29FromDiscord<treeform> Zevv, yeah flippy is a hard dependency.
21:12:15*bung joined #nim
21:20:29*bung quit (Ping timeout: 260 seconds)
21:22:02*Vladar quit (Quit: Leaving)
21:26:20*bung joined #nim
21:33:49*solitudesf quit (Ping timeout: 264 seconds)
21:39:09*bung quit (Ping timeout: 260 seconds)
21:39:25*bung joined #nim
21:39:43*clyybber quit (Quit: WeeChat 2.9)
21:41:39*rockcavera joined #nim
21:44:04*ofelas quit (Ping timeout: 246 seconds)
21:46:09*bung quit (Ping timeout: 260 seconds)
21:47:54*madpata quit (Ping timeout: 260 seconds)
21:49:49FromDiscord<shashlick> @dom96 - working on posting choosenim builds on the main branch to github
21:50:16FromDiscord<dom96> awesome!
21:51:00FromDiscord<shashlick> https://github.com/genotrance/choosenim/compare/29639171faee...3173ba74daab
21:51:13FromDiscord<shashlick> it works - just tweaked it a bit more to get a cleaner result
21:51:59FromDiscord<shashlick> will work per usual when we tag, when we don't and merge a PR, it will create a tag with build date embedded
21:53:00*bung joined #nim
21:57:49*bung quit (Ping timeout: 260 seconds)
21:58:10*bung joined #nim
22:03:04*bung quit (Ping timeout: 260 seconds)
22:04:24leorize[m]@shashlick I'm getting a weird error when compiling nim-kmod tests
22:05:10leorize[m]Error: unhandled exception: getters.nim(136, 14) `name[0] != '_' and name[^1] != '_'` Identifier 'kmod_config_iter_next:_Bool' (nskType) contains leading/trailing underscores '_' which Nim does not allow. Use toast flag '--prefix or --suffix' or 'cPlugin()' to modify. [AssertionDefect] [AssertionDefect]
22:05:40leorize[m]This is the symbol in question: `bool kmod_config_iter_next(struct kmod_config_iter *iter);`
22:05:44leorize[m]there's no `_Bool`
22:05:47*bung joined #nim
22:05:52leorize[m]or do I have to update my nimterop?
22:07:50FromDiscord<shashlick> what version are you on
22:08:31leorize[m]I'm using nimble in localdeps mode
22:09:00FromDiscord<shashlick> bool is defined as _Bool
22:09:12FromDiscord<shashlick> in stdbool.h
22:09:38leorizeshouldn't nimterop understand that?
22:10:07FromDiscord<shashlick> it understands Bool, not _Bool
22:10:26FromDiscord<shashlick> 😄
22:10:38*bung quit (Ping timeout: 272 seconds)
22:11:09leorize[m]awaiting 0.6.14 so that I can continue my development :P
22:11:16FromDiscord<shashlick> just add `flags = "-E_"` for now
22:12:07*vicfred quit (Quit: Leaving)
22:12:35*landerlo quit (Ping timeout: 245 seconds)
22:13:36disruptekthis poor OrdSet PR.
22:13:40*bung joined #nim
22:14:01FromDiscord<shashlick> ya, not a simple fix - nimterop does the Bool => bool mapping after the symbol checking
22:14:32*abm joined #nim
22:18:14*bung quit (Ping timeout: 260 seconds)
22:20:51*vicfred joined #nim
22:23:52*bung joined #nim
22:25:03*MightyJoe joined #nim
22:27:35*cyraxjoe quit (Ping timeout: 260 seconds)
22:28:10*bung quit (Ping timeout: 246 seconds)
22:31:35FromDiscord<dom96> @shashlick ping me when we've got a macOS binary I can test
22:34:34*bung joined #nim
22:35:15FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2ARc
22:36:15FromDiscord<Elegant Beef> Put foo at the end of try, and bar outside the `try except`?
22:37:00FromDiscord<tinygiant> I don't foo to run unless the code in try doesn't raise an exception.
22:37:32FromDiscord<Elegant Beef> If it's at the end of try it wouldnt be ran afaik
22:37:47FromDiscord<Elegant Beef> you can put bar inside a `finally` block
22:38:03FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2ARe
22:38:30FromDiscord<tinygiant> So if the exception happens at the beginning of try, it immediately goes to except, otherwise all runs foo. Ok, I think I understand that. Thanks.
22:38:39*FromGitter quit (Ping timeout: 260 seconds)
22:38:59FromDiscord<tinygiant> (edit) 'all' => 'it'
22:39:01*oprypin quit (Ping timeout: 246 seconds)
22:39:32FromDiscord<tinygiant> And thanks for the example.
22:40:07*oprypin joined #nim
22:40:28FromDiscord<Elegant Beef> No clue if you're around pmunch, but it's progressing(following your idea of using json for transfering objects for now)! https://media.discordapp.net/attachments/371759389889003532/766430315676827679/unknown.png
22:41:28*FromGitter joined #nim
22:46:03*Kiloneie_ quit (Read error: Connection reset by peer)
22:46:25*bung quit (Ping timeout: 264 seconds)
22:47:51*bung joined #nim
22:53:48FromDiscord<nikki> do you guys have any guidelines / heuristics on when you tend to do `foo arg` vs. `foo(arg)`
22:54:02FromDiscord<nikki> or does it just boil down to gut / do you stick with only one of them everywhere
22:54:15FromDiscord<nikki> (edit) 'guys' => 'folks'
22:55:52disrupteki use `foo arg` if i'm passing one argument or it's unambiguous and if i want to emphasize the nature of the operation, like `inc foo`.
22:56:45*bung quit (Ping timeout: 240 seconds)
22:58:03disruptekarg.foo for property-like queries which are scoped to the arg. but i prefer `getOrDefault(tab, key, val)` when i'm trying to communicate the operation first and the arguments are secondary.
22:59:49*bung joined #nim
23:00:01disrupteki'm fairly sure i'm overthinking it, but i don't really see the problem with people having their own style.
23:04:36*bung quit (Ping timeout: 256 seconds)
23:06:59*Guest94576 joined #nim
23:08:09*Guest94576 quit (Client Quit)
23:08:10*bung joined #nim
23:14:37*bung quit (Ping timeout: 258 seconds)
23:17:41*nature quit (Ping timeout: 258 seconds)
23:18:31*disruptek is now known as op
23:18:41*op is now known as disruptek
23:18:45*disruptek is now known as asd
23:19:20FromDiscord<Yardanico> Guess you learn something new every day:↵proc tata(a, b: int) = echo a + b↵tata(5): 3
23:19:34FromDiscord<Yardanico> https://www.reddit.com/r/nim/comments/iubgaz/basic_function_calling_syntax_question/
23:19:50FromDiscord<Yardanico> i mean I understand why it works, but it's still surprising
23:20:03asdwhat's cool is that you can chain a series of statements.
23:20:07*asd is now known as disruptek
23:20:33disruptekecho tata 5: let x = 3 * 2; x + 4
23:21:26FromDiscord<Yardanico> proc tata(a, b: int) = echo a + b↵tata(): 3↵do: 5
23:22:30FromDiscord<Yardanico> @disruptek parens needed
23:22:56FromDiscord<Yardanico> Ah actually no
23:22:59FromDiscord<Yardanico> It still wouldn't work
23:23:38disruptekwe use it in cps for, like, return (continuation.fn = x; continuation)
23:24:08disruptekactually i don't even know if cps generates this form anymore.
23:24:44FromDiscord<Yardanico> time to update my wiki page about obscure Nim features or just interesting code
23:24:54FromDiscord<exelotl> how's cps been going anyways?
23:25:15disruptekit's not really obscure. it's in the docs and it follows from the most basic assumptions about statements and expressions.
23:26:13disruptekcps is pending a bugfix that is going into 1.4 (and not before) because it breaks existing code elsewhere. proc args are sym'd for typed macros.
23:26:39disruptekit has a couple other blockers after that (which might just be one bug) involving symbol substitution.
23:27:30disruptekthen i'm hoping we can release a version that uses typed input. it will clear up the major obstacles to natural use of cps and it will probably be the first release worth using in production code.
23:28:17disruptekwe'll have one or two event queue implementations and some examples that show how to make iterators, exceptions, gotos, and so on.
23:28:27disruptekalso need a demonstration of threading.
23:28:54FromDiscord<exelotl> Ahh, sounds really promising
23:29:16disruptekyeah, i think it'll be a pretty nice extension.
23:29:34disruptekfast, lightweight, and sympathetic to arc.
23:29:59disruptekand extremely flexible in ways that existing async or threading options just aren't.
23:31:04disrupteki fully expect that people make some really awesome libs with it.
23:31:44disruptekwhat i mean is, i'll be disappointed if people don't use it.
23:31:59disruptekmore disappointed than i am with the lack of use of my other crap. 😁
23:49:34*a_chou joined #nim
23:51:25*TomDotTom joined #nim
23:58:56*rockcavera quit (Ping timeout: 272 seconds)