<< 02-07-2021 >>

02:03:41*arkurious quit (Quit: Leaving)
02:59:28FromDiscord<matf> Weird question: is there a limit to how many fields an object can have (why yes, can you tell I'm a scala developer and I have a weird fixation on the number 22)
03:05:00FromDiscord<leorize> no
03:06:17FromDiscord<Bung> there's issue of big object I remenber ?
03:08:03FromDiscord<leorize> objects that are too big won't fit the stack
03:08:14FromDiscord<leorize> but you can then just make it a ref object
03:08:27FromDiscord<leorize> so I'd say that practically there aren't any limit
03:09:05FromDiscord<Bung> okay
03:10:51*Helios quit (Remote host closed the connection)
03:10:53*Clonkk[m] quit (Remote host closed the connection)
03:10:53*happycorsair[m] quit (Read error: Connection reset by peer)
03:10:54*nixfreak_nim[m] quit (Write error: Connection reset by peer)
03:12:38*Clonkk[m] joined #nim
03:27:30*nixfreak_nim[m] joined #nim
03:27:30*Helios joined #nim
03:27:30*happycorsair[m] joined #nim
03:32:23FromDiscord<matf> Cool. I'm doing a weird... record of functions thing to mimic an interface for easy testing and I'm up to like 20 fields of procs. Just curious if I will run into a weird thing.
03:35:31*Helios quit (Quit: node-irc says goodbye)
03:35:39*nixfreak_nim[m] quit (Quit: node-irc says goodbye)
03:35:50*Clonkk[m] quit (Quit: node-irc says goodbye)
03:37:36*happycorsair[m] quit (Quit: node-irc says goodbye)
03:45:45*rockcavera quit (Remote host closed the connection)
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:37*supakeen joined #nim
04:22:21FromDiscord<reilly> Has anyone created a higher-level way of getting data from an audio device, or am I stuck with libsoundio?
04:23:53FromDiscord<reilly> All I really need to do is check if the level is above a certain threshold on a given frame.
04:23:59FromDiscord<reilly> (edit) "level" => "volume"
04:38:30*daniel333 joined #nim
04:43:25*cyraxjoe quit (Ping timeout: 265 seconds)
04:54:03*daniel333 quit (Ping timeout: 256 seconds)
05:09:06*beshr quit (Ping timeout: 240 seconds)
05:29:31fn<ForumUpdaterBot99> New Nimble package! hyperscript - Create HyperText with Nim., see https://github.com/schneiderfelipe/hyperscript
05:29:32fn<R2D299> itHub: 7"📎 Create HyperText with Nim."
07:26:04*Clonkk[m] joined #nim
07:37:32*Helios joined #nim
07:37:32*happycorsair[m] joined #nim
07:37:32*nixfreak_nim[m] joined #nim
07:38:11*PMunch joined #nim
07:49:23*Helios quit (Quit: Client limit exceeded: 20000)
07:49:27*nixfreak_nim[m] quit (Quit: Client limit exceeded: 20000)
07:49:56*Clonkk[m] quit (Quit: Client limit exceeded: 20000)
07:51:03*happycorsair[m] quit (Quit: Client limit exceeded: 20000)
07:59:05FromDiscord<PressF> sent a code paste, see https://play.nim-lang.org/#ix=3rII
08:00:37*Clonkk[m] joined #nim
08:01:00FromDiscord<Rika> many people have asked this before
08:01:01FromDiscord<Rika> no
08:01:02*nixfreak_nim[m] joined #nim
08:01:02*Helios joined #nim
08:01:03*happycorsair[m] joined #nim
08:01:23FromDiscord<Rika> there was a feature that allowed this before but it is now removed i believe
08:01:57*Vladar joined #nim
08:07:25FromDiscord<ElegantBeef> Yep syntax skin has been removed
08:08:32FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rIK
08:08:53PMunchI see why, and I know why it was a good thing to remove it, but it's a bit sad that we can't appease the bracket-people..
08:09:21FromDiscord<ElegantBeef> Well we can appease them, get the baseball bats 😛
08:09:40FromDiscord<Rika> same opinion here pmunch
08:10:17FromDiscord<Rika> maybe it can be revived (but not officially supported) in the future
08:10:20FromDiscord<Rika> or something
08:10:55PMunchI mean I guess it could be done with a pre-processor..
08:11:07FromDiscord<Rika> yes but >preprocessor
08:11:25FromDiscord<ElegantBeef> Someone was working on it, but i just dont think it's worth the effort
08:11:34FromDiscord<Rika> you'd need to reimplement the nim ast parser but with braces support?
08:11:46FromDiscord<Rika> since a `{}` doesnt simply map to a `:`
08:12:09FromDiscord<Rika> and you have to figure out how to distinguish braces blocks from braces initialiser syntax
08:14:58FromDiscord<Rika> theres just a lot of things to work on to make braces syntax work
08:15:00FromDiscord<Rika> but its doable
08:15:11FromDiscord<Rika> ~~C++ did it, they have list init. syntax after all~~
08:15:17FromDiscord<Rika> C/C++ i mean
08:15:25FromDiscord<ElegantBeef> Just introduce `:{ }` 😛
08:15:45FromDiscord<Rika> well i dont know
08:15:48FromDiscord<Rika> okay
08:15:55FromDiscord<Rika> i think the C++ comment i made doesnt really fit
08:16:02FromDiscord<Rika> because they dont have block expressions
08:16:19FromDiscord<Rika> so block expressions might clobber the braces init. syntax nim has
08:16:54FromDiscord<PressF> In reply to @ElegantBeef "If you hate yourself": We have LISP now 😅
08:17:32FromDiscord<Rika> what about lisp?
08:17:40FromDiscord<Ondrejoda> <@&371760044473319454@sershsk8er has been attempting to scam me. Here is the screenshot. https://media.discordapp.net/attachments/371759389889003532/860434030390149120/scam.png
08:17:42FromDiscord<ElegantBeef> In response to using `()`
08:18:07FromDiscord<PressF> I'm asking because Nim let's you call things in so many different ways, that maybe one could also use {}
08:18:20FromDiscord<Rika> In reply to @Ondrejoda "<@&371760044473319454> I would like": yeah lots of those are being reported right now, see #offtopic
08:18:29FromDiscord<mikip0> @Vasla123 is a scam bot as well, id 860121877338652693 https://media.discordapp.net/attachments/371759389889003532/860434239824723978/unknown.png
08:18:34FromDiscord<PressF> In reply to @ElegantBeef "In response to using": Yep. I actually like LISP
08:18:49FromDiscord<Rika> ig
08:18:56FromDiscord<ElegantBeef> I think enabling `{}` is just.... terrible
08:19:15FromDiscord<ElegantBeef> But i do think the best way to do it would be using `:{}` or similar
08:19:19FromDiscord<Rika> In reply to @ElegantBeef "I think enabling `{}`": i will say im not a fan, but it would be nice for those who are fans
08:19:29FromDiscord<PressF> I also got one of those the other day @Ondrejoda.
08:19:44FromDiscord<ElegantBeef> Well it fragments the code into two groups especially if it's cross compilable
08:19:58FromDiscord<Rika> In reply to @ElegantBeef "Well it fragments the": just like camelCase and snake_case users?
08:20:11FromDiscord<ElegantBeef> Except in Nim's case those are the same
08:20:25FromDiscord<Rika> and why would it not be the same for braces' case?
08:20:33FromDiscord<Rika> (edit) "and why would it not be the same ... forbraces?" added "in the case" | "braces' case?" => "braces?"
08:20:44FromDiscord<ElegantBeef> Having yet another convention to maintain when PRing another persons library is just ugh to me
08:20:56FromDiscord<Rika> just like camel and snake?
08:21:02FromDiscord<ElegantBeef> another
08:21:18FromDiscord<Rika> you only have like what, two conventions to take mind of right now
08:21:24FromDiscord<Rika> mcs and case
08:21:44FromDiscord<Rika> and its not hard to deny braces (its really easy to spot) in comparison to mcs
08:21:47FromDiscord<ElegantBeef> Constants, enums
08:21:51FromDiscord<PressF> In reply to @Rika "you only have like": Mcs are macros?
08:21:59FromDiscord<ElegantBeef> method call syntax
08:22:01FromDiscord<Rika> beef hit em with the explanation
08:22:10FromDiscord<PressF> In reply to @ElegantBeef "method call syntax": Makes Sense
08:22:18FromDiscord<ElegantBeef> The thing that lets us use procedures like methods in OOP
08:22:27FromDiscord<Rika> constants? wdym, like casing for constants?
08:22:31FromDiscord<ElegantBeef> Yep
08:22:39FromDiscord<Rika> that falls under casing...
08:22:52FromDiscord<ElegantBeef> I'm partially playing a game here
08:22:55FromDiscord<ElegantBeef> So blame that
08:23:07FromDiscord<ElegantBeef> really blame me
08:23:08FromDiscord<PressF> I actually like having different ways to call methods/procs. It's useful in some cases
08:23:23FromDiscord<ElegantBeef> Yes it enables great things
08:23:31*Helios quit (Quit: Client limit exceeded: 20000)
08:23:46FromDiscord<PressF> I'm not a big fan of the casing tho
08:23:52FromDiscord<Rika> why>
08:23:54FromDiscord<ElegantBeef> I think with the caveat brace syntax does start with `:{}` and it can change it might be fine
08:24:00*Clonkk[m] quit (Quit: Client limit exceeded: 20000)
08:24:01*nixfreak_nim[m] quit (Quit: Client limit exceeded: 20000)
08:24:13*Helios joined #nim
08:24:14*Clonkk[m] joined #nim
08:24:17FromDiscord<ElegantBeef> can change meaning it has an easy way to convert to/from
08:24:18FromDiscord<Rika> well braces syntax is out of the question for official support
08:24:29FromDiscord<ElegantBeef> Yes
08:24:49*nixfreak_nim[m] joined #nim
08:25:22FromDiscord<PressF> In reply to @Rika "why>": Makes it hard to read code sometimes if people use different ways to call the same function in the same codebase
08:25:23*happycorsair[m] quit (Quit: Client limit exceeded: 20000)
08:25:45FromDiscord<ElegantBeef> how does casing change that?
08:25:48FromDiscord<ElegantBeef> MCS changes that
08:25:52*happycorsair[m] joined #nim
08:25:53FromDiscord<PressF> I just haven't wrapped my head around it
08:25:56FromDiscord<Rika> In reply to @PressF "Makes it hard to": that is not the fault of the flexibility
08:26:08FromDiscord<Rika> i can say the same if braces+indent was allowed
08:26:10FromDiscord<Rika> and mcs
08:26:48FromDiscord<Rika> like if someone be like "echo 91283, avar, etc" on one line then fuckin "myvar.echo()" on the other
08:26:53FromDiscord<PressF> Ok. As I said I haven't wrapped my head around it. Probably if I write a bit more code I can like it
08:27:11FromDiscord<PressF> In reply to @Rika "like if someone be": I guess I haven't saw that yet haha
08:27:25FromDiscord<ElegantBeef> The issue isnt flexibillity it's how people use it
08:27:26FromDiscord<Rika> hahahahahhahahahahahahahahahahahahahahahahahahhahaa
08:27:47FromDiscord<ElegantBeef> Nim's case insensitivity is lovely
08:28:04FromDiscord<ElegantBeef> Like i dont see why people thing "If i write a symbol like X it has to be used like X"
08:28:26FromDiscord<ElegantBeef> I've been toying with opengl and i absolutely hate all cap constants and guess what uses them 😛
08:28:36FromDiscord<Rika> well the issue is that people think everyone else has no discipline
08:29:00FromDiscord<ElegantBeef> In any other language i'd have to make aliases for all of them to sane names
08:29:21FromDiscord<Rika> ~~if you even can~~
08:29:37FromDiscord<ElegantBeef> The people that dont have discipline are the same people that you dont want to use their code anyway
08:29:50FromDiscord<ElegantBeef> shit did i say that outloud
08:29:57FromDiscord<Rika> w
08:30:55FromDiscord<ElegantBeef> Slight joke, but it's the same thing with any language and features that can be misued
08:31:16FromDiscord<Rika> well yeah
08:31:17FromDiscord<ElegantBeef> C# properties for instance often get full of expensive operations
08:31:25FromDiscord<Rika> ~~rust unsafe wwwwwwwwwwww~~
08:31:34FromDiscord<Rika> megamemes
08:31:36FromDiscord<ElegantBeef> You mean the only way to implement linked lists 😛
08:32:01*nixfreak_nim[m] quit (Read error: Connection reset by peer)
08:32:04*Clonkk[m] quit (Read error: Connection reset by peer)
08:32:14*Helios quit (Read error: Connection reset by peer)
08:32:21*happycorsair[m] quit (Read error: Connection reset by peer)
08:32:23FromDiscord<Rika> i respect rust though
08:32:33FromDiscord<Rika> what i dont respect are the evangelists xd
08:32:50FromDiscord<ElegantBeef> You dont like the holier than thou attitudes?
08:33:51FromDiscord<ElegantBeef> @PressF i do have to ask what are your biggest reason(s) for wanting `{}`
08:33:55*Clonkk[m] joined #nim
08:34:26FromDiscord<PressF> In reply to @ElegantBeef "<@!391274926541373441> i do have": Not a major one, I just think it looks better
08:34:27*nixfreak_nim[m] joined #nim
08:34:27*Helios joined #nim
08:34:27*happycorsair[m] joined #nim
08:34:40FromDiscord<ElegantBeef> How does it look better? 😄
08:34:49FromDiscord<PressF> It's easiest to see where code blocks start and end
08:34:52FromDiscord<Rika> beef do you know what "opinions" are
08:35:02FromDiscord<Rika> let em be
08:35:14FromDiscord<ElegantBeef> Oh i do but i was confused in this regard of what "looked better"
08:35:20FromDiscord<ElegantBeef> Cause overall it's the same indented code 😄
08:35:42FromDiscord<Rika> people think (and therefore read code)↵ differently
08:35:43FromDiscord<Rika> (edit) "code)↵" => "code)"
08:35:51FromDiscord<Rika> no there was no line break there
08:35:55FromDiscord<Rika> you saw no line break
08:36:04FromDiscord<TheBiggestNubThun> sent a long message, see http://ix.io/3rIN
08:36:05FromDiscord<ElegantBeef> Well i mean it's not code looking better, it's just they can more easily see the deliminations
08:36:36FromDiscord<Rika> and that can mean it looks better to them
08:36:59FromDiscord<Rika> In reply to @TheBiggestNubThun "Hi all! I've been": nothing looks wrong but this is not async, this is still synchronous
08:37:37FromDiscord<TheBiggestNubThun> I know it is synchronous, it is just to simplify the code
08:38:06FromDiscord<TheBiggestNubThun> The fact is that the memory keeps going up and up. One of the reasons I'm trying Nim is to keep memory low
08:38:39FromDiscord<Rika> how are you measuring memory?
08:38:56FromDiscord<Rika> massif? /usr/bin/time? looking at htop?
08:40:24*Helios quit (Read error: Connection reset by peer)
08:40:25*Clonkk[m] quit (Remote host closed the connection)
08:40:25*nixfreak_nim[m] quit (Remote host closed the connection)
08:40:32*happycorsair[m] quit (Remote host closed the connection)
08:40:55FromDiscord<TheBiggestNubThun> I'm running it inside a docker container, and looking at docker stats
08:41:35FromDiscord<TheBiggestNubThun> which would be similar to htop I guess
08:43:30FromDiscord<Rika> what nim version
08:44:12FromDiscord<TheBiggestNubThun> 1.4.6
08:45:27FromDiscord<Rika> i dont seem to see the same behavior, how long did you run it for
08:46:01FromDiscord<TheBiggestNubThun> You can use a bigger website, like google.com, and you'll see it rising faster
08:46:20FromDiscord<TheBiggestNubThun> 2 mins is enough to see it rising
08:46:23FromDiscord<Rika> ok
08:48:02FromDiscord<TheBiggestNubThun> I'll try Nim 1.4.8 and report back
08:48:37FromDiscord<ElegantBeef> It grows a bit initially then holds steady
08:49:20FromDiscord<ElegantBeef> Yea using the google example it holds steady at 5.1MB
08:49:54FromDiscord<TheBiggestNubThun> I'm using Alpine linux, maybe it is something especial of that OS
08:49:59*max22- joined #nim
08:50:07FromDiscord<Rika> what compile flags are you using
08:50:21FromDiscord<TheBiggestNubThun> -d:release -d:ssl
08:50:53FromDiscord<Rika> i am seeing not much heap increase (-d:danger -d:ssl -d:useMalloc) https://media.discordapp.net/attachments/371759389889003532/860442390648324106/unknown.png
08:51:41FromDiscord<ElegantBeef> Were you by anychance using arc?
08:51:42FromDiscord<Rika> actually danger might be fucking with massif, ill use debug
08:51:45FromDiscord<Rika> no
08:51:50FromDiscord<ElegantBeef> Not you, them
08:51:51FromDiscord<Rika> all the flags were as i listed
08:51:58FromDiscord<Rika> smh ok 😦
08:52:03FromDiscord<Rika> 😛
08:52:13FromDiscord<ElegantBeef> Cause with arc i'm up to 20MB 😄
08:53:00FromDiscord<TheBiggestNubThun> hmm, so what are the standard flags to use for the compiler?
08:53:04FromDiscord<ElegantBeef> Orc holds steady at 1.7MB
08:53:25FromDiscord<Rika> async is cyclic so arc going up is normal
08:53:27FromDiscord<TheBiggestNubThun> I know Nim can use several Gcs
08:53:35FromDiscord<TheBiggestNubThun> (edit) "Gcs" => "GCs"
08:53:40FromDiscord<ElegantBeef> A program build default is `--gc:refc` and `-d:debug`
08:53:47FromDiscord<ElegantBeef> Yea i figured as much
08:54:09FromDiscord<ElegantBeef> The only thing i can figure is as they said alpine is off or they accidently build with arc
08:54:29FromDiscord<ElegantBeef> Cause yea with refc held solid at 5.1 and orc holding solid at 1.7
08:54:49FromDiscord<Rika> bet its alpine 😛
08:56:01FromDiscord<TheBiggestNubThun> Oh, something I forgot to mention is that I use nimble to build
08:56:10FromDiscord<TheBiggestNubThun> So nimble -d:release -d:ssl
08:56:12FromDiscord<ElegantBeef> Doesnt change anything
08:56:17FromDiscord<TheBiggestNubThun> (edit) "So nimble ... -d:release" added "build"
08:56:25FromDiscord<Rika> should be pm. the same with nimble
08:56:44FromDiscord<ElegantBeef> If you arent changing the gc in a config or manually then it's not Nim causing the issue 😄
08:57:03FromDiscord<Rika> or maybe it is and you found a new bug
08:57:05FromDiscord<TheBiggestNubThun> it could be alpine.. I'll try 1.4.8 and then a non-alpine
08:57:14FromDiscord<ElegantBeef> True it could be a nim bug
08:57:15FromDiscord<Zachary Carter> In reply to @Ondrejoda "<@&371760044473319454> I would like": they're banned
08:57:28FromDiscord<ElegantBeef> But there are already 1900 issues do we need another one 😛 (Yes we do)
09:06:38*Clonkk[m] joined #nim
09:10:02FromDiscord<TheBiggestNubThun> With 1.4.8 it looks more stable. It goes up and then stays more or less in the same value
09:10:05*nixfreak_nim[m] joined #nim
09:10:05*Helios joined #nim
09:10:05*happycorsair[m] joined #nim
09:10:20FromDiscord<TheBiggestNubThun> Thank you guys, sorry for the noobie question
09:11:35FromDiscord<ElegantBeef> It's fine, questions are better than running from nim cause it "didnt" fit your needs
09:12:41FromDiscord<TheBiggestNubThun> It's still a shame that the tls implementation is not pluggable yet, I'm eagerly waiting for either a pluggable implementation or another lower memory library like bearssl/mbedtls/wolfssl
09:14:05FromDiscord<ElegantBeef> Well there are bearssl bindings if that interests you 😄
09:14:14FromDiscord<Ondrejoda> In reply to @Zachary Carter "they're banned": thanks
09:14:32FromDiscord<TheBiggestNubThun> I'm too noob to use the raw library 😋
09:15:41FromDiscord<TheBiggestNubThun> I'm a C#/Java/Python kind of guy, I'm interested in C, but life is too short
09:32:48FromDiscord<arnetheduck> In reply to @TheBiggestNubThun "It's still a shame": there's a https client in `chronos` that uses `bearssl` out of the box, you can use it like so: https://forum.nim-lang.org/t/7964#52137
09:33:29FromDiscord<arnetheduck> `chronos` also fixes some memory usage issues found in `asyncdispatch` but certainly not all
09:34:31FromDiscord<TheBiggestNubThun> 😮 Thank you for that, I will try it out!
09:52:20*xet7 quit (Quit: Leaving)
10:37:18*vsantana quit (Remote host closed the connection)
10:37:36*vsantana joined #nim
11:12:59FromDiscord<SpiderDave> do something about the spambots here, bye
11:13:31FromDiscord<Vindaar> ❤️ people like that
11:20:40FromDiscord<dom96> In reply to @arnetheduck "`chronos` also fixes some": fwiw I haven't had memory issues with asyncdispatch for a while
11:31:39*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
11:47:35PMunchIs there an RFC for allowing an `else` block to be passed to a macro?
11:54:47PMunchI have a whenThreaded template that accepts one or two blocks. If passed two blocks it is a simple expansion to `when compileOption("threads"): block1 else: block2`. But I don't like how this looks in the code with the second `do: <whatever>` block for the else bit..
11:55:43*max22- quit (Ping timeout: 246 seconds)
12:05:23FromDiscord<kaushalmodi> @PMunch I updated the parsetoml CI yesterday. While switching from Travis to GHA, I realized that the Go toml-test was also now updated to support TOML 1.0.0 tests. The only setup change before you run `nimble run_toml_tests` is that you need to update to the latest go version.
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:32FromDiscord<kaushalmodi> It will then run the latest TOML 1.0.0 test suite; 49 tests are failing at the moment. I made the CI pass as before by calling an alternative nimble task that skips those 49 tests.
12:06:38*supakeen joined #nim
12:07:32PMunchHmm, 49 tests failing isn't great
12:07:42PMunchOh right, it doesn't support 1.0.0 yet..
12:07:52FromDiscord<kaushalmodi> Yep
12:08:03PMunchBut that's great! Makes it much easier to update while making sure we don't break anything
12:08:36FromDiscord<kaushalmodi> Many tests are from same categories line inline tables, control char invalid checks, etc
12:09:55FromDiscord<madman> sent a code paste, see https://play.nim-lang.org/#ix=3rJL
12:10:12PMunch@madman, yup
12:10:30PMunchCan't have recursion without references, because it would be infinite
12:10:35FromDiscord<madman> should i seperate into two types?
12:10:39FromDiscord<kaushalmodi> sent a code paste, see https://play.nim-lang.org/#ix=3rJM
12:11:05FromDiscord<konsumlamm> no need to
12:11:12FromDiscord<madman> In reply to @kaushalmodi "You can make that": cool! why does it work though
12:11:19FromDiscord<Rika> if you want stack root nodes but ref other nodes yeah]
12:11:29PMunchBecause now it is a reference object
12:11:33FromDiscord<Rika> because refs make the size constant (pointer size)
12:11:38FromDiscord<madman> aha
12:11:44FromDiscord<Rika> instead of infinite
12:11:54FromDiscord<kaushalmodi> In reply to @x19 "cool! why does it": Because then all objects chain by just ref (like pointer) to other object ref.
12:12:02FromDiscord<Rika> to make a type you need the size of every other field
12:12:13FromDiscord<Rika> what's the size of a box when it has itself in it? we dont know
12:12:24PMunchIf you want your first node to not be a ref object you can have one Node type and one NodeRef type
12:12:58FromDiscord<madman> okay
12:14:27FromDiscord<madman> sent a code paste, see https://play.nim-lang.org/#ix=3rJN
12:14:47FromDiscord<Rika> that means you read a `nil` reference
12:15:01FromDiscord<Rika> you need to check for whether the child is `nil` now
12:15:12FromDiscord<Rika> oh, rather parent i think
12:15:14FromDiscord<madman> ok i see
12:15:23FromDiscord<madman> so now it's on the heap
12:15:27FromDiscord<Rika> something there is nil and i dont know which exactly
12:15:28FromDiscord<Rika> yesh
12:15:31FromDiscord<Rika> yes
12:15:41PMunchOr make sure your code can't end up in a nil scenario
12:15:50FromDiscord<Rika> or that too yes
12:16:04FromDiscord<madman> okay ill have a closer look
12:16:10FromDiscord<madman> i wanted to stay on the stack :P
12:16:22PMunchNo you don't..
12:16:23PMunchTrust me
12:16:27FromDiscord<madman> hahaha
12:16:28FromDiscord<madman> ok
12:16:44PMunchYou don't want to store a large tree structure on the stack and copy that thing around
12:16:48FromDiscord<madman> thanks guys :nimRawr:
12:17:32FromDiscord<madman> hmm yeah i quite a few nodes now and the tree must be getting quite fat
12:17:39PMunchI keep thinking I should write a basics of Nim tutorial that explains all of this stuff, but then I realise that is basically a university level introductory class to computer science, just with Nim :P
12:18:02FromDiscord<madman> lol
12:18:12FromDiscord<madman> there is one by Goran
12:18:20FromDiscord<madman> idk if that's the name
12:18:42FromDiscord<Clonkk> In reply to @PMunch "I keep thinking I": So like http://ssalewski.de/nimprogramming.html ?
12:18:45*arkurious joined #nim
12:18:57FromDiscord<madman> ah yes that's it
12:19:12PMunchYeah I guess :P
12:19:13FromDiscord<Clonkk> It's a good book
12:19:29PMunchHaven't read it though..
12:20:07FromDiscord<madman> i usually work on the stack ok manually `alloc0`, didnt play much with `ref` like ever
12:20:42FromDiscord<Rika> wow thats hardcore, but alloc0 is still on heap
12:20:49FromDiscord<madman> yep
12:20:57PMunchNim automatically puts stuff on the heap for you though
12:21:08FromDiscord<madman> yeah with ref
12:21:11PMunchI see you have a seq in there for example, that's on the heap
12:21:13FromDiscord<Rika> not even just with ref
12:21:22PMunchEver used a string? Probably on the heap
12:21:29FromDiscord<Rika> totally on the heap
12:21:29FromDiscord<madman> yes nim does a lot of hidden allocations
12:21:45FromDiscord<Rika> unless you're fucking around with embedded then its prolly not heap
12:21:52PMunchWell, it does quite few allocations as it keeps a memory pool, but yeah
12:22:55FromDiscord<madman> i usually do `var item = cast[ptr item](alloc0(sizeof(item)3))`
12:23:00FromDiscord<Rika> well ig dont worry too much about performance until you actually are starting to have performance issues
12:23:07PMunch@madman, why?
12:23:15FromDiscord<Clonkk> You know the golden rule of programming
12:23:15FromDiscord<Rika> oh take a look at the `create` proc
12:23:23FromDiscord<Clonkk> First make it work, then make it pretty, then make it fast
12:23:43FromDiscord<Rika> i usually try to make it pretty while making it work at the same time
12:23:46FromDiscord<madman> gotta go fast :sanic:
12:23:56FromDiscord<Rika> otherwise bugs could be hidden in the code
12:24:13FromDiscord<madman> honestly this is not even some real-time thing, i dont care about perf at all
12:24:24FromDiscord<Rika> then why bother
12:24:28FromDiscord<Clonkk> Real time is about determinism not performance though :p
12:24:30FromDiscord<Rika> you're wasting your time lol
12:24:46FromDiscord<madman> yes exactly thats why imma attempt to use ref
12:25:14FromDiscord<madman> In reply to @SneakyBaguette "Real time is about": i was talking in the context of real-time 3d rendering for example
12:25:49FromDiscord<madman> are we talking about the same real-time
12:25:59FromDiscord<Clonkk> Haha sorry I was being pedantic for no reason
12:26:13FromDiscord<madman> haha i like pedantic
12:26:37FromDiscord<Rika> -pedantic-errors
12:27:01PMunchTBH if you tried to put a tree structure on the stack I'm going to guess your hand written reference free code is going to be slower than code written with references and using the GC..
12:27:02FromDiscord<Clonkk> Basically you have "real-time" in the "it should be fast enough that humans don't see lags" and "real-time" in the critical systems context of "a tasks must not miss a deadline of things will catch fire and people might die"
12:27:24FromDiscord<Rika> exceptthataudioistechnicallyrealtimejustnothardrealtime
12:27:29PMunchNot trying to be mean, but performance tuning is a fickle beast, and getting it right isn't as trivial as "keep everything on the stack"
12:27:53FromDiscord<madman> In reply to @SneakyBaguette "Basically you have "real-time"": ah yes, hard real-time vs soft real-time ( i guess)
12:27:55FromDiscord<Rika> then you see people trying to do "branch free programming" in python
12:27:59FromDiscord<madman> In reply to @PMunch "TBH if you tried": oh i bet it will
12:28:12PMunch@Rika, haha exactly
12:28:30FromDiscord<Clonkk> In reply to @x19 "ah yes, hard real-time": Yeah basically
12:29:10FromDiscord<madman> nim is suited for both right?
12:29:50FromDiscord<Clonkk> Nim can be deteministic with --gc:arc or no gc
12:30:03FromDiscord<Rika> it is recommended to use arc
12:30:30FromDiscord<Rika> you are limited to a subset of the language if you use no gc
12:30:38FromDiscord<Rika> (well, "limited")
12:30:42FromDiscord<madman> ah makes sense now, deterministic as in this task must do this and finish at this time every time or everyone dies
12:31:04FromDiscord<Clonkk> That's hard real-time
12:31:27FromDiscord<Rika> the gc matters for deterministic because if i run this proc i want to make sure it runs in this amount of time always
12:31:28FromDiscord<Clonkk> Soft real-time is "the mean of your executions time must be within this range"
12:31:33FromDiscord<Rika> a gc would add possible "lag:
12:31:43FromDiscord<Rika> like when it collects or moves stuff up a generation
12:32:05FromDiscord<Clonkk> Like stop-the-world gc used to be (not sure if they are used anymore) in Java
12:32:06FromDiscord<Rika> well, a traditional gc at least would do that
12:32:18FromDiscord<Rika> arc is more akin to rust's garbage collection scheme
12:32:29FromDiscord<Rika> not just stop the world gcs, pretty much any gc
12:32:35FromDiscord<madman> yeah the move semantics thanks to smart compiler injections
12:33:07FromDiscord<konsumlamm> ~~Rust doesn't have a garbage collection scheme~~
12:33:08FromDiscord<Rika> most gcs work by halting the current code and doing things, its just that modern gcs only stop for a fraction of the time STW gcs do
12:33:40FromDiscord<madman> In reply to @konsumlamm "~~Rust doesn't have a": true, and in that case arc is not a GC ? 🤷‍♂️
12:33:40FromDiscord<Rika> i thought we stopped being pedantic?
12:33:55FromDiscord<Clonkk> In reply to @x19 "true, and in that": Depends how you define gc
12:33:58FromDiscord<madman> i dont really understand GCs details much, spent time learning manual memory
12:34:07FromDiscord<konsumlamm> also, arc may leak memory if you have ref cycles, so i'd use orc (which includes a cycle collector) instead
12:34:17FromDiscord<Rika> thats if you do not need determinism
12:34:21FromDiscord<madman> but orc is less deterministic
12:34:21FromDiscord<konsumlamm> In reply to @x19 "true, and in that": those two things don't have anything to do with each other
12:34:29FromDiscord<Rika> we were discussing a theoretical deterministic application
12:35:01FromDiscord<madman> In reply to @konsumlamm "those two things don't": well the reason i said that is i was talking to a rust zealot and they mentioned that ARC ( auto ref count ) is a form of garbage collection
12:35:20PMunchIt would be cool if we could run a program with ORC and have it output if it ever collected a cycle
12:35:33FromDiscord<Rika> In reply to @konsumlamm "~~Rust doesn't have a": when i say garbage coll. scheme, i dont mean a garbage collector, i just mean how a language deals with garbage/to-be-unused memory
12:35:41FromDiscord<Clonkk> GC is your friend inviting you for a beer after work while you're supposed to meet your wife for dinner at a nice restaurant. While most of the time you'll be able to do both, missing the deadline will result in catastrophical failure
12:35:46PMunchCan you run ORC and then disable the automatic collection and trigger it manually like with the normal GC?
12:35:53FromDiscord<Rika> ARC doesnt mean auto ref count
12:36:10FromDiscord<madman> In reply to @Rika "ARC doesnt mean auto": my whole life is a lie
12:36:19FromDiscord<Rika> ARC in nim doesnt mean auto ref count
12:36:21FromDiscord<Clonkk> (edit) "GC" => "~~GC" | "failure" => "failure~~"
12:36:22FromDiscord<konsumlamm> `Arc`/`Rc` isn't "Rust's garbage collection scheme" though, it's just a library defined smart pointer that does reference counting (so a limited form of GC)
12:36:37FromDiscord<haxscramper> In reply to @PMunch "It would be cool": someone was asking about this feature
12:36:40FromDiscord<Rika> i didnt mention rust's Arc
12:36:47FromDiscord<konsumlamm> but madman did
12:36:48FromDiscord<haxscramper> and I think they've implemented in in some form
12:36:51FromDiscord<Rika> ah i see
12:36:52FromDiscord<Rika> okay
12:36:54FromDiscord<Rika> understood
12:36:56FromDiscord<Rika> my mistake
12:37:16FromDiscord<Rika> man maybe we should rename arc
12:37:24FromDiscord<Rika> its kinda confusing to talk about multiple languages
12:37:38FromDiscord<madman> so what does arc stand for
12:37:41FromDiscord<madman> or its just a name
12:37:45FromDiscord<madman> :P
12:37:52FromDiscord<haxscramper> call it `orcarc`
12:38:04FromDiscord<Rika> in nim i think arq said it meant "ar\q's ref counting" or something
12:38:06PMunchAristocratic Reference Counting
12:38:09FromDiscord<madman> i totally thought it was automatic ref counting
12:38:10FromDiscord<konsumlamm> advanced really cool GC
12:38:24FromDiscord<madman> lmao
12:38:27PMunchThat's why Nim has a crown, because the ARC GC is royal
12:38:34FromDiscord<Rika> In reply to @haxscramper "call it `orcarc`": aorc
12:38:36FromDiscord<Rika> xd
12:38:41FromDiscord<madman> the one gc to rule them all
12:39:15FromDiscord<madman> i would like to appreciate GCs more, maybe i should try to impl a silly one
12:39:35FromDiscord<haxscramper> I've found five nimble packages that have explicit `exec("rm")`
12:39:39FromDiscord<haxscramper> `rm ...`
12:39:43FromDiscord<Rika> what does it rm?
12:40:06FromDiscord<haxscramper> well, I will check in more detail now, but probably some internal build styff
12:40:28FromDiscord<haxscramper> I'm just checking what is going on in people's `.nimble` files right now
12:40:37FromDiscord<haxscramper> sent a code paste, see https://paste.rs/TQI
12:40:39FromDiscord<haxscramper> ^ Most used `exec` commands
12:41:03FromDiscord<haxscramper> `$cmd` means `exec(cmd)` has been used - I don't track variable values now
12:41:39FromDiscord<Rika> > python 1
12:41:43FromDiscord<Rika> we have found the traitor
12:43:00FromDiscord<ajusa> > node↵> bash
12:43:52FromDiscord<haxscramper> Though it doesn't seem entirely accurate, some things are clearly missing
12:44:29FromDiscord<haxscramper> I don't believe there was no `git` uses
12:52:09FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rJT
12:52:14FromDiscord<haxscramper> 1.3k execs for nim,
12:52:18FromDiscord<Rika> `true`
12:52:19FromDiscord<Rika> lol
12:52:25FromDiscord<haxscramper> Total of `2.2k` execs
12:52:30FromDiscord<haxscramper> (edit) "`2.2k`" => "`2.3k`"
12:52:33FromDiscord<Rika> where's python now lol
12:53:11FromDiscord<haxscramper> L
12:53:15FromDiscord<haxscramper> https://pastebin.com/Lt7Juxxk
12:53:31FromDiscord<haxscramper> No more `python1`
13:05:19FromDiscord<gerwy> is monotimes deprecated? because i can't import it
13:05:28FromDiscord<gerwy> (edit) "monotimes" => "`monotimes`"
13:05:49FromDiscord<Bung> add std prefix needed ?
13:05:56FromDiscord<gerwy> ooooh yeah i noticed it just now
13:06:00FromDiscord<gerwy> why its like this?
13:06:23FromDiscord<haxscramper> new modules use `std/` prefix
13:06:27FromDiscord<haxscramper> always use `std/` prefix
13:08:20FromDiscord<Bung> module changes many thing that can't compatible with old nim I think
13:08:48FromDiscord<haxscramper> no, it's because new modules use std prefix
13:08:52*Clonkk[m] left #nim (#nim)
13:09:00FromDiscord<Bung> so old version import without prefix
13:09:45FromDiscord<Bung> that's true ? I see some need prefix , some not.
13:10:19FromDiscord<haxscramper> because it works without prefix for some modules
13:10:27FromDiscord<konsumlamm> @gerwy the devel docs also show the `std/` prefix (and they're more up to date in general): https://nim-lang.github.io/Nim/monotimes.html
13:10:28FromDiscord<haxscramper> But you should use `std/` prefix
13:11:01FromDiscord<konsumlamm> if you always use `std/`, you can't accidentally forget it for modules that actually need it
13:11:41FromDiscord<konsumlamm> and eventially it might necessary to use `std/`
13:11:51FromDiscord<Bung> okay , atleast we can just look imports know it use new version nim.
13:11:54FromDiscord<Clonkk> Yeah I think the plan is eventually to have all module as ``std/``
13:12:07FromDiscord<Clonkk> Which is reasonable imo
13:12:08FromDiscord<gerwy> In reply to @haxscramper "always use `std/` prefix": im not used to that↵it just seems like if any other module is included in std then why this module in particular needs to be specified that its in std
13:12:51FromDiscord<konsumlamm> because it's a better idea to prefix them
13:12:58FromDiscord<haxscramper> In reply to @Life Sucks "im not used to": because some new modules use `std/` prefix, and it is better to namespace modules
13:13:00FromDiscord<konsumlamm> it just took a while to realize that apparently
13:13:11FromDiscord<haxscramper> Instead of having some special toplevel `tables`
13:13:13FromDiscord<konsumlamm> so old modules use old conventions
13:13:25FromDiscord<Clonkk> In reply to @Life Sucks "im not used to": Because eventually all module will require ``std/`` notably to avoid name conflict (what I a stdlib module needs a name occupied by a Nimble package such as strformat vs strfmt)
13:13:47FromDiscord<Clonkk> Gotta start somewhere without breaking everything so it makes sense to have new module follow the new rule and old module still be compatible
13:13:57FromDiscord<Bung> this allow use have a local file named `monotimes.nim`
13:16:00FromDiscord<haxscramper> What does `reFilesDiffer` mean in testament? And I"m still having trouble with just running example from documentation
13:16:10FromDiscord<haxscramper> In reply to @haxscramper "What does `Failure: reNimcCrash`": This one
13:16:21FromDiscord<haxscramper> I'm testing↵``nim
13:16:21FromDiscord<haxscramper> discard """↵ errormsg: ""↵"""↵echo 12
13:16:33FromDiscord<Clonkk> Hmm ? https://forum.nim-lang.org/t/6999
13:16:40FromDiscord<Clonkk> I had a similar error maybe it's related
13:16:44FromDiscord<haxscramper> (edit) "discard """↵ errormsg: ""↵"""↵echo 12" => "sent a code paste, see https://play.nim-lang.org/#ix=3rK1"
13:17:05FromDiscord<Clonkk> It was basically having disabled ``--hints:off``
13:17:11FromDiscord<Clonkk> (edit) "disabled" => ""
13:17:13FromDiscord<haxscramper> Well running `nim c` manually wo
13:17:20FromDiscord<haxscramper> Ah, `--hints:off` should be enabled?
13:17:34*fn quit (Remote host closed the connection)
13:18:02FromDiscord<Clonkk> Testament will fail you have ``--hints:off`` , ``--verbosity:0`` or ``--outdir:...``
13:19:03FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rK2
13:19:04FromDiscord<Clonkk> sent a code paste, see https://paste.rs/3tv
13:19:06*fn joined #nim
13:19:09FromDiscord<Clonkk> Well probably not that then
13:20:01FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rK3
13:20:07FromDiscord<haxscramper> sent a code paste, see https://paste.rs/1Ti
13:20:11*Vladar quit (Quit: Leaving)
13:20:18FromDiscord<Clonkk> Ah yes
13:20:26FromDiscord<Clonkk> Error message must come from the correct files
13:20:43FromDiscord<Clonkk> I had this issue when I refactored some norm unit test with testamament
13:20:45FromDiscord<Clonkk> https://github.com/moigagoo/norm
13:20:47fn<R2D299> itHub: 7"A Nim ORM"
13:20:56FromDiscord<haxscramper> alright now it works, thanks a lot
13:21:01FromDiscord<haxscramper> undocumented crap
13:21:47FromDiscord<Clonkk> So expecting error message specified in an error pragma in your source file in a test.nim run with testament fail
13:22:46FromDiscord<haxscramper> Alright, I see now
13:23:31FromDiscord<Clonkk> sent a code paste, see https://play.nim-lang.org/#ix=3rK4
13:30:38FromDiscord<Bung> @timotheecour `could not load: libnimrtl.dylib` I updated latest devel , compile my theme get this error
13:31:45FromDiscord<haxscramper> In reply to @SneakyBaguette "https://github.com/moigagoo/norm": Does nimble pass all import paths to the testament when it runs? https://github.com/moigagoo/norm/blob/develop/norm.nimble#L16
13:32:37FromDiscord<haxscramper> Default `nimble test` handles dependency paths, what about custom one?
13:34:24FromDiscord<Clonkk> Eh, not sure. I want to say yes, because clearly the CI of Norm works
13:36:01FromDiscord<haxscramper> In CI it only installs required dependencies, so due to `--nimblePath` it does the right thing.
13:37:02FromDiscord<haxscramper> But I would expect it to work correctly only because of a lucky coincidence that just happens on a regular basis. E.g. it is not supported, but Ci doesn't do anything that might break things
13:37:53FromDiscord<Clonkk> I don't recall having any issue when working with it locally; but it was some time ago and can't honestly say for sure
13:38:28FromDiscord<Clonkk> Maybe it was just coincidence of not having strange setup and only a single versions of every dependencies installed as you said
13:38:50FromDiscord<Clonkk> Should be easy enough to check, no ?
13:45:36FromDiscord<haxscramper> I checked, it doesn't pass nimble paths
13:46:04FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rKb
13:46:30FromDiscord<haxscramper> That passes paths for all 150+ installed packages at once
13:51:29*vsantana1 joined #nim
13:54:25*vsantana quit (Ping timeout: 265 seconds)
13:54:25*vsantana1 is now known as vsantana
13:58:09*Vladar joined #nim
14:05:28*rockcavera joined #nim
14:05:28*rockcavera quit (Changing host)
14:05:28*rockcavera joined #nim
14:12:48FromDiscord<gerwy> is there some tool that i could use to see how much memory does my array uses?↵i mean if its array it will probably use the same memory every time right? so its just the matter of calculating `sizeof(type) size`? right?
14:13:53FromDiscord<Rika> Essentially
14:14:35FromDiscord<gerwy> oh okay
14:14:58FromDiscord<gerwy> because im caching something after computing it and well... i have feeling that it will take a lot more than it should
14:15:22FromDiscord<Rika> If you want the total used by the whole program there are many tools for that
14:17:05FromDiscord<gerwy> i can just look it up on htop? It shows memory usage right?
14:18:30FromDiscord<gerwy> hmm okay it isn't as bad as i thought
14:19:35FromDiscord<madman> sent a code paste, see https://play.nim-lang.org/#ix=3rKj
14:21:58FromDiscord<konsumlamm> it's a seq of `nil`s
14:22:21FromDiscord<konsumlamm> you didn't initialize any elements, so the default value is used
14:22:52FromDiscord<madman> oh i thought the `newSeq` proc creates the data
14:24:03FromDiscord<konsumlamm> wdym?
14:24:55FromDiscord<haxscramper> newSeqWith will populate resulting sequence
14:25:47FromDiscord<madman> exactly what i was looking for
14:36:58*vsantana1 joined #nim
14:39:59*vsantana quit (Ping timeout: 256 seconds)
14:40:00*vsantana1 is now known as vsantana
14:43:14FromDiscord<Hi02Hi> In reply to @PMunch "It would be cool": found the conv.
14:43:39FromDiscord<Hi02Hi> In reply to @Hi02Hi "i actually think that": here was the result
14:45:18PMunchOh the [GC] cycle collections will track when ORC was used?
14:45:23PMunchThat's nifty
14:46:06PMunchOh well gotta go
14:46:07*PMunch quit (Quit: leaving)
15:13:27*max22- joined #nim
15:22:29*daniel333 joined #nim
15:25:55*daniel333 quit (Client Quit)
15:44:20FromDiscord<treeform> In reply to @mst "right, my plan is": That would be great. I asked for this too.
16:00:28FromDiscord<timotheecour> In reply to @Bung "<@!427948629249228800> `could not load:": you need to compiler rtl, see manual, or see how `testament pcat dll` does
16:01:15FromDiscord<timotheecour> (edit) "compiler rtl," => "compile rtl (and set LD_LIBRARY_PATH or rpath etc),"
16:10:55FromDiscord<dom96> Well that was just ~6 hours of me and Araq's time reviewing the big Nimble PR. If you're creating PRs please please keep them small so we can iterate fast
16:12:06FromDiscord<Rika> damn 6 hours for 10k sloc thats p quick imo
16:13:06FromDiscord<kaushalmodi> sent a long message, see http://ix.io/3rKO
16:13:22FromDiscord<kaushalmodi> (edit) "http://ix.io/3rKO" => "http://ix.io/3rKP"
16:17:29fn<Prestige99> That's a shit load of code to review, 10k lines? Was it like a whole rewrite?
16:18:48FromDiscord<Rika> massive functionality addition
16:18:54FromDiscord<Rika> a pr that should have been 6 i believe
16:19:03fn<Prestige99> Sounds like it
16:22:03FromDiscord<Bung> @timotheecour now I use createnimrtl , I still get nil access
16:27:23FromDiscord<timotheecour> try `testament pcat dll` and if it works for you (as it should), it should show you how to make it work
16:28:20FromDiscord<timotheecour> > I still get nil access↵previously you mentioned a different error though
16:29:49FromDiscord<timotheecour> (edit) "though" => "though. also, you didn't specify your OS, i'm guessing osx? if so, try setting DYLD_LIBRARY_PATH so it can find it (as a temporary thing to try, but you should not use that in practice)"
16:43:45FromDiscord<tomck> Wait is `float` in nim default 64bit??
16:44:32FromDiscord<tomck> or should i always explicitly use `float32` and `float64`? is it implementation dependent?
16:44:58FromDiscord<tomck> `toUnixTimeFloat` in the `times` module returns a `float`, so i'm assuming that's 64 bit otherwise we'll be running out of bits fairly soon
16:45:30FromDiscord<Vindaar> In reply to @tomck "Wait is `float` in": yeah, as a matter of fact `float` is just an alias for `float64`
17:01:19FromDiscord<Bung> @timotheecour it's more then one error, fixed after you and me PR, then the major problem is I call dll proc from my program acess nil variable
17:02:17FromDiscord<timotheecour> needs a minimized repro, you may need to file a bug
17:02:18*iortega joined #nim
17:04:13FromDiscord<Bung> diffrent gc cause diffrent error, sometines occurs in dll proc's loop , sometimes occurs when operate dll proc's returns from main program.
17:05:35FromDiscord<Bung> okay, I'll try create minimal example to show the error
17:27:51*SebastianM joined #nim
17:28:14FromDiscord<Bung> @timotheecour please check https://github.com/bung87/dllgen
17:28:16fn<R2D299> itHub: 7"<No Description>"
17:38:37FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rL1
17:39:09FromDiscord<tomck> what's the solution here, just add normal single-# comments before fields & only expect doc comments to be generated on top-level object types?
17:40:41FromDiscord<haxscramper> that is a per-field documentation, or at leas how `nim doc` does it
17:41:07FromDiscord<haxscramper> ` ## \` is kind of useless, you can break on multiline doc comments with `## this` `## is a doc comment`
17:41:19FromDiscord<tomck> Yes i know, i want it to generate per-field docs, it doesn't
17:41:23FromDiscord<haxscramper> But you won't get nice doxygen-style table for fields
17:41:42FromDiscord<tomck> i see, so what's the preferred way to document fields?
17:41:47FromDiscord<tomck> I'm following this https://nim-lang.org/docs/docgen.html#introduction-documentation-comments
17:42:29FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rL3
17:43:06FromDiscord<haxscramper> In reply to @tomck "i see, so what's": preferred way to document fields is to put documentation on fields
17:43:13FromDiscord<haxscramper> as you just did
17:43:58FromDiscord<tomck> right, but then the docs are wrapped really tiny by default in vim, or i guess i could put the doc after the field
17:44:18FromDiscord<haxscramper> haxdoc will put them in table for you, but right now you have to use nim doc with it's current output
17:44:47FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rL5
17:45:04FromDiscord<haxscramper> I haven't used them, but I just stick to `##` for fields
17:45:29FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rL6
17:45:39FromDiscord<haxscramper> And just wrap comments on 80 lines
17:46:01FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rL7
17:46:13FromDiscord<tomck> i can manually re-indent but that's super annoying
17:46:18FromDiscord<haxscramper> Do you use emacs?
17:46:40FromDiscord<tomck> actually wait, it's nim fmt that's doing that indentation, so i'm screwed regardless of editor
17:46:43FromDiscord<tomck> no, vim at the moment
17:46:58FromDiscord<tomck> but it's nim fmt that I just run when hte buffer saves
17:47:14FromDiscord<haxscramper> well, emacs does the same, but if I do wrapping while I'm on the second line of the comment it works fine
17:48:01FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rLa
17:48:07FromDiscord<haxscramper> It would wrap it correctly
17:48:12FromDiscord<tomck> hmmmm
17:48:44FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rLb
17:49:03FromDiscord<tomck> still a bit of a pain though
17:49:06FromDiscord<tomck> what's haxdoc?
17:49:26FromDiscord<haxscramper> my documentation generator
17:49:32FromDiscord<haxscramper> https://github.com/haxscramper/haxdoc
17:49:34fn<R2D299> itHub: 7"Documentation generator and source code analysis system for nim."
17:50:00FromDiscord<tomck> any benefits over nim doc?
17:50:03FromDiscord<haxscramper> well
17:50:30FromDiscord<haxscramper> In reply to @haxscramper "Works for whole project,": this
17:51:05FromDiscord<kaushalmodi> In reply to @haxscramper "this": Do you plan to add manpage or info exports?
17:51:15FromDiscord<haxscramper> it would be trivial so why not
17:51:22FromDiscord<haxscramper> Not planned but would be possible
17:51:35FromDiscord<haxscramper> well, I actually partially support manpage imports
17:51:37FromDiscord<kaushalmodi> In reply to @haxscramper "Not planned but would": I'd love love to have manpages for my CLI tools
17:52:07FromDiscord<kaushalmodi> Info is even better but unfortunately not everyone is aware of that format
17:52:08FromDiscord<haxscramper> generating manpages is very simple so I could easily add it
17:52:25FromDiscord<haxscramper> In reply to @kaushalmodi "Info is even better": Could do info as well
17:52:28FromDiscord<kaushalmodi> In reply to @haxscramper "generating manpages is very": How so? Do you rely on pandoc or something?
17:52:45FromDiscord<haxscramper> No, there is a `libmandoc` project that provides mandoc parser
17:53:06FromDiscord<haxscramper> My main use case is to port posix documentation for nim wrappers
17:53:16FromDiscord<haxscramper> but it could be used for anything else
17:53:34FromDiscord<haxscramper> https://mandoc.bsd.lv/libmandoc.html
17:54:02FromDiscord<kaushalmodi> In reply to @haxscramper "https://mandoc.bsd.lv/libmandoc.html": Noted. So the user will need to have that library installed.
17:54:22FromDiscord<haxscramper> well, no, it is such an abomination to build so I'm going to do it when installing
17:54:30FromDiscord<haxscramper> and it is statically linked as wel
17:55:34*supakeen quit (Remote host closed the connection)
17:55:36FromDiscord<haxscramper> actually I want to do nightly binary build for haxdoc because I can't be waiting for several minutes on CI each time
17:55:39FromDiscord<haxscramper> Just to build docs
17:55:57*supakeen joined #nim
17:59:22FromDiscord<timotheecour> In reply to @Bung "<@!427948629249228800> please check": i mean filing a bug in nim issue tracker
18:00:01FromDiscord<timotheecour> (edit) "In reply to @Bung "<@!427948629249228800> please check": i mean filing a bug in nim issue tracker ... " added "(and minimizing it further)"
18:00:06FromDiscord<timotheecour> (edit) "further)" => "further as other bugs are)"
18:06:07FromDiscord<Bung> ok
18:14:15*SebastianM quit (Quit: Bye)
18:14:34*Vladar quit (Read error: Connection reset by peer)
18:33:34FromDiscord<Ayy Lmao> I've been trying to make a macro that translates Nim code into Lua code. I have made progress, and it seems possible, but I was wondering if there is a better way. Is there some way to utilize what the Nim compiler does on the backend to compile to Lua as a backend?
18:44:42FromDiscord<tomck> depending on what you want, might be worth looking into compiling c -> lua, there's probably somethiing already out there
18:44:56FromDiscord<tomck> so you'd go nim -> c -> lua
18:45:19FromDiscord<tomck> obviously any FFI from nim -> lua will be a massive ballache & might break with compiler releases though (?)
18:48:01FromDiscord<Ayy Lmao> That's an interesting idea. I'll have to look into it. I basically want to write Lua scripts for this audio software called Reaper. I like Nim a lot so I'd rather write the scripts in Nim and translate them to Lua.
18:50:21FromDiscord<Ayy Lmao> Reaper also has its own scripting language that is absolutely horrid, but faster than Lua. I'm interested into compiling to that as well but that is certainly something I would have to write myself.
19:00:08FromDiscord<tomck> What are you doing with reaper scripts?
19:00:25FromDiscord<tomck> Is i tjust a UI plugin, like 'add menu button, when clicked open window X', etc?
19:00:45FromDiscord<tomck> or 'insert 4 tracks when C-S-t' is pressed?
19:01:06FromDiscord<tomck> if all you're doing is calling into reaper's API, you're probably going to have a horrible time of it in another lang
19:01:43FromDiscord<tomck> if you want to do some extra processing, like super-fast audio processing (in nim), then maybe best trying to compile nim to a .dll/.so then calling into that from lua if possible?
19:02:10FromDiscord<tomck> in my experience compiling between languages sucks & ends up being bad to use, although YMMV
19:02:55FromDiscord<Ayy Lmao> Pretty complicated stuff sometimes, like recently I made this script that opens a GUI window with a bunch of buttons in it that manage audio sends on different channels to a bunch of tracks. I also messed around before with making a full fledged pitch correction script which actually worked pretty well.
19:04:02FromDiscord<Ayy Lmao> In reply to @tomck "if you want to": I'm not sure if that's possible in Reaper but that would be really cool. I don't know if you are able to call external stuff
19:04:03FromDiscord<tomck> so are you actually doing audio processing, or is the bulk of the work interacting with reapers API to layout buttons, create sends, etc?
19:04:48FromDiscord<Ayy Lmao> The vast majority is interacting with the API, but with the pitch correction thing I had to do some audio processing, which I offloaded to the other scripting language Reaper has since it's faster
19:05:30FromDiscord<tomck> if 50% of the lines of code you write are calling into some reaper-specific function, is it actually worth using nim?↵↵If there's some complex audio processing that might be cool to compile from nim though, no idea how you could do it unfortunately, sorry!
19:06:44FromDiscord<Ayy Lmao> I meant the vast majority is calling reaper APIs instead of audio processing. The vast majority of the code is just raw logic in Lua, not API calls. The API calls are only to interact with Reaper.
19:07:35FromDiscord<Ayy Lmao> So basically like 95% of the code is just programming logic that could be done in Nim if I could just translate it to Lua.
19:08:42FromDiscord<Ayy Lmao> Like for instance you only have access to simple drawing functions like drawing rectangles and lines and such, so if you want to do a GUI you have to write all of the logic yourself.
19:11:59FromDiscord<haxscramper> In reply to @Ayy Lmao "I've been trying to": you can convert typed `PNode` to string,
19:13:03FromDiscord<Ayy Lmao> Is that something different than a NimNode?
19:13:09FromDiscord<haxscramper> `compileString` is a zero-setup starting point https://github.com/haxscramper/hnimast/blob/master/src/hnimast/compiler_aux.nim#L119
19:13:26FromDiscord<haxscramper> In reply to @Ayy Lmao "Is that something different": It is `PNode` at runtime, with full support for compiler infrastructure
19:13:40FromDiscord<haxscramper> But basically it is equivalent to `NimNode`
19:13:58FromDiscord<haxscramper> https://github.com/haxscramper/hnimast/blob/master/src/hnimast/compiler_aux.nim#L176
19:14:58FromDiscord<haxscramper> for simple lua compilation you can just pattern-match PNode and return types
19:15:04FromDiscord<Ayy Lmao> Does it have processing done to it that makes it palatable for other languages? Like for instance in lua you can't overload functions and certain expressions in Nim won't work
19:15:05FromDiscord<haxscramper> return lua code string
19:15:54FromDiscord<haxscramper> In reply to @Ayy Lmao "Does it have processing": yes, `compileString` returns semchecked code, so each function call is resolved to unique identifier. Then you can call `sighash()` on the symbol to get unique name
19:16:13FromDiscord<haxscramper> That's how nim basically generates code for C/Js targets that don'w allow overloading
19:16:37FromDiscord<haxscramper> You get `_jsadfjhasdfjaskjd` digest string - it is not pretty but does the job
19:17:25FromDiscord<Ayy Lmao> In reply to @haxscramper "You get `_jsadfjhasdfjaskjd` digest": I was doing that manually in the macro I was working on haha
19:17:40FromDiscord<haxscramper> macro has sighash available as well
19:18:03FromDiscord<Ayy Lmao> That's really cool though, sounds exactly like what I was looking for
19:18:39FromDiscord<Ayy Lmao> I have the framework for a Lua AST worked out already and it writes Lua code. I just need to get the Nim AST translated to it
19:59:14FromDiscord<Ayy Lmao> @haxscramper For whatever reason, I am getting `Error: undeclared identifier: 'SslError'` when trying to import `hnimast/compiler_aux`
19:59:41FromDiscord<haxscramper> `-d:ssl`
20:00:04FromDiscord<haxscramper> I need to finally fix this, it happens because I depend on nimble
20:00:09FromDiscord<haxscramper> Whoch requires this
20:00:18FromDiscord<haxscramper> (edit) "Whoch" => "Which"
20:00:38FromDiscord<Ayy Lmao> I've been trying `nimble run -d:ssl` and I still get the error
20:02:31FromDiscord<haxscramper> Seems like nimble incorrectly passes this to the compiler or something like that
20:02:45FromDiscord<haxscramper> Well, the ide is that you need to define 'ssl'
20:02:55FromDiscord<Ayy Lmao> I put a config.nims file with `switch("define", "ssl=true")` and it seems to work
20:03:10FromDiscord<haxscramper> Yes, that is a solution
20:13:40FromDiscord<konsumlamm> In reply to @haxscramper "Seems like nimble incorrectly": that's intentional
20:14:07FromDiscord<konsumlamm> In reply to @Ayy Lmao "I've been trying `nimble": `nimble run -- -d:ssl` should work as well
20:14:38FromDiscord<konsumlamm> `--` is for separating nimble args from compiler args
20:14:45FromDiscord<haxscramper> In reply to @konsumlamm "that's intentional": Intentional how?
20:14:48FromDiscord<dom96> `nimble -d:ssl run` might work too
20:15:07FromDiscord<haxscramper> In reply to @konsumlamm "`--` is for separating": Then it should error our on incorrect -d passed
20:15:14FromDiscord<dom96> after run it passes args to the executable it's running
20:15:20FromDiscord<dom96> (edit) "run" => "`run`"
20:16:18FromDiscord<konsumlamm> see also https://github.com/nim-lang/nimble/pull/896
20:17:36FromDiscord<dom96> unfortunately I think we might need to rethink: https://github.com/nim-lang/nimble/issues/923
20:17:56FromDiscord<konsumlamm> wait nvm
20:18:02FromDiscord<konsumlamm> i got it wrong
20:18:18FromDiscord<konsumlamm> the part after -- is for program arguments, not for compiler arguments
20:18:32FromDiscord<dom96> but personally I just use `nimble c -r ...` . It's consistent with `nim`
20:22:39fn<ForumUpdaterBot99> New thread by Mildred: Cannot make async futures work with the fidget GUI toolkit, see https://forum.nim-lang.org/t/8185
20:23:05FromDiscord<konsumlamm> In reply to @dom96 "unfortunately I think we": huh, i'll take a look
20:28:40fn<ForumUpdaterBot99> New thread by Mildred: Pragma to restrict procedure to main thread?, see https://forum.nim-lang.org/t/8186
20:30:32FromDiscord<TennisBowling> is compiling to c or c++ more recommended?
20:31:18FromDiscord<dom96> C
20:32:31fn<ForumUpdaterBot99> New post on r/nim by RattleyCooper: The nim-lang blog has jokes, see https://reddit.com/r/nim/comments/ociqiu/the_nimlang_blog_has_jokes/
20:38:55FromDiscord<kaushalmodi> In reply to @fn "<ForumUpdaterBot> New post on": Yeah, that's an unfortunate package name.
20:41:32FromDiscord<TennisBowling> In reply to @dom96 "C": ok
21:02:39FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3rLU
21:03:39FromDiscord<haxscramper> No, it just calls into compiler API. If you need additional configuration you can copy it's internal implementation and run the compiler
21:04:02FromDiscord<haxscramper> I could add define support though, it should be pretty easy.
21:05:28FromDiscord<Ayy Lmao> That would be awesome. Also, do you happen to know if there is some proc or something to automatically mangle the symbol names, or do I need to go through the node and do it manually?
21:06:40FromDiscord<Ayy Lmao> Or maybe I would just handle that when I transfer to the Lua AST
21:07:10FromDiscord<haxscramper> sighash
21:07:29FromDiscord<haxscramper> In reply to @haxscramper "yes, `compileString` returns semchecked": I was talking about it here
21:07:47FromDiscord<haxscramper> If you need prettier mangling you need to do it manually though
21:07:54FromDiscord<Ayy Lmao> Are you talking about in std/macros? Because I see ` signatureHash` and `symBodyHash` but no `sighash`
21:13:45FromDiscord<haxscramper> No, we are in compiler API right now, I'm talking about sighash in the compiler. It has to be somewhere in the compiler/? (Don't remember exact module, sorry)
21:14:29FromDiscord<haxscramper> Well, actually digging through the compiler is very annoying thing to do, but I can make a simple example on the PNode codegen tomorrow
21:15:00FromDiscord<haxscramper> Wanted to do something like that anyway
21:17:55FromDiscord<Ayy Lmao> In reply to @haxscramper "Well, actually digging through": That would be very helpful.
21:31:44FromDiscord<Ayy Lmao> It looks like it's in `compiler/sighashes.nim`
21:41:48*notchris quit (Ping timeout: 250 seconds)
21:48:27*notchris joined #nim
21:49:00*beshr joined #nim
21:49:01*beshr quit (Changing host)
21:49:01*beshr joined #nim
22:00:05FromDiscord<reilly> Would anything in NimGL let me run my own code on the GPU?
22:00:16FromDiscord<reilly> I doubt it, but it doesn't hurt to ask.
22:04:52FromDiscord<ElegantBeef> Shaders
22:05:05FromDiscord<ElegantBeef> You do know how a gpu works right? 😄
22:06:03FromDiscord<Jasmine and Don't Forget!~> Hi everyone! I just got a job
22:06:24FromDiscord<ElegantBeef> You typically just use opengl, vulkan, opencl, cuda or similar to run operations on the gpu, considering the last question you had, you dont need to use any other language you can transpile to Glsl, HLSL or similar
22:06:26FromDiscord<ElegantBeef> Congrats
22:06:43FromDiscord<Jasmine and Don't Forget!~> Thank you!
22:08:44FromDiscord<exelotl> yo nice!
22:09:54FromDiscord<ElegantBeef> In reply to @reilly "Would anything in NimGL": What do you mean by "own code" though
22:12:38FromDiscord<ElegantBeef> Cause if you're still on the path to wanting to use Nim as a gpu language you'd probably want to look into shader compilation to learn how to generate code from it, or transpile to the language you need like nimsl does
22:12:45FromDiscord<ElegantBeef> But anywho i'll shush
22:39:05*max22- quit (Remote host closed the connection)
22:53:50*stkrdknmibalz joined #nim
22:54:34FromDiscord<Bung> does the job allow you write nim in commpany's procs ?
22:54:54FromDiscord<Bung> (edit) "procs" => "projects"
23:06:09FromDiscord<ElegantBeef> If not you best quit 😛
23:13:43FromDiscord<Bung> lol
23:31:08*iortega quit (Remote host closed the connection)
23:32:16*beshr quit (Read error: Connection reset by peer)