<< 25-01-2016 >>

00:00:14*vendethiel joined #nim
00:10:12*xet7 quit (Quit: Leaving)
00:32:16*gokr quit (Quit: Leaving.)
00:36:05*Gareth422 joined #nim
00:40:27*jaco60 quit (Ping timeout: 250 seconds)
00:45:12*vendethiel quit (Ping timeout: 250 seconds)
00:54:30*vendethiel joined #nim
00:57:16*yglukhov joined #nim
01:02:54*yglukhov quit (Ping timeout: 250 seconds)
01:38:26*vendethiel quit (Ping timeout: 250 seconds)
01:44:35*eldamar_ quit (Ping timeout: 264 seconds)
01:57:48*vendethiel joined #nim
03:12:37*vendethiel quit (Ping timeout: 265 seconds)
03:15:24*vendethiel joined #nim
03:49:50*vendethiel quit (Ping timeout: 265 seconds)
03:57:43*vendethiel joined #nim
04:06:16*Gareth422 quit (Ping timeout: 265 seconds)
04:18:50*vendethiel quit (Ping timeout: 245 seconds)
04:55:48*vendethiel joined #nim
04:57:24*Hackspanner joined #nim
05:06:03*Hackspanner quit (Ping timeout: 252 seconds)
05:41:22*vendethiel quit (Ping timeout: 272 seconds)
05:50:39*vendethiel joined #nim
06:03:36*darkf joined #nim
06:11:15*vendethiel quit (Ping timeout: 240 seconds)
06:15:14*vendethiel joined #nim
06:37:44*vendethiel quit (Ping timeout: 272 seconds)
06:38:39*desophos quit (Read error: Connection reset by peer)
06:42:06*lompik quit (Ping timeout: 240 seconds)
06:49:19*vendethiel joined #nim
06:59:48*Demon_Fox quit (Quit: Leaving)
07:12:20*vendethiel quit (Ping timeout: 276 seconds)
07:20:19*vendethiel joined #nim
07:32:03*nsf joined #nim
07:43:32*vendethiel quit (Ping timeout: 276 seconds)
07:52:48*kerze joined #nim
07:53:25*kerze is now known as smodo
07:54:22*yglukhov joined #nim
07:56:57*ephja joined #nim
07:59:30*vendethiel joined #nim
08:05:14yglukhovAraq_: it's not blocking me, but templates are really good for optimization via inlining which is a noticable thing in js.
08:11:01*gokr joined #nim
08:45:09*vendethiel quit (Ping timeout: 265 seconds)
08:46:47*BitPuffin|osx joined #nim
08:52:46*gokr quit (Ping timeout: 240 seconds)
08:54:21*Trustable joined #nim
08:55:35*gokr joined #nim
09:11:43*gokr1 joined #nim
09:15:50*gokr quit (Ping timeout: 276 seconds)
09:31:26*vendethiel joined #nim
09:33:08*sjums left #nim ("Leaving")
09:38:12*BitPuffin|osx quit (Ping timeout: 250 seconds)
09:45:27*jaco60 joined #nim
09:54:15*smodo quit (Ping timeout: 240 seconds)
09:54:18*vendethiel quit (Ping timeout: 256 seconds)
10:04:31*vkngpmhc joined #nim
10:21:14*gokr joined #nim
10:23:00*jaco60 quit (Ping timeout: 260 seconds)
10:24:30*jaco60 joined #nim
10:25:06*gokr1 quit (Ping timeout: 272 seconds)
10:33:59*coffeepot joined #nim
10:43:42*vkngpmhc quit (Quit: leaving)
10:44:17*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:46:56*ilariel joined #nim
10:47:44*Arrrr joined #nim
10:49:55*jaco60 quit (Ping timeout: 240 seconds)
10:53:24Arrrr"NimEdit requires Windows Vista or later" :/
10:54:56dom96Use Aporia :P
10:55:19ArrrrI thought nimedit was aporia 2.0
10:56:06*strcmp1 quit (Quit: peace)
10:56:30*vendethiel joined #nim
11:00:11dom96Arrrr: NimEdit is Araq's Aporia
11:00:24dom96Until I start using and contributing to it, it won't be Aporia 2.0
11:02:26flyxwouldn't it be better to provide plugins to existing editors? is there a reason to have a Nim-specific editor?
11:11:20ArrrrThere exists some plugins already. And nimsuggest. Building your own editor may improve the ide support.
11:12:31flyxI thought about writing a proper plugin for TextMate to leverage nimsuggest
11:13:52dom96I'm still not convinced about NimSuggest's stability.
11:14:33flyxdoesn't Aporia use it?
11:14:41dom96But to be fair the last time I used it was probably over a year ago
11:15:12dom96flyx: yes, it does. But I was never happy about the results it gave.
11:15:23dom96or the time it took to return those results
11:15:24flyxah, okay
11:15:35dom96But that was before the new compiler as a service feature.
11:15:40dom96Which Aporia does not support
11:17:04dom96I would still be using Aporia if it wasn't for the poor GTK Mac OS X support
11:17:26dom96So right now I'm using Sublime Text
11:17:38flyxyeah, GTK on OSX always was a pain in the ass
11:17:49flyxI fiddled around with it some time ago
11:17:56dom96Maybe it's time to hack Sublime Text to be more Aporia-like
11:18:28flyxI prefer TextMate 2 vastly over Sublime
11:18:34dom96Why?
11:18:54flyxwell first thing, it has a native Cocoa interface
11:19:20*vendethiel quit (Ping timeout: 276 seconds)
11:19:31flyxthe editing features are probably comparable
11:19:51flyxbut it's open source
11:20:14flyxand I strongly dislike Sublime's tabs
11:20:32dom96oh right, forgot TextMate is now open source.
11:21:47flyxSublime always was the inferior alternative because of it's cross-platform UI, which feels alien on OSX
11:22:37flyxI tried out Chocolat, which came some time befor TM2 went open source, and liked it for it's vertical tabs. but in the end, TM2 has more features
11:22:43flyxand git integration, which is nice
11:24:29*vendethiel joined #nim
11:29:53dom96Interesting to see that OnO is a long-time contributor to TextMate https://github.com/textmate/textmate/commits?author=nanoant
11:30:54*xet7 joined #nim
11:35:12*Arrrr quit (Ping timeout: 250 seconds)
11:46:24*vendethiel quit (Ping timeout: 250 seconds)
12:01:45*vendethiel joined #nim
12:03:06*BitPuffin joined #nim
12:03:18*Arrrr joined #nim
12:10:05*def- quit (Ping timeout: 245 seconds)
12:12:25*def- joined #nim
12:31:21*onionhammer quit (Ping timeout: 265 seconds)
12:47:05*vendethiel quit (Ping timeout: 276 seconds)
12:58:05*arnetheduck joined #nim
13:06:59*aziz joined #nim
13:24:57*vendethiel joined #nim
13:29:06*ephja quit (Ping timeout: 250 seconds)
13:34:25*junw_ joined #nim
13:44:10*ephja joined #nim
13:46:30*vendethiel quit (Ping timeout: 250 seconds)
13:56:33*lompik joined #nim
14:00:17*coffeepot joined #nim
14:00:43*Varriount-Laptop joined #nim
14:02:40*NhanH quit (Quit: Connection closed for inactivity)
14:03:46*yglukhov quit (Ping timeout: 250 seconds)
14:21:11*Varriount-Laptop quit (Ping timeout: 264 seconds)
14:21:41*vendethiel joined #nim
14:28:18*e_deep2 joined #nim
14:37:21*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:38:21*gokr quit (Quit: Leaving.)
14:47:35*lompik quit (Ping timeout: 245 seconds)
14:54:50*bozaloshtsh quit (Ping timeout: 260 seconds)
14:59:30*arnetheduck quit (Ping timeout: 260 seconds)
15:05:03*vendethiel quit (Ping timeout: 265 seconds)
15:09:26*BitPuffin is now known as niffuPtiB
15:09:36*vendethiel joined #nim
15:13:13*niffuPtiB is now known as avsshCgvO
15:20:43*avsshCgvO is now known as BitPuffin
15:25:17*quark1 joined #nim
15:25:30*saml joined #nim
15:27:17*junw_ quit (Ping timeout: 265 seconds)
15:31:23*vendethiel quit (Ping timeout: 264 seconds)
15:37:27*jaco60 joined #nim
16:13:37*pregressive joined #nim
16:18:24*Varriount-Laptop joined #nim
16:35:30*BitPuffin quit (Ping timeout: 256 seconds)
16:35:54*brson joined #nim
16:53:26*Varriount-Laptop quit (Ping timeout: 240 seconds)
17:05:05*Varriount-Laptop joined #nim
17:11:20*ephja quit (Ping timeout: 245 seconds)
17:14:18*desophos joined #nim
17:14:49*BitPuffin joined #nim
17:19:46*Varriount-Laptop quit (Ping timeout: 240 seconds)
17:22:47*junw joined #nim
17:29:16Araq_Arrrr: why? no SDL 2 for Windows XP available?
17:29:52*Varriount-Laptop joined #nim
17:30:00*yglukhov joined #nim
17:33:56*pregressive quit (Remote host closed the connection)
17:35:50ArrrrTheir wiki says otherwise "We ripped out a bunch of old platforms, like OS/2 and Mac OS 9. It would be easier to list the ones we still support: Windows (XP and later), Linux, Mac OS X, iOS, Android." But i have never used sdl, you'll know better
17:41:32*aziz quit (Remote host closed the connection)
17:43:43*junw quit (Quit: Leaving)
17:45:15*quark1 quit (Quit: Leaving)
17:50:56*pregressive joined #nim
17:54:48*brson quit (Ping timeout: 250 seconds)
17:58:37*brson joined #nim
18:05:58*kniteli joined #nim
18:08:43*pregressive quit (Remote host closed the connection)
18:18:06Araq_well nimedit uses pcre and sdl2 and nothing else I think
18:19:47*pregressive joined #nim
18:20:26*Varriount-Laptop quit (Ping timeout: 240 seconds)
18:30:17*brson quit (Ping timeout: 276 seconds)
18:31:55*brson joined #nim
18:36:34*aziz joined #nim
19:02:50*yglukhov quit (Ping timeout: 256 seconds)
19:09:20*BitPuffin quit (Ping timeout: 250 seconds)
19:19:40*vendethiel joined #nim
19:24:04*darkf quit (Quit: Leaving)
19:30:52*NhanH joined #nim
19:34:44*Varriount-Laptop joined #nim
19:40:07*zaquest quit (Quit: Leaving)
19:45:45*raimo joined #nim
19:53:37*Arrrr quit (Quit: WeeChat 1.2)
19:54:27flyxcan I make the compiler output a warning when a certain proc is used elsewhere in the code?
19:56:02def-flyx: just don't export the proc?
19:56:31ldleworkyou could write a macro to generate the proc, so that calling it checks some state
19:56:32flyxdef-: I don't want the build to fail if it's used
19:56:33*raimo1 joined #nim
19:56:38Araq_indeed you can. mark it as .deprecated
19:56:54Araq_that's what I do too.
19:57:26flyxhmm, but can deprecated output a custom error message?
19:58:44*raimo quit (Ping timeout: 250 seconds)
20:00:28def-flyx: there's an issue asking for this: https://github.com/nim-lang/Nim/issues/3600
20:02:30Araq_of course there is.
20:03:26*raimo2 joined #nim
20:03:53flyxwell when I decide to disallow it alltogether, I can use {.error.}. the documentation says „The error pragma is used to make the compiler output an error message with the given content.“
20:04:08flyxwhat's the „given content“? {.error: "foo".} doesn't seem to work
20:04:41Araq_there are 2 different .error pragmas ...
20:04:52M-maxflyx: use the warning pragma
20:04:57Araq_one that takes an argument and one that doesn't
20:05:38M-maxassume it works similarly to fatal (which I've used and love) e.g. {.fatal: "Compile this program with the objc command!".}
20:05:52flyxM-max: warning emits an error when the code is compiled, not when a proc is being called
20:06:03M-maxaha.
20:06:04Araq_ldlework's suggestion also works, wrap the proc in a template that has an .error/warning pragma statement which will be run on every instantiation
20:06:09M-maxecho, then? :)
20:06:30*raimo1 quit (Ping timeout: 272 seconds)
20:06:34flyxM-max: no, at compile time
20:06:41flyxa template will do, I guess
20:07:15M-maxfatal doesn't break compilation automatically, only if you try to compile that particular piece of code
20:07:29M-maxI use it to give when switches case-like semantics
20:08:14M-maxwhy isn't warning what you want? Because it would only be emitted when your library is compiled, not when something external links to it?
20:09:27flyxM-max: I wanted to discourage the usage of a proc without disallowing it alltogether
20:09:56flyxbut I decided to disallow it instead. a template with {.fatal: "".} in it works perfectly for that use case
20:10:06Varriount-Laptopflyx: Have two versions of the procedure, an exported and non-exported one.
20:10:26flyxVarriount-Laptop: I don't need it internally
20:10:35M-maxSimpler to explain => probably better :)
20:11:11Varriount-LaptopAraq_: Should I file an issue regarding the fact that Nim can't make me a sandwhich?
20:11:16M-maxWarning: "Don't use this unless you know what you're doing" sounds like a maintenance headache on the way
20:11:38ldleworkVarriount-Laptop: your Nim doesn't do that?
20:11:50ldleworkYou haven't written enough macros.
20:12:05flyxM-max: yeah, that's why I decided to rather disallow it
20:12:14M-maxDnim --checks:off "make me a sandwich" work?
20:12:28flyxonly with sudo.
20:13:06M-maxtoo bad
20:13:55*brson quit (Ping timeout: 250 seconds)
20:18:29*nimguy joined #nim
20:20:37*raimo3 joined #nim
20:22:24flyxM-max: there https://gist.github.com/flyx/961343a3d3df6164e46c
20:22:42*buMPnet joined #nim
20:23:23*raimo2 quit (Ping timeout: 276 seconds)
20:23:36*Matthias247 joined #nim
20:24:30*yglukhov joined #nim
20:24:49*raimo4 joined #nim
20:26:08*raimo3 quit (Ping timeout: 272 seconds)
20:27:12nimguyIs there a way to make Nim generate exceptions in CPP mode like it doe in C mode?
20:27:26*raimo joined #nim
20:27:38nimguyIn CPP mode it generates C++ exceptions, which conflict with async, so I need to get it to generate exceptions like it does in C
20:29:06*raimo4 quit (Ping timeout: 240 seconds)
20:31:35*raimo quit (Ping timeout: 240 seconds)
20:31:46*Varriount-Laptop quit (Ping timeout: 240 seconds)
20:34:08Araq_nimguy: hum? how do they conflict with async?
20:34:15flyxjust out of curiosity: why is parseBiggestFloat magic, but parseBiggestInt isn't?
20:35:36Araq_our native Nim parseBiggestFloat turned out to be too buggy
20:35:56Araq_and if we simply importc it, it cannot be run at compile time, hence it's a magic
20:37:04flyxwhere is it imported from?
20:37:28flyxc stdlib?
20:38:08*flyx is in need of parseBiggestUInt
20:48:30Araq_yes
20:49:47*Varriount-Laptop joined #nim
20:51:06nimguyAraq: Here's a test case I made: https://gist.github.com/philip-wernersbach/6b79493b39da03b3b71e
20:52:03*ilariel quit (Ping timeout: 252 seconds)
20:52:51nimguyAraq: The workaround is to get my Nim compiler to generate exceptions like it does in straight C mode, but I can't figure out how to do that in CPP mode.
20:55:04flyxis s[s.len] '\0' when s is a string?
20:55:41def-flyx: yes
20:55:45nimguyfly: No, it would be a bounds exception
20:55:55nimguyUnless you use an unsafe operation to access it, then yes
20:56:18def-nimguy: nope, strings are always 1 bigger than they have to, so they're null-terminated
20:57:15nimguydef-: But can you access it from Nim without using addr? It is true internally that they're NULL terminated
20:57:23def-nimguy: yes, you can, i just tested
20:57:41nimguyOh, the more you know
20:57:42def-var x = "foo"; echo cast[int8](x[x.len]) # 0
20:58:03def-(no need for the cast actually)
20:59:02nimguySeems like that should be an error, but what do I know ;)
20:59:09ldleworkI think I agree..
20:59:19ldleworkleaky abstraction
21:01:14Araq_well there has been some debate about it and we could get rid of it, but everybody who writes parsers loves the null-termination.
21:01:42Araq_nimguy: there is no way to do it unless you patch the codegen
21:03:45nimguyAraq_: Oh no. But if I have to do it I have to do it, I have to be able to sleep somehow in my async proc without blocking the other async procs
21:05:24*desophos quit (Ping timeout: 250 seconds)
21:07:37*flyx writes parsers, so he loves it
21:08:47ldleworkI don't really understand how its used. I guess you're consuming one character at a time and you use the terminator to stop doing that?
21:08:55ldleworkCouldn't you just use the len?
21:09:11ldlework(like everyone else)
21:15:36*nicky joined #nim
21:15:46Araq_while s[i] in {'\t', ' '}: inc i # skip whitespace
21:15:52flyxwell, "s[i] in {' ', '\t', '\0'}" is certainly nicer than "i == s.len or s[i] in {' ', '\t'}", isn't it
21:16:01*nicky is now known as Guest38888
21:16:23Araq_misses the point slightly.
21:16:49Araq_0 is not whitespace and yet my loop relies on the 0
21:17:12Araq_I could use 'i < len' everywhere of course but that sucks
21:17:31Araq_because it's an additional condition that I need to consider pretty much everywhere
21:18:06Guest38888can foldl from sequtils return a different type than the elements in the seq?
21:20:20def-Guest38888: unfortunately not
21:20:49def-Guest38888: but you could write a new version that can
21:22:02Guest38888ok, thanks for the answer :)
21:32:19*Guest38888 quit (Quit: Page closed)
21:36:20nimguyAraq_: Where do you define Exception->sup?
21:36:44nimguyfoo.cpp: error: no member named 'Sup' in 'Exception'
21:36:47nimguywith patched codegen
21:37:22Araq_it's introduced by ccgtypes.nim
21:43:52*Jehan_ joined #nim
21:48:18*brson joined #nim
22:02:55*bozaloshtsh joined #nim
22:09:38*gokr joined #nim
22:14:44*yglukhov quit (Remote host closed the connection)
22:22:45*desophos joined #nim
22:34:31nimguybrson: Is mozilla using Nim?
22:46:07*Trustable quit (Remote host closed the connection)
22:46:33*Jehan_ quit (Quit: Leaving)
22:46:41Araq_nimguy: I doubt it, they invented Rust ;-)
22:47:23brsonnimguy: I haven't heard of Mozilla using Nim, no
22:48:03brsonMozilla uses some Go though
22:53:47nimguybrson: Oh that's a shame, Go is okay though
22:53:51nimguyAraq_: True
22:54:21nimguyAraq_: Where does the compiler set up the context? I have it generating regular longjmp/setjmp in CPP, but the context isn't set right
22:54:46nimguyEXC_BAD_ACCESS
22:55:30Araq_yeah I wonder why the code compiles
22:55:39Araq_cause it shouldn't
22:55:57Araq_yield inside a 'try' cannot work
23:01:22nimguyAraq_: Why?
23:02:16Araq_"Where does the compiler set up the context? I have it generating regular longjmp/setjmp in CPP, but the context isn't set right"
23:02:49Araq_rewrite it to use try-finally rather than defer and hopefully the compiler complains
23:03:19nimguyRight, it doesn't work, but why is there a tech barrier for yield inside a try?
23:04:30Araq_it's hard to support and C# didn't support it for a long time either
23:04:48*aziz quit (Remote host closed the connection)
23:05:18nimguyBut what is the fundamental reason it's hard? Not trying to argue, I'm just curious about the fundamental CS behind it
23:08:01Araq_well you can try to fix it, the setjmp buffer needs to be allocated on the heap and somehow survive the 'yield'
23:12:55nimguyAraq_: Interesting. Yeah, I haven't the slightest idea how to do that and still be able to know where the buffer is
23:14:31Araq_your best bet is to rewrite that code to not use 'defer', I'm afraid
23:16:04nimguyAraq_: That would be the easiest, but I still have to have some way to be able to sleep and free the C pointer if there's an exception
23:17:01nimguyAttached to the C pointer is megs and megs of data from an external library, I can't let it leak
23:46:54*def- quit (Ping timeout: 272 seconds)
23:49:37*def- joined #nim
23:52:24*nimguy quit (Quit: Page closed)