<< 19-02-2020 >>

00:27:46*krux02_ joined #nim
00:30:18*krux02 quit (Ping timeout: 245 seconds)
00:58:23*dddddd quit (Remote host closed the connection)
01:09:57*krux02_ quit (Remote host closed the connection)
01:11:06*Hideki_ quit (Remote host closed the connection)
01:17:12*couven92 quit (Quit: Client Disconnecting)
01:18:30*my_dude joined #nim
01:22:35*dadada quit (Ping timeout: 268 seconds)
01:35:58*Kevin5 joined #nim
01:36:53*Kevin5 quit (Client Quit)
01:45:59*seni quit (Quit: Leaving)
02:09:14*Jjp137 quit (Quit: Leaving)
02:09:26*Jjp137 joined #nim
02:17:39*chemist69 quit (Ping timeout: 272 seconds)
02:18:24*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
02:18:57*chemist69 joined #nim
03:02:10*icebattle quit (Quit: leaving)
03:08:52*ptdel joined #nim
03:28:09*muffindrake quit (Ping timeout: 246 seconds)
03:30:34*muffindrake joined #nim
03:47:01*rockcavera quit (Remote host closed the connection)
04:45:11*nsf joined #nim
05:02:38FromGitter<xflywind> Hello, I got an error, but don't know why
05:02:40FromGitter<xflywind> https://gist.github.com/xflywind/16192857c39f918632706d81523e6aca
05:04:01FromGitter<xflywind> "type mismatch: got <proc (ctx: Context): Future[system.void]{.locks: <unknown>.}> ⏎ but expected 'HandlerAsync = proc (ctx: Context): Future[system.void]{.closure, gcsafe.}
05:04:18FromGitter<xflywind> complete code in https://github.com/planety/prologue/blob/master/src/prologue/core/middlewaresbase.nim
05:12:33*marmotini_ joined #nim
05:17:07*marmotini_ quit (Ping timeout: 260 seconds)
05:17:36*marmotini_ joined #nim
05:25:15*Jjp137 quit (Read error: Connection reset by peer)
05:25:34*Jjp137 joined #nim
05:27:30FromDiscord<Rika> xflywind it's not a closure and isnt annotated as gcsafe
05:28:06FromDiscord<Rika> add the two pragmas from the error into the code, i assume
05:29:25FromGitter<xflywind> Thanks,but why `doNothingClosureMiddleware` don't return closure function? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e4cc7b4d97c107ed2604dfa]
05:30:05*skrylar joined #nim
05:30:10skrylarboop
05:47:50*Jjp137 quit (Quit: Leaving)
05:47:57*Jjp137 joined #nim
06:00:02*ptdel quit (Ping timeout: 260 seconds)
06:04:20*narimiran joined #nim
06:22:49*xet7 quit (Remote host closed the connection)
06:23:59*xet7 joined #nim
06:38:32*chemist69 quit (Ping timeout: 260 seconds)
06:39:23*chemist69 joined #nim
06:51:42*hoijui joined #nim
07:03:42*jjido joined #nim
07:11:44*solitudesf joined #nim
07:55:44*skrylar quit (Quit: WeeChat 2.7)
08:00:00*gmpreussner quit (Quit: kthxbye)
08:03:50*my_dude quit (Quit: ZZZzzz…)
08:04:26*my_dude joined #nim
08:04:38*my_dude quit (Client Quit)
08:05:04*my_dude joined #nim
08:05:11*gmpreussner joined #nim
08:05:25*my_dude quit (Client Quit)
08:06:01*my_dude joined #nim
08:06:12*my_dude quit (Client Quit)
08:06:49*my_dude joined #nim
08:06:59*my_dude quit (Client Quit)
08:07:37*my_dude joined #nim
08:07:46*my_dude quit (Client Quit)
08:08:21*my_dude joined #nim
08:08:34*my_dude quit (Client Quit)
08:11:21*my_dude joined #nim
08:18:25*couven92 joined #nim
08:19:37*my_dude quit (Quit: my_dude)
08:20:33*solitudesf quit (Ping timeout: 272 seconds)
08:30:13*dadada joined #nim
08:30:36*dadada is now known as Guest81555
08:35:17*l1x quit (Ping timeout: 248 seconds)
08:37:20*tane joined #nim
08:37:22*xet7 quit (Quit: Leaving)
08:37:24*l1x joined #nim
08:38:51FromDiscord<sveri> Hi, using htmlgen I can see that I can do stuff like `htmlgen.td(class = "table", "sdf")` But when I try to use data-label like this: `htmlgen.td(data-label = "table", "sdf")` I get an error: Error: cannot extract identifier from node: data - label
08:38:51FromDiscord<sveri> Is there a way to use data-label? Or does it have to be supported by htmlgen, which it is not right now?
08:39:05*xet7 joined #nim
08:39:50FromGitter<xflywind> you can use `data-label`
08:40:02*my_dude joined #nim
08:40:29FromGitter<xflywind> ````data-label````
08:41:42FromDiscord<sveri> You mean like this: ` ``data-label`` `
08:42:11FromDiscord<sveri> You mean like this: "`data-label`"
08:42:22FromGitter<xflywind> ```td(`data-label` = "table", "sdf")```
08:42:24FromDiscord<sveri> with backticks? It's hard to write this in discord 😄
08:42:56FromGitter<xflywind> yes
08:43:04FromDiscord<sveri> Then I get another error: Error: invalid attribute for 'td' element: data-label
08:43:58FromGitter<xflywind> maybe not support this attrs
08:44:21FromDiscord<sveri> Yea, that's what I assume too.
08:46:53Araqfix it, it ain't hard
08:54:34*sagax joined #nim
09:03:57*floppydh joined #nim
09:06:06FromGitter<alehander92> ah this is not karax
09:06:11FromGitter<alehander92> i was confused for a while
09:07:54*zickzackv joined #nim
09:13:01WilhelmVonWeinerwhy can let be a block but not import
09:13:46zickzackvI thought about the same thing. It would feel much more (lispy)
09:14:25*LER0ever joined #nim
09:14:27Araqit would produce weird scoping rules
09:14:42AraqD tried that and in the end they had to special case the scoping just for that
09:15:02AraqI learn from other's mistakes too, not just from my own :P
09:15:35*lritter joined #nim
09:16:24WilhelmVonWeinerfair
09:17:39zickzackv:-)
09:18:31zickzackvso in the end `let` manipulates the current scope instead of creating a new one?
09:21:21*rokups joined #nim
09:25:29zickzackvI would like to get the value of an ordinal enum. How do do I get that number? Via a cast? Or is there a "nicer" way?
09:28:10FromGitter<timotheecour> ord
09:28:29zickzackvThanks
09:36:18*my_dude quit (Quit: ZZZzzz…)
09:36:58*my_dude joined #nim
09:36:58WilhelmVonWeinerhow would I add a default value to a parameter which is a user-defined type?
09:37:06*my_dude quit (Client Quit)
09:38:10*my_dude joined #nim
09:38:14WilhelmVonWeinerwithout specifying an actual value(?)
09:38:28*my_dude quit (Client Quit)
09:39:03*my_dude joined #nim
09:39:09WilhelmVonWeinerhttp://ix.io/2c7K at `kv: var seqpair = seqpair`
09:39:15*my_dude quit (Client Quit)
09:39:45*my_dude joined #nim
09:40:03*my_dude quit (Client Quit)
09:40:38*my_dude joined #nim
09:40:50*my_dude quit (Client Quit)
09:41:25*my_dude joined #nim
09:41:37*my_dude quit (Client Quit)
09:42:13*my_dude joined #nim
09:42:24*my_dude quit (Client Quit)
09:43:01*my_dude joined #nim
09:43:12*my_dude quit (Client Quit)
09:43:48*my_dude joined #nim
09:43:59*my_dude quit (Client Quit)
09:44:17FromDiscord<Rika> what do you mean
09:44:26FromDiscord<Rika> ah, `default(seqpair)`
09:44:47*zyklon quit (Ping timeout: 240 seconds)
09:45:41WilhelmVonWeiner`default(seqpair)` is immutable
09:47:42WilhelmVonWeinerbut that is the kind of thing i'm looking for
10:09:07*zyklon joined #nim
10:21:11Araqvar parameters cannot have default values
10:21:22Araqand types are not default values
10:25:10FromDiscord<Rika> also yeah what's the point of a default var param?
10:25:17FromDiscord<Rika> isnt that one of the pitfalls of python?
10:25:30FromDiscord<Rika> the "using a list as default value" gotcha
10:28:39WilhelmVonWeinerI never considered that a gotcha
10:29:34Araqit's a special case in Python and I never understood the point. Looked like an implementation bug to me
10:30:16FromDiscord<Rika> it doesnt feel intentional really
10:30:26Araqdef f(x = []): pass; it means f() is different from f([])
10:30:29FromDiscord<Rika> there are better ways to approach the same behavior
10:30:37Araqbreaking the default parameter completely.
10:31:05WilhelmVonWeinerthey're two different []s
10:31:16Araqevery other language: "default parameters are filled out for you if you leave them out"
10:31:28AraqPython: "and they have some special crazy lifetimes"
10:34:20FromDiscord<exelotl> Lol wtf
10:35:41AraqI mean, it's not the end of the world and it doesn't make Python a "flawed" language but it's not something I would copy over to a newer language
10:39:27Araqin fact, they should have fixed that for Python 3 IMO.
10:42:58FromDiscord<Rika> `default parameters are filled out for you if you leave them out` what do you mean? i dont understand this
10:44:34Araqit's a very rough definition for default parameters
10:45:17*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:45:41Araqyou have a call to a proc p, you need to give it the arguments 'p' expects but you can leave out parameters of 'p' that have a default.
10:46:25Araqthat's the point of default parameters, you can leave stuf out at the callsite.
10:47:10federico3Araq: is this a rant you wanted to write? http://blog.rfox.eu/en/Programmer_s_critique_of_missing_structure_of_oper.html
10:49:20*my_dude joined #nim
10:49:36Araqfederico3, interesting, will read
10:50:35*Vladar joined #nim
10:51:43federico3the complaints around docker and ansible are spot on
10:52:46federico3other than that, it doesn't really propose any workable solution
10:55:43*chemist69 quit (Ping timeout: 245 seconds)
10:56:07*chemist69 joined #nim
10:58:54WilhelmVonWeinerfederico3: I thought the same thing
10:59:30WilhelmVonWeinerit doesn't rant to a particular conclusion, it just trails off, and does it in way, way too many words
11:05:22Araqyeah, it's spot on. "Solving" it is pretty hard though. I mean, it's simple to solve, simply use Smalltalk/Lisp for everything
11:05:48Araqbut it's impossible with the current setups
11:06:58federico3there's very little that "the OS" can do: it's an ecosystem (and human) problem. But a lot can be done to develop and popularize good serialization formats
11:31:03*rockcavera joined #nim
11:31:32*Guest81555 is now known as dadada
11:33:58dadadaalehander92: hi, I like your breeze module, the only thing that bothers me is that there were no updates in 2 years (at least not visible on github)
11:34:14*NimBot joined #nim
11:34:34Araqsometimes software can be finished :-)
11:35:13dadadaAraq: in that case, why isn't it part of the standard library?
11:37:19*abm joined #nim
11:37:27Araqno RFC, no push for it, other alternatives exist
11:38:46dadadaI'd like to know what those alternatives are, besides simply not using it
11:39:36FromDiscord<clyybber> I pushed for it a bit
11:39:40dadadaI mean you can write the code with the usual nnk*.newTree() syntax, of course
11:39:43FromDiscord<clyybber> but not enough to write an RFC
11:40:49dadadaI'm pushing! :D
11:46:09*marmotini_ quit (Remote host closed the connection)
11:46:42*marmotini_ joined #nim
11:50:41WilhelmVonWeiner`And note that even Haskell - the king of monads! - has exceptions and doesn't return Option[T] for e.g. "out of memory".`
11:50:56WilhelmVonWeinerdamn Araq you went in guns blazing about the option monad
11:51:00*marmotini_ quit (Ping timeout: 248 seconds)
11:51:02*vycb[m] quit (*.net *.split)
11:51:06WilhelmVonWeineroption type even
11:51:53*vycb[m] joined #nim
11:57:01*couven92 quit (Read error: Connection reset by peer)
11:57:27*couven92 joined #nim
11:58:22zickzackvWilhelmVonWeiner, can you please post the link (again?) from where you quoted Araq?
12:01:33WilhelmVonWeinerhttps://forum.nim-lang.org/t/323
12:01:53Araqdadada, write an RFC already
12:07:25Araqactually one of my favourite quotes is
12:07:32Araq"Monads also compose poorly with each other"
12:07:40Araqfrom https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619
12:08:22Araqso there, they don't compose well. Haskell demystified.
12:10:53*rokups quit (Quit: Connection closed for inactivity)
12:11:14*ikan-keli_ quit (Quit: ZNC 1.8.x-git-125-e415d9f5 - https://znc.in)
12:11:32*ikan-keli_ joined #nim
12:12:26FromDiscord<clyybber> I have to confess, I don't entirely understand https://github.com/nim-lang/Nim/issues/13430
12:12:28disbotStrange Table memory error ; snippet at 12https://play.nim-lang.org/#ix=2c3d
12:14:18Araqclyybber: the example is broken, you need to follow the nim playground link
12:14:49FromDiscord<clyybber> ah, I see. I couldn't repro it because of that
12:15:28*nsf quit (Quit: WeeChat 2.7)
12:15:39Araqupdated it
12:15:56FromDiscord<clyybber> thanks
12:19:54FromDiscord<clyybber> Still too stupid
12:20:04FromDiscord<clyybber> seqs have value semantics so why is this happening?
12:21:47FromDiscord<clyybber> aaah
12:21:51FromDiscord<clyybber> got it now
12:22:50Araqonce again, https://nim-lang.org/docs/manual_experimental.html#aliasing-restrictions-in-parameter-passing
12:23:12FromDiscord<clyybber> I don't entirely see how it relates
12:23:23FromDiscord<clyybber> IMO the table2 should be a copy
12:23:26FromDiscord<clyybber> of the global
12:23:41FromDiscord<clyybber> and the `=` used to copy must call `=` on the seq
12:24:17Araqyou don't want pass-by-copy for Nim.
12:24:37Araqit would be a desaster for performance and people would use 'ptr' or 'var' or 'ref' everywhere
12:24:42Araqdestroying the language
12:24:58FromDiscord<clyybber> Hmm
12:25:59*mattmurr joined #nim
12:26:07Araqwe might add an RC to seqs/strings but this would only mitigate the problem
12:26:26Araqand it's questionable, a seq has a unique pointer inside
12:28:05FromDiscord<clyybber> So we have to forbid changing upvalues that are also passed as arguments
12:28:06*tefter quit (Quit: WeeChat 2.7)
12:28:47Araqyeah or alternatively f(someGlobal) is only allowed if f is .noSideEffect
12:29:09FromDiscord<clyybber> yeah
12:29:24Araqit gets tricky really fast though, let tmp = someGlobal; f(tmp) # well ok, 'let' introduces a copy then
12:29:39FromDiscord<clyybber> yeah, it must
12:29:57FromDiscord<clyybber> globals shall never be moved/sinked IMO
12:31:08FromDiscord<clyybber> And then we can also allow f(someGlobal) as long as f doesn't access someGlobal by itself and not through the param
12:31:35FromDiscord<clyybber> For that we must provide that no globals alias each other
12:32:23Araqglobals never do
12:33:27FromDiscord<clyybber> I wonder if deep immutability would solve this too
12:33:46FromDiscord<clyybber> disregard that
12:35:32*rockcavera quit (Remote host closed the connection)
12:37:56*dadada quit (Ping timeout: 248 seconds)
12:38:42FromDiscord<clyybber> Araq: Do you think there are sound alias rules with which we can forbid this invalid usage?
12:38:55FromDiscord<clyybber> Without restraining it to f being a func
12:39:15FromDiscord<clyybber> because that would be a bit bad for procs declared inside a scope
12:44:12AraqI think it's not much of a problem, Spark works
12:44:42Araqand the problem isn't severe either, it comes up rarely, only affects badly written code
12:45:01Araqand is usually solved by learning about 'var T' and Nim
12:45:44FromDiscord<clyybber> Yeah, but it's not immediately obvious why it happens
12:45:50FromDiscord<clyybber> so IMO the compiler should tell you
12:48:19FromDiscord<clyybber> Basically we should keep track of what "outside" variables a proc modifies
12:48:48FromDiscord<clyybber> and do it in a transitive way
12:48:57Araqjust implement my rules
12:49:01FromDiscord<clyybber> and then check at callsite that we don't pass these values
12:49:06FromDiscord<clyybber> Araq: Which ones?
12:49:11FromDiscord<clyybber> the f must be a func?
12:49:27Araqyeah
12:49:38FromDiscord<clyybber> But its overly pessimistic
12:50:01FromDiscord<clyybber> Also the problem isn't exclusive to globals
12:50:11Araqit's the only good way, else you track too many implementation details
12:50:35Araqwell yes, there are these rules too
12:50:36AraqTwo output parameters should never be aliased.
12:50:36AraqAn input and an output parameter should not be aliased.
12:50:36AraqAn output parameter should never be aliased with a global or thread local variable referenced by the called proc.
12:50:38*dadada joined #nim
12:50:47Araqwe have alias analysis in the compiler
12:50:56Araqyou might as well take advantage of it
12:51:01*dadada is now known as Guest28338
12:51:15Guest28338can a macro generate a completely new macro?
12:51:50*Guest28338 is now known as dadada
12:52:56Araqsure
12:54:28*hoijui quit (Ping timeout: 248 seconds)
12:56:30FromDiscord<clyybber> Araq: The problem I have with your proposal is that it will disallow this: https://play.nim-lang.org/#ix=2c8E
12:56:35FromDiscord<clyybber> Which is perfectly valid code
12:56:49FromDiscord<clyybber> noSideEffect is too coarse here
12:56:59FromDiscord<clyybber> we must track wether it modifies globals/upvalues
12:57:14FromDiscord<clyybber> because it then acts like an output parameter
12:59:35*nc-x[m] joined #nim
13:08:32*nc-x[m] is now known as nc-x
13:09:43*nc-x quit (Quit: authenticating)
13:09:50*nc-x joined #nim
13:17:53*nc-x left #nim ("User left")
13:22:21stefantalpalaruis there a *.config.nims equivalent for file-specific configurations like foobar.nim.cfg? There's a parsing order problem where all *.cfg files are parsed before all *.nims files.
13:22:42nisstyrestefantalpalaru: I don't think so, but that would be a nice feature
13:26:32FromDiscord<clyybber> stefantalpalaru: Does foobar.config.nims not work?
13:30:53stefantalpalaruNo, it doesn't with nim-1.0.6.
13:33:35narimiranThe results of Nim Community Survey 2019 are now available at: https://nim-lang.org/blog/2020/02/18/community-survey-results-2019.html
13:34:53*azed joined #nim
13:37:36FromDiscord<clyybber> stefantalpalaru: Can you open an issue? IMO it should.
13:39:55*dddddd joined #nim
13:41:38FromDiscord<Rika> > older than 60
13:41:39FromDiscord<Rika> daaaaaaaaamn thats cool as fuck
13:45:45FromDiscord<clyybber> oh shit, kakoune gang's in the survey
13:47:24*rockcavera joined #nim
13:48:38narimiranfocusing only on the important bits :D
13:52:18FromDiscord<Rika> > no my company doesnt allow it
13:52:21FromDiscord<Rika> big F
14:09:50*solitudesf joined #nim
14:15:32*couven92 quit (Ping timeout: 258 seconds)
14:20:28leorize@mratsim: is nim-stint still maintained?
14:28:06*marmotini_ joined #nim
14:40:40*azed quit (Quit: WeeChat 2.7)
14:42:18FromDiscord<clyybber> @mratsim
14:54:35*JustASlacker joined #nim
15:03:19FromDiscord<mratsim> yes
15:03:30FromDiscord<mratsim> it's key library
15:04:33*my_dude quit (Quit: ZZZzzz…)
15:18:37*zickzackv quit (Ping timeout: 265 seconds)
15:35:39Araqgithub is broken
15:37:05FromDiscord<Rika> ? what happened
15:37:46leorizehttps://www.githubstatus.com/
15:42:44Araqcan't merge pull requests
15:43:14leorizeso to implement the basic converter in the ryu paper, you need an arbitrary precision floating point type...
15:43:34leorizewell I guess there's a reason why ryu is used and not that converter
15:47:30*nsf joined #nim
15:52:15*ptdel joined #nim
15:54:23*JustASlacker quit (Ping timeout: 265 seconds)
16:01:53*Kaivo quit (Quit: WeeChat 2.7)
16:07:46*tiorock joined #nim
16:07:46*tiorock quit (Changing host)
16:07:46*tiorock joined #nim
16:07:46*rockcavera is now known as Guest35090
16:07:46*Guest35090 quit (Killed (weber.freenode.net (Nickname regained by services)))
16:07:46*tiorock is now known as rockcavera
16:24:33FromDiscord<clyybber> ugh
16:24:45FromDiscord<clyybber> now we have testutil
16:24:50FromDiscord<clyybber> in the stdlib
16:25:18leorizetestutil?
16:25:31FromDiscord<clyybber> testutils
16:25:33FromDiscord<clyybber> yeah
16:25:36FromDiscord<clyybber> its bloat
16:25:40FromDiscord<Rika> another testing framework???
16:25:43FromDiscord<clyybber> no
16:25:47FromDiscord<clyybber> literally two templates
16:26:05FromDiscord<Rika> what's it for then
16:26:25FromDiscord<clyybber> to use it in tests, to save 5 keypresses
16:26:28FromDiscord<clyybber> or 10
16:26:30FromDiscord<clyybber> i dunno
16:29:31Araqclyybber: PRs are accepted
16:31:25Araqand we don't have that in stdlib, it's not listed from lib.rst
16:31:42Araqwe'll move it around, or remove it again
16:35:35disruptekleorize: nice work on ryu.
16:36:05FromDiscord<clyybber> I'm making a PR to remove it
16:40:41leorizedisruptek: thanks :)
16:40:50FromDiscord<clyybber> Araq: Whats left to be done on your branch?
16:42:07AraqI'm fixing bugs
16:42:17Araqand then it's still not done at all :-(
16:42:25Araq# Todo:
16:42:25Araq# - make variables scope based too
16:42:25Araq# - ensure correctness for 'or' and 'elif' constructs
16:42:39FromDiscord<clyybber> if variables are not scope based yet, what is?
16:44:57Araqtemporaries
16:46:03FromDiscord<clyybber> ah
16:49:40*Trustable joined #nim
16:49:48*floppydh quit (Quit: WeeChat 2.7)
16:54:22disruptekAraq: like this: raise newException(ValueError, "could not identify a sane tag")
16:54:37*JustASlacker joined #nim
16:55:04disruptekhttps://github.com/disruptek/bump/blob/master/bump.nim#L298
16:55:57disruptekleorize: oh, i know what i wanted to hit you up about.
16:56:48disruptekyour patch to nimph. the reason i wrote it the way i did is because we rely upon the current compiler's semantics implicitly, because we're built against the compiler's code.
17:03:11*JustASlacker quit (Ping timeout: 260 seconds)
17:04:31FromDiscord<clyybber> lol that feed-nim logo is amazing
17:04:56FromDiscord<clyybber> oh, its a fork
17:21:23leorize[m]disruptek: well yes but the user might have more than one compiler, no? ie. choosenim-based system
17:22:27disruptekyes, which is why we use the compiler we were built with -- it's the one that behaves according to the code we built nimph with.
17:23:52*qwertfisch is now known as kaputt
17:25:11disruptekthink pathSubs(), for example.
17:33:54*nsf quit (Quit: WeeChat 2.7)
17:58:42*tiorock joined #nim
17:58:42*tiorock quit (Changing host)
17:58:42*tiorock joined #nim
17:58:42*rockcavera quit (Killed (card.freenode.net (Nickname regained by services)))
17:58:42*tiorock is now known as rockcavera
17:59:33*lritter quit (Quit: Leaving)
18:12:30stefantalpalaruSome benchmark numbers for the impact of libbacktrace-based stack tracing: https://github.com/status-im/nim-beacon-chain/pull/745#issuecomment-588360225
18:12:32disbotlightweight stack traces
18:25:48*Trustable quit (Remote host closed the connection)
18:51:13*jjido joined #nim
18:53:27*dadada quit (Remote host closed the connection)
18:59:04disruptekwhy does the func keyword exist?
18:59:47lqdev[m]it's a shortcut to .noSideEffects, which can be useful in cases like multithreading.
19:00:10disruptekso, to save a few characters?
19:00:23lqdev[m]pretty much, yeah.
19:01:11FromDiscord<clyybber> disruptek: its handy
19:01:22lqdev[m]don't worry, I don't like it too. I mean, why have another keyword that only really adds a pragma and consumes a valid identifier in the process?
19:01:23disruptekto say a few characters, yes, i get it.
19:01:48FromDiscord<clyybber> I like it
19:02:02disrupteki just love trying to debug around it with echo.
19:02:08disruptekmuch fun.
19:02:14FromDiscord<Recruit_main_70007> i also do, but still dont really understand what exactly a side effect is
19:02:36FromDiscord<clyybber> its when you read or modify something not in your responsibility/params
19:02:45FromDiscord<clyybber> disruptek: What problem?
19:03:04disruptekany problem in status code and, in future, nim's stdlib.
19:03:12disruptekgonna be a real fun feature.
19:03:33FromDiscord<clyybber> ?
19:03:40*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:03:41disrupteki dunno why i'm so salty today.
19:04:50disruptekclyybber: which part of that don't you understand?
19:08:44FromGitter<Vindaar> @disruptek you're aware of `debugecho`, yes?
19:09:22disruptekdoes it work in unittest?
19:10:54disruptekit does.
19:10:57disruptekwhee, thanks.
19:12:55*my_dude joined #nim
19:13:18FromDiscord<clyybber> clyybber: All of it
19:13:22FromDiscord<clyybber> disruptek: All of it
19:13:29FromDiscord<clyybber> Like, which status code?
19:13:45disrupteki'm trying to fix results.
19:13:49disruptek!repo disruptek/badresults
19:13:50disbothttps://github.com/disruptek/badresults -- 9badresults: 11like results but worse 15 0⭐ 0🍴
19:14:54FromDiscord<clyybber> whats the actual problem tho?
19:15:32disruptekit segfaults under cpp/arc/goto.
19:16:00*my_dude quit (Client Quit)
19:16:07FromDiscord<clyybber> but not due to echo being or not being func?
19:16:56disruptekAll of it.
19:17:26disrupteki need the whole file to work. all the time.
19:26:48Araqdisruptek, there is debugEcho
19:26:56Araqwhich is 'echo' for within funcs
19:26:57disruptekthanks, it works.
19:28:13*my_dude joined #nim
19:38:02*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
19:38:12*njoseph joined #nim
19:38:49FromGitter<Varriount> disruptek: That documentation is very snarky
19:39:05disruptekwhat?
19:40:11disrupteki mean, i'm sure it is, but i have no idea what you're talking about.
19:42:45*ptdel quit (Ping timeout: 240 seconds)
19:48:07*hoijui joined #nim
19:48:19*zedeus quit (Ping timeout: 265 seconds)
19:49:33disruptekcpp --gc:arc --exceptions:goto codegen err: https://travis-ci.org/disruptek/bump/jobs/652604967
19:49:39disruptek(on osx)
19:50:16disruptek... in strutils. 👀
19:51:33disruptekshashlick: have you always used clang in your travis script?
19:52:06*k0mpjut0r joined #nim
19:54:30*ptdel joined #nim
19:54:47*ptdel quit (Client Quit)
19:55:06*ptdel joined #nim
19:57:14shashlickNothing explicit in there is it?
19:59:31disruptekno idea. who chooses the compiler? travis himself?
20:07:59*JustASlacker joined #nim
20:08:43FromGitter<alehander92> disruptek
20:08:46FromGitter<alehander92> you can use debugecho
20:08:49FromGitter<alehander92> i araq said it
20:08:51FromGitter<alehander92> ah(
20:08:55FromGitter<alehander92> ah*
20:09:15FromGitter<alehander92> i think its useful as it motivates the programmer to use noSideEffect
20:09:27FromGitter<alehander92> its a bit like why let is not var a {.let.} imho
20:10:05shashlickdisruptek: chooses compiler? What do you mean
20:22:36*couven92 joined #nim
20:29:10disruptekwhen is it gcc and when is it clang? roulette?
20:30:00disrupteki'm in favor of the concept of side-effect free functions. i'm just not in favor of not giving the programmer an escape hatch.
20:30:51disruptekthis is why badresults exists. because, basically, i could not impose upon arnetheduck to relax the requirement that every `$` implemented for every type supported by Result must be side-effect-free.
20:30:56disruptekto me, that's absurd.
20:33:56shashlickWindows / Linux it is gcc, OSX it is clang - depends on what is in nim.cfg
20:34:19shashlickeverything simply calls gcc and gcc = clang on osx
20:34:26*hoijui quit (Ping timeout: 240 seconds)
20:36:49disruptekah, of course. 🤦
20:46:07*marmotini_ quit (Remote host closed the connection)
20:46:39*marmotini_ joined #nim
20:47:59*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
20:51:10*marmotini_ quit (Ping timeout: 268 seconds)
20:59:31*jjido joined #nim
21:23:21*narimiran quit (Ping timeout: 272 seconds)
21:24:01*JustASlacker quit (Ping timeout: 265 seconds)
21:51:50FromDiscord<Elegant Beef> for https://github.com/zacharycarter/bgfx.nim should i use a bgfx commit from 5 months ago also just for ensured compatibillity?
21:53:57FromDiscord<Elegant Beef> using the most recent commit i get this nice error while trying to run it
21:53:57FromDiscord<Elegant Beef> `./libbgfx-shared-libRelease.so: undefined symbol: glXGetFBConfigAttrib`
21:56:51FromDiscord<clyybber> Araq: Fine to merge this https://github.com/nim-lang/Nim/pull/13435 ?
21:56:52disbotRemove testutils
21:59:24FromGitter<alehander92> oh i was wondering if we can insist on `$` to be `func` and `raises: []`
21:59:36FromGitter<alehander92> why is it absurd disruptek
22:00:12FromGitter<alehander92> there are escape hatches: debugecho uses one of those
22:00:25disruptekbecause when adapting to existing ffi-used code, i cannot necessarily produce something using for `$` without a side-effect.
22:00:45disrupteks/used/using/, s/using/useful/ 😉
22:01:36disrupteki mean, sure, great. it's a nice idea when starting from scratch or when you can afford to pay people to produce all your code on spec.
22:02:16FromGitter<alehander92> well, its a great idea to me, because it makes it easier to actually use `raises: ..`
22:02:21FromGitter<alehander92> in normal code
22:02:38FromGitter<alehander92> i guess the reasons for the results lib are similar, not totally sure
22:02:39disruptekit's broken anyway. don't even bother trying to use it.
22:02:44disruptekespecially with async.
22:03:03FromGitter<alehander92> but if it wasnt broken, it would make sense
22:03:07FromGitter<alehander92> same thing with func-s
22:03:28FromGitter<alehander92> anyway, imho one can simply have non-comformable $ either with other name "mytext"
22:03:37FromGitter<alehander92> or just as $ which is not in func/raises: []
22:03:37disruptekwe are likely to see exceptions fall back into favor now that araq feels they are performant, but that doesn't change the fact that this stuff doesn't actually work in the real world.
22:03:43disruptekdude.
22:03:47disruptekwishin' won't make it so.
22:03:52FromGitter<alehander92> or in "cast"/`{.noSideEffect.}`:
22:04:05Araqhuh?
22:05:23FromGitter<alehander92> i am talking in general, even if i just analyze it in my head, it helps a lot to not think of at least `$`
22:05:54FromGitter<alehander92> it can always return "invalid" or something, it doesnt need to raise, its a repr function
22:06:08disrupteknim-result demands a func for `$`.
22:06:11disruptekbadresults does not.
22:06:57FromGitter<alehander92> and there is no good reason for `$` to echo
22:07:13disruptekwho said anything about echo?
22:07:20FromGitter<alehander92> ok, what kind of side effects
22:07:27disruptekffi
22:07:28FromGitter<alehander92> can happen otherwise? logging ?
22:07:48FromGitter<alehander92> but what can that do? http request?
22:07:59FromGitter<Varriount> Loading data from disk, or from a request
22:08:37disruptekit can do anything. that's the point.
22:08:43FromGitter<alehander92> well, maybe it isn't great to make `$` do stuff like this, but i can see this is a matter of taste
22:09:18FromGitter<alehander92> but to me it would've been reasonable if we were started from a clean sheet, as disruptek hinted
22:09:28disruptekthe point is, 1) i want a working Result that doesn't /require/ that i implement a `$`. 2) i also don't think i should be required to impl a `$` that is side-effect free. it's not even necessarily an option.
22:10:02*solitudesf quit (Ping timeout: 240 seconds)
22:10:12FromGitter<alehander92> well i guess it makes sense for nim-results
22:10:22disrupteksure, but gittyup is littered with gratuitous `$` funcs because dumb.
22:10:26FromGitter<alehander92> i agree that just returning objects might have many benefits
22:10:38disruptekwhat?
22:10:41FromGitter<alehander92> so they are both different approaches
22:10:50FromGitter<alehander92> well, returning some kind of object instead of string
22:10:51*Vladar quit (Quit: Leaving)
22:10:52FromGitter<alehander92> for error
22:16:26Araqdisruptek: why use it at all though? what's wrong with exceptions
22:16:36FromDiscord<Elegant Beef> Araq, dont know if you had seen my message but now my entities are just pointers to an seq[int] that i use as a bit mask for components
22:16:59FromDiscord<Elegant Beef> Using archetypes mixed with bitmasking
22:17:28Araqwhy? did Nim lose the 'set' datatype while I wasn't looking?
22:18:08FromDiscord<Elegant Beef> the int array is so i can use bitops and increase the size of components out of range of 32bits
22:18:14FromDiscord<Elegant Beef> or 64 bits
22:18:20disruptekwait, what?
22:18:37disruptekAraq: #11081 still open.
22:18:38disbothttps://github.com/nim-lang/Nim/issues/11081 -- 3DateTime field on Exception produces inconsistent C/++ handling ; snippet at 12https://play.nim-lang.org/#ix=20PX
22:19:08*abm quit (Quit: Leaving)
22:19:18FromDiscord<Elegant Beef> the sequence just holds a bunch of int32s per archetype so i can use dynamically added components and use bit flags
22:19:36Araqdisruptek: can't merge my fix because of Timothee's linenoise patch
22:19:38FromDiscord<Elegant Beef> using int32 for not having large lists and not overly allocating memory
22:19:49disruptekthems the breaks.
22:19:57FromDiscord<treeform> @Elegant Beef I also made an entity system, but ended up not using it.
22:19:58Araquse Nim's 'set'
22:20:03FromDiscord<Elegant Beef> no
22:20:07FromDiscord<Elegant Beef> im not storing idis
22:20:07disruptekplease.
22:20:09FromDiscord<Elegant Beef> ids*
22:20:15FromDiscord<Elegant Beef> im storing bitflags
22:20:19FromDiscord<Elegant Beef> each int is 32 components
22:20:27disrupteksets are so nice to use, though.
22:20:30FromDiscord<exelotl> @Elegant Beef set is for storing bitflags
22:20:36FromDiscord<Elegant Beef> the sequence is ceil compoonent count/32
22:20:46FromDiscord<Elegant Beef> it's length that is
22:20:56disrupteki think i just vomited a little into my mouth.
22:21:01FromDiscord<Elegant Beef> why?
22:21:08disruptekmy sister calls that a "tasty burp."
22:21:18Araqdisruptek: please...
22:21:30disruptekwell, he started it.
22:21:45FromDiscord<Elegant Beef> I mean i made a wrapper for handling this all so it's super easy to use
22:21:47Araqno.
22:22:05FromDiscord<Elegant Beef> generate a mask using the ints that are got from the components at compile time
22:22:10FromDiscord<Elegant Beef> and be happy
22:22:36Araqeasier than {flagA, flagB, ...} which is a builtin and more optimized than your stuff?
22:23:21FromDiscord<Elegant Beef> I mean i dont even know what bit functionality you're talking about in sets
22:23:27FromDiscord<Elegant Beef> wouldnt sets just store a list of ints
22:23:45FromDiscord<clyybber> no
22:24:09disrupteki think i'm gonna be sick.
22:24:26FromDiscord<Elegant Beef> good
22:24:43FromDiscord<clyybber> ate the beef
22:25:50FromDiscord<Elegant Beef> Where is the documentation for the {a,b} stuff
22:26:03disruptek~manual
22:26:04disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
22:26:10Araqin the manual. in the tutorial
22:28:39FromDiscord<Elegant Beef> can i dynamically make an enum at compile time?
22:28:46disrupteki will permit it.
22:30:17FromDiscord<clyybber> @Elegant Beef can I roast you?
22:31:20*hax-scramper joined #nim
22:34:06FromDiscord<Elegant Beef> sure
22:34:23AraqI told you last week to use set of enum
22:34:38FromDiscord<Elegant Beef> Yea which i basically did
22:34:50FromDiscord<Elegant Beef> i didnt realize that you meant use bitflags of enums
22:36:33FromDiscord<Elegant Beef> also how many bits does this work for?
22:36:49disruptek65,536
22:36:55*ptdel joined #nim
22:37:06FromDiscord<Elegant Beef> ok so plenty
22:37:21disruptekdepends upon the application.
22:37:22FromDiscord<clyybber> 65.536 for you
22:37:39FromDiscord<clyybber> the other half of the 64'th is reserved for me
22:41:05Araqcan you please be nicer to Elegant Beef?
22:41:33AraqI don't understand these nasty jokes
22:41:42FromDiscord<Elegant Beef> they were being mean?
22:42:46disruptekjust good-natured ribbing.
22:42:53disruptekribbed for my pleasure.
22:43:25FromDiscord<clyybber> lol
22:43:28disrupteki mean, we're all here trying to help each other produce better software.
22:43:31FromDiscord<Elegant Beef> i mean clyybber has so many constonants in a row in his name it's unprounacable
22:43:50FromDiscord<Elegant Beef> Any insult from him doesnt count
22:43:56FromDiscord<clyybber> is y a constononant?
22:44:03FromDiscord<clyybber> and if so y?
22:44:17FromDiscord<Elegant Beef> it's a vowel in your name
22:44:19FromDiscord<Elegant Beef> depends on the word
22:45:26disrupteki made a mistake in openapi.
22:45:55FromDiscord<Elegant Beef> so in all sincerity, i assume i can use a macro to generate a enum that can be used at runtime
22:46:00disruptekof course.
22:46:00FromDiscord<clyybber> yeah
22:46:18disruptekyou can generate an enum that can be used at compile-time, too.
22:46:30FromDiscord<Elegant Beef> so now to play with nnks? 😄
22:47:14FromDiscord<clyybber> @Elegant Beef you can try breeze
22:47:22FromDiscord<clyybber> it will make writing macros a ..
22:47:24FromDiscord<clyybber> breeze
22:47:39*FromDiscord <Recruit_main_70007> ba dum tss
22:48:12FromDiscord<Recruit_main_70007> do gifs work through the bridge bot?
22:48:21FromDiscord<Elegant Beef> they're images so it'll post a link
22:48:23FromDiscord<clyybber> yeah
22:48:27FromDiscord<clyybber> except for disruptek
22:48:45FromDiscord<Recruit_main_70007> https://tenor.com/view/ba-dum-tsss-punchline-gif-7320811
22:49:02FromDiscord<treeform> us discord ppl can just enjoy them
22:49:14FromDiscord<Elegant Beef> some IRC clients embed so they also do
22:49:39FromDiscord<treeform> at this rate, in the future I see discord having more active users then IRC
22:49:51FromDiscord<Elegant Beef> I
22:49:55FromDiscord<treeform> IRC will be the bridge 🙂
22:49:55FromDiscord<clyybber> I
22:50:01FromDiscord<Elegant Beef> i'd prefer something like riot.im having more users
22:50:03FromDiscord<Elegant Beef> but meh
22:50:27FromDiscord<clyybber> would be cool to bridge this with the telegram group
22:52:15disrupteki fixed my discord image problem with stylebot.
22:52:22*zedeus joined #nim
22:53:01FromDiscord<clyybber> nice
22:53:25disruptekgitter is still a sh1tshow.
22:53:33FromDiscord<clyybber> yeah
22:53:37FromDiscord<clyybber> always was
22:56:17disruptekwe are anti-varargs these days, right?
22:56:35disrupteklike, don't bother writing the word because at some point, someone is gonna break that thing.
22:56:49disruptekand also varargs converters, yes?
22:56:56disruptekjust say `no` to both?
22:57:22disruptekgive it to me straight, doc.
22:57:27FromDiscord<clyybber> lol
22:57:28disruptekwill i ever play the violin again?
22:58:01FromDiscord<Recruit_main70007> the violnim for sure
22:59:03disruptekyou know what drives me nuts?
22:59:13disruptekokay, you know what /else/ drives me nuts?
22:59:23FromDiscord<clyybber> tell me
22:59:27FromDiscord<Recruit_main70007> my stupidness?
22:59:39disruptekwhen people write nim macros and manipulate the ast using [int] syntax, as in n.sons[3]
22:59:44disrupteki mean, wtf people...
23:00:05FromDiscord<clyybber> wait, n.sons[3] works?
23:00:13FromDiscord<clyybber> not n[3] ?
23:00:19disruptekwell, you know, whatever.
23:00:38disruptekabsolutely infuriating.
23:00:44disruptekthere oughta be a law.
23:00:48FromDiscord<clyybber> *guilty*
23:01:00disruptekyou better hope i never find out where you live.
23:01:23FromDiscord<Elegant Beef> to add values to an enum does it make more sense to predeclare the enum or is it the same work either way?
23:01:35disruptekwhat?
23:01:46*tane quit (Quit: Leaving)
23:01:58FromDiscord<Elegant Beef> Does it make sense to declare the enum name / first field, or is it just redundant
23:02:20FromDiscord<Elegant Beef> ie `EnumName = enum` and `None = 0`
23:02:46disruptekit's not redundant because otherwise EnumName.None does not exist.
23:02:59FromDiscord<Elegant Beef> I mean it can if im generating the enum in the macro
23:03:10disruptekthe zeroeth value has no special significance. does that help?
23:03:33FromDiscord<Elegant Beef> Well i know that, but im saying using a macro to populate an enum which makes more sense
23:03:53FromDiscord<Elegant Beef> IE: Does having a predeclared enum reduce any work
23:04:07disruptekyeah, because it cannot be extended if it's predeclared.
23:04:14disruptekso, that reduces the work of extending it.
23:04:14FromDiscord<Elegant Beef> ok
23:04:18FromDiscord<Elegant Beef> thanks
23:06:43disrupteki should say that the zeroeth value is used by default in a case object. so if you want a variant object based upon the enum, then you'll need to start it at zero. for that reason, it could make sense to treat zero specially.
23:08:23disruptekso varages.. 👍 or 👎?
23:08:36disruptekremember, this is for posterity, so please be honest.
23:08:46disruptekvarargs, too.
23:09:24FromDiscord<clyybber> ☝️
23:09:31FromDiscord<clyybber> 👍
23:10:56*glassofethanol joined #nim
23:18:43*nikita joined #nim
23:19:06*nikita is now known as Guest87463
23:21:02FromDiscord<Elegant Beef> So what's the AST look like for a enum, i just tried to echo it but got `sym("Name")`
23:21:31disruptekit's kinda like a horse with a short neck and no tail.
23:22:21FromDiscord<clyybber> @Elegant Beef you mean for a type definition of an enum?
23:22:38FromDiscord<Elegant Beef> Yea im trying to see what i need to match
23:22:48disruptekdid you try the manual?
23:22:57disruptekhttps://nim-lang.org/docs/macros.html#newEnum%2CNimNode%2CopenArray%5BNimNode%5D%2Cbool%2Cbool
23:23:11FromDiscord<Elegant Beef> I mean im using that
23:24:30disruptekand it's not producing short-necked tail-less horses?
23:25:10FromDiscord<Elegant Beef> I mean i am trying to use breeze but no clue how that works so... removing that
23:27:29FromDiscord<clyybber> you just do
23:27:34FromDiscord<clyybber> result = buildMacro:
23:27:56FromDiscord<clyybber> https://github.com/alehander92/breeze#rationale
23:28:04FromDiscord<Elegant Beef> yea i seen that
23:28:12FromDiscord<Elegant Beef> but i dont know how to get a new type to get declared with that
23:28:50FromDiscord<clyybber> typesection:
23:29:04FromDiscord<clyybber> ...
23:29:08FromDiscord<clyybber> and so on :p
23:29:24FromDiscord<Elegant Beef> ah i see it emulates the AST tree, but with` name :`
23:31:02FromDiscord<clyybber> yep
23:41:02*Guest87463 quit (Quit: ZNC 1.7.2+deb3 - https://znc.in)
23:42:29*my_dude quit (Quit: ZZZzzz…)
23:45:28*my_dude joined #nim
23:48:39*my_dude quit (Client Quit)
23:51:57*glassofethanol left #nim (#nim)
23:57:10*my_dude joined #nim