00:00:14 | * | Trustable quit (Ping timeout: 276 seconds) |
00:02:03 | * | junw joined #nim |
00:04:28 | * | junw quit (Remote host closed the connection) |
00:08:20 | * | saml_ joined #nim |
00:11:15 | * | jaco60 quit (Ping timeout: 240 seconds) |
00:17:18 | pwernersbach | dom96: Let me know if you need a manufacturer, I work for a book manufacturing company, and we use Nim |
00:18:05 | pwernersbach | Araq_: How so? |
00:19:26 | * | pwernersbach quit (Quit: Page closed) |
00:21:46 | * | LibreWulf quit (Quit: WeeChat 1.4-dev) |
00:24:11 | * | enquora quit (Quit: enquora) |
00:41:36 | * | vendethiel quit (Ping timeout: 256 seconds) |
00:44:44 | * | vendethiel joined #nim |
00:47:51 | * | Demon_Fox joined #nim |
00:56:12 | * | lompik joined #nim |
01:02:07 | * | yglukhov_ joined #nim |
01:02:07 | * | yglukhov quit (Read error: Connection reset by peer) |
01:05:26 | * | yglukhov_ quit (Read error: Connection reset by peer) |
01:05:27 | * | yglukhov joined #nim |
01:08:32 | * | yglukhov quit (Read error: Connection reset by peer) |
01:08:47 | * | yglukhov joined #nim |
01:10:59 | * | yglukhov quit (Read error: Connection reset by peer) |
01:21:25 | * | gokr quit (Quit: Leaving.) |
01:26:15 | * | vendethiel quit (Ping timeout: 240 seconds) |
01:26:45 | * | ephja quit (Ping timeout: 245 seconds) |
01:30:25 | * | vendethiel joined #nim |
01:37:59 | * | yglukhov joined #nim |
01:42:16 | * | yglukhov quit (Ping timeout: 240 seconds) |
02:15:30 | * | vendethiel quit (Ping timeout: 245 seconds) |
02:26:22 | * | vendethiel joined #nim |
02:44:02 | * | pwernersbach joined #nim |
02:46:50 | * | vendethiel quit (Ping timeout: 256 seconds) |
02:59:37 | * | brson quit (Quit: leaving) |
03:05:07 | * | saml_ quit (Remote host closed the connection) |
03:15:27 | * | vendethiel joined #nim |
03:35:52 | * | desophos joined #nim |
03:36:58 | * | vendethiel quit (Ping timeout: 265 seconds) |
03:39:35 | * | vendethiel joined #nim |
03:53:35 | * | lompik quit (Ping timeout: 264 seconds) |
04:01:26 | * | vendethiel quit (Ping timeout: 250 seconds) |
04:03:52 | * | vendethiel joined #nim |
04:26:43 | * | vendethiel quit (Ping timeout: 276 seconds) |
04:27:28 | * | vendethiel joined #nim |
04:49:06 | * | vendethiel quit (Ping timeout: 250 seconds) |
05:18:50 | * | vendethiel joined #nim |
05:41:08 | * | vendethiel quit (Ping timeout: 272 seconds) |
05:50:47 | * | vendethiel joined #nim |
05:50:57 | * | pwernersbach quit (Ping timeout: 252 seconds) |
06:12:36 | * | vendethiel quit (Ping timeout: 265 seconds) |
06:16:57 | * | mountaingoat quit (Ping timeout: 265 seconds) |
06:18:43 | * | yglukhov joined #nim |
06:22:38 | * | darkf joined #nim |
06:23:00 | * | yglukhov quit (Ping timeout: 245 seconds) |
06:23:37 | * | vendethiel joined #nim |
06:30:30 | * | mountaingoat joined #nim |
06:44:59 | * | vendethiel quit (Ping timeout: 265 seconds) |
06:48:09 | * | deavmi_mobile joined #nim |
06:48:23 | deavmi_mobile | variables in nim are not objects like in Python right? |
06:48:37 | deavmi_mobile | are they like variables in C like as in being primitive |
06:49:52 | * | vendethiel joined #nim |
06:54:20 | * | yglukhov joined #nim |
06:58:36 | * | yglukhov quit (Ping timeout: 250 seconds) |
07:19:28 | reactormonk | deavmi_mobile, the term you're looking for is "value objects", and "references". In nim, it's explicit. Anything without ref/ptr is a value object. |
07:20:03 | deavmi_mobile | so are they value objects then? |
07:20:09 | deavmi_mobile | or pointers to value objects? |
07:21:09 | * | rinukkusu_ joined #nim |
07:21:18 | * | rinukkusu quit (Ping timeout: 240 seconds) |
07:23:26 | reactormonk | they're references/pointers (references are tracked by the GC) if you tell the compiler they are. |
07:24:06 | deavmi_mobile | what I don't understand is how they duffer from C in layman's terms |
07:24:10 | deavmi_mobile | * differ |
07:24:31 | deavmi_mobile | Like are they objects as in can I do x.somethingMethod |
07:24:32 | deavmi_mobile | ? |
07:24:46 | deavmi_mobile | or are they simple variables like C or atleadt similar to C |
07:28:34 | ldlework | deavmi_mobile: I think I can help |
07:28:56 | ldlework | deavmi_mobile: where in Python everything is an "object" or rather a reference to an object |
07:29:03 | ldlework | deavmi_mobile: in Nim, everything is a value |
07:29:21 | ldlework | deavmi_mobile: in Nim, you have normal values like integers and floats and so on |
07:29:36 | ldlework | deavmi_mobile: and then you have "references" which are much like pointers |
07:29:54 | ldlework | and pointers afterall are just values, the value being a number representing a memory address |
07:30:24 | ldlework | when you pass a reference, you pass a copy of the value that contains the numerical memory address |
07:30:27 | deavmi_mobile | oh okay |
07:30:29 | deavmi_mobile | I see |
07:31:00 | deavmi_mobile | thanks dude. So similar to C. I understand how pointers are values as they hold a number pointing to a ram address |
07:31:18 | ldlework | deavmi_mobile: Nim will let you do things like access member fields of a referred objected with '.' without having to dereference the reference first. |
07:31:24 | ldlework | So that's unlike C |
07:31:43 | ldlework | IE, Nim will help you treat garbage collected references a lot like normal values that magically don't get copied all over the place |
07:31:46 | * | gokr joined #nim |
07:32:27 | ldlework | deavmi_mobile: you will often see a "raw type" and a "ref type" defined for every object type |
07:32:29 | ldlework | like |
07:32:31 | ldlework | type |
07:32:38 | ldlework | PointObj = object |
07:32:42 | ldlework | x, y: int |
07:32:49 | ldlework | Point = ref PointObb |
07:33:07 | ldlework | Now, you can use PointObj when you want a raw structure value which will be copied as you pass it around |
07:33:11 | * | vendethiel quit (Ping timeout: 264 seconds) |
07:33:28 | deavmi_mobile | referred objected? |
07:33:29 | ldlework | Or you can use a Point to get a reference to a PointObj, so as you pass around the Point, the PointObj isn't being copied. |
07:33:32 | ldlework | referred object |
07:33:38 | ldlework | the object the pointer points at |
07:33:48 | ldlework | (sorry I'm typing a bit too fast) |
07:33:49 | deavmi_mobile | object as in OOP |
07:33:50 | deavmi_mobile | ? |
07:33:53 | ldlework | structure |
07:34:02 | deavmi_mobile | structure? like a C struct |
07:34:10 | ldlework | an object is just data + functions which work on that data |
07:34:11 | ldlework | yes |
07:34:25 | ldlework | above, PointObj is a struct type |
07:34:36 | ldlework | when you create it, a memory space the size of two ints is created |
07:34:44 | ldlework | every type you pass it to a function, those two ints are copied |
07:34:53 | ldlework | if that function passes it to another function its copied again and again |
07:35:10 | ldlework | however, if you create a Point, it creates a memory space the size of two ints on the heap, + one pointer on the stack |
07:35:27 | ldlework | if you pass the Point, you pass the pointer value, which refers to the point on the heap where the two ints are stored |
07:35:40 | ldlework | for a really big object, it might be worth it to work with references rather than values |
07:36:05 | ldlework | every time you pass it* |
07:36:45 | ldlework | deavmi_mobile: make sense? |
07:37:19 | gokr | dom96: Super man! |
07:37:57 | gokr | deavmi_mobile: I have written a whole series on OOP in Nim (although I missed your original question) |
07:38:22 | deavmi_mobile | I still feel deeply confused |
07:38:33 | deavmi_mobile | is there a page on the wiki that describes this about the whole Nim var system? |
07:39:21 | gokr | What is the subject here? objects? |
07:39:29 | ldlework | gokr: reference and value |
07:39:36 | gokr | Right. |
07:39:38 | ldlework | deavmi_mobile: var and let are different concern to reference and value |
07:39:57 | ldlework | var and let relate to mutability |
07:40:03 | reactormonk | deavmi_mobile, var/let is mutable/immutable object - from what I understand, they are supposed to be replaced by effects some time in the future |
07:40:28 | ldlework | deavmi_mobile: are you familiar with the stack and heap? |
07:40:45 | ldlework | conceptually |
07:41:01 | gokr | So ... types are "value types" in Nim. If you declare a variable of a specific type - it will *be* the memory for that type, and not a pointer to the memory for the type. |
07:41:18 | gokr | To get a "pointer" you need a ref of that type. |
07:42:19 | * | vendethiel joined #nim |
07:42:35 | gokr | I talk about this a bit in this article under "Ref and ptr": http://goran.krampe.se/2014/10/29/nim-and-oo/ |
07:42:57 | ldlework | It helps if you understand the purpose of the stack and heap, really. |
07:43:09 | ldlework | If you don't, we'll only be talking in vague metaphors. |
07:43:49 | ldlework | Though you only really need a passing conceptualization of their purposes and differences to then understand reference and value. |
07:43:59 | ldlework | So if you don't understand them, we can probably elucidate. |
07:44:04 | gokr | I think I touch upon that in that section, although a tad briefly. |
07:44:08 | deavmi_mobile | I remember something about stack and heap |
07:44:17 | deavmi_mobile | like the definition that's all I guess |
07:44:25 | gokr | deavmi_mobile: Can you read that section and then tell us if you understand it? |
07:45:36 | ldlework | deavmi_mobile: really simply, the stack is a fast memory structure for passing temporary data between function calls. The heap is a larger memory structure for storing long term memory. |
07:46:03 | ldlework | When you pass a value to a function, that value is passed on the stack. |
07:46:22 | ldlework | So the concern is that we don't want to pass huuuuuuuuuge values on the stack. |
07:46:52 | ldlework | It would be more efficient if we could put the huge structure on the heap, and instead pass around references to the data on the heap. |
07:47:11 | ldlework | That's what pointers are for. They are small values we can pass between functions, quickly on the stack. |
07:47:27 | ldlework | In our functions, we can then use the pointers to get at the data in large structures on the heap. |
07:48:07 | gokr | ldlework: Btw, how is Nim vs Go going at Docker? :) |
07:48:24 | ldlework | Go is king. Nim isn't even on anyone's radar. |
07:48:24 | gokr | Are the rest of the company still in love with Go or? |
07:48:52 | * | deavmi_mobile quit (Ping timeout: 250 seconds) |
07:48:56 | ldlework | ... |
07:49:10 | gokr | I was thinking that I need to learn Go, but... it just feels so boring. However it does have some things I would like to understand better. |
07:49:22 | ldlework | Its horrible. |
07:49:58 | gokr | Wonder why everyone loves it. |
07:50:13 | ldlework | Because the vast majority of programmers are boring |
07:50:52 | ldlework | Go is a tiny language with a toy type-system and a culture of "just write it out". Its field leveler. |
07:51:18 | ldlework | You can hire lots of average programmers to maintain lots of boring Go code and for business that's great. |
07:52:00 | * | Demon_Fox quit (Quit: Leaving) |
07:52:14 | filwit | honestly if Go had generics & operators it would probably be pretty good |
07:52:43 | ldlework | Sure, I'd agree with that statement. |
07:53:17 | filwit | simple can be a good thing.. very easy to learn, no weird syntax in places, people stay on track.. but Go lacks some basic things which make software structure hard without. |
07:53:31 | ldlework | Yes I agree with that 100% |
07:53:42 | ldlework | Simple is great. Go went too far below the threshold where that's helpful. |
07:53:51 | ldlework | To the point where, you simply can't express things naturally. |
07:53:51 | filwit | yeah |
07:54:55 | ldlework | You end up being told to learn the "Go way" which is literally "just duplicate effort everywhere" or "use interface{} and sacrifice type safety and question why you're using this shitty language in the first place then" |
07:55:27 | filwit | lol |
07:56:20 | gokr | I guess Go also has good performance and GC these days. |
07:56:27 | gokr | It seems so at least. |
07:57:16 | ldlework | well it better |
08:05:47 | * | vendethiel quit (Ping timeout: 276 seconds) |
08:08:11 | * | vendethiel joined #nim |
08:11:47 | * | Ven joined #nim |
08:23:07 | * | filwit quit (Quit: Leaving) |
08:31:02 | * | deavmi_mobile joined #nim |
08:31:20 | * | vendethiel quit (Ping timeout: 245 seconds) |
08:32:14 | * | yglukhov joined #nim |
08:34:15 | * | deavmi_mobile2 joined #nim |
08:34:52 | * | vendethiel joined #nim |
08:35:40 | * | deavmi_mobile quit (Ping timeout: 265 seconds) |
08:54:15 | * | Trustable joined #nim |
08:55:10 | * | Trustable quit (Client Quit) |
08:55:15 | * | vendethiel quit (Ping timeout: 240 seconds) |
08:56:28 | * | Trustable joined #nim |
09:00:06 | * | vendethiel joined #nim |
09:08:28 | * | Salewski joined #nim |
09:10:15 | Salewski | const A = [1,2]; const B = [2,3]; const C = A + B # something in this way possible? I have to do "for x in C" iteration |
09:16:31 | Araq_ | overload + for arrays |
09:16:56 | * | deavmi_mobile2 quit (Read error: Connection reset by peer) |
09:16:57 | * | deavmi_mobile joined #nim |
09:18:19 | Salewski | Araq: I really want it for consts. For var I know this: http://rosettacode.org/wiki/Array_concatenation#Nim |
09:20:40 | * | vendethiel quit (Ping timeout: 256 seconds) |
09:20:53 | * | Arrrr joined #nim |
09:22:44 | Salewski | Araq: one more question: For Ruby we have the splash operator *, so var a = [1,2]; myproc(*a) is the same as myproc(1,2). And var x, y: int ; x, y = *a # works when a = [1,2] # Have used that much. And in Nim? |
09:27:40 | gokr | Salewski: I noted ES6 introduce this too - "...x" will "spread" it. They call it the spread operator. |
09:29:12 | * | coffeepot joined #nim |
09:29:41 | Salewski | Bye... |
09:29:45 | * | Salewski quit () |
09:31:40 | Araq_ | there is no such thing but you can write a macro ... |
09:41:24 | * | deavmi_mobile quit (Ping timeout: 265 seconds) |
09:44:23 | * | deavmi_mobile joined #nim |
09:49:34 | * | vendethiel joined #nim |
09:50:05 | * | brde joined #nim |
09:55:28 | deavmi_mobile | I didn't understand the link sent |
10:03:10 | brde | not sure that this is the place to ask, but how to I get IUP to display the widgets in a different style (not motif)? |
10:12:12 | * | vendethiel quit (Ping timeout: 272 seconds) |
10:12:12 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
10:12:12 | * | deavmi_mobile2 joined #nim |
10:17:04 | * | deavmi_mobile2 quit (Ping timeout: 276 seconds) |
10:17:48 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
10:19:47 | * | deavmi_mobile joined #nim |
10:25:09 | * | Salewski joined #nim |
10:26:48 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
10:27:01 | * | deavmi_mobile joined #nim |
10:27:02 | Salewski | Araq: OK, maybe I can write that macro when I have read Dominiks book :-) |
10:27:07 | * | Salewski quit (Client Quit) |
10:27:35 | * | desophos quit (Read error: Connection reset by peer) |
10:31:37 | * | coffeepot joined #nim |
10:34:13 | * | coffeepot quit (Client Quit) |
10:40:53 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:40:57 | gokr | deavmi_mobile: You mean you didn't understand the section on "Ref and ptr"? |
10:42:01 | vegansk | Araq, are there any problems with calling nim library from multithreaded c++ application? I get an access violation in release configuration, but it works ok in debug. Maybe I need to call some initialization routines on every thread start? |
10:43:30 | * | vendethiel joined #nim |
10:43:44 | Araq_ | vegansk: setupForeignThreadGc() |
10:43:55 | * | coffeepot joined #nim |
10:45:49 | * | RG92 joined #nim |
10:50:25 | vegansk | Thanks! |
10:55:42 | deavmi_mobile | ref and ptr |
10:55:48 | deavmi_mobile | a ptr is a pointer right |
10:56:04 | deavmi_mobile | a ref is when you use a variable is it not? "referencing the variable" |
11:00:21 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
11:00:55 | * | deavmi_mobile2 joined #nim |
11:00:57 | * | deavmi_mobile2 quit (Read error: Connection reset by peer) |
11:01:45 | * | deavmi_mobile2 joined #nim |
11:01:57 | coffeepot | a ref is a garbage collected pointer |
11:02:32 | coffeepot | http://nim-lang.org/docs/manual.html#types-reference-and-pointer-types |
11:03:55 | * | vendethiel quit (Ping timeout: 240 seconds) |
11:05:22 | * | vendethiel joined #nim |
11:05:46 | * | deavmi_mobile2 quit (Ping timeout: 240 seconds) |
11:17:59 | * | deavmi_mobile joined #nim |
11:19:24 | * | deavmi_mobile2 joined #nim |
11:20:06 | deavmi_mobile2 | olau |
11:20:09 | deavmi_mobile2 | * Okay |
11:20:15 | deavmi_mobile2 | let me ask a question like so: |
11:20:37 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
11:20:54 | deavmi_mobile2 | Are variables like int and string objects as in that you can store attributes and methods in em? |
11:21:49 | dom96 | deavmi_mobile2: they are not objects, but you can define procedures that work on them |
11:22:23 | * | deavmi_mobile quit (Ping timeout: 264 seconds) |
11:24:04 | Arrrr | What do you mean with 'store attribues and methods in them' ? |
11:32:05 | * | deavmi_mobile2 quit (Read error: Connection reset by peer) |
11:32:28 | * | deavmi_mobile joined #nim |
11:33:58 | deavmi_mobile | oh omay |
11:34:00 | deavmi_mobile | * okay |
11:34:10 | deavmi_mobile | then what about doing something like var.something |
11:34:24 | deavmi_mobile | or would that be more of a class attribute or structure of some sorts |
11:36:57 | * | coffeepot joined #nim |
11:37:58 | * | Ven joined #nim |
11:38:26 | * | ephja joined #nim |
11:47:38 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
11:47:56 | * | deavmi_mobile joined #nim |
11:47:57 | * | gokr quit (Quit: Leaving.) |
11:52:35 | * | def- quit (Ping timeout: 245 seconds) |
11:52:56 | dom96 | deavmi_mobile: you can define a custom object with fields |
11:53:06 | dom96 | deavmi_mobile: I'm not quite sure what you mean |
11:54:10 | * | def- joined #nim |
11:54:38 | coffeepot | deavmi_mobile: do you mean like defining procs that work on things like built ins? |
11:55:59 | coffeepot | if you do, Nim uses unified function call syntax, which means that, say you have a proc like proc myProc(s: string), you can type s.myProc to call it |
11:56:51 | coffeepot | this means you don't actually need to worry about class heirachies, friend functions or custom types quite often, as you can just define a proc that takes whatever type and use it as if it were a method of the type |
11:57:59 | coffeepot | as for storing attributes or values, you'll still need an object type for something like that |
12:06:57 | * | arnetheduck joined #nim |
12:08:20 | * | arnetheduck quit (Client Quit) |
12:10:56 | * | vendethiel quit (Ping timeout: 240 seconds) |
12:11:34 | * | zaquest joined #nim |
12:14:13 | * | BitPuffin joined #nim |
12:16:18 | * | vendethiel joined #nim |
12:17:47 | Arrrr | ie: myProc(123) == 123.myProc |
12:18:11 | Arrrr | == 123.myProc() == myProc 123 |
12:18:31 | * | darkf_ joined #nim |
12:19:44 | * | darkf quit (Ping timeout: 256 seconds) |
12:41:36 | ephja | meap meap! |
12:44:02 | * | def- quit (Ping timeout: 250 seconds) |
12:46:39 | * | def- joined #nim |
12:51:33 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
12:52:12 | * | deavmi_mobile joined #nim |
12:52:21 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
12:58:00 | * | vendethiel quit (Ping timeout: 245 seconds) |
13:01:55 | * | ilariel joined #nim |
13:05:10 | * | vendethiel joined #nim |
13:07:48 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:30:38 | * | junw joined #nim |
13:34:45 | * | darkf_ is now known as darkf |
13:37:55 | * | def- quit (Ping timeout: 240 seconds) |
13:40:12 | * | def- joined #nim |
13:41:03 | * | Ven joined #nim |
13:48:55 | * | vendethiel quit (Ping timeout: 240 seconds) |
13:51:11 | * | vendethiel joined #nim |
13:59:46 | * | lompik joined #nim |
14:02:24 | * | gour joined #nim |
14:07:14 | gour | dom96: i congratulate you for meap!! |
14:12:42 | dom96 | gour: thank you :) |
14:12:56 | * | vendethiel quit (Ping timeout: 240 seconds) |
14:15:37 | gour | dom96: what do you use for writing? |
14:15:58 | dom96 | gour: asciidoc |
14:16:53 | gour | dom96: interesting, but very good choice...O'Reilly uses AsciiDoctor for preparing whole books |
14:17:39 | Araq_ | amateurs ... use 'nim doc2' like real men |
14:17:55 | dom96 | gour: Manning allows multiple formats, I think that AsciiDoc is pretty new for them still. |
14:18:09 | dom96 | But I'm very happy that they allow it, I shudder thinking about writing the book in MS Word... |
14:18:30 | gour | i must admit that i do not own not a single Manning book, although they look very pretty |
14:19:05 | gour | maybe, Nim wil be the 1st one ;) |
14:21:00 | gour | however, atm i experiment for my app with pytgon+cython and consider pyqt for gui, but wonder if it would be feasible to call nim libs from pyqt? |
14:24:07 | * | gokr joined #nim |
14:27:25 | flyx | *real* men use TeX. or Troff. |
14:29:29 | gour | dom96: to me, i'm not sure whether section 1.1.2 belongs to "Why Nim?" chapter, at least not so extensively |
14:42:46 | * | lompik quit (Ping timeout: 250 seconds) |
14:43:09 | * | brde quit (Quit: Page closed) |
14:49:27 | * | vendethiel joined #nim |
14:54:00 | * | rick__ joined #nim |
14:54:53 | dom96 | gour: hrm, why not? |
14:55:20 | * | def- quit (Ping timeout: 250 seconds) |
14:55:28 | dom96 | It's also under "What is Nim" though :) |
14:55:49 | dom96 | Might rename the chapter to something else though |
14:56:06 | niv | hi! I've upgraded to 0.13, and i'm now getting "undeclared identifier =>" for code like this: result = keys.map((k: auto) => 1). This used to work in the past. What am i doing wrong? |
14:56:21 | dom96 | niv: Did you import the `future` module? |
14:56:40 | rick__ | Does anyone here know how to get the iupcontrols widgets working for the IUP binding? |
14:57:17 | * | def- joined #nim |
14:57:18 | niv | dom96: did now, and its working. how come this changed? i thought => is just a anon proc definition |
14:57:49 | rick__ | I think it's a macro from the future module |
14:58:38 | niv | alright |
15:00:08 | dom96 | niv: Its always been a part of the `future` module, hopefully soon it will be moved into system |
15:03:05 | * | bozaloshtsh quit (Ping timeout: 276 seconds) |
15:11:22 | * | vendethiel quit (Ping timeout: 250 seconds) |
15:21:50 | * | endragor joined #nim |
15:25:24 | rick__ | how safe is using the wxWidgets wrapper right now? |
15:29:43 | * | vendethiel joined #nim |
16:05:06 | dom96 | rick__: IIRC somebody is working on a new one |
16:05:13 | dom96 | depends what you mean by "safe" though |
16:06:59 | federico3 | dom96: thumbs up for asciidoc :D |
16:07:21 | rick__ | eh, I don't even know what I mean by that. having one hell of time trying to compile wxwidgets on windows :( |
16:08:00 | coffeepot | "safety" is the new programming buzzword thanks to Rust :) |
16:09:13 | rick__ | figured someone else would know what it means, haha |
16:10:04 | dom96 | rick__: no pre-compiled DLLs available anywhere? |
16:11:16 | rick__ | dom96: hm, I'll check. Thanks for the tip |
16:13:23 | * | vendethiel quit (Ping timeout: 265 seconds) |
16:22:21 | * | rick__ quit (Ping timeout: 252 seconds) |
16:23:32 | * | RushPL quit (Ping timeout: 265 seconds) |
16:24:02 | * | pwernersbach joined #nim |
16:24:12 | pwernersbach | I believe that today I will find the memory leak |
16:25:24 | * | RushPL joined #nim |
16:27:03 | Arrrr | Leak! which one?! |
16:31:11 | pwernersbach | Grrrrr: there's a memory leak with the reference counting GC in some fairly complicated code I have, so I'm trying to figure it out |
16:31:27 | pwernersbach | Arrrr |
16:31:35 | Arrrr | I thought new gc was memory leak free |
16:32:07 | * | rick__ joined #nim |
16:32:51 | pwernersbach | Arrrr : In fairness this is the only code I've ever coded in Nim that leaks |
16:33:09 | pwernersbach | And it only happens in one function, so I'd say its 98% leak free |
16:34:00 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:38:51 | * | rick__ quit (Ping timeout: 252 seconds) |
16:39:05 | * | vendethiel joined #nim |
16:48:21 | coffeepot | pwernersbach sounds like a bug report if you can create an example for it! |
16:49:42 | coffeepot | you probably know about the memory profiler? |
16:50:11 | coffeepot | just in case: http://nim-lang.org/docs/estp.html |
16:53:01 | dom96 | Let's hope HN has mercy on my book :) |
16:56:07 | coffeepot | ah dom96, you committed it to HN eh? I'm sure pcwalton is preparing his replies! :D |
16:59:57 | coffeepot | for what it's worth, things are getting really interesting for Nim at the moment. I think the safety mantra brings out some of the key points in design differences between rust and nim. For every mention of safety, there seems to be another impetus to give a feature response |
17:00:14 | * | BitPuffin quit (Ping timeout: 256 seconds) |
17:00:37 | coffeepot | things such as not nil as default and the disjoint check - something I've still not used yet! |
17:01:29 | pwernersbach | coffeepot: the problem is I can't isolate it, so I'm working on that atm, I'll file a bug report afterwards |
17:02:55 | * | BitPuffin joined #nim |
17:02:58 | Arrrr | I think default not nil will not make it to 1.0 |
17:03:05 | dom96 | coffeepot: I can handle pcwalton. Submitted to reddit too :) |
17:03:35 | coffeepot | good luck pwernersbach! |
17:08:14 | coffeepot | dom96 I don't mean to be antagonistic to the guy, he knows his stuff, of course. I just think mem safety has become a bit of a mantra for him and others as it's the main selling point of his language, and sometimes I just wish every thread didn't get derailed with it, plus the mention of UB in C seems to totally miss the point. After all nim has mu |
17:08:15 | coffeepot | ltiple back ends anyway. |
17:10:27 | dom96 | coffeepot: I agree, but in some sense it's nice to hear his perspective. |
17:10:33 | coffeepot | definitely |
17:10:58 | coffeepot | he seems to respect the language regardless, which is pretty cool |
17:11:27 | dom96 | So guys, good news. I've got a 50% off Nim in Action discount code for you: mlpicheta :) |
17:11:54 | coffeepot | as i say, it does promote features that make it harder to segfault, such as not nil |
17:12:00 | coffeepot | ooo nice one dom96! :D |
17:13:14 | * | vic__ joined #nim |
17:14:15 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:14:45 | pwernersbach | well this is fun |
17:14:46 | pwernersbach | gc.nim(469) newObj gc.nim(439) rawNewObj gc.nim(951) collectCT gc.nim(910) collectCTBody gc.nim(760) collectCycles gc.nim(746) collectRoots gc.nim(620) collectWhite gc.nim(369) forAllChildren gc.nim(736) nimGCvisit gc.nim(721) doOperation gc.nim(620) collectWhite gc.nim(369) forAl |
17:14:56 | pwernersbach | oops |
17:15:56 | pwernersbach | https://gist.github.com/philip-wernersbach/759ee9c09a7c709679d1 |
17:20:55 | * | vendethiel quit (Ping timeout: 245 seconds) |
17:23:53 | * | pregressive quit (Remote host closed the connection) |
17:32:59 | * | endragor_ joined #nim |
17:33:17 | * | vendethiel joined #nim |
17:35:55 | * | endragor quit (Ping timeout: 240 seconds) |
17:37:29 | * | endragor_ quit (Ping timeout: 265 seconds) |
17:40:42 | * | rick__ joined #nim |
17:42:08 | rick__ | is compiling wxwidgets supposed to throw out a bunch of deprecation warnings? |
17:49:15 | * | onionhammer quit (Read error: Connection reset by peer) |
17:49:47 | * | onionhammer joined #nim |
17:53:45 | niv | dom96: you were the one working on the asyncnet stuff, right? this adds udp support, but would need some reogranisation. will this be of use to you? https://gist.github.com/niv/a42f9862a6e0ef1fd9ce |
17:55:07 | niv | its really painfully simple; the only patches needed are some param shuffling and a return value that includes the addr/port tuple |
17:55:57 | dom96 | niv: would be awesome if you could create a PR for this, but please make the procedure's look as close to the ones in the net module as possible: http://nim-lang.org/docs/net.html#recvFrom,Socket,string,int,string,Port,int32 |
17:56:38 | niv | how's that supposed to work with async? the sockaddr_in stuff needs to be in the future that's returned |
17:57:09 | niv | can't very well give them back as out params when called |
17:58:33 | dom96 | niv: nah, that's fine. But I think that recvFrom should take 'address' as a param. |
17:58:45 | dom96 | That being said, you can use 'FutureVar[T]' |
17:59:09 | dom96 | might be worth it, UDP is usually used when speed matters and returning copies is less efficient |
17:59:12 | niv | so you want me to fill in a var that's completely detached from the future? |
18:00:13 | niv | i guess i could put data, addr and port back as var outparams, and just return the sendto result as a future[int] - but that feels a bit messy |
18:02:02 | dom96 | hrm |
18:02:07 | dom96 | nah, don't listen to me |
18:02:11 | dom96 | I forgot how UDP works heh |
18:02:42 | dom96 | In fact, I still don't quite remember. What does recvFrom return? Every single message sent to every single port via UDP? |
18:03:40 | niv | no, you bind udp sockets to a local port and you get all packets sent to that port, no matter where they come from. as opposed to tcp, which first builds up connections and gives you a new socket per connection thats bound to a sockaddr_in (={address,port}) |
18:03:59 | niv | so recvFrom for udp packets needs to return where the packet came from |
18:05:54 | niv | you can see the same in the net module, which has a recvFrom that fills outvars. im not sure what the consequences are though of filling outvars for async procs |
18:08:59 | * | yglukhov quit (Ping timeout: 276 seconds) |
18:09:04 | * | Ven joined #nim |
18:15:07 | * | vic__ quit (Ping timeout: 252 seconds) |
18:16:52 | dom96 | niv: then your interface is fine, we can always add a proc which takes FutureVar[T] in the future |
18:19:19 | niv | dom96: great stuff. i do wonder though what would happen if one were to pass var params to an async proc. :) |
18:19:53 | dom96 | niv: Compile-time error ;) |
18:19:57 | lawnchair_ | Hey all. Having and issue building with SDL2 on win64. Error: ambiguous call; both unsigned.<(x: T, y: T) and system.<(x: T, y: T) match for: (uint32, uint32). I think i get the issue. It can be solved by calling the operator directly with "system.`<`(a,b)". Is there a better solution that allows to keep the slick syntax? |
18:20:35 | niv | dom96: fair enough. any idea on what to name the tuple type that's returned (or not name it at all)? |
18:22:20 | dom96 | niv: maybe RecvFromResult? |
18:22:53 | niv | i'll just make it an anon tuple for now |
18:22:59 | niv | its not going to be needed anywhere else after all |
18:24:51 | * | BitPuffin quit (Ping timeout: 265 seconds) |
18:25:14 | * | RG92 quit (Quit: ChatZilla 0.9.92 [Firefox 43.0.4/20160105164030]) |
18:30:23 | * | Jesin quit (Quit: Leaving) |
18:31:52 | * | Matthias247 joined #nim |
18:32:40 | * | junw quit (Remote host closed the connection) |
18:37:23 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:41:56 | gour | dom96: too much words in the section for the warm-up chapter which, imho, waters-down the whole presentation...maybe more suitable for some appendix, but certainly not for the intro chapter |
18:44:47 | * | rick__ quit (Quit: Page closed) |
18:46:02 | * | vendethiel quit (Ping timeout: 276 seconds) |
18:46:54 | * | lawnchair_ quit (Quit: Page closed) |
18:49:17 | * | vendethiel joined #nim |
18:56:22 | * | qazwsx joined #nim |
18:58:12 | dom96 | gour: which section specifically do you mean? |
18:58:23 | gour | dom96: as i wrote, 1.1.2 |
18:58:56 | dom96 | gour: ahh, you think I shouldn't explain how Nim works in that chapter? |
18:59:49 | * | yglukhov joined #nim |
19:04:07 | gour | right |
19:05:57 | gour | it is too long and turns attention from other Nim's selling points, imho |
19:07:31 | * | Arrrr quit (Quit: WeeChat 1.2) |
19:09:48 | * | aziz joined #nim |
19:11:06 | * | shodan45 joined #nim |
19:13:39 | * | Jesin joined #nim |
19:14:18 | * | bozaloshtsh joined #nim |
19:15:45 | dom96 | gour: I'll see what I can do, where do you think the section should be moved to? |
19:17:44 | gour | dom96: out of 1st chapter for sure...possibly in some appendix where you could maybe have info how to install Nim, but the problem is that you, apparently have this info in 2nd chapter |
19:24:13 | * | pregressive joined #nim |
19:29:35 | * | pregressive quit (Ping timeout: 276 seconds) |
19:30:04 | * | def- quit (Ping timeout: 250 seconds) |
19:31:33 | * | def- joined #nim |
19:35:24 | dom96 | gour: yeah, and chapter 2 is already rather long. |
19:35:29 | dom96 | So I cannot put it there. |
19:35:36 | dom96 | I don't think it's appropriate for the appendix |
19:36:51 | * | Jesin quit (Quit: Leaving) |
19:39:26 | * | qazwsx quit (Ping timeout: 240 seconds) |
19:47:19 | * | Jesin joined #nim |
19:47:48 | * | Varriount-Laptop joined #nim |
19:50:26 | * | allan0_ quit (Ping timeout: 240 seconds) |
19:52:26 | * | def- quit (Ping timeout: 240 seconds) |
19:52:54 | * | def- joined #nim |
19:55:38 | * | allan0 joined #nim |
19:59:56 | * | bozaloshtsh quit (Ping timeout: 272 seconds) |
20:00:03 | wuehlmaus | when was nim started? dom96 wrote 2005, Araq_ tells 2006 :) |
20:00:19 | * | yglukhov quit (Read error: Connection reset by peer) |
20:00:41 | * | Varriount joined #nim |
20:00:57 | wuehlmaus | dom96: the book starts very nicely, i enjoyed reading chapter 1 |
20:01:24 | dom96 | wuehlmaus: Thank you! In regards to the year, I guess that's my mistake heh |
20:01:43 | wuehlmaus | or you know more than Araq_ :) |
20:02:40 | wuehlmaus | noone knows the exact year, somewhere in the 21th century :) |
20:04:35 | * | yglukhov joined #nim |
20:09:46 | * | yglukhov quit (Read error: Connection reset by peer) |
20:11:47 | saml | book is out |
20:12:34 | dom96 | saml: Yep! have you had a chance to read it yet? :) |
20:12:50 | saml | yah but no Getting Started chapter |
20:12:53 | saml | just introduction |
20:13:00 | gour | dom96: in any case, 1.1.2 does not fit "Why Nim?" (imho) :-) |
20:13:06 | saml | maybe it's better to write other parts and introduction the last |
20:13:51 | dom96 | saml: chapter 2 is the "Getting Started" chapter |
20:14:35 | * | yglukhov joined #nim |
20:14:58 | saml | nice |
20:16:23 | gour | saml: i'd also put 'installation instructions' in the appendix, but it's not my book :-) |
20:18:48 | * | yglukhov quit (Read error: Connection reset by peer) |
20:19:31 | saml | not just installation.. i think programming language implementation is a full package: a program(s) that helps write programs |
20:19:58 | saml | need compiler, editor, debugger.. or fully integrated program that does all |
20:19:59 | gour | reactormonk: do you use plain emacs, iow. no evil-mode, spacemacs etc. ? |
20:23:39 | saml | what editor do you use? Apira? |
20:24:41 | * | yglukhov joined #nim |
20:26:36 | * | appledroid joined #nim |
20:26:36 | * | yglukhov quit (Read error: Connection reset by peer) |
20:27:00 | * | appledroid left #nim (#nim) |
20:27:06 | * | yglukhov joined #nim |
20:33:06 | * | yglukhov quit (Read error: Connection reset by peer) |
20:34:06 | Varriount | I use Sublime Text. |
20:34:56 | * | yglukhov joined #nim |
20:37:24 | * | yglukhov quit (Read error: Connection reset by peer) |
20:37:50 | * | AMorpork joined #nim |
20:43:03 | * | pwernersbach quit (Ping timeout: 252 seconds) |
20:45:02 | * | yglukhov joined #nim |
20:47:00 | * | darkf quit (Quit: Leaving) |
21:03:27 | * | Varriount-Laptop quit (Quit: Leaving) |
21:06:12 | * | bozaloshtsh joined #nim |
21:07:51 | * | desophos joined #nim |
21:13:15 | * | desophos quit (Ping timeout: 240 seconds) |
21:13:55 | * | desophos joined #nim |
21:17:21 | * | brson joined #nim |
21:19:12 | * | def- quit (Ping timeout: 256 seconds) |
21:21:25 | * | def- joined #nim |
21:21:54 | * | BitPuffin|osx joined #nim |
21:21:58 | * | rick__ joined #nim |
21:23:13 | rick__ | a gtk application has a lot of dll dependencies, right? |
21:34:40 | dom96 | rick__: I wouldn't say a lot, but there are a few |
21:37:46 | rick__ | dom96: when I tried with rust, it ended up being 40mb worth of dlls... maybe I was doing it wrong |
21:37:51 | * | itPuffin|osxB joined #nim |
21:38:00 | * | itPuffin|osxB quit (Remote host closed the connection) |
21:38:01 | * | BitPuffin|osx quit (Remote host closed the connection) |
21:38:01 | dom96 | rick__: That sounds about right |
21:38:25 | * | BitPuffin|osx joined #nim |
21:39:00 | rick__ | dom96: unfortunately that's too much for my purposes. |
21:39:26 | rick__ | dom96: do you happen to know how much wxwidgets adds in terms of size? |
21:39:58 | dom96 | rick__: sorry, no idea. Why the need for such a small size? |
21:41:36 | * | qazwsx joined #nim |
21:41:42 | rick__ | because it has to be called from another program (not mine), and that one is only 4mb large (I think it was written in PowerBASIC) |
21:42:19 | rick__ | iup would be good, but there's no list view with multiple columns |
21:45:42 | * | apotheon quit (Ping timeout: 272 seconds) |
21:47:47 | * | Ven joined #nim |
21:50:12 | * | Jesin quit (Quit: Leaving) |
21:50:40 | * | yglukhov quit (Remote host closed the connection) |
21:51:01 | * | apotheon joined #nim |
21:54:33 | * | rick__ quit (Quit: Page closed) |
21:57:32 | * | rick__ joined #nim |
21:59:31 | * | shodan45 quit (Quit: Konversation terminated!) |
22:00:10 | rick__ | dom98: do you happen to know how to use widgets such as IupMatrix in the iup wrapper? |
22:01:58 | * | brson quit (Quit: leaving) |
22:03:54 | rick__ | on runtime, it complains that it could not import IupMatrix |
22:04:28 | * | brson joined #nim |
22:04:40 | * | pwernersbach joined #nim |
22:05:24 | pwernersbach | Does anyone know if the Reference Counting GC does a full collection when it needs to free memory, or if it just frees memory as needed? |
22:06:31 | dom96 | rick__: not sure, sorry. Maybe the wrapper needs to be fixed, search for the API docs of IUP and see if IupMatrix exists. |
22:09:33 | * | qazwsx quit (Quit: Lost terminal) |
22:09:38 | rick__ | dom98: it's there, but it requires some "IupControls" library. As do all the other widgets that don't work. So it's probably something to do with that |
22:09:46 | * | apotheon quit (Ping timeout: 272 seconds) |
22:10:48 | * | yglukhov joined #nim |
22:14:42 | * | apotheon joined #nim |
22:16:53 | * | yglukhov quit (Remote host closed the connection) |
22:18:11 | * | derka joined #nim |
22:19:01 | * | yglukhov joined #nim |
22:23:20 | * | brson quit (Ping timeout: 250 seconds) |
22:30:45 | pwernersbach | Also, does anyone have info on the GC internals? Might try my hand at making a compacting GC |
22:31:14 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:32:12 | * | brson joined #nim |
22:43:18 | ldlework | pwernersbach: we actually just found the GC laying around in some trash in an alley |
22:43:26 | ldlework | no one knows how it works, but it seems to work ok |
22:44:38 | * | Jesin joined #nim |
22:44:46 | * | vendethiel quit (Ping timeout: 240 seconds) |
22:50:35 | gokr | pwernersbach: I presume you looked at gc.nim? |
22:52:52 | * | gour quit (Quit: WeeChat 1.3) |
23:01:01 | * | apotheon quit (Read error: Connection reset by peer) |
23:06:01 | * | vendethiel joined #nim |
23:06:22 | * | apotheon joined #nim |
23:17:58 | niv | dom96: https://github.com/nim-lang/Nim/pull/3785 well, i made a thing |
23:25:56 | * | pregressive joined #nim |
23:26:54 | * | mat4 joined #nim |
23:27:49 | mat4 | hello |
23:27:53 | rick__ | IUP seems to default to windows classic... is there some kind of manifest file I need to configure, for it to look native to win7? |
23:27:56 | * | vendethiel quit (Ping timeout: 240 seconds) |
23:30:30 | * | pregressive quit (Ping timeout: 250 seconds) |
23:31:34 | * | filwit joined #nim |
23:34:55 | * | lompik joined #nim |
23:36:29 | pwernersbach | gokr: Yes. I just don't understand what the cell logic does |
23:36:47 | pwernersbach | ldlework: Ha, thanks for the laugh |
23:37:08 | pwernersbach | ldlework: It actually is a good GC though |
23:37:17 | ldlework | indeed |
23:37:40 | * | aziz quit (Remote host closed the connection) |
23:45:25 | * | samdoran joined #nim |
23:48:50 | rick__ | does nim support adding resource items to executables |
23:49:50 | * | vendethiel joined #nim |