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:14 | yglukhov | Araq_: 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:24 | Arrrr | "NimEdit requires Windows Vista or later" :/ |
10:54:56 | dom96 | Use Aporia :P |
10:55:19 | Arrrr | I thought nimedit was aporia 2.0 |
10:56:06 | * | strcmp1 quit (Quit: peace) |
10:56:30 | * | vendethiel joined #nim |
11:00:11 | dom96 | Arrrr: NimEdit is Araq's Aporia |
11:00:24 | dom96 | Until I start using and contributing to it, it won't be Aporia 2.0 |
11:02:26 | flyx | wouldn't it be better to provide plugins to existing editors? is there a reason to have a Nim-specific editor? |
11:11:20 | Arrrr | There exists some plugins already. And nimsuggest. Building your own editor may improve the ide support. |
11:12:31 | flyx | I thought about writing a proper plugin for TextMate to leverage nimsuggest |
11:13:52 | dom96 | I'm still not convinced about NimSuggest's stability. |
11:14:33 | flyx | doesn't Aporia use it? |
11:14:41 | dom96 | But to be fair the last time I used it was probably over a year ago |
11:15:12 | dom96 | flyx: yes, it does. But I was never happy about the results it gave. |
11:15:23 | dom96 | or the time it took to return those results |
11:15:24 | flyx | ah, okay |
11:15:35 | dom96 | But that was before the new compiler as a service feature. |
11:15:40 | dom96 | Which Aporia does not support |
11:17:04 | dom96 | I would still be using Aporia if it wasn't for the poor GTK Mac OS X support |
11:17:26 | dom96 | So right now I'm using Sublime Text |
11:17:38 | flyx | yeah, GTK on OSX always was a pain in the ass |
11:17:49 | flyx | I fiddled around with it some time ago |
11:17:56 | dom96 | Maybe it's time to hack Sublime Text to be more Aporia-like |
11:18:28 | flyx | I prefer TextMate 2 vastly over Sublime |
11:18:34 | dom96 | Why? |
11:18:54 | flyx | well first thing, it has a native Cocoa interface |
11:19:20 | * | vendethiel quit (Ping timeout: 276 seconds) |
11:19:31 | flyx | the editing features are probably comparable |
11:19:51 | flyx | but it's open source |
11:20:14 | flyx | and I strongly dislike Sublime's tabs |
11:20:32 | dom96 | oh right, forgot TextMate is now open source. |
11:21:47 | flyx | Sublime always was the inferior alternative because of it's cross-platform UI, which feels alien on OSX |
11:22:37 | flyx | I 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:43 | flyx | and git integration, which is nice |
11:24:29 | * | vendethiel joined #nim |
11:29:53 | dom96 | Interesting 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:16 | Araq_ | 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:50 | Arrrr | Their 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:06 | Araq_ | 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:27 | flyx | can I make the compiler output a warning when a certain proc is used elsewhere in the code? |
19:56:02 | def- | flyx: just don't export the proc? |
19:56:31 | ldlework | you could write a macro to generate the proc, so that calling it checks some state |
19:56:32 | flyx | def-: I don't want the build to fail if it's used |
19:56:33 | * | raimo1 joined #nim |
19:56:38 | Araq_ | indeed you can. mark it as .deprecated |
19:56:54 | Araq_ | that's what I do too. |
19:57:26 | flyx | hmm, but can deprecated output a custom error message? |
19:58:44 | * | raimo quit (Ping timeout: 250 seconds) |
20:00:28 | def- | flyx: there's an issue asking for this: https://github.com/nim-lang/Nim/issues/3600 |
20:02:30 | Araq_ | of course there is. |
20:03:26 | * | raimo2 joined #nim |
20:03:53 | flyx | well 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:08 | flyx | what's the „given content“? {.error: "foo".} doesn't seem to work |
20:04:41 | Araq_ | there are 2 different .error pragmas ... |
20:04:52 | M-max | flyx: use the warning pragma |
20:04:57 | Araq_ | one that takes an argument and one that doesn't |
20:05:38 | M-max | assume it works similarly to fatal (which I've used and love) e.g. {.fatal: "Compile this program with the objc command!".} |
20:05:52 | flyx | M-max: warning emits an error when the code is compiled, not when a proc is being called |
20:06:03 | M-max | aha. |
20:06:04 | Araq_ | 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:09 | M-max | echo, then? :) |
20:06:30 | * | raimo1 quit (Ping timeout: 272 seconds) |
20:06:34 | flyx | M-max: no, at compile time |
20:06:41 | flyx | a template will do, I guess |
20:07:15 | M-max | fatal doesn't break compilation automatically, only if you try to compile that particular piece of code |
20:07:29 | M-max | I use it to give when switches case-like semantics |
20:08:14 | M-max | why 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:27 | flyx | M-max: I wanted to discourage the usage of a proc without disallowing it alltogether |
20:09:56 | flyx | but I decided to disallow it instead. a template with {.fatal: "".} in it works perfectly for that use case |
20:10:06 | Varriount-Laptop | flyx: Have two versions of the procedure, an exported and non-exported one. |
20:10:26 | flyx | Varriount-Laptop: I don't need it internally |
20:10:35 | M-max | Simpler to explain => probably better :) |
20:11:11 | Varriount-Laptop | Araq_: Should I file an issue regarding the fact that Nim can't make me a sandwhich? |
20:11:16 | M-max | Warning: "Don't use this unless you know what you're doing" sounds like a maintenance headache on the way |
20:11:38 | ldlework | Varriount-Laptop: your Nim doesn't do that? |
20:11:50 | ldlework | You haven't written enough macros. |
20:12:05 | flyx | M-max: yeah, that's why I decided to rather disallow it |
20:12:14 | M-max | Dnim --checks:off "make me a sandwich" work? |
20:12:28 | flyx | only with sudo. |
20:13:06 | M-max | too bad |
20:13:55 | * | brson quit (Ping timeout: 250 seconds) |
20:18:29 | * | nimguy joined #nim |
20:20:37 | * | raimo3 joined #nim |
20:22:24 | flyx | M-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:12 | nimguy | Is 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:38 | nimguy | In 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:08 | Araq_ | nimguy: hum? how do they conflict with async? |
20:34:15 | flyx | just out of curiosity: why is parseBiggestFloat magic, but parseBiggestInt isn't? |
20:35:36 | Araq_ | our native Nim parseBiggestFloat turned out to be too buggy |
20:35:56 | Araq_ | and if we simply importc it, it cannot be run at compile time, hence it's a magic |
20:37:04 | flyx | where is it imported from? |
20:37:28 | flyx | c stdlib? |
20:38:08 | * | flyx is in need of parseBiggestUInt |
20:48:30 | Araq_ | yes |
20:49:47 | * | Varriount-Laptop joined #nim |
20:51:06 | nimguy | Araq: 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:51 | nimguy | Araq: 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:04 | flyx | is s[s.len] '\0' when s is a string? |
20:55:41 | def- | flyx: yes |
20:55:45 | nimguy | fly: No, it would be a bounds exception |
20:55:55 | nimguy | Unless you use an unsafe operation to access it, then yes |
20:56:18 | def- | nimguy: nope, strings are always 1 bigger than they have to, so they're null-terminated |
20:57:15 | nimguy | def-: But can you access it from Nim without using addr? It is true internally that they're NULL terminated |
20:57:23 | def- | nimguy: yes, you can, i just tested |
20:57:41 | nimguy | Oh, the more you know |
20:57:42 | def- | var x = "foo"; echo cast[int8](x[x.len]) # 0 |
20:58:03 | def- | (no need for the cast actually) |
20:59:02 | nimguy | Seems like that should be an error, but what do I know ;) |
20:59:09 | ldlework | I think I agree.. |
20:59:19 | ldlework | leaky abstraction |
21:01:14 | Araq_ | 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:42 | Araq_ | nimguy: there is no way to do it unless you patch the codegen |
21:03:45 | nimguy | Araq_: 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:47 | ldlework | I 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:55 | ldlework | Couldn't you just use the len? |
21:09:11 | ldlework | (like everyone else) |
21:15:36 | * | nicky joined #nim |
21:15:46 | Araq_ | while s[i] in {'\t', ' '}: inc i # skip whitespace |
21:15:52 | flyx | well, "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:23 | Araq_ | misses the point slightly. |
21:16:49 | Araq_ | 0 is not whitespace and yet my loop relies on the 0 |
21:17:12 | Araq_ | I could use 'i < len' everywhere of course but that sucks |
21:17:31 | Araq_ | because it's an additional condition that I need to consider pretty much everywhere |
21:18:06 | Guest38888 | can foldl from sequtils return a different type than the elements in the seq? |
21:20:20 | def- | Guest38888: unfortunately not |
21:20:49 | def- | Guest38888: but you could write a new version that can |
21:22:02 | Guest38888 | ok, thanks for the answer :) |
21:32:19 | * | Guest38888 quit (Quit: Page closed) |
21:36:20 | nimguy | Araq_: Where do you define Exception->sup? |
21:36:44 | nimguy | foo.cpp: error: no member named 'Sup' in 'Exception' |
21:36:47 | nimguy | with patched codegen |
21:37:22 | Araq_ | 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:31 | nimguy | brson: Is mozilla using Nim? |
22:46:07 | * | Trustable quit (Remote host closed the connection) |
22:46:33 | * | Jehan_ quit (Quit: Leaving) |
22:46:41 | Araq_ | nimguy: I doubt it, they invented Rust ;-) |
22:47:23 | brson | nimguy: I haven't heard of Mozilla using Nim, no |
22:48:03 | brson | Mozilla uses some Go though |
22:53:47 | nimguy | brson: Oh that's a shame, Go is okay though |
22:53:51 | nimguy | Araq_: True |
22:54:21 | nimguy | Araq_: 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:46 | nimguy | EXC_BAD_ACCESS |
22:55:30 | Araq_ | yeah I wonder why the code compiles |
22:55:39 | Araq_ | cause it shouldn't |
22:55:57 | Araq_ | yield inside a 'try' cannot work |
23:01:22 | nimguy | Araq_: Why? |
23:02:16 | Araq_ | "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:49 | Araq_ | rewrite it to use try-finally rather than defer and hopefully the compiler complains |
23:03:19 | nimguy | Right, it doesn't work, but why is there a tech barrier for yield inside a try? |
23:04:30 | Araq_ | 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:18 | nimguy | But what is the fundamental reason it's hard? Not trying to argue, I'm just curious about the fundamental CS behind it |
23:08:01 | Araq_ | well you can try to fix it, the setjmp buffer needs to be allocated on the heap and somehow survive the 'yield' |
23:12:55 | nimguy | Araq_: Interesting. Yeah, I haven't the slightest idea how to do that and still be able to know where the buffer is |
23:14:31 | Araq_ | your best bet is to rewrite that code to not use 'defer', I'm afraid |
23:16:04 | nimguy | Araq_: 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:01 | nimguy | Attached 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) |