<< 03-03-2016 >>

00:01:56*pregressive joined #nim
00:02:15*pregressive quit (Remote host closed the connection)
00:13:54*vendethiel quit (Ping timeout: 244 seconds)
00:34:06*zepolen joined #nim
00:38:51*zepolen quit (Ping timeout: 264 seconds)
00:39:56*u joined #nim
00:40:19*u is now known as Guest58129
00:43:29*Guest58129 quit (Client Quit)
00:49:13*mwbrown quit (Ping timeout: 252 seconds)
01:07:25*desophos joined #nim
01:08:49*pregressive joined #nim
01:11:48*sora quit (Remote host closed the connection)
01:14:33*Trustable quit (Remote host closed the connection)
01:51:36*lxdong joined #nim
02:12:14*mahasamoot quit (Ping timeout: 244 seconds)
02:12:36*mahasamoot joined #nim
02:13:48*Sys_ quit (Ping timeout: 252 seconds)
02:17:27*mwbrown joined #nim
02:19:19*pregressive quit (Read error: Connection reset by peer)
02:20:16*pregressive joined #nim
02:22:42*_stowa_ joined #nim
02:22:46*OmlkRoNiXz joined #nim
02:23:47*Jesin quit (Ping timeout: 248 seconds)
02:23:48*toaoMgeorge quit (Ping timeout: 248 seconds)
02:23:48*_stowa quit (Ping timeout: 248 seconds)
02:23:48*OmIkRoNiXz quit (Ping timeout: 248 seconds)
02:23:49*mtj_ quit (Ping timeout: 248 seconds)
02:25:03*mtj_ joined #nim
02:25:12*Jesin joined #nim
02:32:33*vendethiel joined #nim
02:38:14*PMunch quit (Quit: leaving)
02:42:07*_stowa_ is now known as _stowa
02:50:31*brson quit (Quit: leaving)
02:55:57*vendethiel quit (Ping timeout: 276 seconds)
02:57:33*darkf joined #nim
03:11:09*pregressive quit (Read error: Connection reset by peer)
03:11:29*endragor joined #nim
03:12:14*pregressive joined #nim
03:13:44*endragor_ joined #nim
03:21:56*Varriount quit (Ping timeout: 244 seconds)
03:22:40*endragor quit (*.net *.split)
03:23:08*BlaXpirit_ joined #nim
03:23:19*biscarch_ joined #nim
03:25:35*Sergio965_ joined #nim
03:25:45*gmpreussner_ joined #nim
03:25:47*huonw_ joined #nim
03:25:59*endragor_ quit (Remote host closed the connection)
03:26:03*niv_ joined #nim
03:26:05*regtools_ joined #nim
03:26:27*niv quit (Ping timeout: 260 seconds)
03:26:27*niv_ is now known as niv
03:26:27*gmpreussner quit (Ping timeout: 260 seconds)
03:26:27*Amun_Ra quit (Ping timeout: 260 seconds)
03:26:27*huonw quit (Ping timeout: 260 seconds)
03:26:28*mtj_ quit (Ping timeout: 260 seconds)
03:26:28*Demon_Fox quit (Ping timeout: 260 seconds)
03:26:29*Sergio965 quit (Ping timeout: 260 seconds)
03:26:29*zama quit (Ping timeout: 260 seconds)
03:26:31*regtools quit (Ping timeout: 260 seconds)
03:26:31*nim-buildbot quit (Ping timeout: 260 seconds)
03:26:31*BlaXpirit quit (Ping timeout: 260 seconds)
03:26:31*\u quit (Ping timeout: 260 seconds)
03:26:32*biscarch quit (Ping timeout: 260 seconds)
03:26:32*BlaXpirit_ is now known as BlaXpirit
03:26:44*zama_ joined #nim
03:26:51*Demon_Fox joined #nim
03:27:00*Amun_Ra joined #nim
03:27:19*ray_ joined #nim
03:27:22*mtj_ joined #nim
03:28:00*ray_ quit (Changing host)
03:28:00*ray_ joined #nim
03:28:03*ray_ is now known as \u
03:35:38Sergio965_Does Nim have ADTs? I see object variants, but they're not quite what I want.
03:35:56Sergio965_In particular, they don't seem to allow me to have to variants with the same field names.
03:36:38*desophos quit (Read error: Connection reset by peer)
03:37:12Sergio965_And the type is checked at run-time, which isn't fun.
03:37:20Sergio965_The variant, that is.
03:55:41*bozaloshtsh joined #nim
03:59:34*endragor joined #nim
04:28:43*pregressive quit (Read error: Connection reset by peer)
04:29:26*pregressive joined #nim
04:31:57*Druage joined #nim
04:32:01Druagehey guys!
04:32:46Druagehow would I get a library i made in nim on the 'Nim Standard Library Unofficial' page?
04:47:21*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
04:47:28*Kingsqueee joined #nim
05:11:21*pregressive quit (Read error: Connection reset by peer)
05:14:00*pregressive joined #nim
05:14:21*Druage quit (Quit: Page closed)
05:16:49*mwbrown quit (Ping timeout: 240 seconds)
05:34:33*mahasamoot quit (Ping timeout: 246 seconds)
06:18:44*endragor_ joined #nim
06:19:36*yglukhov joined #nim
06:21:55*endragor quit (Ping timeout: 248 seconds)
06:24:10*yglukhov quit (Ping timeout: 252 seconds)
06:27:59*vendethiel joined #nim
06:34:51*endragor_ quit (Remote host closed the connection)
06:35:20*endragor joined #nim
06:42:40veganskDruage, see https://github.com/nim-lang/nimble#submitting-your-package-to-the-package-list
06:44:33*bjz joined #nim
06:51:13*vendethiel quit (Ping timeout: 240 seconds)
06:51:32*vbtt joined #nim
06:54:28*Varriount joined #nim
07:03:30*endragor quit (Remote host closed the connection)
07:09:17*GangstaCat quit (Ping timeout: 248 seconds)
07:12:31*GangstaCat joined #nim
07:18:56*endragor joined #nim
07:20:15*bjz quit (Ping timeout: 264 seconds)
07:22:59*bjz joined #nim
07:30:05*toaoMgeorge joined #nim
07:33:49*girvo quit (Quit: leaving)
07:34:28*toaoMgeorge quit (Ping timeout: 250 seconds)
07:40:50*mahasamoot joined #nim
07:56:00*filcuc joined #nim
08:10:53*vendethiel joined #nim
08:15:02*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
08:15:10*toaoMgeorge joined #nim
08:19:32AraqSergio965_: in an ADT the same field names do not refer to the same offset (i.e. they are not shared) so you can just use different names instead. Which is what you have to use for case objects.
08:21:54*cheatfate_ joined #nim
08:21:54*cheatfate quit (Read error: Connection reset by peer)
08:24:27*toaoMgeorge quit (Ping timeout: 264 seconds)
08:25:31*vbtt joined #nim
08:44:05*endragor quit (Remote host closed the connection)
08:45:55*_cheatfate joined #nim
08:45:55*cheatfate_ quit (Read error: Connection reset by peer)
08:47:15*mahasamoot quit (Ping timeout: 264 seconds)
08:48:57*bjz_ joined #nim
08:50:03*bjz quit (Ping timeout: 244 seconds)
08:50:19*vendethiel quit (Ping timeout: 260 seconds)
08:55:26*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
09:04:42*endragor joined #nim
09:06:49*pregressive quit (Read error: Connection reset by peer)
09:11:23*pregressive joined #nim
09:15:20*Demon_Fox quit (Quit: Leaving)
09:20:21*vendethiel joined #nim
09:23:20*Trustable joined #nim
09:34:26Sergio965_Araq: I'm not really following what you're saying. I understand they don't refer to the same offset - for my use case, and for most, really, it doesn't really matter. But, I don't want to use different names because the language forces me to.
09:35:26Araqyes, you don't need this. Others vehemently argued for "allow fields of the same name and type at the same offset within a case object"
09:36:11Araqthe language requires you to use different names right now, since you don't have to guard every single access.
09:36:27Sergio965_I'd also like variants to be statically checked.
09:36:58Sergio965_It sucks that typing an invalid variant compiles and fails at run-time.
09:37:21Araqthere is a warning you can enable, then it's checked for you.
09:39:01*zepolen joined #nim
09:39:13Sergio965_It works in all cases?
09:39:32Sergio965_That is: if no warning shows up, I'm guaranteed to never get an exception related to bad variants?
09:40:02AraqI think so, but I don't use it since it's annoying.
09:41:04*vendethiel quit (Ping timeout: 252 seconds)
09:48:20*toaoMgeorge joined #nim
10:01:07Sergio965_So, no plans for ADTs?
10:01:16Sergio965_I can't destruct on object variants, can I?
10:01:19Sergio965_pattern match, that is.
10:01:25Sergio965_On the fields.
10:02:21*Sergio965_ is now known as Sergio965
10:04:35reactormonkSergio965, kind objects are pretty similar to ADTs
10:04:46Sergio965reactormonk: They're not in the ways I've mentioned.
10:04:57AraqSergio965: you can write a macro that does that. in fact there is a Nimble package for ADTs iirc
10:04:59Sergio965And those ways are particularly important and quite frankly _define_ ADTs.
10:05:10reactormonkAnd then there's https://github.com/andreaferretti/patty
10:05:50Sergio965Patty is nice.
10:06:16reactormonkPretty sure you can wire that up to make an exhausive-check for you.
10:06:27Araqpretty sure they don't _define_ ADTs.
10:06:31Sergio965Lol
10:06:44Sergio965Indeed, that was a bit of a stretch.
10:07:06Sergio965Still, they're rather important properties found in (what I would consider to be) most useful implementations of ADTs.
10:07:51Sergio965In particular, Nim doesn't appear to consider two variants as disjoint.
10:08:37AraqNim's case objects were inspired by Ada, not by ML. Sue me.
10:08:52*arnetheduck joined #nim
10:09:49AraqML's don't work well with mutability and are harder to serialize.
10:24:39*PMunch joined #nim
10:27:28*vendethiel joined #nim
10:31:06*endragor quit (Remote host closed the connection)
10:42:17*zepolen quit (Remote host closed the connection)
10:55:25*vendethiel quit (Ping timeout: 248 seconds)
11:02:53PMunchdom96, wuehlmaus told me you wanted to report the bug I got with the borrow statement on Tuesday. Here is the issue: https://github.com/nim-lang/Nim/issues/3928 Didn't mean to leave so abruptly, suddenly realized I had to catch a bus.
11:03:42wuehlmausPMunch: he wanted YOU to report that bug :)
11:03:54PMunchI did
11:04:00wuehlmausgreat
11:04:04dom96PMunch: Thank you for reporting :)
11:04:13PMunchNo problem :)
11:06:11*vendethiel joined #nim
11:06:56*lxdong quit (Ping timeout: 252 seconds)
11:17:23*zepolen joined #nim
11:25:09*sora joined #nim
11:28:09*vendethiel quit (Ping timeout: 244 seconds)
11:29:55*yglukhov joined #nim
11:32:00*endragor joined #nim
11:36:26*endragor quit (Ping timeout: 244 seconds)
11:37:19*Kingsqueee quit (Quit: https://i.imgur.com/qicT3GK.gif)
11:41:55*endragor joined #nim
12:30:49*toaoMgeorge quit (Ping timeout: 260 seconds)
12:31:36*toaoMgeorge joined #nim
12:45:47*endragor quit (Remote host closed the connection)
12:46:02*Kingsquee joined #nim
12:57:26*bjz joined #nim
12:58:34*bjz_ quit (Ping timeout: 244 seconds)
13:08:16*bjz_ joined #nim
13:11:10*bjz quit (Ping timeout: 252 seconds)
13:11:43*toaoMgeorge quit (Ping timeout: 252 seconds)
13:40:52Araqdom96: spammer on the forum again
13:42:27*alexsystemf quit (Ping timeout: 246 seconds)
13:46:30*endragor joined #nim
13:50:53*alexsystemf joined #nim
13:51:09*vendethiel joined #nim
13:51:48*endragor quit (Ping timeout: 244 seconds)
14:00:33*toaoMgeorge joined #nim
14:10:12*toaoMgeorge quit (Ping timeout: 260 seconds)
14:14:39*vendethiel quit (Ping timeout: 260 seconds)
14:22:43*toaoMgeorge joined #nim
14:25:45*vendethiel joined #nim
14:29:02*Gonzih quit (Quit: WeeChat 1.4)
14:29:21*Gonzih joined #nim
14:46:59*vendethiel quit (Ping timeout: 248 seconds)
14:48:26*toaoMgeorge quit (Quit: Bye)
14:49:17*toaoMgeorge joined #nim
14:51:36*vendethiel joined #nim
15:04:03*mwbrown joined #nim
15:06:48mwbrownTrying to implement volatileRead and volatileWrite to get my embedded stuff working. Is it possible for a generic function to be able to tell if the passed-in ptr type is for 8, 16, or 32 bit memory? I want to be able to {.emit.} C code for the appropriate pointer type
15:07:12mwbrownso if I have proc volatileWrite*[T](address: ptr T, data: T) = ...?
15:07:35mwbrownalso open to making it a template instead of a proc
15:09:14mwbrownFor the most part I'm using cuint which is 32-bit, which is 99% of the use case, but in the interest of overengineering I'd like to be able to generate a volatile write to the appropriate pointer size
15:11:15*endragor joined #nim
15:11:25*toaoMgeorge quit (Quit: Bye)
15:12:25*vendethiel quit (Ping timeout: 240 seconds)
15:12:58*toaoMgeorge joined #nim
15:17:52*toaoMgeorge quit (Ping timeout: 260 seconds)
15:43:13*PMunch quit (Quit: leaving)
15:43:37*arnetheduck quit (Ping timeout: 240 seconds)
15:44:55*vendethiel joined #nim
15:56:53*pregressive quit (Remote host closed the connection)
15:57:09*pregressive joined #nim
16:00:29*derka joined #nim
16:00:36derkaHi Masters of Nim
16:03:08*toaoMgeorge joined #nim
16:06:40*vendethiel quit (Ping timeout: 250 seconds)
16:07:10Araqmwbrown: 'when T is uint16' in the generic
16:07:13*toaoMgeorge quit (Ping timeout: 240 seconds)
16:08:34Araqor 'when sizeof(T) == 2' etc
16:10:01*Subspice joined #nim
16:10:04*Subspice left #nim (#nim)
16:10:50*toaoMgeorge joined #nim
16:14:33mwbrownAraq: thanks, I'll give that a try. Does "when T is uint16" work for equivalent types i.e. cushort? Or should I just not even bother with cuint/cushort and just use the normal int/uint types?
16:15:34Araq'is' considers type aliases
16:15:47mwbrownsounds good. Thanks!
16:15:53Araqbut I would only care about the sizes really
16:16:26mwbrownfair enough. sizeof(T) is at least able to guarantee what the processor is going to think the underlying data
16:31:01*vendethiel joined #nim
16:31:57*toaoMgeorge quit (Ping timeout: 244 seconds)
16:54:27*vendethiel quit (Ping timeout: 276 seconds)
16:56:06*PMunch joined #nim
17:02:32*pregressive quit ()
17:13:44*yglukhov quit (Ping timeout: 260 seconds)
17:14:59*PMunch quit (Quit: leaving)
17:16:54*sora quit (Remote host closed the connection)
17:16:54*endragor quit (Ping timeout: 244 seconds)
17:25:12*cheatfate joined #nim
17:27:59*endragor joined #nim
17:53:41*desophos joined #nim
17:59:28*darkf quit (Quit: Leaving)
18:03:08*endragor quit (Remote host closed the connection)
18:04:21*wuehlmaus quit (Quit: Lost terminal)
18:05:50*yglukhov joined #nim
18:09:41*zepolen quit (Remote host closed the connection)
18:10:19*yglukhov quit (Ping timeout: 260 seconds)
18:12:47*zepolen joined #nim
18:24:15*brson joined #nim
18:24:26*wuehlmaus joined #nim
18:30:25*Matthias247 joined #nim
18:35:19cheatfatedom96, about issue https://github.com/nim-lang/Nim/issues/3919, do you ask me to do tests with --gc:boehm?
18:35:53dom96cheatfate: yeah, might prevent crashing.
18:35:55dom96Just an idea
18:36:42cheatfateok i will check
18:37:45*vendethiel joined #nim
18:40:26federico3https://news.ycombinator.com/item?id=11218134 nice plug about Nim concurrency at the bottom. Is there any description of the concurrency model somewhere?
18:40:38*zepolen quit (Remote host closed the connection)
18:41:15cheatfatedom96, you so like seq's [] and i think seq's is the most slow structure in Nim
18:41:59cheatfateits about asyncdispatch code, i think if i rebuild seq's to double linked lists i will get 10% more speed
18:43:12*sorakun joined #nim
18:43:26dom96cheatfate: I didn't get a chance to optimise the code much. If you get it running faster then please do create PRs :)
18:45:34cheatfatedom96, is there any WORKING tools to help me trace memory allocations / deallocations?
18:45:37*yglukhov joined #nim
18:49:47*EastByte_ is now known as EastByte
18:56:31*hcorion joined #nim
18:59:13*yglukhov quit (Remote host closed the connection)
19:05:08*zepolen joined #nim
19:06:54*yglukhov joined #nim
19:08:23*zepolen quit (Read error: Connection reset by peer)
19:14:43*vendethiel quit (Ping timeout: 252 seconds)
19:18:03*vendethiel joined #nim
19:26:36*shodan45 joined #nim
19:40:46def-cheatfate: seqs are slow?
19:41:09def-i mean it depends on what you're doing, but they should be faster than linked lists for most stuff
19:43:41def-cheatfate: maybe allocating new seqs all the time is the problem
19:43:50def-i'd try to use setLen(0) instead of "= @[]"
19:45:23*yglukhov quit (Remote host closed the connection)
19:54:13*derka quit (Quit: derka)
19:56:00*SpaceGazebo joined #nim
19:58:33*cheatfate quit (Ping timeout: 240 seconds)
20:03:29*yglukhov joined #nim
20:07:13gmpreussner_seqs should be pretty fast if the length is set up front
20:07:30gmpreussner_they are slightly slower than static arrays due to one level of indirection
20:07:58gmpreussner_linked lists will be substantially slower, especially if the nodes need to be allocated all the time
20:08:09*def- quit (Ping timeout: 276 seconds)
20:08:15gmpreussner_the alloc / realloc is the slow part
20:08:24gmpreussner_seq will only reallocate if it runs out of space
20:08:47*yglukhov quit (Remote host closed the connection)
20:08:58*def- joined #nim
20:15:13*yglukhov joined #nim
20:22:32_cheatfatedef-, i dont think that seq is faster than DL lists if you only add and iterate and remove nodes... In asyncdispatch staff this is only operations on sequences
20:23:15_cheatfateand also one good point, you can remove nodes while iterating... but you can't do this in seqs
20:24:13_cheatfateso if you dont need indexing than you dont need seqs, imho
20:29:20def-_cheatfate: well, random access and iterating is still slower with lists, but in this case they might actually be better
20:32:05_cheatfatedef-: you can see here my benchmarks https://github.com/nim-lang/Nim/issues/3909
20:33:11_cheatfateonly changing a little to DL list and i got 50% speed
20:38:47*mat4 joined #nim
20:38:49mat4hello
20:40:46*_cheatfate is now known as cheatfate
20:48:47*cheatfate quit (Quit: Leaving)
20:56:59*sorakun quit (Read error: Connection reset by peer)
20:57:45*samdoran joined #nim
21:07:12*zepolen joined #nim
21:11:16*mahasamoot joined #nim
21:15:05Araqdom96: well I rewrote the core datastructures that async uses anyway
21:15:25Araqand made it use multi-core
21:15:44Araqbut it's not stable -.-
21:16:02Araqstill seems a waste to speed up code that I've already rewritten
21:18:19*cheatfate joined #nim
21:19:23mat4hmm, efficient scaling to multible cores may be limited by needed 'serialisation'
21:31:27*mahasamoot quit (Ping timeout: 246 seconds)
21:38:26*sora joined #nim
21:45:19*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
21:46:56*samdoran quit (Quit: Leaving)
21:48:36*Jesin quit (Quit: Leaving)
21:56:30*Jesin joined #nim
21:58:53yglukhovAraq: is there a reason why pthread types refer to <sys/types.h> and not <pthread.h>? This doesnt seem to work on linux and android.
21:58:58*mat4 quit (Quit: Leaving)
21:59:23yglukhovcan a type refer to 2 headers at once somehow? =)
21:59:32Araqcan't remember. I usually looked at the posix headers
21:59:43Araqand yes, that's possible:
22:00:05Araqheader: """#include <foo.h>
22:00:11Araq#include <bar.h>"""
22:00:56yglukhovoh really? thats so cool. mind for a pr from me on that?
22:03:24*bjz joined #nim
22:03:45*BlaXpirit quit (Quit: Bye)
22:05:15Araqgo ahead
22:05:55*bjz_ quit (Ping timeout: 248 seconds)
22:08:23*Sembei joined #nim
22:10:21*Pisuke quit (Ping timeout: 276 seconds)
22:11:15*hcorion quit (Remote host closed the connection)
22:17:25*Demon_Fox joined #nim
22:18:26*BlaXpirit joined #nim
22:20:46*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:28:19*vendethiel quit (Ping timeout: 248 seconds)
22:43:26*zepolen quit (Remote host closed the connection)
22:45:25*bjz joined #nim
22:51:23*mwbrown quit (Remote host closed the connection)
22:53:47*bjz quit (Ping timeout: 244 seconds)
23:01:11*zepolen joined #nim
23:02:56*Matthias247_ joined #nim
23:05:03*shodan45 quit (Quit: Konversation terminated!)
23:05:51*Matthias247 quit (Ping timeout: 264 seconds)
23:18:28*zepolen_ joined #nim
23:20:35*zepolen quit (Ping timeout: 248 seconds)
23:46:07*yglukhov quit (Remote host closed the connection)
23:52:22*Demos joined #nim
23:57:51*Demos quit (Ping timeout: 244 seconds)