00:00:59 | ryu0 | Araq: i did notice Pascal syntaxes. type/var/const blocks for example. |
00:01:10 | * | nande quit (Read error: Connection reset by peer) |
00:02:27 | * | nande joined #nim |
00:08:41 | dom96 | Araq: osproc.select only really works on POSIX |
00:09:08 | dom96 | https://github.com/nim-lang/Nim/issues/90 |
00:10:29 | Varriount | How does python do it? |
00:11:15 | * | pregressive joined #nim |
00:12:35 | dom96 | Does Python do it? |
00:16:12 | Varriount | dom96: Eh. Python convention is to use a thread and a queue. |
00:16:58 | dom96 | That's what Aporia does |
00:17:07 | dom96 | and what I attempted to abstract in an asyncproc module |
00:17:24 | dom96 | But in the long run IOCP should be used on Windows |
00:17:53 | Varriount | dom96: The problem is that only one iocp object can be created per-thread. |
00:18:04 | * | BitPuffin|osx joined #nim |
00:18:48 | Varriount | So there needs to be some mechanism for various libraries to use the iocp api (even if it's an abstraction) without getting in each-others way. |
00:19:46 | * | strcmp1 quit (Remote host closed the connection) |
00:19:47 | Varriount | And while the async modules are good for relatively high level needs, there are times when one needs low-level acess. |
00:19:55 | Varriount | *access |
00:20:07 | * | strcmp1 joined #nim |
00:20:07 | * | strcmp1 quit (Client Quit) |
00:24:26 | Varriount | If I recall correctly, there was a an extension for python's twisted networking library that did non-blocking process communication. It was for offloading work to external processes (because of the GIL) |
00:28:42 | * | strcmp1 joined #nim |
00:31:54 | Varriount | Araq, dom96: I think the best way would be to use named pipes, with the PIPE_NOWAIT flag. |
00:36:53 | Varriount | Araq, dom96: https://twistedmatrix.com/trac/browser/trunk/twisted/internet/_pollingfile.py |
00:37:20 | Varriount | Just look for the function/attribute accesses that start with 'win32pipe' |
00:49:58 | * | Sahnvour quit (Read error: Connection reset by peer) |
00:55:31 | * | yglukhov joined #nim |
00:57:24 | Araq | Varriount: well one problem is that the client app does the buffering differently because it doesn't know it's not piped into a file but into a console like interactive process |
00:57:39 | Araq | no idea if named pipes would change that |
00:59:58 | * | jaco60 quit (Ping timeout: 240 seconds) |
01:00:14 | * | yglukhov quit (Ping timeout: 272 seconds) |
01:06:32 | dom96 | Single thread is fine for now. |
01:06:51 | dom96 | Varriount: Making async await multi-threaded is a completely different problem. |
01:08:26 | Araq | I think it's just a buffering problem |
01:09:38 | dom96 | Which part? |
01:10:02 | Araq | osproc needs to create streams that simulate a tty |
01:17:29 | * | nande quit (Remote host closed the connection) |
01:26:26 | * | chemist69_ joined #nim |
01:29:23 | * | pregressive quit (Remote host closed the connection) |
01:29:38 | * | chemist69 quit (Ping timeout: 244 seconds) |
01:36:22 | * | pregressive joined #nim |
01:43:42 | * | vendethiel joined #nim |
02:05:26 | ryu0 | Araq: in what respects? bidirectional communication between two processes? |
02:06:46 | * | vendethiel quit (Ping timeout: 246 seconds) |
02:10:14 | * | zaquest joined #nim |
02:12:22 | Varriount | dom96: Either you can use a blocking read on a separate thread, with a messaging queue to simulate non-blocking input, or use a pipe between processes. |
02:13:00 | Varriount | Araq: If the client app is doing it's own buffering before actually writing to output, then there's not much that can be done without modifying the client. |
03:33:48 | * | darkf joined #nim |
03:35:23 | Varriount | Araq: Do you want any email notifications when a builder fails/goes down? |
03:49:22 | * | xet7_ quit (Read error: Connection reset by peer) |
03:50:12 | * | xet7_ joined #nim |
04:14:10 | * | BitPuffin|osx quit (Ping timeout: 240 seconds) |
04:31:48 | * | yglukhov joined #nim |
04:36:21 | * | yglukhov quit (Ping timeout: 265 seconds) |
04:53:08 | * | pregressive quit (Remote host closed the connection) |
05:13:10 | * | enamex quit (Ping timeout: 246 seconds) |
05:40:40 | * | nickname2 joined #nim |
05:42:19 | * | nickname2 left #nim (#nim) |
05:51:27 | * | johnsoft joined #nim |
06:05:13 | * | _stowa joined #nim |
07:15:28 | * | enamex joined #nim |
07:25:02 | * | FedeOmoto quit (Ping timeout: 260 seconds) |
07:43:46 | * | irrequietus joined #nim |
08:02:00 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
08:05:48 | * | yglukhov joined #nim |
08:09:59 | * | yglukhov quit (Ping timeout: 250 seconds) |
08:14:29 | * | strcmp1 quit (Ping timeout: 268 seconds) |
08:25:15 | * | jikai joined #nim |
08:25:44 | jikai | What is the keywork the same with 'private' and 'public' in other language? |
08:25:54 | jikai | Does nim have private and public ??? |
08:28:50 | * | jikai quit (Client Quit) |
08:30:19 | * | AforAvi joined #nim |
08:31:35 | AforAvi | newbie Question: |
08:31:36 | AforAvi | how is nim different from other languages, how can we use this language in our day to day work? |
08:34:24 | * | yglukhov joined #nim |
08:35:35 | * | yglukhov quit (Remote host closed the connection) |
08:38:12 | * | Matthias247 joined #nim |
08:45:01 | Varriount | AforAvi: It's compiled, with a heavy focus on compile time mechanisms |
08:50:54 | * | vendethiel joined #nim |
08:51:08 | * | yglukhov joined #nim |
08:52:39 | AforAvi | Varriount: What are the advantages(apart from compile time) using nim over other languages? |
09:06:05 | * | nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting) |
09:08:16 | Varriount | AforAvi: Sorry for the delay, I'm getting ready for bed. |
09:09:03 | Varriount | AforAvi: Well, there's interoperability with C & C++, type converters, templates, concepts, and a host of other features. |
09:11:37 | * | jaco60 joined #nim |
09:14:51 | AforAvi | Varriount: Thank you and G'nite ;) |
09:36:02 | * | AforAvi1 joined #nim |
09:36:58 | * | AforAvi quit (Ping timeout: 250 seconds) |
09:37:50 | * | wuehlmaus joined #nim |
09:39:03 | * | AforAvi1 quit (Client Quit) |
09:39:18 | * | AforAvi joined #nim |
09:46:41 | * | nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting) |
09:53:40 | * | kulelu88 joined #nim |
09:53:48 | * | nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting) |
10:01:28 | Varriount | AforAvi: Personally, what I like about Nim is the pythonic syntax. Oh, and the type inference |
10:05:01 | * | Sahnvour joined #nim |
10:06:29 | AforAvi | but in python, we have a REPL .. |
10:09:06 | Varriount | AforAvi: Well, said pythonic *syntax*, not runtime. |
10:09:42 | Varriount | Nim is compiled (well, for the C & C++ backends) so a REPL is rather complicated. |
10:10:40 | AforAvi | lol .. :) |
10:10:40 | AforAvi | I'm getting used to the syntax, I think I'm liking it already |
10:11:06 | * | Demon_Fox quit (Quit: Leaving) |
10:12:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
10:24:52 | * | jakesyl joined #nim |
10:38:52 | * | Sembei joined #nim |
10:42:38 | * | elrood joined #nim |
10:44:34 | * | yglukhov quit (Remote host closed the connection) |
10:44:57 | * | yglukhov joined #nim |
10:45:28 | * | jakesyl quit (Ping timeout: 246 seconds) |
10:46:27 | kulelu88 | did the syntax change a lot with nim? it is looking more pythonic now |
10:51:38 | Araq | kulelu88: we got rid of the nasty type prefixes which really helped to make it more sexy |
10:53:05 | Araq | the other syntactic improvements didn't affect how "Pythonic" Nim looks afaict |
10:54:02 | Araq | Varriount: email notifications are a good thing, yes |
10:56:06 | * | AforAvi quit (Read error: Connection timed out) |
10:56:47 | * | yglukhov quit (Remote host closed the connection) |
10:57:42 | * | AforAvi joined #nim |
10:59:00 | * | jakesyl joined #nim |
11:00:34 | Araq | Varriount: patching osproc to use createNamedPipe is not hard but the result doesn't work at all |
11:00:53 | * | yglukhov joined #nim |
11:00:56 | * | yglukhov quit (Remote host closed the connection) |
11:01:13 | Araq | also createPipe returns 2 handles, createNamedPipe only 1 ... so I'm not sure what to do |
11:02:12 | Araq | PIPE_NOWAIT only exists for compat with some old microsoft server so I don't think it's wise to use |
11:02:15 | * | vendethiel- joined #nim |
11:02:37 | * | vendethiel quit (Ping timeout: 244 seconds) |
11:02:41 | kulelu88 | I like the new landing page also. the syntax on it is more beautiful and readable |
11:07:29 | * | xet7_ quit (Read error: Connection reset by peer) |
11:07:42 | * | xet7_ joined #nim |
11:08:45 | * | AforAvi quit (Quit: Leaving.) |
11:08:46 | * | xet7_ quit (Read error: Connection reset by peer) |
11:09:09 | Araq | kulelu88: thank you :-) |
11:09:11 | * | xet7_ joined #nim |
11:12:22 | * | enamex_ joined #nim |
11:15:15 | * | ozra quit (Ping timeout: 246 seconds) |
11:15:34 | * | enamex quit (Ping timeout: 246 seconds) |
11:18:24 | * | kulelu88 quit (Ping timeout: 264 seconds) |
11:19:53 | * | Enamex joined #nim |
11:22:45 | * | enamex_ quit (Ping timeout: 255 seconds) |
11:24:19 | * | Enamex quit (Ping timeout: 246 seconds) |
11:25:27 | * | Enamex joined #nim |
11:27:42 | * | enamex_ joined #nim |
11:29:46 | * | Enamex quit (Ping timeout: 246 seconds) |
11:30:41 | * | Enamex joined #nim |
11:31:23 | * | kulelu88 joined #nim |
11:31:23 | * | kulelu88 quit (Changing host) |
11:31:23 | * | kulelu88 joined #nim |
11:33:28 | * | enamex_ quit (Ping timeout: 265 seconds) |
11:40:23 | * | kulelu88 quit (Ping timeout: 264 seconds) |
11:42:45 | NimBot | nim-lang/Nim devel 8b230ec JamesP [+0 ±2 -0]: minor fix - remove comments from discard section... 1 more lines |
11:42:45 | NimBot | nim-lang/Nim devel 9c5f89a Dominik Picheta [+0 ±2 -0]: Merge pull request #3381 from jlp765/memfilesTest... 2 more lines |
11:48:47 | * | Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png) |
11:51:02 | * | vendethiel- quit (Ping timeout: 260 seconds) |
11:55:49 | * | kulelu88 joined #nim |
11:55:49 | * | kulelu88 quit (Changing host) |
11:55:49 | * | kulelu88 joined #nim |
12:02:33 | * | yglukhov joined #nim |
12:07:23 | * | yglukhov quit (Ping timeout: 264 seconds) |
12:08:48 | Varriount | Araq: I'll read up on pipes then. |
12:12:42 | Araq | Varriount: never mind, I figured it out |
12:12:50 | Araq | gotta go, bbl |
12:13:40 | * | jakesyl quit (Ping timeout: 246 seconds) |
12:20:02 | dom96 | once the named pipes are set up, integrating it with IOCP should be pretty easy |
12:25:22 | * | jakesyl joined #nim |
12:35:10 | * | AforAvi joined #nim |
12:40:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
12:45:27 | * | enamex_ joined #nim |
12:46:09 | NimBot | nim-lang/Nim devel eed1000 JamesP [+0 ±1 -0]: add examples to top of module for stringStream and fileStream |
12:46:09 | NimBot | nim-lang/Nim devel ff9a3d3 JamesP [+0 ±1 -0]: add default file mode to newFileStream() |
12:46:09 | NimBot | nim-lang/Nim devel e070779 JamesP [+1 ±0 -0]: add test for newFileStream() opening a missing file |
12:46:09 | NimBot | nim-lang/Nim devel 772c25b JamesP [+0 ±1 -0]: fix discard output: section |
12:46:09 | NimBot | 1 more commits. |
12:46:15 | * | elrood quit (Remote host closed the connection) |
12:46:56 | * | Enamex quit (Ping timeout: 265 seconds) |
12:52:05 | * | vendethiel joined #nim |
12:52:59 | * | jakesyl joined #nim |
12:53:58 | * | Guest14221isaway is now known as Guest14221 |
12:59:38 | * | yglukhov joined #nim |
13:00:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
13:01:16 | * | Trustable joined #nim |
13:04:15 | * | yglukhov quit (Ping timeout: 256 seconds) |
13:08:35 | * | yglukhov joined #nim |
13:10:59 | * | yglukhov quit (Read error: Connection reset by peer) |
13:14:08 | * | jakesyl joined #nim |
13:18:32 | NimBot | nim-lang/Nim devel bb7604c Dominik Picheta [+0 ±2 -0]: Improved "Execution of an external program failed" message. |
13:18:36 | * | yglukhov joined #nim |
13:31:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
13:34:06 | * | X67r joined #nim |
13:43:19 | * | jakesyl joined #nim |
13:43:55 | * | elrood joined #nim |
13:44:25 | dom96 | Araq: Bootstrapping in debug mode is failing for some reason |
13:44:45 | dom96 | a random C compiler call is just exiting with a failed exit code |
13:47:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
14:01:16 | * | jakesyl joined #nim |
14:05:46 | * | enamex_ is now known as enamex |
14:14:26 | * | yglukhov_ joined #nim |
14:14:27 | * | yglukhov quit (Read error: Connection reset by peer) |
14:16:07 | * | AforAvi quit (Quit: Leaving.) |
14:17:06 | * | AforAvi joined #nim |
14:18:19 | * | gokr joined #nim |
14:24:55 | * | jakesyl quit (Ping timeout: 246 seconds) |
14:31:03 | * | UberLambda joined #nim |
14:38:18 | * | jakesyl joined #nim |
14:41:22 | AforAvi | Guys, I need help with this |
14:41:22 | AforAvi | http://pastebin.com/QJVS9d3i |
14:42:17 | dom96 | AforAvi: Seems it cannot find gcc |
14:42:47 | dom96 | Make sure that d:\nim\config\nim.cfg has the correct path to it |
14:42:57 | dom96 | or that it's in your PATH |
14:49:28 | AforAvi | after adding the path, this happened : http://pastebin.com/i2cbpPzP |
15:01:06 | * | UberLambda quit (Quit: GTG) |
15:01:19 | * | jakesyl quit (Ping timeout: 246 seconds) |
15:01:25 | * | UberLambda joined #nim |
15:05:03 | nchambers | probably needs to bec changed to ^1 |
15:07:59 | * | silven quit (Ping timeout: 264 seconds) |
15:08:50 | * | silven joined #nim |
15:11:01 | * | AforAvi quit (Quit: Leaving.) |
15:11:22 | * | AforAvi joined #nim |
15:12:59 | * | jakesyl joined #nim |
15:16:35 | AforAvi | just came across this https://www.symfony.fi/entry/compare-resource-loading-between-http-2-and-http-1-1 |
15:24:02 | * | darkf quit (Quit: Leaving) |
15:24:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
15:32:53 | * | jakesyl joined #nim |
15:33:31 | * | BitPuffin|osx joined #nim |
15:36:45 | * | pregressive joined #nim |
15:38:03 | * | AforAvi quit (Quit: Leaving.) |
15:39:05 | * | Trustable quit (Quit: Leaving) |
15:42:07 | * | UberLambda quit (Ping timeout: 246 seconds) |
15:51:01 | * | jakesyl quit (Ping timeout: 246 seconds) |
15:53:46 | * | UberLambda joined #nim |
16:00:55 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:02:48 | * | jakesyl joined #nim |
16:10:16 | * | jakesyl quit (Ping timeout: 246 seconds) |
16:21:42 | * | Senketsu joined #nim |
16:23:54 | * | jakesyl joined #nim |
16:28:28 | * | jefus is now known as jefus_ |
16:28:31 | * | jefus_ is now known as jefus |
16:30:07 | * | xet7 quit (Quit: Leaving) |
16:37:13 | * | FedeOmoto joined #nim |
16:39:18 | * | jakesyl quit (Ping timeout: 240 seconds) |
16:42:38 | * | specialherbs joined #nim |
16:44:53 | * | jakesyl joined #nim |
16:45:36 | * | specialherbs quit (Client Quit) |
16:49:08 | * | pregressive quit (Remote host closed the connection) |
16:49:26 | * | pregressive joined #nim |
16:54:30 | * | Varriount_ joined #nim |
16:56:28 | * | jakesyl quit (Ping timeout: 246 seconds) |
16:57:31 | * | Varriount quit (Ping timeout: 252 seconds) |
17:05:53 | * | vendethiel quit (Quit: q+) |
17:08:15 | * | jakesyl joined #nim |
17:10:15 | * | dustattack joined #nim |
17:10:47 | * | specialherbs joined #nim |
17:15:05 | * | specialherbs quit (Ping timeout: 240 seconds) |
17:19:38 | * | dustattack quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:19:55 | * | jakesyl quit (Ping timeout: 246 seconds) |
17:20:49 | * | strcmp1 joined #nim |
17:21:47 | * | strcmp1 quit (Client Quit) |
17:33:20 | * | jakesyl joined #nim |
17:39:02 | * | dustattack joined #nim |
17:40:52 | * | nairobi_ joined #nim |
17:41:58 | * | jakesyl quit (Ping timeout: 246 seconds) |
17:48:45 | * | irrequietus quit (Ping timeout: 240 seconds) |
17:52:04 | * | nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting) |
17:53:44 | * | nairobi_ quit (Read error: Connection timed out) |
17:54:31 | * | nairobi_ joined #nim |
17:55:28 | * | jakesyl joined #nim |
17:57:14 | * | irrequietus joined #nim |
18:01:59 | * | UberLambda quit (Ping timeout: 264 seconds) |
18:04:17 | * | Matthias247 joined #nim |
18:09:37 | * | jakesyl quit (Ping timeout: 246 seconds) |
18:10:12 | * | nairobi_ quit (Read error: Connection timed out) |
18:11:10 | * | nairobi_ joined #nim |
18:14:13 | * | nairobi__ joined #nim |
18:15:25 | * | nairobi_ quit (Ping timeout: 246 seconds) |
18:18:29 | * | nairobi_ joined #nim |
18:18:34 | * | nairobi__ quit (Ping timeout: 246 seconds) |
18:22:09 | * | sdw joined #nim |
18:23:11 | * | jakesyl joined #nim |
18:28:19 | * | jakesyl quit (Ping timeout: 240 seconds) |
18:28:39 | * | enamex_ joined #nim |
18:31:19 | * | enamex quit (Ping timeout: 246 seconds) |
18:33:55 | * | Enamex joined #nim |
18:35:39 | * | enamex_ quit (Ping timeout: 255 seconds) |
18:40:31 | * | nairobi_ quit (Remote host closed the connection) |
18:41:45 | * | jakesyl joined #nim |
18:42:12 | * | dustattack quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
18:44:50 | * | Ven joined #nim |
18:45:12 | * | dustattack joined #nim |
18:45:24 | * | nairobi_ joined #nim |
18:49:11 | * | nairobi_ quit (Remote host closed the connection) |
18:50:32 | * | nairobi_ joined #nim |
18:52:26 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:04:18 | * | Ven joined #nim |
19:07:33 | * | nairobi_ quit (Read error: Connection timed out) |
19:08:11 | * | nairobi_ joined #nim |
19:08:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
19:12:02 | * | UberLambda joined #nim |
19:22:14 | * | jakesyl joined #nim |
19:24:04 | * | nairobi_ quit (Read error: Connection timed out) |
19:25:30 | * | dustattack quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:26:36 | * | specialherbs joined #nim |
19:26:42 | * | nairobi_ joined #nim |
19:30:27 | * | nairobi__ joined #nim |
19:31:01 | * | nairobi_ quit (Ping timeout: 246 seconds) |
19:31:19 | * | jakesyl quit (Ping timeout: 240 seconds) |
19:35:08 | * | pregressive quit (Remote host closed the connection) |
19:36:39 | * | specialherbs quit (Ping timeout: 252 seconds) |
19:37:35 | kulelu88 | is anybody using nim to write microservices for webapps here? |
19:41:40 | * | xet7 joined #nim |
19:44:35 | * | jakesyl joined #nim |
19:44:42 | * | Ven quit (Ping timeout: 260 seconds) |
19:47:10 | * | jefus is now known as jefus_ |
19:47:20 | * | jefus_ is now known as jefus |
19:47:44 | * | nairobi__ quit (Read error: Connection timed out) |
19:49:01 | * | nairobi_ joined #nim |
19:52:01 | * | Jesin quit (Quit: Leaving) |
19:52:12 | * | mal`` quit (Ping timeout: 240 seconds) |
19:52:47 | dom96 | kulelu88: I'm using it for webapps, not really microservices, why? |
19:54:01 | kulelu88 | dom96: A strong use-case for Go is that a lot of programmers use it to write micro-services |
19:54:04 | * | Jesin joined #nim |
19:55:34 | * | Ven joined #nim |
19:56:43 | * | jakesyl quit (Ping timeout: 246 seconds) |
19:58:34 | * | mal`` joined #nim |
20:02:41 | * | pregressive joined #nim |
20:08:39 | * | jakesyl joined #nim |
20:13:54 | dom96 | kulelu88: While I don't know of anyone that uses Nim for that specific use case I certainly wouldn't rule Nim out for it. |
20:14:36 | dom96 | Jester would work very well for microservices (Note: I am its author, so am a bit biased) |
20:17:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
20:19:33 | * | UberLambda quit (Quit: GTG) |
20:30:10 | * | sdw left #nim (#nim) |
20:30:18 | * | jakesyl joined #nim |
20:32:16 | * | Ven quit (Read error: No route to host) |
20:33:09 | * | Ven joined #nim |
20:37:22 | * | vendethiel joined #nim |
20:54:28 | * | jakesyl quit (Ping timeout: 246 seconds) |
21:04:46 | * | Ven quit (Ping timeout: 265 seconds) |
21:06:25 | * | jakesyl joined #nim |
21:10:05 | * | Ven joined #nim |
21:12:19 | * | jakesyl quit (Ping timeout: 246 seconds) |
21:25:07 | * | yglukhov_ quit (Remote host closed the connection) |
21:25:37 | * | jakesyl joined #nim |
21:28:16 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:30:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
21:38:47 | * | nairobi_ quit (Remote host closed the connection) |
21:40:01 | * | Guest14221 is now known as Guest14221isaway |
21:44:13 | * | jakesyl joined #nim |
21:51:53 | * | pregressive quit (Remote host closed the connection) |
21:57:18 | * | Jehan_ joined #nim |
21:59:58 | * | jakesyl quit (Ping timeout: 240 seconds) |
22:11:44 | * | jakesyl joined #nim |
22:14:36 | * | strcmp1 joined #nim |
22:15:31 | * | \u quit (Ping timeout: 246 seconds) |
22:16:53 | * | ray- joined #nim |
22:22:22 | * | strcmp1 quit () |
22:24:29 | * | strcmp1 joined #nim |
22:25:31 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:25:44 | * | yglukhov joined #nim |
22:27:52 | * | vendethiel quit (Ping timeout: 250 seconds) |
22:27:55 | * | strcmp1 quit (Client Quit) |
22:28:48 | * | elrood quit (Quit: Leaving) |
22:29:50 | * | Druage joined #nim |
22:29:52 | * | yglukhov quit (Ping timeout: 246 seconds) |
22:30:27 | Druage | hey guys! |
22:32:07 | dom96 | hello Druage |
22:32:10 | Druage | i have a quick question about types in nim. does a type have to always inherit from "object"? |
22:32:30 | dom96 | You mean `RootObj`? no |
22:32:40 | Druage | well both |
22:32:46 | Druage | ive seen both of them used |
22:32:50 | dom96 | type |
22:32:54 | dom96 | Foo = object |
22:32:57 | Druage | ya |
22:33:02 | dom96 | Does not mean that `Foo` inherits from `object` |
22:33:11 | dom96 | It means that Foo is an object. |
22:33:18 | dom96 | type |
22:33:23 | dom96 | Foo = object of RootObj |
22:33:31 | dom96 | Means that `Foo` inherits from `RootObj`. |
22:33:31 | Druage | ohh okay ya that makes sense |
22:33:46 | Druage | so to rephrase my question, does a type have to be an object |
22:34:08 | dom96 | no, it can also be an enum |
22:34:29 | dom96 | 'object' in Nim is equivalent to a struct in C |
22:34:43 | Druage | oh ya that makes sense |
22:35:58 | * | jakesyl quit (Ping timeout: 246 seconds) |
22:36:21 | Druage | are all objects heap allocated? |
22:37:39 | dom96 | oh yeah, 'object' isn't |
22:37:43 | dom96 | 'ref object' is |
22:38:01 | Druage | ok ok now its all coming together |
22:38:09 | Druage | and "ptr object" is untraced |
22:38:13 | dom96 | yes |
22:38:17 | Druage | nice |
22:38:20 | dom96 | 'ref object' is managed by the GC |
22:38:23 | dom96 | 'ptr object' isn't |
22:38:32 | Druage | how do you destroy ptr's? |
22:38:41 | dom96 | dealloc |
22:38:51 | dom96 | assuming you alloc'd them |
22:38:58 | Druage | right |
22:39:33 | Druage | thanks for setting me on the right path |
22:39:49 | Druage | i was a little confused cause i kept seeing ptr and "*" being used |
22:39:58 | Druage | * means public? |
22:46:40 | * | Demon_Fox joined #nim |
22:47:55 | * | jakesyl joined #nim |
22:48:57 | * | SirCmpwn quit (Quit: Why do I even put this quit message in if I never quit) |
22:52:09 | * | Enamex quit (Ping timeout: 255 seconds) |
22:52:25 | Druage | so with nim be explicit about type allocation in the type definition, is there any way to avoid creating multiple versions of the same type, in order to allow for multiple allocation methods? |
22:52:31 | Druage | being* |
22:52:57 | * | SirCmpwn joined #nim |
22:53:11 | Druage | so basically, can a type that is just an "object" be a ref object dynamically |
22:53:21 | dom96 | Don't think so |
22:53:29 | dom96 | yes, * means public |
22:53:44 | dom96 | Not really sure what you mean though, can you give me a use case for this? |
22:56:16 | Druage | like how in c++ you can just call "new" on any type |
22:56:29 | Druage | the usage of the type isn't declared in the class |
22:56:49 | Druage | it seems like nim demands you to be explicit about your use |
22:57:14 | Druage | when the class / type implemented |
22:57:44 | Druage | when the class / type is implemented* |
22:58:03 | dom96 | yeah, that is kind of the way it works in Nim |
22:58:09 | dom96 | There are ways to accomplish what you want though |
22:58:34 | Druage | how so? |
22:58:57 | Druage | the only way i saw was to do something like |
22:59:03 | Druage | type Node = object |
22:59:09 | Druage | type NodeRef = ref Node |
22:59:18 | Druage | type NodePtr = ptr Node |
22:59:28 | Druage | for all types of allocation |
22:59:44 | dom96 | You can also do: var x: ref Node |
23:00:03 | * | pregressive joined #nim |
23:01:06 | Druage | does this work it ptr? |
23:01:08 | dom96 | I remember seeing a discussion about this somewhere on the forum, but I can't find it |
23:01:15 | Druage | with* |
23:01:17 | dom96 | yes |
23:01:26 | Druage | hmm |
23:03:01 | Druage | overall nim is really damn cool |
23:03:08 | Druage | feels like a fun c |
23:04:10 | Druage | the only thing i miss coming from c++ and python in constructors |
23:04:29 | Druage | or at least an initializer like in python |
23:04:34 | Druage | is* |
23:04:45 | Druage | sorry about the typos i keep typing too quickly |
23:05:21 | dom96 | In Nim you just create a procedure and name it newType or initType, the former for ref types the latter for non-ref types |
23:05:43 | dom96 | You can also init types via: var foo = Foo(field1: 42, field2: "test") |
23:07:08 | Druage | using initType or newType isn't terribly bad, it's feels kinda homebrew to me |
23:07:39 | Druage | i just noticed the variation in init functions in the standard lib and it struct me as interesting |
23:07:51 | Druage | but ya overrall it's been a joy |
23:09:07 | * | Sahnvour quit (Read error: Connection reset by peer) |
23:10:43 | Druage | one more question if you have the time, but how do you allocate a untracted object |
23:10:54 | Druage | i know ref's can use new() |
23:11:10 | * | gokr quit (Ping timeout: 246 seconds) |
23:12:51 | dom96 | Druage: http://nim-lang.org/docs/system.html#alloc,Natural |
23:13:00 | Druage | nice |
23:13:01 | Druage | ty! |
23:13:14 | dom96 | np |
23:16:25 | * | irrequietus quit () |
23:16:31 | dom96 | Druage: Feel free to ask any other questions you may have :) |
23:16:42 | Druage | ok ok |
23:16:44 | Druage | i do have some more lol |
23:16:53 | Druage | only if you have time |
23:17:12 | dom96 | I never have time, but ask me anyway heh |
23:17:23 | Druage | lol |
23:17:59 | Druage | what would be an advantage of using unsafeNew() be new() for a traced object |
23:18:10 | Druage | be to* |
23:20:46 | * | jakesyl quit (Ping timeout: 246 seconds) |
23:21:31 | dom96 | Druage: efficiency |
23:21:35 | dom96 | if you know what you're doing |
23:21:37 | dom96 | read the docs :P |
23:21:45 | Druage | i did but that's all it says |
23:21:54 | Druage | what is efficient about it |
23:22:27 | dom96 | If you know more about your type than the compiler |
23:22:42 | dom96 | For example that your type is actually smaller |
23:22:53 | dom96 | You likely shouldn't be using it |
23:23:02 | dom96 | I gotta go |
23:23:03 | Druage | i see |
23:23:08 | Druage | thanks for the help! |
23:23:21 | dom96 | If you don't get an answer here, make sure to try the forum :) |
23:23:31 | Druage | yes sir! |
23:25:45 | * | Druage quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
23:26:05 | * | Druage joined #nim |
23:29:15 | * | Druage quit (Client Quit) |
23:29:46 | * | Druage joined #nim |
23:29:50 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:34:11 | * | jakesyl joined #nim |
23:35:56 | * | Druage quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
23:36:17 | * | Druage joined #nim |
23:41:22 | * | Druage quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
23:41:39 | * | jakesyl quit (Ping timeout: 240 seconds) |
23:53:49 | * | jakesyl joined #nim |
23:58:55 | * | jakesyl quit (Ping timeout: 246 seconds) |