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:54 | ldlework | If 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:13 | ldlework | If Foo is already a ref type, does making Bar a "ref object of Foo" make a ref to a ref? |
00:29:34 | Araq | no. |
00:29:54 | Araq | the 'ref' is skipped for convenience |
00:30:09 | Araq | object of (ref T) is the same as object of T |
00:30:29 | ldlework | but what if I wanted it |
00:30:46 | Araq | what would that mean? |
00:30:58 | Araq | can you inherit from Foo* in C++? nah. |
00:31:12 | ldlework | a gc managed pointer to a gc managed pointer to a structure value I guess |
00:31:31 | Araq | that's ref ref T, but I'm talking about 'object of ...' |
00:31:35 | ldlework | right |
00:31:38 | ldlework | okay |
00:31:56 | Araq | it's even the same in java |
00:32:11 | Araq | and Java only knows 'ref object' |
00:32:20 | filwit | i define all my types as `ptr ref ref ptr T` just to be edgy |
00:32:33 | ldlework | heh |
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:08 | ics | Can I assert that a type/value is invalid? |
01:06:38 | * | derka quit (Quit: derka) |
01:07:06 | ics | e.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:44 | filwit | ics: 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:58 | ics | filwit: In use, but I have an itch to write `assert ObjVertexRef(-1) == InvalidTypeExceptionOrWhatever` |
01:16:26 | ics | It's redundant and possibly stupid from many points of view, but I'm curious either way |
01:17:37 | filwit | yeah 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:51 | ics | When 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:37 | ics | But I guess it does the job either way, if I write the assertion which blows up I know to fix the type... |
01:21:03 | ics | Nevermind, 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:35 | endragor | Are 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:59 | gokr | Araq: 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:06 | def- | dom96: the latter: https://gist.github.com/def-/cb01b21094e34ece4c30 |
13:59:50 | dom96 | then 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:20 | dom96 | This time you can put me down as a mentor as well |
14:01:28 | def- | 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:34 | Arrrr | Nim 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:39 | Araq | Arrrr: 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:35 | Araq | yglukhov: 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:57 | yglukhov | bitsets = 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:50 | Araq | yes |
16:25:10 | * | BitPuffin joined #nim |
16:25:47 | filwit | hmm... type-class specialization and converters don't seem to play nicely... |
16:27:43 | filwit | of 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:42 | filwit | well.. 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:00 | filwit | anyways, guess I'll just duplicate the procedures with overloads.. |
16:29:34 | * | brson joined #nim |
16:42:48 | sepisoad | i 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:22 | filwit | yeah i saw that on reddit the other day |
16:43:27 | filwit | i like the error handling |
16:43:48 | sepisoad | filwit, exactly the error handling is awesome |
16:44:54 | sepisoad | also the 'C' interoperability seems to be very simple |
16:45:41 | * | derka joined #nim |
16:47:00 | filwit | yeah 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:18 | filwit | except* |
16:48:02 | * | endragor quit (Remote host closed the connection) |
16:48:35 | sepisoad | filwit, nim is still my favorite language ;) |
16:49:04 | filwit | well that's cool :P mine too |
16:51:20 | filwit | zig'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:49 | filwit | (of course, that's not really "safe") |
16:52:36 | filwit | anyways, compared to Rust I MUCH prefer how he works with non-null ptrs and error handling |
16:53:09 | filwit | where Rust is very verbose and cluttered syntactically (unwrap fucking *everywhere*), his `??` operators fit in cleanly |
16:53:42 | sepisoad | yup |
16:56:21 | * | skyfex quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:56:58 | * | Dildosan quit (Quit: Leaving) |
16:57:28 | filwit | i 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:09 | sepisoad | filwit, maybe you can suggest this to the author |
16:59:35 | filwit | yeah 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:26 | Araq | "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:36 | Araq | yeah, right because likely(...) doesn't exist ... |
17:32:44 | Araq | "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:10 | Araq | here we go again ... so it's nowhere near as efficient as C++'s exception handling |
17:33:46 | Araq | The C preprocessor is extremely powerful. Maybe a little too powerful.“ |
17:33:51 | Araq | no, omg |
17:34:19 | Araq | it's not even Turing complete... |
17:35:08 | filwit | yeah maybe.. |
17:35:16 | filwit | crap.. alt-tab... |
17:37:07 | Arrrr | def- 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:56 | filwit | this 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:31 | filwit | but that wont work if I use it like: ``let x: Vector2 = (a.float, b.float32)`` |
17:54:05 | filwit | however 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:10 | filwit | this 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:21 | ldlework | I have found places where converters don't work |
18:06:39 | ldlework | usually around places where square brackets are being used |
18:07:00 | * | sepisoad quit (Ping timeout: 248 seconds) |
18:08:52 | filwit | yeah, I mean it's not a huge deal to use use (a.float, b) # when 'a' is not already a float |
18:09:07 | filwit | but it's annoying that I have to explicitly do that throughout the code.. |
18:09:12 | filwit | oh well.. |
18:09:43 | ldlework | filwit: I struggle with cints :) |
18:10:43 | filwit | ldlework: 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:30 | ldlework | filwit: did you see my latest screenshot? |
18:17:40 | filwit | no, link me |
18:18:10 | * | NoOova quit (Ping timeout: 240 seconds) |
18:18:12 | ldlework | http://i.imgur.com/7cpy5Cs.png |
18:18:29 | filwit | hey, very cool :D |
18:18:45 | filwit | looking good man |
18:18:54 | filwit | there's no player right now? |
18:19:06 | * | vendethiel joined #nim |
18:19:12 | ldlework | Nah this is just a visualization of the biome data. Like, this is the high-level "regional" biome layout. |
18:19:28 | ldlework | and with just some fake biomes made up in the data |
18:20:02 | filwit | i see, neat |
18:20:16 | * | aziz quit (Remote host closed the connection) |
18:20:35 | filwit | can you scroll around and stuff? |
18:20:39 | * | Matthias247 joined #nim |
18:20:42 | ldlework | yeah |
18:20:53 | ldlework | it generates chunks of the world on the fly as you scroll around |
18:20:55 | filwit | smooth scroll? |
18:20:56 | ldlework | so its 'infinite' |
18:21:02 | * | francisl joined #nim |
18:21:05 | ldlework | No, it scrolls by tile. |
18:21:13 | ldlework | but it looks pretty smooth I guess |
18:21:28 | ldlework | But I'm guessing you meant "by pixel" |
18:21:30 | * | NoOova joined #nim |
18:21:36 | filwit | oh i see, a procedural land like minecraft, i see |
18:38:59 | ephja | but please don't make it a 2d minecraft :p |
18:39:34 | ephja | have you thought about mechanics yet? is the engine going to be reusable? |
18:40:04 | ephja | simple, but nice looking |
18:40:20 | ldlework | ephja: it is a 2D wilderness survival game |
18:40:37 | * | Matthias247 quit (Read error: Connection reset by peer) |
18:41:58 | ephja | ok |
18:43:50 | ldlework | ephja: 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:03 | Arrrr | Have 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:42 | ldlework | Arrrr: 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:19 | mat4 | hi all |
19:55:27 | * | toaoMgeorge joined #nim |
19:58:13 | Araq | servus mat4 |
19:58:19 | mat4 | hi Araq |
19:59:50 | * | toaoMgeorge quit (Ping timeout: 260 seconds) |
20:00:15 | * | nsf joined #nim |
20:09:43 | mat4 | As 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:07 | ldlework | whaaa |
20:14:10 | ldlework | what does it do |
20:17:42 | mat4 | Driving monitors up to Full HD with text modes from 32x16 characters up to 120x67 characters |
20:17:53 | mat4 | The 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:18 | mat4 | I will use it for a somewhat more advanced terminal interface |
20:22:21 | ldlework | mat4: is there a repo with a demo? |
20:22:35 | * | francisl joined #nim |
20:22:54 | mat4 | you mean for the emulation ? |
20:23:11 | ldlework | yeah |
20:24:03 | mat4 | here's a screenshoot: https://github.com/Mat2/Amon/blob/master/cdp1.png |
20:24:09 | mat4 | it's an old version however |
20:25:35 | mat4 | I upload the new sources beside working next days |
20:25:46 | mat4 | ^beside work |
20:25:49 | ldlework | mat4: An emulated character raster library for SDL2 would be cool. |
20:26:00 | ldlework | I'm not interested in all in its real purpose though. |
20:26:44 | mat4 | well, you find the old source file here: https://github.com/Mat2/Amon/blob/master/cdp2.nim |
20:26:54 | mat4 | ^you can |
20:28:29 | mat4 | as written I plan to replace the whole repro with new source versions in the next days |
20:31:23 | ldlework | okay, I don't need anything I'm just passively interested. |
20:31:33 | ldlework | mat4: I have a tilemap implementation but I can use arbitrary tilesets |
20:32:11 | ldlework | An api that emulated a character raster but could be used for real terminal rastering or emulation by SDL would be super neat |
20:33:26 | mat4 | hmm, tilemaps.. Are you planning writing an emulator for some classic video console ? |
20:34:18 | mat4 | ldlework: That's my plan |
20:34:53 | ldlework | mat4: yeah I'm making a roguelike game, http://i.imgur.com/7cpy5Cs.png |
20:36:26 | mat4 | nice looking map! |
20:36:34 | ldlework | thx |
20:36:58 | * | brson quit (Ping timeout: 240 seconds) |
20:38:02 | mat4 | do 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:44 | mat4 | complete tilemap based, software-generated display |
20:41:48 | ldlework | what's the point? |
20:42:12 | ldlework | I guess all you need a is a monitor to play it |
20:42:53 | mat4 | there have written an emulator for it (SDL) which should be wrapped without problems I think |
20:49:27 | mat4 | sorry, can be wrapped |
20:50:34 | ephja | ldlework: have you played Tales Of Maj'Eyal? |
20:50:43 | ldlework | ephja: yeah |
20:52:03 | ldlework | ephja: is that your favorite roguelike |
20:56:31 | ldlework | Hmm do we have a reduce() anywhere? |
20:56:36 | ldlework | Its not in sequtils. |
20:58:05 | ephja | ldlework: it has a lot of content and a good API, but I haven't really played any other variants |
20:58:23 | ldlework | ephja: I'm modeling my game after a game called Cataclysm DDA |
20:58:24 | def- | ldlework: foldr, foldl? |
20:59:09 | ephja | ok |
21:00:04 | * | derka quit (Quit: derka) |
21:04:16 | * | mat4 quit (Quit: Verlassend) |
21:06:15 | Guest48990 | dom96, 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:25 | def- | 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:41 | avsej | https://gist.github.com/avsej/0505077d00fea0084b12 |
21:07:52 | dom96 | avsej: https://github.com/nim-lang/nimble/issues/203 |
21:08:00 | dom96 | Known issue unfortunately. |
21:08:57 | avsej | thanks for pointer |
21:10:13 | avsej | in 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:02 | avsej | > Do not use install.sh or ./koch install |
21:12:11 | avsej | why does it have such options at all? |
21:13:46 | Araq | because too many people think it's useful |
21:14:02 | avsej | okay |
21:14:10 | * | toaoMgeorge joined #nim |
21:14:25 | avsej | how I can set lib path in /etc/nim.cfg? |
21:14:48 | avsej | in the very beginning it references $lib, what is the value of it? |
21:15:13 | Araq | the path where lib/ is |
21:15:35 | Araq | --lib:/usr/lib I think. never use it. |
21:17:13 | avsej | nim itself correctly finds all the libs, but nimble cannot |
21:17:41 | Araq | well I told dom96 how to do it but he knew better |
21:18:39 | Araq | as a result it doesn't work, but *shrug* there is only so much I can do. |
21:19:09 | avsej | https://github.com/nim-lang/nimble/issues/203#issuecomment-178240415 |
21:19:27 | avsej | nim can figure it out, but nimble cannot :( |
21:20:27 | Araq | does it work when you install nimble via nim's install_nimble.nims script? |
21:20:42 | Araq | cause it should :-) |
21:21:18 | * | derka joined #nim |
21:21:19 | * | derka quit (Client Quit) |
21:21:32 | avsej | yes, it does |
21:21:39 | avsej | and this is good enough for me |
21:21:41 | avsej | thank you |
21:21:48 | Araq | yay :-) |
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:33 | ldlework | I 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:30 | ldlework | I 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:46 | ldlework | not seeing it |
22:32:00 | ldlework | dom96: do you see anything? |
22:36:51 | ldlework | foldr is not very useful for tuples |
22:37:01 | ldlework | if you pass in a tuple, you can't like sum up all the int fields on those tuples |
22:37:13 | ldlework | because 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:20 | ldlework | yikes its really hard to functionally compose things ontop of tuples |
22:43:27 | Araq | fields iterator works on tuples |
22:45:18 | * | Dildosan joined #nim |
22:46:30 | * | brson joined #nim |
22:47:08 | ldlework | so? |
22:51:15 | * | vendethiel quit (Ping timeout: 240 seconds) |
22:53:17 | filwit | hmm.. 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:11 | Araq | unsigned rolls over, what's wrong with it? |
22:56:39 | filwit | IMO 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:54 | Araq | it should be widely known by now that unsigned arithmetic is bullshit |
22:56:56 | filwit | accept them in the `<` operator I mean |
22:57:30 | filwit | sure, whatever.. the point is we could technically prevent these kinds of odd errors very easily |
22:57:37 | * | yglukhov joined #nim |
22:58:11 | Araq | people were not interested in any improvements wrt unsigned |
22:59:24 | filwit | well I think people often wrap C libs using `cint` where the actual .h file would use `unsigned int` |
22:59:45 | filwit | which is why people don't commonly report this kind of thing, and then complain about it |
23:01:15 | filwit | but 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:35 | Araq | the 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:42 | Araq | but there is a different problem in how we decompose ..< to .. < |
23:04:50 | Araq | which is I think what you mean |
23:05:00 | * | derka joined #nim |
23:05:29 | Araq | but for x in 0..<L should iterate 0 times for L==0, not raise an exception |
23:05:39 | Araq | nor iterate 4 billion times |
23:05:55 | Araq | though I guess raising an exception would be better than nothing |
23:05:59 | filwit | yes I agree, it should compile-time error if L is an unsigned type... |
23:06:26 | Araq | and since C doesn't even have an unary < I guess you're right |
23:06:38 | Araq | and nobody would complain |
23:06:44 | filwit | exactly |
23:06:45 | Araq | except that it breaks code |
23:07:00 | filwit | whu.. how? |
23:07:07 | filwit | who's relying on this? |
23:07:27 | Araq | people who use it happily knowing the value will never be 0 |
23:07:45 | Araq | if we make it a compiler error instead |
23:07:47 | filwit | sure, but then they can always use `L-1` explictly |
23:08:06 | * | brson quit (Ping timeout: 240 seconds) |
23:08:19 | Araq | in fact, ..< should be specialized to not perform the -1 |
23:08:28 | Araq | and then ..< can be allowed for unsigned |
23:08:33 | Araq | and < disallowed |
23:08:37 | filwit | of 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:21 | Araq | yeah, you convinced me |
23:09:26 | Araq | now make it happen |
23:10:07 | * | yglukhov joined #nim |
23:10:45 | filwit | lol.. 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:24 | ldlework | Can anyone think of another way to do this? https://gist.github.com/dustinlacewell/4d076f6f433832325a49 |
23:12:48 | ldlework | I basically want to generate a factory with a weight. |
23:13:06 | filwit | Araq: but I'll make note of this and get around to it later |
23:13:45 | filwit | just, 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:59 | filwit | the one* |
23:16:05 | ldlework | I get illegal capture :( |
23:16:47 | ldlework | even this doesn't work: https://gist.github.com/dustinlacewell/40dc0a3df3acff085ae2 |
23:16:54 | ldlework | again illegal capture of 'em' |
23:17:51 | * | derka quit (Quit: derka) |
23:18:39 | filwit | ldlework: 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:55 | ldlework | yeah proc() = doesn't work either |
23:20:44 | Araq | ldlework: does newEntityManager return a 'var T'? |
23:21:44 | ldlework | I 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:39 | ThePythonicCow | Araq 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:41 | ThePythonicCow | mory sizes on 32 bit CPU architectures are similar in range. |
23:37:04 | Araq | ldlework: report it properly please |
23:37:17 | ldlework | Araq: sorry, its a bug? |
23:37:20 | ThePythonicCow | However, 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:34 | Araq | ldlework: if nothing else it will make me improve the error message |
23:41:01 | Araq | ThePythonicCow: 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:34 | ThePythonicCow | :) |
23:41:54 | * | yglukhov joined #nim |
23:42:16 | * | brson joined #nim |
23:43:01 | Araq | though personally I would also map MININT to NaN, MININT is crippled anyway, cannot take the abs() of it |
23:43:14 | filwit | yeah 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:41 | ThePythonicCow | Once 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:54 | Araq | 95% of the C code out there use unsigned because programmers confuse them with natural numbers |
23:45:06 | ThePythonicCow | true Araq |
23:46:43 | ThePythonicCow | A 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:47 | filwit | yeah but there are better solutions to that problem than how Java does it, is all I'm saying |
23:47:50 | filwit | you just discourage the use of uint throughout the std libs, and make them not implicitly convertible |
23:47:56 | filwit | (to ints) |
23:48:27 | Araq | filwit: I disagree, the very existance of uint32 means people (and c2nim) feel obliged to use them when wrapping C code |
23:48:39 | Araq | so that it is "Correct" |
23:48:46 | filwit | but that is correct |
23:48:58 | filwit | there can be bugs in places otherwise.. |
23:49:21 | filwit | and you wont know cause your c2nim just assumes no one in C ever *actually* uses the full range |
23:50:37 | filwit | and 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:41 | Araq | they 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:15 | Araq | the only true way to prevent them from creeping in is to not have them in the first place |
23:52:33 | Araq | but *shrug* that ship has sailed |
23:52:58 | filwit | okay 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:45 | filwit | but 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:13 | Araq | well the original Nim had +% to perform unsigned plus |
23:54:28 | filwit | yeah i hated that, lol |
23:54:37 | filwit | but probably for the wrong reasons |
23:54:52 | Araq | so you could write your cryptographic hash routines |
23:55:35 | Araq | but 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:55 | Araq | :-) |
23:56:46 | Araq | another idea would be to disallow '-' for unsigned numbers |
23:57:10 | Araq | that seems to catch most bugs with unsigned |
23:57:27 | filwit | no, just move unsigned `-` to the `unsafe` module along with `create`, `alloc`, etc :P |
23:58:28 | filwit | or 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) |