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:18 | FromDiscord | <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:18 | FromDiscord | <garett> (edit) "=destroy" => "`=destroy`" |
02:18:04 | * | rockcavera joined #nim |
02:52:23 | FromDiscord | <SpiderDave> in nim how to i make an array of arrays or something similar? |
02:55:25 | FromDiscord | <Rika> static or dynamic? |
02:55:38 | FromDiscord | <Rika> and what data are you storing in the array |
02:55:56 | FromDiscord | <SpiderDave> i guess static, but really how to do any of it |
02:56:04 | FromDiscord | <SpiderDave> say int |
02:56:17 | FromDiscord | <Rika> array[N, array[M, int]] ↵substitute N and M for sizes |
02:56:19 | FromDiscord | <Rika> (numbers) |
02:56:30 | FromDiscord | <Rika> for dynamic it is `seq[seq[int]]` |
02:56:48 | FromDiscord | <SpiderDave> ah, thanks |
02:56:56 | FromDiscord | <Rika> the seq one has a caveat, you're doing double indirection |
02:57:11 | FromDiscord | <Rika> so it's really best to do seq[int] and manually handle two indices |
02:57:19 | FromDiscord | <Rika> (given you want a matrix or so) |
03:20:27 | FromDiscord | <ElegantBeef> @Zoom you about? |
03:21:52 | FromDiscord | <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:27 | FromDiscord | <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:35 | FromDiscord | <ElegantBeef> Hmm, i think this technically falls under a sumtype so the library will be named `Some` |
03:36:51 | FromDiscord | <ElegantBeef> Unless of course someone has a better name 😛 |
04:15:46 | FromDiscord | <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:57 | FromDiscord | <Rika> "some library nim" |
04:19:58 | FromDiscord | <Rika> lmao |
04:28:04 | FromDiscord | <ElegantBeef> Hey i dont expect people to use my code even if it was name "SumTypeNimImplementation" |
04:28:47 | FromDiscord | <SpiderDave> how about NimSum with a picture of some dumplings? 😛 |
04:36:38 | FromDiscord | <Rika> no |
05:05:32 | * | narimiran joined #nim |
05:13:49 | ForumUpdaterBot | New 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:58 | ForumUpdaterBot | New 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:10 | ForumUpdaterBot | New 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:11 | FromDiscord | <ThatRandomDev> im running nim |
07:29:18 | FromDiscord | <ThatRandomDev> and im getting this error |
07:29:27 | FromDiscord | <ThatRandomDev> what do i do |
07:29:28 | FromDiscord | <ThatRandomDev> sent a long message, see http://ix.io/3ot4 |
07:31:17 | FromDiscord | <ThatRandomDev> some one plz help |
07:33:33 | FromDiscord | <ElegantBeef> Do you have permissions, is an antivirus blocking it? |
07:36:53 | FromDiscord | <ThatRandomDev> regular windows anti virus |
07:36:58 | FromDiscord | <ThatRandomDev> its on pat |
07:36:59 | FromDiscord | <ThatRandomDev> h |
07:45:14 | FromDiscord | <ThatRandomDev> U there? |
07:45:16 | Oddmonger | @ThatRandomDev « /x86_64-w64-mingw32/bin/ld.exe: cannot open » : check your linker exists |
07:45:33 | FromDiscord | <ThatRandomDev> Wuts a linker |
07:46:01 | FromDiscord | <ThatRandomDev> In reply to @ThatRandomDev "regular windows anti virus": But antivirus is not blocking |
07:46:04 | Oddmonger | in your error message, the compilation chains halts on the linker not found (ld) |
07:46:13 | FromDiscord | <ThatRandomDev> I’m running it in sublime text |
07:46:19 | FromDiscord | <ThatRandomDev> Btw |
07:46:26 | FromDiscord | <ThatRandomDev> In reply to @Oddmonger "in your error message,": WUTS A LINEKR |
07:46:45 | Oddmonger | wuts ? |
07:46:55 | FromDiscord | <ThatRandomDev> What is a linker |
07:47:44 | Oddmonger | it's for your object code becomes executable |
07:47:56 | FromDiscord | <ThatRandomDev> Ok |
07:48:00 | Oddmonger | without a linker, you can compile, but that's all |
07:48:13 | FromDiscord | <ThatRandomDev> Ok, it’s not there what do I do |
07:48:28 | PMunch | Did you run finish.exe when you installed Nim? |
07:48:37 | FromDiscord | <ThatRandomDev> Yep |
07:48:50 | FromDiscord | <ThatRandomDev> I should run it as administrator |
07:48:54 | FromDiscord | <ThatRandomDev> Again |
07:49:02 | PMunch | Hmm, possibly |
07:49:10 | PMunch | I don't use Windows so I don't really know |
07:49:23 | FromDiscord | <ThatRandomDev> Ok |
07:49:27 | PMunch | Maybe try to install Nim via choosenim instead? |
07:49:37 | PMunch | It's generally the better way of doing it |
07:49:41 | FromDiscord | <ThatRandomDev> Ok can I link it plz |
07:49:53 | PMunch | Can you link what? |
07:49:54 | FromDiscord | <ThatRandomDev> Ok can you link it please |
07:49:56 | PMunch | Ah |
07:50:23 | PMunch | Oh wait, isn't choosenim available for Windows? |
07:50:34 | PMunch | This is the thing I was talking about: https://github.com/dom96/choosenim |
07:50:35 | FromDiscord | <ThatRandomDev> I think so |
07:50:47 | FromDiscord | <ThatRandomDev> Ok just a sec |
07:51:22 | FromDiscord | <ThatRandomDev> Ok I am back |
07:51:33 | FromDiscord | <ThatRandomDev> Installing |
07:51:35 | PMunch | Ah, there is a Windows version as well |
07:51:45 | FromDiscord | <ThatRandomDev> Ye there is |
07:51:59 | FromDiscord | <ThatRandomDev> Are u an actual bot? |
07:52:03 | PMunch | Haha, no |
07:52:14 | PMunch | I'm on IRC, the bot is just relaying my messages |
07:52:17 | FromDiscord | <ThatRandomDev> 😅 |
07:52:25 | FromDiscord | <ThatRandomDev> Um what is IRC |
07:52:30 | FromDiscord | <ThatRandomDev> Stand for |
07:52:33 | PMunch | Internet Relay Chat |
07:52:36 | FromDiscord | <ThatRandomDev> Sorry if I’m being dumb |
07:52:41 | PMunch | Old chat tech from the 70s :P |
07:52:43 | FromDiscord | <ThatRandomDev> In reply to @PMunch "Internet Relay Chat": O ok |
07:52:49 | FromDiscord | <ThatRandomDev> Lol ok |
07:53:24 | PMunch | It used to be super popular |
07:53:58 | PMunch | Nowadays it's mostly various open source projects on here |
07:54:02 | FromDiscord | <ThatRandomDev> Ok I’ll reply when I’m done because my older bro is hogging the pc playing video games |
07:54:06 | PMunch | but 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:13 | FromDiscord | <ThatRandomDev> Ok |
07:54:25 | FromDiscord | <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:06 | FromGitter | <bung87> does httpbeast use multithread without `threads:on` ? I see it has .cfg file |
11:47:53 | FromDiscord | <Bung> nvm |
12:03:23 | FromDiscord | <Airbus5717> Hmm I am thinking of building a website with backend↵Is nim stable for it ? |
12:03:36 | FromDiscord | <Airbus5717> Since it targets js |
12:05:29 | FromGitter | <bung87> if you find all your needs libs in nim then it's ok |
12:07:12 | FromDiscord | <Airbus5717> In reply to @bung87 "if you find all": I see↵It's just like something similar to a podcast website |
12:10:46 | FromGitter | <bung87> there are web related frameworks and libs, I think you can just try |
12:33:45 | * | narimiran joined #nim |
12:37:12 | FromDiscord | <Airbus5717> I see |
13:54:40 | * | arkurious joined #nim |
13:57:13 | * | rockcavera joined #nim |
13:58:50 | FromDiscord | <zetashift> @treeform will fidget 2.0 still use leverage Figma in some capacity? |
14:27:17 | FromDiscord | <PressF> Does anyone know of package like pytube for nim?↵(I need a way to donwload youtube videos with nim) |
14:30:03 | FromDiscord | <treeform> In reply to @zetashift "<@!107140179025735680> will fidget": Yes. What is your opinion of Figma ? |
14:36:54 | FromDiscord | <Zachary Carter> We use Figma at work and the designers seem to love it, however we could never use something like Fidget. |
14:37:11 | FromDiscord | <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:44 | Prestige | @Zachary Carter why is that? |
15:01:28 | FromDiscord | <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:44 | FromDiscord | <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:56 | FromGitter | <bung87> `func isComplete*(resumable: Resumable): bool =` `Resumable ` is ref T, I got `Error: 'isComplete' can have side effects` only on windows |
15:34:10 | FromDiscord | <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:05 | FromDiscord | <Zachary Carter> No, it's the right coupling with the presentation layer of the solution |
15:35:17 | FromDiscord | <Zachary Carter> In other words the drawing backends |
15:37:41 | FromDiscord | <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:52 | FromDiscord | <zetashift> In reply to @treeform "Yes. What is your": I'm currently playing around with it and I like it a lot!! |
15:40:09 | FromDiscord | <zetashift> There are so little primitives yet I feel like one can do so much |
15:41:52 | FromDiscord | <no name fits> I forget the thing that Nim uses instead of regex |
15:45:17 | FromDiscord | <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:44 | FromDiscord | <Zachary Carter> And then Nim also has other grammar parser libraries / modules like the PEG stuff |
15:45:50 | FromDiscord | <Zachary Carter> That zevv works on |
15:46:06 | FromDiscord | <zetashift> there is also combparser for parser combinators if you wanna get all fancy |
15:46:37 | FromDiscord | <no name fits> Oh yeah PEG |
15:50:53 | FromDiscord | <no name fits> Tyty |
15:53:14 | FromDiscord | <Zachary Carter> np! |
15:53:44 | FromDiscord | <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:18 | Prestige | For sure, thanks |
16:51:59 | * | vsantana joined #nim |
17:06:24 | * | casaca joined #nim |
17:11:25 | FromDiscord | <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:29 | FromGitter | <ynfle> Try `type[int]` |
17:13:40 | FromGitter | <ynfle> & `type int` |
17:16:40 | FromDiscord | <haxscramper> IIRC use of `type` is discouraged in favor of `typeof/typedesc` |
17:17:31 | FromDiscord | <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:33 | FromGitter | <ynfle> Can someone help me with https://play.nim-lang.org/#ix=3ovg? |
18:09:13 | FromGitter | <ynfle> What does the error message mean? |
18:10:35 | FromDiscord | <haxscramper> `=>` declares a procedure that has `auto` parameters that must be inferred |
18:10:46 | FromDiscord | <haxscramper> IIRC you can use `(n: int) => ...` |
18:11:08 | FromDiscord | <haxscramper> !eval import sugar; let squareOfSums = (n: int) => (n (n + 1)) shr 1 |
18:11:10 | NimBot | Compile failed: /usercode/in.nim(1, 49) Error: invalid token: (\29) |
18:12:07 | FromDiscord | <haxscramper> Works in playground but seems to be broken by IRC bridge |
18:15:16 | FromDiscord | <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:37 | FromDiscord | <garett> I'd like to produce a compile error like "unsupported platform" |
18:16:02 | FromGitter | <ynfle> `{.error: "ERROR MESSAGE".}` |
18:16:43 | FromDiscord | <garett> sent a code paste, see https://play.nim-lang.org/#ix=3ovk |
18:17:22 | FromDiscord | <garett> sent a code paste, see https://play.nim-lang.org/#ix=3ovl |
18:18:07 | FromDiscord | <garett> hmm, maybe don't need static since this is a `when` block? |
18:18:16 | FromDiscord | <haxscramper> no, don't use `echo + quit 1` it is ugly and breaks some assumptions |
18:18:26 | FromDiscord | <haxscramper> Use `{.error:` as suggested above |
18:18:32 | FromDiscord | <garett> Oh, I see, thanks |
18:18:49 | FromGitter | <ynfle> https://play.nim-lang.org/#ix=3ovm |
18:18:52 | FromDiscord | <garett> Sorry, I missed the answer while I was typing 🙂 |
18:19:46 | FromGitter | <ynfle> @haxscramper, but I don't get why the compiler is saying that its nested? |
18:20:41 | ForumUpdaterBot | New thread by Mrhdias: Asynchronous processing of http requests vs spawn tasks!, see https://forum.nim-lang.org/t/8072 |
18:23:10 | FromDiscord | <haxscramper> Because it is not declared in toplevel scope directly? You are assigning procedure to a variable |
18:25:28 | FromGitter | <ynfle> So nested as in something else? I thought is was nested inside a generic proc |
18:25:43 | FromGitter | <ynfle> Oh nevermind, this comipler is trying to determine the type of the variable |
18:25:51 | FromGitter | <ynfle> I think... |
18:28:07 | FromGitter | <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:37 | FromGitter | <BracketMaster> Or can Nim reason about object lifetime and silently insert destructors during the compile? |
18:29:12 | FromDiscord | <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:43 | FromDiscord | <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:21 | FromDiscord | <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:50 | FromGitter | <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:56 | FromDiscord | <haxscramper> On second question - yes, ARC memory management does exactly that |
18:31:18 | FromGitter | <BracketMaster> ARC inserts silent destructors at compile time? |
18:31:20 | FromDiscord | <haxscramper> Deterministic destructor insertion/ RAII etc. |
18:31:27 | FromGitter | <BracketMaster> ok - nice |
18:33:07 | FromGitter | <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:48 | FromGitter | <BracketMaster> can you give me an example of what would get optimized? |
18:36:54 | * | omnigoat joined #nim |
18:37:45 | FromGitter | <BracketMaster> Are you saying that my second example wouldn't get optimized? |
18:38:58 | FromGitter | <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:37 | FromGitter | <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:17 | FromGitter | <BracketMaster> ah - ok |
18:40:36 | FromGitter | <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:02 | FromGitter | <BracketMaster> nice that nim has move semantics |
18:41:15 | FromGitter | <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:31 | FromGitter | <BracketMaster> dumb question, I know there is `toInt`, is there a `toUint8`? |
22:18:26 | FromGitter | <BracketMaster> the built in ``toU8`` actually converts to int8, not uint8 for some reason |
22:18:57 | FromDiscord | <ElegantBeef> `.uint8` wirks |
22:19:02 | FromDiscord | <ElegantBeef> works even |
22:19:40 | FromGitter | <BracketMaster> thx |
22:19:41 | FromGitter | <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:16 | FromDiscord | <exelotl> In reply to @BracketMaster "the built in ``toU8``": that's weird 🤔 |
22:52:55 | FromDiscord | <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 |