00:00:12 | FromDiscord | <Elegantbeef> It's generally cleaner i think |
00:01:22 | FromDiscord | <Elegantbeef> `var /r /c` do you need to escape these with `/` |
00:02:05 | FromDiscord | <geekrelief> It makes it clearer what variables are for substitution. |
00:02:42 | FromDiscord | <geekrelief> it's possible the user wants to use short variable names in their template. Plus I want those symbols to jump out at you for readability. |
00:03:23 | FromDiscord | <geekrelief> But maybe that's not necessary. |
00:03:47 | FromDiscord | <geekrelief> I'll play around with your suggestions. Thanks! |
00:03:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3G1Z |
00:03:58 | FromDiscord | <geekrelief> Yeah I thought of templates as a counterpoint. |
00:04:39 | FromDiscord | <geekrelief> But I wanted to keep the syntax in the domain of a DSL because I'm still experimenting with what I want this to be. |
00:06:11 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3G20 |
00:07:04 | FromDiscord | <geekrelief> I haven't found a nice syntax for not repeating some elements. Maybe I'll create another macro as a wrapper? |
00:36:09 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3G27 |
01:02:57 | * | krux02 quit (Remote host closed the connection) |
01:23:29 | FromDiscord | <exelotl> sent a long message, see http://ix.io/3G2f |
01:28:58 | FromDiscord | <impbox [ftsf]> No prefix and make it pure? |
01:30:09 | FromDiscord | <impbox [ftsf]> With a prefix I'd go with rs |
01:49:56 | * | arkurious quit (Quit: Leaving) |
02:22:44 | * | krux02 joined #nim |
02:29:46 | FromDiscord | <exelotl> I wouldn't do pure, but certainly considering --experimental:overloadableEnums lol |
02:30:41 | FromDiscord | <exelotl> I'd like to stay compatible with Nim 1.4.x though since that's what Debian users get |
02:31:05 | FromDiscord | <exelotl> so yeah I guess I'll go with `rs` thanks |
02:39:43 | * | neurocyte0132889 quit (Ping timeout: 260 seconds) |
02:47:59 | * | vicecea quit (Remote host closed the connection) |
02:48:59 | * | vicecea joined #nim |
03:17:48 | * | krux02 quit (Remote host closed the connection) |
03:24:18 | NimEventer | New thread by Namisboss: Is it Possible to Catch or Intercept a Proc Call?, see https://forum.nim-lang.org/t/8652 |
03:57:36 | FromDiscord | <metherul> Is anyone else dealing with significant text entry lag in vscode with saem's extension? |
03:58:02 | FromDiscord | <metherul> Could be because of `winim`, want to double check before I manually import everything. |
03:58:28 | FromDiscord | <Elegantbeef> Like the editor slows down or the suggestions slow down? |
04:00:58 | FromDiscord | <metherul> Editor itself, suggestions are generally fine. |
04:01:15 | FromDiscord | <Elegantbeef> Odd havent experienced this, but i've never used winim |
04:02:00 | FromDiscord | <metherul> It's a large import (even with `winim/lean`). Since the slowdown occurs just before the suggestions box being shown I'm assuming they're connected. |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:30 | * | supakeen joined #nim |
04:12:47 | * | lumo_e quit (Remote host closed the connection) |
04:23:07 | FromDiscord | <Elegantbeef> I do not know how to profile/diagnose this so cant say much, but look into how |
04:27:10 | FromDiscord | <metherul> Yeah, going to have to. I switch to devel to see if nimsuggest would perform better, completely broke the extension. |
04:27:49 | FromDiscord | <metherul> On the bright side it fixed the text input lag. |
04:30:55 | * | _c joined #nim |
04:50:49 | * | xet7 quit (Remote host closed the connection) |
04:51:41 | * | xet7 joined #nim |
05:04:14 | * | xet7 quit (Remote host closed the connection) |
05:04:57 | * | xet7 joined #nim |
05:08:52 | * | xet7 quit (Remote host closed the connection) |
05:09:46 | * | xet7 joined #nim |
05:15:03 | NimEventer | New Nimble package! htmlunescape - Port of Python's html.escape and html.unescape to Nim, see https://github.com/AmanoTeam/htmlunescape |
05:21:24 | * | rockcavera quit (Remote host closed the connection) |
06:59:31 | * | qwr quit (Ping timeout: 250 seconds) |
07:03:35 | FromDiscord | <galaxysnail> The manual says [any non-ASCII Unicode character can be an identifier](https://nim-lang.org/docs/manual.html#lexical-analysis-identifiers-amp-keywords), but is it dangerous? It seems to be even worse than [trojan source](https://trojansource.codes/). Or is there any way to forbid Unicode identifier? |
07:04:31 | FromDiscord | <Elegantbeef> There is no way to disable them afaik, and it's not really an issue with compiler as much as with editor |
07:19:09 | * | advesperacit joined #nim |
07:19:53 | * | tinystoat is now known as typonese |
07:20:59 | * | typonese is now known as tinystoat |
07:23:41 | * | advesperacit quit (Ping timeout: 245 seconds) |
07:23:48 | * | advesperacit_ joined #nim |
07:34:49 | FromDiscord | <impbox [ftsf]> you could disable them with a `#?` thingy |
07:34:54 | FromDiscord | <impbox [ftsf]> cause them to error |
07:35:27 | FromDiscord | <impbox [ftsf]> (i suspect) |
07:36:19 | FromDiscord | <impbox [ftsf]> hmm is `#?` documented anywhere? |
07:36:35 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/filters.html |
07:38:14 | FromDiscord | <impbox [ftsf]> ta, hmm maybe not easy to do with that either |
07:41:50 | FromDiscord | <Elegantbeef> It probably wouldnt be overly difficult to add to the lexer to have a flag that errors if it contains unicode, but i very much think it's smarter for editors to handle this |
07:42:25 | FromDiscord | <impbox [ftsf]> hmm I was thinking more for automated tooling |
07:42:41 | FromDiscord | <impbox [ftsf]> but probably easier to just run a script over the files first |
07:42:51 | FromDiscord | <impbox [ftsf]> unless it comes in via a nimble package perhaps |
07:44:02 | FromDiscord | <Elegantbeef> You'd almost certainly want to check every file you're using which is where you'd want the compiler support |
07:56:00 | * | kayabaNerve joined #nim |
08:01:03 | advesperacit_ | Is it possible to set a timeout for a channel.recv() in any way? |
08:04:30 | FromDiscord | <Elegantbeef> It seems there isnt a way so i guess you do a dumb spin |
08:05:31 | * | jjido joined #nim |
08:08:13 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3G3q something like this |
08:11:29 | advesperacit_ | Thanks, that's how I've gone about it right now together with a sleep. Good to know there isn't a "proper" way. |
08:11:51 | FromDiscord | <Elegantbeef> I could've sworn there was but seems there is not |
08:40:02 | * | booyTheLa joined #nim |
08:40:10 | booyTheLa | How do I fix Error: cannot open file: packages/docutils/dochelpers when building the compiler? |
08:40:38 | FromDiscord | <Elegantbeef> How are you building the compiler? |
08:40:47 | booyTheLa | koch boot |
08:41:14 | FromDiscord | <Elegantbeef> Hmmm odd that you're getting that error |
08:41:58 | FromDiscord | <Elegantbeef> Does it exist in `lib/packages/docutils`? |
08:43:13 | booyTheLa | Oh, weird, there is a folder lib/packages in my Nim installation but it only has the modules rst, rstast, rstgen and highlite |
08:43:33 | booyTheLa | Thanks for the help! |
08:46:15 | FromDiscord | <Elegantbeef> that helped somehow? 😛 |
08:51:08 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:51:31 | * | kayabaNerve quit (Ping timeout: 250 seconds) |
09:59:29 | * | booyTheLa quit (Quit: Client closed) |
10:08:38 | FromDiscord | <tandy> what type do i need to create a non initialised var HashSet? |
10:09:08 | FromDiscord | <tandy> oh i just ned to import std/sets |
10:21:29 | FromDiscord | <tandy> wait, can you not have HashSets of (int, int) values? |
10:22:11 | FromDiscord | <Rika> You can? What’s the issue |
10:25:28 | FromDiscord | <Rika> !eval import std/sets; var a: HashSet[tuple[a: int, b: int]] |
10:25:29 | FromDiscord | <Rika> Let's see |
10:25:31 | NimBot | <no output> |
10:25:39 | FromDiscord | <tandy> ohh i see |
10:25:39 | FromDiscord | <Rika> Yeah what's the issue |
10:25:48 | FromDiscord | <tandy> i need to type it properly |
10:26:00 | FromDiscord | <Rika> !eval import std/sets; var a: HashSet[(int, int)] |
10:26:03 | NimBot | <no output> |
10:26:12 | FromDiscord | <Rika> I don't know what issue you got |
10:26:31 | FromDiscord | <Elegantbeef> You did `Hashset[int, int]` didnt you?! |
10:26:33 | FromDiscord | <tandy> is `tuple[a: int, b: int]` different from `(int, int)` |
10:26:35 | FromDiscord | <tandy> \:O |
10:26:41 | FromDiscord | <Elegantbeef> One has name fields the other doesnt |
10:26:45 | FromDiscord | <tandy> oh i see |
10:27:06 | FromDiscord | <Elegantbeef> so you can do `yourTup.a` which turns into `yourTup[0]` |
10:28:06 | FromDiscord | <tandy> you can unpack both tho? |
10:28:16 | FromDiscord | <Elegantbeef> Yea it's just syntax sugar |
10:29:43 | FromDiscord | <tandy> how do u init a `tuple[x: int, y: int]`? |
10:30:09 | FromDiscord | <tandy> `tuple(x: int1, y: int2)`? |
10:30:21 | FromDiscord | <tandy> can you do implicit conversions? |
10:31:00 | FromDiscord | <Elegantbeef> `(10, 20)` `(a: 10, b: 20)` |
10:33:06 | FromDiscord | <tandy> hmmmty |
11:21:15 | FromDiscord | <tandy> OT but has anyone here configured vscodium to run tests on save? |
11:22:58 | FromDiscord | <Rika> You can do that? |
11:23:59 | FromDiscord | <tandy> i think so |
11:24:05 | FromDiscord | <tandy> there are extensions to run tasks on save |
11:24:18 | FromDiscord | <tandy> would be nice to have it run in the terminal so was wondering if anyone had a nice setup |
11:32:02 | FromDiscord | <tandy> Trigger Task on Save and adding `nimble test` as a task worked |
11:34:31 | * | neurocyte0132889 joined #nim |
11:34:31 | * | neurocyte0132889 quit (Changing host) |
11:34:31 | * | neurocyte0132889 joined #nim |
11:38:23 | * | NeoCron joined #nim |
11:47:16 | * | PMunch joined #nim |
11:52:56 | * | jjido joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:10:31 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3G4g |
12:35:05 | FromDiscord | <claude> sent a code paste, see https://play.nim-lang.org/#ix=3G4l |
12:35:45 | FromDiscord | <claude> not worth it obviously |
12:35:54 | * | PMunch quit (Ping timeout: 260 seconds) |
12:35:57 | FromDiscord | <Rika> newSoq lmfao |
12:36:42 | FromDiscord | <Rika> why do you have to do `type T`? |
12:37:26 | * | PMunch joined #nim |
12:47:54 | FromDiscord | <claude> template bug |
12:48:08 | FromDiscord | <claude> they dont expand the generic parameter names to types or something idk |
13:04:44 | * | src joined #nim |
13:04:52 | * | rockcavera joined #nim |
13:04:53 | * | rockcavera quit (Changing host) |
13:04:53 | * | rockcavera joined #nim |
13:09:20 | FromDiscord | <hmmm> we need a mascot as good as golang, this is not negotiable |
13:09:48 | FromDiscord | <hmmm> it must be a panda with a nimcrown :nim1: |
13:10:09 | FromDiscord | <hmmm> who has the skills and guts to get it done? |
13:11:38 | FromDiscord | <Rika> who are you |
13:12:16 | FromDiscord | <hmmm> I'm your friendly neighborhood hmm of course! |
13:12:41 | FromDiscord | <Rika> i dont know you |
13:12:48 | FromDiscord | <hmmm> hmmm |
13:12:56 | FromDiscord | <hmmm> 🧐 |
13:19:21 | * | tiorock joined #nim |
13:19:22 | * | tiorock quit (Changing host) |
13:19:22 | * | tiorock joined #nim |
13:19:22 | * | rockcavera is now known as Guest4697 |
13:19:22 | * | tiorock is now known as rockcavera |
13:21:50 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:22:44 | FromDiscord | <hmmm> done! https://media.discordapp.net/attachments/371759389889003532/913419434855653406/shipit.jpg |
13:22:47 | * | Guest4697 quit (Ping timeout: 260 seconds) |
13:31:06 | FromDiscord | <Benjamin> A liger would make more sense, since it's the offspring of the two animals most frequently referred to as King of the Jungle/Animals/Beasts |
13:31:19 | FromDiscord | <Rika> why not lord nimrod himself |
13:31:31 | FromDiscord | <Rika> badass vs cute xd |
13:32:29 | FromDiscord | <gogolxdong (liuxiaodong)> Anyone knows how to pass Bool argument in nim-web3 contract proc? |
13:57:24 | * | jjido joined #nim |
14:01:26 | * | arkurious joined #nim |
14:22:06 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
14:33:01 | FromDiscord | <exelotl> In reply to @hmmm "we need a mascot": we were handed the perfect mascot on a silver plate and everyone turned their noses up at it. :( https://media.discordapp.net/attachments/371759389889003532/913437119685484584/39615311-627cbc2a-4fb0-11e8-8ecc-9f76430cab97.png |
14:33:29 | FromDiscord | <hmmm> oh it's so cute |
15:07:30 | FromDiscord | <tandy> who made it? |
15:07:30 | FromDiscord | <tandy> this is beautiful↵(@exelotl) |
15:07:33 | FromDiscord | <Slava0135> ~~unpopular opinion: technoblade should be Nim mascot~~ |
15:08:02 | FromDiscord | <noow> lmao, techno with the nim crown |
15:08:37 | FromDiscord | <exelotl> @tandy it was drawn by rigani: https://github.com/nim-lang/RFCs/issues/104 |
15:10:19 | FromDiscord | <Slava0135> https://media.discordapp.net/attachments/371759389889003532/913446509113122907/20201208_002812.jpg |
15:11:54 | FromDiscord | <tandy> i guess the point about go's mascot makes sense↵(@exelotl) |
15:16:46 | * | xet7 quit (Quit: Leaving) |
15:18:37 | * | xet7 joined #nim |
15:26:16 | * | PMunch quit (Quit: Leaving) |
15:29:03 | FromDiscord | <exelotl> I don't think it's _that_ similar really |
15:30:06 | FromDiscord | <Rika> It’s not that similar |
15:36:48 | * | advesperacit_ quit (Quit: advesperacit_) |
15:47:56 | * | advesperacit joined #nim |
15:57:42 | * | dtomato quit (Read error: Connection reset by peer) |
15:57:57 | * | dtomato joined #nim |
16:04:17 | NimEventer | New thread by Gcao: Malloc issue after upgrading from 1.4.6 to 1.6.0, see https://forum.nim-lang.org/t/8653 |
16:14:10 | FromDiscord | <noow> In reply to @exelotl "we were handed the": this one is adorable |
16:16:14 | * | lumo_e joined #nim |
16:21:45 | NimEventer | New Nimble package! localize - Compile time localization for applications, see https://github.com/levovix0/localize |
16:35:47 | FromDiscord | <hmmm> I officially adopted nimmy |
16:36:03 | FromDiscord | <hmmm> how is he placed in the roadmap? |
16:47:32 | FromDiscord | <tandy> https://github.com/levovix0/DMusic |
16:47:43 | FromDiscord | <tandy> wow a gui nim app that looks very nice |
16:48:14 | FromDiscord | <IsaacPaul> 😮 |
16:48:48 | FromDiscord | <enthus1ast> it partially wraps qt |
16:56:49 | FromDiscord | <dom96> Nice, I wonder how performant QML is vs. Electron |
16:57:28 | FromDiscord | <enthus1ast> the thing with current "nice" guis is, that they just look nice |
16:58:08 | FromDiscord | <enthus1ast> the "workhorse" guis do not need to look nice |
16:58:25 | FromDiscord | <enthus1ast> see eg\: totalcmd or irfanview |
16:58:53 | FromDiscord | <enthus1ast> but they need a ton of features |
16:59:07 | FromDiscord | <enthus1ast> and do not waste screen space |
17:01:43 | FromDiscord | <enthus1ast> and must be very responsive, all these key features i do not see very often in todays gui apps unfortunately |
17:14:13 | FromDiscord | <Rika> Most people don’t use those applications |
17:14:51 | FromDiscord | <Rika> You don’t need to give up an elegant UI to have a productive one |
17:15:22 | FromDiscord | <enthus1ast> show me one productive app with an "elegant" ui |
17:15:55 | FromDiscord | <enthus1ast> but maybe in offtopic |
17:16:46 | FromDiscord | <hmmm> sublimetext |
17:16:58 | FromDiscord | <hmmm> 👑 |
17:21:23 | FromDiscord | <NullCode> hi people |
17:21:29 | FromDiscord | <NullCode> what've yall been upto |
17:47:20 | * | FromDiscord quit (Read error: Connection reset by peer) |
17:48:11 | * | FromDiscord joined #nim |
17:54:47 | FromDiscord | <Hamid Bluri> In reply to @NullCode "what've yall been upto": ask in offtopic |
17:55:28 | FromDiscord | <NullCode> no |
17:55:34 | FromDiscord | <exelotl> In reply to @hmmm "I officially adopted nimmy": based |
17:58:52 | FromDiscord | <IsaacPaul> What happens if I call newSeq and there is no memory left? does it throw? |
17:59:42 | FromDiscord | <IsaacPaul> or does nim expect me to check if memory is available before hand? |
18:01:30 | Amun-Ra | there's no need to check the result of newSeq |
18:02:08 | Amun-Ra | I mean except of checking exception, which one? dunno |
18:07:13 | FromDiscord | <IsaacPaul> Well I'm porting some code, and it allocates a buffer that could exceed 1GB of ram. |
18:07:41 | FromDiscord | <IsaacPaul> It's not exactly the best way to decompress a file but I wanted to make a 1to1 port and do improvements later |
18:16:41 | FromDiscord | <IsaacPaul> ah I can just use c_malloc() |
18:22:43 | FromDiscord | <LS> hi everyone!↵is there a way to get all types in project at compile time? |
18:29:03 | FromDiscord | <leorize> you can't |
18:30:12 | FromDiscord | <Schelz> Is possible to done a kernel driver in nim ? |
18:30:31 | FromDiscord | <leorize> yes it is, but it's hard and not very well supported |
18:30:56 | FromDiscord | <Recruit_main707> well, its not hard, as in harder than in c or c++ |
18:31:01 | FromDiscord | <Schelz> Can you tell me please the module name ? |
18:31:15 | FromDiscord | <Recruit_main707> there is an example kernel out there |
18:31:16 | FromDiscord | <leorize> `--os:any` and `--gc:arc` or `--gc:orc` is your friend for this, but documentation is very scarce |
18:31:50 | FromDiscord | <enthus1ast> https://github.com/dom96/nimkernel |
18:31:55 | FromDiscord | <Recruit_main707> there |
18:32:01 | FromDiscord | <Schelz> thanks |
18:32:25 | FromDiscord | <leorize> Zevv did create an effort for building Linux kernel with Nim |
18:32:45 | FromDiscord | <leorize> I believe they are now a part of `--os:any`, but its sorta hairy |
18:39:23 | Zevv | --os:any integrates pretty well with the linux kernel; you do need to provide some glue though to provide basic things like malloc() and printf() which are assumed to be available by nim |
18:39:45 | Zevv | but it's too late right, rust was there first |
18:40:29 | FromDiscord | <retkid> so like |
18:40:34 | FromDiscord | <retkid> what editor / ide you use |
18:40:42 | FromDiscord | <retkid> i dont wanna use vscode but i cant find anything as good |
18:41:11 | FromDiscord | <retkid> I've tried various emacs and vim, geney, etc |
18:41:18 | Zevv | what's your problem with those |
18:41:23 | Zevv | the editors themselves of the nim integration? |
18:42:01 | FromDiscord | <retkid> I like geany but no NIm intergration and god knows what other features i might need that it just wont have |
18:42:16 | Zevv | i don't know geany, doesn't it provide LSP support? |
18:42:26 | Zevv | that's the factory standard glue to any language server these days |
18:42:29 | FromDiscord | <Recruit_main707> there is intellij but its not better than vscode |
18:43:06 | FromDiscord | <Recruit_main707> it is promising tho, but it wasnt updated in a while either (the develoepr was gonna work on it soon in theory tho) |
18:43:58 | FromDiscord | <retkid> no LSP |
18:44:10 | FromDiscord | <retkid> Inteliji is mostly closed source? |
18:44:13 | FromDiscord | <retkid> i dunno |
18:44:38 | FromDiscord | <Recruit_main707> it does have lsp, but it doesnt work well |
18:45:06 | FromDiscord | <retkid> I don't like intelij because of lack of syntax highlighting for Java and Kotlin, it doesn''t have every single element differentiated so some of the functions are just white |
18:45:25 | FromDiscord | <retkid> and when i see white functions i just have panic attacks i dont know why |
18:45:39 | FromDiscord | <retkid> syntax coloring being wrong is just a fucking panic attack |
18:47:19 | * | Vladar joined #nim |
18:47:19 | nrds | <Prestige99> So is IC supposed to help with editor support somehow? |
18:47:19 | FromDiscord | <retkid> i guess i'll block microsoft servers after I install my plugins |
18:47:30 | nrds | <Prestige99> Seems that nimsuggest might be our biggest issue atm |
18:49:08 | FromDiscord | <IsaacPaul> In reply to @IsaacPaul "What happens if I": Nim won't let you allocate above stack size it's all evaluated at compile time. If its on the heap then it's a ref and returns nil when out of memory (no exception thrown) |
19:02:37 | FromDiscord | <exelotl> Prestige: yep, afaik nimsuggest won't need to be a daemon anymore. It'll just be a simple command that reads the intermediate ".rod" files and returns a result |
19:03:17 | FromDiscord | <IsaacPaul> In reply to @IsaacPaul "Nim won't let you": infinitely adding to a seq will eventually make the program hang and the os complain about the system being out of memory (on macos) |
19:04:30 | FromDiscord | <exelotl> I don't really know the details, but I wonder if reading every rodfile from disk every time could be expensive, so maybe having it as a daemon would still be beneficial |
19:04:39 | FromDiscord | <exelotl> but the work it has to do would be much simpler I guess |
19:05:17 | FromDiscord | <Sevos> @IsaacPaul you... |
19:05:19 | FromDiscord | <Sevos> how dare you |
19:21:11 | * | lumo_e quit (Ping timeout: 260 seconds) |
19:35:29 | arkanoid | the nim roadmap posted by araq says "More of the standard library should be moved to external Nimble packages. How far we get with this is unclear." this concept of moving things out of the standard library is making me more and more uncertain about the future of the language ecosystem. What's the point of moving a nim module from the "approved by the nim masters" bucket to the "community" bucket? I'm |
19:35:31 | arkanoid | already having problems in finding out which "community" module should be used or not |
19:38:14 | arkanoid | I mean, the nim community is not so large to give obvious direction about which community modules should be used. I could use github metadata, or suggestion from forum, but none of this comes before the stdlib |
19:46:49 | * | rockcavera quit (Remote host closed the connection) |
19:53:19 | * | DaiC joined #nim |
20:00:08 | FromDiscord | <leorize> it does that?↵(@IsaacPaul) |
20:00:11 | FromDiscord | <konsumlamm> it's hard to evovle stdlib, since they can only be updated with new releases and you can't break the API |
20:00:24 | FromDiscord | <konsumlamm> and some stdlib module just don't work well |
20:01:49 | FromDiscord | <konsumlamm> there are also some official packages (under the nim-lang organization) now, like bigints |
20:02:41 | FromDiscord | <IsaacPaul> In reply to @leorize "it does that? (<@193665725834067968>)": Here are my tests if you wanna try it yourself. https://gist.github.com/izackp/107a8f733c686276d396e30f65249d7c |
20:09:35 | FromDiscord | <exelotl> arkanoid: I believe there will be "recommended" modules linked to from the official docs |
20:10:45 | FromDiscord | <exelotl> sauce -> https://forum.nim-lang.org/t/8642#56223 |
20:19:03 | * | DaiC quit (Quit: Leaving) |
20:32:27 | FromDiscord | <IsaacPaul> In reply to @IsaacPaul "Here are my tests": Updated the gist with more examples 😛 |
20:35:18 | FromDiscord | <leorize> yea Nim doesn't prevent stack overuse at all |
20:36:22 | FromDiscord | <leorize> errors related to stack overuse (static array too large) is carried over to the backend where they may or may not error |
20:37:54 | FromDiscord | <IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3G6X |
20:38:07 | FromDiscord | <IsaacPaul> without casting |
20:38:20 | FromDiscord | <leorize> OOM in Nim is fatal |
20:38:21 | FromDiscord | <leorize> always |
20:38:35 | FromDiscord | <IsaacPaul> not in the above case |
20:38:36 | FromDiscord | <leorize> so you can't have an OOM condition in a Nim program |
20:38:51 | FromDiscord | <leorize> most OS have overcommit |
20:42:17 | FromDiscord | <leorize> also seq in Nim is not a pointer, so you can't cast it anyway \:p |
20:46:15 | FromDiscord | <IsaacPaul> oh yea you're right |
20:46:28 | FromDiscord | <IsaacPaul> I assumed it failed on the top level |
20:50:42 | * | krux02 joined #nim |
21:04:14 | * | lumo_e joined #nim |
21:06:21 | FromDiscord | <QueenFuckingAdrielle> is there a straightforward way to call a c++ function from nim? |
21:12:43 | * | lumo_e quit (Ping timeout: 260 seconds) |
21:13:44 | * | lumo_e joined #nim |
21:18:06 | * | rockcavera joined #nim |
21:18:06 | * | rockcavera quit (Changing host) |
21:18:07 | * | rockcavera joined #nim |
21:24:57 | FromDiscord | <Sevos> hey @IsaacPaul |
21:25:34 | FromDiscord | <impbox [ftsf]> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma |
21:25:36 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3G79 |
21:42:26 | FromDiscord | <QueenFuckingAdrielle> In reply to @impbox "you need to define": i have a couple other questions for you if you dont mind 😄 |
21:43:05 | FromDiscord | <QueenFuckingAdrielle> am i able to call a c external and a c++ external in the same program? would i still have to use the c++ backend for compilation? |
21:43:07 | FromDiscord | <impbox [ftsf]> sure, don't ask to ask, just ask =) |
21:43:31 | FromDiscord | <impbox [ftsf]> if you're calling C++ stuff you'll need to use the C++ backend unless it's extern C |
21:43:40 | FromDiscord | <impbox [ftsf]> you can call C stuff from C++ |
21:43:54 | FromDiscord | <impbox [ftsf]> but calling non extern C C++ stuff from C backend I suspect won't work |
21:44:27 | FromDiscord | <QueenFuckingAdrielle> gotcha, I'd have to see if that would effect portability in terms of hardware then |
21:45:00 | FromDiscord | <impbox [ftsf]> it won't affect hardware portability, but it does mean compilers need to agree on name mangling |
21:45:16 | FromDiscord | <QueenFuckingAdrielle> also im wondering how that would interact with memory allocated on the gpu |
21:45:46 | FromDiscord | <impbox [ftsf]> eg if some stuff is compiled with VC++ trying to call stuff compiled with G++ I suspect you'll run into name mangling issues... not sure if that's a a solved problem these days |
21:45:59 | FromDiscord | <impbox [ftsf]> should have nothing to do with anything on the GPU |
21:51:28 | FromDiscord | <QueenFuckingAdrielle> are there any other options to using the c++ backend if you are calling both an extern cpp and an extern c? can you decouple the program and compile separately or something? |
21:52:05 | FromDiscord | <QueenFuckingAdrielle> effectively using nim to glue c and c++ libraries together without trying to get the c library to compile with g++ directly? |
21:58:52 | * | advesperacit quit (Quit: advesperacit) |
21:59:15 | FromDiscord | <impbox [ftsf]> you could write a C wrapper for the C++ library |
21:59:49 | FromDiscord | <impbox [ftsf]> but probably best to just use the C++ backend |
22:02:39 | FromDiscord | <QueenFuckingAdrielle> gotcha, thanks thats what i figured |
22:43:36 | FromDiscord | <pyautogui> Question: might it be useful to have slices like [i..^x] or [i..x] implemented for `ropes`? |
22:44:20 | FromDiscord | <Elegantbeef> Probably not given their purpose |
22:45:48 | FromDiscord | <pyautogui> Got it. Thx. |
22:50:28 | FromDiscord | <evoalg> noob question: Why is `ref object` sometimes used at a type instead of just `object` ? I know `ref` creates a (safe) pointer, and pointers have a many-to-one thingy going on, but why is it useful to use `ref object` ? |
22:51:03 | FromDiscord | <Elegantbeef> Depends on the use case |
22:51:13 | FromDiscord | <Elegantbeef> Might also just be the programmer's ignorance |
22:52:04 | FromDiscord | <evoalg> I should avoid them? |
22:52:33 | FromDiscord | <Elegantbeef> Unless you need them |
22:52:56 | FromDiscord | <evoalg> what's an example where I might need them? |
22:53:02 | FromDiscord | <Elegantbeef> Some people use `ref` so they dont write `var` in proc calls and stuff |
22:53:24 | FromDiscord | <evoalg> ahhh but that's not good practice I guess |
22:53:31 | FromDiscord | <Elegantbeef> Indeed |
22:54:22 | FromDiscord | <Recruit_main707> if you dont want to carry around heaving objects, you can use `ref object` and that way all your code will be passing around a reference implicitly |
22:54:30 | FromDiscord | <Recruit_main707> heavy |
22:54:37 | FromDiscord | <Elegantbeef> Ehhh that's the case even without ref |
22:54:47 | FromDiscord | <Elegantbeef> If you arent doing `var a = b` and just using proc calls |
22:55:01 | FromDiscord | <Recruit_main707> now that you mention it yeah xP |
22:55:36 | FromDiscord | <Elegantbeef> The reason for ref is that you want the semantics in one way or another, if you need a cyclical data structure, if you want to be able to reference things but store it in a collection.... |
22:55:44 | FromDiscord | <Recruit_main707> never really liked that tho, its never mentioned anywhere |
22:56:05 | FromDiscord | <Recruit_main707> inheritance does need refs |
22:56:34 | FromDiscord | <Elegantbeef> I mean it's mentioned and it's a performance optimisation that has 0 effect on your code |
22:57:48 | FromDiscord | <Recruit_main707> it can, it did to me and that why i know it happens, and had to ask here to know about it |
22:58:28 | FromDiscord | <Elegantbeef> It only really matters if you try to take address of the parameters and mutate that |
22:58:53 | FromDiscord | <Elegantbeef> It shouldnt have much of an implication on the program flow or writing |
22:59:40 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3G7v |
23:00:04 | FromDiscord | <Recruit_main707> no, but i just wish it was to the user to decide with a flag or something (i know {.bycopy.} does this) |
23:01:59 | FromDiscord | <Zoom> If you use geany post anything here to attract attention to the PR\: https://github.com/geany/geany/pull/2988↵(@retkid) |
23:02:06 | FromDiscord | <Elegantbeef> Purposely making your code slower is interesting 😛 |
23:04:40 | FromDiscord | <Elegantbeef> Does geany have linting/autocomplete yet? |
23:05:31 | FromDiscord | <Zoom> It autocompletes based on the code at hand, IIRC |
23:05:52 | FromDiscord | <Elegantbeef> it was per file auto complete the last i tried it |
23:09:26 | FromDiscord | <Zoom> I don't get why the project has 9 pages of open pull requests, though. |
23:13:14 | FromDiscord | <Zoom> It's not even code in my case, just a few keywords in the config updated. The same happened a few years ago when I tried to update the config for Rust. PR stalled for some weeks until they merged some newer one (it had more stuff in it, though). |
23:24:56 | * | src quit (Quit: Leaving) |
23:29:10 | NimEventer | New thread by FernandoTorres: Unicode sequences add a space (ASCII 32) character after every unicode letter in Windows, see https://forum.nim-lang.org/t/8654 |
23:29:34 | FromDiscord | <tandy> is anyone here a big maths brain? |
23:29:54 | FromDiscord | <tandy> how do i calculate whether there is an integer midpoint between to coordinates? |
23:30:27 | FromDiscord | <tandy> im trying to figure out whether two coordinates are adjacent, or whether they have a gap between them |
23:31:11 | FromDiscord | <tandy> such as (5,0) and (4,1), these two are adjacent, but how can i find this mathematicaly? |
23:31:19 | * | src joined #nim |
23:31:31 | * | src quit (Remote host closed the connection) |
23:32:24 | * | DaiC joined #nim |
23:32:46 | DaiC | Is there a built-in stack type? |
23:33:46 | FromDiscord | <impbox [ftsf]> deque |
23:34:05 | FromDiscord | <Elegantbeef> You can just do `seq.add` and `seq.pop` if you want a FILO stack |
23:34:13 | FromDiscord | <Elegantbeef> if you want a FIFO deque is what you want |
23:34:19 | FromDiscord | <impbox [ftsf]> https://nim-lang.org/docs/deques.html |
23:34:42 | FromDiscord | <impbox [ftsf]> yeah, seq is fine for a simple stack |
23:34:54 | FromDiscord | <DaiChimpo> Oh nice thanks |
23:35:02 | FromDiscord | <Elegantbeef> Well if you want a FILO it's the best you can do 😛 |
23:35:09 | FromDiscord | <DaiChimpo> Yeah FILO is exactly what I need |
23:35:10 | FromDiscord | <impbox [ftsf]> I usually end up using deques for "decks of cards" |
23:35:14 | FromDiscord | <Elegantbeef> `O(1)` adds and \`O(1) removes |
23:35:47 | FromDiscord | <Elegantbeef> \well i guess the caveat on the `O(1)` add is that you dont need to grow the seq& |
23:35:58 | FromDiscord | <Elegantbeef> Jeezus i cannot hit the right keys today |
23:36:15 | FromDiscord | <impbox [ftsf]> it's just a bigger 1 |
23:36:41 | FromDiscord | <that_dude> In reply to @tandy "such as (5,0) and": Well for checking adjacency, wouldn't something like `if (abs(a.x - b.x) <= 1) and abs(a.y - b.y) <= 1)` work? as for checking the midpoint, you could just check whether `(a.x + b.x)/2` and `(a.y + b.y)/2` are integers |
23:37:10 | * | DaiC quit (Quit: Leaving) |
23:38:54 | FromDiscord | <impbox [ftsf]> In reply to @tandy "such as (5,0) and": they're adjacent diagonally, not orthogonally, good to be specific with adjacency |
23:39:12 | FromDiscord | <impbox [ftsf]> In reply to @that_dude "Well for checking adjacency,": that will also return true if they are the same cell |
23:39:26 | FromDiscord | <that_dude> just throw in another check then ig |
23:40:30 | * | krux02 quit (Remote host closed the connection) |
23:42:45 | FromDiscord | <tandy> ahhhhh↵(@that_dude) |
23:42:50 | FromDiscord | <tandy> this worked perfectly |
23:42:50 | FromDiscord | <DaiChimpo> Yeah, if a!=b, and dist(a,b) < 2 |
23:43:19 | FromDiscord | <that_dude> :) |
23:44:06 | * | Vladar quit (Quit: Leaving) |