00:03:37 | dom96 | dyce[m]: gcsafety applies only when you use multiple threads |
00:03:42 | dom96 | 'night |
00:04:02 | dyce[m] | i see thanks Araq and dom96 |
00:06:40 | * | ftsf_ joined #nim |
00:06:43 | * | couven92 quit (Quit: Bye) |
00:07:54 | * | couven92 joined #nim |
00:15:01 | * | Jesin quit (Quit: Leaving) |
00:15:10 | * | devted joined #nim |
00:47:52 | * | arnetheduck joined #nim |
00:49:44 | * | pregressive joined #nim |
01:04:04 | zachcarter | anyone else using nimx? |
01:13:39 | * | couven92 quit (Quit: Client disconnecting) |
01:26:32 | * | yglukhov joined #nim |
01:30:42 | * | yglukhov quit (Ping timeout: 248 seconds) |
02:00:49 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:01:12 | * | chemist69 joined #nim |
02:52:47 | * | brson quit (Quit: leaving) |
03:01:31 | * | chemist69 quit (Ping timeout: 255 seconds) |
03:13:57 | * | chemist69 joined #nim |
03:31:16 | * | krux02 quit (Quit: Leaving) |
03:37:24 | * | Jesin joined #nim |
04:01:16 | * | brail joined #nim |
04:01:44 | * | pregressive quit (Remote host closed the connection) |
04:02:23 | * | pregressive joined #nim |
04:03:28 | * | unlaudable joined #nim |
04:04:39 | * | pregressive quit (Read error: No route to host) |
04:05:06 | * | pregressive joined #nim |
04:07:02 | * | pregressive quit (Read error: Connection reset by peer) |
04:07:15 | * | pregressive joined #nim |
04:10:49 | * | unlaudable quit (Ping timeout: 260 seconds) |
04:16:02 | * | pregressive quit (Ping timeout: 248 seconds) |
04:20:00 | * | brail quit (Quit: Changing server) |
04:31:02 | * | kulelu88 quit (Quit: Leaving) |
04:31:27 | * | arnetheduck quit (Ping timeout: 276 seconds) |
04:36:39 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:42:18 | FromGitter | <Varriount> zachcarter: Do you need a C array? |
04:42:52 | FromGitter | <Varriount> You can always take the pointer of the first element of the sequence |
04:43:01 | zachcarter | that’s exactly what I did :) |
04:43:19 | zachcarter | didn’t realize that’s what I was doing |
04:43:30 | zachcarter | but it makes sense now, thank you for the explanation |
04:44:16 | FromGitter | <Varriount> Of course, too many people make the mistake of just taking the pointer to the sequence object, with predictably bad results |
05:03:12 | zachcarter | I really want to use nimx / rod but I think I need to wait for development to progress further before using them in a project |
05:03:54 | zachcarter | for now I’m going to focus on writing a libgdx comparable library in nim using sdl2 / opengl |
05:04:34 | ftsf_ | zachcarter, whatcha making? |
05:04:51 | zachcarter | a roguelike |
05:05:00 | ftsf_ | cool, nice to have another nim gamedev =) |
05:05:08 | zachcarter | :) how about you? |
05:05:34 | * | devted quit (Quit: Sleeping.) |
05:05:36 | ftsf_ | making a racing game, https://twitter.com/impbox/status/765102630280409088 |
05:05:49 | ftsf_ | made a pico8 style api for nim on top of sdl2 |
05:06:01 | zachcarter | ah sweet |
05:06:10 | zachcarter | are you using opengl or the sdl2 rendering api? |
05:06:16 | zachcarter | not that that doesn’t use opengl |
05:06:27 | ftsf_ | sdl2 rendering api |
05:06:37 | ftsf_ | but doesn't make a lot of difference for my use case |
05:06:44 | zachcarter | right |
05:06:51 | ftsf_ | since i do everything in software then just use sdl to put it on the screen |
05:07:32 | zachcarter | yeah, I was using libgdx and quite a few shaders in my project previously so I’m going to have to roll some kind of framework up |
05:07:52 | zachcarter | I’ve gotten sprite rendering working with nim + opengl + sdl2 |
05:07:58 | zachcarter | so I just need to write a sprite batcher now |
05:08:13 | ftsf_ | cool |
05:08:16 | ftsf_ | havem |
05:08:24 | ftsf_ | haven't tried libgdx but heard good things |
05:08:40 | zachcarter | it’s a nice library, but the JVM ugh |
05:09:00 | ftsf_ | write once, wrong everywhere ;) |
05:09:20 | zachcarter | so true |
05:09:54 | ftsf_ | trying to get my nim game running on the 3DS at the moment |
05:10:15 | zachcarter | ah cool :D |
05:11:19 | ftsf_ | so need to add a layer between my api and SDL/3DS's API |
05:14:31 | ftsf_ | 2d tile based roguelike? |
05:25:00 | * | inf0t3ch joined #nim |
05:25:13 | * | inf0t3ch left #nim ("AndroIRC") |
05:25:13 | zachcarter | I don’t think it’s going to be tilebased |
05:25:21 | zachcarter | well it will be cell based |
05:25:29 | zachcarter | but non-graphical |
05:25:34 | zachcarter | so just text and colors most likely |
05:25:38 | ftsf_ | oh ok |
05:25:44 | zachcarter | unless I find an artist |
05:26:19 | ftsf_ | ahh you mean using glyphs as graphics? |
05:26:28 | zachcarter | yeah exactly |
05:26:31 | ftsf_ | cool cool |
05:26:32 | zachcarter | here’s a world map generator I wrote - http://imgur.com/a/Le6ip |
05:26:37 | zachcarter | a gif of the results anyway |
05:26:59 | ftsf_ | very nice |
05:27:02 | zachcarter | thanks |
05:27:40 | ftsf_ | i was making a semi roguelike survival game for pico8, quite fun. might port it to nim once i finish my current game |
05:28:25 | ftsf_ | http://static.impbox.net/tempest/washedup2.gif |
05:28:26 | zachcarter | https://giphy.com/gifs/3oz8xBhVpOvJPuB37G?utm_source=iframe&utm_medium=embed&utm_campaign=tag_click |
05:28:58 | zachcarter | ah neat |
05:31:06 | zachcarter | I have quite a bit prototyped - procedurally generated spaceships with lock and key puzzles in them |
05:31:13 | zachcarter | all of this is in Java of course though |
05:33:48 | ftsf_ | *nods* |
05:34:02 | ftsf_ | should be pretty quick to move over to nim, it's very nice to work in |
05:34:30 | zachcarter | I agree |
06:31:22 | * | zachcarter quit (Ping timeout: 256 seconds) |
06:39:15 | * | zachcarter joined #nim |
06:53:36 | * | nsf joined #nim |
07:04:44 | * | ftsf_ quit (Quit: :q!) |
07:19:37 | * | unlaudable joined #nim |
07:21:48 | * | bjz joined #nim |
07:21:54 | * | bjz quit (Client Quit) |
07:24:34 | * | filcuc joined #nim |
07:27:02 | * | shodan45 joined #nim |
07:27:36 | shodan45 | hi #nim |
07:28:38 | shodan45 | haven't been keeping up, too much work :( |
07:28:53 | shodan45 | how's progress to 1.0 coming? |
07:29:17 | Araq | it's a moving target |
07:30:25 | Araq | but progress is fine, new people are trying the language and fixing bugs |
07:30:29 | shodan45 | Araq: heh, yeah, it's always fun setting your own goals when developing software |
07:32:18 | shodan45 | there's been a fair bit of negative buzz around rust lately, maybe nim could weasel its way into what people were hoping rust would be |
07:33:08 | shodan45 | nim has always looked "cleaner" to me, compared to rust, c++, etc. |
07:33:29 | FromGitter | <Varriount> shodan45: What negative buzz? |
07:33:53 | * | FromGitter * Varriount is a bee |
07:34:02 | pleiosaur | referring to esr's screed, presumably |
07:34:05 | shodan45 | http://esr.ibiblio.org/?p=7294 |
07:34:09 | shodan45 | pleiosaur: yeah |
07:35:02 | FromGitter | <Varriount> Ah, yes. |
07:36:01 | pleiosaur | can't say I agree with his points there, but it's true that go suits his needs better than rust does. he wouldn't consider nim unless it was stable |
07:36:05 | FromGitter | <Varriount> But rust is memory safe! And doesn't leak! Surely no other programming languages have done that before! |
07:36:24 | FromGitter | <Varriount> :p |
07:37:51 | pleiosaur | pleiosaur: memory-safety is hardly unprecedented in programming languages, but memory safety without a pervasive garbage collector really is a neat thing |
07:38:01 | pleiosaur | durp, that's for Varriount |
07:38:58 | Araq | on top of that, previously it was "common wisdom" memory safety without GC is actually quite impossible |
07:42:03 | FromGitter | <Varriount> Don't forget "garbage collection is always slow and inefficient" |
07:42:24 | pleiosaur | I'm intrigued at the mathematical implications of rust. IMO the two biggest knots in math are infinity and self-reference, and whereas langs like Coq provide guarantees by removing infinity rust removed the ability for data to cyclically reference itself (without unsafe, anyway) |
07:43:57 | pleiosaur | even without unsafe code rust is still turing-complete, but it feels like there might be a useful subcategory of turing-completeness in which to lump linear langs... |
07:44:10 | shodan45 | this brings back a memory (heh) from when I was a kid.... there were supposedly a few old computers in a computer lab that "didn't have memory".... I wonder if that was true |
07:45:23 | pleiosaur | guess it depends on what they meant by "memory"... you could easily have a computer with nothing but ram, but even a computer with nothing but cpu registers could still do useful work |
07:46:33 | cheatfate | cpu registers - memory |
07:47:08 | cheatfate | cpu registers uses memory but this memory is more faster then other `memory`. |
07:47:26 | * | rokups joined #nim |
07:47:42 | pleiosaur | even then you can have circuits without memory... look at how domino calculators work (as in, calculators made of dominos) |
07:47:48 | shodan45 | this was well over 20 years ago, so I could be misremembering |
07:49:48 | * | Vladar joined #nim |
07:55:58 | FromGitter | <Varriount> Araq: Want to give us any hints as to your upcoming gc/memory plans? |
07:58:15 | Araq | no. |
07:58:23 | FromGitter | <Varriount> Aw. |
07:58:37 | FromGitter | <Varriount> You're breaking my heart |
08:00:17 | FromGitter | <endragor> Interestingly, I found Nim after learning about Rust and discarded Rust for similar reasons as written in the blog post. Though ~1 hour research was enough for me. I found Rust async IO sample that did a simple thing in ~30 lines of ugly C++-like code, and then found Nim do the same in 5 lines of clean code. The choice was simple. |
08:05:36 | * | yglukhov joined #nim |
08:16:27 | * | filcuc quit (Ping timeout: 252 seconds) |
08:21:22 | * | unlaudable quit (Ping timeout: 248 seconds) |
08:24:19 | * | unlaudable joined #nim |
08:28:19 | FromGitter | <Varriount> @tekjar What was the thing |
08:28:32 | Araq | https://github.com/nim-lang/Nim/wiki/Hunting-crashes:-The-ultimate-guide |
08:28:38 | Araq | still WIP though |
08:32:36 | cheatfate | Araq, with sighashes this guide needs some updates |
08:38:08 | * | yglukhov quit (Remote host closed the connection) |
08:46:16 | * | gokr joined #nim |
08:46:26 | * | sz0 joined #nim |
08:54:58 | * | unlaudable quit (Ping timeout: 248 seconds) |
08:55:35 | * | yglukhov joined #nim |
08:56:31 | Araq | 1. name mangling is being worked on right now. |
08:56:43 | Araq | 2. the guide is appropriate. locals get a 0 appended. |
08:56:47 | * | unlaudable joined #nim |
08:57:03 | Araq | you disagree on what "local variable" means though :P |
09:06:37 | rokups | Araq: there is no pragma for defining alignment? |
09:08:13 | Araq | there is |
09:08:31 | rokups | its not in docs ;) |
09:14:09 | rokups | Araq: how that pragma is supposed to be used? i tried to put it everywhere and it always results in invalid pragma error. i need object to be 16 byte aligned to make mingw happy |
09:15:24 | Araq | type Foo {.align: 16.} = object |
09:15:26 | Araq | iirc |
09:18:07 | rokups | what about this? type Coroutine = ref object / ctx {.align: 16.}: JmpBuf |
09:18:20 | rokups | your example not compiling either btw |
09:21:04 | rokups | JmpBuf is also importc'ed if that makes any difference |
09:21:25 | * | cheatfate left #nim ("Leaving") |
09:24:02 | * | Andris_zbx joined #nim |
09:25:28 | * | couven92 joined #nim |
09:31:15 | * | Parashurama joined #nim |
09:31:18 | Parashurama | hey. |
09:31:41 | Parashurama | Araq: I'm tackling https://github.com/nim-lang/Nim/issues/4992. |
09:32:26 | Parashurama | where do you think i should start? i went backward from the error message to semexprs.nim |
09:32:34 | Araq | oh yeah let me guide you |
09:33:14 | Parashurama | so I got a backtrace from compiler in debug mode , raising inside localError |
09:33:25 | Parashurama | and went from there |
09:35:00 | Araq | oh yeah let me guide you |
09:35:06 | Araq | before the error message add |
09:35:09 | Araq | echo n.id |
09:35:15 | Araq | or whatever the node is called |
09:35:24 | Parashurama | in localError? |
09:35:36 | Araq | and compile with 'koch -d:useNodeIds temp c test' |
09:35:42 | Araq | before the localError, yes |
09:35:49 | Araq | this then outputs a node id |
09:35:54 | Araq | then edit ast.nim |
09:36:28 | Araq | when defined(useNodeIds): |
09:36:28 | Araq | const nodeIdToDebug* = -1 # 299750 # 300761 #300863 # 300879 |
09:36:44 | Araq | change the -1 to the node ID that was echo'ed |
09:36:56 | Araq | do 'koch -d:useNodeIds temp c test' again |
09:37:15 | Araq | look at the stack trace, it tells you were the node with missing line information was created |
09:38:38 | Araq | sometimes the output says "comes from xxx" |
09:38:58 | Araq | then you change nodeIdToDebug to that xxx |
09:39:05 | Araq | and repeat until you see the cause |
09:39:09 | Parashurama | okay koch doen't know -d:useNodeIds I just tried latest devel |
09:39:17 | Araq | nim c koch |
09:39:26 | Araq | oh my bad, it's |
09:39:34 | Araq | koch temp -d:useNodeIds c |
09:39:53 | Araq | which is *very* different from 'koch temp c -d:useNodeIds' |
09:39:59 | Araq | (don't ask...) |
09:40:30 | Araq | you can also modify compiler/nim.cfg and set the --define there |
09:41:43 | Parashurama | okay that works. |
09:42:27 | Parashurama | I will follow your inidcations and get back to you, thanks |
09:43:23 | Araq | you can also grep for 'nkRange', these are pretty much the only nodes left without line info |
09:47:00 | * | yglukhov quit (Remote host closed the connection) |
09:50:15 | * | yglukhov joined #nim |
09:53:03 | * | yglukhov quit (Remote host closed the connection) |
09:56:16 | * | yglukhov joined #nim |
10:11:27 | * | vlad1777d joined #nim |
10:23:49 | * | bjz joined #nim |
10:24:37 | * | yglukhov quit (Remote host closed the connection) |
10:25:12 | * | yglukhov joined #nim |
10:25:40 | * | yglukhov quit (Remote host closed the connection) |
10:25:53 | * | yglukhov joined #nim |
10:26:51 | Parashurama | Araq: the problem seems to be in quote do: `aLen` and `bLen` . message is KIND nkIntLit |
10:27:35 | Parashurama | resplace `alen` or `bLen` by the integer value fixes the lineinfo problem |
10:31:45 | Araq | post the stacktrace creating the node without info? |
10:34:23 | Parashurama | https://gist.github.com/Parashurama/e39e3766a9403c0a020e785a8b3cdb5f#file-nim-stacktrace |
10:34:51 | Parashurama | why the hell are newline messup? |
10:35:11 | * | yglukhov quit (Remote host closed the connection) |
10:36:16 | Parashurama | fixerd: apparently gist doen't like linux newlines. |
10:38:11 | Parashurama | btw i was wrong, it may not be `aLen`i inavertantly comment out a ligne before the expression so made the debugNodeid invalid |
10:40:09 | Araq | ah in the VM it's a bit tricky but c.debug[pc] gives you the line number of the currently running VM instruction (pc = program counter= |
10:40:11 | Araq | ) |
10:45:58 | * | _yeeve joined #nim |
10:48:02 | * | bjz quit (Read error: Connection reset by peer) |
10:49:28 | * | yeeve quit (Ping timeout: 245 seconds) |
10:50:20 | * | gokr left #nim (#nim) |
10:54:49 | * | yglukhov joined #nim |
10:55:58 | Parashurama | Araq: I kinda have a fix. I just use TLineInfo from c.debug[pc] into bugged node.info. It's the wrong line, but it's the original quote do: call. |
10:59:48 | * | sz0 quit (Quit: Connection closed for inactivity) |
11:00:53 | Araq | sounds better than no line information |
11:02:11 | Parashurama | That's what I thought. I will still investigate why don't have any kind of information for nkIntLit in this quote do block. |
11:04:41 | * | PMunch joined #nim |
11:17:40 | * | bjz joined #nim |
11:20:54 | * | Kingsquee joined #nim |
11:22:35 | * | bjz quit (Ping timeout: 264 seconds) |
11:23:01 | * | bjz_ joined #nim |
11:49:31 | * | Gilga joined #nim |
12:04:05 | * | Snircle joined #nim |
12:04:07 | * | Arrrr joined #nim |
12:04:59 | * | ekarlso_ quit (Ping timeout: 256 seconds) |
12:09:31 | Gilga | Anyone has a sec? |
12:09:57 | rokups | just ask |
12:10:01 | Gilga | Never mind |
12:10:09 | Gilga | I just found out :p |
12:10:17 | Gilga | Thanks though ^ |
12:14:01 | * | arnetheduck joined #nim |
12:19:07 | Gilga | Anyone know how to use cast tainted string to string? |
12:19:24 | Gilga | foo.string is not working. |
12:21:22 | Araq | it does work. |
12:21:54 | Gilga | Ok, in that case I'll look further into it. |
12:32:22 | rokups | is there a way to turn simple `proc()` to a native callback? |
12:34:30 | Araq | rokups: () => p() |
12:34:40 | Araq | import future |
12:34:50 | Araq | hmm my own code needs this https://github.com/nim-lang/Nim/pull/5001 |
12:35:16 | Araq | does that mean it should be merged right away? :-9 |
12:35:19 | rokups | Araq: i am not sure what that means. what do i search documentation for? |
12:35:31 | rokups | o wait, i think i know\ |
12:35:51 | rokups | is there a way without importing future? i would like to not make coroutines depend on future :p |
12:36:10 | Araq | sure, (proc () = p()) |
12:36:53 | * | jjido joined #nim |
12:37:12 | rokups | aww yisss, almost works ^_^ |
12:37:26 | * | arnetheduck quit (Ping timeout: 256 seconds) |
12:44:44 | PMunch | Araq, oh yeah. Feel free to merge it :) |
12:49:13 | FromGitter | <dom96> This is some impressive HTTP performance: https://news.ycombinator.com/item?id=13539767 |
12:49:25 | FromGitter | <dom96> I'm still unsure whether I believe it. |
12:51:40 | * | bjz_ quit (Ping timeout: 240 seconds) |
12:52:03 | * | bjz joined #nim |
13:06:10 | federico3 | dom96: from a 1km view sounds a little bit like overoptimization |
13:11:53 | PMunch | As noted in the comments it uses pipelining which really isn't used all that much |
13:12:03 | PMunch | And which will instantly give a significant boost |
13:17:33 | * | MrAxilus[m] quit (Ping timeout: 255 seconds) |
13:20:02 | FromGitter | <endragor> they are not used by browsers (mainly because servers don't support it properly), but if a company builds backends based on microservices (very common these days) then they can enforce that each microservice makes use of pipelining |
13:20:59 | FromGitter | <endragor> they are not used -> pipelining is not used |
13:24:36 | PMunch | Ah yes of course, but building a web-server on it wouldn't give you much of a performance boost |
13:29:04 | * | MrAxilus[m] joined #nim |
14:15:19 | * | rupil joined #nim |
14:26:16 | * | Parashurama left #nim (#nim) |
14:28:10 | FromGitter | <dom96> Good points. |
14:29:01 | FromGitter | <dom96> I wonder how GitLab's backup screw will affect them. A true test of "even bad PR is good PR". |
14:45:18 | FromGitter | <dom96> *screw up |
14:46:06 | rokups | Araq i crash after returning from first coroutine on mingw64. im out of ideas. please make your edicated guess https://www.irccloud.com/pastebin/cdkTyxKB/ |
14:48:18 | rokups | coroutines work on all supported compilers and release/debug/optimization combinations on linux and windows and linux except for mingw64. so close, but so far.. |
14:51:25 | PMunch | dom96, yeah I'm very curious as well. I think that their transparency might save them though |
15:05:41 | * | PMunch_ joined #nim |
15:05:51 | * | PMunch_ quit (Remote host closed the connection) |
15:10:47 | Araq | rokups: the default GC cannot work with coroutines ? |
15:11:03 | Araq | use the M&S GC for now |
15:11:40 | rokups | thanks for the guess :) a year ago when i started with this you helped me to patch default gc ;) thought maybe this would be something obvious. turns out bug from older code creeped in, almost got it ;) |
15:21:46 | Araq | rokups: compile with -d:useSysAssert -d:useGcAssert |
15:28:15 | * | synshroud quit (Quit: ZNC 1.6.4 - http://znc.in) |
15:30:17 | * | zetashift joined #nim |
15:32:10 | * | devted joined #nim |
15:37:50 | * | ekarlso_ joined #nim |
15:39:38 | Araq | PMunch: thinking about it, it would be weird to allow this. so 'self' is your 2nd parameter but it's not injected at the 2nd position in calls? |
15:39:59 | Araq | very confusing. |
15:40:17 | Araq | so only field accesses would work reliably I guess then. |
15:40:18 | PMunch | I'm not sure I follow |
15:41:32 | PMunch | The reason I wanted it was to be able to do renderer.draw(myobject, 0,0) and have myobject as self |
15:41:52 | demi- | imo that calling convention is very weird |
15:42:14 | demi- | if anything `self` should be the first parameter |
15:42:14 | Araq | PMunch: but why? so that myobject.field works? |
15:46:03 | PMunch | Well, I have multiple files with various objects. They all implement their own draw function. But I want to be able to do renderer.draw so the renderer is my first argument. This means that I couldn't use {.pragma: self.}. So I proposed to allow self in any position so that I could use the function as if it was a function that belonged to myobject |
15:47:08 | jjido | You dislike myobject.draw(renderer,0,0) |
15:47:15 | jjido | ? |
15:47:57 | PMunch | Yes |
15:48:02 | demi- | I would argue that `draw` should be `drawWithRenderer` |
15:48:29 | FromGitter | <andreaferretti> @PMunch a very confusing use case indeed |
15:48:37 | jjido | demi- are you an ObjC transfugee |
15:48:55 | FromGitter | <andreaferretti> having self in second position is just... unexpected |
15:49:18 | demi- | jjido: sorry, is that method too verbose for you? |
15:49:19 | PMunch | But should it be disallowed? |
15:49:40 | PMunch | demi-, well in my program it's actually called render |
15:49:51 | PMunch | So it would be renderer.render(myObject,<arguments>) |
15:50:21 | demi- | PMunch: naming problems shouldn't translate to calling convention problems |
15:50:56 | jjido | demi- no it is just making me smile. Seen so many methods with such name |
15:51:14 | Vladar | I started with something like that, then moved the renderer reference to a global variable. How often do you even use more than one renderers? |
15:51:48 | PMunch | Self doesn't really change anything though. It's just a helper for whoever writes the function. So the argument could be made that anything that would help the writer would be beneficial |
15:51:57 | PMunch | Vladar, I do |
15:52:05 | PMunch | Double buffering for transparency |
15:52:36 | demi- | PMunch: I think that is weak at best, since it only adds confusion in implmentation as yet another piece of tech debt that has to be held in memory when analyzing any code |
15:52:40 | PMunch | I draw the entire scene to a renderer. Then I render it twice, once for the actual scene, once as a flipped transparent version as a reflection. |
15:52:55 | PMunch | demi-, that's a fair point.. |
15:53:24 | PMunch | But it is specified that self works this way. So if you already know about self then you would understand what's going on. |
15:54:15 | demi- | it makes assumptions on the knowledge the person reading the code has, which imo is a red flag for something not good going on. |
15:54:25 | Araq | PMunch: can you answer my question please? so your 'self' is explicit in your calls anyway |
15:54:44 | Araq | so you only want its implicitness for field accesses? |
15:54:59 | * | synshroud joined #nim |
15:55:37 | PMunch | Yes |
15:56:01 | PMunch | I want to not have to prefix all field access to myObject in the renderer function for that object |
15:56:40 | PMunch | So that when I write my files (which represent an object) I can use self for all functions and I won't have to use variableName.pos for example |
15:56:41 | jjido | Is it in VB? There are With blocks |
15:57:21 | Araq | it may surprise you but I never looked at VB when designing Nim :-) |
15:58:52 | demi- | PMunch: so you want `self.pos` instead of `variableName.pos` instead of the scope of the function? |
15:59:57 | PMunch | No, self makes them accessible as just pos |
16:00:01 | PMunch | Within the functon |
16:00:04 | PMunch | function |
16:00:17 | FromGitter | <barcharcraz> I think there's a pragmatic for that |
16:00:23 | FromGitter | <barcharcraz> *pragma |
16:00:27 | PMunch | https://nim-lang.org/docs/manual.html#overloading-resolution-automatic-self-insertions |
16:00:39 | yglukhov | distinct pointers cannot be compared with nil, neither checked for isNil. is this a bug? |
16:00:51 | PMunch | barcharcraz, this is using the pragma |
16:01:14 | PMunch | We're discussing if it should be allowed to use self in any position in a function call or just the first position |
16:03:24 | demi- | from an implementation perspective it sounds like you basically want to add boilerplate to shuffle all the input values to any call in any order so that they can be put back into an order to perform the call or to give them distinct variables as parameters once the call is made? |
16:05:11 | Araq | yglukhov: er, there was a PR to enable that |
16:05:27 | rokups | Araq: now thats a piece of work: https://github.com/nim-lang/Nim/pull/5317 |
16:05:28 | Araq | tnildistinct in tests/distinct or something |
16:10:30 | * | jjido quit (Ping timeout: 256 seconds) |
16:12:08 | PMunch | demi-, not really.. |
16:12:19 | PMunch | https://github.com/nim-lang/Nim/pull/5001 |
16:12:27 | PMunch | That's the only change I'm proposing |
16:15:01 | Araq | PMunch: I think the feature would be too confusing. so 'self' is injected as the first parameter even if used as the Nth? |
16:16:35 | * | unlaudable quit (Ping timeout: 264 seconds) |
16:18:00 | PMunch | No, the object is just available as it would with self (and the pragma {.this: self.}) no matter where it is |
16:18:05 | PMunch | So you could do: |
16:18:13 | PMunch | {.this: self.} |
16:18:34 | PMunch | proc hello(msg:string, self: myObject) = |
16:18:43 | PMunch | sayHi(msg) |
16:19:21 | PMunch | Or rather sayHi(msg+name) with name as a property of myObject. |
16:19:50 | PMunch | You could of course use {.this: whatever.} as well |
16:22:05 | demi- | wouldn't that changeset cause a non-trivial amount of overhead to each function call based on the position of `self:`? |
16:25:43 | PMunch | Well, it's not nothing. But it's pretty small |
16:26:01 | PMunch | For all non-self arguments it just checks if they are self or not |
16:26:58 | demi- | but it has to iterate over all arguments to any function call to resolve `self` correctly, no? |
16:28:08 | PMunch | Yes |
16:28:21 | PMunch | But this is all on compile-time |
16:29:02 | demi- | that seems like a non-trivial amount of overhead and complexity introduced? |
16:29:47 | PMunch | Well, I haven't tried it but that is entirely possible |
16:29:59 | PMunch | I didn't notice any change though when I tried it. |
16:32:59 | PMunch | But then again this is only for the pragma {.this: self.}, so it shouldn't happen to all functions |
16:33:10 | PMunch | Just those marked with that pragma, or am I mistaken? |
16:34:12 | * | couven92 quit (Ping timeout: 252 seconds) |
16:35:55 | * | couven92 joined #nim |
16:36:28 | Araq | yes but .this: self will become the default |
16:37:09 | Araq | however this "search" though the param list is pretty much free, everything else in the compiler takes more time :-) |
16:40:07 | PMunch | Ah right, optionally, if it takes too long (many drops makes an ocean) it could be an additional pragma. But then the case can be made that it might be confusing. |
16:41:24 | demi- | and as the ability to configure something increases the quality decreases as more and more edgecase behavior and bugs get introduced. |
16:42:01 | * | adeohluwa joined #nim |
16:50:52 | * | Andris_zbx quit (Remote host closed the connection) |
17:02:38 | * | Trustable joined #nim |
17:03:56 | * | yglukhov quit (Remote host closed the connection) |
17:05:09 | * | brson joined #nim |
17:06:43 | * | yglukhov joined #nim |
17:08:13 | * | yglukhov_ joined #nim |
17:08:13 | * | yglukhov quit (Read error: Connection reset by peer) |
17:08:34 | * | jjido joined #nim |
17:08:43 | * | PMunch quit (Quit: leaving) |
17:12:26 | * | yglukhov_ quit (Ping timeout: 255 seconds) |
17:15:41 | * | adeohluwa quit (Quit: Lost terminal) |
17:33:01 | * | nsf quit (Quit: WeeChat 1.7) |
17:52:09 | * | jjido quit (Ping timeout: 240 seconds) |
17:58:09 | * | yglukhov joined #nim |
17:58:18 | * | Kingsquee quit (Read error: Connection reset by peer) |
17:58:36 | * | Kingsquee joined #nim |
17:59:24 | * | vlad1777d quit (Quit: Leaving) |
18:00:24 | FromGitter | <konqoro> hey should this code compile? https://gist.github.com/konqoro/5b9249aa28f54e39dc0628e8e5d006a2 |
18:00:44 | FromGitter | <konqoro> (it has no commas) |
18:00:56 | * | yglukhov quit (Remote host closed the connection) |
18:01:08 | * | yglukhov joined #nim |
18:02:14 | * | vlad1777d joined #nim |
18:03:12 | rupil | I'm assuming yes. The example found at https://nim-by-example.github.io/oop/ has the same syntax. |
18:04:53 | FromGitter | <konqoro> hm gonna edit it anyway, thanks rupil |
18:07:15 | * | adeohluwa joined #nim |
18:07:23 | adeohluwa | hello |
18:07:36 | adeohluwa | after compiling nimrepl |
18:08:11 | adeohluwa | i get a gui with two panes and once i press enter it quits |
18:10:07 | adeohluwa | there is also nrpl but it seems to be outdated |
18:13:19 | Arrrr | Burn it with fire |
18:14:51 | * | nsf joined #nim |
18:16:20 | * | yglukhov quit (Remote host closed the connection) |
18:19:07 | adeohluwa | lmao! |
18:19:45 | FromGitter | <konqoro> adeohluwa: there is "nim secret" try it |
18:22:11 | adeohluwa | thank u konqoro |
18:22:42 | adeohluwa | how do i get that, nimble install doesnt work for me |
18:22:58 | FromGitter | <konqoro> np, although I think it is not officially supported and might be removed |
18:23:15 | FromGitter | <konqoro> just type "nime secret" in terminal |
18:23:41 | * | Trustable quit (Remote host closed the connection) |
18:23:55 | * | zetashift quit (Quit: Leaving) |
18:24:36 | * | yglukhov joined #nim |
18:24:39 | * | jjido joined #nim |
18:24:50 | adeohluwa | jeez! now that works... |
18:24:52 | adeohluwa | bless |
18:40:27 | * | xet7 joined #nim |
18:41:14 | * | adeohluwa quit (Quit: Lost terminal) |
18:41:27 | * | Matthias247 joined #nim |
19:01:01 | * | rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:03:46 | * | nsf quit (Quit: WeeChat 1.7) |
19:09:02 | * | byte512 joined #nim |
19:15:55 | dom96 | nice to see that we have appveyor builds now. Thanks cheatfate :) |
19:23:41 | * | byte512 quit (Ping timeout: 240 seconds) |
19:27:25 | * | hendi_ joined #nim |
19:39:47 | * | xet7 quit (Quit: Leaving) |
19:40:28 | * | couven92 quit (Quit: Client disconnecting) |
19:47:37 | FromGitter | <Varriount> If you want make a macro |
19:55:32 | * | hendi_ quit (Quit: hendi_) |
20:01:11 | * | krux02 joined #nim |
20:03:36 | krux02 | Araq: Is it possible, to create a Table[NimSym, NimNode]? |
20:03:47 | krux02 | My fallback solution would be to use strings |
20:03:55 | krux02 | Table[string, NimNode] |
20:13:39 | * | huonw quit (Ping timeout: 252 seconds) |
20:15:57 | * | huonw joined #nim |
20:19:37 | Araq | there is no hash for NimSym and I dunno about == |
20:19:40 | Araq | so no. |
20:22:22 | * | couven92 joined #nim |
20:27:09 | * | krux02 quit (Remote host closed the connection) |
20:45:37 | * | gangstacat quit (Quit: Ĝis) |
20:51:42 | * | gangstacat joined #nim |
20:54:58 | * | brson quit (Ping timeout: 248 seconds) |
20:55:13 | * | brson joined #nim |
21:01:36 | * | adeohluwa joined #nim |
21:05:45 | * | nsf joined #nim |
21:05:54 | * | kunev quit (Ping timeout: 258 seconds) |
21:06:15 | * | Trustable joined #nim |
21:07:21 | * | kunev joined #nim |
21:12:07 | * | rokups quit (Quit: Connection closed for inactivity) |
21:16:16 | * | Arrrr quit (Disconnected by services) |
21:16:17 | * | Arrrr1 joined #nim |
21:17:05 | * | Arrrr1 quit (Client Quit) |
21:19:03 | * | adeohluwa quit (Ping timeout: 245 seconds) |
21:37:16 | * | Vladar quit (Quit: Leaving) |
21:38:50 | * | zetashift joined #nim |
21:40:07 | * | jjido quit (Ping timeout: 240 seconds) |
21:42:40 | * | jjido joined #nim |
22:05:22 | * | PMunch joined #nim |
22:09:23 | * | Trustable quit (Remote host closed the connection) |
22:38:46 | * | kulelu88 joined #nim |
22:39:49 | zachcarter | http://imgur.com/a/0s24L I got index buffer objects working now as well as transformation matrices :D |
22:44:13 | * | vitalyx joined #nim |
22:45:34 | * | nsf quit (Quit: WeeChat 1.7) |
22:54:51 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:56:49 | PMunch | Hmm, how do I get the string value of an Ident? |
22:58:08 | * | jjido quit (Ping timeout: 255 seconds) |
23:02:54 | PMunch | Never mind, figured it out $ to the rescue |
23:06:08 | * | devted quit (Quit: Sleeping.) |
23:17:13 | * | CcxWrk quit (Ping timeout: 256 seconds) |
23:22:47 | * | CcxWrk joined #nim |
23:23:23 | PMunch | Hmm, I can do [] for an untyped and get the nth child, but I can't do [1..<something>] |
23:23:31 | PMunch | What I really want is everything but the first |
23:24:56 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:33:29 | * | ftsf_ joined #nim |
23:36:41 | * | zetashift quit (Quit: Leaving) |
23:38:17 | * | yglukhov quit (Remote host closed the connection) |
23:49:59 | * | def-pri-pub joined #nim |
23:54:09 | * | brson quit (Ping timeout: 248 seconds) |