00:01:13 | * | Jesin quit (Quit: Leaving) |
00:02:03 | ephja | it has been fixed |
00:02:44 | Araq | hrm? |
00:02:54 | Araq | what's wrong with the code? |
00:03:44 | * | joelmo quit (Quit: Connection closed for inactivity) |
00:05:23 | * | Demos joined #nim |
00:06:52 | ephja | Araq: "invalid type: expr" on the "let val = val" line in failIf |
00:10:41 | * | Trustable quit (Ping timeout: 246 seconds) |
00:10:59 | * | jaco60 quit (Ping timeout: 264 seconds) |
00:13:33 | * | nicktick joined #nim |
00:15:05 | * | girvo joined #nim |
00:19:26 | * | girvo quit (Ping timeout: 240 seconds) |
00:19:43 | * | aziz quit (Remote host closed the connection) |
00:26:38 | * | girvo joined #nim |
00:32:09 | * | ephja quit (Ping timeout: 250 seconds) |
00:36:34 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:45:58 | * | desophos joined #nim |
00:57:47 | * | Jesin joined #nim |
01:00:18 | * | ephja joined #nim |
01:03:13 | * | nicktick quit (Read error: Connection reset by peer) |
01:04:21 | * | nicktick joined #nim |
01:12:06 | cryzed | What exactly is the difference between a template and a macro? |
01:12:30 | cryzed | macros are more powerful? |
01:23:03 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
01:23:21 | * | desophos_ joined #nim |
01:23:37 | * | gmpreussner|work joined #nim |
01:23:54 | Demos | pretty much |
01:24:24 | Demos | macros work on the AST (using the api in the macros module) and templates do somewhat more primitive substitution |
01:24:29 | Demos | macros are way harder to write |
01:25:36 | cryzed | Ah ok |
01:27:46 | * | desophos_ quit (Ping timeout: 240 seconds) |
01:30:39 | nchambers | *typically* a template is a way to use one function in multiple scenarios |
01:30:51 | nchambers | a macros is small code that expands into big code |
01:32:04 | cryzed | nchambers, to use one function in multiple scenarios? |
01:32:22 | nchambers | yes |
01:32:45 | nchambers | like if you wanted one function that could add strings and ints |
01:36:19 | * | nastavnic joined #nim |
01:41:00 | * | nastavnic quit (Ping timeout: 256 seconds) |
01:41:37 | nicktick | Is there anybody installed nim.vim under windows? I met a problem on autoload nim.vim at line 12: , E370: Could not load library msys-python2.7.dll , where is msys-python2.7.dll , I installed python2.7,but there is no msys-python2.7.dll, should I install python2.7 from source under msys? |
01:43:54 | nicktick | cryzed, thank you for telling me module strutils of converting string into number last time. |
01:44:05 | cryzed | nicktick, oh no problem |
01:44:30 | cryzed | nicktick, maybe just google for the DLL and see where you can get it |
01:52:24 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
01:55:48 | * | nicktick quit (Ping timeout: 272 seconds) |
01:56:51 | * | nicktick joined #nim |
02:00:06 | Demos | I'm pretty sure you can just ignore that |
02:00:15 | Demos | and still get at least highlighting and syntax checking |
02:00:27 | * | brson joined #nim |
02:04:20 | * | solidsnack joined #nim |
02:06:59 | nicktick | Demos, yes. |
02:07:39 | nicktick | there is no problem with nim.vim under linux. |
02:10:03 | nicktick | I want to install nim on both windows and *nix boxes. |
02:15:35 | * | nicktick1 joined #nim |
02:16:46 | * | nicktick quit (Ping timeout: 240 seconds) |
02:22:46 | * | nicktick1 quit (Ping timeout: 240 seconds) |
02:23:30 | * | solidsnack quit (Ping timeout: 256 seconds) |
02:31:31 | * | pilne left #nim ("Gone.") |
02:39:03 | * | ozra quit (Ping timeout: 252 seconds) |
02:52:55 | * | brson quit (Quit: leaving) |
02:54:43 | * | nicktick joined #nim |
02:54:47 | * | Jesin quit (Quit: Leaving) |
02:58:08 | * | brson joined #nim |
02:58:49 | * | nicktick quit (Read error: Connection reset by peer) |
03:03:15 | * | nicktick joined #nim |
03:07:42 | * | nicktick quit (Ping timeout: 256 seconds) |
03:22:27 | * | ephja quit (Ping timeout: 250 seconds) |
03:38:28 | * | nastavnic joined #nim |
03:42:46 | * | nastavnic quit (Ping timeout: 240 seconds) |
03:43:34 | * | brson quit (Quit: leaving) |
03:56:58 | * | desophos quit (Read error: Connection reset by peer) |
04:29:57 | * | vendethiel joined #nim |
04:39:32 | * | nastavnic joined #nim |
04:40:48 | * | zepolen joined #nim |
04:44:16 | * | nastavnic quit (Ping timeout: 272 seconds) |
04:52:32 | * | vendethiel quit (Ping timeout: 256 seconds) |
05:10:03 | * | darkf joined #nim |
05:15:16 | * | solidsnack joined #nim |
05:28:37 | * | nicktick joined #nim |
05:29:48 | * | yglukhov joined #nim |
05:34:11 | * | yglukhov quit (Ping timeout: 250 seconds) |
05:40:01 | * | Demos quit (Quit: Leaving) |
05:41:59 | * | solidsnack quit (Ping timeout: 250 seconds) |
05:52:06 | * | nicktick quit (Ping timeout: 240 seconds) |
05:58:34 | * | nicktick joined #nim |
06:03:10 | * | solidsnack joined #nim |
06:03:19 | * | nicktick1 joined #nim |
06:03:59 | * | vegansk quit (Remote host closed the connection) |
06:04:04 | * | nicktick quit (Ping timeout: 272 seconds) |
06:08:46 | * | nicktick1 quit (Ping timeout: 240 seconds) |
06:16:13 | * | solidsnack quit (Ping timeout: 250 seconds) |
06:16:21 | * | nicktick joined #nim |
06:27:06 | * | nicktick quit (Ping timeout: 240 seconds) |
06:29:52 | * | solidsnack joined #nim |
06:32:51 | * | nicktick joined #nim |
06:35:51 | * | nicktick1 joined #nim |
06:38:41 | * | vegai left #nim (#nim) |
06:38:45 | * | nicktick quit (Ping timeout: 250 seconds) |
06:40:06 | * | nicktick1 quit (Ping timeout: 240 seconds) |
06:41:16 | * | nastavnic joined #nim |
06:43:00 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:44:14 | * | nicktick joined #nim |
06:45:52 | * | nastavnic quit (Ping timeout: 256 seconds) |
06:46:17 | * | nicktick1 joined #nim |
06:49:02 | * | nicktick quit (Ping timeout: 272 seconds) |
06:50:08 | * | solidsnack joined #nim |
07:18:10 | * | kerze joined #nim |
07:21:09 | * | zepolen quit (Remote host closed the connection) |
07:28:09 | * | girvo quit (Ping timeout: 250 seconds) |
07:28:48 | * | girvo joined #nim |
07:33:21 | * | girvo quit (Ping timeout: 250 seconds) |
07:33:40 | * | yglukhov joined #nim |
07:38:00 | * | BitPuffin|osx quit (Ping timeout: 256 seconds) |
07:41:27 | * | zepolen joined #nim |
07:42:37 | * | zepolen quit (Remote host closed the connection) |
07:44:28 | * | zepolen joined #nim |
07:49:10 | * | nastavnic joined #nim |
08:08:30 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
08:11:02 | * | solidsnack joined #nim |
08:13:13 | * | vegansk joined #nim |
08:24:57 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
08:28:52 | * | solidsnack joined #nim |
08:29:32 | * | girvo joined #nim |
08:34:01 | * | girvo quit (Ping timeout: 250 seconds) |
08:42:50 | * | Ven joined #nim |
08:46:14 | * | zepolen quit (Remote host closed the connection) |
08:48:55 | * | jaco60 joined #nim |
09:17:15 | yglukhov | dom96: is nimble+nims gonna happen? =) |
09:19:34 | * | nicktick1 quit (Quit: Leaving.) |
09:23:34 | * | makoLine quit (Ping timeout: 272 seconds) |
09:24:39 | * | coffeepot joined #nim |
09:53:49 | * | Demon_Fox quit (Quit: Leaving) |
09:54:08 | * | jackv quit (Ping timeout: 246 seconds) |
09:58:40 | * | jackv joined #nim |
09:59:33 | * | zepolen joined #nim |
10:07:26 | * | joelmo joined #nim |
10:10:07 | * | Trustable joined #nim |
10:26:12 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:30:39 | * | girvo joined #nim |
10:34:29 | * | kerze quit (Ping timeout: 244 seconds) |
10:35:22 | * | girvo quit (Ping timeout: 256 seconds) |
10:36:59 | * | ekarlso joined #nim |
11:10:23 | * | zepolen quit (Remote host closed the connection) |
11:10:30 | * | nastavnic quit (Ping timeout: 256 seconds) |
11:17:16 | * | nicktick joined #nim |
11:18:36 | * | zepolen joined #nim |
11:18:37 | * | zepolen quit (Remote host closed the connection) |
11:18:51 | * | zepolen joined #nim |
11:23:43 | * | nastavnic joined #nim |
11:32:12 | coffeepot | when should I be wary of unsigned ints wrapping around in Nim? |
11:40:35 | * | sepisoad joined #nim |
11:40:51 | Araq | all the time |
11:41:07 | Araq | that's why we discourage unsigned numbers |
11:47:13 | coffeepot | the shl doesn't wrap as far as I can tell |
11:47:41 | vegansk | Hi! How can I make the static library without main function. When I'm linking agains library generated with `--app:staticlib` switch, gcc says: main.c:(.text+0x0): multiple definition of `main' |
11:49:15 | Araq | --noMain ? |
11:49:36 | Araq | coffeepot: shl truncates bits |
11:50:15 | vegansk | Araq, thanks! Missed that switch |
11:50:57 | vegansk | But what the need of the main function for --app == lib or staticlib? |
11:51:51 | dom96 | yglukhov: soon :) |
11:52:41 | yglukhov | dom96: oh boy, cant wait =) |
11:53:23 | dom96 | yglukhov: if you want a preview then you can grab the nimscript-support branch |
11:54:22 | yglukhov | no, i'd like to start using it in "production" =) |
11:58:00 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:59:01 | * | jaco60 quit (Quit: Leaving) |
12:07:12 | coffeepot | would anyone be interested in a selection of procs to extract int, int16, int64 and string from openarrays? |
12:07:41 | coffeepot | i mean it's super simple stuff, just convenient if you're reading from a buffer |
12:08:44 | * | sepisoad quit (Read error: Connection reset by peer) |
12:08:49 | coffeepot | ... or maybe I should just use streams, right? :) |
12:09:22 | vegansk | Araq, if I need to call nim's static library from c app, I need to initialize the lib with `NimMain` call, right? |
12:11:19 | Araq | coffeepot: I'm not interested in super simple stuff :-) |
12:11:36 | Araq | vegansk: yeah something like that, it's all documented |
12:12:43 | Araq | http://nim-lang.org/docs/backends.html#backend-code-calling-nim-nim-invocation-example-from-c |
12:12:44 | coffeepot | haha fair enough, but it's a pain to rewrite basic stuff when you want to just be able to say getInt from an array[byte] or whatnot |
12:12:55 | vegansk | Araq, thanks! |
12:13:21 | Araq | our docs are superb, too bad nobody reads them :P |
12:19:50 | * | dv- joined #nim |
12:29:28 | * | Arrrr joined #nim |
12:31:28 | * | girvo joined #nim |
12:35:49 | * | girvo quit (Ping timeout: 250 seconds) |
12:38:06 | cryzed | Araq, how does it make sense to differentiate between the 2 different type of number to the end user. One probably already has to write procs or some case somewhere to differentiate between the kinds -- or do you expect them to write accessors? |
12:38:27 | cryzed | Araq, while I appreciate you taking the time to answer most issues on Github, a bit more than "no, it wouldn't" would maybe have been more clarifying |
12:38:52 | cryzed | Since I'm not raising these to annoy you, but because I honestly think they might be a great addition |
12:39:57 | Araq | well I didn't close it, so you can just continue and ask for specifics. |
12:40:16 | Araq | in fact, even if I close it, you can ask to reopen it and ask for clarification. |
12:40:46 | Araq | field lookups based on the surrounding type context is so obviously a bad idea to me that I thought it's not worth going into details |
12:41:10 | Araq | echo obj.num # what is meant here? float or int 'num' field? |
12:41:32 | cryzed | Araq, isn't that what the differentiatior is for? |
12:41:45 | cryzed | *differentiator |
12:41:57 | Araq | the differentiator is not known at compile-time. |
12:43:08 | cryzed | But this structure would be achievable with inheritance? I.e. specify the base class ref as an argument to a proc and then use num for either of them? |
12:43:30 | * | sepisoad joined #nim |
12:43:33 | cryzed | Maybe I should just try it |
12:43:43 | * | ozra_ joined #nim |
12:44:14 | Araq | so what does 'echo obj.num' mean? |
12:44:33 | Araq | should it use the float or the int field? |
12:45:18 | Araq | or should it produce the type int|float and then we have some magic $ for int|float where | here means a *runtime* union, not Nim's already existing compiletime union. |
12:45:22 | cryzed | It would be based on the type within the current proc, wouldnt it? |
12:45:50 | Araq | the type of 'obj' is the case object, how does that help? |
12:46:40 | * | ozra_ quit (Client Quit) |
12:47:16 | cryzed | Oh right, it's then handled and assumed to automatically "just" be a reference to the base object -- not the "customized" instance. |
12:47:28 | cryzed | Well it seems like a nice feature to an end-user, maybe not to the compiler designer |
12:47:30 | * | ozra_ joined #nim |
12:47:47 | * | ozra_ is now known as ozra |
12:48:07 | Araq | no, it's so badly thought-out that I wouldn't even call it a "feature" just yet. |
12:48:26 | Araq | it's completely ambiguous. |
12:48:56 | Araq | "ok, so here in JSON there is fnum and num and I like to use the same name, make it happen |
12:48:58 | Araq | " |
12:49:17 | Arrrr | I think crystal had some problems with that https://github.com/manastech/crystal/issues/1824 |
12:49:38 | cryzed | Araq, do you expect everyone suggesting features to know everything about the Nim compiler internals? |
12:49:47 | cryzed | To me it's just a blackbox, and the issue tracker is for suggestions to the language |
12:50:46 | Araq | no, it's not about Nim's internals. |
12:51:14 | cryzed | Maybe Python has ruined me, regarding types |
12:51:15 | Araq | it's about that you/dom96 do not even know what you want. |
12:51:48 | Araq | again, what does 'echo obj.num' do? |
12:52:05 | Araq | you haven't even answered that question, or maybe I didn't understand |
12:52:06 | cryzed | echo the correct type of number depending on the differentiator |
12:52:14 | cryzed | Maybe it cant be done at compile time then |
12:52:20 | cryzed | you just answered "no this isnt possible" |
12:52:24 | cryzed | I actually did give an answer |
12:53:11 | Araq | ok, so it uses the discriminator's value which is only known at runtime. |
12:53:21 | Araq | so what is its type? |
12:53:26 | Araq | int|float ? |
12:53:44 | * | joelmo quit (Quit: Connection closed for inactivity) |
12:53:53 | cryzed | I suppose, yes |
12:54:01 | * | sepisoad quit (Read error: Connection reset by peer) |
12:54:31 | Araq | that already has a meaning in Nim and it's different, so then we introduce '/' as new type constructor. |
12:54:49 | Araq | int/float then means 'int or float but we don't know at compile-time' |
12:55:02 | Araq | which means the implementation looks like: |
12:55:11 | Araq | int / float = object |
12:55:19 | Araq | case k |
12:55:35 | Araq | of floatVal: f: float |
12:55:45 | Araq | of intVal: i: int |
12:56:24 | Araq | so your case object field produces a hidden case object ... |
12:57:20 | cryzed | Araq, you are right -- I didn't think the suggestion was connected with so many internals that I barely know about and thus can't reason about. I'll try to figure out more stuff before asking next time |
12:57:32 | Araq | and a whole new '/' type construction which needs to be documented and you can count the seconds until some people ask "what is the difference between / and | ?" |
12:59:39 | Araq | no, it's fine to ask questions, but you should have a little more faith that I'm first looking at the resulting *language* and only later at how hard it is to implement. |
13:00:02 | * | Ven joined #nim |
13:00:54 | cryzed | Alright |
13:01:03 | * | t4nk288 joined #nim |
13:02:13 | dom96 | Araq: I officially understand the issue now, the "so what does 'echo obj.num' mean?" has enlightened me. |
13:04:18 | Araq | yay :-) |
13:05:19 | Araq | the first part of the RFC is fine. if the field has the same type in every branch, we can support it. |
13:05:30 | * | t4nk288 quit (Ping timeout: 252 seconds) |
13:06:19 | Araq | that improves the expressivity of the language without making it more complex, a really nice addition to the language. |
13:07:09 | Araq | and I'm quite sure that has been requested before ;-) |
13:07:46 | * | yglukhov quit (Ping timeout: 272 seconds) |
13:10:26 | Araq | alternatively we can weaken the disjoint condition for 'case' in 'object' |
13:10:33 | Araq | so that this is allowed: |
13:10:43 | Araq | case kind: NodeKind |
13:11:08 | Araq | of foo, bar, baz: children: seq[Node] |
13:11:21 | Araq | of foo: additonalFieldForFoo: int |
13:11:30 | Araq | of bar: onlyvalidForBar: float |
13:11:55 | Araq | then it's much more obvious that 'children' is actually a *shared* field |
13:12:27 | Araq | hrm, yeah, that's even better. |
13:13:33 | dom96 | yeah |
13:13:41 | dom96 | I think that's what I really wanted :P |
13:14:48 | cryzed | ah, but you are not simply moving children outside the case for foo, bar, baz because there might be other cases? |
13:14:57 | NimBot | nim-lang/Nim devel 5545d36 Yuriy Glukhov [+0 ±1 -0]: Fixed getAddrInfo on android |
13:14:57 | NimBot | nim-lang/Nim devel 6b3b7ee Dominik Picheta [+0 ±1 -0]: Merge pull request #3631 from yglukhov/getaddrinfo-android... 2 more lines |
13:15:40 | cryzed | I don't quite get what the disjoint condition is |
13:16:28 | Araq | cryzed: it means you cannot list 'foo' in multiple case branches |
13:16:42 | cryzed | ah, of course -- thank you |
13:17:02 | cryzed | that seems like a great idea then under those circumstances, at least from what I can foresee |
13:20:25 | Arrrr | What if i want baz to have more fields? If bar and baz end up being the same, maybe i only need bar |
13:21:47 | Araq | Arrrr: then add an 'of baz' ? sorry, i don't understand your question |
13:22:11 | Araq | 'baz' is not special in my example |
13:23:42 | Arrrr | Ah ok, i saw your example with more detail |
13:23:47 | Arrrr | And you support that case |
13:24:21 | dv- | is there anything like python's beautifulsoup for nim? |
13:24:45 | Araq | the htmlparser in the stdlib is somewhat error correcting |
13:25:42 | dv- | i'll check it out |
13:25:55 | * | ephja joined #nim |
13:36:51 | * | nastavnic quit (Quit: WeeChat 1.3) |
13:40:57 | * | nastavnic joined #nim |
13:41:01 | * | nastavnic quit (Client Quit) |
13:41:19 | * | sepisoad joined #nim |
13:42:32 | * | nastavnic joined #nim |
13:42:57 | * | nastavnic quit (Client Quit) |
13:43:10 | * | nastavnic joined #nim |
13:43:34 | * | nastavnic quit (Client Quit) |
13:43:50 | * | nastavnic joined #nim |
13:44:09 | * | nastavnic quit (Client Quit) |
13:44:27 | * | nastavnic joined #nim |
13:45:40 | * | Sornaensis quit (Max SendQ exceeded) |
13:46:10 | * | Sornaensis joined #nim |
13:51:10 | * | brson joined #nim |
13:54:56 | * | sepisoad quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
14:05:20 | * | yglukhov joined #nim |
14:19:10 | * | sepisoad joined #nim |
14:23:20 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
14:23:27 | * | coffeepots joined #nim |
14:32:14 | * | girvo joined #nim |
14:34:33 | * | sepisoad quit (Ping timeout: 250 seconds) |
14:36:26 | * | girvo quit (Ping timeout: 240 seconds) |
14:40:56 | * | aziz joined #nim |
14:44:26 | * | nastavnic quit (Ping timeout: 240 seconds) |
14:45:18 | * | brson quit (Ping timeout: 272 seconds) |
14:58:00 | * | nastavnic joined #nim |
15:05:41 | * | pregressive joined #nim |
15:43:44 | * | jaco60 joined #nim |
15:45:11 | * | sepisoad joined #nim |
15:51:56 | ephja | async swallows exceptions? |
15:52:49 | Araq | it massages them |
15:52:52 | * | sepisoad quit (Read error: Connection reset by peer) |
15:53:06 | * | nastavnic quit (Ping timeout: 240 seconds) |
15:55:43 | ephja | nevermind |
16:11:13 | * | gokr joined #nim |
16:15:42 | * | mindriot101 joined #nim |
16:16:45 | * | mindriot101 left #nim (#nim) |
16:27:15 | * | gokr quit (Quit: Leaving.) |
16:31:52 | * | zepolen_ joined #nim |
16:32:58 | * | girvo joined #nim |
16:35:12 | * | zepolen quit (Ping timeout: 256 seconds) |
16:37:11 | * | girvo quit (Ping timeout: 244 seconds) |
16:38:54 | * | Ven quit (Quit: Textual IRC Client: www.textualapp.com) |
16:42:19 | * | [CBR]Unspoken quit (Remote host closed the connection) |
16:43:51 | * | BitPuffin|osx joined #nim |
16:46:02 | * | nastavnic joined #nim |
16:53:34 | cryzed | https://gist.github.com/cryzed/1e461a987ae7f1f46e71 |
16:53:54 | cryzed | Shouldn't this work in Nim? Let allows me to do tuple unpacking, my stack is a sequence of Node, int tuples |
16:54:10 | cryzed | but in line 12 I get a warning/error that there is no field children |
16:54:11 | cryzed | (there is) |
16:55:03 | cryzed | manually unpacking works |
16:55:15 | cryzed | Oh |
16:55:18 | cryzed | I forgot the paranthesis |
16:55:35 | cryzed | damn. |
16:55:44 | * | sepisoad joined #nim |
16:56:01 | * | gokr joined #nim |
17:01:49 | Araq | I'm translating some Go code to Nim ... |
17:02:05 | Araq | error handling is 30% of the code ... |
17:02:13 | cryzed | nice, that worked beautifully |
17:02:16 | cryzed | Araq, ouch |
17:02:19 | * | nastavnic quit (Ping timeout: 250 seconds) |
17:02:27 | Araq | it all disappears with exceptions ... |
17:02:35 | cryzed | Araq, overloading `$` is very cool |
17:02:39 | cryzed | :) |
17:03:47 | * | Ven joined #nim |
17:07:08 | * | sepisoad quit (Read error: Connection reset by peer) |
17:15:32 | * | nicktick quit (Quit: Leaving.) |
17:15:50 | * | pregressive quit (Remote host closed the connection) |
17:18:19 | cryzed | Araq, is there a section in the manual describing all pragmas and their effects? I couldnt find it |
17:19:18 | Araq | http://nim-lang.org/docs/manual.html#pragmas |
17:19:28 | Araq | http://nim-lang.org/docs/manual.html#implementation-specific-pragmas |
17:20:02 | Araq | http://nim-lang.org/docs/manual.html#foreign-function-interface |
17:20:24 | cryzed | thank you, I must be going blind |
17:25:14 | * | pregressive joined #nim |
17:30:11 | * | coffeepots quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:51:42 | * | Ven quit (Ping timeout: 256 seconds) |
17:52:35 | * | yglukhov quit (Ping timeout: 250 seconds) |
18:05:34 | * | gokr quit (Quit: Leaving.) |
18:15:43 | * | nastavnic joined #nim |
18:23:33 | * | sepisoad joined #nim |
18:26:16 | * | nastavnic quit (Ping timeout: 256 seconds) |
18:33:46 | * | girvo joined #nim |
18:39:00 | * | girvo quit (Ping timeout: 272 seconds) |
18:42:06 | * | yglukhov joined #nim |
18:42:20 | dom96 | We should add this to the learn section of Nim's site: http://nim.community |
18:45:10 | * | nastavnic joined #nim |
18:46:19 | * | yglukhov quit (Ping timeout: 250 seconds) |
18:47:39 | * | m joined #nim |
18:47:48 | * | m quit (Client Quit) |
18:49:05 | * | m_ joined #nim |
18:49:33 | m_ | Has anyone here played around with https://github.com/dom96/nimkernel |
18:49:42 | m_ | Looks pretty cool |
18:49:55 | dom96 | hello m_ |
18:49:57 | dom96 | I have ;) |
18:50:00 | m_ | Hey |
18:50:03 | m_ | Nice |
18:50:27 | dom96 | It's something to get people started, I haven't done much with it unfortunately. |
18:50:47 | m_ | It looks pretty neat |
18:51:05 | * | m_ quit (Client Quit) |
18:53:39 | * | silven quit (Ping timeout: 260 seconds) |
18:53:46 | * | aziz quit (Remote host closed the connection) |
18:54:01 | * | silven joined #nim |
18:58:00 | * | Jesin joined #nim |
19:01:09 | * | yglukhov joined #nim |
19:04:06 | * | nastavnic quit (Ping timeout: 240 seconds) |
19:05:27 | * | yglukhov quit (Read error: Connection reset by peer) |
19:07:17 | * | yglukhov joined #nim |
19:13:50 | * | sepisoad quit (Ping timeout: 272 seconds) |
19:19:15 | * | yglukhov quit (Read error: Connection reset by peer) |
19:19:21 | * | Matthias247 joined #nim |
19:21:02 | * | yglukhov joined #nim |
19:22:36 | * | gour joined #nim |
19:26:17 | * | vendethiel joined #nim |
19:39:00 | * | nastavnic joined #nim |
19:45:31 | * | solidsnack joined #nim |
20:04:26 | * | desophos joined #nim |
20:06:07 | * | yglukhov quit (Remote host closed the connection) |
20:17:48 | * | shodan45 joined #nim |
20:17:54 | * | mat4 joined #nim |
20:17:59 | mat4 | hello |
20:20:13 | * | makoLine joined #nim |
20:20:48 | * | brson joined #nim |
20:33:59 | * | darkf quit (Quit: Leaving) |
20:34:30 | * | girvo joined #nim |
20:38:17 | * | Arrrr quit (Quit: WeeChat 1.2) |
20:38:46 | * | girvo quit (Ping timeout: 240 seconds) |
20:40:59 | * | theduke joined #nim |
20:42:53 | * | brson quit (Ping timeout: 250 seconds) |
20:58:56 | * | theduke left #nim ("Leaving") |
21:01:57 | * | solidsnack quit (Ping timeout: 250 seconds) |
21:15:52 | * | desophos quit (Remote host closed the connection) |
21:16:08 | * | Demon_Fox joined #nim |
21:18:16 | * | desophos joined #nim |
21:19:21 | * | desophos quit (Remote host closed the connection) |
21:19:55 | * | desophos joined #nim |
21:25:26 | * | gour quit (Quit: WeeChat 1.3) |
21:26:15 | * | solidsnack joined #nim |
21:29:33 | * | desophos quit (Remote host closed the connection) |
21:30:59 | * | solidsnack quit (Ping timeout: 250 seconds) |
21:32:44 | * | Matthias247 quit (Quit: Matthias247) |
21:34:45 | * | Matthias247 joined #nim |
21:42:52 | * | desophos joined #nim |
21:43:37 | * | desophos quit (Remote host closed the connection) |
21:44:11 | * | desophos joined #nim |
21:48:23 | federico3 | a way to write LKM in Nim could be more useful |
21:59:06 | * | mat4 quit (Quit: Leaving) |
22:00:31 | * | ochkoffein joined #nim |
22:09:36 | * | solidsnack joined #nim |
22:12:55 | * | linfir joined #nim |
22:17:07 | * | Trustable quit (Quit: Leaving) |
22:17:46 | * | linfir quit (Quit: rcirc on GNU Emacs 24.5.1) |
22:21:39 | * | pregressive quit () |
22:25:44 | * | nastavnic quit (Ping timeout: 272 seconds) |
22:31:28 | * | Jesin quit (Quit: Leaving) |
22:33:53 | * | zepolen_ quit (Remote host closed the connection) |
22:34:09 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:35:16 | * | girvo joined #nim |
22:37:57 | cryzed | So is it good style to do away with the ( ) when possible? |
22:38:04 | cryzed | Some function calls just look strange to me then |
22:40:18 | * | girvo quit (Ping timeout: 272 seconds) |
22:44:36 | ephja | no it's not |
22:45:42 | * | shodan45 quit (Quit: Konversation terminated!) |
22:46:27 | ephja | I can understand always including the parentheses, but I only omit them when the statement in question resembles a field access |
22:48:03 | cryzed | ephja, so someObject myField -- that's the only thing you do? |
22:50:01 | ephja | that doesn't look right |
22:50:47 | cryzed | what resembles a field access for you |
22:52:36 | def- | cryzed: someObject.myField |
22:53:01 | cryzed | well yes... but ephja said they would omit in this case |
22:53:27 | ephja | the parentheses yes, and that's the syntax I was referring to |
22:53:54 | cryzed | ah ok, nevermind |
22:53:57 | cryzed | of course |
22:55:41 | ephja | "resembles a field access" as in a "get" operation (either an actual field or a proc which takes some object and returns a value) |
22:56:37 | cryzed | Well yep, I would have never added a () to a field access, so I suppose I simply misunderstood |
22:56:44 | ephja | I would personally not do "foo.bar" if bar doesn't return a value, but I don't think it's common |
22:57:14 | cryzed | I have to say it makes sense though, what you are doing that is |
22:57:19 | cryzed | adding () makes the code clearer |
22:57:31 | cryzed | even if you dont neccessarily have to |
22:57:48 | cryzed | I'm also tempted to add () to echo, since it's just a function too |
22:58:11 | ephja | but at the same time it's obvious that a value is not returned since if a value was returned, then you would have to either use the value or discard it |
22:58:51 | cryzed | true too |
22:59:06 | cryzed | I just need to find a style and stick with it, but the nim code style guide doesnt say anything |
22:59:22 | ephja | but I would use the "command" syntax then (echo foo), though not always |
23:00:36 | cryzed | ephja, when not? |
23:04:58 | * | girvo joined #nim |
23:08:04 | ephja | cryzed: I don't think I use it for functions that return values |
23:08:49 | ephja | because it's easy to forget that "let x = p 1" will work and "let x = p 1, 2" won't, because of the fact that there's more than one parameter |
23:09:00 | ephja | *with functions |
23:09:54 | ephja | such grammar |
23:09:57 | cryzed | :D |
23:10:00 | cryzed | grammar.such |
23:10:15 | cryzed | for example I think I'll add () to file.readAll() |
23:10:26 | cryzed | but for an option I might just check if maybeOption.isNone: |
23:10:46 | cryzed | so stuff that sounds like an attribute, not add the (), but for stuff that clearly is worded like an action/verb |
23:10:48 | cryzed | I'll add the () |
23:10:50 | cryzed | I suppose |
23:11:02 | cryzed | then there's just the question about adding ( ) to echo etc. |
23:14:42 | * | vendethiel quit (Ping timeout: 256 seconds) |
23:17:48 | ephja | yes it's fine |
23:18:35 | * | M-max quit (Read error: Connection reset by peer) |
23:18:35 | * | M-Quora quit (Write error: Connection reset by peer) |
23:18:39 | cryzed | :) |
23:20:26 | ephja | I have some code which does "future.read" actually. I dunno if I should keep doing that |
23:22:14 | * | xet7 quit (Ping timeout: 245 seconds) |
23:22:47 | cryzed | ephja, I feel .read() would be clearer -- it also clearly displays intent "read this file" -- there are side effects, for example the file pointer changes etc. On the other hand stuff like isNone might as well be an attribute, since it simply checks a state and returns a boolean |
23:22:56 | cryzed | at least that's what I'm rationalizing my decision with now |
23:23:53 | ephja | I agree |
23:25:25 | cryzed | and I'll also try to put parantheses around all procs, even those only accepting a single argument -- including echo. These are all procs, not keywords -- so that's what I'm doing. It's unfortunate about the neat little syntax features, but that flexibility can stay for custom DSL with the macro system I suppose. Writing your code the "regular" way, will also ease new Nim developers in understanding it |
23:25:38 | cryzed | as in procs that do not mimick attributes |
23:32:47 | * | jaco60 quit (Remote host closed the connection) |
23:37:45 | * | M-Quora joined #nim |
23:39:59 | * | pregressive joined #nim |
23:40:25 | cryzed | damn, I really like Nim after all |
23:40:27 | cryzed | :) |
23:45:17 | * | jaco60 joined #nim |
23:46:26 | * | ozra quit (Ping timeout: 240 seconds) |
23:47:34 | * | ozra joined #nim |
23:47:52 | * | M-max joined #nim |
23:53:14 | * | pregressive quit (Remote host closed the connection) |
23:55:22 | * | pregressive joined #nim |