02:03:41 | * | arkurious quit (Quit: Leaving) |
02:59:28 | FromDiscord | <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:00 | FromDiscord | <leorize> no |
03:06:17 | FromDiscord | <Bung> there's issue of big object I remenber ? |
03:08:03 | FromDiscord | <leorize> objects that are too big won't fit the stack |
03:08:14 | FromDiscord | <leorize> but you can then just make it a ref object |
03:08:27 | FromDiscord | <leorize> so I'd say that practically there aren't any limit |
03:09:05 | FromDiscord | <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:23 | FromDiscord | <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:21 | FromDiscord | <reilly> Has anyone created a higher-level way of getting data from an audio device, or am I stuck with libsoundio? |
04:23:53 | FromDiscord | <reilly> All I really need to do is check if the level is above a certain threshold on a given frame. |
04:23:59 | FromDiscord | <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:31 | fn | <ForumUpdaterBot99> New Nimble package! hyperscript - Create HyperText with Nim., see https://github.com/schneiderfelipe/hyperscript |
05:29:32 | fn | <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:05 | FromDiscord | <PressF> sent a code paste, see https://play.nim-lang.org/#ix=3rII |
08:00:37 | * | Clonkk[m] joined #nim |
08:01:00 | FromDiscord | <Rika> many people have asked this before |
08:01:01 | FromDiscord | <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:23 | FromDiscord | <Rika> there was a feature that allowed this before but it is now removed i believe |
08:01:57 | * | Vladar joined #nim |
08:07:25 | FromDiscord | <ElegantBeef> Yep syntax skin has been removed |
08:08:32 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3rIK |
08:08:53 | PMunch | I 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:21 | FromDiscord | <ElegantBeef> Well we can appease them, get the baseball bats 😛 |
08:09:40 | FromDiscord | <Rika> same opinion here pmunch |
08:10:17 | FromDiscord | <Rika> maybe it can be revived (but not officially supported) in the future |
08:10:20 | FromDiscord | <Rika> or something |
08:10:55 | PMunch | I mean I guess it could be done with a pre-processor.. |
08:11:07 | FromDiscord | <Rika> yes but >preprocessor |
08:11:25 | FromDiscord | <ElegantBeef> Someone was working on it, but i just dont think it's worth the effort |
08:11:34 | FromDiscord | <Rika> you'd need to reimplement the nim ast parser but with braces support? |
08:11:46 | FromDiscord | <Rika> since a `{}` doesnt simply map to a `:` |
08:12:09 | FromDiscord | <Rika> and you have to figure out how to distinguish braces blocks from braces initialiser syntax |
08:14:58 | FromDiscord | <Rika> theres just a lot of things to work on to make braces syntax work |
08:15:00 | FromDiscord | <Rika> but its doable |
08:15:11 | FromDiscord | <Rika> ~~C++ did it, they have list init. syntax after all~~ |
08:15:17 | FromDiscord | <Rika> C/C++ i mean |
08:15:25 | FromDiscord | <ElegantBeef> Just introduce `:{ }` 😛 |
08:15:45 | FromDiscord | <Rika> well i dont know |
08:15:48 | FromDiscord | <Rika> okay |
08:15:55 | FromDiscord | <Rika> i think the C++ comment i made doesnt really fit |
08:16:02 | FromDiscord | <Rika> because they dont have block expressions |
08:16:19 | FromDiscord | <Rika> so block expressions might clobber the braces init. syntax nim has |
08:16:54 | FromDiscord | <PressF> In reply to @ElegantBeef "If you hate yourself": We have LISP now 😅 |
08:17:32 | FromDiscord | <Rika> what about lisp? |
08:17:40 | FromDiscord | <Ondrejoda> <@&371760044473319454@sershsk8er has been attempting to scam me. Here is the screenshot. https://media.discordapp.net/attachments/371759389889003532/860434030390149120/scam.png |
08:17:42 | FromDiscord | <ElegantBeef> In response to using `()` |
08:18:07 | FromDiscord | <PressF> I'm asking because Nim let's you call things in so many different ways, that maybe one could also use {} |
08:18:20 | FromDiscord | <Rika> In reply to @Ondrejoda "<@&371760044473319454> I would like": yeah lots of those are being reported right now, see #offtopic |
08:18:29 | FromDiscord | <mikip0> @Vasla123 is a scam bot as well, id 860121877338652693 https://media.discordapp.net/attachments/371759389889003532/860434239824723978/unknown.png |
08:18:34 | FromDiscord | <PressF> In reply to @ElegantBeef "In response to using": Yep. I actually like LISP |
08:18:49 | FromDiscord | <Rika> ig |
08:18:56 | FromDiscord | <ElegantBeef> I think enabling `{}` is just.... terrible |
08:19:15 | FromDiscord | <ElegantBeef> But i do think the best way to do it would be using `:{}` or similar |
08:19:19 | FromDiscord | <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:29 | FromDiscord | <PressF> I also got one of those the other day @Ondrejoda. |
08:19:44 | FromDiscord | <ElegantBeef> Well it fragments the code into two groups especially if it's cross compilable |
08:19:58 | FromDiscord | <Rika> In reply to @ElegantBeef "Well it fragments the": just like camelCase and snake_case users? |
08:20:11 | FromDiscord | <ElegantBeef> Except in Nim's case those are the same |
08:20:25 | FromDiscord | <Rika> and why would it not be the same for braces' case? |
08:20:33 | FromDiscord | <Rika> (edit) "and why would it not be the same ... forbraces?" added "in the case" | "braces' case?" => "braces?" |
08:20:44 | FromDiscord | <ElegantBeef> Having yet another convention to maintain when PRing another persons library is just ugh to me |
08:20:56 | FromDiscord | <Rika> just like camel and snake? |
08:21:02 | FromDiscord | <ElegantBeef> another |
08:21:18 | FromDiscord | <Rika> you only have like what, two conventions to take mind of right now |
08:21:24 | FromDiscord | <Rika> mcs and case |
08:21:44 | FromDiscord | <Rika> and its not hard to deny braces (its really easy to spot) in comparison to mcs |
08:21:47 | FromDiscord | <ElegantBeef> Constants, enums |
08:21:51 | FromDiscord | <PressF> In reply to @Rika "you only have like": Mcs are macros? |
08:21:59 | FromDiscord | <ElegantBeef> method call syntax |
08:22:01 | FromDiscord | <Rika> beef hit em with the explanation |
08:22:10 | FromDiscord | <PressF> In reply to @ElegantBeef "method call syntax": Makes Sense |
08:22:18 | FromDiscord | <ElegantBeef> The thing that lets us use procedures like methods in OOP |
08:22:27 | FromDiscord | <Rika> constants? wdym, like casing for constants? |
08:22:31 | FromDiscord | <ElegantBeef> Yep |
08:22:39 | FromDiscord | <Rika> that falls under casing... |
08:22:52 | FromDiscord | <ElegantBeef> I'm partially playing a game here |
08:22:55 | FromDiscord | <ElegantBeef> So blame that |
08:23:07 | FromDiscord | <ElegantBeef> really blame me |
08:23:08 | FromDiscord | <PressF> I actually like having different ways to call methods/procs. It's useful in some cases |
08:23:23 | FromDiscord | <ElegantBeef> Yes it enables great things |
08:23:31 | * | Helios quit (Quit: Client limit exceeded: 20000) |
08:23:46 | FromDiscord | <PressF> I'm not a big fan of the casing tho |
08:23:52 | FromDiscord | <Rika> why> |
08:23:54 | FromDiscord | <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:17 | FromDiscord | <ElegantBeef> can change meaning it has an easy way to convert to/from |
08:24:18 | FromDiscord | <Rika> well braces syntax is out of the question for official support |
08:24:29 | FromDiscord | <ElegantBeef> Yes |
08:24:49 | * | nixfreak_nim[m] joined #nim |
08:25:22 | FromDiscord | <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:45 | FromDiscord | <ElegantBeef> how does casing change that? |
08:25:48 | FromDiscord | <ElegantBeef> MCS changes that |
08:25:52 | * | happycorsair[m] joined #nim |
08:25:53 | FromDiscord | <PressF> I just haven't wrapped my head around it |
08:25:56 | FromDiscord | <Rika> In reply to @PressF "Makes it hard to": that is not the fault of the flexibility |
08:26:08 | FromDiscord | <Rika> i can say the same if braces+indent was allowed |
08:26:10 | FromDiscord | <Rika> and mcs |
08:26:48 | FromDiscord | <Rika> like if someone be like "echo 91283, avar, etc" on one line then fuckin "myvar.echo()" on the other |
08:26:53 | FromDiscord | <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:11 | FromDiscord | <PressF> In reply to @Rika "like if someone be": I guess I haven't saw that yet haha |
08:27:25 | FromDiscord | <ElegantBeef> The issue isnt flexibillity it's how people use it |
08:27:26 | FromDiscord | <Rika> hahahahahhahahahahahahahahahahahahahahahahahahhahaa |
08:27:47 | FromDiscord | <ElegantBeef> Nim's case insensitivity is lovely |
08:28:04 | FromDiscord | <ElegantBeef> Like i dont see why people thing "If i write a symbol like X it has to be used like X" |
08:28:26 | FromDiscord | <ElegantBeef> I've been toying with opengl and i absolutely hate all cap constants and guess what uses them 😛 |
08:28:36 | FromDiscord | <Rika> well the issue is that people think everyone else has no discipline |
08:29:00 | FromDiscord | <ElegantBeef> In any other language i'd have to make aliases for all of them to sane names |
08:29:21 | FromDiscord | <Rika> ~~if you even can~~ |
08:29:37 | FromDiscord | <ElegantBeef> The people that dont have discipline are the same people that you dont want to use their code anyway |
08:29:50 | FromDiscord | <ElegantBeef> shit did i say that outloud |
08:29:57 | FromDiscord | <Rika> w |
08:30:55 | FromDiscord | <ElegantBeef> Slight joke, but it's the same thing with any language and features that can be misued |
08:31:16 | FromDiscord | <Rika> well yeah |
08:31:17 | FromDiscord | <ElegantBeef> C# properties for instance often get full of expensive operations |
08:31:25 | FromDiscord | <Rika> ~~rust unsafe wwwwwwwwwwww~~ |
08:31:34 | FromDiscord | <Rika> megamemes |
08:31:36 | FromDiscord | <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:23 | FromDiscord | <Rika> i respect rust though |
08:32:33 | FromDiscord | <Rika> what i dont respect are the evangelists xd |
08:32:50 | FromDiscord | <ElegantBeef> You dont like the holier than thou attitudes? |
08:33:51 | FromDiscord | <ElegantBeef> @PressF i do have to ask what are your biggest reason(s) for wanting `{}` |
08:33:55 | * | Clonkk[m] joined #nim |
08:34:26 | FromDiscord | <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:40 | FromDiscord | <ElegantBeef> How does it look better? 😄 |
08:34:49 | FromDiscord | <PressF> It's easiest to see where code blocks start and end |
08:34:52 | FromDiscord | <Rika> beef do you know what "opinions" are |
08:35:02 | FromDiscord | <Rika> let em be |
08:35:14 | FromDiscord | <ElegantBeef> Oh i do but i was confused in this regard of what "looked better" |
08:35:20 | FromDiscord | <ElegantBeef> Cause overall it's the same indented code 😄 |
08:35:42 | FromDiscord | <Rika> people think (and therefore read code)↵ differently |
08:35:43 | FromDiscord | <Rika> (edit) "code)↵" => "code)" |
08:35:51 | FromDiscord | <Rika> no there was no line break there |
08:35:55 | FromDiscord | <Rika> you saw no line break |
08:36:04 | FromDiscord | <TheBiggestNubThun> sent a long message, see http://ix.io/3rIN |
08:36:05 | FromDiscord | <ElegantBeef> Well i mean it's not code looking better, it's just they can more easily see the deliminations |
08:36:36 | FromDiscord | <Rika> and that can mean it looks better to them |
08:36:59 | FromDiscord | <Rika> In reply to @TheBiggestNubThun "Hi all! I've been": nothing looks wrong but this is not async, this is still synchronous |
08:37:37 | FromDiscord | <TheBiggestNubThun> I know it is synchronous, it is just to simplify the code |
08:38:06 | FromDiscord | <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:39 | FromDiscord | <Rika> how are you measuring memory? |
08:38:56 | FromDiscord | <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:55 | FromDiscord | <TheBiggestNubThun> I'm running it inside a docker container, and looking at docker stats |
08:41:35 | FromDiscord | <TheBiggestNubThun> which would be similar to htop I guess |
08:43:30 | FromDiscord | <Rika> what nim version |
08:44:12 | FromDiscord | <TheBiggestNubThun> 1.4.6 |
08:45:27 | FromDiscord | <Rika> i dont seem to see the same behavior, how long did you run it for |
08:46:01 | FromDiscord | <TheBiggestNubThun> You can use a bigger website, like google.com, and you'll see it rising faster |
08:46:20 | FromDiscord | <TheBiggestNubThun> 2 mins is enough to see it rising |
08:46:23 | FromDiscord | <Rika> ok |
08:48:02 | FromDiscord | <TheBiggestNubThun> I'll try Nim 1.4.8 and report back |
08:48:37 | FromDiscord | <ElegantBeef> It grows a bit initially then holds steady |
08:49:20 | FromDiscord | <ElegantBeef> Yea using the google example it holds steady at 5.1MB |
08:49:54 | FromDiscord | <TheBiggestNubThun> I'm using Alpine linux, maybe it is something especial of that OS |
08:49:59 | * | max22- joined #nim |
08:50:07 | FromDiscord | <Rika> what compile flags are you using |
08:50:21 | FromDiscord | <TheBiggestNubThun> -d:release -d:ssl |
08:50:53 | FromDiscord | <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:41 | FromDiscord | <ElegantBeef> Were you by anychance using arc? |
08:51:42 | FromDiscord | <Rika> actually danger might be fucking with massif, ill use debug |
08:51:45 | FromDiscord | <Rika> no |
08:51:50 | FromDiscord | <ElegantBeef> Not you, them |
08:51:51 | FromDiscord | <Rika> all the flags were as i listed |
08:51:58 | FromDiscord | <Rika> smh ok 😦 |
08:52:03 | FromDiscord | <Rika> 😛 |
08:52:13 | FromDiscord | <ElegantBeef> Cause with arc i'm up to 20MB 😄 |
08:53:00 | FromDiscord | <TheBiggestNubThun> hmm, so what are the standard flags to use for the compiler? |
08:53:04 | FromDiscord | <ElegantBeef> Orc holds steady at 1.7MB |
08:53:25 | FromDiscord | <Rika> async is cyclic so arc going up is normal |
08:53:27 | FromDiscord | <TheBiggestNubThun> I know Nim can use several Gcs |
08:53:35 | FromDiscord | <TheBiggestNubThun> (edit) "Gcs" => "GCs" |
08:53:40 | FromDiscord | <ElegantBeef> A program build default is `--gc:refc` and `-d:debug` |
08:53:47 | FromDiscord | <ElegantBeef> Yea i figured as much |
08:54:09 | FromDiscord | <ElegantBeef> The only thing i can figure is as they said alpine is off or they accidently build with arc |
08:54:29 | FromDiscord | <ElegantBeef> Cause yea with refc held solid at 5.1 and orc holding solid at 1.7 |
08:54:49 | FromDiscord | <Rika> bet its alpine 😛 |
08:56:01 | FromDiscord | <TheBiggestNubThun> Oh, something I forgot to mention is that I use nimble to build |
08:56:10 | FromDiscord | <TheBiggestNubThun> So nimble -d:release -d:ssl |
08:56:12 | FromDiscord | <ElegantBeef> Doesnt change anything |
08:56:17 | FromDiscord | <TheBiggestNubThun> (edit) "So nimble ... -d:release" added "build" |
08:56:25 | FromDiscord | <Rika> should be pm. the same with nimble |
08:56:44 | FromDiscord | <ElegantBeef> If you arent changing the gc in a config or manually then it's not Nim causing the issue 😄 |
08:57:03 | FromDiscord | <Rika> or maybe it is and you found a new bug |
08:57:05 | FromDiscord | <TheBiggestNubThun> it could be alpine.. I'll try 1.4.8 and then a non-alpine |
08:57:14 | FromDiscord | <ElegantBeef> True it could be a nim bug |
08:57:15 | FromDiscord | <Zachary Carter> In reply to @Ondrejoda "<@&371760044473319454> I would like": they're banned |
08:57:28 | FromDiscord | <ElegantBeef> But there are already 1900 issues do we need another one 😛 (Yes we do) |
09:06:38 | * | Clonkk[m] joined #nim |
09:10:02 | FromDiscord | <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:20 | FromDiscord | <TheBiggestNubThun> Thank you guys, sorry for the noobie question |
09:11:35 | FromDiscord | <ElegantBeef> It's fine, questions are better than running from nim cause it "didnt" fit your needs |
09:12:41 | FromDiscord | <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:05 | FromDiscord | <ElegantBeef> Well there are bearssl bindings if that interests you 😄 |
09:14:14 | FromDiscord | <Ondrejoda> In reply to @Zachary Carter "they're banned": thanks |
09:14:32 | FromDiscord | <TheBiggestNubThun> I'm too noob to use the raw library 😋 |
09:15:41 | FromDiscord | <TheBiggestNubThun> I'm a C#/Java/Python kind of guy, I'm interested in C, but life is too short |
09:32:48 | FromDiscord | <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:29 | FromDiscord | <arnetheduck> `chronos` also fixes some memory usage issues found in `asyncdispatch` but certainly not all |
09:34:31 | FromDiscord | <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:59 | FromDiscord | <SpiderDave> do something about the spambots here, bye |
11:13:31 | FromDiscord | <Vindaar> ❤️ people like that |
11:20:40 | FromDiscord | <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:35 | PMunch | Is there an RFC for allowing an `else` block to be passed to a macro? |
11:54:47 | PMunch | I 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:23 | FromDiscord | <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:32 | FromDiscord | <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:32 | PMunch | Hmm, 49 tests failing isn't great |
12:07:42 | PMunch | Oh right, it doesn't support 1.0.0 yet.. |
12:07:52 | FromDiscord | <kaushalmodi> Yep |
12:08:03 | PMunch | But that's great! Makes it much easier to update while making sure we don't break anything |
12:08:36 | FromDiscord | <kaushalmodi> Many tests are from same categories line inline tables, control char invalid checks, etc |
12:09:55 | FromDiscord | <madman> sent a code paste, see https://play.nim-lang.org/#ix=3rJL |
12:10:12 | PMunch | @madman, yup |
12:10:30 | PMunch | Can't have recursion without references, because it would be infinite |
12:10:35 | FromDiscord | <madman> should i seperate into two types? |
12:10:39 | FromDiscord | <kaushalmodi> sent a code paste, see https://play.nim-lang.org/#ix=3rJM |
12:11:05 | FromDiscord | <konsumlamm> no need to |
12:11:12 | FromDiscord | <madman> In reply to @kaushalmodi "You can make that": cool! why does it work though |
12:11:19 | FromDiscord | <Rika> if you want stack root nodes but ref other nodes yeah] |
12:11:29 | PMunch | Because now it is a reference object |
12:11:33 | FromDiscord | <Rika> because refs make the size constant (pointer size) |
12:11:38 | FromDiscord | <madman> aha |
12:11:44 | FromDiscord | <Rika> instead of infinite |
12:11:54 | FromDiscord | <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:02 | FromDiscord | <Rika> to make a type you need the size of every other field |
12:12:13 | FromDiscord | <Rika> what's the size of a box when it has itself in it? we dont know |
12:12:24 | PMunch | If you want your first node to not be a ref object you can have one Node type and one NodeRef type |
12:12:58 | FromDiscord | <madman> okay |
12:14:27 | FromDiscord | <madman> sent a code paste, see https://play.nim-lang.org/#ix=3rJN |
12:14:47 | FromDiscord | <Rika> that means you read a `nil` reference |
12:15:01 | FromDiscord | <Rika> you need to check for whether the child is `nil` now |
12:15:12 | FromDiscord | <Rika> oh, rather parent i think |
12:15:14 | FromDiscord | <madman> ok i see |
12:15:23 | FromDiscord | <madman> so now it's on the heap |
12:15:27 | FromDiscord | <Rika> something there is nil and i dont know which exactly |
12:15:28 | FromDiscord | <Rika> yesh |
12:15:31 | FromDiscord | <Rika> yes |
12:15:41 | PMunch | Or make sure your code can't end up in a nil scenario |
12:15:50 | FromDiscord | <Rika> or that too yes |
12:16:04 | FromDiscord | <madman> okay ill have a closer look |
12:16:10 | FromDiscord | <madman> i wanted to stay on the stack :P |
12:16:22 | PMunch | No you don't.. |
12:16:23 | PMunch | Trust me |
12:16:27 | FromDiscord | <madman> hahaha |
12:16:28 | FromDiscord | <madman> ok |
12:16:44 | PMunch | You don't want to store a large tree structure on the stack and copy that thing around |
12:16:48 | FromDiscord | <madman> thanks guys :nimRawr: |
12:17:32 | FromDiscord | <madman> hmm yeah i quite a few nodes now and the tree must be getting quite fat |
12:17:39 | PMunch | I 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:02 | FromDiscord | <madman> lol |
12:18:12 | FromDiscord | <madman> there is one by Goran |
12:18:20 | FromDiscord | <madman> idk if that's the name |
12:18:42 | FromDiscord | <Clonkk> In reply to @PMunch "I keep thinking I": So like http://ssalewski.de/nimprogramming.html ? |
12:18:45 | * | arkurious joined #nim |
12:18:57 | FromDiscord | <madman> ah yes that's it |
12:19:12 | PMunch | Yeah I guess :P |
12:19:13 | FromDiscord | <Clonkk> It's a good book |
12:19:29 | PMunch | Haven't read it though.. |
12:20:07 | FromDiscord | <madman> i usually work on the stack ok manually `alloc0`, didnt play much with `ref` like ever |
12:20:42 | FromDiscord | <Rika> wow thats hardcore, but alloc0 is still on heap |
12:20:49 | FromDiscord | <madman> yep |
12:20:57 | PMunch | Nim automatically puts stuff on the heap for you though |
12:21:08 | FromDiscord | <madman> yeah with ref |
12:21:11 | PMunch | I see you have a seq in there for example, that's on the heap |
12:21:13 | FromDiscord | <Rika> not even just with ref |
12:21:22 | PMunch | Ever used a string? Probably on the heap |
12:21:29 | FromDiscord | <Rika> totally on the heap |
12:21:29 | FromDiscord | <madman> yes nim does a lot of hidden allocations |
12:21:45 | FromDiscord | <Rika> unless you're fucking around with embedded then its prolly not heap |
12:21:52 | PMunch | Well, it does quite few allocations as it keeps a memory pool, but yeah |
12:22:55 | FromDiscord | <madman> i usually do `var item = cast[ptr item](alloc0(sizeof(item)3))` |
12:23:00 | FromDiscord | <Rika> well ig dont worry too much about performance until you actually are starting to have performance issues |
12:23:07 | PMunch | @madman, why? |
12:23:15 | FromDiscord | <Clonkk> You know the golden rule of programming |
12:23:15 | FromDiscord | <Rika> oh take a look at the `create` proc |
12:23:23 | FromDiscord | <Clonkk> First make it work, then make it pretty, then make it fast |
12:23:43 | FromDiscord | <Rika> i usually try to make it pretty while making it work at the same time |
12:23:46 | FromDiscord | <madman> gotta go fast :sanic: |
12:23:56 | FromDiscord | <Rika> otherwise bugs could be hidden in the code |
12:24:13 | FromDiscord | <madman> honestly this is not even some real-time thing, i dont care about perf at all |
12:24:24 | FromDiscord | <Rika> then why bother |
12:24:28 | FromDiscord | <Clonkk> Real time is about determinism not performance though :p |
12:24:30 | FromDiscord | <Rika> you're wasting your time lol |
12:24:46 | FromDiscord | <madman> yes exactly thats why imma attempt to use ref |
12:25:14 | FromDiscord | <madman> In reply to @SneakyBaguette "Real time is about": i was talking in the context of real-time 3d rendering for example |
12:25:49 | FromDiscord | <madman> are we talking about the same real-time |
12:25:59 | FromDiscord | <Clonkk> Haha sorry I was being pedantic for no reason |
12:26:13 | FromDiscord | <madman> haha i like pedantic |
12:26:37 | FromDiscord | <Rika> -pedantic-errors |
12:27:01 | PMunch | TBH 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:02 | FromDiscord | <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:24 | FromDiscord | <Rika> exceptthataudioistechnicallyrealtimejustnothardrealtime |
12:27:29 | PMunch | Not 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:53 | FromDiscord | <madman> In reply to @SneakyBaguette "Basically you have "real-time"": ah yes, hard real-time vs soft real-time ( i guess) |
12:27:55 | FromDiscord | <Rika> then you see people trying to do "branch free programming" in python |
12:27:59 | FromDiscord | <madman> In reply to @PMunch "TBH if you tried": oh i bet it will |
12:28:12 | PMunch | @Rika, haha exactly |
12:28:30 | FromDiscord | <Clonkk> In reply to @x19 "ah yes, hard real-time": Yeah basically |
12:29:10 | FromDiscord | <madman> nim is suited for both right? |
12:29:50 | FromDiscord | <Clonkk> Nim can be deteministic with --gc:arc or no gc |
12:30:03 | FromDiscord | <Rika> it is recommended to use arc |
12:30:30 | FromDiscord | <Rika> you are limited to a subset of the language if you use no gc |
12:30:38 | FromDiscord | <Rika> (well, "limited") |
12:30:42 | FromDiscord | <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:04 | FromDiscord | <Clonkk> That's hard real-time |
12:31:27 | FromDiscord | <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:28 | FromDiscord | <Clonkk> Soft real-time is "the mean of your executions time must be within this range" |
12:31:33 | FromDiscord | <Rika> a gc would add possible "lag: |
12:31:43 | FromDiscord | <Rika> like when it collects or moves stuff up a generation |
12:32:05 | FromDiscord | <Clonkk> Like stop-the-world gc used to be (not sure if they are used anymore) in Java |
12:32:06 | FromDiscord | <Rika> well, a traditional gc at least would do that |
12:32:18 | FromDiscord | <Rika> arc is more akin to rust's garbage collection scheme |
12:32:29 | FromDiscord | <Rika> not just stop the world gcs, pretty much any gc |
12:32:35 | FromDiscord | <madman> yeah the move semantics thanks to smart compiler injections |
12:33:07 | FromDiscord | <konsumlamm> ~~Rust doesn't have a garbage collection scheme~~ |
12:33:08 | FromDiscord | <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:40 | FromDiscord | <madman> In reply to @konsumlamm "~~Rust doesn't have a": true, and in that case arc is not a GC ? 🤷♂️ |
12:33:40 | FromDiscord | <Rika> i thought we stopped being pedantic? |
12:33:55 | FromDiscord | <Clonkk> In reply to @x19 "true, and in that": Depends how you define gc |
12:33:58 | FromDiscord | <madman> i dont really understand GCs details much, spent time learning manual memory |
12:34:07 | FromDiscord | <konsumlamm> also, arc may leak memory if you have ref cycles, so i'd use orc (which includes a cycle collector) instead |
12:34:17 | FromDiscord | <Rika> thats if you do not need determinism |
12:34:21 | FromDiscord | <madman> but orc is less deterministic |
12:34:21 | FromDiscord | <konsumlamm> In reply to @x19 "true, and in that": those two things don't have anything to do with each other |
12:34:29 | FromDiscord | <Rika> we were discussing a theoretical deterministic application |
12:35:01 | FromDiscord | <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:20 | PMunch | It would be cool if we could run a program with ORC and have it output if it ever collected a cycle |
12:35:33 | FromDiscord | <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:41 | FromDiscord | <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:46 | PMunch | Can you run ORC and then disable the automatic collection and trigger it manually like with the normal GC? |
12:35:53 | FromDiscord | <Rika> ARC doesnt mean auto ref count |
12:36:10 | FromDiscord | <madman> In reply to @Rika "ARC doesnt mean auto": my whole life is a lie |
12:36:19 | FromDiscord | <Rika> ARC in nim doesnt mean auto ref count |
12:36:21 | FromDiscord | <Clonkk> (edit) "GC" => "~~GC" | "failure" => "failure~~" |
12:36:22 | FromDiscord | <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:37 | FromDiscord | <haxscramper> In reply to @PMunch "It would be cool": someone was asking about this feature |
12:36:40 | FromDiscord | <Rika> i didnt mention rust's Arc |
12:36:47 | FromDiscord | <konsumlamm> but madman did |
12:36:48 | FromDiscord | <haxscramper> and I think they've implemented in in some form |
12:36:51 | FromDiscord | <Rika> ah i see |
12:36:52 | FromDiscord | <Rika> okay |
12:36:54 | FromDiscord | <Rika> understood |
12:36:56 | FromDiscord | <Rika> my mistake |
12:37:16 | FromDiscord | <Rika> man maybe we should rename arc |
12:37:24 | FromDiscord | <Rika> its kinda confusing to talk about multiple languages |
12:37:38 | FromDiscord | <madman> so what does arc stand for |
12:37:41 | FromDiscord | <madman> or its just a name |
12:37:45 | FromDiscord | <madman> :P |
12:37:52 | FromDiscord | <haxscramper> call it `orcarc` |
12:38:04 | FromDiscord | <Rika> in nim i think arq said it meant "ar\q's ref counting" or something |
12:38:06 | PMunch | Aristocratic Reference Counting |
12:38:09 | FromDiscord | <madman> i totally thought it was automatic ref counting |
12:38:10 | FromDiscord | <konsumlamm> advanced really cool GC |
12:38:24 | FromDiscord | <madman> lmao |
12:38:27 | PMunch | That's why Nim has a crown, because the ARC GC is royal |
12:38:34 | FromDiscord | <Rika> In reply to @haxscramper "call it `orcarc`": aorc |
12:38:36 | FromDiscord | <Rika> xd |
12:38:41 | FromDiscord | <madman> the one gc to rule them all |
12:39:15 | FromDiscord | <madman> i would like to appreciate GCs more, maybe i should try to impl a silly one |
12:39:35 | FromDiscord | <haxscramper> I've found five nimble packages that have explicit `exec("rm")` |
12:39:39 | FromDiscord | <haxscramper> `rm ...` |
12:39:43 | FromDiscord | <Rika> what does it rm? |
12:40:06 | FromDiscord | <haxscramper> well, I will check in more detail now, but probably some internal build styff |
12:40:28 | FromDiscord | <haxscramper> I'm just checking what is going on in people's `.nimble` files right now |
12:40:37 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/TQI |
12:40:39 | FromDiscord | <haxscramper> ^ Most used `exec` commands |
12:41:03 | FromDiscord | <haxscramper> `$cmd` means `exec(cmd)` has been used - I don't track variable values now |
12:41:39 | FromDiscord | <Rika> > python 1 |
12:41:43 | FromDiscord | <Rika> we have found the traitor |
12:43:00 | FromDiscord | <ajusa> > node↵> bash |
12:43:52 | FromDiscord | <haxscramper> Though it doesn't seem entirely accurate, some things are clearly missing |
12:44:29 | FromDiscord | <haxscramper> I don't believe there was no `git` uses |
12:52:09 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rJT |
12:52:14 | FromDiscord | <haxscramper> 1.3k execs for nim, |
12:52:18 | FromDiscord | <Rika> `true` |
12:52:19 | FromDiscord | <Rika> lol |
12:52:25 | FromDiscord | <haxscramper> Total of `2.2k` execs |
12:52:30 | FromDiscord | <haxscramper> (edit) "`2.2k`" => "`2.3k`" |
12:52:33 | FromDiscord | <Rika> where's python now lol |
12:53:11 | FromDiscord | <haxscramper> L |
12:53:15 | FromDiscord | <haxscramper> https://pastebin.com/Lt7Juxxk |
12:53:31 | FromDiscord | <haxscramper> No more `python1` |
13:05:19 | FromDiscord | <gerwy> is monotimes deprecated? because i can't import it |
13:05:28 | FromDiscord | <gerwy> (edit) "monotimes" => "`monotimes`" |
13:05:49 | FromDiscord | <Bung> add std prefix needed ? |
13:05:56 | FromDiscord | <gerwy> ooooh yeah i noticed it just now |
13:06:00 | FromDiscord | <gerwy> why its like this? |
13:06:23 | FromDiscord | <haxscramper> new modules use `std/` prefix |
13:06:27 | FromDiscord | <haxscramper> always use `std/` prefix |
13:08:20 | FromDiscord | <Bung> module changes many thing that can't compatible with old nim I think |
13:08:48 | FromDiscord | <haxscramper> no, it's because new modules use std prefix |
13:08:52 | * | Clonkk[m] left #nim (#nim) |
13:09:00 | FromDiscord | <Bung> so old version import without prefix |
13:09:45 | FromDiscord | <Bung> that's true ? I see some need prefix , some not. |
13:10:19 | FromDiscord | <haxscramper> because it works without prefix for some modules |
13:10:27 | FromDiscord | <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:28 | FromDiscord | <haxscramper> But you should use `std/` prefix |
13:11:01 | FromDiscord | <konsumlamm> if you always use `std/`, you can't accidentally forget it for modules that actually need it |
13:11:41 | FromDiscord | <konsumlamm> and eventially it might necessary to use `std/` |
13:11:51 | FromDiscord | <Bung> okay , atleast we can just look imports know it use new version nim. |
13:11:54 | FromDiscord | <Clonkk> Yeah I think the plan is eventually to have all module as ``std/`` |
13:12:07 | FromDiscord | <Clonkk> Which is reasonable imo |
13:12:08 | FromDiscord | <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:51 | FromDiscord | <konsumlamm> because it's a better idea to prefix them |
13:12:58 | FromDiscord | <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:00 | FromDiscord | <konsumlamm> it just took a while to realize that apparently |
13:13:11 | FromDiscord | <haxscramper> Instead of having some special toplevel `tables` |
13:13:13 | FromDiscord | <konsumlamm> so old modules use old conventions |
13:13:25 | FromDiscord | <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:47 | FromDiscord | <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:57 | FromDiscord | <Bung> this allow use have a local file named `monotimes.nim` |
13:16:00 | FromDiscord | <haxscramper> What does `reFilesDiffer` mean in testament? And I"m still having trouble with just running example from documentation |
13:16:10 | FromDiscord | <haxscramper> In reply to @haxscramper "What does `Failure: reNimcCrash`": This one |
13:16:21 | FromDiscord | <haxscramper> I'm testing↵``nim |
13:16:21 | FromDiscord | <haxscramper> discard """↵ errormsg: ""↵"""↵echo 12 |
13:16:33 | FromDiscord | <Clonkk> Hmm ? https://forum.nim-lang.org/t/6999 |
13:16:40 | FromDiscord | <Clonkk> I had a similar error maybe it's related |
13:16:44 | FromDiscord | <haxscramper> (edit) "discard """↵ errormsg: ""↵"""↵echo 12" => "sent a code paste, see https://play.nim-lang.org/#ix=3rK1" |
13:17:05 | FromDiscord | <Clonkk> It was basically having disabled ``--hints:off`` |
13:17:11 | FromDiscord | <Clonkk> (edit) "disabled" => "" |
13:17:13 | FromDiscord | <haxscramper> Well running `nim c` manually wo |
13:17:20 | FromDiscord | <haxscramper> Ah, `--hints:off` should be enabled? |
13:17:34 | * | fn quit (Remote host closed the connection) |
13:18:02 | FromDiscord | <Clonkk> Testament will fail you have ``--hints:off`` , ``--verbosity:0`` or ``--outdir:...`` |
13:19:03 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rK2 |
13:19:04 | FromDiscord | <Clonkk> sent a code paste, see https://paste.rs/3tv |
13:19:06 | * | fn joined #nim |
13:19:09 | FromDiscord | <Clonkk> Well probably not that then |
13:20:01 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rK3 |
13:20:07 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/1Ti |
13:20:11 | * | Vladar quit (Quit: Leaving) |
13:20:18 | FromDiscord | <Clonkk> Ah yes |
13:20:26 | FromDiscord | <Clonkk> Error message must come from the correct files |
13:20:43 | FromDiscord | <Clonkk> I had this issue when I refactored some norm unit test with testamament |
13:20:45 | FromDiscord | <Clonkk> https://github.com/moigagoo/norm |
13:20:47 | fn | <R2D299> itHub: 7"A Nim ORM" |
13:20:56 | FromDiscord | <haxscramper> alright now it works, thanks a lot |
13:21:01 | FromDiscord | <haxscramper> undocumented crap |
13:21:47 | FromDiscord | <Clonkk> So expecting error message specified in an error pragma in your source file in a test.nim run with testament fail |
13:22:46 | FromDiscord | <haxscramper> Alright, I see now |
13:23:31 | FromDiscord | <Clonkk> sent a code paste, see https://play.nim-lang.org/#ix=3rK4 |
13:30:38 | FromDiscord | <Bung> @timotheecour `could not load: libnimrtl.dylib` I updated latest devel , compile my theme get this error |
13:31:45 | FromDiscord | <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:37 | FromDiscord | <haxscramper> Default `nimble test` handles dependency paths, what about custom one? |
13:34:24 | FromDiscord | <Clonkk> Eh, not sure. I want to say yes, because clearly the CI of Norm works |
13:36:01 | FromDiscord | <haxscramper> In CI it only installs required dependencies, so due to `--nimblePath` it does the right thing. |
13:37:02 | FromDiscord | <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:53 | FromDiscord | <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:28 | FromDiscord | <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:50 | FromDiscord | <Clonkk> Should be easy enough to check, no ? |
13:45:36 | FromDiscord | <haxscramper> I checked, it doesn't pass nimble paths |
13:46:04 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rKb |
13:46:30 | FromDiscord | <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:48 | FromDiscord | <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:53 | FromDiscord | <Rika> Essentially |
14:14:35 | FromDiscord | <gerwy> oh okay |
14:14:58 | FromDiscord | <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:22 | FromDiscord | <Rika> If you want the total used by the whole program there are many tools for that |
14:17:05 | FromDiscord | <gerwy> i can just look it up on htop? It shows memory usage right? |
14:18:30 | FromDiscord | <gerwy> hmm okay it isn't as bad as i thought |
14:19:35 | FromDiscord | <madman> sent a code paste, see https://play.nim-lang.org/#ix=3rKj |
14:21:58 | FromDiscord | <konsumlamm> it's a seq of `nil`s |
14:22:21 | FromDiscord | <konsumlamm> you didn't initialize any elements, so the default value is used |
14:22:52 | FromDiscord | <madman> oh i thought the `newSeq` proc creates the data |
14:24:03 | FromDiscord | <konsumlamm> wdym? |
14:24:55 | FromDiscord | <haxscramper> newSeqWith will populate resulting sequence |
14:25:47 | FromDiscord | <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:14 | FromDiscord | <Hi02Hi> In reply to @PMunch "It would be cool": found the conv. |
14:43:39 | FromDiscord | <Hi02Hi> In reply to @Hi02Hi "i actually think that": here was the result |
14:45:18 | PMunch | Oh the [GC] cycle collections will track when ORC was used? |
14:45:23 | PMunch | That's nifty |
14:46:06 | PMunch | Oh 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:20 | FromDiscord | <treeform> In reply to @mst "right, my plan is": That would be great. I asked for this too. |
16:00:28 | FromDiscord | <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:15 | FromDiscord | <timotheecour> (edit) "compiler rtl," => "compile rtl (and set LD_LIBRARY_PATH or rpath etc)," |
16:10:55 | FromDiscord | <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:06 | FromDiscord | <Rika> damn 6 hours for 10k sloc thats p quick imo |
16:13:06 | FromDiscord | <kaushalmodi> sent a long message, see http://ix.io/3rKO |
16:13:22 | FromDiscord | <kaushalmodi> (edit) "http://ix.io/3rKO" => "http://ix.io/3rKP" |
16:17:29 | fn | <Prestige99> That's a shit load of code to review, 10k lines? Was it like a whole rewrite? |
16:18:48 | FromDiscord | <Rika> massive functionality addition |
16:18:54 | FromDiscord | <Rika> a pr that should have been 6 i believe |
16:19:03 | fn | <Prestige99> Sounds like it |
16:22:03 | FromDiscord | <Bung> @timotheecour now I use createnimrtl , I still get nil access |
16:27:23 | FromDiscord | <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:20 | FromDiscord | <timotheecour> > I still get nil access↵previously you mentioned a different error though |
16:29:49 | FromDiscord | <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:45 | FromDiscord | <tomck> Wait is `float` in nim default 64bit?? |
16:44:32 | FromDiscord | <tomck> or should i always explicitly use `float32` and `float64`? is it implementation dependent? |
16:44:58 | FromDiscord | <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:30 | FromDiscord | <Vindaar> In reply to @tomck "Wait is `float` in": yeah, as a matter of fact `float` is just an alias for `float64` |
17:01:19 | FromDiscord | <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:17 | FromDiscord | <timotheecour> needs a minimized repro, you may need to file a bug |
17:02:18 | * | iortega joined #nim |
17:04:13 | FromDiscord | <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:35 | FromDiscord | <Bung> okay, I'll try create minimal example to show the error |
17:27:51 | * | SebastianM joined #nim |
17:28:14 | FromDiscord | <Bung> @timotheecour please check https://github.com/bung87/dllgen |
17:28:16 | fn | <R2D299> itHub: 7"<No Description>" |
17:38:37 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rL1 |
17:39:09 | FromDiscord | <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:41 | FromDiscord | <haxscramper> that is a per-field documentation, or at leas how `nim doc` does it |
17:41:07 | FromDiscord | <haxscramper> ` ## \` is kind of useless, you can break on multiline doc comments with `## this` `## is a doc comment` |
17:41:19 | FromDiscord | <tomck> Yes i know, i want it to generate per-field docs, it doesn't |
17:41:23 | FromDiscord | <haxscramper> But you won't get nice doxygen-style table for fields |
17:41:42 | FromDiscord | <tomck> i see, so what's the preferred way to document fields? |
17:41:47 | FromDiscord | <tomck> I'm following this https://nim-lang.org/docs/docgen.html#introduction-documentation-comments |
17:42:29 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rL3 |
17:43:06 | FromDiscord | <haxscramper> In reply to @tomck "i see, so what's": preferred way to document fields is to put documentation on fields |
17:43:13 | FromDiscord | <haxscramper> as you just did |
17:43:58 | FromDiscord | <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:18 | FromDiscord | <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:47 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rL5 |
17:45:04 | FromDiscord | <haxscramper> I haven't used them, but I just stick to `##` for fields |
17:45:29 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rL6 |
17:45:39 | FromDiscord | <haxscramper> And just wrap comments on 80 lines |
17:46:01 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rL7 |
17:46:13 | FromDiscord | <tomck> i can manually re-indent but that's super annoying |
17:46:18 | FromDiscord | <haxscramper> Do you use emacs? |
17:46:40 | FromDiscord | <tomck> actually wait, it's nim fmt that's doing that indentation, so i'm screwed regardless of editor |
17:46:43 | FromDiscord | <tomck> no, vim at the moment |
17:46:58 | FromDiscord | <tomck> but it's nim fmt that I just run when hte buffer saves |
17:47:14 | FromDiscord | <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:01 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rLa |
17:48:07 | FromDiscord | <haxscramper> It would wrap it correctly |
17:48:12 | FromDiscord | <tomck> hmmmm |
17:48:44 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=3rLb |
17:49:03 | FromDiscord | <tomck> still a bit of a pain though |
17:49:06 | FromDiscord | <tomck> what's haxdoc? |
17:49:26 | FromDiscord | <haxscramper> my documentation generator |
17:49:32 | FromDiscord | <haxscramper> https://github.com/haxscramper/haxdoc |
17:49:34 | fn | <R2D299> itHub: 7"Documentation generator and source code analysis system for nim." |
17:50:00 | FromDiscord | <tomck> any benefits over nim doc? |
17:50:03 | FromDiscord | <haxscramper> well |
17:50:30 | FromDiscord | <haxscramper> In reply to @haxscramper "Works for whole project,": this |
17:51:05 | FromDiscord | <kaushalmodi> In reply to @haxscramper "this": Do you plan to add manpage or info exports? |
17:51:15 | FromDiscord | <haxscramper> it would be trivial so why not |
17:51:22 | FromDiscord | <haxscramper> Not planned but would be possible |
17:51:35 | FromDiscord | <haxscramper> well, I actually partially support manpage imports |
17:51:37 | FromDiscord | <kaushalmodi> In reply to @haxscramper "Not planned but would": I'd love love to have manpages for my CLI tools |
17:52:07 | FromDiscord | <kaushalmodi> Info is even better but unfortunately not everyone is aware of that format |
17:52:08 | FromDiscord | <haxscramper> generating manpages is very simple so I could easily add it |
17:52:25 | FromDiscord | <haxscramper> In reply to @kaushalmodi "Info is even better": Could do info as well |
17:52:28 | FromDiscord | <kaushalmodi> In reply to @haxscramper "generating manpages is very": How so? Do you rely on pandoc or something? |
17:52:45 | FromDiscord | <haxscramper> No, there is a `libmandoc` project that provides mandoc parser |
17:53:06 | FromDiscord | <haxscramper> My main use case is to port posix documentation for nim wrappers |
17:53:16 | FromDiscord | <haxscramper> but it could be used for anything else |
17:53:34 | FromDiscord | <haxscramper> https://mandoc.bsd.lv/libmandoc.html |
17:54:02 | FromDiscord | <kaushalmodi> In reply to @haxscramper "https://mandoc.bsd.lv/libmandoc.html": Noted. So the user will need to have that library installed. |
17:54:22 | FromDiscord | <haxscramper> well, no, it is such an abomination to build so I'm going to do it when installing |
17:54:30 | FromDiscord | <haxscramper> and it is statically linked as wel |
17:55:34 | * | supakeen quit (Remote host closed the connection) |
17:55:36 | FromDiscord | <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:39 | FromDiscord | <haxscramper> Just to build docs |
17:55:57 | * | supakeen joined #nim |
17:59:22 | FromDiscord | <timotheecour> In reply to @Bung "<@!427948629249228800> please check": i mean filing a bug in nim issue tracker |
18:00:01 | FromDiscord | <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:06 | FromDiscord | <timotheecour> (edit) "further)" => "further as other bugs are)" |
18:06:07 | FromDiscord | <Bung> ok |
18:14:15 | * | SebastianM quit (Quit: Bye) |
18:14:34 | * | Vladar quit (Read error: Connection reset by peer) |
18:33:34 | FromDiscord | <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:42 | FromDiscord | <tomck> depending on what you want, might be worth looking into compiling c -> lua, there's probably somethiing already out there |
18:44:56 | FromDiscord | <tomck> so you'd go nim -> c -> lua |
18:45:19 | FromDiscord | <tomck> obviously any FFI from nim -> lua will be a massive ballache & might break with compiler releases though (?) |
18:48:01 | FromDiscord | <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:21 | FromDiscord | <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:08 | FromDiscord | <tomck> What are you doing with reaper scripts? |
19:00:25 | FromDiscord | <tomck> Is i tjust a UI plugin, like 'add menu button, when clicked open window X', etc? |
19:00:45 | FromDiscord | <tomck> or 'insert 4 tracks when C-S-t' is pressed? |
19:01:06 | FromDiscord | <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:43 | FromDiscord | <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:10 | FromDiscord | <tomck> in my experience compiling between languages sucks & ends up being bad to use, although YMMV |
19:02:55 | FromDiscord | <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:02 | FromDiscord | <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:03 | FromDiscord | <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:48 | FromDiscord | <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:30 | FromDiscord | <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:44 | FromDiscord | <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:35 | FromDiscord | <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:42 | FromDiscord | <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:59 | FromDiscord | <haxscramper> In reply to @Ayy Lmao "I've been trying to": you can convert typed `PNode` to string, |
19:13:03 | FromDiscord | <Ayy Lmao> Is that something different than a NimNode? |
19:13:09 | FromDiscord | <haxscramper> `compileString` is a zero-setup starting point https://github.com/haxscramper/hnimast/blob/master/src/hnimast/compiler_aux.nim#L119 |
19:13:26 | FromDiscord | <haxscramper> In reply to @Ayy Lmao "Is that something different": It is `PNode` at runtime, with full support for compiler infrastructure |
19:13:40 | FromDiscord | <haxscramper> But basically it is equivalent to `NimNode` |
19:13:58 | FromDiscord | <haxscramper> https://github.com/haxscramper/hnimast/blob/master/src/hnimast/compiler_aux.nim#L176 |
19:14:58 | FromDiscord | <haxscramper> for simple lua compilation you can just pattern-match PNode and return types |
19:15:04 | FromDiscord | <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:05 | FromDiscord | <haxscramper> return lua code string |
19:15:54 | FromDiscord | <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:13 | FromDiscord | <haxscramper> That's how nim basically generates code for C/Js targets that don'w allow overloading |
19:16:37 | FromDiscord | <haxscramper> You get `_jsadfjhasdfjaskjd` digest string - it is not pretty but does the job |
19:17:25 | FromDiscord | <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:40 | FromDiscord | <haxscramper> macro has sighash available as well |
19:18:03 | FromDiscord | <Ayy Lmao> That's really cool though, sounds exactly like what I was looking for |
19:18:39 | FromDiscord | <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:14 | FromDiscord | <Ayy Lmao> @haxscramper For whatever reason, I am getting `Error: undeclared identifier: 'SslError'` when trying to import `hnimast/compiler_aux` |
19:59:41 | FromDiscord | <haxscramper> `-d:ssl` |
20:00:04 | FromDiscord | <haxscramper> I need to finally fix this, it happens because I depend on nimble |
20:00:09 | FromDiscord | <haxscramper> Whoch requires this |
20:00:18 | FromDiscord | <haxscramper> (edit) "Whoch" => "Which" |
20:00:38 | FromDiscord | <Ayy Lmao> I've been trying `nimble run -d:ssl` and I still get the error |
20:02:31 | FromDiscord | <haxscramper> Seems like nimble incorrectly passes this to the compiler or something like that |
20:02:45 | FromDiscord | <haxscramper> Well, the ide is that you need to define 'ssl' |
20:02:55 | FromDiscord | <Ayy Lmao> I put a config.nims file with `switch("define", "ssl=true")` and it seems to work |
20:03:10 | FromDiscord | <haxscramper> Yes, that is a solution |
20:13:40 | FromDiscord | <konsumlamm> In reply to @haxscramper "Seems like nimble incorrectly": that's intentional |
20:14:07 | FromDiscord | <konsumlamm> In reply to @Ayy Lmao "I've been trying `nimble": `nimble run -- -d:ssl` should work as well |
20:14:38 | FromDiscord | <konsumlamm> `--` is for separating nimble args from compiler args |
20:14:45 | FromDiscord | <haxscramper> In reply to @konsumlamm "that's intentional": Intentional how? |
20:14:48 | FromDiscord | <dom96> `nimble -d:ssl run` might work too |
20:15:07 | FromDiscord | <haxscramper> In reply to @konsumlamm "`--` is for separating": Then it should error our on incorrect -d passed |
20:15:14 | FromDiscord | <dom96> after run it passes args to the executable it's running |
20:15:20 | FromDiscord | <dom96> (edit) "run" => "`run`" |
20:16:18 | FromDiscord | <konsumlamm> see also https://github.com/nim-lang/nimble/pull/896 |
20:17:36 | FromDiscord | <dom96> unfortunately I think we might need to rethink: https://github.com/nim-lang/nimble/issues/923 |
20:17:56 | FromDiscord | <konsumlamm> wait nvm |
20:18:02 | FromDiscord | <konsumlamm> i got it wrong |
20:18:18 | FromDiscord | <konsumlamm> the part after -- is for program arguments, not for compiler arguments |
20:18:32 | FromDiscord | <dom96> but personally I just use `nimble c -r ...` . It's consistent with `nim` |
20:22:39 | fn | <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:05 | FromDiscord | <konsumlamm> In reply to @dom96 "unfortunately I think we": huh, i'll take a look |
20:28:40 | fn | <ForumUpdaterBot99> New thread by Mildred: Pragma to restrict procedure to main thread?, see https://forum.nim-lang.org/t/8186 |
20:30:32 | FromDiscord | <TennisBowling> is compiling to c or c++ more recommended? |
20:31:18 | FromDiscord | <dom96> C |
20:32:31 | fn | <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:55 | FromDiscord | <kaushalmodi> In reply to @fn "<ForumUpdaterBot> New post on": Yeah, that's an unfortunate package name. |
20:41:32 | FromDiscord | <TennisBowling> In reply to @dom96 "C": ok |
21:02:39 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3rLU |
21:03:39 | FromDiscord | <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:02 | FromDiscord | <haxscramper> I could add define support though, it should be pretty easy. |
21:05:28 | FromDiscord | <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:40 | FromDiscord | <Ayy Lmao> Or maybe I would just handle that when I transfer to the Lua AST |
21:07:10 | FromDiscord | <haxscramper> sighash |
21:07:29 | FromDiscord | <haxscramper> In reply to @haxscramper "yes, `compileString` returns semchecked": I was talking about it here |
21:07:47 | FromDiscord | <haxscramper> If you need prettier mangling you need to do it manually though |
21:07:54 | FromDiscord | <Ayy Lmao> Are you talking about in std/macros? Because I see ` signatureHash` and `symBodyHash` but no `sighash` |
21:13:45 | FromDiscord | <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:29 | FromDiscord | <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:00 | FromDiscord | <haxscramper> Wanted to do something like that anyway |
21:17:55 | FromDiscord | <Ayy Lmao> In reply to @haxscramper "Well, actually digging through": That would be very helpful. |
21:31:44 | FromDiscord | <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:05 | FromDiscord | <reilly> Would anything in NimGL let me run my own code on the GPU? |
22:00:16 | FromDiscord | <reilly> I doubt it, but it doesn't hurt to ask. |
22:04:52 | FromDiscord | <ElegantBeef> Shaders |
22:05:05 | FromDiscord | <ElegantBeef> You do know how a gpu works right? 😄 |
22:06:03 | FromDiscord | <Jasmine and Don't Forget!~> Hi everyone! I just got a job |
22:06:24 | FromDiscord | <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:26 | FromDiscord | <ElegantBeef> Congrats |
22:06:43 | FromDiscord | <Jasmine and Don't Forget!~> Thank you! |
22:08:44 | FromDiscord | <exelotl> yo nice! |
22:09:54 | FromDiscord | <ElegantBeef> In reply to @reilly "Would anything in NimGL": What do you mean by "own code" though |
22:12:38 | FromDiscord | <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:45 | FromDiscord | <ElegantBeef> But anywho i'll shush |
22:39:05 | * | max22- quit (Remote host closed the connection) |
22:53:50 | * | stkrdknmibalz joined #nim |
22:54:34 | FromDiscord | <Bung> does the job allow you write nim in commpany's procs ? |
22:54:54 | FromDiscord | <Bung> (edit) "procs" => "projects" |
23:06:09 | FromDiscord | <ElegantBeef> If not you best quit 😛 |
23:13:43 | FromDiscord | <Bung> lol |
23:31:08 | * | iortega quit (Remote host closed the connection) |
23:32:16 | * | beshr quit (Read error: Connection reset by peer) |