<< 27-01-2016 >>

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:18pwernersbachdom96: Let me know if you need a manufacturer, I work for a book manufacturing company, and we use Nim
00:18:05pwernersbachAraq_: 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:23deavmi_mobilevariables in nim are not objects like in Python right?
06:48:37deavmi_mobileare 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:28reactormonkdeavmi_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:03deavmi_mobileso are they value objects then?
07:20:09deavmi_mobileor pointers to value objects?
07:21:09*rinukkusu_ joined #nim
07:21:18*rinukkusu quit (Ping timeout: 240 seconds)
07:23:26reactormonkthey're references/pointers (references are tracked by the GC) if you tell the compiler they are.
07:24:06deavmi_mobilewhat I don't understand is how they duffer from C in layman's terms
07:24:10deavmi_mobile* differ
07:24:31deavmi_mobileLike are they objects as in can I do x.somethingMethod
07:24:32deavmi_mobile?
07:24:46deavmi_mobileor are they simple variables like C or atleadt similar to C
07:28:34ldleworkdeavmi_mobile: I think I can help
07:28:56ldleworkdeavmi_mobile: where in Python everything is an "object" or rather a reference to an object
07:29:03ldleworkdeavmi_mobile: in Nim, everything is a value
07:29:21ldleworkdeavmi_mobile: in Nim, you have normal values like integers and floats and so on
07:29:36ldleworkdeavmi_mobile: and then you have "references" which are much like pointers
07:29:54ldleworkand pointers afterall are just values, the value being a number representing a memory address
07:30:24ldleworkwhen you pass a reference, you pass a copy of the value that contains the numerical memory address
07:30:27deavmi_mobileoh okay
07:30:29deavmi_mobileI see
07:31:00deavmi_mobilethanks dude. So similar to C. I understand how pointers are values as they hold a number pointing to a ram address
07:31:18ldleworkdeavmi_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:24ldleworkSo that's unlike C
07:31:43ldleworkIE, 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:27ldleworkdeavmi_mobile: you will often see a "raw type" and a "ref type" defined for every object type
07:32:29ldleworklike
07:32:31ldleworktype
07:32:38ldlework PointObj = object
07:32:42ldlework x, y: int
07:32:49ldlework Point = ref PointObb
07:33:07ldleworkNow, 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:28deavmi_mobilereferred objected?
07:33:29ldleworkOr 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:32ldleworkreferred object
07:33:38ldleworkthe object the pointer points at
07:33:48ldlework(sorry I'm typing a bit too fast)
07:33:49deavmi_mobileobject as in OOP
07:33:50deavmi_mobile?
07:33:53ldleworkstructure
07:34:02deavmi_mobilestructure? like a C struct
07:34:10ldleworkan object is just data + functions which work on that data
07:34:11ldleworkyes
07:34:25ldleworkabove, PointObj is a struct type
07:34:36ldleworkwhen you create it, a memory space the size of two ints is created
07:34:44ldleworkevery type you pass it to a function, those two ints are copied
07:34:53ldleworkif that function passes it to another function its copied again and again
07:35:10ldleworkhowever, 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:27ldleworkif 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:40ldleworkfor a really big object, it might be worth it to work with references rather than values
07:36:05ldleworkevery time you pass it*
07:36:45ldleworkdeavmi_mobile: make sense?
07:37:19gokrdom96: Super man!
07:37:57gokrdeavmi_mobile: I have written a whole series on OOP in Nim (although I missed your original question)
07:38:22deavmi_mobileI still feel deeply confused
07:38:33deavmi_mobileis there a page on the wiki that describes this about the whole Nim var system?
07:39:21gokrWhat is the subject here? objects?
07:39:29ldleworkgokr: reference and value
07:39:36gokrRight.
07:39:38ldleworkdeavmi_mobile: var and let are different concern to reference and value
07:39:57ldleworkvar and let relate to mutability
07:40:03reactormonkdeavmi_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:28ldleworkdeavmi_mobile: are you familiar with the stack and heap?
07:40:45ldleworkconceptually
07:41:01gokrSo ... 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:18gokrTo get a "pointer" you need a ref of that type.
07:42:19*vendethiel joined #nim
07:42:35gokrI talk about this a bit in this article under "Ref and ptr": http://goran.krampe.se/2014/10/29/nim-and-oo/
07:42:57ldleworkIt helps if you understand the purpose of the stack and heap, really.
07:43:09ldleworkIf you don't, we'll only be talking in vague metaphors.
07:43:49ldleworkThough you only really need a passing conceptualization of their purposes and differences to then understand reference and value.
07:43:59ldleworkSo if you don't understand them, we can probably elucidate.
07:44:04gokrI think I touch upon that in that section, although a tad briefly.
07:44:08deavmi_mobileI remember something about stack and heap
07:44:17deavmi_mobilelike the definition that's all I guess
07:44:25gokrdeavmi_mobile: Can you read that section and then tell us if you understand it?
07:45:36ldleworkdeavmi_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:03ldleworkWhen you pass a value to a function, that value is passed on the stack.
07:46:22ldleworkSo the concern is that we don't want to pass huuuuuuuuuge values on the stack.
07:46:52ldleworkIt 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:11ldleworkThat's what pointers are for. They are small values we can pass between functions, quickly on the stack.
07:47:27ldleworkIn our functions, we can then use the pointers to get at the data in large structures on the heap.
07:48:07gokrldlework: Btw, how is Nim vs Go going at Docker? :)
07:48:24ldleworkGo is king. Nim isn't even on anyone's radar.
07:48:24gokrAre the rest of the company still in love with Go or?
07:48:52*deavmi_mobile quit (Ping timeout: 250 seconds)
07:48:56ldlework...
07:49:10gokrI 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:22ldleworkIts horrible.
07:49:58gokrWonder why everyone loves it.
07:50:13ldleworkBecause the vast majority of programmers are boring
07:50:52ldleworkGo is a tiny language with a toy type-system and a culture of "just write it out". Its field leveler.
07:51:18ldleworkYou 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:14filwithonestly if Go had generics & operators it would probably be pretty good
07:52:43ldleworkSure, I'd agree with that statement.
07:53:17filwitsimple 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:31ldleworkYes I agree with that 100%
07:53:42ldleworkSimple is great. Go went too far below the threshold where that's helpful.
07:53:51ldleworkTo the point where, you simply can't express things naturally.
07:53:51filwityeah
07:54:55ldleworkYou 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:27filwitlol
07:56:20gokrI guess Go also has good performance and GC these days.
07:56:27gokrIt seems so at least.
07:57:16ldleworkwell 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:15Salewskiconst 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:31Araq_overload + for arrays
09:16:56*deavmi_mobile2 quit (Read error: Connection reset by peer)
09:16:57*deavmi_mobile joined #nim
09:18:19SalewskiAraq: 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:44SalewskiAraq: 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:40gokrSalewski: I noted ES6 introduce this too - "...x" will "spread" it. They call it the spread operator.
09:29:12*coffeepot joined #nim
09:29:41SalewskiBye...
09:29:45*Salewski quit ()
09:31:40Araq_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:28deavmi_mobile I didn't understand the link sent
10:03:10brdenot 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:02SalewskiAraq: 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:57gokrdeavmi_mobile: You mean you didn't understand the section on "Ref and ptr"?
10:42:01veganskAraq, 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:44Araq_vegansk: setupForeignThreadGc()
10:43:55*coffeepot joined #nim
10:45:49*RG92 joined #nim
10:50:25veganskThanks!
10:55:42deavmi_mobileref and ptr
10:55:48deavmi_mobilea ptr is a pointer right
10:56:04deavmi_mobilea 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:57coffeepota ref is a garbage collected pointer
11:02:32coffeepothttp://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:06deavmi_mobile2olau
11:20:09deavmi_mobile2* Okay
11:20:15deavmi_mobile2let me ask a question like so:
11:20:37*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
11:20:54deavmi_mobile2Are variables like int and string objects as in that you can store attributes and methods in em?
11:21:49dom96deavmi_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:04ArrrrWhat 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:58deavmi_mobileoh omay
11:34:00deavmi_mobile* okay
11:34:10deavmi_mobilethen what about doing something like var.something
11:34:24deavmi_mobileor 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:56dom96deavmi_mobile: you can define a custom object with fields
11:53:06dom96deavmi_mobile: I'm not quite sure what you mean
11:54:10*def- joined #nim
11:54:38coffeepotdeavmi_mobile: do you mean like defining procs that work on things like built ins?
11:55:59coffeepotif 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:51coffeepotthis 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:59coffeepotas 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:47Arrrrie: myProc(123) == 123.myProc
12:18:11Arrrr== 123.myProc() == myProc 123
12:18:31*darkf_ joined #nim
12:19:44*darkf quit (Ping timeout: 256 seconds)
12:41:36ephjameap 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:14gourdom96: i congratulate you for meap!!
14:12:42dom96gour: thank you :)
14:12:56*vendethiel quit (Ping timeout: 240 seconds)
14:15:37gourdom96: what do you use for writing?
14:15:58dom96gour: asciidoc
14:16:53gourdom96: interesting, but very good choice...O'Reilly uses AsciiDoctor for preparing whole books
14:17:39Araq_amateurs ... use 'nim doc2' like real men
14:17:55dom96gour: Manning allows multiple formats, I think that AsciiDoc is pretty new for them still.
14:18:09dom96But I'm very happy that they allow it, I shudder thinking about writing the book in MS Word...
14:18:30gouri must admit that i do not own not a single Manning book, although they look very pretty
14:19:05gourmaybe, Nim wil be the 1st one ;)
14:21:00gourhowever, 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:25flyx*real* men use TeX. or Troff.
14:29:29gourdom96: 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:53dom96gour: hrm, why not?
14:55:20*def- quit (Ping timeout: 250 seconds)
14:55:28dom96It's also under "What is Nim" though :)
14:55:49dom96Might rename the chapter to something else though
14:56:06nivhi! 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:21dom96niv: Did you import the `future` module?
14:56:40rick__Does anyone here know how to get the iupcontrols widgets working for the IUP binding?
14:57:17*def- joined #nim
14:57:18nivdom96: did now, and its working. how come this changed? i thought => is just a anon proc definition
14:57:49rick__I think it's a macro from the future module
14:58:38nivalright
15:00:08dom96niv: 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:24rick__how safe is using the wxWidgets wrapper right now?
15:29:43*vendethiel joined #nim
16:05:06dom96rick__: IIRC somebody is working on a new one
16:05:13dom96depends what you mean by "safe" though
16:06:59federico3dom96: thumbs up for asciidoc :D
16:07:21rick__eh, I don't even know what I mean by that. having one hell of time trying to compile wxwidgets on windows :(
16:08:00coffeepot"safety" is the new programming buzzword thanks to Rust :)
16:09:13rick__figured someone else would know what it means, haha
16:10:04dom96rick__: no pre-compiled DLLs available anywhere?
16:11:16rick__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:12pwernersbachI believe that today I will find the memory leak
16:25:24*RushPL joined #nim
16:27:03ArrrrLeak! which one?!
16:31:11pwernersbachGrrrrr: 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:27pwernersbachArrrr
16:31:35ArrrrI thought new gc was memory leak free
16:32:07*rick__ joined #nim
16:32:51pwernersbachArrrr : In fairness this is the only code I've ever coded in Nim that leaks
16:33:09pwernersbachAnd 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:21coffeepotpwernersbach sounds like a bug report if you can create an example for it!
16:49:42coffeepotyou probably know about the memory profiler?
16:50:11coffeepotjust in case: http://nim-lang.org/docs/estp.html
16:53:01dom96Let's hope HN has mercy on my book :)
16:56:07coffeepotah dom96, you committed it to HN eh? I'm sure pcwalton is preparing his replies! :D
16:59:57coffeepotfor 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:37coffeepotthings such as not nil as default and the disjoint check - something I've still not used yet!
17:01:29pwernersbachcoffeepot: 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:58ArrrrI think default not nil will not make it to 1.0
17:03:05dom96coffeepot: I can handle pcwalton. Submitted to reddit too :)
17:03:35coffeepotgood luck pwernersbach!
17:08:14coffeepotdom96 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:15coffeepotltiple back ends anyway.
17:10:27dom96coffeepot: I agree, but in some sense it's nice to hear his perspective.
17:10:33coffeepotdefinitely
17:10:58coffeepothe seems to respect the language regardless, which is pretty cool
17:11:27dom96So guys, good news. I've got a 50% off Nim in Action discount code for you: mlpicheta :)
17:11:54coffeepotas i say, it does promote features that make it harder to segfault, such as not nil
17:12:00coffeepotooo 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:45pwernersbachwell this is fun
17:14:46pwernersbachgc.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:56pwernersbachoops
17:15:56pwernersbachhttps://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:08rick__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:45nivdom96: 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:07nivits really painfully simple; the only patches needed are some param shuffling and a return value that includes the addr/port tuple
17:55:57dom96niv: 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:38nivhow's that supposed to work with async? the sockaddr_in stuff needs to be in the future that's returned
17:57:09nivcan't very well give them back as out params when called
17:58:33dom96niv: nah, that's fine. But I think that recvFrom should take 'address' as a param.
17:58:45dom96That being said, you can use 'FutureVar[T]'
17:59:09dom96might be worth it, UDP is usually used when speed matters and returning copies is less efficient
17:59:12nivso you want me to fill in a var that's completely detached from the future?
18:00:13nivi 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:02dom96hrm
18:02:07dom96nah, don't listen to me
18:02:11dom96I forgot how UDP works heh
18:02:42dom96In fact, I still don't quite remember. What does recvFrom return? Every single message sent to every single port via UDP?
18:03:40nivno, 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:59nivso recvFrom for udp packets needs to return where the packet came from
18:05:54nivyou 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:52dom96niv: then your interface is fine, we can always add a proc which takes FutureVar[T] in the future
18:19:19nivdom96: great stuff. i do wonder though what would happen if one were to pass var params to an async proc. :)
18:19:53dom96niv: Compile-time error ;)
18:19:57lawnchair_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:35nivdom96: fair enough. any idea on what to name the tuple type that's returned (or not name it at all)?
18:22:20dom96niv: maybe RecvFromResult?
18:22:53nivi'll just make it an anon tuple for now
18:22:59nivits 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:56gourdom96: 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:12dom96gour: which section specifically do you mean?
18:58:23gourdom96: as i wrote, 1.1.2
18:58:56dom96gour: ahh, you think I shouldn't explain how Nim works in that chapter?
18:59:49*yglukhov joined #nim
19:04:07gourright
19:05:57gourit 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:45dom96gour: I'll see what I can do, where do you think the section should be moved to?
19:17:44gourdom96: 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:24dom96gour: yeah, and chapter 2 is already rather long.
19:35:29dom96So I cannot put it there.
19:35:36dom96I 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:03wuehlmauswhen 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:57wuehlmausdom96: the book starts very nicely, i enjoyed reading chapter 1
20:01:24dom96wuehlmaus: Thank you! In regards to the year, I guess that's my mistake heh
20:01:43wuehlmausor you know more than Araq_ :)
20:02:40wuehlmausnoone 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:47samlbook is out
20:12:34dom96saml: Yep! have you had a chance to read it yet? :)
20:12:50samlyah but no Getting Started chapter
20:12:53samljust introduction
20:13:00gourdom96: in any case, 1.1.2 does not fit "Why Nim?" (imho) :-)
20:13:06samlmaybe it's better to write other parts and introduction the last
20:13:51dom96saml: chapter 2 is the "Getting Started" chapter
20:14:35*yglukhov joined #nim
20:14:58samlnice
20:16:23goursaml: 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:31samlnot just installation.. i think programming language implementation is a full package: a program(s) that helps write programs
20:19:58samlneed compiler, editor, debugger.. or fully integrated program that does all
20:19:59gourreactormonk: do you use plain emacs, iow. no evil-mode, spacemacs etc. ?
20:23:39samlwhat 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:06VarriountI 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:13rick__a gtk application has a lot of dll dependencies, right?
21:34:40dom96rick__: I wouldn't say a lot, but there are a few
21:37:46rick__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:01dom96rick__: That sounds about right
21:38:25*BitPuffin|osx joined #nim
21:39:00rick__dom96: unfortunately that's too much for my purposes.
21:39:26rick__dom96: do you happen to know how much wxwidgets adds in terms of size?
21:39:58dom96rick__: sorry, no idea. Why the need for such a small size?
21:41:36*qazwsx joined #nim
21:41:42rick__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:19rick__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:10rick__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:54rick__on runtime, it complains that it could not import IupMatrix
22:04:28*brson joined #nim
22:04:40*pwernersbach joined #nim
22:05:24pwernersbachDoes 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:31dom96rick__: 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:38rick__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:45pwernersbachAlso, 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:18ldleworkpwernersbach: we actually just found the GC laying around in some trash in an alley
22:43:26ldleworkno 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:35gokrpwernersbach: 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:58nivdom96: 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:49mat4hello
23:27:53rick__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:29pwernersbachgokr: Yes. I just don't understand what the cell logic does
23:36:47pwernersbachldlework: Ha, thanks for the laugh
23:37:08pwernersbachldlework: It actually is a good GC though
23:37:17ldleworkindeed
23:37:40*aziz quit (Remote host closed the connection)
23:45:25*samdoran joined #nim
23:48:50rick__does nim support adding resource items to executables
23:49:50*vendethiel joined #nim