<< 30-01-2016 >>

00:00:22*zaquest joined #nim
00:00:26*AckZ quit (Ping timeout: 240 seconds)
00:01:28*AckZ joined #nim
00:01:36*yglukhov quit (Read error: Connection reset by peer)
00:04:06*pwerner quit (Quit: Page closed)
00:07:57*pregressive quit (Remote host closed the connection)
00:13:05*yglukhov joined #nim
00:14:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:16:13*bjz joined #nim
00:18:56*bjz quit (Client Quit)
00:19:00*lompik joined #nim
00:20:15*bjz joined #nim
00:24:41*yglukhov quit (Remote host closed the connection)
00:31:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:36:15*bjz joined #nim
00:38:03*tinAndi quit (Remote host closed the connection)
00:40:06nchambersAraq_, dots make you a better programmer
00:40:09nchambersobviously
00:40:43Araq_like nails make a better coffin.
00:45:40*quark1 quit (Remote host closed the connection)
00:47:20TrustableHello guys, I have a problem with a very big array: https://gist.github.com/trustable-code/6f37481086380db9643f
00:47:44TrustableMaybe someone can tell me, why it does Segment fault
00:48:48*derka joined #nim
00:50:27Araq_Trustable: stack overflow
00:50:45Araq_very hard for Nim to detect thanks to the C backend
00:51:02Araq_stack size is usually 2MB
00:51:12Araq_and your array is 20MB or something
00:52:48*derka quit (Client Quit)
00:53:05TrustableHow can I place the variable on the heap?
00:53:26Araq_var x: ref array...
00:53:39Araq_or use a 'seq'
00:55:16*MyMind joined #nim
00:55:58Trustablethx, works :)
00:56:11*lg_` joined #nim
00:56:11Trustable(updated my gist)
00:56:38*apotheon_ joined #nim
00:57:28*BlaXpirit_ joined #nim
00:57:44*cyraxjoe_ joined #nim
00:58:57*devn_ joined #nim
00:59:07*ludocode_ joined #nim
00:59:19*liori_ joined #nim
00:59:42*delian66_ joined #nim
01:00:02*dv-_ joined #nim
01:02:59*nchambers^ joined #nim
01:04:00*apotheon quit (*.net *.split)
01:04:00*Sembei quit (*.net *.split)
01:04:01*lg_ quit (*.net *.split)
01:04:01*NhanH quit (*.net *.split)
01:04:01*nsf quit (*.net *.split)
01:04:01*nchambers quit (*.net *.split)
01:04:01*delian66 quit (*.net *.split)
01:04:02*liori quit (*.net *.split)
01:04:02*cyraxjoe quit (*.net *.split)
01:04:02*BlaXpirit quit (*.net *.split)
01:04:02*dv- quit (*.net *.split)
01:04:02*ludocode quit (*.net *.split)
01:04:02*mikolalysenko quit (*.net *.split)
01:04:03*vegansk quit (*.net *.split)
01:04:03*devn quit (*.net *.split)
01:04:03*BlaXpirit_ is now known as BlaXpirit
01:04:49*NhanH joined #nim
01:06:08*nsf joined #nim
01:06:40*vegansk joined #nim
01:07:14*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:09:13*mikolalysenko joined #nim
01:10:43*bjz joined #nim
01:11:54*Trustable quit (Remote host closed the connection)
01:14:44*ephja quit (Ping timeout: 256 seconds)
01:21:55*jaco60 quit (Ping timeout: 240 seconds)
01:21:57*mountain1 joined #nim
01:23:36*mountaingoat quit (Ping timeout: 250 seconds)
01:25:08*yglukhov joined #nim
01:26:18*gokr quit (Quit: Leaving.)
01:29:15*yglukhov quit (Ping timeout: 245 seconds)
01:33:15*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:34:33*bjz joined #nim
01:59:04*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:03:55*Matthias247 quit (Read error: Connection reset by peer)
02:04:51*liori_ is now known as liori
02:24:06*apotheon_ is now known as apotheon
02:24:24*apotheon quit (Changing host)
02:24:24*apotheon joined #nim
02:26:46*yglukhov joined #nim
02:31:34*yglukhov quit (Ping timeout: 276 seconds)
02:36:04*pregressive joined #nim
02:58:52*mountain1 is now known as mountaingoat
02:59:45*arnetheduck joined #nim
03:00:26*bjz joined #nim
03:15:14*brson quit (Quit: leaving)
03:28:29*yglukhov joined #nim
03:33:10*yglukhov quit (Ping timeout: 272 seconds)
04:25:57*outcastgeek joined #nim
04:26:59*outcastgeek quit (Client Quit)
05:14:06*apotheon quit (Ping timeout: 240 seconds)
05:14:45*apotheon joined #nim
05:19:39*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:22:58*exebook quit (Quit: Leaving)
05:29:57*yglukhov joined #nim
05:34:15*yglukhov quit (Ping timeout: 245 seconds)
05:47:46*lompik quit (Ping timeout: 240 seconds)
06:16:30*ldleworker joined #nim
06:16:55*ldleworker left #nim (#nim)
06:24:03*endragor joined #nim
06:28:35*endragor quit (Ping timeout: 265 seconds)
06:30:41*yglukhov joined #nim
06:31:06*darkf joined #nim
06:35:28*yglukhov quit (Ping timeout: 256 seconds)
06:39:34*endragor joined #nim
07:00:11*gour joined #nim
08:08:58*ggVGc quit (Ping timeout: 256 seconds)
08:11:49*Demon_Fox quit (Quit: Leaving)
08:19:22*yglukhov joined #nim
08:24:06*mikolalysenko quit (Ping timeout: 240 seconds)
08:24:06*yglukhov quit (Ping timeout: 265 seconds)
08:24:58*pregressive quit (Remote host closed the connection)
08:25:14*mikolalysenko joined #nim
08:25:14*pregressive joined #nim
08:25:43*pregressive quit (Remote host closed the connection)
08:26:18*pregressive joined #nim
08:30:26*pregressive quit (Ping timeout: 240 seconds)
08:35:27*yglukhov joined #nim
08:43:20*xtagon quit (Quit: Connection closed for inactivity)
08:49:07*yglukhov quit (Remote host closed the connection)
08:49:46*yglukhov joined #nim
09:08:03*RGeisel_4 joined #nim
09:10:39dom96Good morning everyone!
09:14:28*RGeisel_4 quit (Quit: leaving)
09:18:02*qazwsx joined #nim
09:19:15gourmorning all!
09:19:17wuehlmausdom96: good morning :)
09:19:26wuehlmausand all :)
09:32:35*RGeisel_4 joined #nim
09:40:33*RGeisel_5 joined #nim
09:49:39*RGeisel_5 quit (Quit: Lost terminal)
09:56:47*qazwsx quit (Quit: qazwsx)
10:00:51*Matthias247 joined #nim
10:03:06shevyI think there is a repository for all nim addons but does anyone remember the URl to it?
10:04:03dom96shevy: you mean all packages? https://github.com/nim-lang/packages
10:04:20Araq_wb shevy
10:04:36shevyah yes thanks
10:04:44shevyhi Araq with an underscore
10:10:27*derka joined #nim
10:23:09*derka quit (Quit: derka)
10:26:56*pregressive joined #nim
10:31:46*pregressive quit (Ping timeout: 256 seconds)
10:39:02endragorHow can I interface with a C++ method accepting method pointer? (type and method name that have to be passed are known at compile time). Example of what I'm trying to achieve: https://gist.github.com/endragor/a3b84a13345525e92550
10:40:45Araq_endragor: there is no way except to have a wrapper in the .emit that allows you to use a C function pointer instead
10:41:22Araq_method pointers have no unique binary representation and Nim doesn't know about them either
10:42:42*mat4 joined #nim
10:48:43*ephja joined #nim
10:49:49*desophos quit (Read error: Connection reset by peer)
10:52:56mat4hello, working on the environment for my compiler project, I stumbled on a special problem. The environment need to be romable and this mean all memory allocation must be static. One array is a buffer for compiled code which should be page aligned (AMD64, NX bit). Exist there a Nim pragma for such cases ?
10:53:00*silven quit (Ping timeout: 245 seconds)
10:53:46*silven joined #nim
10:54:09*derka joined #nim
10:55:56endragorAraq_: Thanks. But can't I just emit the code in expected C++ form? I tried something like this: {.emit: "`testObj`->methodPtrTest(`objPtr`, & $1::$2);".format(T.name, methodName).}
10:56:14mat4For Posix compatible operating-systems there exist the function posix_memalign which remap memory regions which I can use. However the Posix module don't import this function
10:56:34Araq_mat4: please add it and make a PR
10:56:46endragorthat didn't work, because it seems pointers/refs do not work in backtricks, so "objPtr" was outputted as is.
10:57:12Araq_that depends on your local scope
10:58:01Araq_if you do it in a template, the template needs to be .dirty iirc
10:58:02mat4Araq_: ok, I add it to my to-do list
11:02:06*yglukhov quit (Read error: Connection reset by peer)
11:05:54mat4Araq_: however, independent of possible solution to my problem, data alignement is a requirement for at least most SIMD CPU extensions I know so there should be some language support for it
11:06:26mat4^solution(s)
11:06:48Araq_seqs of floats are aligned so SIMD works on them, but that's a lucky incidence
11:07:05Araq_you can assert alignment at runtime for now though and call it a day
11:07:27Araq_I'm aware of this issue and support for it will only get better
11:08:50endragorAraq_ marking the template as dirty still doesn't work :( I've added things I've tried as a comment to the Gist (https://gist.github.com/endragor/a3b84a13345525e92550). Would greatly appreciate the help.
11:13:20*yglukhov joined #nim
11:16:26Araq_endragor: that's bad, maybe I can fix it later for you
11:19:19endragorAraq_: so it is supposed to work? alright, thank you! I'll assume for now that it will be working at a later point :)
11:22:42Araq_it's certainly something worth supporting, you're not the first one to report it
11:23:14Araq_the spec doesn't claim it needs to work, templates don't have to know about backticks in .emit statements ... :P
11:23:34Araq_the .emit statement itself is an implementation specific pragma
11:23:38Araq_bbl
11:25:36*apotheon quit (Ping timeout: 256 seconds)
11:29:39*apotheon joined #nim
11:34:38*apotheon_ joined #nim
11:34:40*apotheon quit (Ping timeout: 256 seconds)
11:41:04*jaco60 joined #nim
11:41:05*yglukhov quit (Read error: Connection reset by peer)
11:43:50*yglukhov joined #nim
11:45:59*vendethiel joined #nim
11:54:53mat4ciao
11:54:56*mat4 quit (Quit: Verlassend)
11:56:01*yglukhov quit (Remote host closed the connection)
11:57:44*derka quit (Quit: derka)
12:03:34*apotheon_ quit (Ping timeout: 256 seconds)
12:04:40*qazwsx joined #nim
12:07:01*Dildosan joined #nim
12:08:05*apotheon joined #nim
12:09:19*derka joined #nim
12:11:32*Matthias247 quit (Read error: Connection reset by peer)
12:16:43*derka quit (Quit: derka)
12:17:46*derka joined #nim
12:27:41*pregressive joined #nim
12:29:12*yglukhov joined #nim
12:32:14*pregressive quit (Ping timeout: 250 seconds)
12:35:23Araq_endragor: try to concat the .emitted string, so that the template can recognize its parameters
12:44:58*saml_ joined #nim
12:49:31*yglukhov quit (Remote host closed the connection)
13:17:46*qazwsx quit (Quit: qazwsx)
13:18:36*qazwsx joined #nim
13:20:42*derka quit (Ping timeout: 250 seconds)
13:25:31endragorAraq_: what exactly should I concat? btw, for now I ended up implementing a macro that constructs and outputs the required .emit statement
13:26:03Araq_.emit: """code here""" & templateParam & """more code here"""
13:30:21endragorthat makes it try to concat objects themselves, while we need to concat their identifiers
13:36:01Araq_so use astToStr(templateParam)
13:36:21Araq_or name(...) or whatever
13:36:26*vendethiel quit (Ping timeout: 240 seconds)
13:49:17*vendethiel joined #nim
13:49:56*qazwsx quit (Quit: qazwsx)
13:50:02*yglukhov joined #nim
13:54:15*yglukhov quit (Ping timeout: 245 seconds)
13:55:38*Salewski joined #nim
13:57:48SalewskiStatic function variables in Nim? For iterators that is the default. But for ordinary proc? Was not able to find that fast in Manual or with google. For Swift it is similar to C: http://stackoverflow.com/questions/25354882/static-function-variables-in-swift
14:02:30*qazwsx joined #nim
14:03:43Araq_it's not the default for iterators either, no idea what you're talking about
14:03:56Araq_a static variable is a .global in Nim.
14:07:56SalewskiThanks -- it is easy to find when one knows that. Maybe we should mention global pragma in manual where variables are discussed. Google is not always that helpful for term "Nim static". Bye.
14:10:55*arnetheduck quit (Ping timeout: 245 seconds)
14:11:38SalewskiFor iterators, I refered to this statement in manual: "The iterator's local variables and execution state are automatically saved between calls." I was not able to remember global pragma, now problem is solved.
14:11:43SalewskiBye.
14:11:46*Salewski quit ()
14:28:17*pregressive joined #nim
14:31:28*CcxCZ quit (Ping timeout: 256 seconds)
14:32:42*pregressive quit (Ping timeout: 250 seconds)
14:36:35*qazwsx quit (Quit: qazwsx)
14:49:38*lompik joined #nim
15:07:44*NimBot joined #nim
15:09:35*pregressive joined #nim
15:10:55*vendethiel quit (Ping timeout: 245 seconds)
15:12:48*nchambers^ is now known as nchambers
15:13:46*pregressive quit (Ping timeout: 240 seconds)
15:14:58*yglukhov joined #nim
15:22:16*gokr joined #nim
15:23:56*vendethiel joined #nim
15:25:21dom96http://forum.nim-lang.org/t/1992
15:26:30*yglukhov quit (Read error: Connection reset by peer)
15:27:05*yglukhov joined #nim
15:31:34*silven quit (Ping timeout: 250 seconds)
15:31:55*silven joined #nim
15:43:24*cyraxjoe_ quit (Ping timeout: 272 seconds)
15:45:06*cyraxjoe joined #nim
15:45:23*vendethiel quit (Ping timeout: 265 seconds)
15:46:05*jsudlow joined #nim
15:49:15*gokr quit (Ping timeout: 265 seconds)
15:50:59*yglukhov quit (Remote host closed the connection)
15:52:37gmpreussnerdoes {.noInit.} already work on vars?
15:52:45*gokr joined #nim
15:52:54gmpreussneri have: var foo {.noInit.}: Foobar
15:53:06gmpreussnergetting Warning: Cannot prove that 'foo' is initialized. This will become a compile time error in the future. [ProveInit]
15:53:27gmpreussnerwhen passing foo to a proc that will initialize it
15:54:04gmpreussneri guess the warning is on the proc call, not the var
15:55:08gmpreussneri'm passing addr(foo) to the proc. is there a way to do this? Foobar is an object containing sub-objects. it's for an API wrapper, so i have little choice in chaning the proc
15:57:54*Dildosan quit (Remote host closed the connection)
15:57:58*yglukhov joined #nim
16:00:01Araq_gmpreussner: the problem is that 'var T' means reads/writes
16:00:20Araq_we need 'out T' to fix this which would mean "must write before read"
16:01:25gmpreussnerah yes, that makes sense
16:03:14gmpreussnerAraq_: what would be the workaround for now? constructing the object will get very noisy, because of the sub-objects that need to be initialized, too
16:04:12Araq_don't use types that inject .requiresInit
16:04:26Araq_that would be range[1..100] for example
16:04:32*theduke joined #nim
16:05:56gmpreussnerhmm... what about enums?
16:06:12gmpreussnereverything else just boils down to ints and uints
16:08:06gmpreussneryeah, initializing the enum values worked. thanks!
16:10:26*darkf_ joined #nim
16:12:22*darkf quit (Ping timeout: 250 seconds)
16:13:36*gokr quit (Quit: Leaving.)
16:15:05*yglukhov quit (Ping timeout: 245 seconds)
16:16:12*vendethiel joined #nim
16:21:04*sparrk joined #nim
16:23:20*yglukhov joined #nim
16:25:22sparrkHow does one pass a count table by reference instead of making a copy? See: https://gist.github.com/anonymous/2cc615c1814e1c6c4e22
16:25:23*yglukhov quit (Remote host closed the connection)
16:25:40sparrkI would expect that to have the value of 2 for penalty
16:26:00Araq_use CountTableRef ?
16:26:36*kulelu88 joined #nim
16:27:04sparrkAhh, thanks
16:27:07sparrkMissed that
16:27:16*yglukhov joined #nim
16:32:37*desophos joined #nim
16:36:45*yglukhov quit (Remote host closed the connection)
16:39:03*yglukhov joined #nim
16:40:16*derka joined #nim
16:45:43*Matthias247 joined #nim
16:52:24*sparrk quit (Quit: Leaving)
17:06:28pigmejdom96: I just bought your book :)
17:06:43dom96pigmej: yay, thank you!
17:08:10dom96pigmej: Let me know what you think as you read it, or if you have any questions :)
17:09:39*darkf_ is now known as darkf
17:14:30pigmejdom96: yeah I will
17:14:40pigmeji will need time to read it first :D
17:17:48*darkf quit (Ping timeout: 250 seconds)
17:17:54*darkf_ joined #nim
17:20:11*pregressive joined #nim
17:25:50*yglukhov quit (Remote host closed the connection)
17:29:28*Varriount_ joined #nim
17:33:04nchamberswait dom96 wrote a book?
17:33:08*Varriount quit (Ping timeout: 276 seconds)
17:33:16*yglukhov joined #nim
17:36:16dom96nchambers: http://nim-lang.org/news.html#Z2016-01-27-nim-in-action-is-now-available
17:36:28nchambersI need to be on that forum more
17:37:03nchamberswhat is the book about irt the nim language?
17:44:31pigmejdom96: in speed comparsion you should probably note that it was compared to CPython
17:49:57dom96pigmej: good point, will do. Thanks.
17:51:07dom96nchambers: The book teaches how to program in Nim.
17:51:14nchambersah
17:51:43*kulelu88 quit (Quit: Leaving)
17:53:46*derka quit (Ping timeout: 256 seconds)
17:54:47*derka joined #nim
17:58:16*bozaloshtsh joined #nim
18:21:13*brson joined #nim
18:26:59*Jesin quit (Quit: Leaving)
18:38:35*saml_ quit (Ping timeout: 240 seconds)
18:38:56gmpreussnerdom96: i renamed all my packages. no conflicts. hooray :)
18:39:23dom96gmpreussner: awesome, thank you!
18:44:36*darkf_ is now known as darkf
18:46:45*def- quit (Ping timeout: 245 seconds)
18:50:31*pregressive quit (Remote host closed the connection)
18:51:07*pregressive joined #nim
18:55:18*pregressive quit (Ping timeout: 250 seconds)
18:57:27*Matthias247 quit (Read error: Connection reset by peer)
19:08:04*Jesin joined #nim
19:08:23jsudlowHi @ll, https://gist.github.com/jsudlow/08004cc517bb78e00276 when I create a basic person type I can instantiate the object and everything works fine. However If I want to import the file that contains the type like this https://gist.github.com/jsudlow/cccbe62623940b2605ce
19:09:35jsudlowI get an undeclared identifer, is there a proper way in nim to utilize imported procs and types succesfully?
19:12:45jsudlowoh i'm sorry guys I figured it out
19:12:50jsudlowyou have to use an *
19:19:42*Demon_Fox joined #nim
19:28:16gmpreussnerjsudlow: type Person* = object
19:28:24gmpreussnerthe '*' will export the symbol
19:28:38gmpreussnersimilarly: proc greet*(p: Person)
19:30:18*derka_ joined #nim
19:32:05*derka quit (Ping timeout: 276 seconds)
19:32:05*derka_ is now known as derka
19:34:17jsudlowthanks gmpresussner! I'm starting to get something cooking over here now
19:36:28shevysupper!
19:41:33*def- joined #nim
19:53:23gmpreussnerAraq_: generic templates aren't supported yet, right?
19:55:50gmpreussneri'm getting compile errors when not explicitly specifying the template parameter, and a '(Attempt to read from nil?)' when specifying it
19:56:20gmpreussnerSIGSEGV: Illegal storage access in the compiler that is
20:01:06def-gmpreussner: works for me with a simple example
20:08:04gmpreussnerdef-: i guess my case is not super simple
20:08:11gmpreussneri don't have a minimal repro right now, but try this: https://gist.github.com/gmpreussner/d0432e5891a5ce58d0bc
20:09:55def-yeah, looks like a bug
20:16:20*endragor quit (Ping timeout: 245 seconds)
20:41:21*shevy left #nim ("I'll be back ... maybe")
20:46:20*yglukhov quit (Read error: Connection reset by peer)
20:46:52*yglukhov joined #nim
21:00:53*k1io- quit (Remote host closed the connection)
21:02:27*brson quit (Quit: leaving)
21:05:23*k1io joined #nim
21:07:44*wireddude joined #nim
21:10:19*yglukhov quit (Remote host closed the connection)
21:16:18*wireddude quit (Quit: Mutter: www.mutterirc.com)
21:16:43*wireddude joined #nim
21:25:27*wireddude quit (Remote host closed the connection)
21:25:44*wireddude joined #nim
21:41:14*Jesin quit (Quit: Leaving)
21:42:21*wireddude quit (Remote host closed the connection)
21:54:45*darkf quit (Quit: Leaving)
22:01:24*brson joined #nim
22:02:14Araq_gmpreussner: already fixed it
22:02:30gmpreussneryay, thanks :)
22:02:36Araq_as I keep saying, don't waste your time producing minimal tests, I barely looked at your code
22:04:36*apotheon quit (Ping timeout: 250 seconds)
22:11:52*pregressive joined #nim
22:16:54*pregressive quit (Read error: Connection reset by peer)
22:17:19*pregressive joined #nim
22:22:35*apotheon joined #nim
22:25:55*derka quit (Ping timeout: 240 seconds)
22:27:38*derka joined #nim
22:32:01*CcxCZ joined #nim
22:35:01*wireddude joined #nim
22:48:16*derka_ joined #nim
22:50:06*derka quit (Ping timeout: 240 seconds)
22:50:09*derka_ is now known as derka
22:51:36*gour quit (Quit: WeeChat 1.3)
23:00:20*wireddude quit (Quit: Mutter: www.mutterirc.com)
23:00:47*wireddude joined #nim
23:07:52*wireddude quit (Ping timeout: 276 seconds)
23:08:23*wireddude joined #nim
23:08:23*mikolalysenko_ joined #nim
23:10:01*silven_ joined #nim
23:10:42*mikolalysenko quit (Ping timeout: 240 seconds)
23:10:42*CcxCZ quit (Ping timeout: 240 seconds)
23:10:45*silven quit (Ping timeout: 240 seconds)
23:10:45*nsf quit (Ping timeout: 240 seconds)
23:11:32*mikolalysenko_ is now known as mikolalysenko
23:11:44*nsf joined #nim
23:16:28*CcxCZ joined #nim
23:16:59*wireddude quit (Ping timeout: 264 seconds)
23:56:58*Matthias247 joined #nim