<< 27-04-2019 >>

00:01:43*i7sDream quit (Remote host closed the connection)
00:02:08*i7sDream joined #nim
00:07:05*i7sDream quit (Remote host closed the connection)
00:07:32*i7sDream joined #nim
00:09:26*i7sDream quit (Remote host closed the connection)
00:09:32leorize[m]@kaushalmodi: that's not always the case, when dealing with shared objects it's recommended to use `nm -D` instead
00:09:53*i7sDream joined #nim
00:10:07leorize[m]most of the time (for me) nothing shows up when you just `nm` on a shared object
00:11:48*i7sDream quit (Remote host closed the connection)
00:12:13*i7sDream joined #nim
00:15:08*i7sDream quit (Remote host closed the connection)
00:15:33*i7sDream joined #nim
00:17:28*i7sDream quit (Remote host closed the connection)
00:17:53*i7sDream joined #nim
00:18:11*[rg] joined #nim
00:19:48*i7sDream quit (Remote host closed the connection)
00:20:13*i7sDream joined #nim
00:23:08*i7sDream quit (Remote host closed the connection)
00:23:14*natrys quit (Quit: natrys)
00:23:33*i7sDream joined #nim
00:26:17*[rg] quit (Quit: Leaving)
00:27:28*i7sDream quit (Remote host closed the connection)
00:27:53*i7sDream joined #nim
00:36:50*i7sDream quit (Remote host closed the connection)
00:37:16*i7sDream joined #nim
00:39:11*i7sDream quit (Remote host closed the connection)
00:39:37*i7sDream joined #nim
00:42:32*i7sDream quit (Remote host closed the connection)
00:42:57*i7sDream joined #nim
00:44:20*leorize joined #nim
00:47:49*vlad1777d quit (Ping timeout: 258 seconds)
00:48:52*i7sDream quit (Remote host closed the connection)
00:49:21*i7sDream joined #nim
00:51:16*i7sDream quit (Remote host closed the connection)
00:51:42*i7sDream joined #nim
00:53:37*i7sDream quit (Remote host closed the connection)
00:54:03*i7sDream joined #nim
00:55:58*i7sDream quit (Remote host closed the connection)
00:56:27*i7sDream joined #nim
00:58:22*i7sDream quit (Remote host closed the connection)
00:58:47*i7sDream joined #nim
01:00:42*i7sDream quit (Remote host closed the connection)
01:01:12*i7sDream joined #nim
01:04:07*i7sDream quit (Remote host closed the connection)
01:04:32*i7sDream joined #nim
01:09:27*i7sDream quit (Remote host closed the connection)
01:09:51*i7sDream joined #nim
01:12:46*i7sDream quit (Remote host closed the connection)
01:13:12*i7sDream joined #nim
01:15:06*i7sDream quit (Remote host closed the connection)
01:15:21*I_Right_I joined #nim
01:15:32*i7sDream joined #nim
01:17:26*i7sDream quit (Remote host closed the connection)
01:17:52*i7sDream joined #nim
01:19:46*i7sDream quit (Remote host closed the connection)
01:20:12*i7sDream joined #nim
01:23:06*i7sDream quit (Remote host closed the connection)
01:23:32*i7sDream joined #nim
01:26:26*i7sDream quit (Remote host closed the connection)
01:26:53*i7sDream joined #nim
01:28:46*i7sDream quit (Remote host closed the connection)
01:29:12*i7sDream joined #nim
01:31:07*i7sDream quit (Remote host closed the connection)
01:31:31*i7sDream joined #nim
01:41:26*i7sDream quit (Remote host closed the connection)
01:41:51*i7sDream joined #nim
01:44:46*i7sDream quit (Remote host closed the connection)
01:45:13*i7sDream joined #nim
01:47:08*i7sDream quit (Remote host closed the connection)
01:47:33*i7sDream joined #nim
01:50:28*i7sDream quit (Remote host closed the connection)
01:50:53*i7sDream joined #nim
01:52:48*i7sDream quit (Remote host closed the connection)
01:53:13*i7sDream joined #nim
01:58:08*i7sDream quit (Remote host closed the connection)
01:58:35*i7sDream joined #nim
02:00:02*banc quit (Quit: Bye)
02:04:33*i7sDream quit (Remote host closed the connection)
02:04:58*i7sDream joined #nim
02:06:53*i7sDream quit (Remote host closed the connection)
02:07:18*i7sDream joined #nim
02:09:23FromGitter<kaushalmodi> leorize[m]: Thanks, I will try that out.
02:11:12FromGitter<kaushalmodi> How is your build process different? I tried running `nm` on few .so objects, and I saw what I expected plus dozens of gibberish symbols
02:11:13*i7sDream quit (Remote host closed the connection)
02:11:38*i7sDream joined #nim
02:14:04leorizeit might differs on whether you `strip` your .so or not
02:14:36leorizenever looked into the details, but if you use it with, for example `/usr/lib/libc.so`, `nm` won't yield anything
02:15:26leorizekaushalmodi: also, pro tip: `nm | c++filt` will unmangle C++ symbols
02:19:40FromGitter<kaushalmodi> Makes sense.
02:20:48FromGitter<kaushalmodi> Yes, I was reading its man page and there were quite a few options. I was basically looking for a switch to print just the text/code symbols, but it didn't occur to me then the -D switch.
02:21:46*banc joined #nim
02:22:03FromGitter<kaushalmodi> Oh I misread the pipe
02:27:02FromGitter<kaushalmodi> I'm not at my PC else I would have tried this out .. is `c++filt` better than `nm --demangle`.
02:29:17FromGitter<kaushalmodi> I'm not sure if I'd need these demangling tools (because I am using the .so with another language where it needs the symbols to be exported in extern "C". But I was just curious.
02:32:55leorizekaushalmodi: it's the same thing, just that c++filt can be composed with any text-based tools
02:33:17leorizeUnix philosophy they say
02:35:36*i7sDream quit (Remote host closed the connection)
02:36:04*i7sDream joined #nim
02:45:05*i7sDream quit (Remote host closed the connection)
02:45:32*i7sDream joined #nim
02:47:27*i7sDream quit (Remote host closed the connection)
02:47:54*i7sDream joined #nim
02:52:50*i7sDream quit (Remote host closed the connection)
02:53:18*i7sDream joined #nim
02:55:13*i7sDream quit (Remote host closed the connection)
02:55:42*i7sDream joined #nim
02:58:37*i7sDream quit (Remote host closed the connection)
02:59:02*i7sDream joined #nim
03:02:57*i7sDream quit (Remote host closed the connection)
03:03:22*i7sDream joined #nim
03:18:19*i7sDream quit (Remote host closed the connection)
03:18:47*i7sDream joined #nim
03:21:42*i7sDream quit (Remote host closed the connection)
03:22:06*i7sDream joined #nim
03:27:01*i7sDream quit (Remote host closed the connection)
03:27:30*i7sDream joined #nim
03:31:27*i7sDream quit (Remote host closed the connection)
03:31:55*i7sDream joined #nim
03:41:57*i7sDream quit (Remote host closed the connection)
03:42:23*i7sDream joined #nim
03:45:18*i7sDream quit (Remote host closed the connection)
03:45:45*i7sDream joined #nim
03:58:12*rnrwashere quit (Remote host closed the connection)
04:02:15*I_Right_I quit (Remote host closed the connection)
04:04:06*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:09:37leorizeZevv: npeg is cool as heck :) managed to whip up an email matcher just from the grammar in the email RFC
04:11:51*i7sDream quit (Remote host closed the connection)
04:12:18*i7sDream joined #nim
04:16:13*i7sDream quit (Remote host closed the connection)
04:16:40*i7sDream joined #nim
04:22:38*i7sDream quit (Remote host closed the connection)
04:23:04*i7sDream joined #nim
04:24:59*i7sDream quit (Remote host closed the connection)
04:25:24*i7sDream joined #nim
04:26:40*rnrwashere joined #nim
04:33:18*i7sDream quit (Remote host closed the connection)
04:33:45*i7sDream joined #nim
04:37:40*i7sDream quit (Remote host closed the connection)
04:38:07*i7sDream joined #nim
04:40:02*i7sDream quit (Remote host closed the connection)
04:40:27*i7sDream joined #nim
04:42:22*i7sDream quit (Remote host closed the connection)
04:42:47*i7sDream joined #nim
04:46:43*i7sDream quit (Remote host closed the connection)
04:47:12*i7sDream joined #nim
04:53:08*i7sDream quit (Remote host closed the connection)
04:53:37*i7sDream joined #nim
04:56:33*i7sDream quit (Remote host closed the connection)
04:57:02*i7sDream joined #nim
04:58:04*rnrwashere quit (Remote host closed the connection)
05:01:59*kklj joined #nim
05:04:10*rnrwashere joined #nim
05:06:58*i7sDream quit (Remote host closed the connection)
05:07:24*i7sDream joined #nim
05:09:04*kklj quit (Quit: Page closed)
05:12:20*i7sDream quit (Remote host closed the connection)
05:12:46*i7sDream joined #nim
05:19:41*leorize quit (Quit: WeeChat 2.3)
05:20:57*absolutejam2 joined #nim
05:22:43*i7sDream quit (Remote host closed the connection)
05:23:10*i7sDream joined #nim
05:27:05*i7sDream quit (Remote host closed the connection)
05:27:33*i7sDream joined #nim
05:27:41*solitudesf- joined #nim
05:31:40*dddddd quit (Remote host closed the connection)
05:43:48*nsf joined #nim
05:51:00*mosORadi joined #nim
05:58:19*absolutejam2 quit (Ping timeout: 258 seconds)
05:59:27*rnrwashere quit (Remote host closed the connection)
06:01:44*solitudesf- quit (Ping timeout: 250 seconds)
06:13:06*rnrwashere joined #nim
06:22:30*rnrwashere quit (Remote host closed the connection)
06:27:08*rnrwashere joined #nim
06:40:34*i7sDream quit (Remote host closed the connection)
06:41:00*i7sDream joined #nim
06:47:06Zevv\o/
06:48:38ZevvIf allowed: please share, I'm collecting a cookbook
06:51:42*absolutejam2 joined #nim
06:54:35FromGitter<gogolxdong> Is js context removed from tables.nim module?
06:58:05*rnrwashere quit (Remote host closed the connection)
06:58:33FromGitter<gogolxdong> ```code paste, see link``` ⏎ ⏎ Error: undeclared identifier: 'Table' nim js --hints:off [https://gitter.im/nim-lang/Nim?at=5cc3fd998790b0307e0c6f47]
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:47FromGitter<alehander42> maybe unrelated, but i always used JsAssoc instead of Table for the js backend: it seemed much easier to interop/debug as it maps to a normal js object
07:01:14FromGitter<jrfondren> tables work fine for me in JS.
07:02:15FromGitter<alehander42> they do: but it's easier for me to interop with other js libs/api-s and to inspect them in the console if i model them with JsAssoc
07:02:37FromGitter<alehander42> a matter of trade-offs, nothing wrong with directly using tables as well
07:03:41FromGitter<jrfondren> rather, one use of tables was fine and another seems to be dying horribly.
07:03:52FromGitter<jrfondren> anyway, it dies in JS, not in Nim.
07:04:19FromGitter<alehander42> which one?
07:04:48*gmpreussner joined #nim
07:05:04FromGitter<jrfondren> er, actually it's correct to fail. it's just annoying that it fails so late. I wasn't initializing the table.
07:05:59FromGitter<alehander42> this should not be needed soon at least for the native backend
07:06:10FromGitter<jrfondren> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc3ff625b3f941aa59cd044]
07:06:16FromGitter<alehander42> but good remainder: @narimiran your table changes, should they work on js backend as well
07:22:01*i7sDream quit (Remote host closed the connection)
07:22:28*i7sDream joined #nim
07:26:23*i7sDream quit (Remote host closed the connection)
07:26:51*i7sDream joined #nim
07:29:46*i7sDream quit (Remote host closed the connection)
07:30:11*i7sDream joined #nim
07:41:03*absolutejam2 quit (Ping timeout: 258 seconds)
07:41:55*stefanos82 joined #nim
07:43:08*i7sDream quit (Remote host closed the connection)
07:43:33*i7sDream joined #nim
07:44:08*nsf quit (Quit: WeeChat 2.4)
07:44:28*neceve joined #nim
07:49:47*absolutejam2 joined #nim
07:51:04*xet7 joined #nim
08:00:45*mosORadi quit (Quit: Connection closed for inactivity)
08:08:31*i7sDream quit (Remote host closed the connection)
08:08:55*i7sDream joined #nim
08:10:37*absolutejam2 quit (Ping timeout: 244 seconds)
08:13:51*i7sDream quit (Remote host closed the connection)
08:14:18*i7sDream joined #nim
08:19:13*i7sDream quit (Remote host closed the connection)
08:19:37*i7sDream joined #nim
08:34:13*nsf joined #nim
08:35:43*i7sDream quit (Quit: WeeChat 2.4)
08:49:40*Trustable joined #nim
09:22:09*fanta1 joined #nim
09:22:32*absolutejam2 joined #nim
09:27:46*absolutejam2 quit (Ping timeout: 276 seconds)
09:31:57*Vladar joined #nim
09:58:50*iLiquid joined #nim
10:07:32*lritter joined #nim
10:32:40*iLiquid quit (Quit: iLiquid)
10:34:36*leorize joined #nim
10:41:40*Sembei quit (Quit: WeeChat 2.4)
10:51:59*nsf quit (Quit: WeeChat 2.4)
10:52:58*rnrwashere joined #nim
10:58:07*rnrwashere quit (Ping timeout: 276 seconds)
11:05:39*nsf joined #nim
11:08:21*absolutejam2 joined #nim
11:14:50*Senketsu_ joined #nim
11:16:02*Trustable quit (Remote host closed the connection)
11:17:35*Senketsu quit (Ping timeout: 246 seconds)
11:25:40*vlad1777d joined #nim
11:44:13*kapil____ joined #nim
12:06:22*absolutejam2 quit (Ping timeout: 246 seconds)
12:16:22*leorize quit (Remote host closed the connection)
12:16:50*leorize joined #nim
12:18:23*iLiquid joined #nim
12:19:22*iLiquid quit (Client Quit)
12:24:36*dddddd joined #nim
13:02:31*absolutejam2 joined #nim
13:11:12*jjido joined #nim
13:38:05*xet7 quit (Quit: Leaving)
13:39:24*xet7 joined #nim
13:55:45*absolutejam2 quit (Ping timeout: 244 seconds)
14:01:03FromGitter<kayabaNerve> Araq: Remember when I created an issue about getCurrentException not being available in a func and you said it shouldn't be and to use `except Exception as e`?
14:01:18*Trustable joined #nim
14:01:29FromGitter<kayabaNerve> `except Exception as e` is now a side effect and can't be used in funcs.
14:02:31FromGitter<kayabaNerve> Is this a bug or a decision? I honestly can't tell.
14:16:44FromGitter<kayabaNerve> I'm assuming yes.
14:17:50*solitudesf- joined #nim
14:18:43*mosORadi joined #nim
14:35:01*ng0 joined #nim
14:53:35FromGitter<kayabaNerve> Never mind, it was already fixed in the latest devel 0_o Didn't work on the version I had from 2 days ago so I didn't update sooner.
15:16:21*absolutejam2 joined #nim
15:20:29*shashlick quit (Remote host closed the connection)
15:20:52*shashlick joined #nim
15:22:07*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:31:29*absolutejam2 quit (Ping timeout: 255 seconds)
15:38:49*smitop joined #nim
15:39:05smitopHow do addr and ptr work when compiling to JS?
16:02:06Zevvaraq did some nice explanation about that in one of the videos, let me see if i can find that
16:02:27Zevvbasically, stuff gets put into a js table so it can be referenced, iirc
16:06:31*Vladar quit (Remote host closed the connection)
16:27:02disruptekthe party line is that .raises. is not broken, despite all this poor behavior, and that the whole concept of .raises. is where the defect lies.
16:28:28*mosORadi quit (Quit: Connection closed for inactivity)
16:59:44FromGitter<kayabaNerve> disruptek: I love raises.
16:59:58FromGitter<kayabaNerve> I just love it when I add extra bounds other people would hate.
17:00:23FromGitter<kayabaNerve> Raises guarantees X only raises Y and clearly states raisable Exceptions.
17:00:37FromGitter<kayabaNerve> If you're adding a function call, and need to know what to handle, it's great.
17:01:05FromGitter<kayabaNerve> Issue is, for me, I'm not that meticulous about my error handling... or no where near where I should be.
17:01:30FromGitter<kayabaNerve> Which is why I replaced raises with a drop in macro that forces me to error check every raised Exception (which it accomplishes via cloned procs and raises)
17:09:38FromGitter<kayabaNerve> I guess, in the end, it's beneficial for guaranteeing you didn't miss something, and provides a Nim standard way of documenting raisable Exceptions. There are annoyances, sure, especially as the Nim stdlib can raise so much (including Exception (looking at you, async) which makes raises meaningless), yet it shines most when the user sets out to have clean error handling, and the user gets what they put in.
17:11:50disruptekpreachin' to the choir, buddy. i uses raises everywhere and i don't like its misbehavior. some of that can be fixed, though.
17:12:26FromGitter<kayabaNerve> Yet you said the concept is broken
17:12:32FromGitter<kayabaNerve> I don't think the concept is broken
17:12:42FromGitter<kayabaNerve> I think how users use it and their expectations of it is
17:12:54disruptekthat's the "party line", ie. that's the position of the nim elders.
17:12:56*kapil____ quit (Quit: Connection closed for inactivity)
17:13:22FromGitter<kayabaNerve> ... if someone wants to remove it or push a breaking change, I will fight them.
17:13:31FromGitter<kayabaNerve> It will break my entire codebase.
17:13:35disruptekagreed. if it worked correctly and was checked correctly, it would be much more valuable. as it is, it is at least an asset.
17:13:38FromGitter<kayabaNerve> I would possibly maintain my own fork.
17:13:47FromGitter<jrfondren> just be precise about what your problems are. a complaint like "X's concept is broken" invites people talking about X's concept rather than your problems with it.
17:14:19FromGitter<kayabaNerve> It's not just breaking a macro which forces me to error check. I just cleaned ~8k lines of my codebase and now that I'm there, I could do that myself.
17:14:34disruptekwasn't my complaint. araq says "X's concept is broken". i have enumerated here and in github what my issues are. including the one luke raised a few hours ago.
17:14:38FromGitter<kayabaNerve> It's that so many random functions raise so much stuff and the Nim docs don't provide a clean way to check it.
17:14:52FromGitter<kayabaNerve> asyncnet raises an exception it doesn't export from `selectors`
17:15:07FromGitter<kayabaNerve> I have no clue what `selectors` are and I still haven't bothered to look it up.
17:15:23FromGitter<kayabaNerve> How am I supposed to track this error if I only dealt with `asyncnet`?
17:16:08FromGitter<kayabaNerve> I'd either have to go through the entire stdlib myself to make small edits OR do brute force `except Exception`s which really don't help.
17:16:23FromGitter<jrfondren> I was looking at the nim doc commands last night and raises docs are included now
17:16:36disruptektbh, i think the problem is that the core devs don't see the value proposition. until that happens, it's just not going to be embraced/used properly, and that continues to diminish that same value prop.
17:16:45*rnrwashere joined #nim
17:16:55FromGitter<kayabaNerve> They won't be if someone removes raises @jrfondren
17:17:31disrupteki don't think it's going to be removed, but if it's not fixed, it probably won't survive another change that breaks it.
17:17:58FromGitter<jrfondren> `proc re(s: string; flags = {reStudy}): Regex {...}{.raises: [RegexError], tags: [].}` for example
17:18:10disruptekin fact, they *still* might not survive such a change.
17:18:19FromGitter<kayabaNerve> ... I can guarantee you newAsyncSocket can raise IOSelectorsException, yet the docs don't say that.
17:18:31FromGitter<kayabaNerve> So either these docs are old or there's a bug somewhere.
17:18:42FromGitter<kayabaNerve> Aren't the devel docs hosted on a github site?
17:19:05FromGitter<jrfondren> the devel docs are what nim-lang.org links to by default currently
17:19:17disruptekthere is a bug. the bug is that the order of the exception types in the .raises. is significant. earlier supertypes gobble up later subtypes.
17:19:37FromGitter<kayabaNerve> http://nim-lang.github.io/Nim/asyncnet.html#newAsyncSocket%2CAsyncFD%2CDomain%2CSockType%2CProtocol
17:19:46disruptekthe search for() breaks early if it finds a matching type.
17:19:47FromGitter<jrfondren> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc48f338446a6023e879b45]
17:19:56FromGitter<kayabaNerve> disruptek: Latest devel removes that actually
17:20:13disruptekare you sure? i just looked at it last night.
17:20:21FromGitter<kayabaNerve> That problem has existed for a while. Now, if you KeyError and ValueError in the same raises, KeyError is marked as uneeded.
17:20:36FromGitter<jrfondren> I'm looking at nim doc output.
17:20:46FromGitter<kayabaNerve> I just had these hints appear in my macro's tests a few hours ago.
17:21:07FromGitter<kayabaNerve> So I'm guessing `IOSelectorsException` is ref Exception. Who would've thunk
17:21:11disruptekof course.
17:21:30FromGitter<kayabaNerve> Why even have OSError if you're going to have `Exception` in your raises.
17:21:37*rnrwashere quit (Ping timeout: 276 seconds)
17:21:46disruptekas i said, i believe it's not the concept that's broken, but the implementation. araq believes the concept is broken but the implementation is fine.
17:21:50FromGitter<kayabaNerve> *why have OSError but not have the other potential Exceptions if you're going to have Exception in your raisesd
17:22:08disruptekagain, preachin' to the choir.
17:22:29FromGitter<jrfondren> meanwhile, despite listening for a few days, I have no idea what the problem is because you never state it clearly.
17:22:38FromGitter<jrfondren> I'll just wait to run into it then.
17:22:44FromGitter<kayabaNerve> newAsyncSocket() raises OSError, ValueError, IOSelectorsException, and Exception when you manually step the compiler to see what it yells you're missing.
17:23:01disrupteki'm sorry. i think luke is a much faster typist, in any event. :-P
17:23:20FromGitter<kayabaNerve> @jrfondren The problem is, according to disruptek, the core devs want to remove raises, as they think the idea is broken.
17:23:42disruptekafaik, no one wants to remove it. they just think the idea is broken.
17:24:09FromGitter<kayabaNerve> That said, the argument here is, no, raises is not broken at all, in idea or implementation. You just either misuse it or expect it to give you magical error handling when you need to put in the work to get it.
17:24:11disruptekit's hard to support concepts that you believe are fundamentally flawed, so a loss of support is akin to end-of-lifing the support.
17:24:24FromGitter<kayabaNerve> disruptek: oh thank god
17:24:34disruptekhere's what i, personally, think is broken about it:
17:24:39FromGitter<kayabaNerve> Again, I would try to fork Nim to maintain it if so.
17:24:52FromGitter<jrfondren> I'd expect the idea to be "it's like the case exhaustiveness checking but for exceptions".
17:25:14FromGitter<kayabaNerve> I think the only broken thing is the fact that exceptions are hierarchical.
17:25:29FromGitter<kayabaNerve> As far as raises is concerned, Exceptions should be treated as individually unique.
17:25:32FromGitter<jrfondren> with exhaustiveness you opt in with a case, can opt out with some other control flow structure, or can use a case but then else: assert(false)
17:25:34disrupteki should not have to know and change the order of raises exceptions in my list IFF that order denotes significants of implementation logic to the compiler. in that case, i want to see warnings at least, errors best.
17:25:58disruptekalso, dominating exception handlers make dead code of their victims, and no warning or error is raised.
17:26:04FromGitter<deech> Could use some feedback on https://github.com/nim-lang/Nim/pull/11076.
17:26:21disruptekalso, re-raises raise the type of the exception handler, versus the type of the exception.
17:26:52disruptekalso, exceptions are completely broken or behavior differently (at best) when you use combinations of cpp and --noCppExceptions.
17:27:18disruptekalso, `raise` has a different semantic from `raise getCurrentException()`.
17:27:27FromGitter<kayabaNerve> Real quick, does `raise` actually raise an Exception other than Exception and the one it's meant to?
17:27:46disruptekhow the *bleep* should i know?
17:27:47FromGitter<kayabaNerve> disruptek: getCurrentException() returns an Exception. raise will raise whatever you excepted.
17:28:11FromGitter<kayabaNerve> `raise instanceofKeyError` will not work in a proc with only `raises: [KeyError]`.
17:28:17FromGitter<jrfondren> if raise raised "the type of the exception" you couldn't say what type the expression the raise has in your source.
17:28:17FromGitter<kayabaNerve> ReraiseError doesn't change anything.
17:28:22disruptekwell, the `e`, is what i meant. we always talk about `e`, but i didn't know if jr would know what that meant.
17:28:27disrupteki guess there's a third way, as per usual.
17:28:28FromGitter<kayabaNerve> I could guess infinitely, but it does compile with Exception.
17:28:45FromGitter<kayabaNerve> @jrfondren Which is why I said the type you excepted it as.
17:29:03FromGitter<kayabaNerve> The type you excepted it as is irrelevant of `as e`
17:29:24disrupteki think you may be wrong about that, at least with devel branch. i haven't seen the behavior you describe. can you post a minimal example gist?
17:29:25FromGitter<kayabaNerve> I only try to `raise e` because `raise` adds some extra Exception to the mix that's unknown/Exception
17:29:39FromGitter<kayabaNerve> C++ backend only, issue #11118
17:29:43disruptekyeah, you cannot use `raise`. that's a given.
17:30:07*Sembei joined #nim
17:30:17disruptekoh, then i guess that issue is the same as the one i raised earlier. i think it's tagged codegen. you can see my example inside.
17:30:59FromGitter<kayabaNerve> I wrote a macro into ForceCheck that turns `fcRaise e` into `raise newException(e.type. e.msg)` as a work around.
17:31:23disruptekthat's helpful, thanks.
17:32:10FromGitter<kayabaNerve> It only saves the message field.
17:32:18FromGitter<kayabaNerve> I tried using `--noCppExceptions` on mine.
17:32:31FromGitter<kayabaNerve> It did crash with a ValueError, but it didn't print any except bodies
17:32:35FromGitter<kayabaNerve> I wish I was joking
17:32:39FromGitter<kayabaNerve> I have no idea why
17:32:50FromGitter<kayabaNerve> I'm perfectly OK with removing --noCppExceptions
17:33:43FromGitter<kayabaNerve> `except` and `except Exception` should be the same. Interesting they aren't.
17:34:55FromGitter<kayabaNerve> I love Nim. There's a reason why, almost one year ago, I started the biggest project of my life in it and have used it since.
17:34:59disruptekyeah, and i don't see anyone telling me that this exception behavior isn't broken.
17:35:38FromGitter<kayabaNerve> I worked on a macro to get me to handle errors a few weeks ago. Since then, there's just been a lot of cracks in Nim's Exceptions I have to question.
17:36:05FromGitter<kayabaNerve> The fact your issue wasn't closed and was given tags is someone telling you that it is broken.
17:37:17FromGitter<kayabaNerve> I do question why --noCppExceptions exists.
17:38:00FromGitter<kayabaNerve> My guess is it's a remnant from when C++ exceptions where being integrated and now it's an unmaintained broken feature with no valid use case.
17:38:11*SenasOzys joined #nim
17:47:32disruptekdoes it have something to do with trapping c++ exceptions in c++ imports?
17:50:45*rnrwashere joined #nim
17:56:53*rnrwashere quit (Remote host closed the connection)
17:58:33*rnrwashere joined #nim
18:16:12*rnrwashere quit (Remote host closed the connection)
18:16:30*rnrwashere joined #nim
18:38:23*vlad1777d quit (Ping timeout: 245 seconds)
18:45:01*jjido joined #nim
18:53:48*rnrwashere quit (Remote host closed the connection)
19:25:49*clyybber joined #nim
19:26:29clyybberdisruptek: AFAIK Araq said the concept is not worth it's complexity, not neccessarily that its broken.
19:28:27*smitop quit (Quit: Connection closed for inactivity)
19:29:14*neceve quit (Remote host closed the connection)
19:32:34disruptekyou might be right; that does sound familiar.
19:33:38*rnrwashere joined #nim
19:33:43disrupteky'know, having syntax like `except of ValueError as e:` might be nice sugar.
19:38:46*stefanos82 quit (Remote host closed the connection)
19:42:16*fanta1 quit (Quit: fanta1)
19:50:28*absolutejam2 joined #nim
19:50:32FromGitter<kayabaNerve> Sugar for what?
19:50:50FromGitter<kayabaNerve> except ValueError matches for ValueError descendants
20:00:48disrupteknote the `of` in there.
20:03:32FromGitter<kayabaNerve> So solely descendants?
20:05:02disruptekmaybe that's a good solution to this problem; it would actually encode the tree in legible text at the site of the logic. then we just need to validate it. all this makes the language support raises simply as verbose syntax.
20:05:08disruptekthat would be incredibly awesome.
20:05:23disruptekexcept ValueError of Exception as ve:
20:05:52disrupteknow we can validate the hiearchy, we know what we are raising, and we've recorded it all in code that is nearly english grammar.
20:06:27FromGitter<liquid600pgm> afaik this syntax *is* a thing
20:07:02FromGitter<liquid600pgm> tested that about 10 minutes ago on the latest devel, but I'm pretty sure it's a thing in stable too
20:07:06disruptekno, it crashes upon compilation.
20:07:47FromGitter<liquid600pgm> aah wait, didn't notice the `of Exception` here
20:11:32FromGitter<kayabaNerve> Sounds like a lot of work
20:11:47disruptekwhy?
20:13:13*zyklon joined #nim
20:13:53disrupteki think it's win:win:win. you get more legible code, plus raise detection, plus a language feature that becomes unremovable. :-D
20:17:09*uvegbot quit (Ping timeout: 252 seconds)
20:25:44*Trustable quit (Remote host closed the connection)
20:26:37*Jesin quit (Quit: Leaving)
20:31:02FromGitter<kayabaNerve> Nim's coded to match X, not match things that match as
20:31:20FromGitter<kayabaNerve> *match X and things that match as X, not match things that match as X but not X
20:31:26FromGitter<kayabaNerve> I hate gittet mobile.
20:31:33FromGitter<kayabaNerve> *gitter...
20:32:13FromGitter<kayabaNerve> I also personally don't use general exceptions like that and just match every specific descendant :p
20:34:43clyybbergitter on mobile is pure cancer
20:35:07clyybberc ya
20:35:08*clyybber quit (Quit: WeeChat 2.4)
20:40:36*smitop joined #nim
20:55:44disruptekthen hierarchy is meaningless to you?
20:56:39disruptekso, you like the new exception concept where exception classes are simple stack types?
21:20:37*solitudesf- quit (Ping timeout: 258 seconds)
21:22:47shashlick@dom96 - just responded on nocompiler, please take a look, thanks
21:45:32*absolutejam2 quit (Ping timeout: 258 seconds)
21:55:58*Jesin joined #nim
21:56:05noonienwhat can i use to represent a read-only "span" into an array or seq?
22:18:24*lritter quit (Quit: Leaving)
22:36:05*Jesin quit (Quit: Leaving)
22:42:43*rnrwashere quit (Remote host closed the connection)
22:47:12*Jesin joined #nim
22:50:06*smitop quit (Quit: Connection closed for inactivity)
23:02:43disrupteki think ranges are sugar for int sets, or something. either of those work?
23:02:52*nsf quit (Quit: WeeChat 2.4)
23:06:07*ng0 quit (Quit: Alexa, when is the end of world?)
23:12:35noonieni ended up going with https://nimble.directory/docs/ranges//ranges/typedranges.html
23:13:28noonienhmm, why are `func decode*[T: SomeInteger](d: Decoder): T` and `func decode*[T: array](d: Decoder): T` ambigous?
23:28:35FromGitter<kayabaNerve> disruptek: I think it creates a lot of problems and has a theoretical benefit, but I've never benefited from said theoretical benefits.
23:29:50FromGitter<kayabaNerve> Here's my Errors file: https://github.com/MerosCrypto/Meros/blob/Cleanup/src/lib/Errors.nim
23:30:35FromGitter<kayabaNerve> I use a hierarchy in a single place; the Database. Both DBWriteError and DBReadError are of DBError.
23:30:56*arecaceae quit (Remote host closed the connection)
23:31:15*arecaceae joined #nim
23:31:42FromGitter<kayabaNerve> This was part of the cleanup; we used to just have DBError. Having both made older code work well with newer code, while older code remained old.
23:31:54FromGitter<kayabaNerve> That said, I never use DBError anywhere anymore.
23:38:51*rnrwashere joined #nim
23:49:11*jjido quit (Quit: Textual IRC Client: www.textualapp.com)
23:57:00disruptekwell, technically, i think we can just replace the predicate for determining whether an exception may be handled by the block, so it could default to simple type equality for values but also support hiearchies, again, of those simple values.