<< 08-09-2021 >>

00:36:50NimEventerNew post on r/nim by harblcat: Array to object?, see https://reddit.com/r/nim/comments/pjzsdx/array_to_object/
00:39:58*arkurious quit (Quit: Leaving)
00:43:23FromDiscord<gogolxdong (liuxiaodong)> Anyone konws `/usr/bin/ld: c_code/1_2/@mmodules.nim.o:@mmodules.nim.c:(.text+0x56e): undefined reference to`imp\_acrt\_iob\_func'\`
00:57:44FromDiscord<boxkiller123> sent a long message, see http://ix.io/3yf3
00:58:13FromDiscord<Elegantbeef> They really like spamming
01:02:36FromDiscord<impbox [ftsf]> >_< can't see which bot it's from
01:04:28FromDiscord<Elegantbeef> It's a matrix user
01:04:44FromDiscord<Elegantbeef> Dont know anyone on matrix that can moderate 😀
01:09:47*neurocyte7 joined #nim
01:09:47*neurocyte7 quit (Changing host)
01:09:47*neurocyte7 joined #nim
01:13:22*neurocyte quit (Ping timeout: 245 seconds)
01:13:22*neurocyte7 is now known as neurocyte
01:17:44FromDiscord<Elegantbeef> Hellow matrix impbox
01:18:19FromDiscord<impbox> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: ahoy thar
01:53:44*vicfred quit (Ping timeout: 265 seconds)
01:57:14NimEventerNew post on r/nim by h234sd: Investor's First Rule, Optimal Betting | Simulations in Nim, see https://reddit.com/r/nim/comments/pk1427/investors_first_rule_optimal_betting_simulations/
02:02:49FromDiscord<leorize> this room is managed by dom so only he can ban
02:03:26FromDiscord<leorize> I do have management rights in other rooms so I cleaned those
02:14:49FromDiscord<cabboose> Yoyo; hashsets of complex objects
02:14:57FromDiscord<cabboose> if I call include on an object which has the same hash
02:15:04FromDiscord<cabboose> will it update the set value for that
02:15:06FromDiscord<cabboose> or just ignore it
02:15:10FromDiscord<cabboose> if its already in the set
02:15:15FromDiscord<cabboose> yaknowwhatimean?
02:15:48FromDiscord<Elegantbeef> It's a hashset it's not storing the object
02:19:42FromDiscord<cabboose> Nay you can access the object with []
02:19:44FromDiscord<cabboose> i didnt think so either
02:20:36FromDiscord<cabboose> https://nim-lang.org/docs/sets.html#%5B%5D%2CHashSet%5BA%5D%2CA
02:20:48FromDiscord<cabboose> well you can access the reference
02:21:11FromDiscord<Elegantbeef> Seems it replaces
02:21:21FromDiscord<cabboose> Glorious
02:21:25FromDiscord<cabboose> Cheers cobba
02:48:02FromDiscord<cabboose> So we use ./ for importing local modules now right?
02:48:13FromDiscord<cabboose> but can't do ./[module1, module2]?
02:48:14FromDiscord<cabboose> fek
03:28:15*mahlon quit (Read error: Connection reset by peer)
03:28:53*mahlon joined #nim
03:33:57FromDiscord<Gumber aka Zachary Carter> why do you need to use `./` ?
03:34:02FromDiscord<Gumber aka Zachary Carter> just import the module...
03:35:26FromDiscord<Gumber aka Zachary Carter> Running into a compiler crash in my project. I've been using `cc:vcc` since starting on it, so I'm not sure why I'm suddenly encountering this error, but:↵↵`LINK : fatal error LNK1181: cannot open input file '..\icons\nim-amd64-windows-vcc.res'`
03:35:47FromDiscord<impbox [ftsf]> does the file exist?
03:36:27FromDiscord<Gumber aka Zachary Carter> I don't know, but I"m confused why all of a sudden I'd be encounter this when tmk nothing has changed on my system and this was compiling fine within the last week
03:36:49FromDiscord<impbox [ftsf]> well, i'd check to see if that file exists
03:36:57FromDiscord<impbox [ftsf]> if it does then that's very odd
03:37:07FromDiscord<impbox [ftsf]> maybe it existed before but doesn't now
03:38:05FromDiscord<Gumber aka Zachary Carter> I mean there's a `nim.res`
03:38:16FromDiscord<Gumber aka Zachary Carter> it seems like a really strange name for an icon file doesn't it @impbox [ftsf] ?
03:38:33FromDiscord<Gumber aka Zachary Carter> seems like it's sticking cpu arch and platform info into that filename to me
03:39:21FromDiscord<Gumber aka Zachary Carter> `D:\a\nightlies\nightlies\nim-1.4.8\compiler\sempass2.nim(208, 10) compiler msg initiated here ` is where I get a `SIGSEV` when compiling with `verbosity:3`
03:42:36FromDiscord<impbox [ftsf]> what's the command line being passed from nim?
03:43:45FromDiscord<Gumber aka Zachary Carter> It's over 2k characters long haha
03:43:50FromDiscord<Gumber aka Zachary Carter> I'm going to poke around a bit more, something is fishy
03:44:24FromDiscord<impbox [ftsf]> https://github.com/nim-lang/Nim/blob/ee2eb5cae2585c5cd0a476814bd5879c130e5d30/koch.nim#L27
03:44:33FromDiscord<impbox [ftsf]> are you compiling your project or nim?
03:45:01FromDiscord<Gumber aka Zachary Carter> I'm compiling my project, but I'm getting a SIGSEV during compilation
03:45:07FromDiscord<Gumber aka Zachary Carter> so I was trying to debug with koch temp
03:45:11FromDiscord<Gumber aka Zachary Carter> and that's when I ran into that error
03:45:17FromDiscord<impbox [ftsf]> are you importing compiler?
03:45:29FromDiscord<Gumber aka Zachary Carter> I'm just gong to try reinstalling Nim
03:45:29FromDiscord<Gumber aka Zachary Carter> nope
03:45:37FromDiscord<Gumber aka Zachary Carter> not as far as I know
03:45:40FromDiscord<impbox [ftsf]> https://github.com/nim-lang/Nim/blob/1acba63cb725a0eee8f8b02f585057e030ce6295/compiler/nim.nim#L22 that line is defined in compiler/nim.nim
03:45:41FromDiscord<impbox [ftsf]> looks like that'd be asking it to link to that file
03:46:22FromDiscord<Gumber aka Zachary Carter> I dunno, I'm definitely not importing any compiler modules anywhere tmk
03:46:39FromDiscord<impbox [ftsf]> weird that nim.res exists if you're not building nim
03:46:52FromDiscord<Gumber aka Zachary Carter> well not in my directory
03:46:54FromDiscord<Elegantbeef> He is building nim
03:46:56FromDiscord<Gumber aka Zachary Carter> I just meant in the Nim folder it is
03:47:04FromDiscord<Gumber aka Zachary Carter> I'm building Nim when I'm running `koch temp`
03:47:08FromDiscord<Gumber aka Zachary Carter> because that builds a debug version of the compilter
03:47:19FromDiscord<Elegantbeef> is your CWD the nim root when you do `koch temp`?
03:47:22FromDiscord<Gumber aka Zachary Carter> so I can debug why the compiler is crashing
03:47:22FromDiscord<Gumber aka Zachary Carter> yeah
03:47:36FromDiscord<Gumber aka Zachary Carter> I'm just going to blow this install away
03:47:38FromDiscord<Gumber aka Zachary Carter> let's see what happens
03:48:12FromDiscord<Gumber aka Zachary Carter> actually... one thing first
03:48:24FromDiscord<Gumber aka Zachary Carter> okay yeah, nuking... brb
03:50:07*mahlon quit (Read error: Connection reset by peer)
03:50:47*mahlon joined #nim
03:59:13FromDiscord<Gumber aka Zachary Carter> nope, but if I comment modules out it compiles - so now I need to figure out what's breaking things in my code, and then maybe file an issue. I need to sleep though, so I'll figure it out tomorrow...
04:06:01*supakeen quit (Quit: WeeChat 3.2.1)
04:06:31*supakeen joined #nim
04:31:42FromDiscord<cabboose> In reply to @Gumber "why do you need": You don't need to, I think it's just cleaner and clarifies imports/prevents collisions
05:25:13FromDiscord<Rika> i dont recall having issues with using `import ./[mod1, mod2]`
06:29:20*jjido joined #nim
06:50:40*TakinOver quit (Ping timeout: 240 seconds)
06:51:06*TakinOver joined #nim
07:27:46*PMunch joined #nim
07:36:04PMunchOooh, import foo {.all.} might come in handy
07:37:39PMunchHmm, what's the difference between -d:nimAllocPagesViaMalloc and -d:useMalloc?
07:38:27PMunchI'm guessing that the former uses malloc to allocate the Nim memory pool and then the internal allocator does the rest, while the latter disables the internal pool and does all memory allocation via malloc?
07:51:23*max22- joined #nim
08:00:03supakeenFinally writing some Nim for work again :)
08:08:29FromDiscord<Archion> Nim
08:13:23*userj joined #nim
08:24:08PMunchNice
08:24:23PMunchWhat're you working on supakeen?
08:29:23supakeenOh, we have a few small 'forwarding' daemons that are written in Nim to minimize footprint and I'm making them a bit better/share more code.
08:29:26supakeenSo I can add in another one :)
08:29:44supakeenThey run on all our VMs so any improvement usually leads to a lot of extra resources.
08:32:09supakeenUsing parsetoml ;)
08:36:57*Vladar joined #nim
08:38:33*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:46:40PMunchOh nice
08:46:57PMunchAnd parsetoml is working out?
09:00:06*Helios quit (Quit: You have been kicked for being idle)
09:09:47supakeenYep; we use toml for all configuration so it's nice to be able to use it from Nim; haven't encountered any issues with it so far.
09:11:16FromDiscord<Archion> Why bot talk
09:11:42FromDiscord<Elegantbeef> Cause it's a bridge to matrix/irc
09:12:20supakeenJust have a 'bad' feeling about nimcrypto and I'd like to find a replacement for that somewhere near.
09:16:29madpropsPMunch should I close/modify the PR on the playground?
10:05:42emerysupakeen: what functions do you need? I don't trust it either and usually roll my own
10:09:29PMunchRolling your own crypto is generally frowned upon..
10:09:46PMunchmadprops, nah it looks fine. I just haven't had time to review it properly
10:10:30emeryPMunch: i mean implement
10:10:49PMunchI guess more people might have some feedback on the design as well: https://github.com/PMunch/nim-playground-frontend/pull/28
10:10:57supakeenemery: the problem is that nimcrypto does roll its own for most things; i'd prefer nice bindings to openssl or nacl.
10:11:11PMunchReact with a thumbs up (on the GitHub PR, not the Discord message) if you like it, or a thumbs down if you don't
10:11:15supakeenbut mostly rsa/ec and aead ciphers
10:11:27supakeenluckily not much x509 ;)
10:11:42emerysupakeen: well then you have to worry about openssl and nacl not linking or doing stupid things
10:11:51PMunchI mean Nim has libsodium binding
10:12:02PMunchAnd OpenSSL bindings
10:12:09PMunchI use the OpenSSL ones at work
10:12:20supakeenyes but there's no higher level openssl bindings (like: python cryptography style) i think?
10:12:22emerylibsodium is designed to break on untest platforms, it dumb
10:12:50supakeencurrently i'm fine with my nimcrypto use for their hashing algorithms :)
10:13:19FromDiscord<Archion> A
10:17:53emerycurrently my biggest complaint with nim is that what I think should be `seq[byte]` is usually `string`, and this is common in all the crypto stuff I've found
10:46:05*Vladar quit (Quit: Leaving)
10:48:27*Vladar joined #nim
10:50:17FromDiscord<haxscramper> Is it possible to do `mkDir` from a macro without `discard gorge(&"mkdir -p <myt-dir>")`?↵\`
10:50:32FromDiscord<haxscramper> `nimscript` has https://nim-lang.org/docs/nimscript.html#mkDir%2Cstring, but this module can't be imported
10:50:59FromDiscord<haxscramper> I.e. I simply can't import it due to "cannot import" error
10:51:40*asd quit (Ping timeout: 240 seconds)
10:53:14*asd joined #nim
10:57:48*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
11:06:40FromDiscord<Archion> How the heck you doing this bot messages?
11:08:31FromDiscord<konsumlamm> super advanced AI
11:10:53FromDiscord<haxscramper> In reply to @Archion "How the heck you": https://media.discordapp.net/attachments/371759389889003532/885119992385925130/nim_real_time_chat_bridging.png
11:11:01FromDiscord<haxscramper> https://nim-lang.org/blog/2021/06/19/new-community-home.html
11:14:58FromDiscord<Archion> ._.
11:34:23*xet7 quit (Remote host closed the connection)
11:36:42*arkurious joined #nim
11:36:52*xet7 joined #nim
11:37:26PMunchHmm, curios
11:38:11PMunchI have a macro that generates `type __time_t = culong` and I'm able to do `var x: time_t` and `echo x.typeof` prints out `__time_t`
11:38:18PMunchIs this a feature?
11:53:55*max22- quit (Ping timeout: 260 seconds)
11:58:04FromDiscord<x0tic> In reply to @Archion "How the heck you": I might have an idea
11:59:22PMunch@Archion, are you asking how the bridge to IRC which is tagged as a bot can talk properly?
11:59:50madpropsbeep boop
12:00:16*PMunch wrrr wrrrrr *clunk* wrrr
12:02:02FromDiscord<Rika> In reply to @PMunch "Is this a feature?": not that i know of
12:02:10FromDiscord<Rika> that looks like a bug..
12:04:20PMunchIt also managed to spit out this without causing an error: http://ix.io/3ygW/nim
12:04:39PMunchBut that one doesn't quite seem to work as a type :P
12:04:55PMunchSo I guess I have to write a name mangler after all :P
12:06:01*supakeen quit (Quit: WeeChat 3.2.1)
12:06:30*supakeen joined #nim
12:09:22PMunchIt's a bit annoying that I can't do `type myType = myType`..
12:10:06PMunchI wanted to have conditional declaration of types `type myType = when declared(myType): myType else: <declaration>`
12:11:10PMunchI can do the when outside the `type` section, but that doesn't work when the <declaration> requires other types in the same `type` block..
12:12:53FromDiscord<impbox [ftsf]> In reply to @PMunch "I have a macro": You can use _ in identifiers now?
12:13:06FromDiscord<impbox [ftsf]> (edit) "in" => "at the start of"
12:13:09PMunchNot really, but I'm able to generate that in a macro
12:13:37PMunchI guess I could do some weird stuff where I generate temporary names for the types and then `when declare` gate a bunch of templates for the actual name..
12:21:47*userj quit (Remote host closed the connection)
12:33:04*asd quit (Ping timeout: 252 seconds)
12:35:01*asd joined #nim
12:41:29*jjido joined #nim
12:47:29FromDiscord<Kiloneie> By JUST turning --gc:orc on you are not supposed to see any performance increase right ?
12:48:04PMunchWell, it depends on your code
12:48:12PMunchSome programs will see a performance increase
12:48:32FromDiscord<Kiloneie> im just running the sdl2 ex208_framerate example
12:48:39FromDiscord<Kiloneie> i see 0 difference
12:49:00FromDiscord<Rika> thats ok
12:49:08FromDiscord<Rika> it matters more if you have gc'd types
12:49:18FromDiscord<Rika> otherwise it doesnt really change anything
12:50:01FromDiscord<Kiloneie> from what i read it's not the point to see a performance uplift, but better garbage collection, so here nothing is happening but moving images therefore no GC activation
12:50:13FromDiscord<Kiloneie> gonna make a test of my own
12:50:14FromDiscord<Rika> yes
12:50:46FromDiscord<Kiloneie> a create and kill, repeat loop should do the trick
12:58:11FromDiscord<Gumber aka Zachary Carter> In reply to @cabboose "You don't need to,": gotcha
13:06:33FromDiscord<Archion> In reply to @PMunch "<@780396336439754823>, are you asking": :yes:
13:07:07PMunchIt's because we're real people :P
13:07:36PMunch:q
13:07:41*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:08:05FromDiscord<Archion> :v
13:08:09FromDiscord<Archion> I give up
13:08:10FromDiscord<Archion> I am confused
13:08:52PMunchThe "bot" is simply a bridge
13:09:11PMunchWhen I type something on IRC the bot will pick up that message and send it on Discord
13:09:23PMunchSo to you it looks like the bot is saying everything that I'm saying
13:09:30nrds<sorcerer99> and to other irc networks also :P
13:09:45PMunchTrue, but those are two different bots :P
13:09:58nrds<sorcerer99> oh idk whats being used here lmao
13:10:06nrds<sorcerer99> i just felt like feeling important so i chimed in rofl
13:10:22FromDiscord<Archion> A
13:10:23FromDiscord<Archion> Ok
13:10:26PMunchI think the `nrds` bot is something that Prestige wrote
13:10:27FromDiscord<Archion> Still confused
13:10:32PMunchWhat confuses you?
13:10:54nrds<sorcerer99> its just relays/proxies chat between different platforms
13:10:58nrds<sorcerer99> it*
13:10:59supakeenJust live in general.
13:16:00FromDiscord<Archion> A
13:16:04FromDiscord<Archion> Its annoying
13:17:15PMunchWhy?
13:17:22PMunchTo us you look like a bot
13:17:33FromDiscord<impbox [ftsf]> Yeah it's not ideal
13:20:20nrds<Prestige99> Agreed, everyone should just get on irc
13:20:23supakeenWhat's more annoying is starting with an 'A' message every time >_<
13:20:25nrds<Prestige99> :P
13:21:41nrds<sorcerer99> lol
13:22:03FromDiscord<enthus1ast> Na please use matrix 😉
13:22:34nrds<Prestige99> When it improves I probably will
13:22:38FromDiscord<Archion> In reply to @supakeen "What's more annoying is": Bad habit
13:24:57supakeenBut yea, the bridge bots are not ideal but for a small community this is better than fragmenting it.
13:26:57nrds<sorcerer99> i need to make a matrix homeserver still, but that config file is longggg
13:32:08FromDiscord<Archion> Ok
13:32:17FromDiscord<Archion> I am too dumb gor this
13:35:23FromDiscord<Shinji> Wondering if Nim is a able to make a kinda huge discord bot ?
13:36:06FromDiscord<Archion> I am wondering what is nim
13:36:18FromDiscord<Shinji> sent a long message, see http://ix.io/3yhq
13:36:23FromDiscord<Shinji> '-'
13:36:26FromDiscord<Shinji> Nim
13:36:28FromDiscord<Shinji> Like
13:36:31FromDiscord<Shinji> The language
13:36:37FromDiscord<Archion> Mhm
13:36:45FromDiscord<Archion> Too much programming language
13:36:50FromDiscord<Shinji> Of programmation
13:36:52FromDiscord<Shinji> Yep
13:36:56FromDiscord<Shinji> But useful
13:37:03FromDiscord<Archion> I can't choose language
13:37:21FromDiscord<Archion> I want to make bot with js but now with c# but c# is hard
13:37:24FromDiscord<Archion> And idk
13:37:35FromDiscord<Shinji> Try it with nim?
13:38:01FromDiscord<Archion> Can i make currency system and music with nim?
13:38:01FromDiscord<Shinji> C seems a heavy language for a discord bot
13:38:07FromDiscord<Shinji> (For me)
13:38:25FromDiscord<Shinji> Obviously I think you can make a music bot
13:38:43FromDiscord<Shinji> But I donc know for the currency
13:38:51FromDiscord<Shinji> Cause you'll need a database
13:38:56FromDiscord<Archion> Json
13:39:00FromDiscord<Shinji> Yep
13:39:01FromDiscord<Archion> <a:altertoriel_happy:876882629687934976>
13:39:13FromDiscord<Archion> But fiirst
13:39:21FromDiscord<Archion> (edit) "fiirst" => "first"
13:39:30FromDiscord<Archion> I practise
13:39:47FromDiscord<Archion> And i won't get bad grade when coding in html or c#
13:39:50FromDiscord<Shinji> Yep
13:40:01FromDiscord<Shinji> That's seems true
13:40:17FromDiscord<Archion> Yes
13:40:37FromDiscord<Archion> I can make rick roll website now
13:40:40FromDiscord<Archion> <:c_troll:865950122952622100>
13:41:59FromDiscord<Shinji>
13:42:48FromDiscord<Archion>
13:45:30FromDiscord<Rika> what the hell was this convo just not
13:45:31FromDiscord<Rika> (edit) "not" => "now"
13:45:51FromDiscord<Rika> In reply to @Shinji "Wondering if Nim is": yes, easily, given good programming
13:51:33FromDiscord<Shinji> T_T well
13:51:52FromDiscord<Shinji> Gonna study nim
13:52:40PMunchYou could do all that with Nim
13:53:08FromDiscord<Shinji> Whitout extra library?
13:53:40*max22- joined #nim
13:54:28PMunchTechnically you could, but it would be much easier with libraries
13:54:41PMunchNot sure why you would want to not use a library though..
13:54:41madpropshttps://github.com/krisppurg/dimscord
13:54:45nrds<R2D299> itHub: 7"A Discord Bot & REST Library for Nim."
13:54:53FromDiscord<Shinji> Waw thanks
13:55:28FromDiscord<Shinji> In reply to @PMunch "Not sure why you": Lazy
13:55:46PMunchLazy people use libraries though, the alternative is to implement everything yourself
13:55:58FromDiscord<Shinji> That true T_T
13:56:22FromDiscord<Shinji> First of all I'll need to became familiar with the language
13:56:44FromDiscord<Shinji> But it's seem not so hard
13:57:15FromDiscord<Shinji> So gonna re write the bot file and I'll see
13:57:29FromDiscord<Shinji> (edit) "So ... gonna" added "I'm"
14:03:58FromDiscord<Rika> the laziest of people get libraries and modify them for their own needs
14:03:59FromDiscord<Rika> xddddddddd
14:04:23FromDiscord<Archion> Xdddd
14:04:48FromDiscord<Archion> And i don't use library
14:05:02FromDiscord<Rika> youre missing out then
14:05:16FromDiscord<Archion> Ok
14:05:25FromDiscord<Archion> I don't know how to use library
14:09:57madpropsmodifying a library doesn't sound lazy
14:10:10madpropsactually sounds kinda hard
14:10:34FromDiscord<Archion> I think i am the most stupid person in this server
14:16:39FromDiscord<OffenseTeacher> lol wait until you read my following question:
14:17:53FromDiscord<OffenseTeacher> sent a long message, see http://ix.io/3yhF
14:18:00*PMunch quit (Quit: Leaving)
14:24:24FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yhG
14:24:33FromDiscord<haxscramper> forward declare `second`
14:25:55FromDiscord<OffenseTeacher> Yeah in my case I want to be able to call a proc from two different other procs, one must be declared higher and the other one lower that that proc
14:27:09FromDiscord<OffenseTeacher> ohh ok nvm I think I got what you're trying to say
14:40:14FromDiscord<Gumber aka Zachary Carter> What is going on right now in here
14:41:09FromDiscord<Gumber aka Zachary Carter> well not right now, but scrolling up a bit is quite painful
14:41:11FromDiscord<Gumber aka Zachary Carter> on the brain
14:41:26FromDiscord<Gumber aka Zachary Carter> (edit) "well not right now, but scrolling up a bit ... is" added "and reading"
14:51:14FromDiscord<Archion> Ok
15:08:09NimEventerNew thread by Taufeeqmowzer01: Links of websites built with Karax?, see https://forum.nim-lang.org/t/8406
15:11:58FromDiscord<enthus1ast> There is also experimental code reordering https://nim-lang.github.io/Nim/manual_experimental.html#code-reordering↵(@OffenseTeacher)
15:25:12FromDiscord<Rika> In reply to @OffenseTeacher "Is there a way": rest assured that wasnt that stupid of a question as you think
15:25:20FromDiscord<Rika> (edit) "that" => "as"
15:27:59FromDiscord<fae> That threw me off just a bit ago lol
15:28:40FromDiscord<OffenseTeacher> well when you are not familliar witrh the term "forward declaration", your google searches get weird quite fast when trying to formulate your need :p
15:28:47FromDiscord<OffenseTeacher> Thanks guys, it works flawlessly
15:29:16FromDiscord<Gumber aka Zachary Carter> @OffenseTeacher my comment wasn't directed towards you
15:29:34FromDiscord<Gumber aka Zachary Carter> in case you were concerned it was, if not then please disregard 🙂
15:30:00FromDiscord<Gumber aka Zachary Carter> (edit) "were concerned" => "had thought"
15:31:10FromDiscord<Gumber aka Zachary Carter> There's never anything wrong with asking to the point on-topic questions
15:31:20FromDiscord<OffenseTeacher> no worries :p
15:31:21FromDiscord<Gumber aka Zachary Carter> and yours was one of those
15:32:32FromDiscord<Gumber aka Zachary Carter> you can also run into recursive type dependencies
15:32:36FromDiscord<Gumber aka Zachary Carter> like recursive proc dependencies
15:32:48FromDiscord<Gumber aka Zachary Carter> across modules I mean
15:32:55FromDiscord<OffenseTeacher> mhmmm
15:33:11FromDiscord<Gumber aka Zachary Carter> that generally requires a different solution though, where you move common things into one file
15:33:45FromDiscord<Gumber aka Zachary Carter> so some folks create like a `types` module or something then throw all the types that are shared between modules in there
15:33:56FromDiscord<auxym> re: forward declarations and cyclic imports, there is also this that is upcoming: https://github.com/nim-lang/Nim/pull/18818 but not for 1.6 I think?
15:34:03FromDiscord<Gumber aka Zachary Carter> I generally just put all the code in one module since having a file with solely types in it is kind of pointless
15:34:47FromDiscord<Gumber aka Zachary Carter> Really? The most important feature?
15:35:19FromDiscord<Gumber aka Zachary Carter> I beg to differ but, yeah it will be cool to have it. I have no clue on the timeline @auxym
15:35:35FromDiscord<Gumber aka Zachary Carter> I'm not a core dev, or even a dev, just a user
15:36:27FromDiscord<auxym> same. Personally I haven't run into a case where it's a dealbreaker, but still looking forward to it
15:37:40FromDiscord<Gumber aka Zachary Carter> I think better C++ interop is the most important featurre
15:37:43FromDiscord<Gumber aka Zachary Carter> (edit) "featurre" => "feature"
15:37:49FromDiscord<Gumber aka Zachary Carter> but I think it also depends on what you use Nim for
15:38:36FromDiscord<Gumber aka Zachary Carter> I don't even think it can be defined as a deal breaker because there are workarounds
15:38:41FromDiscord<auxym> When it works, I like to do ML-style modules where you define a (or a few related) types and all procs that act on these types. Then higher level business-logic modules can import those.
15:38:41FromDiscord<Gumber aka Zachary Carter> it's an inconvenience at most
15:39:29FromDiscord<Rika> In reply to @auxym "When it works, I": ah i do this
15:39:31FromDiscord<Rika> it works well
15:40:12FromDiscord<Gumber aka Zachary Carter> I don't spend that much time thinking about it
15:40:51FromDiscord<Gumber aka Zachary Carter> if it ends up bothering me that much I will refactor later
15:45:44FromDiscord<Recruit_main707> i agree with the c++ interop, if you want to inherit from a c++ class you have to do a lot of stuff that makes it very hard
15:49:54FromDiscord<haxscramper> speaking of "deriving from C++ class" - I just finished proof-of-concept implementation for DSL
15:49:55FromDiscord<haxscramper> For deriving from C++ classes (and codegen in general)
15:49:56FromDiscord<haxscramper> because NiMiSNotAHEaDeRFilEGenerAtor
15:49:57FromDiscord<haxscramper> https://github.com/haxscramper/hnimast/blob/master/tests/cpp/tQWindow.nim#L41
15:53:10FromDiscord<haxscramper> From DSL I generate this, then re-import it in main file
15:53:14FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yia
15:54:46FromDiscord<haxscramper> And it seems like it is the best overall approach, though it looks like an absolute hack
16:07:43FromDiscord<Gumber aka Zachary Carter> nice
16:09:53*xet7 quit (Remote host closed the connection)
16:10:43FromDiscord<haxscramper> One MAJOR issue that I'm yet to figure out is using nim types in the generated code
16:11:25FromDiscord<haxscramper> In can't just include generated sources, because there is no way to reliably know which one generated what
16:12:02FromDiscord<haxscramper> And since --header is deprecated there is no way to actually put nim types somewhere and then use them
16:12:28FromDiscord<haxscramper> So I would probably have to reimplement whole cgen part of the compiler and use it
16:13:05*xet7 joined #nim
16:14:27FromDiscord<Gumber aka Zachary Carter> :/
16:38:17FromDiscord<reilly> Can someone give me an example of composition? I see it mentioned in the docs, but they only provide an example for inheritance.
16:41:21FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yip
16:41:36FromDiscord<haxscramper> Just use one object as a field for another one
16:43:34FromDiscord<reilly> Right, that's what I thought, but I wasn't sure if Nim made a distinction between "composing" and "including other objects as fields." Now I know.
17:01:05FromDiscord<no name fits> Is there a UUID generator in the core lib?
17:10:51FromDiscord<Gumber aka Zachary Carter> No
17:12:44FromDiscord<Gumber aka Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=3yiz
17:12:47FromDiscord<Gumber aka Zachary Carter> which would be inheritance
17:12:59FromDiscord<Gumber aka Zachary Carter> or the object oriented style of data modeling
17:16:02FromDiscord<Gumber aka Zachary Carter> composition is what was relied on before object oriented programming began to be a popular thing and everyone shifted to using inheritance hierarchies and interfaces and dynamic dispatch etc...
17:27:12FromDiscord<reilly> In reply to @no name fits "Is there a UUID": Maybe look at https://github.com/pragmagic/uuids/
17:27:15nrds<R2D299> itHub: 7"UUID library for Nim"
17:28:21FromDiscord<no name fits> Yeah I saw that one
17:28:46FromDiscord<no name fits> I was just interested in keeping dependencies low, so thought of asking first 🙂
17:29:09*jjido joined #nim
17:59:16FromDiscord<Recruit_main707> can i avoid this pre declarations? `N_LIB_PRIVATE tyObject_ExampleBotRoL9afQLGHqCitseBtS82SQ exampleBot_main_62;`
18:15:51FromDiscord<Recruit_main707> i really need an standard an official way of inheriting c++ classes because this is making me want to hang myself
18:16:20FromDiscord<Gumber aka Zachary Carter> emit
18:16:55FromDiscord<Recruit_main707> if wanted to write c++ code id avoid nim directly :P
18:17:27FromDiscord<Recruit_main707> death or c++, hard choice tbg
18:17:31FromDiscord<Recruit_main707> (edit) "tbg" => "tbh"
18:17:32FromDiscord<Gumber aka Zachary Carter> Nim isn't C++, sometimes there's just no way
18:17:37FromDiscord<Gumber aka Zachary Carter> you can emit it or write a macro to do it
18:17:39FromDiscord<Gumber aka Zachary Carter> up to you
18:18:10FromDiscord<Recruit_main707> do you have any examples of your method?
18:22:03FromDiscord<Gumber aka Zachary Carter> Mm not really - I haven't tried to do it in a while
18:22:16FromDiscord<Gumber aka Zachary Carter> mostly because I try to avoid C++ libraries that make me implement some virtual interface
18:22:38FromDiscord<Gumber aka Zachary Carter> but I mean it's possible - people even sometimes go so far as to construct vtables to make everything work
18:22:47FromDiscord<Gumber aka Zachary Carter> github codesearch will probably be your best friend tbh
18:26:33FromDiscord<Recruit_main707> krux may have some stuff about this
18:27:24FromDiscord<Gumber aka Zachary Carter> probably
18:37:35*max22- quit (Ping timeout: 260 seconds)
18:37:49*vicfred joined #nim
18:43:27*mdbauman joined #nim
18:54:33FromDiscord<Kiloneie> https://play.nim-lang.org/#ix=3yj6↵This code... well after i made it so that Entity objects are created based on the custom 1000ms timer and then destroyed after another 1000ms, first off the window is very bugy, secondly my monitor(with speakers) or something is making screeching sounds at every 1000ms(1 second) interval oO... wot ? Also the program crashes very often, idk what im doing here.
18:54:36*mdbauman quit (Quit: Client closed)
18:55:37*mdbauman joined #nim
18:57:01*mdbauman quit (Client Quit)
18:58:08*mdbauman joined #nim
18:58:17FromDiscord<Kiloneie> i probably made a very easy to fix memory leak, but the sound is oddity here xD...
18:59:05*mdbauman quit (Client Quit)
18:59:17FromDiscord<hotdog> The sound must be the entities screaming as they are destroyed
18:59:30*mdbauman joined #nim
18:59:38FromDiscord<Kiloneie> actually the sound only happens when they are made
18:59:45FromDiscord<Kiloneie> then silence
19:02:56*max22- joined #nim
19:17:45FromDiscord<hotdog> They know what’s coming
19:43:27*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
20:07:43*rockcavera joined #nim
20:07:44*rockcavera quit (Changing host)
20:07:44*rockcavera joined #nim
20:26:07FromDiscord<Skaruts> is it expensive to cast a C array to `ptr UncheckedArray` so I can access its elements?
20:26:44FromDiscord<Elegantbeef> it's free
20:27:05FromDiscord<Elegantbeef> `cast[T](someVar)` is free since it's just converting it in the type system
20:28:43FromDiscord<Skaruts> ah, thanks
20:32:36FromDiscord<Skaruts> so then I'm confused... but issue is not related to nim, I think -- I'm binding libtcod to my lua/love2d code, but its FOV algorithm isn't going any faster than my original lua algorithm... (in a release build)
20:33:23FromDiscord<Skaruts> maybe luaJIT is doing it's magic really well or something
20:33:56FromDiscord<Elegantbeef> have you enabled `lto`?
20:34:48FromDiscord<Skaruts> I don't know what that is
20:35:01FromDiscord<Yardanico> In reply to @Skaruts "so then I'm confused...": you can also try with -d:danger - that disables _all_ runtime checks that Nim does
20:35:07FromDiscord<Yardanico> also what's your nim version?
20:35:14FromDiscord<Elegantbeef> link time optimization
20:35:20FromDiscord<Skaruts> 1.4.2 iirc
20:35:33FromDiscord<Yardanico> In reply to @Skaruts "maybe luaJIT is doing": for some code (especially dealing with math and numbers) that is called really often JITs can perform really well, yes
20:35:35FromDiscord<Elegantbeef> Might make the output binary a bit more efficient
20:36:13FromDiscord<Skaruts> 1.4.8 actually
20:36:17FromDiscord<Yardanico> yeah, that's ok then
20:36:22FromDiscord<Yardanico> try with -d:danger -d:lto
20:36:46FromDiscord<Skaruts> gonna try that then
20:38:12FromDiscord<Elegantbeef> if you're on mac or using clang the `-d:lto` will not work
20:38:22FromDiscord<Yardanico> why so?
20:38:24FromDiscord<Yardanico> it'll work just with with clang
20:38:31FromDiscord<Yardanico> also @Skaruts you can try --gc:orc too
20:38:36FromDiscord<Yardanico> as an additional option
20:38:42FromDiscord<Elegantbeef> I thought it didnt work on mac due to using clang
20:38:49FromDiscord<Elegantbeef> I know it doesnt work on mac for a certainty
20:39:08FromDiscord<Yardanico> but it works with clang since clang generally has the same CLI as GCC
20:39:17FromDiscord<Yardanico> on linux clang compiles just with with -d:lto
20:40:02FromDiscord<Yardanico> ah actually you're right, yeah, it's because -d:lto is forcing a specific linker for some weird reason
20:40:49FromDiscord<Yardanico> --gc:orc -d:danger --passC:"-flto -march=native" --passL:"-flto"
20:40:49FromDiscord<Yardanico> :P
20:41:08FromDiscord<Elegantbeef> there you go
20:41:19FromDiscord<Skaruts> In reply to @Yardanico "also <@!338653900779421697> you can": yup
20:41:24FromDiscord<Yardanico> so how's the performance?
20:41:46FromDiscord<Skaruts> 1 sec
20:42:15FromDiscord<Elegantbeef> That's slow! \:P
20:42:32FromDiscord<Yardanico> maybe he calculated the answer to the universe in that 1 sec!
20:42:43FromDiscord<Skaruts> lol
20:42:53FromDiscord<Skaruts> just some distractions around me
20:42:56FromDiscord<Skaruts> dogs...
20:43:26*supakeen quit (Remote host closed the connection)
20:43:50*supakeen joined #nim
20:44:01FromDiscord<Gumber aka Zachary Carter> don't blame dogs for your program's poor performance
20:44:06FromDiscord<Gumber aka Zachary Carter> it's not their fault
20:44:39FromDiscord<Gumber aka Zachary Carter> poor good bois getting blamed for things they have no control over
20:45:39FromDiscord<Skaruts> no difference, so the bottleneck is probably elsewhere
20:45:46FromDiscord<Skaruts> gonna have to do some profiling
20:45:57FromDiscord<Yardanico> yeah, it's pretty easy with tools that do C/C++ profiling
20:46:06FromDiscord<Yardanico> just compile your nim project with --debugger:native and you're all set
20:46:19FromDiscord<Elegantbeef> Or just hit your dogs until the program runs faster
20:46:22FromDiscord<Skaruts> it's probably in the lua side though
20:46:34FromDiscord<Yardanico> also potentially -d:useMalloc if you're using arc/orc and want to profile memory
20:47:48FromDiscord<Skaruts> thanks for the tips
20:51:17nixfreak_nim[m]nimble.directory cert is expired
20:51:17nixfreak_nim[m]https://nimble.directory/
20:52:09nixfreak_nim[m]and its setup for HTS so most people will be blocked out by their browsers
20:54:08FromDiscord<Gumber aka Zachary Carter> I don't remember who made / owns that site
20:54:47*vicfred quit (Quit: Leaving)
21:08:06FromDiscord<Elegantbeef> Believe it's fedrico
21:17:19*Vladar quit (Quit: Leaving)
21:29:42*tiorock joined #nim
21:29:42*tiorock quit (Changing host)
21:29:42*tiorock joined #nim
21:29:42*rockcavera quit (Killed (erbium.libera.chat (Nickname regained by services)))
21:29:42*tiorock is now known as rockcavera
21:34:53FromDiscord<Gumber aka Zachary Carter> ah
21:35:13FromDiscord<Gumber aka Zachary Carter> man that union mixing GC'd memory limitation really needs some type of compiler error handling / warning
21:35:17FromDiscord<Gumber aka Zachary Carter> right now it just results in a sigsev
21:35:23FromDiscord<Gumber aka Zachary Carter> took me a while to realize what was happening
21:36:05FromDiscord<Gumber aka Zachary Carter> (edit) "man that union ... mixing" added "pragma and"
21:42:07*greaser|q quit (Changing host)
21:42:07*greaser|q joined #nim
21:42:12*greaser|q is now known as GreaseMonkey
21:43:48*mdbauman quit (Remote host closed the connection)
21:44:05*mdbauman joined #nim
21:56:57*max22- quit (Quit: Leaving)
21:58:24*jjido joined #nim
21:58:48FromDiscord<Elegantbeef> Yea probably should have a warning which can be turned into an error if using gc'd memory in a union
21:59:19FromDiscord<Elegantbeef> Hmm or should it just be an error...
22:18:13*tiorock joined #nim
22:18:13*tiorock quit (Changing host)
22:18:13*tiorock joined #nim
22:18:13*rockcavera is now known as Guest2543
22:18:13*Guest2543 quit (Killed (molybdenum.libera.chat (Nickname regained by services)))
22:18:13*tiorock is now known as rockcavera
22:36:10FromDiscord<Gumber aka Zachary Carter> probably an error if it's going to crash the compiler like that
23:07:56FromDiscord<Skaruts> if I do `let array = cast[ptr UncheckedArray[MyType]](c_array)`, do I need to destroy this pointer later?
23:11:13FromDiscord<Elegantbeef> no pointers are stack allocated, if you dont want the Carray anymore you do need to dealloc it
23:12:05FromDiscord<Skaruts> ah I see
23:12:11FromDiscord<Skaruts> thx
23:17:46*arkurious quit (Quit: Leaving)