<< 25-11-2021 >>

00:00:12FromDiscord<Elegantbeef> It's generally cleaner i think
00:01:22FromDiscord<Elegantbeef> `var /r /c` do you need to escape these with `/`
00:02:05FromDiscord<geekrelief> It makes it clearer what variables are for substitution.
00:02:42FromDiscord<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:23FromDiscord<geekrelief> But maybe that's not necessary.
00:03:47FromDiscord<geekrelief> I'll play around with your suggestions. Thanks!
00:03:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3G1Z
00:03:58FromDiscord<geekrelief> Yeah I thought of templates as a counterpoint.
00:04:39FromDiscord<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:11FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3G20
00:07:04FromDiscord<geekrelief> I haven't found a nice syntax for not repeating some elements. Maybe I'll create another macro as a wrapper?
00:36:09FromDiscord<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:29FromDiscord<exelotl> sent a long message, see http://ix.io/3G2f
01:28:58FromDiscord<impbox [ftsf]> No prefix and make it pure?
01:30:09FromDiscord<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:46FromDiscord<exelotl> I wouldn't do pure, but certainly considering --experimental:overloadableEnums lol
02:30:41FromDiscord<exelotl> I'd like to stay compatible with Nim 1.4.x though since that's what Debian users get
02:31:05FromDiscord<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:18NimEventerNew thread by Namisboss: Is it Possible to Catch or Intercept a Proc Call?, see https://forum.nim-lang.org/t/8652
03:57:36FromDiscord<metherul> Is anyone else dealing with significant text entry lag in vscode with saem's extension?
03:58:02FromDiscord<metherul> Could be because of `winim`, want to double check before I manually import everything.
03:58:28FromDiscord<Elegantbeef> Like the editor slows down or the suggestions slow down?
04:00:58FromDiscord<metherul> Editor itself, suggestions are generally fine.
04:01:15FromDiscord<Elegantbeef> Odd havent experienced this, but i've never used winim
04:02:00FromDiscord<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:07FromDiscord<Elegantbeef> I do not know how to profile/diagnose this so cant say much, but look into how
04:27:10FromDiscord<metherul> Yeah, going to have to. I switch to devel to see if nimsuggest would perform better, completely broke the extension.
04:27:49FromDiscord<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:03NimEventerNew 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:35FromDiscord<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:31FromDiscord<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:49FromDiscord<impbox [ftsf]> you could disable them with a `#?` thingy
07:34:54FromDiscord<impbox [ftsf]> cause them to error
07:35:27FromDiscord<impbox [ftsf]> (i suspect)
07:36:19FromDiscord<impbox [ftsf]> hmm is `#?` documented anywhere?
07:36:35FromDiscord<Elegantbeef> https://nim-lang.org/docs/filters.html
07:38:14FromDiscord<impbox [ftsf]> ta, hmm maybe not easy to do with that either
07:41:50FromDiscord<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:25FromDiscord<impbox [ftsf]> hmm I was thinking more for automated tooling
07:42:41FromDiscord<impbox [ftsf]> but probably easier to just run a script over the files first
07:42:51FromDiscord<impbox [ftsf]> unless it comes in via a nimble package perhaps
07:44:02FromDiscord<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:03advesperacit_Is it possible to set a timeout for a channel.recv() in any way?
08:04:30FromDiscord<Elegantbeef> It seems there isnt a way so i guess you do a dumb spin
08:05:31*jjido joined #nim
08:08:13FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3G3q something like this
08:11:29advesperacit_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:51FromDiscord<Elegantbeef> I could've sworn there was but seems there is not
08:40:02*booyTheLa joined #nim
08:40:10booyTheLaHow do I fix Error: cannot open file: packages/docutils/dochelpers when building the compiler?
08:40:38FromDiscord<Elegantbeef> How are you building the compiler?
08:40:47booyTheLakoch boot
08:41:14FromDiscord<Elegantbeef> Hmmm odd that you're getting that error
08:41:58FromDiscord<Elegantbeef> Does it exist in `lib/packages/docutils`?
08:43:13booyTheLaOh, weird, there is a folder lib/packages in my Nim installation but it only has the modules rst, rstast, rstgen and highlite
08:43:33booyTheLaThanks for the help!
08:46:15FromDiscord<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:38FromDiscord<tandy> what type do i need to create a non initialised var HashSet?
10:09:08FromDiscord<tandy> oh i just ned to import std/sets
10:21:29FromDiscord<tandy> wait, can you not have HashSets of (int, int) values?
10:22:11FromDiscord<Rika> You can? What’s the issue
10:25:28FromDiscord<Rika> !eval import std/sets; var a: HashSet[tuple[a: int, b: int]]
10:25:29FromDiscord<Rika> Let's see
10:25:31NimBot<no output>
10:25:39FromDiscord<tandy> ohh i see
10:25:39FromDiscord<Rika> Yeah what's the issue
10:25:48FromDiscord<tandy> i need to type it properly
10:26:00FromDiscord<Rika> !eval import std/sets; var a: HashSet[(int, int)]
10:26:03NimBot<no output>
10:26:12FromDiscord<Rika> I don't know what issue you got
10:26:31FromDiscord<Elegantbeef> You did `Hashset[int, int]` didnt you?!
10:26:33FromDiscord<tandy> is `tuple[a: int, b: int]` different from `(int, int)`
10:26:35FromDiscord<tandy> \:O
10:26:41FromDiscord<Elegantbeef> One has name fields the other doesnt
10:26:45FromDiscord<tandy> oh i see
10:27:06FromDiscord<Elegantbeef> so you can do `yourTup.a` which turns into `yourTup[0]`
10:28:06FromDiscord<tandy> you can unpack both tho?
10:28:16FromDiscord<Elegantbeef> Yea it's just syntax sugar
10:29:43FromDiscord<tandy> how do u init a `tuple[x: int, y: int]`?
10:30:09FromDiscord<tandy> `tuple(x: int1, y: int2)`?
10:30:21FromDiscord<tandy> can you do implicit conversions?
10:31:00FromDiscord<Elegantbeef> `(10, 20)` `(a: 10, b: 20)`
10:33:06FromDiscord<tandy> hmmmty
11:21:15FromDiscord<tandy> OT but has anyone here configured vscodium to run tests on save?
11:22:58FromDiscord<Rika> You can do that?
11:23:59FromDiscord<tandy> i think so
11:24:05FromDiscord<tandy> there are extensions to run tasks on save
11:24:18FromDiscord<tandy> would be nice to have it run in the terminal so was wondering if anyone had a nice setup
11:32:02FromDiscord<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:31FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3G4g
12:35:05FromDiscord<claude> sent a code paste, see https://play.nim-lang.org/#ix=3G4l
12:35:45FromDiscord<claude> not worth it obviously
12:35:54*PMunch quit (Ping timeout: 260 seconds)
12:35:57FromDiscord<Rika> newSoq lmfao
12:36:42FromDiscord<Rika> why do you have to do `type T`?
12:37:26*PMunch joined #nim
12:47:54FromDiscord<claude> template bug
12:48:08FromDiscord<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:20FromDiscord<hmmm> we need a mascot as good as golang, this is not negotiable
13:09:48FromDiscord<hmmm> it must be a panda with a nimcrown :nim1:
13:10:09FromDiscord<hmmm> who has the skills and guts to get it done?
13:11:38FromDiscord<Rika> who are you
13:12:16FromDiscord<hmmm> I'm your friendly neighborhood hmm of course!
13:12:41FromDiscord<Rika> i dont know you
13:12:48FromDiscord<hmmm> hmmm
13:12:56FromDiscord<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:44FromDiscord<hmmm> done! https://media.discordapp.net/attachments/371759389889003532/913419434855653406/shipit.jpg
13:22:47*Guest4697 quit (Ping timeout: 260 seconds)
13:31:06FromDiscord<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:19FromDiscord<Rika> why not lord nimrod himself
13:31:31FromDiscord<Rika> badass vs cute xd
13:32:29FromDiscord<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:01FromDiscord<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:29FromDiscord<hmmm> oh it's so cute
15:07:30FromDiscord<tandy> who made it?
15:07:30FromDiscord<tandy> this is beautiful↵(@exelotl)
15:07:33FromDiscord<Slava0135> ~~unpopular opinion: technoblade should be Nim mascot~~
15:08:02FromDiscord<noow> lmao, techno with the nim crown
15:08:37FromDiscord<exelotl> @tandy it was drawn by rigani: https://github.com/nim-lang/RFCs/issues/104
15:10:19FromDiscord<Slava0135> https://media.discordapp.net/attachments/371759389889003532/913446509113122907/20201208_002812.jpg
15:11:54FromDiscord<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:03FromDiscord<exelotl> I don't think it's _that_ similar really
15:30:06FromDiscord<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:17NimEventerNew 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:10FromDiscord<noow> In reply to @exelotl "we were handed the": this one is adorable
16:16:14*lumo_e joined #nim
16:21:45NimEventerNew Nimble package! localize - Compile time localization for applications, see https://github.com/levovix0/localize
16:35:47FromDiscord<hmmm> I officially adopted nimmy
16:36:03FromDiscord<hmmm> how is he placed in the roadmap?
16:47:32FromDiscord<tandy> https://github.com/levovix0/DMusic
16:47:43FromDiscord<tandy> wow a gui nim app that looks very nice
16:48:14FromDiscord<IsaacPaul> 😮
16:48:48FromDiscord<enthus1ast> it partially wraps qt
16:56:49FromDiscord<dom96> Nice, I wonder how performant QML is vs. Electron
16:57:28FromDiscord<enthus1ast> the thing with current "nice" guis is, that they just look nice
16:58:08FromDiscord<enthus1ast> the "workhorse" guis do not need to look nice
16:58:25FromDiscord<enthus1ast> see eg\: totalcmd or irfanview
16:58:53FromDiscord<enthus1ast> but they need a ton of features
16:59:07FromDiscord<enthus1ast> and do not waste screen space
17:01:43FromDiscord<enthus1ast> and must be very responsive, all these key features i do not see very often in todays gui apps unfortunately
17:14:13FromDiscord<Rika> Most people don’t use those applications
17:14:51FromDiscord<Rika> You don’t need to give up an elegant UI to have a productive one
17:15:22FromDiscord<enthus1ast> show me one productive app with an "elegant" ui
17:15:55FromDiscord<enthus1ast> but maybe in offtopic
17:16:46FromDiscord<hmmm> sublimetext
17:16:58FromDiscord<hmmm> 👑
17:21:23FromDiscord<NullCode> hi people
17:21:29FromDiscord<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:47FromDiscord<Hamid Bluri> In reply to @NullCode "what've yall been upto": ask in offtopic
17:55:28FromDiscord<NullCode> no
17:55:34FromDiscord<exelotl> In reply to @hmmm "I officially adopted nimmy": based
17:58:52FromDiscord<IsaacPaul> What happens if I call newSeq and there is no memory left? does it throw?
17:59:42FromDiscord<IsaacPaul> or does nim expect me to check if memory is available before hand?
18:01:30Amun-Rathere's no need to check the result of newSeq
18:02:08Amun-RaI mean except of checking exception, which one? dunno
18:07:13FromDiscord<IsaacPaul> Well I'm porting some code, and it allocates a buffer that could exceed 1GB of ram.
18:07:41FromDiscord<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:41FromDiscord<IsaacPaul> ah I can just use c_malloc()
18:22:43FromDiscord<LS> hi everyone!↵is there a way to get all types in project at compile time?
18:29:03FromDiscord<leorize> you can't
18:30:12FromDiscord<Schelz> Is possible to done a kernel driver in nim ?
18:30:31FromDiscord<leorize> yes it is, but it's hard and not very well supported
18:30:56FromDiscord<Recruit_main707> well, its not hard, as in harder than in c or c++
18:31:01FromDiscord<Schelz> Can you tell me please the module name ?
18:31:15FromDiscord<Recruit_main707> there is an example kernel out there
18:31:16FromDiscord<leorize> `--os:any` and `--gc:arc` or `--gc:orc` is your friend for this, but documentation is very scarce
18:31:50FromDiscord<enthus1ast> https://github.com/dom96/nimkernel
18:31:55FromDiscord<Recruit_main707> there
18:32:01FromDiscord<Schelz> thanks
18:32:25FromDiscord<leorize> Zevv did create an effort for building Linux kernel with Nim
18:32:45FromDiscord<leorize> I believe they are now a part of `--os:any`, but its sorta hairy
18:39:23Zevv--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:45Zevvbut it's too late right, rust was there first
18:40:29FromDiscord<retkid> so like
18:40:34FromDiscord<retkid> what editor / ide you use
18:40:42FromDiscord<retkid> i dont wanna use vscode but i cant find anything as good
18:41:11FromDiscord<retkid> I've tried various emacs and vim, geney, etc
18:41:18Zevvwhat's your problem with those
18:41:23Zevvthe editors themselves of the nim integration?
18:42:01FromDiscord<retkid> I like geany but no NIm intergration and god knows what other features i might need that it just wont have
18:42:16Zevvi don't know geany, doesn't it provide LSP support?
18:42:26Zevvthat's the factory standard glue to any language server these days
18:42:29FromDiscord<Recruit_main707> there is intellij but its not better than vscode
18:43:06FromDiscord<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:58FromDiscord<retkid> no LSP
18:44:10FromDiscord<retkid> Inteliji is mostly closed source?
18:44:13FromDiscord<retkid> i dunno
18:44:38FromDiscord<Recruit_main707> it does have lsp, but it doesnt work well
18:45:06FromDiscord<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:25FromDiscord<retkid> and when i see white functions i just have panic attacks i dont know why
18:45:39FromDiscord<retkid> syntax coloring being wrong is just a fucking panic attack
18:47:19*Vladar joined #nim
18:47:19nrds<Prestige99> So is IC supposed to help with editor support somehow?
18:47:19FromDiscord<retkid> i guess i'll block microsoft servers after I install my plugins
18:47:30nrds<Prestige99> Seems that nimsuggest might be our biggest issue atm
18:49:08FromDiscord<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:37FromDiscord<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:17FromDiscord<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:30FromDiscord<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:39FromDiscord<exelotl> but the work it has to do would be much simpler I guess
19:05:17FromDiscord<Sevos> @IsaacPaul you...
19:05:19FromDiscord<Sevos> how dare you
19:21:11*lumo_e quit (Ping timeout: 260 seconds)
19:35:29arkanoidthe 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:31arkanoidalready having problems in finding out which "community" module should be used or not
19:38:14arkanoidI 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:08FromDiscord<leorize> it does that?↵(@IsaacPaul)
20:00:11FromDiscord<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:24FromDiscord<konsumlamm> and some stdlib module just don't work well
20:01:49FromDiscord<konsumlamm> there are also some official packages (under the nim-lang organization) now, like bigints
20:02:41FromDiscord<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:35FromDiscord<exelotl> arkanoid: I believe there will be "recommended" modules linked to from the official docs
20:10:45FromDiscord<exelotl> sauce -> https://forum.nim-lang.org/t/8642#56223
20:19:03*DaiC quit (Quit: Leaving)
20:32:27FromDiscord<IsaacPaul> In reply to @IsaacPaul "Here are my tests": Updated the gist with more examples 😛
20:35:18FromDiscord<leorize> yea Nim doesn't prevent stack overuse at all
20:36:22FromDiscord<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:54FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3G6X
20:38:07FromDiscord<IsaacPaul> without casting
20:38:20FromDiscord<leorize> OOM in Nim is fatal
20:38:21FromDiscord<leorize> always
20:38:35FromDiscord<IsaacPaul> not in the above case
20:38:36FromDiscord<leorize> so you can't have an OOM condition in a Nim program
20:38:51FromDiscord<leorize> most OS have overcommit
20:42:17FromDiscord<leorize> also seq in Nim is not a pointer, so you can't cast it anyway \:p
20:46:15FromDiscord<IsaacPaul> oh yea you're right
20:46:28FromDiscord<IsaacPaul> I assumed it failed on the top level
20:50:42*krux02 joined #nim
21:04:14*lumo_e joined #nim
21:06:21FromDiscord<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:57FromDiscord<Sevos> hey @IsaacPaul
21:25:34FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
21:25:36FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3G79
21:42:26FromDiscord<QueenFuckingAdrielle> In reply to @impbox "you need to define": i have a couple other questions for you if you dont mind 😄
21:43:05FromDiscord<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:07FromDiscord<impbox [ftsf]> sure, don't ask to ask, just ask =)
21:43:31FromDiscord<impbox [ftsf]> if you're calling C++ stuff you'll need to use the C++ backend unless it's extern C
21:43:40FromDiscord<impbox [ftsf]> you can call C stuff from C++
21:43:54FromDiscord<impbox [ftsf]> but calling non extern C C++ stuff from C backend I suspect won't work
21:44:27FromDiscord<QueenFuckingAdrielle> gotcha, I'd have to see if that would effect portability in terms of hardware then
21:45:00FromDiscord<impbox [ftsf]> it won't affect hardware portability, but it does mean compilers need to agree on name mangling
21:45:16FromDiscord<QueenFuckingAdrielle> also im wondering how that would interact with memory allocated on the gpu
21:45:46FromDiscord<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:59FromDiscord<impbox [ftsf]> should have nothing to do with anything on the GPU
21:51:28FromDiscord<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:05FromDiscord<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:15FromDiscord<impbox [ftsf]> you could write a C wrapper for the C++ library
21:59:49FromDiscord<impbox [ftsf]> but probably best to just use the C++ backend
22:02:39FromDiscord<QueenFuckingAdrielle> gotcha, thanks thats what i figured
22:43:36FromDiscord<pyautogui> Question: might it be useful to have slices like [i..^x] or [i..x] implemented for `ropes`?
22:44:20FromDiscord<Elegantbeef> Probably not given their purpose
22:45:48FromDiscord<pyautogui> Got it. Thx.
22:50:28FromDiscord<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:03FromDiscord<Elegantbeef> Depends on the use case
22:51:13FromDiscord<Elegantbeef> Might also just be the programmer's ignorance
22:52:04FromDiscord<evoalg> I should avoid them?
22:52:33FromDiscord<Elegantbeef> Unless you need them
22:52:56FromDiscord<evoalg> what's an example where I might need them?
22:53:02FromDiscord<Elegantbeef> Some people use `ref` so they dont write `var` in proc calls and stuff
22:53:24FromDiscord<evoalg> ahhh but that's not good practice I guess
22:53:31FromDiscord<Elegantbeef> Indeed
22:54:22FromDiscord<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:30FromDiscord<Recruit_main707> heavy
22:54:37FromDiscord<Elegantbeef> Ehhh that's the case even without ref
22:54:47FromDiscord<Elegantbeef> If you arent doing `var a = b` and just using proc calls
22:55:01FromDiscord<Recruit_main707> now that you mention it yeah xP
22:55:36FromDiscord<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:44FromDiscord<Recruit_main707> never really liked that tho, its never mentioned anywhere
22:56:05FromDiscord<Recruit_main707> inheritance does need refs
22:56:34FromDiscord<Elegantbeef> I mean it's mentioned and it's a performance optimisation that has 0 effect on your code
22:57:48FromDiscord<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:28FromDiscord<Elegantbeef> It only really matters if you try to take address of the parameters and mutate that
22:58:53FromDiscord<Elegantbeef> It shouldnt have much of an implication on the program flow or writing
22:59:40FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3G7v
23:00:04FromDiscord<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:59FromDiscord<Zoom> If you use geany post anything here to attract attention to the PR\: https://github.com/geany/geany/pull/2988↵(@retkid)
23:02:06FromDiscord<Elegantbeef> Purposely making your code slower is interesting 😛
23:04:40FromDiscord<Elegantbeef> Does geany have linting/autocomplete yet?
23:05:31FromDiscord<Zoom> It autocompletes based on the code at hand, IIRC
23:05:52FromDiscord<Elegantbeef> it was per file auto complete the last i tried it
23:09:26FromDiscord<Zoom> I don't get why the project has 9 pages of open pull requests, though.
23:13:14FromDiscord<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:10NimEventerNew 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:34FromDiscord<tandy> is anyone here a big maths brain?
23:29:54FromDiscord<tandy> how do i calculate whether there is an integer midpoint between to coordinates?
23:30:27FromDiscord<tandy> im trying to figure out whether two coordinates are adjacent, or whether they have a gap between them
23:31:11FromDiscord<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:46DaiCIs there a built-in stack type?
23:33:46FromDiscord<impbox [ftsf]> deque
23:34:05FromDiscord<Elegantbeef> You can just do `seq.add` and `seq.pop` if you want a FILO stack
23:34:13FromDiscord<Elegantbeef> if you want a FIFO deque is what you want
23:34:19FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/deques.html
23:34:42FromDiscord<impbox [ftsf]> yeah, seq is fine for a simple stack
23:34:54FromDiscord<DaiChimpo> Oh nice thanks
23:35:02FromDiscord<Elegantbeef> Well if you want a FILO it's the best you can do 😛
23:35:09FromDiscord<DaiChimpo> Yeah FILO is exactly what I need
23:35:10FromDiscord<impbox [ftsf]> I usually end up using deques for "decks of cards"
23:35:14FromDiscord<Elegantbeef> `O(1)` adds and \`O(1) removes
23:35:47FromDiscord<Elegantbeef> \well i guess the caveat on the `O(1)` add is that you dont need to grow the seq&
23:35:58FromDiscord<Elegantbeef> Jeezus i cannot hit the right keys today
23:36:15FromDiscord<impbox [ftsf]> it's just a bigger 1
23:36:41FromDiscord<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:54FromDiscord<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:12FromDiscord<impbox [ftsf]> In reply to @that_dude "Well for checking adjacency,": that will also return true if they are the same cell
23:39:26FromDiscord<that_dude> just throw in another check then ig
23:40:30*krux02 quit (Remote host closed the connection)
23:42:45FromDiscord<tandy> ahhhhh↵(@that_dude)
23:42:50FromDiscord<tandy> this worked perfectly
23:42:50FromDiscord<DaiChimpo> Yeah, if a!=b, and dist(a,b) < 2
23:43:19FromDiscord<that_dude> :)
23:44:06*Vladar quit (Quit: Leaving)