<< 23-05-2015 >>

00:04:15*lll joined #nim
00:16:03*vbtt_ quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
00:16:19*kumool quit (Ping timeout: 255 seconds)
00:20:34*pregressive joined #nim
00:24:27*Sembei joined #nim
00:24:54*taesoo quit (Ping timeout: 256 seconds)
00:25:12*vaedd joined #nim
00:25:49reactormonkAraq, btw, kick the JS backend and go for emscripten?
00:26:11*boydgreenfield quit (Quit: boydgreenfield)
00:28:33*brson quit (Ping timeout: 258 seconds)
00:29:18fowljust make it emit typescript or something
00:30:53reactormonkhmm
00:32:21*pregressive quit (Remote host closed the connection)
00:34:26*MyMind joined #nim
00:36:35*Sembei quit (Ping timeout: 244 seconds)
00:38:22*wedowmaker joined #nim
00:48:06*havenwood joined #nim
00:49:23*TEttinger quit (Ping timeout: 246 seconds)
00:50:18*gsingh93 quit (Ping timeout: 265 seconds)
01:04:15federico3is there a mailing list and/or is the forum delivered as a mailing list?
01:08:24federico3is there a mailing list and/or is the forum delivered as a mailing list?
01:14:04*vendethiel joined #nim
01:19:38*adu joined #nim
01:25:14*wb quit (Ping timeout: 245 seconds)
01:34:41flaviufederico3: there is a mailing list, the forum is not delivered as a mailing list.
01:35:10flaviuThere were plans to do make the forum work like a mailing list, but I guess no one got around to it.
01:35:34flaviuThe volume on the mailing list is extremely low, I don't think I've gotten anything this month.
01:37:31flaviuhttp://www.freelists.org/list/nim-dev
01:38:08flaviuVarriount: Are you an admin on the forum? http://forum.nim-lang.org/t/1254 is spam.
01:54:34*adu quit (Ping timeout: 265 seconds)
01:55:10*ddl_smurf quit (Quit: ddl_smurf)
02:22:31*havenwood quit ()
02:22:54*havenwood joined #nim
02:23:15*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:29:11*pipeep joined #nim
02:33:48*vendethiel quit (Ping timeout: 265 seconds)
02:33:54*tripleplus joined #nim
02:34:17tripleplushow do i echo() without a trailing newline?
02:34:53tripleplusi've tried stdout.write, but the behavior there was not exactly what i was looking for.
02:35:19tripleplusi'm on osx 10.10, fwiw
02:35:28*havenwood left #nim (#nim)
02:35:47tripleplusnim v0.11.2
02:39:44reactormonknope, echo includes the trailing newline. that's kinda the definition.
02:50:39*darkf joined #nim
02:57:16tripleplusreactormonk: fair enough. how do i output text without an implied newline?
02:58:02tripleplusbtw, where is that definition (i assume you mean nim's since that's definitely not definitive behavior in all contexts for, say, bash)?
02:58:11fowlWrite a function that calls stdout.write then stdout.flush
02:58:17tripleplusi looked wround for echo and write documentation, but wasn't able to find it.
02:58:33tripleplusi'm sure i'm being braindead.
02:58:41tripleplusfowl: thanks, will try that now.
03:00:19fowltripleplus: http://nim-lang.org/docs/theindex.html covers the stdlib and manual
03:00:44Varriountflaviu: Unfortunately, no, I am not an admin on the forum.
03:02:40*banister joined #nim
03:04:29Varriountfowl: You need, like, a 'Macro Master' award.
03:09:03*saml_ quit (Ping timeout: 250 seconds)
03:09:54tripleplusfowl: i'm having a difficult time getting stdout.flush to work (Error: undeclared identifier: 'flush')
03:10:12fowlVarriount: macros are definitely my favorite feature
03:10:29fowltripleplus: sorry its called flushFile maybe, let me look
03:10:54fowlYea that's it
03:11:06tripleplusah, k, ty sir
03:11:20tripleplusor ma'am, sorry, showing my bias
03:14:37tripleplusfowl: yep, sure enough, that did it
03:31:57*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:32:29*kumul joined #nim
03:35:23*kumool joined #nim
03:39:10*kumul quit (Ping timeout: 252 seconds)
03:52:06*tripleplus quit (Ping timeout: 265 seconds)
03:52:36*taesoo joined #nim
03:54:11*pregressive joined #nim
04:19:14*gsingh93 joined #nim
04:38:29*intra quit (Ping timeout: 258 seconds)
04:48:29*tripleplus joined #nim
04:53:04*tripleplus quit (Ping timeout: 255 seconds)
04:56:23*adu joined #nim
05:00:24*Zerthis joined #nim
05:02:48*Zerthis_ALT joined #nim
05:06:03*Zerthis quit (Ping timeout: 250 seconds)
05:10:44*taesoo quit (Ping timeout: 264 seconds)
05:18:21*BitPuffin|osx quit (Ping timeout: 258 seconds)
05:34:32*strcmp2 joined #nim
05:36:54*strcmp1 quit (Ping timeout: 245 seconds)
05:46:00*gsingh93 quit (Ping timeout: 272 seconds)
05:47:13*pregressive quit (Remote host closed the connection)
05:49:20*tripleplus joined #nim
05:53:49*tripleplus quit (Ping timeout: 255 seconds)
05:55:08*intra joined #nim
06:25:44*nande quit (Remote host closed the connection)
06:50:11*tripleplus joined #nim
06:55:21*tripleplus quit (Ping timeout: 276 seconds)
07:00:28*strcmp2 quit (Ping timeout: 252 seconds)
07:16:00*adu quit (Ping timeout: 265 seconds)
07:35:58*Zerthis_ALT left #nim ("Textual IRC Client: www.textualapp.com")
07:40:21*darkf_ joined #nim
07:43:30*darkf quit (Ping timeout: 256 seconds)
07:48:48*filcuc joined #nim
07:50:57*tripleplus joined #nim
07:53:09*synthmeat quit (Quit: WeeChat 1.3-dev)
07:54:53*synthmeat joined #nim
07:55:21*tripleplus quit (Ping timeout: 240 seconds)
07:58:19*kumool quit (Quit: Leaving)
07:59:48*ddl_smurf joined #nim
08:05:31*IronY is now known as sadasdas
08:05:41*sadasdas is now known as IronY
08:15:45*Senketsu quit (Quit: Leaving)
08:26:52*IronY is now known as test
08:27:10*test is now known as IronY
08:32:54*boopisaway is now known as boop
08:45:54*BlaXpirit joined #nim
08:47:57*pregressive joined #nim
08:51:40*tripleplus joined #nim
08:51:57*filcuc quit (Quit: Konversation terminated!)
08:52:09*pregressive quit (Ping timeout: 240 seconds)
08:56:38*tripleplus quit (Ping timeout: 272 seconds)
09:01:16*strcmp2 joined #nim
09:21:20ggVGcwhat nim type maps to const char*?
09:21:52ggVGcI need to implement a function taking const char* as an argument in Nim and use it from C
09:22:52*wb joined #nim
09:23:58dom96ggVGc: cstring
09:27:47ggVGcdom96: thats char* though. how do i make it immutable
09:29:44dom96it'll be immutable in Nim by default
09:29:50*xcombelle joined #nim
09:33:37AraqggVGc: doesn't matter for ABI compatibility
09:34:12ggVGcAraq: yeah, but it makes other code error. Do I have to wrap the nim function?
09:35:22*vendethiel joined #nim
09:37:41AraqI have not enough context to answer that question
09:37:42*Matthias247 joined #nim
09:39:27ggVGcAraq: all I wonder is if there's any datatype in nim that maps to const char*. otherwise I'll just wrap the generated function from nim in one that takes const char* so it doesn't break with already existing code
09:39:47*boop is now known as boopisaway
09:41:37Araqno idea. "const char* " is 'cstring', "char*" is 'cstring' too. Nim has no notion of C's const
09:52:23*tripleplus joined #nim
09:56:49*tripleplus quit (Ping timeout: 255 seconds)
10:04:48*IronY is now known as irony
10:04:54*irony is now known as IronY
10:06:34*Ven joined #nim
10:11:21*jbomo quit (Ping timeout: 240 seconds)
10:33:11*pkoretic joined #nim
10:39:35*Gonzih joined #nim
10:53:09*tripleplus joined #nim
10:57:20*tripleplus quit (Ping timeout: 246 seconds)
11:02:02*juturna joined #nim
11:02:42*darkf_ is now known as darkf
11:07:27*filcuc joined #nim
11:15:29*Matthias247 quit (Quit: Matthias247)
11:22:56*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:28:46*Trustable joined #nim
11:30:34*banister joined #nim
11:30:38*banister quit (Max SendQ exceeded)
11:41:53*banister joined #nim
11:47:15*Kingsquee quit (Quit: Konversation terminated!)
11:47:35*dddddd joined #nim
11:52:44*Sembei joined #nim
11:53:58*tripleplus joined #nim
11:56:53*JinShil joined #nim
11:58:09*tripleplus quit (Ping timeout: 245 seconds)
12:02:49*Ven joined #nim
12:09:12*xcombelle quit (Ping timeout: 252 seconds)
12:19:28*johnsoft quit (Ping timeout: 252 seconds)
12:20:31*johnsoft joined #nim
12:24:56*gokr joined #nim
12:38:35*milosn quit (Quit: leaving)
12:54:42*tripleplus joined #nim
12:59:20*tripleplus quit (Ping timeout: 276 seconds)
13:01:21*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:07:08*Jesin quit (Read error: Connection reset by peer)
13:17:21*syncn quit (Ping timeout: 240 seconds)
13:19:25*syncn joined #nim
13:21:08*taesoo joined #nim
13:24:11*kumul joined #nim
13:27:51*Ven joined #nim
13:30:08*Jesin joined #nim
13:35:04*boopisaway is now known as boop
13:43:26*TEttinger joined #nim
13:44:26*BlaXpirit-UA joined #nim
13:47:27*BlaXpirit quit (Ping timeout: 256 seconds)
13:48:26*JinShil quit (Quit: Konversation terminated!)
14:02:10*OnO joined #nim
14:02:27*milosn joined #nim
14:09:37*flaviu quit (Remote host closed the connection)
14:11:44*flaviu joined #nim
14:32:41*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
14:43:50*kumul quit (Ping timeout: 272 seconds)
14:53:21*stefantalpalaru joined #nim
14:55:59stefantalpalaruHi. What's the simplest way of getting an identifier from a string in regular code? i.e. go from "foo" to foo where foo is a variable. Do I have to write a macro or there's something similar already?
14:56:23*tripleplus joined #nim
14:56:46*kumul joined #nim
14:57:42*kumool joined #nim
14:58:21dom96stefantalpalaru: Macro is the way to go I think
14:59:48*gsingh93 joined #nim
15:00:39*tripleplus quit (Ping timeout: 245 seconds)
15:01:55stefantalpalaruOK, thanks
15:02:11*kumul quit (Ping timeout: 276 seconds)
15:03:20*darkf quit (Quit: Leaving)
15:05:52*jefus quit (Ping timeout: 272 seconds)
15:17:07*johnsoft quit (Quit: Leaving)
15:22:23*superfunc joined #nim
15:22:24*Siecje joined #nim
15:25:20*gsingh93 quit (Ping timeout: 256 seconds)
15:31:38*stefantalpalaru quit (Quit: Leaving)
15:33:10*banister quit (Read error: Connection reset by peer)
15:35:08*banister joined #nim
15:48:18*gsingh93 joined #nim
15:50:12*johnsoft joined #nim
15:52:59*pregressive joined #nim
15:55:22*sepisoad joined #nim
15:56:59*tripleplus joined #nim
15:57:32*boop is now known as boopisaway
16:01:45*tripleplus quit (Ping timeout: 256 seconds)
16:09:14*BlaXpirit-UA quit (Quit: Quit Konversation)
16:11:19*BlaXpirit joined #nim
16:12:47*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:13:39*filcuc quit (Ping timeout: 256 seconds)
16:14:06*sepisoad_ joined #nim
16:17:13*sepisoad quit (Ping timeout: 264 seconds)
16:22:15*stefantalpalaru joined #nim
16:23:05stefantalpalaruHow can I use typedesc as table values?
16:24:29*boopisaway is now known as boop
16:26:39*Matthias247 joined #nim
16:39:02*boop is now known as boopisaway
16:40:16flaviustefantalpalaru: You can make them strings.
16:40:38flaviuI'm pretty sure that the actual typedesc value is only available at compile time.
16:40:44*boopisaway is now known as boop
16:41:21stefantalpalaruOK, and how do I go from string to typedesc afterwards?
16:41:50flaviuAt runtime? You can't.
16:42:14flaviuYou might be able to serialize the interesting parts of the typedesc at compile time and access those at run time.
16:45:45*kumool quit (Ping timeout: 240 seconds)
16:45:50*fowl quit (Remote host closed the connection)
16:53:57*TEttinger quit (Ping timeout: 264 seconds)
16:57:03Varriountstefantalpalaru: You might be more interested in the typeinfo module
16:57:18*Siecje1 joined #nim
16:57:19*notfowl joined #nim
16:57:24*Siecje quit (Ping timeout: 252 seconds)
16:57:43*tripleplus joined #nim
16:57:47*Siecje1 left #nim (#nim)
16:58:06onionhammerVarriount u figure out the doc comment stuff?
17:02:21*tripleplus quit (Ping timeout: 265 seconds)
17:03:23flaviuWhat's the status of the rodwrite/rodread?
17:03:48*tripleplus joined #nim
17:08:53*tripleplus quit (Quit: WeeChat 1.1.1)
17:13:03*Ven_ joined #nim
17:13:30*vendethiel quit (Ping timeout: 276 seconds)
17:13:47flaviuIt hasn't been touched since 2013-05-04, so I guess I'll draw my own conclusions.
17:14:43*vendethiel joined #nim
17:30:35*jbomo joined #nim
17:30:40*jbomo quit (Client Quit)
17:33:52flaviuSo rodfiles use their own custom serialization format? :O
17:36:25flaviuAnd there's a YAML backend?
17:38:13flaviuThe AST is manually serialized to YAML :/
17:41:26sepisoad_how to immediately get notified when a thread calls send on a channel without having to check the channle using tryRecv function
17:42:33sepisoad_like defining a callback function and get it called when the thread is done
17:43:20sepisoad_do we have a native event loop in nim?
17:43:43sepisoad_so the we can poll for events without wasting cpu time
17:46:55Araqsepisoad_: yes, we have async io
17:47:11Araqbut theads don't work with it yet :P
17:47:13sepisoad_but it's deprecated as stated in the documents
17:47:22sepisoad_oh, noo
17:47:25Araqnah, it's not
17:47:33*xcombelle joined #nim
17:48:00sepisoad_yes, it is
17:48:00sepisoad_http://nim-lang.org/docs/asyncio.html
17:48:01Araqasyncio is deprecated, asyncdispatch is not
17:51:58flaviuAraq: How does rodwrite/rodread work with the rest of the compiler? I thought it just did rodfiles, but it looks like lots of other things depend on it.
17:54:33lllin C wrappers i can just push {.raises: [].} i guess? since c has no exceptions?
17:55:16Araqflaviu: not sure I understand the question but incremental builds require more than just serialization of the AST
17:55:29Araqlll: iirc you cannot push .raises due to a bug
17:55:37lll:(
17:55:49Araqbut you can declare your own pragma that's a shortcut for that
17:56:04llland push my own pragma?
17:56:16Araqhe, nah
17:56:18lll:P
17:56:24lllwould have been too easy lol
17:58:01*Jesin quit (Ping timeout: 264 seconds)
17:59:17flaviuAraq: https://github.com/Araq/Nim/wiki/Compiler-module-reference says 'Reader of rod files, the symbol file mechanism', but it seems to do much more than that.
18:00:51Araqit also does module dependency tracking to decide whether a rod file can be used
18:01:01Araqor whether the module needs to be recompiled
18:01:20*kumul joined #nim
18:01:23flaviuOk, thanks!
18:01:27*Jesin joined #nim
18:07:02lllthe manual says: Every call to a proc q which has an unknown body (due to a forward declaration or an importc pragma) is assumed to raise system.Exception unless q has an explicit raises list.
18:07:15lllbut it doesnt seem to be true at all, unless i missunderstood
18:10:47bassadoes nim have an equivalent to #define in c?
18:10:59*Sembei quit (Ping timeout: 265 seconds)
18:11:40llli know it has a defined(), and you can define with a compiler param
18:11:42*Pisuke joined #nim
18:12:09lllthe exact mechanism, i dont know
18:12:10sepisoad_is there a code sample to show how to create an event loop with multiple threads running in a program?
18:12:26bassathanks I'll check those out, its not necessary for my purposes but would be cleaner
18:12:44llli know a lot of library use it
18:12:49llllike opengl, sdl etc
18:12:53lll(wrappers)
18:13:14*BitPuffin|osx joined #nim
18:13:45*MyMind quit (Ping timeout: 240 seconds)
18:14:47bassagood idea I checked the opengl wrapper and it uses the same thing I was doing before
18:15:30bassafor defining type alias like type GLint = int32
18:16:02*vendethiel- joined #nim
18:16:33*vendethiel quit (Ping timeout: 276 seconds)
18:16:39*Pisuke quit (Max SendQ exceeded)
18:16:54sepisoad_please check this code on github gist: https://gist.github.com/sepisoad/f61e4127f6ca5d0b14da
18:17:02*Ven__ joined #nim
18:17:21sepisoad_I want to turn the busy loop into something more elegant
18:17:52*Pisuke joined #nim
18:18:24sepisoad_istead of sleeping and checking the condition in a busy loop I want to wait for an event to be signaled
18:18:32*Ven_ quit (Ping timeout: 272 seconds)
18:20:58bassaabout to do something very similar sepi, perhaps using await? http://nim-lang.org/docs/threadpool.html
18:21:35bassaor sync if you need results from all
18:23:11*Sembei joined #nim
18:24:52*Pisuke quit (Ping timeout: 255 seconds)
18:28:11*MyMind joined #nim
18:29:39lllI think i should PR the opengl wrapper someday, theres some type that i think are wrong
18:30:28lllsome of the gl ptr types are int32 instead of int (or something machine dependant) as per opengl spec
18:32:48*gsingh93 quit (Ping timeout: 276 seconds)
18:39:26*coffeepot joined #nim
19:08:03*xcombelle quit (Quit: Leaving)
19:15:58*kumul quit (Ping timeout: 256 seconds)
19:18:33*kumul joined #nim
19:18:55*Ven__ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:19:07lllhttps://github.com/nim-lang/nimble/issues/128
19:28:27*Ven joined #nim
19:45:25*gsingh93 joined #nim
20:01:46*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
20:02:16*coffeepot joined #nim
20:09:43*johnsoft quit (Ping timeout: 255 seconds)
20:17:53*TEttinger joined #nim
20:19:24*gsingh93 quit (Ping timeout: 276 seconds)
20:30:49*epichero joined #nim
20:45:57*BitPuffin|osx quit (Ping timeout: 250 seconds)
20:49:00*Mat4 joined #nim
20:57:08*Kingsquee joined #nim
21:06:22*wan joined #nim
21:07:06*taesoo quit (Ping timeout: 252 seconds)
21:18:59*intra quit (Ping timeout: 258 seconds)
21:28:17*taesoo joined #nim
21:47:37federico3is any of you in San Francisco?
21:47:51XeI'm in mountain view
21:51:29*Mat4 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
21:56:48lllis there a better way to stop float from infecting my float32s than this? proc `+`(x: float, y: float32): float = raise newException(OSError, "get off my lawn mister float64")
21:57:15lllrepeated on all operation between float / float32
21:59:10lllotherwise i have to make sure to qualify all my identifiers with : float32 + 'f32, and it get tedious fast + error prone
22:02:30*epichero quit (Remote host closed the connection)
22:03:57*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
22:04:54*BlaXpirit quit (Quit: Quit Konversation)
22:07:49boopso let's say i have loads of procs with this signature..
22:07:51boopproc ndmInit(argc: cint, argv: ptr cstring): cstring {.cdecl, exportc, dynlib.} =
22:07:57boop(args, return type and pragmas)
22:08:13boopis it possible/easy to write a template/macro to clean that up?
22:10:42lllfor the pragmas you can .push
22:11:25lllfor the macro part you might ask mister macroman
22:11:28lllaka fowl
22:14:38*epichero joined #nim
22:16:27*MyMind quit (Ping timeout: 265 seconds)
22:26:19*epichero quit (Remote host closed the connection)
22:27:04Araqlll: you can use the .error pragma to catch it compile time
22:27:18Araqproc `+`(x: float, y: float32): float {.error.}
22:27:30lllo nice
22:28:04lllis there a way to just forbid any transformation from float32 to float?
22:28:14lllinstead of overriding all the operations like that
22:28:15flaviulll: Nice error message :)
22:28:27lllflaviu: thx ^^
22:29:49*kumul quit (Ping timeout: 245 seconds)
22:31:01*sepisoad_ quit (Ping timeout: 264 seconds)
22:32:22*epichero joined #nim
22:34:43*BitPuffin|osx joined #nim
22:35:25Araqwhy are conversions from float32 to float a problem for you?
22:50:39*epichero_ joined #nim
22:51:52*epichero quit (Ping timeout: 256 seconds)
22:53:21*taesoo quit (Ping timeout: 264 seconds)
23:10:37*stefantalpalaru quit (Quit: Leaving)
23:16:44*epichero_ quit ()
23:17:03*epichero joined #nim
23:24:44*brson joined #nim
23:30:11*brson quit (Ping timeout: 250 seconds)
23:39:32*boop is now known as boopisaway
23:42:38lllAraq: i know its early optimization, but im working with opengl, and i will always be sending float32 to it, so i dont really see the point of working with float64
23:43:37llli dont know the performance cost of all those conversions, plus it will double the memory used if i use float
23:43:40lll64*
23:45:30*nande joined #nim
23:47:57llli might just end up using float64 after all, its just to much of a pain to write 'f32 everyyyyyywhere
23:48:58llland let whatever conversion that needs to happen happen
23:49:42flaviulll: I'm pretty sure that intel CPUs at least do all FLOPs with 80 bit precision.
23:52:40lllflaviu: sure, but it still takes twice as much memory, and it get truncated anyway when it store it in some float32 array anyway, I guess ill have to setup some benchmark to compared 100% float32 operation, to mixed operations.
23:53:02lllcompare*
23:53:11flaviulll: Yep, the memory savings are not minor.
23:53:31flaviuAlthough as long as it stays on the stack (local variables), it makes no difference.
23:54:03lllfor sure ill convert them before sending them to opengl, twice the bandwith used if not, and float64 arent even supported on many cards, and most are 2 to 24 times slower with float64
23:55:22flaviuunrelated to the current conversation, I'm looking at astalgo, and there appear to be at least 3 different table implementations. I don't think that's an ideal situation to be in.
23:57:06ekarlsoflaviu: what ya working on ? :p
23:57:30*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:57:49*Ven joined #nim
23:58:20*kumul joined #nim
23:58:50flaviuekarlso: I'm looking into modernizing the compiler.
23:59:30flaviuSee https://github.com/flaviut/Nim/commit/4ad2c33e144b008eed677ba77943ebf28a53f621 for example
23:59:34*Ven quit (Client Quit)