00:23:19*fredrik92 quit (Quit: Client disconnecting)
00:27:29*chemist69 quit (Ping timeout: 272 seconds)
00:44:24*brechtm quit (Remote host closed the connection)
00:46:08*ftsf joined #nim
00:50:15*libman quit (Read error: Connection reset by peer)
00:53:49*chemist69 joined #nim
01:02:19*gangstacat quit (Ping timeout: 272 seconds)
01:08:57*ARCADIVS joined #nim
01:39:41*chemist69 quit (Ping timeout: 272 seconds)
01:42:49*zielmicha[m] joined #nim
01:48:26*ehmry joined #nim
01:52:00*brson quit (Ping timeout: 276 seconds)
01:52:29*chemist69 joined #nim
02:12:27*hohlerde joined #nim
02:15:51*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
02:54:15*brson joined #nim
02:58:41*brson quit (Ping timeout: 240 seconds)
03:03:23*Jesin quit (Quit: Leaving)
03:53:35*NimBot joined #nim
03:58:23*chemist69 quit (Ping timeout: 272 seconds)
04:00:09*chemist69 joined #nim
04:23:10*yglukhov joined #nim
04:29:21*yglukhov quit (Ping timeout: 240 seconds)
05:05:59*jeffc quit (Ping timeout: 252 seconds)
05:34:09FromGitter<MiniDude22> how do you initialize an array that is the var result in a proc?
05:37:08FromGitter<MiniDude22> and is there a way to turn a sequence of a type into an array of a type?
05:38:04ftsfmake an var array then copyMem from seq to array?
05:38:16ftsfor cast it as an array
05:41:15*wgf_ joined #nim
05:50:45*desophos quit (Read error: Connection reset by peer)
05:54:32FromGitter<Araq> you cast it to a ptr array, perhaps
05:54:58FromGitter<Araq> in general you don't do it, seqs have dynamic size, arrays don't so there is no way to convert it
05:55:11FromGitter<MiniDude22> Right. Makes sense.
05:55:33FromGitter<Araq> post a snippet here please. it smells like you have no idea what you're doing ;-)
05:56:00FromGitter<MiniDude22> This is how I ended up doing it.
05:56:26FromGitter<MiniDude22> ```
05:56:51FromGitter<MiniDude22> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=57eb5ba335e0f31c6c4b7600]
05:57:17*jeffc joined #nim
05:57:21FromGitter<MiniDude22> the toRunes returned a seq, I was trying to have it simpler, but this works fine
05:58:56FromGitter<Araq> ok, you can remove the s.runeLen call, but it looks good
05:59:24FromGitter<Araq> if index > 137: raise ... in the loop body is possible too
05:59:48FromGitter<MiniDude22> Ah okay that might work better
06:00:45FromGitter<MiniDude22> is it possible to return an array that's size is the strings length? this returns blanks after the characters
06:01:11FromGitter<MiniDude22> whose size is*
06:14:39FromGitter<Araq> you can return a tuple len, data or have a 'len: var int' parameter but I think your 'chatString' should return a seq
06:22:24*bjz joined #nim
06:22:53*bjz quit (Client Quit)
06:40:01*bjz joined #nim
06:48:52*gokr joined #nim
06:50:27*fredrik92 joined #nim
06:52:59FromGitter<MiniDude22> I'm passing it over a named pipe so I need it in binary form so that i can come out as a wchar_t on the other side
06:53:10*Arrrr joined #nim
06:53:38FromGitter<MiniDude22> and array of things passes and is read properly, but a sequence doesn't go through when i tried it.
06:54:54FromGitter<Araq> for the seq you need to do addr(s[0])
06:55:02FromGitter<Araq> that's common knowledge :P
06:55:20FromGitter<Araq> or maybe even unsafeAddr(s[0])
06:55:25FromGitter<MiniDude22> Maybe for pro's like you :P
06:56:16*yglukhov joined #nim
06:57:08FromGitter<MiniDude22> So I'm writing to the file like ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=57eb69c454302caa6f262e3e]
06:57:49FromGitter<MiniDude22> I'll play with the sequences again in a bit xD thanks!
06:59:21FromGitter<Araq> and please tell me what you read: tutorial, manual, nim-in-action?
06:59:49FromGitter<Araq> what section needs to be expanded and explain about unsafeAddr/addr s[0] ?
07:00:09ftsfwhat's the difference between addr(myseq) and addr(myseq[0]) ?
07:00:18FromGitter<Araq> it surely is frustrating to always answer the same question
07:01:02Araq_ftsf: addr(myseq) returns the address of the seq
07:01:32Araq_a seq starts with a size, capacity header so this is where the resulting pointer points to
07:01:37ftsfahh I see
07:04:39*FromGitter * girvo waves
07:04:41FromGitter<MiniDude22> I've been through the tutorials, read a lot of the manual, though I guess I missed the part about seq's and their addr's
07:05:18FromGitter<girvo> Quick question: anyone implemented/used object pools or something similar in Nim?
07:05:25ArrrrIt is irc-tier knowledge
07:05:58ArrrrI have done something like that, but not too complicated
07:06:46FromGitter<Araq> @girvo are you the guy who promised me an email about comp-sci papers years ago?
07:07:06*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:07:10FromGitter<girvo> @Araq I am indeed, which I don't think I ever sent through
07:08:08FromGitter<Araq> exactly. :P
07:08:57FromGitter<girvo> Type system discussion, yeah? Trying to see if I can remember hah
07:10:18FromGitter<MiniDude22> @Araq sorry for having you explain things so many times. xD We all appreciate the halp!
07:15:01*gokr quit (Ping timeout: 240 seconds)
07:18:49*gokr joined #nim
07:23:30*Andris_zbx joined #nim
07:24:49*Trustable joined #nim
07:25:06FromGitter<Araq> @MiniDude22 you're welcome
07:25:23FromGitter<MiniDude22> <3
07:41:21*PMunch joined #nim
08:05:48*zielmicha[m] quit (Remote host closed the connection)
08:05:49*M-Quora quit (Remote host closed the connection)
08:05:50*TheManiac quit (Remote host closed the connection)
08:05:50*ehmry quit (Remote host closed the connection)
08:05:51*hohlerde quit (Write error: Connection reset by peer)
08:12:02*zielmicha[m] joined #nim
08:13:17*MyMind joined #nim
08:20:10*ftsf quit (Quit: :q!)
08:31:15*enthus1ast1 quit (Ping timeout: 265 seconds)
08:39:22*brechtm joined #nim
08:46:21*bjz joined #nim
08:59:52*zielmicha[m] quit (K-Lined)
09:01:45*chemist69 quit (Ping timeout: 272 seconds)
09:07:27*chemist69 joined #nim
09:17:36*Demon_Fox quit (Quit: Leaving)
09:17:38*aedigix joined #nim
09:21:30*zielmicha[m] joined #nim
09:36:11*Pisuke joined #nim
09:37:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:39:21*Sembei quit (Ping timeout: 276 seconds)
09:39:31*gangstacat joined #nim
09:40:04*Sembei_ joined #nim
09:42:41*Pisuke quit (Ping timeout: 240 seconds)
09:46:27*gangstacat quit (Quit: Leaving)
09:47:11*gangstacat joined #nim
09:49:30*Sembei joined #nim
09:49:50*bjz joined #nim
09:53:00*Sembei_ quit (Ping timeout: 276 seconds)
10:29:35*ftsf__ quit (Remote host closed the connection)
10:35:31*elrood joined #nim
10:51:23*Guest26614 joined #nim
10:52:37*enthus1ast joined #nim
11:01:03*arnetheduck joined #nim
11:01:50*Snircle joined #nim
11:11:37*brechtm_ joined #nim
11:13:30*brechtm_ quit (Remote host closed the connection)
11:15:23*brechtm quit (Ping timeout: 272 seconds)
11:29:04*brechtm joined #nim
11:48:05*filcuc joined #nim
11:59:18*brechtm quit (Remote host closed the connection)
12:06:02*brechtm joined #nim
12:07:17*corecode joined #nim
12:08:43*brechtm_ joined #nim
12:10:15Araq_corecode: welcome
12:11:07corecodei just found out about nim, and i'm intrigued. mostly interested for systems (embedded) development
12:11:07*brechtm quit (Ping timeout: 272 seconds)
12:13:06*Arrrr quit (Quit: WeeChat 1.5)
12:19:35*fredrik92 quit (Read error: Connection reset by peer)
12:19:36*Guest26614 quit (Quit: Leaving)
12:19:50*PMunch quit (Quit: leaving)
12:30:46federico3welcome corecode
12:38:27*cheatfate quit (Read error: Connection reset by peer)
12:38:56*cheatfate joined #nim
12:51:02*hohlerde joined #nim
12:51:03hohlerdecorecode: welcome
12:51:22hohlerdearaq: just found NimEdit. looks awesome, especially to use it in presentations
13:03:27Araq_ah yeah I need to open source it and fix its remaining bugs
13:03:46Araq_which admittedly make it hardly workable even for me :P
13:04:15Araq_but hey, I use it all the time for Nim development so at least I'm eating my dogfood
13:04:31*bjz quit (Read error: Connection reset by peer)
13:05:23*bjz joined #nim
13:06:44*arnetheduck quit (Ping timeout: 244 seconds)
13:07:22*arnetheduck joined #nim
13:13:23*ARCADIVS quit (Quit: ARCADIVS)
13:34:59*M-Quora joined #nim
13:35:07*TheManiac joined #nim
13:35:08*ehmry joined #nim
13:59:21*MyMind quit (Ping timeout: 240 seconds)
14:16:05hohlerdearaq: hehe, I realized that nimsuggest has some problems with NimEdit, but it may be a problem with my nim installation
14:16:22*pregressive joined #nim
14:17:58*MyMind joined #nim
14:22:33*krux02 joined #nim
14:23:07krux02is there a dumpTree alternative that runs after template and macro expansions?
14:23:48krux02I would like to see the generated code of my macros
14:29:32*alexvl_zbx joined #nim
14:34:51*alexvl_zbx quit (Quit: leaving)
14:37:27FromGitter<endragor> @krux02: put `echo treeRepr result` at the end of the macro
14:38:37krux02endragor: dosn't work for two reasons, treeRepr result does not run macro expansion on the result, and in my case I have a template
14:43:50krux02endragor: I now use this macro debugAst(ast: typed): untyped = echo ast.repr; ast
14:44:47krux02the typed argument expands macros for me
14:53:04hohlerdeare there any game vids showing games made in nim? so far I have found the urhonimo preview on youtube
14:55:41*arnetheduck quit (Ping timeout: 240 seconds)
15:03:27*mitai joined #nim
15:08:51FromGitter<coffeepots> krux02 thanks for that macro, that's pretty handy. Should that be in the stdlib?
15:19:51*chemist69 quit (Ping timeout: 272 seconds)
15:24:37*yglukhov_ joined #nim
15:26:48*yglukho__ joined #nim
15:27:47*yglukhov quit (Ping timeout: 244 seconds)
15:28:41*yglukhov_ quit (Ping timeout: 240 seconds)
15:30:09*FreezerburnV joined #nim
15:30:09krux02I would appreciate it
15:30:56krux02hohlerde: making a good game is really a lot of work
15:31:24Araq_krux02: doesn't have to be good, only needs nice screenshots for our website :P
15:31:25krux02so I am working on some graphcis library that should eventually be used to make games
15:31:39*yglukho__ quit (Ping timeout: 276 seconds)
15:31:58*kulelu88 joined #nim
15:32:03krux02but a finished game like a new Diablo, does not only take a while to make, it also requires the people who really want to make such a game to believe in Nim
15:33:04Araq_I know of 2 commercial game projects, one being released anytime soon
15:35:30*pregressive quit (Remote host closed the connection)
15:37:08krux02I hate this magic pragma when browsing the standard library
15:37:16FromGitter<dom96> This game is now made in Nim: https://twitter.com/impbox/status/765102630280409088
15:37:35*corecode is still working through the nim language spec
15:37:58FromGitter<coffeepots> i chose nim to make games. Game dev is certainly loads of work, but it's fun. Would love to see what others have done though.
15:39:31FromGitter<coffeepots> i can see why nim is (or seems to be) popular for gamedev
15:40:52Araq_krux02: what's the alternative?
15:41:21Araq_direct implementation with whens and .emits? :-)
15:41:33Araq_hmmm could have worked for most magics
15:41:37Araq_oh well
15:41:38federico3nice came
15:42:24Araq_Nim's way of doing .magic is something I'm proud of
15:43:20krux02I don't think that emit should be in the standard library, but I think a lot of stuff might work without magic
15:43:55Araq_I have heard this before.
15:44:07Araq_it's correct for about 5 out of 100 magics.
15:44:21krux02I feel that a lot that has been done in an early state of the language and now it can be done by using other features of the language
15:44:58krux02the problem is just that it makes reading the code much harder, because it feels like a dead end, and I don't know where I should continue
15:45:32Araq_how do you implement system.`+` for ints so that it produces decent code, acknowledges the --overflowChecks switch and works at compile time?
15:45:57krux02I would not want to make any statements, because I really don't know the dependencies, but you have to admit, there are really a lot of magics
15:46:14Araq_how would hiding the prototype of this `+` help readability?
15:46:25*chemist69 joined #nim
15:46:27Araq_in C# it's simply not in a library at all, hurray.
15:47:26krux02I don't have the problem with `+` or that there are some magics, some things just need to be done that way, but I have the feeling, that the barrier to do something as magic is quite low
15:47:35Araq_I think this is actually a big problem of Nim. People look at system.nim and see a mess.
15:48:30Araq_and they compare it to Go which doesn't have a system.nim. Not having system.nim is not a benefit, it's a design flaw.
15:48:44Araq_because then it's even moreso built into the compiler
15:48:52krux02it would be nice, if there would be some instructions that tell me where I would need to look for the implementation when in code it is implemented as magic
15:48:59Araq_with even more possibilities to special case things
15:49:34Araq_just think about it. Nim uses one set of overloading resolution rules for *everything*.
15:49:59Araq_it's super honest and the rules scale down to its integer primitives.
15:50:47Araq_krux02: just grep for mMagic in the compiler then and see its implementation
15:50:56krux02languages like Go or C have harder distinction between language features and library features. In rust I thought I was using a library feature when I was calling it's version of printf, but when I looked up how it worked it ended up being a language feature
15:53:53*brson joined #nim
15:55:02krux02Araq_: thanks for the hint. I think this comment should be somewhere in the documentation, because when reading the system.nim it is essential to know that
15:56:02Araq_do we want people to read the compiler implementation?
15:56:28cheatfateAraq_, is it possible to make text constant multiline?
15:56:49cheatfatei have very big text constant and i want to store it inside of 80 columns
15:57:27cheatfateahh i forgot.`"""`
15:58:29krux02yes we do
15:58:35*krux02 quit (Quit: Verlassend)
16:04:58*Ven_ joined #nim
16:06:05*gokr quit (Ping timeout: 272 seconds)
16:06:17*Andris_zbx quit (Remote host closed the connection)
16:09:15*brechtm_ quit (Remote host closed the connection)
16:09:54*pregressive joined #nim
16:10:06*Ven_ quit (Ping timeout: 264 seconds)
16:10:59*Ven_ joined #nim
16:13:41*filcuc quit (Ping timeout: 252 seconds)
16:16:40dom96Developers Developers Developers. Release Release Release.
16:18:06flyxthanks for reminding me of that video.
16:18:56*kulelu88 quit (Ping timeout: 244 seconds)
16:27:49*yglukhov joined #nim
16:27:54*FreezerburnV quit (Quit: Leaving)
16:28:04*aziz joined #nim
16:32:17*yglukhov quit (Ping timeout: 264 seconds)
16:32:52*xet7_ joined #nim
16:33:21*enthus1ast quit (Ping timeout: 240 seconds)
16:47:44dom96I seriously need destructors
16:47:55dom96My site is suffering from constant crashes because of fd leaks :/
16:48:17Araq_a destructor hardly does more than a withFile() template would give you
16:48:29Araq_tried a withFile?
16:48:43dom96Pretty sure this is to do with AsyncHttpClient
16:49:14Araq_also you should attach a finalizer that does the close() for you
16:49:16dom96I would hope a destructor would do what withFile does but implicitly
16:49:31Araq_implicitly yes, but hardly with any more power
16:50:10Araq_and krux02 is working on their design, so it's better you fix the problem now rather than wait for the perfect solution and be disappointed by it
16:51:03*xet7_ quit (Ping timeout: 272 seconds)
16:52:41*wgf_ quit (Quit: Leaving)
16:53:32dom96Of course, I'm trying to fix it now
16:55:13dom96Unfortunately finding the cause is tricky...
16:59:14*MyMind quit (Ping timeout: 244 seconds)