<< 29-01-2016 >>

00:03:46*Matthias247 quit (Read error: Connection reset by peer)
00:09:11*vendethiel quit (Ping timeout: 264 seconds)
00:22:55*vendethiel joined #nim
00:35:45dom96def-: ooh, nice
00:38:30*Salewski quit (Quit: Page closed)
00:44:08*lompik joined #nim
00:44:35*vendethiel quit (Ping timeout: 264 seconds)
00:44:55dom96Good night!
00:45:18nivnighty :)
00:45:55gokrdef-: Very nice article! As always
00:46:35*vendethiel joined #nim
00:47:28def-gokr: thanks!
00:50:23*desophos quit (Read error: Connection reset by peer)
01:07:30*vendethiel quit (Ping timeout: 260 seconds)
01:18:14*ephja quit (Ping timeout: 256 seconds)
01:45:49*Trustable quit (Remote host closed the connection)
01:49:44*gokr quit (Quit: Leaving.)
01:54:25*vendethiel joined #nim
02:07:14*brson quit (Quit: leaving)
02:13:37*junw_ joined #nim
02:14:15*junw quit (Ping timeout: 245 seconds)
02:17:15*vendethiel quit (Ping timeout: 240 seconds)
02:26:36*vendethiel joined #nim
02:35:00*mountaingoat quit (Ping timeout: 260 seconds)
02:47:00*mountaingoat joined #nim
03:10:59*vendethiel quit (Ping timeout: 264 seconds)
03:18:16*vendethiel joined #nim
03:35:48*jryan joined #nim
03:39:10*vendethiel quit (Ping timeout: 260 seconds)
03:41:38*endragor joined #nim
03:43:20*xtagon quit (Quit: Connection closed for inactivity)
03:43:58*jryan quit (Quit: Page closed)
03:44:04*endragor quit (Remote host closed the connection)
03:50:23*desophos joined #nim
03:54:37*endragor joined #nim
03:57:06*endragor quit (Remote host closed the connection)
04:03:56*vendethiel joined #nim
04:09:43*yglukhov joined #nim
04:14:18*yglukhov quit (Ping timeout: 250 seconds)
04:21:17*endragor joined #nim
04:25:05*vendethiel quit (Ping timeout: 245 seconds)
04:31:15*vendethiel joined #nim
04:34:39wuehlmausdef-: wonderful article!
04:35:40*vangroan joined #nim
04:49:37def-wuehlmaus: thanks!
04:52:35*junw_ quit (Ping timeout: 240 seconds)
04:53:58*pregressive joined #nim
05:16:50*vendethiel quit (Ping timeout: 272 seconds)
05:24:36*vendethiel joined #nim
05:36:30*AMorpork quit (Remote host closed the connection)
05:45:45*vendethiel quit (Ping timeout: 260 seconds)
05:48:48*qazwsx joined #nim
06:11:52*pregressive quit ()
06:21:31*pregressive joined #nim
06:24:18*vendethiel joined #nim
06:32:07*darkf joined #nim
06:33:47*pregressive quit (Remote host closed the connection)
06:42:31*qazwsx quit (Quit: qazwsx)
06:47:16*vendethiel quit (Ping timeout: 276 seconds)
06:58:42*wuehlmaus quit (Quit: Lost terminal)
06:58:56*wuehlmaus joined #nim
07:04:53*vendethiel joined #nim
07:14:07*qazwsx joined #nim
07:26:05*vendethiel quit (Ping timeout: 260 seconds)
07:28:25*vendethiel joined #nim
07:30:08*vendethiel quit (Client Quit)
07:30:56*endragor quit (Remote host closed the connection)
07:34:01*darkf_ joined #nim
07:34:28*darkf quit (Ping timeout: 265 seconds)
07:44:06*darkf_ quit (Ping timeout: 240 seconds)
07:45:17*darkf joined #nim
07:45:44*yglukhov joined #nim
07:48:25*endragor joined #nim
07:49:17*junw joined #nim
07:50:06*yglukhov quit (Ping timeout: 250 seconds)
07:54:40*darkf quit (Ping timeout: 260 seconds)
07:57:42*junw quit (Ping timeout: 272 seconds)
08:01:22endragorIs there a way to {.emit.} code (C or C++) that calls Nim procedure?
08:01:26*darkf joined #nim
08:10:43*Demon_Fox quit (Quit: Leaving)
08:15:30*gour joined #nim
08:15:57*darkf_ joined #nim
08:19:12*darkf quit (Ping timeout: 250 seconds)
08:19:35*bjz joined #nim
08:24:56*bjz quit (Ping timeout: 240 seconds)
08:26:23*gokr joined #nim
08:26:28*bjz joined #nim
08:27:33Araq_endragor: use backticks in the .emit
08:27:41*qazwsx quit (Quit: qazwsx)
08:27:44Araq_but watch out that the proc is not overloaded
08:31:45*darkf_ is now known as darkf
08:47:19endragorThat worked, thanks!
08:47:28*qazwsx joined #nim
08:55:12*qazwsx quit (Quit: qazwsx)
09:06:08*coffeepot joined #nim
09:14:42*yglukhov joined #nim
09:25:21*ephja joined #nim
09:27:20*gokr quit (Quit: Leaving.)
09:27:24*gokr1 joined #nim
09:34:44*derka joined #nim
09:47:03*Dildosan joined #nim
09:47:15*derka quit (Quit: derka)
10:16:34veganskHi to all!
10:16:57Dildosansup vegansk
10:17:21coffeepotyo :)
10:17:49*desophos quit (Read error: Connection reset by peer)
10:18:00veganskWhen I want to use closure as callback for c library, do I need to handle the lifetime of environment manually? gc_ref/gc_unref works with refs but not with pointers
10:19:06dom96good morning everyone :)
10:19:18Araq_dunno, I guess you need to cast the result of 'system.rawEnv'
10:19:45Araq_usually C apis only support one void* so you need to wrap the .closure in another ref
10:20:05Araq_that's what we do for wxWidgets (soon to be released ...)
10:22:23coffeepot>wxWidgets (soon to be released ...) Awesome!
10:23:27coffeepotand good morning dom96, how's your book meap feedback going?
10:23:35veganskAraq_, i.e. I need to store some object that contains closure as callback's void* param, gc_ref it before c library call and gc_unref it after the call. Correct?
10:24:06Araq_no.
10:24:09Araq_you do:
10:24:19Araq_type Foo = ref object
10:24:28dom96coffeepot: Good. HN has given really nice feedback so far.
10:24:36Araq_ callback: proc () {.closure.}
10:24:46dom96I'm impressed by how long it stayed on the front page
10:25:01Araq_proc wrapper(x: pointer) {.cdecl} =
10:25:08dom96(It's still in the "Show" section, one of the mods turned it into a "Show HN" post)
10:25:17coffeepotgreat! I bought a copy too, looking forward to digging in when it's released :)
10:25:23Araq_ cast[Foo](x).callback()
10:25:41Araq_# somewhere:
10:25:44coffeepotwow that's good news. Seems like Nim is definitely something people are keeping an eye on!
10:25:47Araq_var f = Foo(...)
10:25:51Araq_GC_ref(f)
10:26:14Araq_cfunction(wrapper, cast[pointer](f))
10:26:20Araq_GC_unref(f)
10:26:40veganskAraq_, thanks!
10:26:49Araq_you sometimes can eliminate the 'ref object' wrapping
10:26:57Araq_but not if you don't know what you're doing :P
10:27:15dom96coffeepot: nice, thank you for the order! :)
10:27:23dom96coffeepot: read much of it yet?
10:27:35coffeepotnp, thanks for taking the time to write it :)
10:27:42wuehlmausnim is such that if i read the source code i get happy, i really love its looks :) Thank you , Araq_ :)
10:28:09coffeepotI'm reading the first few chapters fleetingly in downtime atm but not dug in properly yet :)
10:28:58Araq_wuehlmaus: you're welcome
10:29:00coffeepotthe interesting stuff for me is further into the book :)
10:29:37dom96coffeepot: which parts interest you the most?
10:30:08*Sembei quit (Read error: Connection reset by peer)
10:31:12*Sembei joined #nim
10:31:36coffeepotconcurrency, building a twitter clone (and any web stuff as it's my weak area), metaprogramming (I use templates a lot but want to dig into the more powerful features as I have a strong need to DRY when coding) and interfacing with hardware (want to try nim with RPi & Arduino)
10:32:10*Trustable joined #nim
10:32:36dom96coffeepot: Cool. I'm working on the concurrency chapter right now.
10:33:18dom96Are you interested in sockets too by any chance?
10:33:32coffeepoti'm not too firm on the metaprogramming 'rules' so to speak: using expressions in templates still seems kind of magical to me aside from using them as 'super generics', so I only use them in a basic sense, but I'd like to know more about this so I'm not bumbling about
10:34:18dom96Yeah, explaining metaprogramming will be challenging.
10:34:34coffeepotnot that interested in sockets but good thing to learn. I'm interested in building json and/or rest api's for work, concurrently and with as few locks as possible, and serving web pages
10:35:45dom96Well, you might find Chapter 3 fun in any case. It includes JSON parsing, async sockets, a bit of multi-threading (to read from stdin without blocking) and more.
10:37:47*shevy joined #nim
10:44:29coffeepotwill check out cp3, is it available to view? Can imagine MP will be hard to explain, but in terms of showing off nim things like creating operator overloading with templates like the graphics module does is cool. Anything that creates procedures automatically really :)
10:45:10coffeepotalso {.borrow.} - saves so much boilerplate
10:45:46*RG92 joined #nim
10:49:41coffeepotthe json module is really nice actually, i tacked it onto my odbc lib so you can convert db records to json for easy transport. One line of code XD
10:57:43*derka joined #nim
11:00:18*RGeisel joined #nim
11:03:10dom96coffeepot: That's good, especially since I wrote much of its API :D
11:03:49federico3def-: I'm working on an async logger as well
11:04:33dom96I wonder if sharing news about my book on slashdot would be a good idea :P
11:05:30flyxonly if the distributor has a good server infrastucture.
11:07:04dom96Is Slashdot really still that popular?
11:08:35flyxI don't know the numbers, but most of the folks I know read it
11:11:49dom96Awesome
11:14:23*RGeisel quit (Quit: leaving)
11:14:37*RG92 quit (Quit: ChatZilla 0.9.92 [Firefox 44.0/20160123151951])
11:15:26*RGeisel joined #nim
11:17:42*RGeisel_ joined #nim
11:18:55*RGeisel__ joined #nim
11:19:00*RGeisel_1 joined #nim
11:22:40*RGeisel__ quit (Client Quit)
11:22:57*RGeisel__ joined #nim
11:23:16*RGeisel_1 quit (Client Quit)
11:23:20*RGeisel_ quit (Quit: leaving)
11:23:24*RGeisel quit (Quit: leaving)
11:23:32*RGeisel joined #nim
11:23:36*RGeisel_ joined #nim
11:23:47*RGeisel_1 joined #nim
11:24:53*RGeisel_2 joined #nim
11:25:00*RGeisel_3 joined #nim
11:25:03*RGeisel_4 joined #nim
11:25:08*RGeisel_5 joined #nim
11:26:07*lcm quit (Quit: Page closed)
11:26:24*RGeisel_4 quit (Client Quit)
11:26:27*RGeisel_3 quit (Client Quit)
11:26:30*RGeisel_2 quit (Client Quit)
11:26:32*RGeisel_5 quit (Client Quit)
11:27:40*RGeisel_2 joined #nim
11:28:20*filcuc joined #nim
11:28:27*RGeisel_3 joined #nim
11:28:49*RGeisel_3 quit (Client Quit)
11:28:53*RGeisel_2 quit (Client Quit)
11:29:44*RGeisel_2 joined #nim
11:29:50*RGeisel_3 joined #nim
11:30:10*RGeisel_2 quit (Client Quit)
11:30:14*RGeisel_3 quit (Client Quit)
11:30:41*RGeisel_2 joined #nim
11:30:46*RGeisel_3 joined #nim
11:31:06*mountaingoat quit (Ping timeout: 240 seconds)
11:39:27*RGeisel_4 joined #nim
11:39:41*RGeisel_4 quit (Client Quit)
11:40:20*dashed quit (Quit: Connection closed for inactivity)
11:45:02*mountaingoat joined #nim
11:59:54*lcm joined #nim
12:00:03*RGeisel_4 joined #nim
12:01:00*RGeisel_4 quit (Client Quit)
12:01:26*RGeisel_4 joined #nim
12:04:41*RGeisel_4 quit (Client Quit)
12:06:17*derka quit (Quit: derka)
12:17:05nivhello nim! i have a question about echo'ing objects
12:17:43nivwhen i do echo myObjInstance, it prints all fields. all fields need to be marked with *; if i make a field private, instead of not printing it, the echo fails with "undeclared field: 'xxx'". what gives?
12:18:34dom96echo doesn't have access to private fields, same way you don't :)
12:18:48nivyeees, but shouldnt it just skip them instead of breaking?
12:19:09dom96hrm, good point
12:19:11dom96bug report ;)
12:22:23nivdone
12:23:13nivoh, wait. i think there's a different issue at play
12:23:28Araq_no bug report.
12:23:38Araq_it's as it should be.
12:24:51nivbut .. isnt that really inconvenient? why would you want to error on private fields when echoing a object? no other language i know of does it this way
12:25:26Araq_it's consistent.
12:25:40Araq_$ for objects uses the fieldPairs iterator
12:25:51Araq_fieldPairs doesn't silently skip private fields
12:26:01Araq_that would be a desaster for serialization
12:26:25nivah, right. got it. i still think though that echo should just work(tm), not make the user write a custom $ just to print his object
12:26:52Araq_it's not clear what "just work(tm)" means in this context
12:27:05Araq_you currently want it to ignore private fields
12:27:13Araq_tomorrow you might want something else
12:27:24Araq_like: to just print them ffs for debugging
12:27:48nivwell, obviously there would need to be a spec, but is erroring and making the user do more work really the best option?
12:28:06Araq_it's the Go option.
12:28:48nivhey, well, it's your language :) im just saying, it was/is an annoyance for me atm
12:28:49Araq_when we are as successful as Go, we can depart from Go's strategy and actually provide something useful.
12:31:09Araq_wink!
12:31:33def-niv: for debugging you can use repr(), it works with private fields as well
12:32:03Araq_niv: more control would be cool, but the current behaviour is not a bug. it tells you you violate your data abstraction. or something.
12:32:04nivdef-: thanks
12:32:42nivAraq_: yeah got it and im all for a good data model. im just speaking from a enduser standpoint - didn't *expect* echo() to break on some objects
12:34:09nivwould it be terribly wrong to make echo just print all the fields it has access to, from whereever it's called?
12:34:43def-niv: i guess it would be confusing if `$` behaved differently depending on where it's called from
12:35:43nivyeah.
12:35:52coffeepotisnt the common practice to provide a proc`$`*(a: Mytype):string =
12:36:00nivthen again, a library user that just prints objects from somewhere else should be bothered about private fields in the first place
12:36:03def-coffeepot: yeah, that's what you should do
12:36:29nivshould = shouldn't
12:38:36Araq_C# up to version 4 at least didn't have a useful default toString implementation. C++ has none. C has none. Python outputs memory addresses iirc
12:39:02Araq_what are all the other languages that get right?
12:39:56nivalright, fair point. maybe it's just me mis-thinking about objects like tuples
12:40:36nivjs or ruby might not be the best design goal for nim, i guess
12:43:00Araq_I'm always willing to steal from Ruby if you can tell me what its default to_s does with private fields
12:44:57nivruby actually doesnt print any fields at all with to_s, you have to use #inspect. #inspect prints all fields, regardless of access - then again, ruby isnt too strict on that in the first place
12:45:18Araq_then again, we do have repr :P
12:45:57nivi'll see about writing my own helper i guess that just prints public fields :)
12:49:59nivdon't suppose there's a way to query if a field is public/private at runtime?
12:55:08def-niv: there is!
12:55:59def-well, at least if you're outside of the module: https://gist.github.com/def-/8a53578315edf5b2b885
12:56:18nivnice. thanks!
12:56:24nivappreciate your help
12:57:43flyxwhile reading this discussion, I'm wondering if my YAML serializer really needs its „serializable“ macro
12:58:00gokr1Araq_: Smalltalk prints "a User" (class being a User).
13:01:12flyxdoes fieldPairs iterate over fields of parent objects?
13:01:48def-flyx: i would assume so
13:03:23flyxindeed
13:03:32*flyx didn't know about fieldPairs
13:03:45*flyx might need to rewrite custom object YAML serialization
13:04:31*qazwsx joined #nim
13:10:48*AMorpork joined #nim
13:11:35*AMorpork left #nim (#nim)
13:11:48*AMorpork joined #nim
13:15:57*endragor quit (Remote host closed the connection)
13:17:27*endragor joined #nim
13:17:35*junw joined #nim
13:17:35*huonw_ quit (Ping timeout: 240 seconds)
13:19:30*huonw joined #nim
13:22:41*qazwsx quit (Quit: qazwsx)
13:46:39*qazwsx joined #nim
13:49:24*BitPuffin joined #nim
13:51:26*RGeisel_4 joined #nim
13:51:46*apotheon quit (Ping timeout: 240 seconds)
13:51:49*RGeisel_4 quit (Client Quit)
13:54:10*BitPuffin quit (Ping timeout: 256 seconds)
13:55:49*pregressive joined #nim
13:56:46*apotheon joined #nim
14:04:09*BitPuffin joined #nim
14:04:54coffeepotwill nim allow overriding of '=' in the future? If so, what kind of challenges will this bring with it?
14:05:20Araq_coffeepot: it already supports it but I'm not happy with the results
14:05:49coffeepotthat's good news, I can imagine it's tricky to get right in all circumstances
14:06:21coffeepotI'm assuming it'd be used like this proc `=`*(a: type) =
14:06:42coffeepotseems like it'd be complex with the gc interactions but idk
14:12:36*pregressive quit (Remote host closed the connection)
14:20:24*pregressive joined #nim
14:26:51*sparrk joined #nim
14:30:55*lompik quit (Ping timeout: 240 seconds)
14:37:20*Varriount_ joined #nim
14:39:06*Varriount__ joined #nim
14:39:47*Varriount quit (Ping timeout: 264 seconds)
14:41:22*Varriount joined #nim
14:41:46*Varriount_ quit (Ping timeout: 256 seconds)
14:42:19*sparrk quit (Quit: Leaving)
14:42:54*Varriount_ joined #nim
14:43:28*Varriount__ quit (Ping timeout: 256 seconds)
14:43:52*qazwsx quit (Quit: qazwsx)
14:44:08*Varriount__ joined #nim
14:46:23*Varriount quit (Ping timeout: 264 seconds)
14:47:37*Varriount_ quit (Ping timeout: 276 seconds)
14:48:17*Varriount joined #nim
14:48:32*pregressive quit (Read error: Connection reset by peer)
14:48:48*pregressive joined #nim
14:49:08*Varriount__ quit (Ping timeout: 256 seconds)
14:49:19*Varriount_ joined #nim
14:50:32*pregressive quit (Client Quit)
14:50:58*vangroan_ joined #nim
14:52:26*junw quit (Ping timeout: 240 seconds)
14:52:50*bozaloshtsh quit (Ping timeout: 276 seconds)
14:53:10*Varriount quit (Ping timeout: 272 seconds)
14:53:23*Varriount joined #nim
14:54:15*vangroan quit (Ping timeout: 245 seconds)
14:54:28*Varriount__ joined #nim
14:55:42*vangroan_ quit (Ping timeout: 272 seconds)
14:56:43*Varriount_ quit (Ping timeout: 276 seconds)
14:57:04*Varriount_ joined #nim
14:58:40*Varriount quit (Ping timeout: 276 seconds)
15:00:05*Varriount__ quit (Ping timeout: 245 seconds)
15:03:52*Varriount_ quit (Ping timeout: 276 seconds)
15:04:54*qazwsx joined #nim
15:07:00*endragor quit (Remote host closed the connection)
15:13:33dom96http://slashdot.org/submission/5509649/early-access-version-of-nim-in-action-now-available
15:15:04coffeepotnice. Incidentally, I've not been to slashdot for ages, love the irony that they now have crossposting to reddit, etc :)
15:17:11coffeepothuh... did not know slashdot and sourceforge were owned by the same company (and has now been sold). I actively avoid SF now since that adware scandal
15:19:14coffeepotnew SF owners "We disagree with some of the previous monetization strategies from an industry and business perspective" well, that's something...
15:19:18*junw joined #nim
15:23:08dom96Yeah, that surprised me as well
15:27:03gmpreussnerlove the "Writing an Async Logger in Nim" tutorial
15:27:11gmpreussnerthat's why nim is so awesome :)
15:27:49gmpreussnerthose who haven't seen it: http://hookrace.net/blog/writing-an-async-logger-in-nim/
15:33:01*bozaloshtsh joined #nim
15:35:20coffeepotbrilliant, cheers gmpreussner, interesting read
15:35:55gokr1Yeah, Dennis has brilliant articles there
15:36:30coffeepotthings like this are one of the many reasons I love coding in nim: const module = instantiationInfo().filename[0 .. ^5]
15:37:20coffeepoti wrote a multithreaded logger in pascal for use in services, and... well I just had to pass the name of the function as a string :(
15:38:24coffeepotalso: writeStackTrace() ... so useful for debugging
15:41:57Araq_def-: just read your article. superb.
15:41:59coffeepotthis is a great article that has a nice example of channels :D
15:46:33coffeepotactually it'd be nice if this kind of logger was in the stdlib
15:51:15gmpreussnerlogging requirements differ widely. might be too specific for the stdlib, unless it becomes even more generic
15:51:37*pregressive joined #nim
15:51:45gmpreussnerfor example, i would demand the ability to send logs over the network. not sure if that would be a good fit for the file based setup
15:54:55coffeepottrue. Having a threadded logger is pretty useful to have. I mean, it's almost inevitable that you'll need logging somewhere if only in debug code
15:55:54coffeepothow i've handled the generic aspect before is to have various standard channels; console, file, etc and a custom proc to hook into for say, network output
15:56:38gmpreussnerthat sounds reasonable. then you'd have one thread per log sink, i suppose?
15:56:48coffeepoti'd want to be able to say logger.logTo({llFile, llConsole, llCustom}); logger.custom = proc ...
15:58:00coffeepotyeah one thread per sink usually, but I've done it before with one thread in total and a queue with a struct that details where to send it
15:58:37coffeepotultimately it's easier to keep the log in order if you just have one logger thread
16:00:26coffeepotand it doesn't really matter if, say, sending to the network takes 2ms and a file 0.1ms if they're in order, as it's not blocking other threads, you just have a queue for messages. Having said that, I'm not sure how channels work if you have multiple threads sending data to a single logger thread
16:03:28coffeepotthinking about it one thread for the logger is probably best
16:03:57coffeepoteven with multiple outputs
16:04:01gmpreussneryep
16:04:48gmpreussnerbtw how do you detect --threads:on in code?
16:05:05coffeepotdefined(threads)?
16:05:28gmpreussneris that it?
16:05:39coffeepotthat reminds me, currently not possible to get the thread handle as it's private Thread.sys
16:07:41coffeepoti think that's it, yeah. defined will tell you if a cmd line param is passed, but not sure how to get the 'on' or 'off' bit
16:07:59*endragor joined #nim
16:09:45*gokr1 quit (Quit: Leaving.)
16:10:07dom96http://nim-lang.org/docs/system.html#compileOption,string
16:11:41*pregressive quit (Remote host closed the connection)
16:12:10*endragor quit (Ping timeout: 245 seconds)
16:12:13coffeepotahh nice one dom96, now i learn defined is for "-d:" params
16:15:43*Varriount joined #nim
16:16:48def-gmpreussner, Araq_: glad to hear that you like it :)
16:18:45gmpreussnerdef-: your website needs a RSS summary feed :)
16:18:54*bozaloshtsh quit (Ping timeout: 250 seconds)
16:18:57gmpreussnerright now the entire articles are included
16:19:47gmpreussnerare you on twitter? i started using twitter... again
16:20:00*bozalosh1sh joined #nim
16:20:09*AMorpork quit (Remote host closed the connection)
16:21:56*AMorpork joined #nim
16:22:35federico3def-: I have an async logging lib close to release
16:23:02federico3Initially it was meant to be part of the duke's lib, but he disappeared
16:23:58dom96hnwatcher.com is really handy for getting alerts when anybody mentions Nim
16:24:49*Dildosan left #nim ("Leaving")
16:27:51*AMorpork left #nim ("Leaving")
16:29:10*pwernersbach joined #nim
16:33:46def-dom96: i wish there was a more general way of being informed when something is referenced somewhere on the internet
16:34:13Araq_google?
16:34:34coffeepotspecifically https://www.google.co.uk/alerts
16:36:07def-coffeepot: tried that, didn't work reliably at all
16:36:35coffeepotyou're right, nice idea google, but not so great
16:38:12*lcm quit (Quit: Page closed)
16:38:25coffeepothaving said that it did just inform me that sdtimes makes mention of nim 0.13 coming out http://sdtimes.com/microsoft-announces-minecraft-education-edition-nim-0-13-0-is-out-and-google-allows-developers-to-create-promo-codes-sd-times-digest-jan-19-2016/
16:38:28coffeepoti'd not seen that
16:39:37dom96sdtimes seems like a poor site
16:39:42dom96that simply reposts news
16:40:21coffeepotyeah it does, still nice to see nim in the news
16:40:57coffeepotfree press innit :)
16:46:51dom96wow, I'm amazed that def's post on HN is on the front page with 4 upvotes.
16:47:54gmpreussnerwhen creating wrappers for C libraries, i often deal with enums whose values are computed, i.e. C = A + B. c2nim generates equivalent code for this, but it doesn't actually compile, because we can't perform arithmetic unless casting to ordinals.
16:48:03gmpreussnerhow do you guys usually deal with this?
16:48:39*pwernersbach_ joined #nim
16:48:50gmpreussneri also struggle will aliased enum value names. those always have to be declared as separate constants, which means they can't be used with pure enums
16:49:06*pwernersbach quit (Ping timeout: 252 seconds)
16:51:11Araq_gmpreussner: I usually map C enums to consts
16:51:29Araq_C enums just have nothing to do with any kind of type safety
16:53:06gmpreussneroh, i see, so you don't have enums at all. everything is just consts. hmm....
16:53:35gmpreussneri don't know, i think i'd like to have at least some level of safety
16:53:50gmpreussnereven tough it's not perfect, it would already help to catch the most common mistakes at compile time
16:54:16gmpreussneraccidentally using a wrong prefix might be a very hard to find bug otherwise
16:54:32gmpreussnerespecially if that same value's ordinal has meaning in the used context
16:55:05*AckZ joined #nim
16:58:59*qazwsx quit (Quit: qazwsx)
17:00:43*filcuc quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/)
17:05:29gmpreussneri'll think about it some more. it's probably ok the way it is
17:05:43gmpreussnerwe don't want C junk/limitations leak into Nim :)
17:06:46*bozalosh1sh quit (Ping timeout: 240 seconds)
17:06:54*aziz joined #nim
17:08:35*endragor joined #nim
17:10:06*CcxCZ quit (Ping timeout: 240 seconds)
17:11:49*CcxCZ joined #nim
17:12:20*pregressive joined #nim
17:14:40*endragor quit (Ping timeout: 245 seconds)
17:17:27*Salewski joined #nim
17:18:51Salewskigmpreussner: >how do you guys usually deal with this?
17:19:34SalewskiI think we can use sets of enums -- it was my plan for do that for some enums in GTK
17:22:34SalewskiI think I had done some basic tests already on year ago, I think it was ok. But one has to identify for which C enums one really needs sets. Of course plain (distint) int constants are simpler, but I like pure enums
17:22:56gmpreussneryeah, me too
17:23:11gmpreussnerimho pure should be default, but that's another discussion :)
17:23:33*pregressive quit (Remote host closed the connection)
17:25:15*Salewski quit ()
17:30:30*Jesin quit (Quit: Leaving)
17:52:26*qazwsx joined #nim
17:57:11*Jesin joined #nim
17:57:28*yglukhov quit (Ping timeout: 272 seconds)
17:58:29*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
18:09:57*pwernersbach_ quit (Ping timeout: 252 seconds)
18:11:22*endragor joined #nim
18:15:50*endragor quit (Ping timeout: 250 seconds)
18:25:20*qazwsx quit (Quit: qazwsx)
18:35:31*Matthias247 joined #nim
18:36:36*pregressive joined #nim
18:37:49*yglukhov joined #nim
18:42:10*yglukhov quit (Ping timeout: 260 seconds)
18:44:33*brson joined #nim
18:50:40*gokr joined #nim
18:51:10*gokr1 joined #nim
18:54:46*gokr quit (Ping timeout: 240 seconds)
18:55:27*lompik joined #nim
18:56:07*yglukhov joined #nim
18:56:54*aziz quit (Remote host closed the connection)
18:59:23*derka joined #nim
19:00:37*pwerner joined #nim
19:12:08*endragor joined #nim
19:12:33derkaHi guys
19:12:40derkagot a simple question for you
19:12:57derkaPython lovers are called pythonist or pythonistas
19:13:05derkahow do you call Nim programmers
19:13:16derkaNimrodian ?
19:14:00ldleworkNimian
19:14:02derkaNimrodian aspirations is the term used to denote an endeavor of materialistic philosophies to unite all society, nations, and/or humankind under ..
19:14:06derkaNimian ? really
19:14:06derkaok
19:14:33*Demon_Fox joined #nim
19:14:36VarriountI prefer Nimster
19:14:49*gokr1 quit (Quit: Leaving.)
19:14:49derkais there the equivalent of python import this somewhere in the code
19:15:01ldleworkNimdiot
19:15:21ldleworkderka: have you written any Nim yet?
19:15:23derkaNimocrat
19:15:32derkaI did a little little bit unfinished code
19:15:45derkacheck it here https://github.com/aallamaa/desirnim
19:16:38*endragor quit (Ping timeout: 272 seconds)
19:19:17derkahas a bit of meta programming in it
19:19:32derkathe library self generate the function at compile
19:19:47derkafunctionS
19:20:39*pregressive quit (Remote host closed the connection)
19:22:29*gokr joined #nim
19:28:59*lompik quit (Ping timeout: 264 seconds)
19:29:40def-derka: https://gist.github.com/def-/a72b39a25cd95252c464 import logo
19:29:56derkathx
19:43:31*yglukhov quit (Remote host closed the connection)
19:44:09*yglukhov joined #nim
19:45:12*vqrs quit (Max SendQ exceeded)
19:45:30*vqrs joined #nim
19:59:48*Varriount quit (Read error: Connection reset by peer)
20:02:17*pregressive joined #nim
20:02:24*yglukhov quit (Remote host closed the connection)
20:06:40pwernerderka: We're called Go deniers
20:06:46pwernerIf you believe HN ;)
20:06:49*gour quit (Quit: WeeChat 1.3)
20:07:02reactormonkpwerner, more like type lovers
20:08:45Sornaensishey guys why is Nim so amazing
20:08:49*Sornaensis cuddles Nim-lang
20:09:28*yglukhov joined #nim
20:11:32*BitPuffin quit (Ping timeout: 250 seconds)
20:20:11derkaNim is beautiful
20:20:23pwernerreactormonk: ha nice
20:20:24derkai have the same feeling i had when i’ve discovered python
20:20:27derkai just lack the REPL
20:20:34Araq_'nim secret'
20:20:42Araq_but I heard it's still unusable
20:21:17reactormonkAraq_, could probably tinker one with readline, and a tempfile via nim -r c
20:22:55*junw quit (Ping timeout: 240 seconds)
20:27:39derkaAraq you are good
20:29:24def-reactormonk: you mean like this? https://github.com/wheineman/nrpl
20:30:36reactormonkdef-, neat.
20:31:23*bjz_ joined #nim
20:31:46*bjz quit (Ping timeout: 240 seconds)
20:32:07derkaNimian or Nimonk ?
20:37:27*tinAndi joined #nim
20:44:18*derka quit (Quit: derka)
20:46:06*xificurC joined #nim
20:46:57gmpreussnerdom96: how do install local packages with nimble again? i don't have that package published on github yet. it's only on my PC right now.
20:47:12gmpreussnerwas it just nimble install localpath?
20:47:53*derka joined #nim
20:55:25*xtagon joined #nim
20:58:02*dom96_mobile joined #nim
20:58:37dom96_mobileGmpreussner: just cd into the directory of your local pkg then run 'nimble install'
20:59:03gmpreussnerawesome, thanks
21:05:06*dom96_mobile quit (Ping timeout: 240 seconds)
21:10:00*qazwsx joined #nim
21:14:09*Varriount joined #nim
21:26:40*darkf quit (Quit: Leaving)
21:28:12*jaco60 joined #nim
21:34:34*desophos joined #nim
21:56:16*bjz joined #nim
21:56:50*bjz_ quit (Ping timeout: 250 seconds)
21:58:43*bjz quit (Client Quit)
22:01:05*junw joined #nim
22:01:29*junw_ joined #nim
22:01:54ldleworkAnyone hiring for Nim?
22:02:22*junw quit (Read error: Connection reset by peer)
22:06:07wuehlmausderka: try tnim, i got used to it
22:07:36*derka quit (Quit: derka)
22:08:23wuehlmausi use tnim together with tcc which speeds up compiling a lot
22:09:53*gmpreussner quit (Quit: kthxbye)
22:10:05*derka joined #nim
22:13:20*gmpreussner joined #nim
22:14:02*theduke joined #nim
22:14:05thedukeexit
22:14:09*theduke left #nim (#nim)
22:19:27dom96ooh, somebody just submitted this on HN http://programmingthomas.com/blog/2015/1/27/nim-on-ios
22:20:35derkathx member:wuehlmaus
22:24:14wuehlmausderka: don't get confused, if you got an error, you have to hit \c to start anew. that was difficult for me to get used to. but it DOES help me a lot to try stuff of nim.
22:24:33derkaok
22:24:35ldleworkI just write /tmp/test.nim
22:24:36derkacool
22:24:43ldleworkand then nim c -r /tmp/test.nim
22:24:45ldleworkpretty easy
22:25:00ldleworkhelps me test stuff with nim ;)
22:25:38wuehlmausthere is another project done in python that helps to try out languages, it's called hsandbox
22:25:45wuehlmausi used that before.
22:41:04*Dildosan joined #nim
22:41:14*quark1 joined #nim
22:42:26*quark1 quit (Read error: Connection reset by peer)
22:42:28*junw joined #nim
22:43:06*quark1 joined #nim
22:43:55*junw_ quit (Ping timeout: 240 seconds)
22:46:45*junw quit (Ping timeout: 245 seconds)
22:46:46*bjz joined #nim
22:48:00gmpreussnerdom96: i see that dashes (-) in package names are deprecated in nimble. i got two questions: 1) is it ok to rename the package and repo on github and update the package.json, 2) what is the recommendation for package naming to make them unique?
22:53:57*saml quit (Remote host closed the connection)
22:55:04dom96gmpreussner: 1) Yes, but keep the old entry with the dash as an alias. 2) There isn't really one, do other package managers have one?
22:55:27gmpreussnernoidea
22:55:44gmpreussnerbut package names have to be unique in the package list, right?
22:55:51gmpreussneror does it distinguish by URL?
22:56:08gmpreussneri.e. can there be three different packages named 'opengl'?
22:56:25gmpreussneror would i have to come up with some sort of prefix or postfix?
22:58:26gmpreussnerPerl, Python and Java use namespaces
22:58:57gmpreussnerwould foo.bar.opengl be a valid package name?
22:59:14gmpreussneri don't think anyone uses any sort of namespaces for packages right now
23:00:25Araq_foo_bar_opengl ?
23:00:58Araq_why is everybody obsessed with dots?
23:01:06*yglukhov quit (Read error: Connection reset by peer)
23:01:13gmpreussnerjust an example. it can be anything, of course
23:01:22gmpreussnerfrom what i understand, Perl uses ::
23:01:42gmpreussnerunderscores work for me
23:01:50*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:03:49dom96package names have to be unique
23:05:31*derka quit (Quit: derka)
23:05:33dom96I don't think namespaces add that much
23:17:26*Dildosan quit (Quit: Leaving)
23:18:43*qazwsx quit (Quit: qazwsx)
23:19:53*yglukhov joined #nim
23:34:09*derka joined #nim
23:39:46*bjz joined #nim
23:40:39*xificurC quit (Quit: WeeChat 1.3)
23:40:46*derka quit (Quit: derka)
23:41:38*ehaliewicz joined #nim
23:41:38*ehaliewicz quit (Remote host closed the connection)
23:45:35*bjz_ joined #nim
23:45:36*bjz quit (Ping timeout: 250 seconds)
23:54:21*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:56:53*bjz joined #nim
23:59:52*zaquest quit (Ping timeout: 240 seconds)