<< 10-02-2016 >>

00:02:48*FreezerburnV quit (Quit: Leaving)
00:04:25*johnsoft joined #nim
00:04:54*johnsoft quit (Remote host closed the connection)
00:09:11*vendethiel quit (Ping timeout: 264 seconds)
00:12:56*jaco60 quit (Ping timeout: 250 seconds)
00:20:00*Matthias247 quit (Read error: Connection reset by peer)
00:24:54ldleworkIf I have a "type Foo = ref object of RootObj", what then is the difference between "type Bar = object of Foo" and "type Bar = ref object of Foo"
00:25:13ldleworkIf Foo is already a ref type, does making Bar a "ref object of Foo" make a ref to a ref?
00:29:34Araqno.
00:29:54Araqthe 'ref' is skipped for convenience
00:30:09Araqobject of (ref T) is the same as object of T
00:30:29ldleworkbut what if I wanted it
00:30:46Araqwhat would that mean?
00:30:58Araqcan you inherit from Foo* in C++? nah.
00:31:12ldleworka gc managed pointer to a gc managed pointer to a structure value I guess
00:31:31Araqthat's ref ref T, but I'm talking about 'object of ...'
00:31:35ldleworkright
00:31:38ldleworkokay
00:31:56Araqit's even the same in java
00:32:11Araqand Java only knows 'ref object'
00:32:20filwiti define all my types as `ptr ref ref ptr T` just to be edgy
00:32:33ldleworkheh
00:40:12*yglukhov quit (Remote host closed the connection)
00:43:15*ephja quit (Ping timeout: 240 seconds)
01:05:03*gokr quit (Quit: Leaving.)
01:06:08icsCan I assert that a type/value is invalid?
01:06:38*derka quit (Quit: derka)
01:07:06icse.g. if I define `type ObjVertexRef = range[0..high(int)]` I can say `assert ObjVertexRef(1) == 1` but anything with ObjVertexRef(-1) blows up (as it should)
01:09:15*brson quit (Ping timeout: 245 seconds)
01:13:21*toaoMgeorge quit (Quit: Bye)
01:14:44filwitics: I don't understand, isn't that exactly what happens and the whole reason to use a 'range' type in the first place?
01:15:42*brson joined #nim
01:15:58icsfilwit: In use, but I have an itch to write `assert ObjVertexRef(-1) == InvalidTypeExceptionOrWhatever`
01:16:26icsIt's redundant and possibly stupid from many points of view, but I'm curious either way
01:17:37filwityeah it's completely redundant.. i don't understand why you would want to do that beyond testing that the assert & range features are actually working.
01:18:21*heinrich5991 quit (Quit: quit.)
01:18:51icsWhen starting something new I often leave types very general and refine them as I go after writing tests
01:19:31*heinrich5991 joined #nim
01:20:37icsBut I guess it does the job either way, if I write the assertion which blows up I know to fix the type...
01:21:03icsNevermind, then.
01:22:36*brson quit (Quit: leaving)
01:28:55*darkf quit (Ping timeout: 240 seconds)
01:31:26*darkf joined #nim
01:44:55*NimBot2145 joined #nim
01:50:27*NimBot2145 quit (Remote host closed the connection)
01:52:06*NimBot2145 joined #nim
01:52:25*NimBot2145 quit (Remote host closed the connection)
02:05:19*biscarch quit (Read error: Connection reset by peer)
02:06:14*brson joined #nim
02:22:49*brson quit (Quit: leaving)
02:27:56*desophos_ joined #nim
02:29:34*desophos quit (Ping timeout: 256 seconds)
02:36:44*trusion joined #nim
02:41:27*junw_ quit (Read error: Connection reset by peer)
02:41:52*junw_ joined #nim
03:04:32*Senketsu quit (Ping timeout: 250 seconds)
03:05:22*Senketsu joined #nim
03:34:56*lompik quit (Ping timeout: 240 seconds)
03:36:55*exebook quit (Ping timeout: 260 seconds)
03:38:21*endragor joined #nim
03:41:56*filwit quit (Quit: Leaving)
04:24:35endragorAre generic converters expected to work? Or am I doing something wrong here: https://gist.github.com/endragor/88e6747524011930e83c
04:32:28*jsudlow quit (Read error: Connection reset by peer)
04:33:11*jsudlow joined #nim
04:58:35*junw_ quit (Ping timeout: 260 seconds)
05:18:23*vendethiel joined #nim
05:41:06*vendethiel quit (Ping timeout: 256 seconds)
05:47:21*vendethiel joined #nim
05:57:36*s4 joined #nim
06:08:25*vendethiel quit (Ping timeout: 245 seconds)
06:25:19*endragor quit (Remote host closed the connection)
06:28:26*endragor joined #nim
06:50:28*Demon_Fox_ joined #nim
06:51:02*darkf quit (Quit: Leaving)
06:51:42*Demon_Fox quit (Ping timeout: 272 seconds)
06:56:00*Demon_Fox_ is now known as Demon_Fox
07:06:46*SirCmpwn quit (Ping timeout: 250 seconds)
07:12:03*SirCmpwn joined #nim
07:17:23*vendethiel joined #nim
07:18:08*filcuc joined #nim
07:25:22*SirCmpwn quit (Ping timeout: 240 seconds)
07:31:14*SirCmpwn joined #nim
07:34:17*gour joined #nim
07:37:59*endragor quit (Remote host closed the connection)
07:39:11*vendethiel quit (Ping timeout: 264 seconds)
07:56:30*endragor joined #nim
07:58:01*Arrrr joined #nim
08:03:23*vendethiel joined #nim
08:05:11*Ven joined #nim
08:19:54*gokr joined #nim
08:23:50*derka joined #nim
08:25:46*vendethiel quit (Ping timeout: 240 seconds)
08:38:59gokrAraq: I presume you also went to sleep, but let me know if you find something.
08:42:25*desophos_ quit (Read error: Connection reset by peer)
08:45:34*Ven quit (Read error: Connection reset by peer)
08:46:06*Ven joined #nim
08:46:57*derka quit (Ping timeout: 240 seconds)
08:47:28*derka_ joined #nim
08:53:52*mog joined #nim
08:54:07*Demon_Fox quit (Quit: Leaving)
08:56:33*toaoMgeorge joined #nim
09:03:52*vendethiel joined #nim
09:12:03*coffeepot joined #nim
09:13:04*gour_ joined #nim
09:15:30*gour quit (Ping timeout: 245 seconds)
09:15:56*coffeepot quit (Client Quit)
09:16:07*coffeepot joined #nim
09:25:53*gour_ is now known as gour
09:26:00*vendethiel quit (Ping timeout: 252 seconds)
09:27:06*derka_ quit (Quit: derka_)
09:47:49*gour_ joined #nim
09:48:55*gour quit (Disconnected by services)
09:48:57*gour_ is now known as gour
10:03:14*exebook joined #nim
10:07:10*vendethiel joined #nim
10:24:29*derka joined #nim
10:26:27*derka quit (Client Quit)
10:27:46*derka joined #nim
10:28:00*vendethiel quit (Ping timeout: 245 seconds)
10:31:45*derka quit (Ping timeout: 240 seconds)
10:43:23*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:49:58*exebook quit (Remote host closed the connection)
10:50:09*hh_ joined #nim
10:56:31*ephja joined #nim
10:56:35*hh_ quit (Quit: Page closed)
11:03:59*NimBot joined #nim
11:24:06*trusion quit (Ping timeout: 245 seconds)
11:28:02*arnetheduck joined #nim
11:28:06*trusion joined #nim
11:32:52*trusion quit (Ping timeout: 250 seconds)
11:36:47*trusion joined #nim
11:42:49*filwit joined #nim
11:49:15*apotheon quit (Ping timeout: 240 seconds)
11:49:35*apotheon joined #nim
11:52:33*warkid quit (Ping timeout: 252 seconds)
11:53:55*junw_ joined #nim
12:01:06*Ven joined #nim
12:04:58*Varriount joined #nim
12:07:26*Varriount_ quit (Ping timeout: 245 seconds)
12:07:55*niv joined #nim
12:08:46*aziz joined #nim
12:14:29*BlaXpirit quit (Quit: Bye)
12:14:39*BlaXpirit joined #nim
12:25:17*junw_ quit (Quit: Leaving)
12:26:55*Trustable joined #nim
12:27:29*BlaXpirit quit (Quit: Bye)
12:27:40*BlaXpirit joined #nim
12:33:26*Senketsu quit (Ping timeout: 240 seconds)
12:46:35*jaco60 joined #nim
12:51:02*Dildosan joined #nim
12:53:20*warkid joined #nim
13:27:19*s4 quit (Quit: Konversation terminated!)
13:41:27*warkid quit (Ping timeout: 252 seconds)
13:58:45*NimBot joined #nim
13:59:06def-dom96: the latter: https://gist.github.com/def-/cb01b21094e34ece4c30
13:59:50dom96then we should improve what we can and hope for the best
14:01:04*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:01:20dom96This time you can put me down as a mentor as well
14:01:28def-great
14:03:24*derka joined #nim
14:13:06*lompik quit (Ping timeout: 252 seconds)
14:17:26*BitPuffin joined #nim
14:21:01*Ven joined #nim
14:29:37*M-Quora joined #nim
14:31:19*M-max quit (Quit: node-irc says goodbye)
14:38:07*derka_ joined #nim
14:39:15*derka quit (Ping timeout: 245 seconds)
14:39:16*derka_ is now known as derka
14:42:47*vendethiel quit (Ping timeout: 264 seconds)
14:52:35*francisl joined #nim
14:52:59*toaoMgeorge quit (Ping timeout: 264 seconds)
14:57:43*derka_ joined #nim
14:58:12*filwit_ quit (Quit: Leaving)
14:59:56*derka quit (Ping timeout: 240 seconds)
14:59:56*derka_ is now known as derka
15:00:24*BitPuffin quit (Ping timeout: 252 seconds)
15:04:34ArrrrNim is today more popular, you may be luckier this time
15:08:38*francisl quit (Quit: francisl)
15:10:26*francisl joined #nim
15:19:27*derka quit (Quit: derka)
15:20:45*skyfex joined #nim
15:26:45*Dildosan quit (Quit: Leaving)
15:33:40*derka joined #nim
15:34:16*derka quit (Client Quit)
15:35:42*desophos joined #nim
15:38:03*Dildosan joined #nim
15:38:39AraqArrrr: last time it was pretty obvious they favoured things Google might find useful later on. and afaik Google prefers Go over Nim ;-)
15:39:14*derka joined #nim
15:41:34*filwit joined #nim
15:46:41*Dildosan quit (Remote host closed the connection)
15:47:21*vendethiel joined #nim
15:49:31*francisl quit (Quit: francisl)
15:55:49*derka quit (Quit: derka)
15:57:38*Ven quit (Ping timeout: 256 seconds)
15:58:28*Dildosan joined #nim
16:02:44*endragor quit (Ping timeout: 256 seconds)
16:03:25*yglukhov joined #nim
16:06:35Araqyglukhov: if I change the JS backend to use bitsets for Nim's set implementation would there be any compatibility issues? I don't think so
16:07:26*francisl joined #nim
16:07:40*sepisoad joined #nim
16:08:04*bpr joined #nim
16:08:46*sepisoad quit (Client Quit)
16:08:54*vendethiel quit (Ping timeout: 250 seconds)
16:09:57yglukhovbitsets = bitmasks? if yes, i would welcome this.
16:10:05*sepisoad joined #nim
16:10:15*sepis0ad joined #nim
16:10:15*sepis0ad quit (Client Quit)
16:14:41*pregressive quit (Read error: Connection reset by peer)
16:15:13*pregressive joined #nim
16:24:24*endragor joined #nim
16:24:50Araqyes
16:25:10*BitPuffin joined #nim
16:25:47filwithmm... type-class specialization and converters don't seem to play nicely...
16:27:43filwitof course, that makes sense now that I think about it.. it would be non-trivial work to get the compiler to deduce what converter it should implicitly invoke when passed to a procedure that takes an type-class..
16:28:42filwitwell.. in the case I'm using it (eg, not with 'concept' but with 'int|float|etc') it would probably be not too difficult.. but with concepts IDK..
16:29:00filwitanyways, guess I'll just duplicate the procedures with overloads..
16:29:34*brson joined #nim
16:42:48sepisoadi just read about this, maybe you like it too: http://andrewkelley.me/post/intro-to-zig.html
16:43:01*vendethiel joined #nim
16:43:22filwityeah i saw that on reddit the other day
16:43:27filwiti like the error handling
16:43:48sepisoadfilwit, exactly the error handling is awesome
16:44:54sepisoadalso the 'C' interoperability seems to be very simple
16:45:41*derka joined #nim
16:47:00filwityeah accept I doubt it works as smoothly as he wants in every case... there's a lot of 'struct hacks' people do in C which complicates how another language needs to bind to it
16:47:18filwitexcept*
16:48:02*endragor quit (Remote host closed the connection)
16:48:35sepisoadfilwit, nim is still my favorite language ;)
16:49:04filwitwell that's cool :P mine too
16:51:20filwitzig's design does look pretty good for a very young language.. but I didn't see any mention of memory safety in there, and the author apparently doesn't use Rust-style ownership.. so I'm not sure exactly what options you have to safely managing memory (my guess is he's got a some strong/weak ptr int the std libs.. since he seems most familiar with C++)
16:51:49filwit(of course, that's not really "safe")
16:52:36filwitanyways, compared to Rust I MUCH prefer how he works with non-null ptrs and error handling
16:53:09filwitwhere Rust is very verbose and cluttered syntactically (unwrap fucking *everywhere*), his `??` operators fit in cleanly
16:53:42sepisoadyup
16:56:21*skyfex quit (Quit: My Mac has gone to sleep. ZZZzzz…)
16:56:58*Dildosan quit (Quit: Leaving)
16:57:28filwiti was disappointed in in symbol choice for error unions though (%).. and that '?' needs to appear before (not after) the type-name... he missed a perfectly good opportunity to have "int!?" syntax common throughout the code :P
16:59:09sepisoadfilwit, maybe you can suggest this to the author
16:59:35filwityeah maybe..
17:03:46*yglukhov quit (Remote host closed the connection)
17:05:55*vendethiel quit (Ping timeout: 240 seconds)
17:06:29*filcuc quit (Read error: Connection reset by peer)
17:09:51*yglukhov joined #nim
17:15:26*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:21:16*francisl quit (Quit: francisl)
17:24:01*vendethiel joined #nim
17:24:36*nsf quit (Quit: WeeChat 1.4)
17:32:26Araq"Since Zig understands error types, it can pre-weight branches in favor of errors not occuring. Just a small optimization benefit that is not available in other languages."
17:32:36Araqyeah, right because likely(...) doesn't exist ...
17:32:44Araq"There are no C++ style exceptions or stack unwinding or anything fancy like that. Zig simply makes it convenient to pass error codes around."
17:33:10Araqhere we go again ... so it's nowhere near as efficient as C++'s exception handling
17:33:46AraqThe C preprocessor is extremely powerful. Maybe a little too powerful.“
17:33:51Araqno, omg
17:34:19Araqit's not even Turing complete...
17:35:08filwityeah maybe..
17:35:16filwitcrap.. alt-tab...
17:37:07Arrrrdef- what about the yaml implementation idea from last year?
17:41:47*francisl joined #nim
17:44:26*vendethiel quit (Ping timeout: 240 seconds)
17:52:56filwitthis is driving me nuts, I think it's a bug with converters + generic specialization... I have a Vector tuple type and I want a converter which auto-converts any tuple of "Number" to it... so I have ``converter toVector2[X,Y:SomeNumber](t:tuple[x:X, y:Y]): Vector2 = ...``
17:53:31filwitbut that wont work if I use it like: ``let x: Vector2 = (a.float, b.float32)``
17:54:05filwithowever it WILL work if I simple remove the `SomeNumber` specialization (and no, it doesn't matter if I put `SomeNumber` on both X/Y individually)
17:55:10filwitthis is supposed to work, right? it's not like I'm missing something obvious..
17:55:35*vendethiel joined #nim
17:58:04*yglukhov quit (Read error: Connection reset by peer)
17:58:28*yglukhov joined #nim
18:06:10*francisl quit (Quit: francisl)
18:06:21ldleworkI have found places where converters don't work
18:06:39ldleworkusually around places where square brackets are being used
18:07:00*sepisoad quit (Ping timeout: 248 seconds)
18:08:52filwityeah, I mean it's not a huge deal to use use (a.float, b) # when 'a' is not already a float
18:09:07filwitbut it's annoying that I have to explicitly do that throughout the code..
18:09:12filwitoh well..
18:09:43ldleworkfilwit: I struggle with cints :)
18:10:43filwitldlework: just make a `type AnyInt = SomeInteger|cint|clong` etc types and use those, it helps
18:14:42*darkf joined #nim
18:17:26*vendethiel quit (Ping timeout: 240 seconds)
18:17:30ldleworkfilwit: did you see my latest screenshot?
18:17:40filwitno, link me
18:18:10*NoOova quit (Ping timeout: 240 seconds)
18:18:12ldleworkhttp://i.imgur.com/7cpy5Cs.png
18:18:29filwithey, very cool :D
18:18:45filwitlooking good man
18:18:54filwitthere's no player right now?
18:19:06*vendethiel joined #nim
18:19:12ldleworkNah this is just a visualization of the biome data. Like, this is the high-level "regional" biome layout.
18:19:28ldleworkand with just some fake biomes made up in the data
18:20:02filwiti see, neat
18:20:16*aziz quit (Remote host closed the connection)
18:20:35filwitcan you scroll around and stuff?
18:20:39*Matthias247 joined #nim
18:20:42ldleworkyeah
18:20:53ldleworkit generates chunks of the world on the fly as you scroll around
18:20:55filwitsmooth scroll?
18:20:56ldleworkso its 'infinite'
18:21:02*francisl joined #nim
18:21:05ldleworkNo, it scrolls by tile.
18:21:13ldleworkbut it looks pretty smooth I guess
18:21:28ldleworkBut I'm guessing you meant "by pixel"
18:21:30*NoOova joined #nim
18:21:36filwitoh i see, a procedural land like minecraft, i see
18:38:59ephjabut please don't make it a 2d minecraft :p
18:39:34ephjahave you thought about mechanics yet? is the engine going to be reusable?
18:40:04ephjasimple, but nice looking
18:40:20ldleworkephja: it is a 2D wilderness survival game
18:40:37*Matthias247 quit (Read error: Connection reset by peer)
18:41:58ephjaok
18:43:50ldleworkephja: development going on here, https://github.com/dustinlacewell/dadren
18:46:35*yglukhov quit (Read error: Connection reset by peer)
18:49:09*yglukhov joined #nim
18:52:56*vendethiel quit (Ping timeout: 276 seconds)
18:55:27*vendethiel joined #nim
19:00:01*derka quit (Quit: derka)
19:02:29*yglukhov_ joined #nim
19:02:29*yglukhov quit (Read error: Connection reset by peer)
19:03:37*francisl quit (Quit: francisl)
19:04:32*derka joined #nim
19:06:03ArrrrHave you played unrealworld? http://www.unrealworld.fi/
19:14:55*derka quit (Quit: derka)
19:16:06*vendethiel quit (Ping timeout: 240 seconds)
19:16:13*yglukhov_ quit (Read error: Connection reset by peer)
19:18:28*yglukhov joined #nim
19:18:38*vendethiel joined #nim
19:24:37*francisl joined #nim
19:25:42ldleworkArrrr: I have yeah
19:31:41*derka joined #nim
19:32:14*francisl quit (Quit: francisl)
19:45:08*yglukhov quit (Remote host closed the connection)
19:50:48*BitPuffin quit (Ping timeout: 252 seconds)
19:52:16*mat4 joined #nim
19:52:19mat4hi all
19:55:27*toaoMgeorge joined #nim
19:58:13Araqservus mat4
19:58:19mat4hi Araq
19:59:50*toaoMgeorge quit (Ping timeout: 260 seconds)
20:00:15*nsf joined #nim
20:09:43mat4As side project I work at current on a simple character based display processor (CDP) for text based applications. This includes a SDL based library as software emulation in Nim. Possible that's of interesst for one of you here
20:14:07ldleworkwhaaa
20:14:10ldleworkwhat does it do
20:17:42mat4Driving monitors up to Full HD with text modes from 32x16 characters up to 120x67 characters
20:17:53mat4The CDP features pixel precise fine scrolling, a blitter and individual 4-bit palettes for each scan line. Font resolution is 16x16 pixel down to 16x1 pixel. Attribute resolution is 2 possible colours from 16- Palette resolution is 16 bit (high colour)
20:20:18mat4I will use it for a somewhat more advanced terminal interface
20:22:21ldleworkmat4: is there a repo with a demo?
20:22:35*francisl joined #nim
20:22:54mat4you mean for the emulation ?
20:23:11ldleworkyeah
20:24:03mat4here's a screenshoot: https://github.com/Mat2/Amon/blob/master/cdp1.png
20:24:09mat4it's an old version however
20:25:35mat4I upload the new sources beside working next days
20:25:46mat4^beside work
20:25:49ldleworkmat4: An emulated character raster library for SDL2 would be cool.
20:26:00ldleworkI'm not interested in all in its real purpose though.
20:26:44mat4well, you find the old source file here: https://github.com/Mat2/Amon/blob/master/cdp2.nim
20:26:54mat4^you can
20:28:29mat4as written I plan to replace the whole repro with new source versions in the next days
20:31:23ldleworkokay, I don't need anything I'm just passively interested.
20:31:33ldleworkmat4: I have a tilemap implementation but I can use arbitrary tilesets
20:32:11ldleworkAn api that emulated a character raster but could be used for real terminal rastering or emulation by SDL would be super neat
20:33:26mat4hmm, tilemaps.. Are you planning writing an emulator for some classic video console ?
20:34:18mat4ldlework: That's my plan
20:34:53ldleworkmat4: yeah I'm making a roguelike game, http://i.imgur.com/7cpy5Cs.png
20:36:26mat4nice looking map!
20:36:34ldleworkthx
20:36:58*brson quit (Ping timeout: 240 seconds)
20:38:02mat4do you know the uzebox ? http://belogic.com/uzebox/index.asp
20:38:33*bpr quit (Quit: Page closed)
20:40:07*Arrrr quit (Quit: WeeChat 1.2)
20:40:44mat4complete tilemap based, software-generated display
20:41:48ldleworkwhat's the point?
20:42:12ldleworkI guess all you need a is a monitor to play it
20:42:53mat4there have written an emulator for it (SDL) which should be wrapped without problems I think
20:49:27mat4sorry, can be wrapped
20:50:34ephjaldlework: have you played Tales Of Maj'Eyal?
20:50:43ldleworkephja: yeah
20:52:03ldleworkephja: is that your favorite roguelike
20:56:31ldleworkHmm do we have a reduce() anywhere?
20:56:36ldleworkIts not in sequtils.
20:58:05ephjaldlework: it has a lot of content and a good API, but I haven't really played any other variants
20:58:23ldleworkephja: I'm modeling my game after a game called Cataclysm DDA
20:58:24def-ldlework: foldr, foldl?
20:59:09ephjaok
21:00:04*derka quit (Quit: derka)
21:04:16*mat4 quit (Quit: Verlassend)
21:06:15Guest48990dom96, I have nim installed into /usr/lib/nim and /usr/bin/nim, but 'nim c -r scr/nimble install' does not work in such setup
21:07:08*Guest48990 is now known as avsej
21:07:08*avsej quit (Changing host)
21:07:09*avsej joined #nim
21:07:25def-Guest48990: yep, that's a problem. for now it's recommended not to install nim like that and add Nim's bin directory to PATH instead
21:07:41avsejhttps://gist.github.com/avsej/0505077d00fea0084b12
21:07:52dom96avsej: https://github.com/nim-lang/nimble/issues/203
21:08:00dom96Known issue unfortunately.
21:08:57avsejthanks for pointer
21:10:13avsejin the global nim.cfg, there is a mention of $lib, I guess it is something like my main libpath, right? how I can properly set it in the config?
21:12:02avsej> Do not use install.sh or ./koch install
21:12:11avsejwhy does it have such options at all?
21:13:46Araqbecause too many people think it's useful
21:14:02avsejokay
21:14:10*toaoMgeorge joined #nim
21:14:25avsejhow I can set lib path in /etc/nim.cfg?
21:14:48avsejin the very beginning it references $lib, what is the value of it?
21:15:13Araqthe path where lib/ is
21:15:35Araq--lib:/usr/lib I think. never use it.
21:17:13avsejnim itself correctly finds all the libs, but nimble cannot
21:17:41Araqwell I told dom96 how to do it but he knew better
21:18:39Araqas a result it doesn't work, but *shrug* there is only so much I can do.
21:19:09avsejhttps://github.com/nim-lang/nimble/issues/203#issuecomment-178240415
21:19:27avsejnim can figure it out, but nimble cannot :(
21:20:27Araqdoes it work when you install nimble via nim's install_nimble.nims script?
21:20:42Araqcause it should :-)
21:21:18*derka joined #nim
21:21:19*derka quit (Client Quit)
21:21:32avsejyes, it does
21:21:39avsejand this is good enough for me
21:21:41avsejthank you
21:21:48Araqyay :-)
21:28:59*brson joined #nim
21:34:26*derka joined #nim
21:41:06*apotheon_ joined #nim
21:41:22*Amrykid2 joined #nim
21:41:54*jackv joined #nim
21:44:28*zama_ joined #nim
21:44:35*gour quit (Quit: WeeChat 1.4)
21:44:35*Heartmender joined #nim
21:44:57*Heartmender is now known as Guest41777
21:45:20*francisl quit (Quit: francisl)
21:46:46*RushPL joined #nim
21:48:30*toaoMgeorge quit (*.net *.split)
21:48:30*M-Quora quit (*.net *.split)
21:48:30*niv quit (*.net *.split)
21:48:30*apotheon quit (*.net *.split)
21:48:30*SirCmpwn quit (*.net *.split)
21:48:31*mnemonikk quit (*.net *.split)
21:48:32*zama quit (*.net *.split)
21:48:32*CARAM__ quit (*.net *.split)
21:48:32*clone1018 quit (*.net *.split)
21:48:32*jackkv quit (*.net *.split)
21:48:32*zielmicha quit (*.net *.split)
21:48:33*Amrykid quit (*.net *.split)
21:48:33*AckZ quit (*.net *.split)
21:48:33*Rush_ quit (*.net *.split)
21:48:33*dyce quit (*.net *.split)
21:48:33*rinukkusu_ quit (*.net *.split)
21:48:34*Guest78691 quit (*.net *.split)
21:48:52*mnemonikk joined #nim
21:48:52*mnemonikk quit (Changing host)
21:48:52*mnemonikk joined #nim
21:48:52*SirCmpwn joined #nim
21:49:12*rinukkusu joined #nim
21:49:22*niv joined #nim
21:49:59*M-Quora joined #nim
21:52:58*zama_ quit (Ping timeout: 250 seconds)
21:54:04*zama joined #nim
21:55:48*dyce joined #nim
21:55:58*AckZ joined #nim
21:57:18*CARAM__ joined #nim
21:57:29*zielmicha joined #nim
21:57:52*lompik joined #nim
21:58:41*francisl joined #nim
21:58:58*clone1018 joined #nim
22:06:54*toaoMgeorge joined #nim
22:16:34*NoOova quit (Ping timeout: 240 seconds)
22:18:26*derka quit (Ping timeout: 256 seconds)
22:19:06*derka joined #nim
22:22:45*brson quit (Ping timeout: 260 seconds)
22:22:56*apotheon_ quit (Ping timeout: 240 seconds)
22:22:57*RushPL quit (Ping timeout: 240 seconds)
22:23:33ldleworkI have this module, https://gist.github.com/dustinlacewell/036f6e716bd0156cb111 and when I create a WeightedGenerator and call makeChunk on it, it eventually calls makeTile and the base class' method is called?
22:24:26*RushPL joined #nim
22:24:30ldleworkI mean it looks right?
22:24:59*apotheon joined #nim
22:25:04*derka quit (Quit: derka)
22:27:18*Demon_Fox joined #nim
22:31:46ldleworknot seeing it
22:32:00ldleworkdom96: do you see anything?
22:36:51ldleworkfoldr is not very useful for tuples
22:37:01ldleworkif you pass in a tuple, you can't like sum up all the int fields on those tuples
22:37:13ldleworkbecause then you get an int back and foldr makes the return value the same as the input
22:39:08*toaoMgeorge quit (Read error: Connection reset by peer)
22:42:20ldleworkyikes its really hard to functionally compose things ontop of tuples
22:43:27Araqfields iterator works on tuples
22:45:18*Dildosan joined #nim
22:46:30*brson joined #nim
22:47:08ldleworkso?
22:51:15*vendethiel quit (Ping timeout: 240 seconds)
22:53:17filwithmm.. the `<` operator apparently accepts `uint`|`cuint` types but doesn't warn or error if they're 0 (and just rolls over to uint.high).. is that a known part of their design, or an oversight?
22:53:24*pregressive quit (Remote host closed the connection)
22:55:23*arnetheduck quit (Ping timeout: 276 seconds)
22:56:11Araqunsigned rolls over, what's wrong with it?
22:56:39filwitIMO it would be better to not even accept unsigned types and thereby force the programmer to convert to something that wont cause hard-to-find nil-deref exceptions.. like if you do ``for i in 0 .. <num`` where `num` is a `cuint` from some wrapper, then you try to an array using `i` the program will crash in an uncommon-to-regular-nim-code way
22:56:51*vendethiel joined #nim
22:56:54Araqit should be widely known by now that unsigned arithmetic is bullshit
22:56:56filwitaccept them in the `<` operator I mean
22:57:30filwitsure, whatever.. the point is we could technically prevent these kinds of odd errors very easily
22:57:37*yglukhov joined #nim
22:58:11Araqpeople were not interested in any improvements wrt unsigned
22:59:24filwitwell I think people often wrap C libs using `cint` where the actual .h file would use `unsigned int`
22:59:45filwitwhich is why people don't commonly report this kind of thing, and then complain about it
23:01:15filwitbut technically that's bug prone on both fronts... if the C code actually needs the full unsigned range, for instance, and in cases like I just illustrated
23:02:35Araqthe C code never needs the full range because 2^32-1 is a totally arbitrary value
23:04:21*yglukhov quit (Remote host closed the connection)
23:04:42Araqbut there is a different problem in how we decompose ..< to .. <
23:04:50Araqwhich is I think what you mean
23:05:00*derka joined #nim
23:05:29Araqbut for x in 0..<L should iterate 0 times for L==0, not raise an exception
23:05:39Araqnor iterate 4 billion times
23:05:55Araqthough I guess raising an exception would be better than nothing
23:05:59filwityes I agree, it should compile-time error if L is an unsigned type...
23:06:26Araqand since C doesn't even have an unary < I guess you're right
23:06:38Araqand nobody would complain
23:06:44filwitexactly
23:06:45Araqexcept that it breaks code
23:07:00filwitwhu.. how?
23:07:07filwitwho's relying on this?
23:07:27Araqpeople who use it happily knowing the value will never be 0
23:07:45Araqif we make it a compiler error instead
23:07:47filwitsure, but then they can always use `L-1` explictly
23:08:06*brson quit (Ping timeout: 240 seconds)
23:08:19Araqin fact, ..< should be specialized to not perform the -1
23:08:28Araqand then ..< can be allowed for unsigned
23:08:33Araqand < disallowed
23:08:37filwitof course, I see your point that there's not a big difference between `<L` and `L-1`
23:09:02*francisl quit (Ping timeout: 276 seconds)
23:09:21Araqyeah, you convinced me
23:09:26Araqnow make it happen
23:10:07*yglukhov joined #nim
23:10:45filwitlol.. dude I don't even use devel anymore cause it was too much of a PITA to setup Nim/Nimble/Aporia/GCC/etc on Windows... so now I just use the official 0.13 release build
23:10:56*yglukhov quit (Remote host closed the connection)
23:12:24ldleworkCan anyone think of another way to do this? https://gist.github.com/dustinlacewell/4d076f6f433832325a49
23:12:48ldleworkI basically want to generate a factory with a weight.
23:13:06filwitAraq: but I'll make note of this and get around to it later
23:13:45filwitjust, don't quote me on that... remember I'm the only back in the day saying I would never use the `<` operator in the first place, and look at my code now...
23:13:59filwitthe one*
23:16:05ldleworkI get illegal capture :(
23:16:47ldleworkeven this doesn't work: https://gist.github.com/dustinlacewell/40dc0a3df3acff085ae2
23:16:54ldleworkagain illegal capture of 'em'
23:17:51*derka quit (Quit: derka)
23:18:39filwitldlework: i have no idea, I don't really use closures myself.. but have you tried not use the `() => ...` syntax and use `proc() =` instead? or explicitly use {.closure.}
23:18:42*vendethiel quit (Ping timeout: 252 seconds)
23:18:55ldleworkyeah proc() = doesn't work either
23:20:44Araqldlework: does newEntityManager return a 'var T'?
23:21:44ldleworkI think it just returns T
23:26:05*derka joined #nim
23:26:53*derka quit (Client Quit)
23:30:25*vendethiel joined #nim
23:30:48*Trustable quit (Remote host closed the connection)
23:35:39ThePythonicCowAraq wrote "the C code never needs the full range because 2^32-1 is a totally arbitrary value" ... well, I wouldn't say totally arbitrary. Anytime that I have some value that might range between 0 and N, where N is between 2^31 and 2^32-1, such as IPv4 addresses, and where I am packing the data tightly, not wanting to use 8 bytes where 4 will do, then an unsigned 32 bit int seems appropriate. Me
23:35:41ThePythonicCowmory sizes on 32 bit CPU architectures are similar in range.
23:37:04Araqldlework: report it properly please
23:37:17ldleworkAraq: sorry, its a bug?
23:37:20ThePythonicCowHowever, I don't have strong feelings on all this ... been dealing with C's signed vs unsigned successfully for a long time, and am quite content to deal with variations
23:37:34Araqldlework: if nothing else it will make me improve the error message
23:41:01AraqThePythonicCow: IMO it's the one thing that Java got that right, fuck unsigned "numbers". Floating point numbers always have a sign, sue them.
23:41:34ThePythonicCow:)
23:41:54*yglukhov joined #nim
23:42:16*brson joined #nim
23:43:01Araqthough personally I would also map MININT to NaN, MININT is crippled anyway, cannot take the abs() of it
23:43:14filwityeah but you don't use uints commonly.. only for the rare places like PythonicCow said.. That's why you should have access to them, unlike Java where you just can't..
23:44:41ThePythonicCowOnce gcc generated a warning for the case "unsigned int i; if (i < 0) ...", the most common case of unsigned bugs in C code on Linux became relatively rare.
23:44:54Araq95% of the C code out there use unsigned because programmers confuse them with natural numbers
23:45:06ThePythonicCowtrue Araq
23:46:43ThePythonicCowA few antideluvian coders, who have worked on 12 bit, 16 bit, 32 bit and now the current humongous 64 bit architectures are always aware of what that last bit out there is doing ... but most aren't, and hurt themselves easily
23:46:47filwityeah but there are better solutions to that problem than how Java does it, is all I'm saying
23:47:50filwityou just discourage the use of uint throughout the std libs, and make them not implicitly convertible
23:47:56filwit(to ints)
23:48:27Araqfilwit: I disagree, the very existance of uint32 means people (and c2nim) feel obliged to use them when wrapping C code
23:48:39Araqso that it is "Correct"
23:48:46filwitbut that is correct
23:48:58filwitthere can be bugs in places otherwise..
23:49:21filwitand you wont know cause your c2nim just assumes no one in C ever *actually* uses the full range
23:50:37filwitand C isn't Nim.. so I don't see how that argument applies to what I said about discouraging their use in the [Nim] std libs (like you already do)
23:51:41Araqthey creep into everything, most projects cannot avoid to use some half assed wrapper
23:51:43*toaoMgeorge joined #nim
23:52:08*vendethiel quit (Ping timeout: 250 seconds)
23:52:15Araqthe only true way to prevent them from creeping in is to not have them in the first place
23:52:33Araqbut *shrug* that ship has sailed
23:52:58filwitokay sure, I hear you.. it's unrealistic to assume that C libs aren't used in Nim code where C FFI is very easy, but I still think Java gets this wrong
23:53:45filwitbut then, I don't know much about Java... so it's possible there's some hidden Unsigned lib I'm unaware of which basically makes it possible
23:54:13Araqwell the original Nim had +% to perform unsigned plus
23:54:28filwityeah i hated that, lol
23:54:37filwitbut probably for the wrong reasons
23:54:52Araqso you could write your cryptographic hash routines
23:55:35Araqbut since even I couldn't implement MD5 with that ... I guess it's safe to admit that it really didn't work either
23:55:55Araq:-)
23:56:46Araqanother idea would be to disallow '-' for unsigned numbers
23:57:10Araqthat seems to catch most bugs with unsigned
23:57:27filwitno, just move unsigned `-` to the `unsafe` module along with `create`, `alloc`, etc :P
23:58:28filwitor rather, I agree... i just don't think it needs to be completely removed, just harder to reach
23:58:41*yglukhov quit (Remote host closed the connection)
23:59:00*jaco60 quit (Ping timeout: 260 seconds)