00:00:06zacharycarterfails with invalid indentation
00:00:39*FromGitter quit (Read error: Connection reset by peer)
00:00:48*FromGitter joined #nim
00:00:53zacharycarterAlright - need some help with some type design
00:01:07*zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/rqyOGjTBakxxlRhERpIoBlpG >
00:01:11zacharycarterI want to do something like this -
00:01:28*zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/PUfawjbnDSwVxwIoLqZhVuQY >
00:01:41*zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/txARTXJDzQJBiMddYqNJILyr >
00:02:00zacharycarterbut I don't know how to mix types for the value / 2nd generic param
00:03:33FromGitter<rayman22201> @zacharycarter this does not compile though: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4e83c4ecc1f82e2fc08f01]
00:03:55*avsej joined #nim
00:03:55*avsej quit (Changing host)
00:03:55*avsej joined #nim
00:04:39*zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/yYHBehKGwteftBJpSDRSvsYb >
00:04:41zacharycarterwill though
00:05:55FromGitter<rayman22201> interesting. You are correct
00:06:28FromGitter<rayman22201> That fixed that issue. Thanks! The compiler could probably use a better error message there.
00:06:59zacharycarteryeah - may want to file an issue
00:07:09FromGitter<rayman22201> I now get the error: ```lib/pure/pegs.nim(91, 11) Error: attempt to redefine: 'sons'```
00:07:12zacharycarterI don't think Nim supports declarations like that
00:07:41zacharycarterah yeah you can't redefinine a type attribute with the same name in multiple case clauses in the same varidic type
00:08:16*zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/iASgCuNRXcPSrFrYYeAesObG >
00:08:27*FromGitter quit (Read error: Connection reset by peer)
00:09:01*NimBot joined #nim
00:09:05zacharycarterbasically if you have the type attribute bar defined under 0
00:09:08zacharycarteryou can't re-define it again under `1
00:09:21zacharycarterit has to have a different identifier
00:10:54FromGitter<rayman22201> is that behavior considered a bug / open issue, or is it just an accepted design limitation?
00:11:24*zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/NOrKcHudcjbwyGRNcufMzpJg >
00:11:44*zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/MDBHuOvGxMwhkGNTLEvVBdUg >
00:12:02zacharycarterthis is as designed - it'd be very difficult to overcome this limitation
00:12:19*FromGitter quit (Read error: Connection reset by peer)
00:12:33zacharycarterthe compiler would have to get very smart
00:12:48zacharycarterand it's already very smart
00:12:58*FromGitter joined #nim
00:13:53*avsej quit (Ping timeout: 248 seconds)
00:14:20FromGitter<rayman22201> lol. ok? and?
00:17:10zacharycarterthat's the answer
00:17:35zacharycarterit's not going to be doable - not in the forseeable future of the language
00:17:45FromGitter<rayman22201> My question is why?
00:17:52zacharycarterI explained why
00:18:20zacharycarterit's extremely difficult to do in the compiler
00:18:31zacharycarterI didn't write the compiler
00:18:32*FromGitter quit (Read error: Connection reset by peer)
00:18:41zacharycarterbug Andreas if you want a real answer
00:20:02*FromGitter joined #nim
00:20:25*avsej joined #nim
00:20:25*avsej quit (Changing host)
00:20:25*avsej joined #nim
00:27:16*erblite joined #nim
00:30:21*xylef joined #nim
00:37:23FromGitter<rayman22201> Nothing? Is there documentation on this limitation anywhere? Github wiki, Github issue, the forum? I'm not trying to be an ass, I just want to understand this limitation better.
00:38:20FromGitter<rayman22201> It seems like the kind of thing that should be in the docs at least.
00:40:10zacharycarterI'm pretty sure it is
00:40:38zacharycarteryou can always dig into the compiler to understand why it'd be difficult
00:41:30FromGitter<rayman22201> where does that document describe that limitation?
00:43:05FromGitter<rayman22201> neither is it described here: https://nim-lang.org/docs/manual.html#types-object-variants
00:43:11zacharycarterI'm not sure that it does - I was just linking to where I knew the doc was
00:43:31*FromGitter quit (Remote host closed the connection)
00:43:34zacharycarterwell - I guess the argument from the language creator would probably be that it doesn't assert that it allows for that either
00:43:39*FromGitter joined #nim
00:44:05zacharycarterand since Nim is built on top of C, it's on the user when they assert that the language does exhibit such a feature
00:44:16zacharycarterbut I don't disagree that a PR couldn't hurt
00:45:03zacharycarterbut I A) Don't know where the best place to put the comment would be or B) how it would be best phrased
00:45:27zacharycartermaybe an issue would be the best place to start - not sure if there is one already existing or not
00:45:28*FromGitter quit (Read error: Connection reset by peer)
00:46:07*FromGitter joined #nim
00:46:23zacharycartergoing to skate to the convenience store real quick, be back in a few
00:46:37FromGitter<rayman22201> πŸ‘
00:47:07*subsetpark quit (Quit: --)
00:50:29CodeVancerayman there's the docs for the compiler internal
00:50:49*FromGitter quit (Remote host closed the connection)
00:50:58*FromGitter joined #nim
00:56:14*avsej quit (Ping timeout: 256 seconds)
01:01:18*subsetpark joined #nim
01:03:55*avsej joined #nim
01:03:55*avsej quit (Changing host)
01:03:55*avsej joined #nim
01:07:25*cspar_ joined #nim
01:08:35*avsej quit (Ping timeout: 240 seconds)
01:17:58*Jesin joined #nim
01:21:26*avsej joined #nim
01:21:26*avsej quit (Changing host)
01:21:26*avsej joined #nim
01:31:29*avsej quit (Ping timeout: 256 seconds)
01:32:36*slmjkdbtl joined #nim
01:32:37*slmjkdbtl left #nim (#nim)
01:38:01*avsej joined #nim
01:38:01*avsej quit (Changing host)
01:38:01*avsej joined #nim
01:39:37*donlzx quit (Remote host closed the connection)
01:40:02*donlzx joined #nim
01:42:42*avsej quit (Ping timeout: 256 seconds)
01:50:24*avsej joined #nim
01:50:24*avsej quit (Changing host)
01:50:24*avsej joined #nim
01:52:05skrylari bring more presents https://github.com/skrylar/raylib-nim
01:54:02*leorize quit (Ping timeout: 256 seconds)
01:56:40*death916 quit (Quit: EliteBNC 1.6.5 - http://elitebnc.org)
02:00:09*Death916_ joined #nim
02:00:09*Death916_ quit (Changing host)
02:00:09*Death916_ joined #nim
02:00:09*Death916_ quit (Changing host)
02:00:09*Death916_ joined #nim
02:01:07*Snircle joined #nim
02:02:25*Snircle quit (Client Quit)
02:03:21*vegax87 quit (Quit: EliteBNC - http://www.elitebnc.net/)
02:16:19CodeVancethanks XD
02:17:23zacharycarterskrylar: zengine is basically a giant port of raylib πŸ˜…
02:17:31zacharycarterwith some added stuff
02:17:35zacharycarterand some missing stuff
02:17:59zacharycarterbut anyhow - I'm going to work on a new engine soon
02:18:06zacharycarterand skeasing will be in it for sure!
02:18:35zacharycarteralthough I really think you should name the library skeasy
02:19:48*Death916_ is now known as death916
02:24:28*donlzx quit (Remote host closed the connection)
02:31:42*donlzx joined #nim
02:37:32*vegax87 joined #nim
02:41:20skrylarzacharycarter, i did a big bugfix to skeasing the other day. and added physics springs
02:46:52*BitPuffin quit (Remote host closed the connection)
03:02:02*gangstacat quit (Ping timeout: 256 seconds)
03:04:20*gangstacat joined #nim
03:06:26*erblite quit (Ping timeout: 276 seconds)
03:07:40*endragor joined #nim
03:24:33FromGitter<gogolxdong> Is there any SOAP nimble packeage?
03:29:31*krux02 quit (Remote host closed the connection)
03:47:01skrylari don't see one
03:49:03skrylarzacharycarter, have you dealt with lattice deformations? having a trouble wrapping my head around them, although current best guess is to subdivide NxN lattices in to smaller 2x2's
03:49:47*dddddd quit (Remote host closed the connection)
03:50:26skrylarwill probably have to shelve the question until i have a tesselator and preview rig though :\
04:10:07FromGitter<gogolxdong> then how to translate a SOAP python serializer to nim?
04:23:45skrylaruse custom pragmas for annotations, have a macro scrape those annotations and generate code using the xml module to produce xml output?
04:27:26*xet7 joined #nim
04:42:38skrylarheh reading the 2017 survey; people wanted tk?
04:42:50skrylarI mean, i guess. Tk is a decently simple GUI, not a lot to it tho
05:09:01*beaumonta joined #nim
05:09:44*zama_ joined #nim
05:10:40*Calinou_ joined #nim
05:11:09*dzho_ joined #nim
05:16:29*Cthalupa quit (*.net *.split)
05:16:29*zama quit (*.net *.split)
05:16:35*Calinou quit (*.net *.split)
05:16:35*odc quit (*.net *.split)
05:16:35*zielmicha_ quit (*.net *.split)
05:16:35*euantor quit (*.net *.split)
05:16:35*m712 quit (*.net *.split)
05:16:35*dvn quit (*.net *.split)
05:16:35*dzho quit (*.net *.split)
05:16:35*abeaumont quit (*.net *.split)
05:17:45*Cthalupa joined #nim
05:20:07*zama_ quit (Changing host)
05:20:07*zama_ joined #nim
05:20:09*zama_ is now known as zama
05:24:30*nsf joined #nim
05:30:11*xet7 quit (Remote host closed the connection)
05:34:12*amosbird quit (Read error: Connection timed out)
05:34:41*amosbird joined #nim
05:35:13*dvn joined #nim
05:35:13*odc joined #nim
05:35:13*zielmicha_ joined #nim
05:35:13*euantor joined #nim
05:35:13*m712 joined #nim
06:06:09*xet7 joined #nim
06:26:12FromGitter<gogolxdong> Is tk popular ? never heard of.
06:29:48FromGitter<gogolxdong> tried http://rosettacode.org/wiki/100_doors#Tcl
06:33:28Araqtk itself is undead
06:33:44Araqbut it's the standard UI lib for Python and maybe for Ruby too
06:34:36CodeVancetk would actually benifit from nim's macros
06:34:54Araqmost UIs would, see Karax.
06:34:56CodeVancesince theres so much boilerplate
06:35:15CodeVanceWhat I don't like about tk is the interface with its internals
06:35:30CodeVanceI know but tk especially.
06:39:59FromGitter<rayman22201> Good morning @Araq! Can you explain to me the situation with Variant types not being able to redefine type fields with the same name?
06:40:15Araqthere is a long issue about it
06:40:45FromGitter<rayman22201> Is there a github link I can read?
06:47:05FromGitter<rayman22201> Thank you! πŸ˜„ my search skills suck today
07:41:36*PMunch joined #nim
07:42:43PMunchHmm, we should promote this pattern in the internal options menu: https://github.com/superfunc/maybe
07:43:14*ng0 joined #nim
07:47:54FromGitter<mratsim> sounds good.
07:48:00Araqwhich pattern?
07:56:42PMunchInstead of doing a check if an option is valid, then try to access it's variable, have a block that exposes the value to you if it's there, and one where it's not there.
07:57:29PMunchRight now it would be entirely possible to do "if not x.isSome: echo x.get"
07:57:36PMunchWhich obviously won't work
07:58:43PMunchCame across this when looking at Toccata: http://www.toccata.io/2017/10/No-Booleans.html
07:58:55PMunchIt's a functional language that compiles to C, and it doesn't have booleans
07:59:04PMunchNo if clauses
08:00:13AraqI've seen that, yes.
08:00:23AraqAnd don't understand it.
08:01:01PMunchWhat do you mean you don't understand it?
08:01:16Araq"bool" is not a result from "goto" statements, it's stupid
08:01:53Araqboolean logic predates imperative asm programming by hundreds of years
08:02:36Araqnor is the compression of information "bad".
08:02:47Araqevery "sum" and "avg" operation does that too.
08:03:11PMunchYeah he's not saying that booleans comes from gotos
08:03:37PMunchHe was just using gotos as an example of things most modern languages have removed, or at least shuns.
08:04:30PMunchAnd compression of information, while not inherently bad, can be scary
08:05:01Araqcompression is the essence of perception.
08:06:41PMunchLook at the maybe/options use-case. By creating two scopes, one with the value present, and one without it, we don't lose any information about our maybe. This means that we can't mess up something which is obviously illegal.
08:09:02PMunchOr consider NULL pointers, not a huge problem in Nim, but it happens from time to time. By compressing the check myPointer == nil into a boolean you've essentially lost information about what that boolean means. Booleans as a type is yes true or false, without retaining any information about what they actually checked. By scoping this in a similar way to the options we ensure that we can't create null pointer dereferences as the null pointer isn't visible in
08:09:02PMunchour scope.
08:09:08FromGitter<mratsim> > As Conor McBride puts it, to make use of a Boolean you have to know its provenance so that you can know what it means. ⏎ […] ⏎ > Keeping track of this information (or attempting to recover it using any number of program analysis techniques) is notoriously difficult. ⏎ ⏎ Checking where a boolean comes from is difficult? [https://gitter.im/nim-lang/Nim?at=5b4ef5a44b583a74a7250e46]
08:10:20FromGitter<mratsim> I’m fine with superfund/maybe pattern, currently reading the boolean blindness article but I think the hypothesis it’s starting with is flawed.
08:10:27PMunch@mratsim, if you only have a boolean it's impossible to know where it comes from
08:10:56FromGitter<mratsim> if you only have an int it’s impossible to know where it comes from, should we remove int?
08:11:51FromGitter<mratsim> i.e. use enums and a proper type system.
08:11:51PMunchNo, the idea is that while 5 is just a number, true carries some implicit meaning of what is true
08:12:27PMunchYeah, that is one way to solve a lot of the things they point out
08:13:00FromGitter<mratsim> 5 is not just a number, it can be kilometrs, miles, integer_overflow_error, launch the missile, health remaining, Passport ID
08:13:00PMunchI'm not saying we should go crazy and delete booleans from Nim by the way :P I just wanted to see it in the options module :P
08:13:26PMunchYes of course
08:14:01PMunchWhich is where distinct types comes in
08:16:49FromGitter<mratsim> I much prefer this essay by the same author: btw, it’s quite funny: https://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html
08:18:25PMunchI haven't actually read it yet, but I've seen it referenced. I think I'll read it right away :)
08:21:41*regtools joined #nim
08:21:46*regtools quit (Client Quit)
08:21:51*ng0 quit (Quit: Alexa, when is the end of world?)
08:30:49Araq"I’m fine with superfund/maybe pattern, currently reading the boolean blindness article but I think the hypothesis it’s starting with is flawed" exactly my position too.
08:37:22PMunchhttp://www.hxa.name/notes/note-hxa7241-20131124T0927Z.html <- This talks about the issue you raised mratsim of "5 is not just a number"
08:38:13PMunchAnd I agree with you, the same way a bool only carries its value, so does an integer
08:40:12PMunchImagine the case where we have many procedures which passes pointers around, each should check if it's null, even if that check was just done in the previous procedure.
08:41:02PMunchIf we had created a distinct type NonNullablePtr and required that for all our procedures along with creating some way to check and convert a pointer to a NonNullablePtr this check could be done once.