<< 02-01-2017 >>

00:05:19*Matthias247 quit (Read error: Connection reset by peer)
00:05:25*bjz quit (Ping timeout: 248 seconds)
00:07:00*bjz joined #nim
00:24:43*irrequietus quit ()
00:36:03*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:45:18*space-wizard joined #nim
01:33:20*Ven joined #nim
01:37:45*Ven quit (Ping timeout: 246 seconds)
01:41:15*vlad1777d quit (Quit: Leaving)
01:41:55*dddddd quit (Remote host closed the connection)
01:58:56*odc quit (Quit: Connection closed for inactivity)
02:46:33*chemist69 quit (Ping timeout: 260 seconds)
02:51:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:00:22*chemist69 joined #nim
03:09:16*bjz joined #nim
03:18:11*vasher_ quit (Quit: Connection closed for inactivity)
04:32:57*Pisuke quit (Ping timeout: 260 seconds)
06:13:25*Jesin quit (Ping timeout: 248 seconds)
06:17:29*Jesin joined #nim
06:32:20*nsf joined #nim
06:51:43*chemist69 quit (Ping timeout: 245 seconds)
07:03:11*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
07:18:56*chemist69 joined #nim
07:35:15*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:39:02*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:40:56*bjz joined #nim
08:09:18*rokups joined #nim
08:09:36*yglukhov joined #nim
08:10:18*Vladar joined #nim
08:14:13*jinshil joined #nim
08:27:12*byte512 joined #nim
08:34:53*vasher_ joined #nim
08:49:20*bjz_ joined #nim
08:49:48*arnetheduck joined #nim
08:50:58*bjz quit (Ping timeout: 258 seconds)
08:55:53*chemist69 quit (Ping timeout: 245 seconds)
08:58:46*chemist69 joined #nim
09:46:19*rektide quit (Ping timeout: 256 seconds)
09:46:58*rektide joined #nim
09:57:35*Arrrr joined #nim
09:58:45ArrrrIs nim'17 any better than nim'16?
10:12:53*yglukhov quit (Remote host closed the connection)
10:13:08*irrequietus joined #nim
10:13:12*odc joined #nim
10:14:00Araqyes. but I still need to structure my plans.
10:14:38Araqwanted to write a forum post about new developments but I figured it's a mess :-)
10:16:01ArrrrIs excusable if you append "WIP" on the title
10:16:56*yglukhov joined #nim
10:18:13*bjz joined #nim
10:18:47*bjz_ quit (Ping timeout: 265 seconds)
10:24:41*irrequietus quit ()
10:29:14*irrequietus joined #nim
10:30:03*yglukhov quit (Remote host closed the connection)
11:16:14*yglukhov joined #nim
11:17:43*subsetpark joined #nim
11:27:01*reactormonk quit (Ping timeout: 248 seconds)
11:59:54*gokr joined #nim
12:04:09*Snircle joined #nim
12:10:51*Trustable joined #nim
12:39:57*jinshil quit (Remote host closed the connection)
12:45:09*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:10:32*vlad1777d joined #nim
13:16:29FromGitter<Varriount> @dom96 What are your thoughts on having Nimble use the builtin SSL API's on Windows?
13:16:57FromGitter<Varriount> Not that such a prospect would be simple. The Windows documentation for SChannel is somewhat complex.
13:24:18FromGitter<Varriount> https://msdn.microsoft.com/en-us/library/aa380536(v=vs.85).aspx
13:28:35dom96It's not a case of just Nimble
13:28:39dom96It would be for all apps using SSL
13:28:55dom96As long as it's secure and it works then sure.
13:30:04FromGitter<Varriount> @dom96 Well, it's used by IE, and various components of the Windows OS (Store, etc). Plus, I assume it's used by C#'s standard library too.
13:38:32*Ven joined #nim
13:42:58*Ven quit (Ping timeout: 252 seconds)
14:53:03*nsf quit (Quit: WeeChat 1.6)
14:54:46*dddddd joined #nim
15:14:41subsetparkCan I ask for a bit of help with ref objects? I still don't really grok them
15:31:33*Arrrr quit (Ping timeout: 258 seconds)
15:49:02*nsf joined #nim
16:01:48*confundus joined #nim
16:09:21*confundus quit (Quit: leaving)
16:12:11*confundus joined #nim
16:19:53vlad1777dsubsetpark, you can ask, when somebody, who knows answer will be here - he would answer
16:20:39*confundus quit (Quit: leaving)
16:28:32*Varriount|Mobile joined #nim
16:29:08Varriount|Mobilesubsetpark: What's your question?
16:34:37federico3dom96: deprecated/abandoned pkgs could be removed from packages.json but this would lead to the leftpad security issue. How about adding a "deprecated" tag that makes nimble ignore the package (unless --deprecated is passed)?
16:40:21subsetparkVarriount|Mobile: I still stumble on instantiating and accessing ref objs. One of my types is the Ui object, which has a host: ref Host. Host is a ref to HostObj, which is an object. I have a newHost proc that instantiates a Host with `var h = Host(...)`, then calls new(h), and returns h. It compiles, but if I instantiate a Ui object with the result of
16:40:21subsetparknewHost(), any attempts to access a field on ui.host result in a storage access error.
16:41:02Varriount|Mobilesubsetpark: could you post a link to your code?
16:41:03dom96federico3: create an issue
16:42:26subsetparkhttps://www.irccloud.com/pastebin/nr3WBA5a/
16:43:16subsetparkVarriount|Mobile: ^
16:44:22subsetparkThis code worked as expected when both Host and Ui were value objects, btw
16:44:39Varriount|Mobilesubsetpark: the 'h = Host(...)' syntax implicitly calls new()
16:45:24subsetparkoh damn, is that all? Wow! I wonder how many times this has not worked for me because I called new() when I didn't have to
16:45:25federico3dom96: #300
16:45:34Varriount|MobileSo when you call new(h) again, a new blank HostObj-sized chick of memory is allocated
16:45:43Varriount|Mobile*chunk
16:45:56Varriount|MobileThat's the most immediately obvious error
16:46:25federico3anyone using gamelib ?
16:46:26Varriount|Mobile(And not really something the compiler can catch either)
16:46:33subsetparkVarriount|Mobile: yes, removing that call to new() makes it work perfectly
16:47:38subsetparkBut I think my understanding of new() is imperfect... let's say I wanted to keep in the unnecessary new() call, what would I have to do after that to make it work? Assign the object attributes one by one?
16:48:37Varriount|Mobilesubsetpark: Also, if you plan on optimizing, keep in mind that string and sequence types, despite being reference types internally, are copy-on-assignment, like object types
16:49:55Varriount|Mobilesubsetpark: See this post for an explanation: http://forum.nim-lang.org/t/2665#16502
16:50:36subsetparkHm, I see. I think I'll really need to study that
16:50:52subsetparkDo you think that the way I have it going now is broken, or just unoptimized?
16:51:32Varriount|MobileI couldn't tell
16:52:06Varriount|Mobilesubsetpark: I just tell people about this fact whenever I see them using strings, as it tends to be unexpected
16:53:15subsetparkHa, got it. Thanks so much for the help
16:53:26Varriount|MobileIt really only becomes a problem in benchmarks, or in loops handling lots of string data
16:54:03subsetparkI'm still really wrapping my head around the behavior of reference and value types - nim is my first language that asks me to manage the distinction myself
16:54:05Varriount|Mobilesubsetpark: How do you feel about Nim so far? Your code looks pretty well-written.
16:55:51subsetparkI'm really happy with it. It's so expressive, sometimes it feels a little like cheating.
16:56:10Varriount|Mobilesubsetpark: You can usually get by with just using reference types everywhere.
16:56:19subsetparkRight now I feel like sometime I am too Pythonic - not paying attention to reference and value types, and just using the default
16:56:23subsetparkAt the expense of memory awfulness
16:56:34subsetparkSo I am looking forward to getting an intuition on that
16:56:48subsetparkI wouldn't mind richer documentation around ref and value types.
16:57:24Varriount|MobileHm. It's a hard distinction to make in a small amount of words.
16:58:53*synshroud quit (Quit: ZNC 1.6.4 - http://znc.in)
16:59:28Varriount|Mobilesubsetpark: You might try reading up on C pointers versus structs, although I don't want to scare you off.
17:01:12*nsf quit (Quit: WeeChat 1.6)
17:01:27*synshroud joined #nim
17:02:56subsetparkYeah I'm familiar with the conceptual distinction - I just don't have a good grasp of the different use cases
17:03:41subsetparkFor instance, I only decided to make host a ref in the above code because of a misreading of an error about mutating a var-less parameter
17:04:29subsetparkSo without that I wouldn't have any references aside from the ones provided by table etc simply because I couldn't really argue for when to use one
17:07:54subsetparkMaybe that's because this assumes a c background where everything is handled with pointers whereas I come from a background where value handling is preferred for immutability
17:08:32Varriount|Mobilesubsetpark: What background is that?
17:11:38subsetparkErlang/clojure (mostly erlang though hickeys talks have been influential)
17:11:44Varriount|MobileWell, from a performance perspective, you might choose to use a reference to a sequence of object types, rather than a sequence of reference types, in order to improve performance (processor cache locality).
17:20:30*kunev quit (Quit: е те!)
17:24:49*space-wizard joined #nim
17:24:58*Ven joined #nim
17:25:00*kunev joined #nim
17:26:05*def-pri-pub joined #nim
17:26:48Varriount|Mobilesubsetpark: Additionally, the only true immutability you get in Nim is with object variables assigned to using "let", or constants
17:27:58Varriount|MobileEven reference variables assigned to using "let" can still have their attributes/members modified
17:29:51*Ven quit (Ping timeout: 268 seconds)
17:30:36Varriount|MobileAlthough, one could always use a term rewriting macro to implement immutability on that level too...
17:37:23subsetparkThen I guess why use value types?
17:38:23*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:39:37*space-wizard joined #nim
17:39:56*space-wizard quit (Client Quit)
17:40:27*space-wizard joined #nim
17:40:44*space-wizard quit (Client Quit)
17:41:13*space-wizard joined #nim
17:41:32*space-wizard quit (Client Quit)
17:42:04*space-wizard joined #nim
17:42:20*space-wizard quit (Client Quit)
17:42:48*space-wizard joined #nim
17:43:08*space-wizard quit (Client Quit)
17:43:35*space-wizard joined #nim
17:43:56*space-wizard quit (Client Quit)
17:44:25*space-wizard joined #nim
17:44:44*space-wizard quit (Client Quit)
17:45:13*space-wizard joined #nim
17:45:32*space-wizard quit (Client Quit)
17:46:03*space-wizard joined #nim
17:46:20*space-wizard quit (Client Quit)
17:46:48*space-wizard joined #nim
17:47:08*space-wizard quit (Client Quit)
17:47:38*space-wizard joined #nim
17:47:56*space-wizard quit (Client Quit)
17:52:43subsetparkOr is it just for situations above - the seq of objects
17:52:49*rokups quit (Ping timeout: 260 seconds)
17:52:58*odc quit (Ping timeout: 245 seconds)
17:55:58*odc joined #nim
17:56:42*rokups joined #nim
17:58:32*yglukhov quit (Remote host closed the connection)
18:12:00*rokups quit (Quit: Connection closed for inactivity)
18:23:55subsetparkI guess the same logic would apply to objects themselves - for instance, using value tables if they are to be attributes of an object, since you can refer to the object by reference. Essentially using values for everything below the thing being returned and assigned
18:27:54*yglukhov joined #nim
18:30:51*beaumonta joined #nim
18:32:08*abeaumont quit (Ping timeout: 268 seconds)
19:10:07*nsf joined #nim
19:21:09*Matthias247 joined #nim
19:28:53*Salewski joined #nim
19:30:00SalewskiIn Ruby we have: (1..6).to_a.shuffle # gives => [2, 4, 6, 1, 3, 5]
19:30:40SalewskiCan not remember how to convert a range to an Array. I think there was a way.
19:31:57Salewskishuffle is at Rosetta Code, so I assume there is no in Nim std lib?
19:33:57def-pri-pubquit
19:33:59*def-pri-pub quit (Quit: leaving)
19:40:29AraqSalewski: toSeq(1..10)
19:40:51Amun_RaI get remote address string from acceptAddr, how can I get remote port number?
19:42:08AraqI think 'shuffle' should become part of random.nim
19:42:20Araqsince it's tied to the random number generator
19:42:59SalewskiAraq, that was my first idea, it was marked as undefined in my NEd editor by nimsuggest. And I did not found it in docs. It is secret?
19:43:17Araqno, it doesn't exist :-) PR please
19:44:34SalewskiOK, bye...
19:44:38*Salewski left #nim (#nim)
19:45:41*Ven joined #nim
19:49:20*yglukhov quit (Remote host closed the connection)
19:50:48*Ven quit (Ping timeout: 246 seconds)
19:52:20Amun_Rafound it, getSockName
19:57:59*yglukhov joined #nim
19:58:30*reactormonk joined #nim
20:01:37*bjz joined #nim
20:02:33*yglukhov quit (Ping timeout: 260 seconds)
20:08:11*vasher_ quit (Quit: Connection closed for inactivity)
20:25:42*Varriount|Mobile quit (Read error: Connection reset by peer)
20:26:10*vasher_ joined #nim
21:00:56*Ven joined #nim
21:06:44*subsetpark quit (Quit: Connection closed for inactivity)
21:09:25*byte512 quit (Ping timeout: 248 seconds)
21:15:38*Ven quit (Ping timeout: 264 seconds)
21:18:04*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:21:04*Ven joined #nim
21:23:08FromGitter<rivasiv> hi
21:28:49*Ven quit (Ping timeout: 258 seconds)
21:31:25*subsetpark joined #nim
21:35:29*Ven joined #nim
21:35:59FromGitter<rivasiv> I have "packed" structure (with gnu *attribute(packed)*) in the header and would like to use or translate it in nim.. the question is I may "redeclare" that structure in nim file and add .packed. pragma or may import it from c header using something like {importc: "somestruct", packed, final } .. Which will be more correct?
21:36:23FromGitter<rivasiv> or rather which will be more preferable?
21:37:42*space-wizard joined #nim
21:45:21*bjz joined #nim
21:49:16Araqrivasiv: .header won't work with the native LLVM based compiler
21:51:19FromGitter<rivasiv> @Araq It looks header isn't nim pragma - I mean that I have c header that I need to wrap to create nim wrapper
21:51:36FromGitter<rivasiv> and there is packed structure
21:52:01FromGitter<rivasiv> I want to understand which method will be more correct
21:52:20FromGitter<rivasiv> and more usable from nim perspective
21:53:58FromGitter<rivasiv> like I donot have clear understanding at the point If I'll make it as direct import with {importc: "somestruct", packed} how I can access struct members ?
21:54:00FromGitter<rivasiv> in nim code
21:54:47Araquse .packed and not importc
21:55:26Araqand .header is a Nim pragma, albeit an "implementation specific" one
21:55:27FromGitter<rivasiv> @Araq Thanks
21:56:25FromGitter<rivasiv> @Araq Yes I understood that I have read documentation and remember that remark.
21:59:51*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:00:10*yglukhov joined #nim
22:04:38*yglukhov quit (Ping timeout: 245 seconds)
22:09:11*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:23:23*Vladar quit (Remote host closed the connection)
22:36:24*Trustable quit (Remote host closed the connection)
22:46:34*nsf quit (Quit: WeeChat 1.6)
22:48:24*cheatfate joined #nim
22:51:01*cheatfate quit (Client Quit)
22:51:21*cheatfate joined #nim
22:51:32*aedigix quit (Quit: disconnecting)
22:58:46*aedigix joined #nim
23:02:49*yglukhov joined #nim
23:10:20*vlad1777d quit (Quit: Leaving)
23:21:59*def-- joined #nim
23:22:41*vlad1777d joined #nim
23:34:18*yglukhov quit (Ping timeout: 268 seconds)
23:47:53*ftsf joined #nim
23:48:11*vasher_ quit (Quit: Connection closed for inactivity)
23:56:02*ftsf quit (Ping timeout: 258 seconds)
23:59:57*jinshil joined #nim