<< 01-06-2021 >>

00:00:02*zopsi quit (Quit: Oops)
00:00:40*zopsi joined #nim
00:20:03*vsantana joined #nim
00:20:16*vsantana quit (Quit: leaving)
00:26:25*NimBot joined #nim
00:38:47*krux02 quit (Remote host closed the connection)
00:47:40*motersen quit (Remote host closed the connection)
00:47:57*motersen joined #nim
00:56:50*nphg joined #nim
00:59:25*nphg1 quit (Ping timeout: 265 seconds)
02:09:21*rockcavera quit (Remote host closed the connection)
02:13:18FromDiscord<garett> If I store a proc in memory I have acquired from a system API, e.g. SetWindowLongPtr or NSWindow, can I later free the proc’s environment by explicit call to =destroy on the proc?
02:14:18FromDiscord<garett> (edit) "=destroy" => "`=destroy`"
02:18:04*rockcavera joined #nim
02:52:23FromDiscord<SpiderDave> in nim how to i make an array of arrays or something similar?
02:55:25FromDiscord<Rika> static or dynamic?
02:55:38FromDiscord<Rika> and what data are you storing in the array
02:55:56FromDiscord<SpiderDave> i guess static, but really how to do any of it
02:56:04FromDiscord<SpiderDave> say int
02:56:17FromDiscord<Rika> array[N, array[M, int]] ↵substitute N and M for sizes
02:56:19FromDiscord<Rika> (numbers)
02:56:30FromDiscord<Rika> for dynamic it is `seq[seq[int]]`
02:56:48FromDiscord<SpiderDave> ah, thanks
02:56:56FromDiscord<Rika> the seq one has a caveat, you're doing double indirection
02:57:11FromDiscord<Rika> so it's really best to do seq[int] and manually handle two indices
02:57:19FromDiscord<Rika> (given you want a matrix or so)
03:20:27FromDiscord<ElegantBeef> @Zoom you about?
03:21:52FromDiscord<ElegantBeef> Eh either way actually fixed hseq so now turned this example https://play.nim-lang.org/#ix=3nHo into https://play.nim-lang.org/#ix=3osi
03:23:49*spiderstew_ joined #nim
03:24:27FromDiscord<ElegantBeef> I'm a dumb dumb that forgot i have `else` in the case statement macro https://play.nim-lang.org/#ix=3osk, now no more spam!
03:24:34*spiderstew quit (Ping timeout: 245 seconds)
03:29:46*aeverr quit (Ping timeout: 240 seconds)
03:32:27*rockcavera quit (Remote host closed the connection)
03:32:35FromDiscord<ElegantBeef> Hmm, i think this technically falls under a sumtype so the library will be named `Some`
03:36:51FromDiscord<ElegantBeef> Unless of course someone has a better name 😛
04:15:46FromDiscord<SpiderDave> that might be the kind of thing discarded by search engines, if that's important to you
04:18:59*aeverr joined #nim
04:19:57FromDiscord<Rika> "some library nim"
04:19:58FromDiscord<Rika> lmao
04:28:04FromDiscord<ElegantBeef> Hey i dont expect people to use my code even if it was name "SumTypeNimImplementation"
04:28:47FromDiscord<SpiderDave> how about NimSum with a picture of some dumplings? 😛
04:36:38FromDiscord<Rika> no
05:05:32*narimiran joined #nim
05:13:49ForumUpdaterBotNew thread by Veksha: High(Natural) == high(int), see https://forum.nim-lang.org/t/8067
06:17:43*xet7 quit (Remote host closed the connection)
06:17:58ForumUpdaterBotNew thread by Cnerd: Bundling libraries with executables, see https://forum.nim-lang.org/t/8068
06:18:44*crem1 quit (Ping timeout: 245 seconds)
06:18:52*xet7 joined #nim
06:20:05*crem1 joined #nim
06:21:09*xet7 quit (Remote host closed the connection)
06:23:47*xet7 joined #nim
06:37:29*neceve joined #nim
07:02:10ForumUpdaterBotNew thread by Miran: This Month with Nim: May 2021, see https://forum.nim-lang.org/t/8070
07:23:25*PMunch joined #nim
07:29:11FromDiscord<ThatRandomDev> im running nim
07:29:18FromDiscord<ThatRandomDev> and im getting this error
07:29:27FromDiscord<ThatRandomDev> what do i do
07:29:28FromDiscord<ThatRandomDev> sent a long message, see http://ix.io/3ot4
07:31:17FromDiscord<ThatRandomDev> some one plz help
07:33:33FromDiscord<ElegantBeef> Do you have permissions, is an antivirus blocking it?
07:36:53FromDiscord<ThatRandomDev> regular windows anti virus
07:36:58FromDiscord<ThatRandomDev> its on pat
07:36:59FromDiscord<ThatRandomDev> h
07:45:14FromDiscord<ThatRandomDev> U there?
07:45:16Oddmonger@ThatRandomDev « /x86_64-w64-mingw32/bin/ld.exe: cannot open » : check your linker exists
07:45:33FromDiscord<ThatRandomDev> Wuts a linker
07:46:01FromDiscord<ThatRandomDev> In reply to @ThatRandomDev "regular windows anti virus": But antivirus is not blocking
07:46:04Oddmongerin your error message, the compilation chains halts on the linker not found (ld)
07:46:13FromDiscord<ThatRandomDev> I’m running it in sublime text
07:46:19FromDiscord<ThatRandomDev> Btw
07:46:26FromDiscord<ThatRandomDev> In reply to @Oddmonger "in your error message,": WUTS A LINEKR
07:46:45Oddmongerwuts ?
07:46:55FromDiscord<ThatRandomDev> What is a linker
07:47:44Oddmongerit's for your object code becomes executable
07:47:56FromDiscord<ThatRandomDev> Ok
07:48:00Oddmongerwithout a linker, you can compile, but that's all
07:48:13FromDiscord<ThatRandomDev> Ok, it’s not there what do I do
07:48:28PMunchDid you run finish.exe when you installed Nim?
07:48:37FromDiscord<ThatRandomDev> Yep
07:48:50FromDiscord<ThatRandomDev> I should run it as administrator
07:48:54FromDiscord<ThatRandomDev> Again
07:49:02PMunchHmm, possibly
07:49:10PMunchI don't use Windows so I don't really know
07:49:23FromDiscord<ThatRandomDev> Ok
07:49:27PMunchMaybe try to install Nim via choosenim instead?
07:49:37PMunchIt's generally the better way of doing it
07:49:41FromDiscord<ThatRandomDev> Ok can I link it plz
07:49:53PMunchCan you link what?
07:49:54FromDiscord<ThatRandomDev> Ok can you link it please
07:49:56PMunchAh
07:50:23PMunchOh wait, isn't choosenim available for Windows?
07:50:34PMunchThis is the thing I was talking about: https://github.com/dom96/choosenim
07:50:35FromDiscord<ThatRandomDev> I think so
07:50:47FromDiscord<ThatRandomDev> Ok just a sec
07:51:22FromDiscord<ThatRandomDev> Ok I am back
07:51:33FromDiscord<ThatRandomDev> Installing
07:51:35PMunchAh, there is a Windows version as well
07:51:45FromDiscord<ThatRandomDev> Ye there is
07:51:59FromDiscord<ThatRandomDev> Are u an actual bot?
07:52:03PMunchHaha, no
07:52:14PMunchI'm on IRC, the bot is just relaying my messages
07:52:17FromDiscord<ThatRandomDev> 😅
07:52:25FromDiscord<ThatRandomDev> Um what is IRC
07:52:30FromDiscord<ThatRandomDev> Stand for
07:52:33PMunchInternet Relay Chat
07:52:36FromDiscord<ThatRandomDev> Sorry if I’m being dumb
07:52:41PMunchOld chat tech from the 70s :P
07:52:43FromDiscord<ThatRandomDev> In reply to @PMunch "Internet Relay Chat": O ok
07:52:49FromDiscord<ThatRandomDev> Lol ok
07:53:24PMunchIt used to be super popular
07:53:58PMunchNowadays it's mostly various open source projects on here
07:54:02FromDiscord<ThatRandomDev> Ok I’ll reply when I’m done because my older bro is hogging the pc playing video games
07:54:06PMunchbut it's a neat system
07:54:07*k0mpjut0r quit (Ping timeout: 250 seconds)
07:54:09*fbpyr[m] quit (Ping timeout: 245 seconds)
07:54:13FromDiscord<ThatRandomDev> Ok
07:54:25FromDiscord<ThatRandomDev> I could build one is nim if I learn it
07:54:59*Zoom[m] quit (Ping timeout: 245 seconds)
07:56:59*fbpyr[m] joined #nim
07:57:22*Zoom[m] joined #nim
07:57:23*k0mpjut0r joined #nim
08:00:44*PMunch quit (Ping timeout: 252 seconds)
08:13:55*PMunch joined #nim
08:41:22*krux02 joined #nim
08:48:02*casaca quit (Ping timeout: 252 seconds)
09:12:16*neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
09:35:42*aeverr quit (Ping timeout: 252 seconds)
09:55:23*xet7 quit (Remote host closed the connection)
10:30:42*xet7 joined #nim
10:38:56*narimiran quit (Ping timeout: 258 seconds)
11:08:32*aeverr joined #nim
11:35:06FromGitter<bung87> does httpbeast use multithread without `threads:on` ? I see it has .cfg file
11:47:53FromDiscord<Bung> nvm
12:03:23FromDiscord<Airbus5717> Hmm I am thinking of building a website with backend↵Is nim stable for it ?
12:03:36FromDiscord<Airbus5717> Since it targets js
12:05:29FromGitter<bung87> if you find all your needs libs in nim then it's ok
12:07:12FromDiscord<Airbus5717> In reply to @bung87 "if you find all": I see↵It's just like something similar to a podcast website
12:10:46FromGitter<bung87> there are web related frameworks and libs, I think you can just try
12:33:45*narimiran joined #nim
12:37:12FromDiscord<Airbus5717> I see
13:54:40*arkurious joined #nim
13:57:13*rockcavera joined #nim
13:58:50FromDiscord<zetashift> @treeform will fidget 2.0 still use leverage Figma in some capacity?
14:27:17FromDiscord<PressF> Does anyone know of package like pytube for nim?↵(I need a way to donwload youtube videos with nim)
14:30:03FromDiscord<treeform> In reply to @zetashift "<@!107140179025735680> will fidget": Yes. What is your opinion of Figma ?
14:36:54FromDiscord<Zachary Carter> We use Figma at work and the designers seem to love it, however we could never use something like Fidget.
14:37:11FromDiscord<Zachary Carter> As nice as it would be to have something like it...
14:42:14*aeverr quit (Ping timeout: 252 seconds)
14:44:24*aeverr joined #nim
14:53:44Prestige@Zachary Carter why is that?
15:01:28FromDiscord<no name fits> My opinion of Figma is that it's a really nice tool, I'm just really slow at using it, so I tend to do pen and paper instead, and take a picture of it.
15:01:44FromDiscord<ajusa> Well there are a few reasons companies might not want to use Nim - compiler bugs, no mocking framework for tests, no official interface implementation, less documentation. I'm mostly comparing Nim to Java though
15:04:56FromGitter<bung87> `func isComplete*(resumable: Resumable): bool =` `Resumable ` is ref T, I got `Error: 'isComplete' can have side effects` only on windows
15:34:10FromDiscord<treeform> In reply to @Zachary Carter "We use Figma at": Do you prefer laying stuff out in code with like width/heights/puddings/positions and typing numbers?
15:35:05FromDiscord<Zachary Carter> No, it's the right coupling with the presentation layer of the solution
15:35:17FromDiscord<Zachary Carter> In other words the drawing backends
15:37:41FromDiscord<Zachary Carter> If I wanted to use it with Unity for instance, it would probably be impossible, because I imagine Fidget maintains it's own OpenGL context
15:38:19*oprypin quit (Ping timeout: 245 seconds)
15:38:31*oprypin joined #nim
15:39:52FromDiscord<zetashift> In reply to @treeform "Yes. What is your": I'm currently playing around with it and I like it a lot!!
15:40:09FromDiscord<zetashift> There are so little primitives yet I feel like one can do so much
15:41:52FromDiscord<no name fits> I forget the thing that Nim uses instead of regex
15:45:17FromDiscord<Zachary Carter> In reply to @no name fits "I forget the thing": What do you mean the thing that Nim uses? Nim has a regex module that relies upon PCRE. I think there's also a pure nim regex module
15:45:44FromDiscord<Zachary Carter> And then Nim also has other grammar parser libraries / modules like the PEG stuff
15:45:50FromDiscord<Zachary Carter> That zevv works on
15:46:06FromDiscord<zetashift> there is also combparser for parser combinators if you wanna get all fancy
15:46:37FromDiscord<no name fits> Oh yeah PEG
15:50:53FromDiscord<no name fits> Tyty
15:53:14FromDiscord<Zachary Carter> np!
15:53:44FromDiscord<Zachary Carter> In reply to @Zachary Carter "No, it's the right": Prestige[IRC] sorry I forgot to tag you on my reply - but this answers your and @treeform's questions I think
16:07:46*Vladar joined #nim
16:16:18PrestigeFor sure, thanks
16:51:59*vsantana joined #nim
17:06:24*casaca joined #nim
17:11:25FromDiscord<haxscramper> What is the difference between `typedesc T` and `typedesc[T]`? First one does not seem to work at all, even though code is nearly identical and definition compiles just fine - https://wandbox.org/permlink/wyvIq0tbhg8DQ7Ua
17:13:29FromGitter<ynfle> Try `type[int]`
17:13:40FromGitter<ynfle> & `type int`
17:16:40FromDiscord<haxscramper> IIRC use of `type` is discouraged in favor of `typeof/typedesc`
17:17:31FromDiscord<haxscramper> And I'm asking about the difference between these two, because right now it seems like a bug to me (either disallow `typedesc T` or make it work like `typedesc[T]`)
17:43:40*vsantana quit (Ping timeout: 258 seconds)
17:44:36*vsantana joined #nim
17:44:41*omnigoat quit ()
17:45:04*tane joined #nim
17:49:27*xet7 quit (Remote host closed the connection)
17:56:19*xet7 joined #nim
18:06:54*xet7 quit (Remote host closed the connection)
18:07:33FromGitter<ynfle> Can someone help me with https://play.nim-lang.org/#ix=3ovg?
18:09:13FromGitter<ynfle> What does the error message mean?
18:10:35FromDiscord<haxscramper> `=>` declares a procedure that has `auto` parameters that must be inferred
18:10:46FromDiscord<haxscramper> IIRC you can use `(n: int) => ...`
18:11:08FromDiscord<haxscramper> !eval import sugar; let squareOfSums = (n: int) => (n (n + 1)) shr 1
18:11:10NimBotCompile failed: /usercode/in.nim(1, 49) Error: invalid token: (\29)
18:12:07FromDiscord<haxscramper> Works in playground but seems to be broken by IRC bridge
18:15:16FromDiscord<garett> Is there a Nim function I can call to produce a compile error in the `else` section of a `when/elif` block?
18:15:37FromDiscord<garett> I'd like to produce a compile error like "unsupported platform"
18:16:02FromGitter<ynfle> `{.error: "ERROR MESSAGE".}`
18:16:43FromDiscord<garett> sent a code paste, see https://play.nim-lang.org/#ix=3ovk
18:17:22FromDiscord<garett> sent a code paste, see https://play.nim-lang.org/#ix=3ovl
18:18:07FromDiscord<garett> hmm, maybe don't need static since this is a `when` block?
18:18:16FromDiscord<haxscramper> no, don't use `echo + quit 1` it is ugly and breaks some assumptions
18:18:26FromDiscord<haxscramper> Use `{.error:` as suggested above
18:18:32FromDiscord<garett> Oh, I see, thanks
18:18:49FromGitter<ynfle> https://play.nim-lang.org/#ix=3ovm
18:18:52FromDiscord<garett> Sorry, I missed the answer while I was typing 🙂
18:19:46FromGitter<ynfle> @haxscramper, but I don't get why the compiler is saying that its nested?
18:20:41ForumUpdaterBotNew thread by Mrhdias: Asynchronous processing of http requests vs spawn tasks!, see https://forum.nim-lang.org/t/8072
18:23:10FromDiscord<haxscramper> Because it is not declared in toplevel scope directly? You are assigning procedure to a variable
18:25:28FromGitter<ynfle> So nested as in something else? I thought is was nested inside a generic proc
18:25:43FromGitter<ynfle> Oh nevermind, this comipler is trying to determine the type of the variable
18:25:51FromGitter<ynfle> I think...
18:28:07FromGitter<BracketMaster> My general programming pattern of choice are functions with no side effects - for Nim, does this result in alot more garbage for the GC to clean up?
18:28:20*xet7 joined #nim
18:28:37FromGitter<BracketMaster> Or can Nim reason about object lifetime and silently insert destructors during the compile?
18:29:12FromDiscord<haxscramper> Depending on your definition of "no side effect". If you are talking about FP-style side effects than yes, though there are libraries that allow you to mitigate this almost compiletely (zero_functional for example)
18:29:43FromDiscord<haxscramper> If "side effect" include object mutation then nim has built-in side effect tracking system and it results in zero overhead compared to regular code
18:30:21FromDiscord<haxscramper> With struct pure functions and deep write tracking it even improves performance (I think Araq said this once, but I'm not 100% sure)
18:30:50FromGitter<BracketMaster> when I say side effects, I mean object mutation such as: ⏎ ⏎ ```var a = someObject() ⏎ a = a.modifier()``` [https://gitter.im/nim-lang/Nim?at=60b67cd914d9cd234a6f4896]
18:30:56FromDiscord<haxscramper> On second question - yes, ARC memory management does exactly that
18:31:18FromGitter<BracketMaster> ARC inserts silent destructors at compile time?
18:31:20FromDiscord<haxscramper> Deterministic destructor insertion/ RAII etc.
18:31:27FromGitter<BracketMaster> ok - nice
18:33:07FromGitter<haxscramper> Though I don't think use case from your example would be optimized, it is not really common way of writing code. `zero_functional` is more about dataflow programming actually
18:33:48FromGitter<BracketMaster> can you give me an example of what would get optimized?
18:36:54*omnigoat joined #nim
18:37:45FromGitter<BracketMaster> Are you saying that my second example wouldn't get optimized?
18:38:58FromGitter<haxscramper> Yes, if you copy and object it will be copied. Though if you annotate `modifier` arguments with `sink` parameter and won't use `a` afterwards it would use move semantics
18:39:37FromGitter<haxscramper> So ⏎ ⏎ ```proc a(arg: sink T): T = ⏎ result = arg ⏎ # some in-place modifications of result``` [https://gitter.im/nim-lang/Nim?at=60b67ee9bdecf719a090ea58]
18:40:17FromGitter<BracketMaster> ah - ok
18:40:36FromGitter<haxscramper> Would move argument instead of copying where it can. Otherwise it would give you a warning (i.e. not a compilation error, though you can opt for it for a particular type (disallow `=copy`))
18:41:02FromGitter<BracketMaster> nice that nim has move semantics
18:41:15FromGitter<BracketMaster> you get rust level control without fighting a borrow checker
18:54:08*vivus joined #nim
19:00:38*omnigoat quit (Quit: The Lounge - https://thelounge.chat)
19:06:39*vivus quit (Quit: Leaving)
19:55:37*omnigoat joined #nim
20:33:30*narimiran quit (Ping timeout: 252 seconds)
20:58:20*PMunch quit (Quit: leaving)
21:05:25*Vladar quit (Quit: Leaving)
21:12:35*krux02 quit (Remote host closed the connection)
21:12:39*tane quit (Quit: Leaving)
21:18:23*mal`` quit (Quit: Leaving)
21:23:24*krux02 joined #nim
22:11:31FromGitter<BracketMaster> dumb question, I know there is `toInt`, is there a `toUint8`?
22:18:26FromGitter<BracketMaster> the built in ``toU8`` actually converts to int8, not uint8 for some reason
22:18:57FromDiscord<ElegantBeef> `.uint8` wirks
22:19:02FromDiscord<ElegantBeef> works even
22:19:40FromGitter<BracketMaster> thx
22:19:41FromGitter<BracketMaster> perfect
22:25:55*mahlon quit (Quit: WeeChat 3.0)
22:35:04*tiorock joined #nim
22:35:04*rockcavera is now known as Guest5169
22:35:04*tiorock is now known as rockcavera
22:35:04*rockcavera quit (Changing host)
22:35:04*rockcavera joined #nim
22:37:18*Guest5169 quit (Ping timeout: 258 seconds)
22:52:16FromDiscord<exelotl> In reply to @BracketMaster "the built in ``toU8``": that's weird 🤔
22:52:55FromDiscord<exelotl> oh it's deprecated anyways
23:27:27*mahlon joined #nim
23:55:11*Onionhammer6 joined #nim
23:56:05*zyklon joined #nim
23:58:49*dv^_^_ joined #nim