00:36:50 | NimEventer | New 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:23 | FromDiscord | <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:44 | FromDiscord | <boxkiller123> sent a long message, see http://ix.io/3yf3 |
00:58:13 | FromDiscord | <Elegantbeef> They really like spamming |
01:02:36 | FromDiscord | <impbox [ftsf]> >_< can't see which bot it's from |
01:04:28 | FromDiscord | <Elegantbeef> It's a matrix user |
01:04:44 | FromDiscord | <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:44 | FromDiscord | <Elegantbeef> Hellow matrix impbox |
01:18:19 | FromDiscord | <impbox> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: ahoy thar |
01:53:44 | * | vicfred quit (Ping timeout: 265 seconds) |
01:57:14 | NimEventer | New 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:49 | FromDiscord | <leorize> this room is managed by dom so only he can ban |
02:03:26 | FromDiscord | <leorize> I do have management rights in other rooms so I cleaned those |
02:14:49 | FromDiscord | <cabboose> Yoyo; hashsets of complex objects |
02:14:57 | FromDiscord | <cabboose> if I call include on an object which has the same hash |
02:15:04 | FromDiscord | <cabboose> will it update the set value for that |
02:15:06 | FromDiscord | <cabboose> or just ignore it |
02:15:10 | FromDiscord | <cabboose> if its already in the set |
02:15:15 | FromDiscord | <cabboose> yaknowwhatimean? |
02:15:48 | FromDiscord | <Elegantbeef> It's a hashset it's not storing the object |
02:19:42 | FromDiscord | <cabboose> Nay you can access the object with [] |
02:19:44 | FromDiscord | <cabboose> i didnt think so either |
02:20:36 | FromDiscord | <cabboose> https://nim-lang.org/docs/sets.html#%5B%5D%2CHashSet%5BA%5D%2CA |
02:20:48 | FromDiscord | <cabboose> well you can access the reference |
02:21:11 | FromDiscord | <Elegantbeef> Seems it replaces |
02:21:21 | FromDiscord | <cabboose> Glorious |
02:21:25 | FromDiscord | <cabboose> Cheers cobba |
02:48:02 | FromDiscord | <cabboose> So we use ./ for importing local modules now right? |
02:48:13 | FromDiscord | <cabboose> but can't do ./[module1, module2]? |
02:48:14 | FromDiscord | <cabboose> fek |
03:28:15 | * | mahlon quit (Read error: Connection reset by peer) |
03:28:53 | * | mahlon joined #nim |
03:33:57 | FromDiscord | <Gumber aka Zachary Carter> why do you need to use `./` ? |
03:34:02 | FromDiscord | <Gumber aka Zachary Carter> just import the module... |
03:35:26 | FromDiscord | <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:47 | FromDiscord | <impbox [ftsf]> does the file exist? |
03:36:27 | FromDiscord | <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:49 | FromDiscord | <impbox [ftsf]> well, i'd check to see if that file exists |
03:36:57 | FromDiscord | <impbox [ftsf]> if it does then that's very odd |
03:37:07 | FromDiscord | <impbox [ftsf]> maybe it existed before but doesn't now |
03:38:05 | FromDiscord | <Gumber aka Zachary Carter> I mean there's a `nim.res` |
03:38:16 | FromDiscord | <Gumber aka Zachary Carter> it seems like a really strange name for an icon file doesn't it @impbox [ftsf] ? |
03:38:33 | FromDiscord | <Gumber aka Zachary Carter> seems like it's sticking cpu arch and platform info into that filename to me |
03:39:21 | FromDiscord | <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:36 | FromDiscord | <impbox [ftsf]> what's the command line being passed from nim? |
03:43:45 | FromDiscord | <Gumber aka Zachary Carter> It's over 2k characters long haha |
03:43:50 | FromDiscord | <Gumber aka Zachary Carter> I'm going to poke around a bit more, something is fishy |
03:44:24 | FromDiscord | <impbox [ftsf]> https://github.com/nim-lang/Nim/blob/ee2eb5cae2585c5cd0a476814bd5879c130e5d30/koch.nim#L27 |
03:44:33 | FromDiscord | <impbox [ftsf]> are you compiling your project or nim? |
03:45:01 | FromDiscord | <Gumber aka Zachary Carter> I'm compiling my project, but I'm getting a SIGSEV during compilation |
03:45:07 | FromDiscord | <Gumber aka Zachary Carter> so I was trying to debug with koch temp |
03:45:11 | FromDiscord | <Gumber aka Zachary Carter> and that's when I ran into that error |
03:45:17 | FromDiscord | <impbox [ftsf]> are you importing compiler? |
03:45:29 | FromDiscord | <Gumber aka Zachary Carter> I'm just gong to try reinstalling Nim |
03:45:29 | FromDiscord | <Gumber aka Zachary Carter> nope |
03:45:37 | FromDiscord | <Gumber aka Zachary Carter> not as far as I know |
03:45:40 | FromDiscord | <impbox [ftsf]> https://github.com/nim-lang/Nim/blob/1acba63cb725a0eee8f8b02f585057e030ce6295/compiler/nim.nim#L22 that line is defined in compiler/nim.nim |
03:45:41 | FromDiscord | <impbox [ftsf]> looks like that'd be asking it to link to that file |
03:46:22 | FromDiscord | <Gumber aka Zachary Carter> I dunno, I'm definitely not importing any compiler modules anywhere tmk |
03:46:39 | FromDiscord | <impbox [ftsf]> weird that nim.res exists if you're not building nim |
03:46:52 | FromDiscord | <Gumber aka Zachary Carter> well not in my directory |
03:46:54 | FromDiscord | <Elegantbeef> He is building nim |
03:46:56 | FromDiscord | <Gumber aka Zachary Carter> I just meant in the Nim folder it is |
03:47:04 | FromDiscord | <Gumber aka Zachary Carter> I'm building Nim when I'm running `koch temp` |
03:47:08 | FromDiscord | <Gumber aka Zachary Carter> because that builds a debug version of the compilter |
03:47:19 | FromDiscord | <Elegantbeef> is your CWD the nim root when you do `koch temp`? |
03:47:22 | FromDiscord | <Gumber aka Zachary Carter> so I can debug why the compiler is crashing |
03:47:22 | FromDiscord | <Gumber aka Zachary Carter> yeah |
03:47:36 | FromDiscord | <Gumber aka Zachary Carter> I'm just going to blow this install away |
03:47:38 | FromDiscord | <Gumber aka Zachary Carter> let's see what happens |
03:48:12 | FromDiscord | <Gumber aka Zachary Carter> actually... one thing first |
03:48:24 | FromDiscord | <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:13 | FromDiscord | <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:42 | FromDiscord | <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:13 | FromDiscord | <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:04 | PMunch | Oooh, import foo {.all.} might come in handy |
07:37:39 | PMunch | Hmm, what's the difference between -d:nimAllocPagesViaMalloc and -d:useMalloc? |
07:38:27 | PMunch | I'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:03 | supakeen | Finally writing some Nim for work again :) |
08:08:29 | FromDiscord | <Archion> Nim |
08:13:23 | * | userj joined #nim |
08:24:08 | PMunch | Nice |
08:24:23 | PMunch | What're you working on supakeen? |
08:29:23 | supakeen | Oh, 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:26 | supakeen | So I can add in another one :) |
08:29:44 | supakeen | They run on all our VMs so any improvement usually leads to a lot of extra resources. |
08:32:09 | supakeen | Using parsetoml ;) |
08:36:57 | * | Vladar joined #nim |
08:38:33 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:46:40 | PMunch | Oh nice |
08:46:57 | PMunch | And parsetoml is working out? |
09:00:06 | * | Helios quit (Quit: You have been kicked for being idle) |
09:09:47 | supakeen | Yep; 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:16 | FromDiscord | <Archion> Why bot talk |
09:11:42 | FromDiscord | <Elegantbeef> Cause it's a bridge to matrix/irc |
09:12:20 | supakeen | Just have a 'bad' feeling about nimcrypto and I'd like to find a replacement for that somewhere near. |
09:16:29 | madprops | PMunch should I close/modify the PR on the playground? |
10:05:42 | emery | supakeen: what functions do you need? I don't trust it either and usually roll my own |
10:09:29 | PMunch | Rolling your own crypto is generally frowned upon.. |
10:09:46 | PMunch | madprops, nah it looks fine. I just haven't had time to review it properly |
10:10:30 | emery | PMunch: i mean implement |
10:10:49 | PMunch | I guess more people might have some feedback on the design as well: https://github.com/PMunch/nim-playground-frontend/pull/28 |
10:10:57 | supakeen | emery: the problem is that nimcrypto does roll its own for most things; i'd prefer nice bindings to openssl or nacl. |
10:11:11 | PMunch | React 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:15 | supakeen | but mostly rsa/ec and aead ciphers |
10:11:27 | supakeen | luckily not much x509 ;) |
10:11:42 | emery | supakeen: well then you have to worry about openssl and nacl not linking or doing stupid things |
10:11:51 | PMunch | I mean Nim has libsodium binding |
10:12:02 | PMunch | And OpenSSL bindings |
10:12:09 | PMunch | I use the OpenSSL ones at work |
10:12:20 | supakeen | yes but there's no higher level openssl bindings (like: python cryptography style) i think? |
10:12:22 | emery | libsodium is designed to break on untest platforms, it dumb |
10:12:50 | supakeen | currently i'm fine with my nimcrypto use for their hashing algorithms :) |
10:13:19 | FromDiscord | <Archion> A |
10:17:53 | emery | currently 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:17 | FromDiscord | <haxscramper> Is it possible to do `mkDir` from a macro without `discard gorge(&"mkdir -p <myt-dir>")`?↵\` |
10:50:32 | FromDiscord | <haxscramper> `nimscript` has https://nim-lang.org/docs/nimscript.html#mkDir%2Cstring, but this module can't be imported |
10:50:59 | FromDiscord | <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:40 | FromDiscord | <Archion> How the heck you doing this bot messages? |
11:08:31 | FromDiscord | <konsumlamm> super advanced AI |
11:10:53 | FromDiscord | <haxscramper> In reply to @Archion "How the heck you": https://media.discordapp.net/attachments/371759389889003532/885119992385925130/nim_real_time_chat_bridging.png |
11:11:01 | FromDiscord | <haxscramper> https://nim-lang.org/blog/2021/06/19/new-community-home.html |
11:14:58 | FromDiscord | <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:26 | PMunch | Hmm, curios |
11:38:11 | PMunch | I 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:18 | PMunch | Is this a feature? |
11:53:55 | * | max22- quit (Ping timeout: 260 seconds) |
11:58:04 | FromDiscord | <x0tic> In reply to @Archion "How the heck you": I might have an idea |
11:59:22 | PMunch | @Archion, are you asking how the bridge to IRC which is tagged as a bot can talk properly? |
11:59:50 | madprops | beep boop |
12:00:16 | * | PMunch wrrr wrrrrr *clunk* wrrr |
12:02:02 | FromDiscord | <Rika> In reply to @PMunch "Is this a feature?": not that i know of |
12:02:10 | FromDiscord | <Rika> that looks like a bug.. |
12:04:20 | PMunch | It also managed to spit out this without causing an error: http://ix.io/3ygW/nim |
12:04:39 | PMunch | But that one doesn't quite seem to work as a type :P |
12:04:55 | PMunch | So 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:22 | PMunch | It's a bit annoying that I can't do `type myType = myType`.. |
12:10:06 | PMunch | I wanted to have conditional declaration of types `type myType = when declared(myType): myType else: <declaration>` |
12:11:10 | PMunch | I 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:53 | FromDiscord | <impbox [ftsf]> In reply to @PMunch "I have a macro": You can use _ in identifiers now? |
12:13:06 | FromDiscord | <impbox [ftsf]> (edit) "in" => "at the start of" |
12:13:09 | PMunch | Not really, but I'm able to generate that in a macro |
12:13:37 | PMunch | I 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:29 | FromDiscord | <Kiloneie> By JUST turning --gc:orc on you are not supposed to see any performance increase right ? |
12:48:04 | PMunch | Well, it depends on your code |
12:48:12 | PMunch | Some programs will see a performance increase |
12:48:32 | FromDiscord | <Kiloneie> im just running the sdl2 ex208_framerate example |
12:48:39 | FromDiscord | <Kiloneie> i see 0 difference |
12:49:00 | FromDiscord | <Rika> thats ok |
12:49:08 | FromDiscord | <Rika> it matters more if you have gc'd types |
12:49:18 | FromDiscord | <Rika> otherwise it doesnt really change anything |
12:50:01 | FromDiscord | <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:13 | FromDiscord | <Kiloneie> gonna make a test of my own |
12:50:14 | FromDiscord | <Rika> yes |
12:50:46 | FromDiscord | <Kiloneie> a create and kill, repeat loop should do the trick |
12:58:11 | FromDiscord | <Gumber aka Zachary Carter> In reply to @cabboose "You don't need to,": gotcha |
13:06:33 | FromDiscord | <Archion> In reply to @PMunch "<@780396336439754823>, are you asking": :yes: |
13:07:07 | PMunch | It's because we're real people :P |
13:07:36 | PMunch | :q |
13:07:41 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:08:05 | FromDiscord | <Archion> :v |
13:08:09 | FromDiscord | <Archion> I give up |
13:08:10 | FromDiscord | <Archion> I am confused |
13:08:52 | PMunch | The "bot" is simply a bridge |
13:09:11 | PMunch | When I type something on IRC the bot will pick up that message and send it on Discord |
13:09:23 | PMunch | So to you it looks like the bot is saying everything that I'm saying |
13:09:30 | nrds | <sorcerer99> and to other irc networks also :P |
13:09:45 | PMunch | True, but those are two different bots :P |
13:09:58 | nrds | <sorcerer99> oh idk whats being used here lmao |
13:10:06 | nrds | <sorcerer99> i just felt like feeling important so i chimed in rofl |
13:10:22 | FromDiscord | <Archion> A |
13:10:23 | FromDiscord | <Archion> Ok |
13:10:26 | PMunch | I think the `nrds` bot is something that Prestige wrote |
13:10:27 | FromDiscord | <Archion> Still confused |
13:10:32 | PMunch | What confuses you? |
13:10:54 | nrds | <sorcerer99> its just relays/proxies chat between different platforms |
13:10:58 | nrds | <sorcerer99> it* |
13:10:59 | supakeen | Just live in general. |
13:16:00 | FromDiscord | <Archion> A |
13:16:04 | FromDiscord | <Archion> Its annoying |
13:17:15 | PMunch | Why? |
13:17:22 | PMunch | To us you look like a bot |
13:17:33 | FromDiscord | <impbox [ftsf]> Yeah it's not ideal |
13:20:20 | nrds | <Prestige99> Agreed, everyone should just get on irc |
13:20:23 | supakeen | What's more annoying is starting with an 'A' message every time >_< |
13:20:25 | nrds | <Prestige99> :P |
13:21:41 | nrds | <sorcerer99> lol |
13:22:03 | FromDiscord | <enthus1ast> Na please use matrix 😉 |
13:22:34 | nrds | <Prestige99> When it improves I probably will |
13:22:38 | FromDiscord | <Archion> In reply to @supakeen "What's more annoying is": Bad habit |
13:24:57 | supakeen | But yea, the bridge bots are not ideal but for a small community this is better than fragmenting it. |
13:26:57 | nrds | <sorcerer99> i need to make a matrix homeserver still, but that config file is longggg |
13:32:08 | FromDiscord | <Archion> Ok |
13:32:17 | FromDiscord | <Archion> I am too dumb gor this |
13:35:23 | FromDiscord | <Shinji> Wondering if Nim is a able to make a kinda huge discord bot ? |
13:36:06 | FromDiscord | <Archion> I am wondering what is nim |
13:36:18 | FromDiscord | <Shinji> sent a long message, see http://ix.io/3yhq |
13:36:23 | FromDiscord | <Shinji> '-' |
13:36:26 | FromDiscord | <Shinji> Nim |
13:36:28 | FromDiscord | <Shinji> Like |
13:36:31 | FromDiscord | <Shinji> The language |
13:36:37 | FromDiscord | <Archion> Mhm |
13:36:45 | FromDiscord | <Archion> Too much programming language |
13:36:50 | FromDiscord | <Shinji> Of programmation |
13:36:52 | FromDiscord | <Shinji> Yep |
13:36:56 | FromDiscord | <Shinji> But useful |
13:37:03 | FromDiscord | <Archion> I can't choose language |
13:37:21 | FromDiscord | <Archion> I want to make bot with js but now with c# but c# is hard |
13:37:24 | FromDiscord | <Archion> And idk |
13:37:35 | FromDiscord | <Shinji> Try it with nim? |
13:38:01 | FromDiscord | <Archion> Can i make currency system and music with nim? |
13:38:01 | FromDiscord | <Shinji> C seems a heavy language for a discord bot |
13:38:07 | FromDiscord | <Shinji> (For me) |
13:38:25 | FromDiscord | <Shinji> Obviously I think you can make a music bot |
13:38:43 | FromDiscord | <Shinji> But I donc know for the currency |
13:38:51 | FromDiscord | <Shinji> Cause you'll need a database |
13:38:56 | FromDiscord | <Archion> Json |
13:39:00 | FromDiscord | <Shinji> Yep |
13:39:01 | FromDiscord | <Archion> <a:altertoriel_happy:876882629687934976> |
13:39:13 | FromDiscord | <Archion> But fiirst |
13:39:21 | FromDiscord | <Archion> (edit) "fiirst" => "first" |
13:39:30 | FromDiscord | <Archion> I practise |
13:39:47 | FromDiscord | <Archion> And i won't get bad grade when coding in html or c# |
13:39:50 | FromDiscord | <Shinji> Yep |
13:40:01 | FromDiscord | <Shinji> That's seems true |
13:40:17 | FromDiscord | <Archion> Yes |
13:40:37 | FromDiscord | <Archion> I can make rick roll website now |
13:40:40 | FromDiscord | <Archion> <:c_troll:865950122952622100> |
13:41:59 | FromDiscord | <Shinji> |
13:42:48 | FromDiscord | <Archion> |
13:45:30 | FromDiscord | <Rika> what the hell was this convo just not |
13:45:31 | FromDiscord | <Rika> (edit) "not" => "now" |
13:45:51 | FromDiscord | <Rika> In reply to @Shinji "Wondering if Nim is": yes, easily, given good programming |
13:51:33 | FromDiscord | <Shinji> T_T well |
13:51:52 | FromDiscord | <Shinji> Gonna study nim |
13:52:40 | PMunch | You could do all that with Nim |
13:53:08 | FromDiscord | <Shinji> Whitout extra library? |
13:53:40 | * | max22- joined #nim |
13:54:28 | PMunch | Technically you could, but it would be much easier with libraries |
13:54:41 | PMunch | Not sure why you would want to not use a library though.. |
13:54:41 | madprops | https://github.com/krisppurg/dimscord |
13:54:45 | nrds | <R2D299> itHub: 7"A Discord Bot & REST Library for Nim." |
13:54:53 | FromDiscord | <Shinji> Waw thanks |
13:55:28 | FromDiscord | <Shinji> In reply to @PMunch "Not sure why you": Lazy |
13:55:46 | PMunch | Lazy people use libraries though, the alternative is to implement everything yourself |
13:55:58 | FromDiscord | <Shinji> That true T_T |
13:56:22 | FromDiscord | <Shinji> First of all I'll need to became familiar with the language |
13:56:44 | FromDiscord | <Shinji> But it's seem not so hard |
13:57:15 | FromDiscord | <Shinji> So gonna re write the bot file and I'll see |
13:57:29 | FromDiscord | <Shinji> (edit) "So ... gonna" added "I'm" |
14:03:58 | FromDiscord | <Rika> the laziest of people get libraries and modify them for their own needs |
14:03:59 | FromDiscord | <Rika> xddddddddd |
14:04:23 | FromDiscord | <Archion> Xdddd |
14:04:48 | FromDiscord | <Archion> And i don't use library |
14:05:02 | FromDiscord | <Rika> youre missing out then |
14:05:16 | FromDiscord | <Archion> Ok |
14:05:25 | FromDiscord | <Archion> I don't know how to use library |
14:09:57 | madprops | modifying a library doesn't sound lazy |
14:10:10 | madprops | actually sounds kinda hard |
14:10:34 | FromDiscord | <Archion> I think i am the most stupid person in this server |
14:16:39 | FromDiscord | <OffenseTeacher> lol wait until you read my following question: |
14:17:53 | FromDiscord | <OffenseTeacher> sent a long message, see http://ix.io/3yhF |
14:18:00 | * | PMunch quit (Quit: Leaving) |
14:24:24 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yhG |
14:24:33 | FromDiscord | <haxscramper> forward declare `second` |
14:25:55 | FromDiscord | <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:09 | FromDiscord | <OffenseTeacher> ohh ok nvm I think I got what you're trying to say |
14:40:14 | FromDiscord | <Gumber aka Zachary Carter> What is going on right now in here |
14:41:09 | FromDiscord | <Gumber aka Zachary Carter> well not right now, but scrolling up a bit is quite painful |
14:41:11 | FromDiscord | <Gumber aka Zachary Carter> on the brain |
14:41:26 | FromDiscord | <Gumber aka Zachary Carter> (edit) "well not right now, but scrolling up a bit ... is" added "and reading" |
14:51:14 | FromDiscord | <Archion> Ok |
15:08:09 | NimEventer | New thread by Taufeeqmowzer01: Links of websites built with Karax?, see https://forum.nim-lang.org/t/8406 |
15:11:58 | FromDiscord | <enthus1ast> There is also experimental code reordering https://nim-lang.github.io/Nim/manual_experimental.html#code-reordering↵(@OffenseTeacher) |
15:25:12 | FromDiscord | <Rika> In reply to @OffenseTeacher "Is there a way": rest assured that wasnt that stupid of a question as you think |
15:25:20 | FromDiscord | <Rika> (edit) "that" => "as" |
15:27:59 | FromDiscord | <fae> That threw me off just a bit ago lol |
15:28:40 | FromDiscord | <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:47 | FromDiscord | <OffenseTeacher> Thanks guys, it works flawlessly |
15:29:16 | FromDiscord | <Gumber aka Zachary Carter> @OffenseTeacher my comment wasn't directed towards you |
15:29:34 | FromDiscord | <Gumber aka Zachary Carter> in case you were concerned it was, if not then please disregard 🙂 |
15:30:00 | FromDiscord | <Gumber aka Zachary Carter> (edit) "were concerned" => "had thought" |
15:31:10 | FromDiscord | <Gumber aka Zachary Carter> There's never anything wrong with asking to the point on-topic questions |
15:31:20 | FromDiscord | <OffenseTeacher> no worries :p |
15:31:21 | FromDiscord | <Gumber aka Zachary Carter> and yours was one of those |
15:32:32 | FromDiscord | <Gumber aka Zachary Carter> you can also run into recursive type dependencies |
15:32:36 | FromDiscord | <Gumber aka Zachary Carter> like recursive proc dependencies |
15:32:48 | FromDiscord | <Gumber aka Zachary Carter> across modules I mean |
15:32:55 | FromDiscord | <OffenseTeacher> mhmmm |
15:33:11 | FromDiscord | <Gumber aka Zachary Carter> that generally requires a different solution though, where you move common things into one file |
15:33:45 | FromDiscord | <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:56 | FromDiscord | <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:03 | FromDiscord | <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:47 | FromDiscord | <Gumber aka Zachary Carter> Really? The most important feature? |
15:35:19 | FromDiscord | <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:35 | FromDiscord | <Gumber aka Zachary Carter> I'm not a core dev, or even a dev, just a user |
15:36:27 | FromDiscord | <auxym> same. Personally I haven't run into a case where it's a dealbreaker, but still looking forward to it |
15:37:40 | FromDiscord | <Gumber aka Zachary Carter> I think better C++ interop is the most important featurre |
15:37:43 | FromDiscord | <Gumber aka Zachary Carter> (edit) "featurre" => "feature" |
15:37:49 | FromDiscord | <Gumber aka Zachary Carter> but I think it also depends on what you use Nim for |
15:38:36 | FromDiscord | <Gumber aka Zachary Carter> I don't even think it can be defined as a deal breaker because there are workarounds |
15:38:41 | FromDiscord | <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:41 | FromDiscord | <Gumber aka Zachary Carter> it's an inconvenience at most |
15:39:29 | FromDiscord | <Rika> In reply to @auxym "When it works, I": ah i do this |
15:39:31 | FromDiscord | <Rika> it works well |
15:40:12 | FromDiscord | <Gumber aka Zachary Carter> I don't spend that much time thinking about it |
15:40:51 | FromDiscord | <Gumber aka Zachary Carter> if it ends up bothering me that much I will refactor later |
15:45:44 | FromDiscord | <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:54 | FromDiscord | <haxscramper> speaking of "deriving from C++ class" - I just finished proof-of-concept implementation for DSL |
15:49:55 | FromDiscord | <haxscramper> For deriving from C++ classes (and codegen in general) |
15:49:56 | FromDiscord | <haxscramper> because NiMiSNotAHEaDeRFilEGenerAtor |
15:49:57 | FromDiscord | <haxscramper> https://github.com/haxscramper/hnimast/blob/master/tests/cpp/tQWindow.nim#L41 |
15:53:10 | FromDiscord | <haxscramper> From DSL I generate this, then re-import it in main file |
15:53:14 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yia |
15:54:46 | FromDiscord | <haxscramper> And it seems like it is the best overall approach, though it looks like an absolute hack |
16:07:43 | FromDiscord | <Gumber aka Zachary Carter> nice |
16:09:53 | * | xet7 quit (Remote host closed the connection) |
16:10:43 | FromDiscord | <haxscramper> One MAJOR issue that I'm yet to figure out is using nim types in the generated code |
16:11:25 | FromDiscord | <haxscramper> In can't just include generated sources, because there is no way to reliably know which one generated what |
16:12:02 | FromDiscord | <haxscramper> And since --header is deprecated there is no way to actually put nim types somewhere and then use them |
16:12:28 | FromDiscord | <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:27 | FromDiscord | <Gumber aka Zachary Carter> :/ |
16:38:17 | FromDiscord | <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:21 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yip |
16:41:36 | FromDiscord | <haxscramper> Just use one object as a field for another one |
16:43:34 | FromDiscord | <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:05 | FromDiscord | <no name fits> Is there a UUID generator in the core lib? |
17:10:51 | FromDiscord | <Gumber aka Zachary Carter> No |
17:12:44 | FromDiscord | <Gumber aka Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=3yiz |
17:12:47 | FromDiscord | <Gumber aka Zachary Carter> which would be inheritance |
17:12:59 | FromDiscord | <Gumber aka Zachary Carter> or the object oriented style of data modeling |
17:16:02 | FromDiscord | <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:12 | FromDiscord | <reilly> In reply to @no name fits "Is there a UUID": Maybe look at https://github.com/pragmagic/uuids/ |
17:27:15 | nrds | <R2D299> itHub: 7"UUID library for Nim" |
17:28:21 | FromDiscord | <no name fits> Yeah I saw that one |
17:28:46 | FromDiscord | <no name fits> I was just interested in keeping dependencies low, so thought of asking first 🙂 |
17:29:09 | * | jjido joined #nim |
17:59:16 | FromDiscord | <Recruit_main707> can i avoid this pre declarations? `N_LIB_PRIVATE tyObject_ExampleBotRoL9afQLGHqCitseBtS82SQ exampleBot_main_62;` |
18:15:51 | FromDiscord | <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:20 | FromDiscord | <Gumber aka Zachary Carter> emit |
18:16:55 | FromDiscord | <Recruit_main707> if wanted to write c++ code id avoid nim directly :P |
18:17:27 | FromDiscord | <Recruit_main707> death or c++, hard choice tbg |
18:17:31 | FromDiscord | <Recruit_main707> (edit) "tbg" => "tbh" |
18:17:32 | FromDiscord | <Gumber aka Zachary Carter> Nim isn't C++, sometimes there's just no way |
18:17:37 | FromDiscord | <Gumber aka Zachary Carter> you can emit it or write a macro to do it |
18:17:39 | FromDiscord | <Gumber aka Zachary Carter> up to you |
18:18:10 | FromDiscord | <Recruit_main707> do you have any examples of your method? |
18:22:03 | FromDiscord | <Gumber aka Zachary Carter> Mm not really - I haven't tried to do it in a while |
18:22:16 | FromDiscord | <Gumber aka Zachary Carter> mostly because I try to avoid C++ libraries that make me implement some virtual interface |
18:22:38 | FromDiscord | <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:47 | FromDiscord | <Gumber aka Zachary Carter> github codesearch will probably be your best friend tbh |
18:26:33 | FromDiscord | <Recruit_main707> krux may have some stuff about this |
18:27:24 | FromDiscord | <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:33 | FromDiscord | <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:17 | FromDiscord | <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:17 | FromDiscord | <hotdog> The sound must be the entities screaming as they are destroyed |
18:59:30 | * | mdbauman joined #nim |
18:59:38 | FromDiscord | <Kiloneie> actually the sound only happens when they are made |
18:59:45 | FromDiscord | <Kiloneie> then silence |
19:02:56 | * | max22- joined #nim |
19:17:45 | FromDiscord | <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:07 | FromDiscord | <Skaruts> is it expensive to cast a C array to `ptr UncheckedArray` so I can access its elements? |
20:26:44 | FromDiscord | <Elegantbeef> it's free |
20:27:05 | FromDiscord | <Elegantbeef> `cast[T](someVar)` is free since it's just converting it in the type system |
20:28:43 | FromDiscord | <Skaruts> ah, thanks |
20:32:36 | FromDiscord | <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:23 | FromDiscord | <Skaruts> maybe luaJIT is doing it's magic really well or something |
20:33:56 | FromDiscord | <Elegantbeef> have you enabled `lto`? |
20:34:48 | FromDiscord | <Skaruts> I don't know what that is |
20:35:01 | FromDiscord | <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:07 | FromDiscord | <Yardanico> also what's your nim version? |
20:35:14 | FromDiscord | <Elegantbeef> link time optimization |
20:35:20 | FromDiscord | <Skaruts> 1.4.2 iirc |
20:35:33 | FromDiscord | <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:35 | FromDiscord | <Elegantbeef> Might make the output binary a bit more efficient |
20:36:13 | FromDiscord | <Skaruts> 1.4.8 actually |
20:36:17 | FromDiscord | <Yardanico> yeah, that's ok then |
20:36:22 | FromDiscord | <Yardanico> try with -d:danger -d:lto |
20:36:46 | FromDiscord | <Skaruts> gonna try that then |
20:38:12 | FromDiscord | <Elegantbeef> if you're on mac or using clang the `-d:lto` will not work |
20:38:22 | FromDiscord | <Yardanico> why so? |
20:38:24 | FromDiscord | <Yardanico> it'll work just with with clang |
20:38:31 | FromDiscord | <Yardanico> also @Skaruts you can try --gc:orc too |
20:38:36 | FromDiscord | <Yardanico> as an additional option |
20:38:42 | FromDiscord | <Elegantbeef> I thought it didnt work on mac due to using clang |
20:38:49 | FromDiscord | <Elegantbeef> I know it doesnt work on mac for a certainty |
20:39:08 | FromDiscord | <Yardanico> but it works with clang since clang generally has the same CLI as GCC |
20:39:17 | FromDiscord | <Yardanico> on linux clang compiles just with with -d:lto |
20:40:02 | FromDiscord | <Yardanico> ah actually you're right, yeah, it's because -d:lto is forcing a specific linker for some weird reason |
20:40:49 | FromDiscord | <Yardanico> --gc:orc -d:danger --passC:"-flto -march=native" --passL:"-flto" |
20:40:49 | FromDiscord | <Yardanico> :P |
20:41:08 | FromDiscord | <Elegantbeef> there you go |
20:41:19 | FromDiscord | <Skaruts> In reply to @Yardanico "also <@!338653900779421697> you can": yup |
20:41:24 | FromDiscord | <Yardanico> so how's the performance? |
20:41:46 | FromDiscord | <Skaruts> 1 sec |
20:42:15 | FromDiscord | <Elegantbeef> That's slow! \:P |
20:42:32 | FromDiscord | <Yardanico> maybe he calculated the answer to the universe in that 1 sec! |
20:42:43 | FromDiscord | <Skaruts> lol |
20:42:53 | FromDiscord | <Skaruts> just some distractions around me |
20:42:56 | FromDiscord | <Skaruts> dogs... |
20:43:26 | * | supakeen quit (Remote host closed the connection) |
20:43:50 | * | supakeen joined #nim |
20:44:01 | FromDiscord | <Gumber aka Zachary Carter> don't blame dogs for your program's poor performance |
20:44:06 | FromDiscord | <Gumber aka Zachary Carter> it's not their fault |
20:44:39 | FromDiscord | <Gumber aka Zachary Carter> poor good bois getting blamed for things they have no control over |
20:45:39 | FromDiscord | <Skaruts> no difference, so the bottleneck is probably elsewhere |
20:45:46 | FromDiscord | <Skaruts> gonna have to do some profiling |
20:45:57 | FromDiscord | <Yardanico> yeah, it's pretty easy with tools that do C/C++ profiling |
20:46:06 | FromDiscord | <Yardanico> just compile your nim project with --debugger:native and you're all set |
20:46:19 | FromDiscord | <Elegantbeef> Or just hit your dogs until the program runs faster |
20:46:22 | FromDiscord | <Skaruts> it's probably in the lua side though |
20:46:34 | FromDiscord | <Yardanico> also potentially -d:useMalloc if you're using arc/orc and want to profile memory |
20:47:48 | FromDiscord | <Skaruts> thanks for the tips |
20:51:17 | nixfreak_nim[m] | nimble.directory cert is expired |
20:51:17 | nixfreak_nim[m] | https://nimble.directory/ |
20:52:09 | nixfreak_nim[m] | and its setup for HTS so most people will be blocked out by their browsers |
20:54:08 | FromDiscord | <Gumber aka Zachary Carter> I don't remember who made / owns that site |
20:54:47 | * | vicfred quit (Quit: Leaving) |
21:08:06 | FromDiscord | <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:53 | FromDiscord | <Gumber aka Zachary Carter> ah |
21:35:13 | FromDiscord | <Gumber aka Zachary Carter> man that union mixing GC'd memory limitation really needs some type of compiler error handling / warning |
21:35:17 | FromDiscord | <Gumber aka Zachary Carter> right now it just results in a sigsev |
21:35:23 | FromDiscord | <Gumber aka Zachary Carter> took me a while to realize what was happening |
21:36:05 | FromDiscord | <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:48 | FromDiscord | <Elegantbeef> Yea probably should have a warning which can be turned into an error if using gc'd memory in a union |
21:59:19 | FromDiscord | <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:10 | FromDiscord | <Gumber aka Zachary Carter> probably an error if it's going to crash the compiler like that |
23:07:56 | FromDiscord | <Skaruts> if I do `let array = cast[ptr UncheckedArray[MyType]](c_array)`, do I need to destroy this pointer later? |
23:11:13 | FromDiscord | <Elegantbeef> no pointers are stack allocated, if you dont want the Carray anymore you do need to dealloc it |
23:12:05 | FromDiscord | <Skaruts> ah I see |
23:12:11 | FromDiscord | <Skaruts> thx |
23:17:46 | * | arkurious quit (Quit: Leaving) |