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:45 | Arrrr | Is 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:00 | Araq | yes. but I still need to structure my plans. |
10:14:38 | Araq | wanted to write a forum post about new developments but I figured it's a mess :-) |
10:16:01 | Arrrr | Is 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:29 | FromGitter | <Varriount> @dom96 What are your thoughts on having Nimble use the builtin SSL API's on Windows? |
13:16:57 | FromGitter | <Varriount> Not that such a prospect would be simple. The Windows documentation for SChannel is somewhat complex. |
13:24:18 | FromGitter | <Varriount> https://msdn.microsoft.com/en-us/library/aa380536(v=vs.85).aspx |
13:28:35 | dom96 | It's not a case of just Nimble |
13:28:39 | dom96 | It would be for all apps using SSL |
13:28:55 | dom96 | As long as it's secure and it works then sure. |
13:30:04 | FromGitter | <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:41 | subsetpark | Can 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:53 | vlad1777d | subsetpark, 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:08 | Varriount|Mobile | subsetpark: What's your question? |
16:34:37 | federico3 | dom96: 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:21 | subsetpark | Varriount|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:21 | subsetpark | newHost(), any attempts to access a field on ui.host result in a storage access error. |
16:41:02 | Varriount|Mobile | subsetpark: could you post a link to your code? |
16:41:03 | dom96 | federico3: create an issue |
16:42:26 | subsetpark | https://www.irccloud.com/pastebin/nr3WBA5a/ |
16:43:16 | subsetpark | Varriount|Mobile: ^ |
16:44:22 | subsetpark | This code worked as expected when both Host and Ui were value objects, btw |
16:44:39 | Varriount|Mobile | subsetpark: the 'h = Host(...)' syntax implicitly calls new() |
16:45:24 | subsetpark | oh 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:25 | federico3 | dom96: #300 |
16:45:34 | Varriount|Mobile | So when you call new(h) again, a new blank HostObj-sized chick of memory is allocated |
16:45:43 | Varriount|Mobile | *chunk |
16:45:56 | Varriount|Mobile | That's the most immediately obvious error |
16:46:25 | federico3 | anyone using gamelib ? |
16:46:26 | Varriount|Mobile | (And not really something the compiler can catch either) |
16:46:33 | subsetpark | Varriount|Mobile: yes, removing that call to new() makes it work perfectly |
16:47:38 | subsetpark | But 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:37 | Varriount|Mobile | subsetpark: 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:55 | Varriount|Mobile | subsetpark: See this post for an explanation: http://forum.nim-lang.org/t/2665#16502 |
16:50:36 | subsetpark | Hm, I see. I think I'll really need to study that |
16:50:52 | subsetpark | Do you think that the way I have it going now is broken, or just unoptimized? |
16:51:32 | Varriount|Mobile | I couldn't tell |
16:52:06 | Varriount|Mobile | subsetpark: I just tell people about this fact whenever I see them using strings, as it tends to be unexpected |
16:53:15 | subsetpark | Ha, got it. Thanks so much for the help |
16:53:26 | Varriount|Mobile | It really only becomes a problem in benchmarks, or in loops handling lots of string data |
16:54:03 | subsetpark | I'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:05 | Varriount|Mobile | subsetpark: How do you feel about Nim so far? Your code looks pretty well-written. |
16:55:51 | subsetpark | I'm really happy with it. It's so expressive, sometimes it feels a little like cheating. |
16:56:10 | Varriount|Mobile | subsetpark: You can usually get by with just using reference types everywhere. |
16:56:19 | subsetpark | Right now I feel like sometime I am too Pythonic - not paying attention to reference and value types, and just using the default |
16:56:23 | subsetpark | At the expense of memory awfulness |
16:56:34 | subsetpark | So I am looking forward to getting an intuition on that |
16:56:48 | subsetpark | I wouldn't mind richer documentation around ref and value types. |
16:57:24 | Varriount|Mobile | Hm. 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:28 | Varriount|Mobile | subsetpark: 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:56 | subsetpark | Yeah I'm familiar with the conceptual distinction - I just don't have a good grasp of the different use cases |
17:03:41 | subsetpark | For 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:29 | subsetpark | So 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:54 | subsetpark | Maybe 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:32 | Varriount|Mobile | subsetpark: What background is that? |
17:11:38 | subsetpark | Erlang/clojure (mostly erlang though hickeys talks have been influential) |
17:11:44 | Varriount|Mobile | Well, 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:48 | Varriount|Mobile | subsetpark: Additionally, the only true immutability you get in Nim is with object variables assigned to using "let", or constants |
17:27:58 | Varriount|Mobile | Even reference variables assigned to using "let" can still have their attributes/members modified |
17:29:51 | * | Ven quit (Ping timeout: 268 seconds) |
17:30:36 | Varriount|Mobile | Although, one could always use a term rewriting macro to implement immutability on that level too... |
17:37:23 | subsetpark | Then 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:43 | subsetpark | Or 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:55 | subsetpark | I 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:00 | Salewski | In Ruby we have: (1..6).to_a.shuffle # gives => [2, 4, 6, 1, 3, 5] |
19:30:40 | Salewski | Can not remember how to convert a range to an Array. I think there was a way. |
19:31:57 | Salewski | shuffle is at Rosetta Code, so I assume there is no in Nim std lib? |
19:33:57 | def-pri-pub | quit |
19:33:59 | * | def-pri-pub quit (Quit: leaving) |
19:40:29 | Araq | Salewski: toSeq(1..10) |
19:40:51 | Amun_Ra | I get remote address string from acceptAddr, how can I get remote port number? |
19:42:08 | Araq | I think 'shuffle' should become part of random.nim |
19:42:20 | Araq | since it's tied to the random number generator |
19:42:59 | Salewski | Araq, 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:17 | Araq | no, it doesn't exist :-) PR please |
19:44:34 | Salewski | OK, 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:20 | Amun_Ra | found 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:08 | FromGitter | <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:59 | FromGitter | <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:23 | FromGitter | <rivasiv> or rather which will be more preferable? |
21:37:42 | * | space-wizard joined #nim |
21:45:21 | * | bjz joined #nim |
21:49:16 | Araq | rivasiv: .header won't work with the native LLVM based compiler |
21:51:19 | FromGitter | <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:36 | FromGitter | <rivasiv> and there is packed structure |
21:52:01 | FromGitter | <rivasiv> I want to understand which method will be more correct |
21:52:20 | FromGitter | <rivasiv> and more usable from nim perspective |
21:53:58 | FromGitter | <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:00 | FromGitter | <rivasiv> in nim code |
21:54:47 | Araq | use .packed and not importc |
21:55:26 | Araq | and .header is a Nim pragma, albeit an "implementation specific" one |
21:55:27 | FromGitter | <rivasiv> @Araq Thanks |
21:56:25 | FromGitter | <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 |