00:08:09 | * | aa__ joined #nim |
00:10:38 | * | yglukhov joined #nim |
00:14:51 | * | yglukhov quit (Ping timeout: 246 seconds) |
00:16:50 | * | shodan45 quit (Quit: Konversation terminated!) |
00:18:48 | * | ftsf_ joined #nim |
00:52:33 | * | chemist69 quit (Ping timeout: 256 seconds) |
00:53:22 | * | yglukhov joined #nim |
00:57:37 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:16:38 | * | chemist69 joined #nim |
01:35:38 | * | yglukhov joined #nim |
01:36:18 | * | dddddd quit (Quit: Hasta otra..) |
01:40:13 | * | yglukhov quit (Ping timeout: 260 seconds) |
01:58:30 | vktec | Is it possible to import C macros defined in a header file as consts? |
01:58:42 | * | Jesin quit (Ping timeout: 250 seconds) |
02:05:08 | * | chemist69 quit (Ping timeout: 260 seconds) |
02:18:17 | * | yglukhov joined #nim |
02:18:46 | * | chemist69 joined #nim |
02:22:54 | * | yglukhov quit (Ping timeout: 268 seconds) |
02:38:09 | * | Jesin joined #nim |
02:52:00 | * | Jesin quit (Ping timeout: 246 seconds) |
03:00:56 | * | yglukhov joined #nim |
03:02:53 | * | chemist69 quit (Ping timeout: 256 seconds) |
03:05:16 | * | saml_ quit (Remote host closed the connection) |
03:05:43 | * | yglukhov quit (Ping timeout: 260 seconds) |
03:12:33 | * | PMunch quit (Quit: leaving) |
03:14:02 | * | brechtm joined #nim |
03:16:47 | * | chemist69 joined #nim |
03:18:38 | * | brechtm quit (Ping timeout: 256 seconds) |
03:20:51 | * | shodan45 joined #nim |
03:31:56 | onionhammer | you should be able to |
03:32:16 | onionhammer | with the {.importc.} pragma |
03:43:20 | * | yglukhov joined #nim |
03:47:33 | * | yglukhov quit (Ping timeout: 245 seconds) |
03:51:21 | * | mal`` quit (Quit: Leaving) |
03:52:31 | * | mal`` joined #nim |
03:56:02 | * | aa__ quit (Ping timeout: 265 seconds) |
03:58:49 | cheatfate | constants must be calculated at compile time, but Nim compiler have not access to `c constant value` at the compile time, so it can be only `variable`. |
04:46:48 | * | yglukhov joined #nim |
04:51:07 | * | yglukhov quit (Ping timeout: 256 seconds) |
05:40:10 | * | nsf joined #nim |
05:52:57 | * | chemist69 quit (Ping timeout: 246 seconds) |
05:55:48 | * | chemist69 joined #nim |
05:58:56 | * | Jesin joined #nim |
06:00:22 | * | Jesin quit (Remote host closed the connection) |
06:07:51 | * | Jesin joined #nim |
06:11:47 | * | cheatfate quit (Read error: Connection reset by peer) |
06:11:53 | * | cheatfate_ joined #nim |
06:22:07 | * | yglukhov joined #nim |
06:25:59 | * | aa__ joined #nim |
06:26:35 | * | yglukhov quit (Ping timeout: 258 seconds) |
06:27:17 | * | kulelu88 quit (Quit: Leaving) |
06:28:29 | * | aa__ quit (Read error: Connection reset by peer) |
06:30:04 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:36:57 | * | bjz joined #nim |
06:40:51 | * | Dankrad quit (Ping timeout: 260 seconds) |
06:42:50 | * | space-wizard joined #nim |
06:47:46 | * | bjz quit (Read error: Connection reset by peer) |
06:56:57 | * | chemist69 quit (Ping timeout: 240 seconds) |
07:01:42 | * | bjz joined #nim |
07:03:27 | * | yglukhov joined #nim |
07:07:40 | * | yglukhov quit (Ping timeout: 250 seconds) |
07:16:23 | * | ftsf_ quit (Remote host closed the connection) |
07:17:33 | * | chemist69 joined #nim |
07:28:04 | * | chemist69 quit (Ping timeout: 260 seconds) |
07:31:01 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:33:42 | * | Arrrr joined #nim |
07:45:26 | Arrrr | "the compiler now detects and forbids recursive module dependencies" good grief, i think i won't update nim for a while. |
07:45:59 | * | chemist69 joined #nim |
07:47:24 | * | yglukhov joined #nim |
07:51:55 | * | yglukhov quit (Ping timeout: 252 seconds) |
07:53:06 | FromGitter | <ephja> hm :> |
08:08:40 | Arrrr | https://i.imgur.com/CCMSjAv.png |
08:11:35 | Araq | Arrrr: does your project use this feature? |
08:13:39 | Arrrr | Sometimes i have no other choice. But i can wait until you fully implement import with dependencies. It is not a commercial thing |
08:13:48 | Araq | I thought about making it a warning instead |
08:16:04 | * | bjz_ joined #nim |
08:17:26 | flyx | Arrrr: *whom |
08:18:13 | * | bjz quit (Ping timeout: 248 seconds) |
08:19:24 | * | chemist69 quit (Ping timeout: 260 seconds) |
08:20:55 | Arrrr | I modified two things |
08:23:01 | flyx | Araq: would Ada's `limited with` solve the problem or is it similar to whatever D does? |
08:25:14 | * | brechtm joined #nim |
08:29:37 | * | yglukhov joined #nim |
08:34:11 | * | yglukhov quit (Ping timeout: 250 seconds) |
08:34:20 | Arrrr | Can i directly emit c define/includes? |
08:34:59 | Araq | flyx: whatever Ada does, doesn't help Nim |
08:35:27 | Araq | for cyclic imports to work better, we need a different forward resolution |
08:35:42 | Araq | a different forward resolution means some kind of prepass in the compiler |
08:36:09 | Araq | except that the prepass should acknowledge Nim's flexibility. |
08:36:17 | * | brechtm quit (Remote host closed the connection) |
08:36:33 | Araq | templates and macros need to be resolved before you can even start to collect all the 'type' sections for the prepass |
08:36:36 | * | Jesin quit (Ping timeout: 268 seconds) |
08:36:52 | Araq | macros themselves depend on symbol lookup |
08:37:16 | Araq | --> it's a big mess and the only viable solution is what D does in this case |
08:38:10 | Araq | that pretty much means to rewrite large parts of the compiler. |
08:38:41 | Araq | Alternatively we could go the C++ route which allows ptrs/refs to unresolved structs/classes |
08:39:00 | * | brechtm joined #nim |
08:39:29 | * | chemist69 joined #nim |
08:39:47 | Araq | currently my preferred solution :-) |
08:43:05 | * | byte512 joined #nim |
08:43:38 | flyx | somewhat similar to what Ada does. `limited with` imports a „limited view“ of the types, meaning that all types are considered limited, but you can have access types on them. |
08:54:00 | * | Andris_zbx joined #nim |
09:25:56 | * | Sembei quit (Ping timeout: 268 seconds) |
09:31:22 | * | vendethiel- joined #nim |
09:31:28 | * | Demos quit (Ping timeout: 265 seconds) |
09:31:44 | * | vendethiel quit (Ping timeout: 260 seconds) |
09:31:45 | FromGitter | <ephja> do we have an async keyboarding reading library? |
09:33:26 | vktec | wrt my earlier question about consts, C macros and FFI, this does not work: https://gist.github.com/vktec/1bb3dd15261bf6fa6383a3694f5269f1 (cc. onionhammer, cheatfate_) |
09:34:16 | vktec | From the compiler error, it seems consts and vars must have values, and cannot simply import them from a C header, but I could be wrong. |
09:34:58 | vktec | If this _is_ the case, it'd be good to have a way around this, so people can write wrappers that won't go out of date if the C library changes its constants |
09:40:00 | * | shodan45 quit (Quit: Konversation terminated!) |
09:41:03 | * | andris_ joined #nim |
09:41:49 | * | Andris_zbx quit (Ping timeout: 260 seconds) |
09:47:19 | flyx | vktec: you are aware that C constants are simply preprocessor macros? |
09:47:46 | vktec | Yes |
09:48:34 | flyx | a C library may never change its constants because the values are compiled into the object code importing the header. so if you update a constant in a C library, all previously compiled code using that library will fail |
09:49:00 | flyx | so a C library changing its constants is not really a use-case anywhere |
09:50:22 | flyx | vktec: and vars do *not* need to have values. but if not, you must provide a type. then it may work together with the header pragma |
09:50:30 | vktec | Well, if a C header is modified to use new values for its constants, then the Nim wrapper would have to be modified as well. I'd like to import them from the header, making the wrapper easier to maintain. |
09:50:44 | vktec | flyx: Ah, that's what I was missing. I'll try using a var with a type and importc |
09:51:40 | flyx | vktec: as I said, no-one in a sane state of mind would change the value of a constant in a C header |
09:52:03 | flyx | so it is generally fine copying the value |
09:52:31 | vktec | So you say, but I've seen it happen :P |
09:52:33 | * | desophos joined #nim |
09:54:12 | vktec | I'll probably just copy the values for now, but I'm still interested in whether or not it's possible |
09:54:21 | Araq | the var CNST {.importc: "CNST", header: "foo.h".}: cint hack is widely known |
09:54:31 | Araq | and a liability for the LLVM codegen |
09:56:00 | vktec | Araq: I'm assuming it's better just to copy the values and hope some idiot doesn't change them |
09:57:40 | Araq | it's better to use c2nim and keep the patches to the C files around |
09:57:56 | Araq | this way you can regenerate your wrappers easily. |
09:58:08 | Araq | but yeah, often that's not feasible |
09:58:50 | vktec | Damn. I completely forgot about c2nim |
09:59:47 | vktec | Lucky I've not done that much work on this wrapper yet :D |
10:04:44 | * | yglukhov joined #nim |
10:09:18 | * | yglukhov quit (Ping timeout: 258 seconds) |
10:13:37 | flyx | Araq: I improved https://github.com/nim-lang/Nim/pull/4874 some days ago, could you have a look at it again? |
10:15:46 | * | yglukhov joined #nim |
10:15:51 | * | yglukhov quit (Remote host closed the connection) |
10:16:50 | * | yglukhov joined #nim |
10:25:46 | Araq | why does gorge take the ABCDE variant and gorgeEx ABCD? |
10:26:35 | * | chemist69 quit (Ping timeout: 256 seconds) |
10:34:53 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
10:36:09 | * | bjz joined #nim |
10:36:40 | yglukhov | Araq: hi, this "disallow recursive module dependencies" seems to be breaking a lot. why this change? |
10:37:20 | Araq | because it produced weird errors when you have recursive deps but still the wrong symbol order |
10:37:47 | Araq | but as I said, if your project depends on it, I can make it a warning instead |
10:38:02 | yglukhov | pretty please do |
10:39:47 | Araq | maybe I can even instead emit the error message for "undeclared identifier"? |
10:39:48 | yglukhov | should not we move in the opposite way of allowing this things instead of prohibiting? |
10:40:16 | Araq | every new code that I write considers recursive module deps |
10:40:44 | yglukhov | thats nice to hear of course... =) |
10:43:03 | Araq | well we don't need a warning either, I think I can do instead: |
10:43:30 | Araq | "undeclared identifier: foo, this might be caused by this recursive module dependency ...." |
10:45:45 | Arrrr | That's a good idea. |
10:45:46 | * | Demos joined #nim |
10:47:02 | yglukhov | Araq: im happy with anything as long as it doesnt contstraint existing recursive-deps rules even more that they are ;) |
10:50:07 | Araq | on the other hand, why not disallow it and introduce forward type decls? |
10:53:41 | * | chemist69 joined #nim |
10:57:36 | * | Demos quit (Ping timeout: 258 seconds) |
11:14:18 | Arrrr | That can be useful too, it is a struggle to arrange imports as it is now |
11:14:51 | Araq | oh well, I stick to the improved error message for now |
11:43:45 | * | elrood joined #nim |
11:52:44 | * | vendethiel joined #nim |
11:54:09 | * | vendethiel- quit (Ping timeout: 246 seconds) |
12:02:25 | * | Snircle joined #nim |
12:20:18 | * | brechtm_ joined #nim |
12:21:27 | * | brechtm quit (Ping timeout: 246 seconds) |
12:31:33 | * | byte512 quit (Ping timeout: 268 seconds) |
12:40:23 | * | Trixarian joined #nim |
12:40:53 | Trixarian | Well, that works |
12:43:25 | Trixarian | Hmmm, what happened to my ZNC |
12:44:00 | * | byte512 joined #nim |
12:58:56 | * | Arrrr quit (Quit: WeeChat 1.5) |
13:05:04 | * | Trixarian quit (Ping timeout: 252 seconds) |
13:07:17 | * | chemist69 quit (Ping timeout: 240 seconds) |
13:10:53 | * | brechtm joined #nim |
13:12:28 | arnetheduck | Araq, any issues with the branch? |
13:14:35 | * | brechtm_ quit (Ping timeout: 252 seconds) |
13:14:44 | * | arnetheduck quit (Remote host closed the connection) |
13:18:47 | Araq | I still haven't tested manually on Windows and OSX |
13:28:41 | * | chemist69 joined #nim |
13:31:26 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:06:55 | * | desophos quit (Read error: Connection reset by peer) |
14:07:01 | * | chemist69 quit (Ping timeout: 256 seconds) |
14:08:48 | * | vlad1777d joined #nim |
14:15:54 | * | MrAxilus[m] quit (Remote host closed the connection) |
14:15:55 | * | zielmicha[m] quit (Remote host closed the connection) |
14:15:55 | * | prose[m] quit (Write error: Connection reset by peer) |
14:15:55 | * | jivank[m] quit (Remote host closed the connection) |
14:15:55 | * | erwana[m] quit (Remote host closed the connection) |
14:15:55 | * | M-Quora quit (Remote host closed the connection) |
14:15:56 | * | terry[m] quit (Remote host closed the connection) |
14:15:56 | * | Guest73656[m] quit (Read error: Network is unreachable) |
14:15:57 | * | TheManiac quit (Read error: Connection reset by peer) |
14:15:58 | * | hohlerde quit (Read error: Connection reset by peer) |
14:27:24 | * | chemist69 joined #nim |
14:34:49 | * | zielmicha[m] joined #nim |
14:41:27 | flyx | Araq: because I added an optional onErrorBreak parameter to gorge |
14:42:13 | flyx | Araq: it's not really needed because you can just use gorgeEx and check the result, but I thought it would be a nice addition |
14:42:31 | flyx | since I have the information about the result anyway |
14:47:29 | * | prose[m] joined #nim |
14:47:30 | * | hohlerde joined #nim |
14:47:30 | * | jivank[m] joined #nim |
14:47:30 | * | MrAxilus[m] joined #nim |
14:47:30 | * | M-Quora joined #nim |
14:47:36 | * | TheManiac joined #nim |
14:47:37 | * | erwana[m] joined #nim |
14:47:37 | * | Guest73656[m] joined #nim |
14:47:38 | * | terry[m] joined #nim |
14:53:07 | * | arnetheduck joined #nim |
14:57:14 | arnetheduck | most interesting would be to run with -d:checkabi on osx to see how different the abi is |
14:57:41 | arnetheduck | windows shouldn't be so much affected |
15:00:17 | cheatfate_ | arnetheduck, most of windows api is depends on structures and its size, so some changes to types can affect everything :) |
15:00:53 | cheatfate_ | it can even break asyncdispatch.nim code on windows, because we are using some hacks with OVERLAPPED structure |
15:01:14 | arnetheduck | cheatfate_, yeah, but most my changes were to the horribly named posix.nim (what's posix anyway).. and in practice it should keep reading the sizes from c headers anyway |
15:01:54 | arnetheduck | it's a funny feature anyway, specifying structs like that... |
15:02:40 | cheatfate_ | arnetheduck, i dont think posix.nim has bad naming, maybe it has some part (like 20% or so) which is not very posix |
15:02:47 | arnetheduck | I noticed it's all-or-nothing though.. if you remove .header from a struct and the header is included because of some other header directive, you'll get a double definition error when compiling in c |
15:03:17 | arnetheduck | cheatfate_, posix has evolved over time - that file is a funny mix of a number of versions resulting in.. quite a mess |
15:03:48 | * | cheatfate_ is now known as cheatfate |
15:06:35 | * | Sembei joined #nim |
15:06:38 | arnetheduck | on that topic, I could use some help with windows and macosx for nlvm, feel free to drop by ;) it actually works pretty well, except some stupid optimization bug that breaks gc |
15:07:30 | arnetheduck | getting the abi right in the std lib is probably the biggest issue.. on windows, it might also be useful to handle SEH |
15:09:11 | flyx | arnetheduck: I wanted to try out nlvm on OSX once, but failed at compiling llvm |
15:10:08 | arnetheduck | flyx, that I don't know about.. though they changed the build system in 3.9, might wanna try again.. osx is kind of the main platform for llvm given that the main dude works for apple |
15:10:21 | flyx | I know |
15:10:51 | flyx | I might try again sometime |
15:11:12 | arnetheduck | that said, there's patching to be done to make it work, for sure |
15:11:32 | arnetheduck | nlvm that is, llvm should be fine ;) |
15:18:23 | * | chemist69 quit (Ping timeout: 245 seconds) |
15:25:08 | * | arnetheduck quit (Ping timeout: 250 seconds) |
15:27:30 | federico3 | is goldenreign around sometimes? |
15:32:00 | FromGitter | <nigredo-tori> Is there a good way to compare whether two untyped `NimNode`s refer to the same type? Or do I have to make a macro that returns a call to another macro? The whole thing feels more and more goldbergian. |
15:37:02 | * | chemist69 joined #nim |
15:41:24 | * | djellemah_ joined #nim |
15:50:16 | * | Varriount|Mobile quit (Ping timeout: 250 seconds) |
15:51:55 | * | Varriount|Mobile joined #nim |
15:56:55 | federico3 | how to check in an async socket is still connected or needs to be restarted? |
15:57:32 | * | couven92 joined #nim |
16:03:58 | * | djellemah_ quit (Ping timeout: 250 seconds) |
16:10:55 | FromGitter | <ephja> the return value of recv will tell you whether or not the socket has disconnected |
16:18:36 | FromGitter | <ephja> sleepAsync and withTimeout can be used for defining timeouts |
16:20:41 | FromGitter | <ephja> federico3: I just discovered asyncdispatch.withTimeout actually. it'll come in handy |
16:21:19 | federico3 | very nice |
16:46:49 | * | shodan45 joined #nim |
17:20:52 | * | djellemah_ joined #nim |
17:27:44 | * | andris_ quit (Remote host closed the connection) |
17:31:02 | * | space-wizard joined #nim |
17:34:29 | * | vendethiel quit (Ping timeout: 248 seconds) |
17:35:05 | * | vendethiel joined #nim |
17:37:32 | * | yglukhov_ joined #nim |
17:41:15 | * | yglukhov quit (Ping timeout: 258 seconds) |
17:42:12 | * | chemist69 quit (Ping timeout: 260 seconds) |
17:42:21 | * | yglukhov_ quit (Ping timeout: 268 seconds) |
18:00:38 | * | chemist69 joined #nim |
18:05:04 | * | Snircle quit (Ping timeout: 260 seconds) |
18:05:22 | * | Trustable joined #nim |
18:05:51 | * | Snircle joined #nim |
18:23:02 | * | Sembei quit (Ping timeout: 256 seconds) |
18:23:37 | * | yglukhov joined #nim |
18:28:01 | * | yglukhov quit (Ping timeout: 258 seconds) |
18:38:03 | * | Trustable quit (Remote host closed the connection) |
18:38:57 | * | Trustable joined #nim |
18:39:11 | FromGitter | <konqoro> @nigredo-tori there is a sameType proc, that it might be what you need |
18:53:47 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:54:52 | * | Snircle quit (Ping timeout: 250 seconds) |
18:58:10 | * | djellemah_ quit (Ping timeout: 250 seconds) |
19:03:15 | * | Snircle joined #nim |
19:06:01 | * | vendethiel- joined #nim |
19:06:07 | * | vendethiel quit (Ping timeout: 260 seconds) |
19:10:19 | * | brechtm quit (Read error: No route to host) |
19:11:03 | * | brechtm joined #nim |
19:15:10 | * | kulelu88 joined #nim |
19:17:26 | * | yglukhov joined #nim |
19:35:53 | * | djellemah_ joined #nim |
19:46:39 | * | djellemah_ quit (Quit: Leaving) |
19:55:49 | * | byte512 quit (Ping timeout: 248 seconds) |
20:00:05 | * | kulelu88 quit (Ping timeout: 248 seconds) |
20:01:58 | * | vendethiel- is now known as vendethiel |
20:05:45 | * | Snircle quit (Ping timeout: 260 seconds) |
20:08:07 | * | Ven joined #nim |
20:08:56 | * | Snircle joined #nim |
20:10:37 | * | Ven is now known as ven |
20:22:06 | * | ven quit (Read error: Connection reset by peer) |
20:22:14 | * | Ven joined #nim |
20:25:43 | * | space-wizard joined #nim |
20:30:54 | * | kulelu88 joined #nim |
20:36:11 | * | Matthias247 joined #nim |
20:48:39 | * | Sembei joined #nim |
20:51:37 | * | Snircle quit (Ping timeout: 256 seconds) |
20:54:23 | * | Snircle joined #nim |
20:55:19 | * | Jesin joined #nim |
21:06:42 | vktec | Despite this https://github.com/nim-lang/Nim/blob/v0.15.2/lib/system.nim#L2714 and this http://nim-lang.org/docs/system.html#open,string,FileMode,int I get the error "undeclared identifier: 'open'" when trying to use open to open a file. Any ideas what I'm doing wrong? |
21:08:03 | * | Ven quit (Ping timeout: 256 seconds) |
21:09:53 | Araq | it's not an iterator |
21:10:15 | vktec | I'm not using it like one. |
21:10:30 | vktec | var fh = open("foo", fmWrite) |
21:11:10 | * | Ven joined #nim |
21:11:11 | Araq | named your file 'open'? |
21:11:28 | vktec | Nope |
21:11:50 | Araq | gist it then |
21:12:26 | vktec | 1 sec |
21:14:36 | vktec | Well, this is odd |
21:14:49 | * | Sembei quit (Quit: WeeChat 1.5-dev) |
21:14:57 | vktec | It's working perfectly in a minimal example, just not in the file I want to use it in |
21:15:01 | vktec | Lemme debug some more |
21:15:10 | Araq | just gist your full module |
21:16:08 | vktec | Seems it was the filename |
21:16:10 | vktec | How odd |
21:16:43 | Araq | the filename is also used as the module name |
21:17:06 | Araq | though Nim got much smarter at module name resolutions |
21:17:13 | vktec | Does Nim not like modules ending with _nim? |
21:17:44 | Araq | Nim tells you when it doesn't like something |
21:17:50 | vktec | No, that's not it... |
21:17:53 | vktec | How strange... |
21:20:18 | * | brechtm quit (Read error: Connection reset by peer) |
21:21:02 | Araq | well it's definitely interesting |
21:21:47 | vktec | It seems Nim doesn't like a nim file having the same name as a nims file |
21:22:48 | vktec | I originally had this in a nims file, but was getting "undeclared identifier: 'open'", so copied it to a nim file. Then I started running into the same issue, seemingly because of the conflicting filenames |
21:23:00 | * | Ven_ joined #nim |
21:23:06 | vktec | It works fine with a different filename |
21:23:14 | * | Ven quit (Read error: Connection reset by peer) |
21:23:27 | * | brechtm joined #nim |
21:23:33 | vktec | Now, the root question: does NimScript have an equivalent to system.open, which doesn't seem to be supported? |
21:25:21 | * | Jesin quit (Ping timeout: 265 seconds) |
21:34:26 | cheatfate | Araq, does osproc.nim still has problems with stdin on windows? |
21:36:10 | Araq | I think so. |
21:36:29 | * | Ven_ quit (Read error: Connection reset by peer) |
21:36:57 | * | Ven joined #nim |
21:36:57 | Araq | vktec: staticRead |
21:37:47 | vktec | And for writing? |
21:41:58 | * | brechtm quit (Ping timeout: 250 seconds) |
21:44:28 | vktec | writeFile worked for writing. Thanks for all the help |
21:58:51 | cheatfate | Araq, i have found one problem, not a problem of osproc.nim, but can be a problem of application you are running |
21:59:07 | Araq | I'm all ears |
22:00:22 | cheatfate | https://msdn.microsoft.com/en-us/library/ms682075.aspx |
22:01:05 | cheatfate | looks like handles obtained via GetStdHandle() works only for console, but not for redirected console... |
22:02:08 | Araq | cheatfate: remember that we're looking for a regression |
22:02:25 | Araq | well I still haven't tested NimEdit again, maybe it's not a regression |
22:02:36 | Araq | worked really well with nimedit though |
22:03:36 | cheatfate | so, no problem anymore? |
22:05:02 | Araq | no, but I'm not sure it's a regression or not |
22:05:37 | * | [CBR]Unspoken1 quit (Ping timeout: 240 seconds) |
22:07:41 | * | Ven quit (Read error: Connection reset by peer) |
22:08:11 | * | Ven joined #nim |
22:13:39 | cheatfate | ok i was wrong... its better to use getstdhandle, then conin/conout |
22:14:34 | * | Trustable quit (Remote host closed the connection) |
22:23:10 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:24:34 | * | nsf quit (Quit: WeeChat 1.6) |
22:37:04 | * | xet7 quit (Quit: Leaving) |
22:38:55 | * | vlad1777d quit (Ping timeout: 260 seconds) |
22:38:56 | * | xet7 joined #nim |
22:53:54 | * | krux02 joined #nim |
22:54:41 | krux02 | wasn't something like this possible: proc `update=`(a: var A; index: int; value: string) |
22:54:59 | krux02 | myVar.update(17) = "hello world" |
22:55:06 | krux02 | seems not to work |
22:55:36 | Araq | never was supported afaik |
22:55:46 | Araq | overload `{}` instead |
22:55:53 | * | chemist69 quit (Ping timeout: 245 seconds) |
22:55:56 | Araq | it's sexier too |
22:56:08 | Araq | myVar{17} = "hello world" |
22:57:10 | dom96 | may as well use myVar[17] = "hello world" in that case |
23:00:04 | vktec | I've completely forgotten how object constructors are handled in Nim. Can anyone point me to a page describing it or give me a quick explanation? |
23:00:06 | Araq | yeah but every language can do this. Only Nim has the power of the curly accessors. |
23:00:48 | Araq | vktec: MyObj(field: value, fieldB: valueB) but since it's leaks every implementation detail there is, use a constructor proc |
23:01:04 | * | vlad1777d joined #nim |
23:01:21 | vktec | I was more wondering what the convention for constructor procs was |
23:01:54 | Araq | newT or initT |
23:02:03 | Araq | depending on ref vs object |
23:03:05 | vktec | So newT for refs and initT for objects? |
23:03:20 | Araq | yes |
23:04:10 | vktec | Okay, thanks Araq |
23:04:29 | vktec | No way to override the `new` operator then? |
23:04:43 | vktec | Seems like that would've been a nice thing to be able to do |
23:05:02 | Araq | no that's a horrible idea even if technically possible |
23:05:05 | krux02 | is there a new operator? |
23:05:20 | Araq | no. it's a builtin proc. |
23:05:45 | Araq | you can overload it, Nim applies the general overloading resolution rules for everything anyway |
23:05:57 | Araq | but it's a horrible, horrible idea. |
23:06:13 | krux02 | I've overridden new with a var parameter to initialize my values of my types |
23:06:34 | krux02 | proc `new`(this: var MyType): void = ... |
23:06:58 | krux02 | is that an ok-style or a bad idea? |
23:07:31 | vktec | From what Araq seems to be saying, "BADBADBADBADBAD!!!" :P |
23:08:06 | krux02 | hmm I might have to change that |
23:08:14 | krux02 | I never used the internal new proc |
23:08:55 | Araq | krux02: well if MyType is not a 'ref' it's only bad style :-) |
23:09:14 | krux02 | it's not a ref |
23:09:27 | dom96 | Please stick to the NEP-1 whenever possible |
23:09:27 | krux02 | I have not a single use case of a ref type in any of my projects yet |
23:09:38 | dom96 | There are many projects out there that are not |
23:09:56 | dom96 | The main culprit is putting `type` on the same line as the object definition |
23:10:09 | * | vlad1777d_ joined #nim |
23:10:15 | dom96 | The `type` is a type section! Use it as such! |
23:10:19 | * | vktec quickly corrects that |
23:10:20 | vktec | :P |
23:10:27 | Araq | krux02: sounds like your code is awesome :-) |
23:10:42 | * | vlad1777d quit (Ping timeout: 244 seconds) |
23:11:12 | * | Araq is serious. |
23:12:35 | krux02 | not sure if my code is awesome, there as surely a lot of improvements possible |
23:12:38 | dom96 | Because everything is allocated on the stack? |
23:12:46 | krux02 | but honestly I am quite happy with what I can do with nim |
23:14:52 | krux02 | nim is the best (statically typed language that I know) to transpose an algorithm |
23:17:07 | krux02 | and as far as I know every statically typed language is bad at refactoring, so maybe it just the best language in existence to do that |
23:19:31 | FromGitter | <ephja> it beats COBOL easily |
23:22:15 | * | cheatfate quit (Quit: Leaving) |
23:22:52 | * | chemist69 joined #nim |
23:23:36 | Araq | wait ... what? |
23:23:58 | Araq | refactoring is easy pease with static typing, the complier tells you what needs changes |
23:24:34 | Araq | instead of hacking around and producing trivial bugs all the time which then are caught by testing. or not. |
23:24:56 | Araq | but even if they are, compilers are faster than test suites |
23:26:15 | dom96 | So true |
23:27:25 | * | Demos joined #nim |
23:27:33 | krux02 | generally compilers are faster than test suits, but have heard stories of rust |
23:30:19 | krux02 | Araq: what do you think of the idea, to add nil checks to both setLen procs in system? |
23:31:08 | krux02 | then proc newSeq[T](s: var seq[T]; len: Natural) would become completely redundant |
23:31:16 | Araq | just patch the compiler already to use small strings/vectors optimization |
23:31:30 | Araq | and get rid of 'nil' for these two types |
23:32:29 | * | yglukhov quit (Remote host closed the connection) |
23:32:52 | krux02 | so that means when I have an object that contains seq and string as member values, they will become valid and empty? |
23:33:04 | Araq | aye |
23:33:16 | krux02 | whay does "aye" mean? |
23:33:27 | Araq | yes |
23:33:29 | dom96 | Aye Captain |
23:33:33 | krux02 | ok |
23:34:02 | dom96 | Araq is the captain of this ship, apparently. |
23:34:26 | krux02 | that would truely be awesome |
23:34:44 | krux02 | I really like that |
23:35:24 | krux02 | dom96: but the captain does not say "aye" |
23:35:36 | krux02 | or does he? |
23:37:02 | dom96 | http://www.yarr.org.uk/talk/ |
23:37:25 | Araq | you never watched pirates of the caribbean, did you? |
23:39:34 | krux02 | I did watch it 10 years ago or so |
23:40:18 | krux02 | and played Monkey island more than 20 years ago |
23:47:23 | * | [CBR]Unspoken joined #nim |
23:48:56 | * | vlad1777d_ quit (Ping timeout: 252 seconds) |
23:51:58 | FromGitter | <Alan-FGR> (https://files.gitter.im/nim-lang/Nim/RXIr/capt.PNG) |
23:52:10 | FromGitter | <Alan-FGR> Hey guys, I'm trying to compile a code and I'm getting that error... any ideas? |
23:52:24 | FromGitter | <Alan-FGR> Just getting started really |
23:53:07 | FromGitter | <Alan-FGR> I've configured nim to use vcc and added the path to the tools to the system Path variable |
23:53:26 | FromGitter | <Alan-FGR> I can run for example cl.exe just fine, I don't think that's the problem really |
23:54:21 | FromGitter | <Alan-FGR> Apparently some includes could be the problem, no idea how the nim compilers is supposed to work |
23:58:59 | * | shodan45 quit (Quit: Konversation terminated!) |
23:59:07 | FromGitter | <Alan-FGR> What's that limits.h file? |