00:59:09 | * | krux02 quit (Remote host closed the connection) |
01:06:18 | * | Jesin quit (Quit: Leaving) |
01:07:24 | * | brson quit (Ping timeout: 276 seconds) |
01:18:30 | * | ftsf_ joined #nim |
02:02:50 | * | chemist69 quit (Ping timeout: 265 seconds) |
02:05:33 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
02:06:24 | * | space-wizard joined #nim |
02:13:46 | * | mcc quit (Quit: Connection closed for inactivity) |
02:15:42 | * | chemist69 joined #nim |
02:44:53 | * | mcc joined #nim |
02:46:24 | * | Jesin joined #nim |
03:14:53 | * | GangstaCat quit (Quit: Leaving) |
03:45:16 | * | desophos quit (Read error: Connection reset by peer) |
03:58:41 | * | Sentreen quit (Ping timeout: 250 seconds) |
04:10:11 | * | Sentreen joined #nim |
04:11:46 | * | kulelu88 joined #nim |
04:26:08 | * | rgv151 joined #nim |
04:52:35 | * | ARCADIVS joined #nim |
05:25:24 | * | gokr joined #nim |
05:38:31 | * | GustavoLapasta joined #nim |
05:40:31 | * | Satyajit joined #nim |
06:33:46 | * | mcc quit (Quit: Connection closed for inactivity) |
06:34:57 | * | brechtm quit (Read error: Connection reset by peer) |
06:35:03 | * | brechtm_ joined #nim |
06:36:49 | * | rtr_ quit (Remote host closed the connection) |
06:36:52 | * | filcuc joined #nim |
06:44:14 | FromGitter | <vegansk> What do you think about https://github.com/nim-lang/Nim/issues/4714? I think that it must be solved before version 1.0 is out. It's really unusable for now when writing common code for the client and the server for example. |
07:11:04 | * | brechtm_ quit (Remote host closed the connection) |
07:11:39 | * | brechtm joined #nim |
07:15:20 | * | Trustable joined #nim |
07:18:57 | * | cheatfate quit (Read error: Connection reset by peer) |
07:19:35 | * | cheatfate joined #nim |
07:30:03 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:30:48 | * | nairobi joined #nim |
07:31:49 | * | Andris_zbx joined #nim |
07:33:45 | * | nairobi_ joined #nim |
07:34:14 | * | space-wizard joined #nim |
07:35:05 | * | nairobi quit (Ping timeout: 240 seconds) |
07:48:12 | * | planhths joined #nim |
07:49:32 | * | nairobi_ quit (Read error: Connection timed out) |
07:50:18 | * | nairobi joined #nim |
07:54:32 | * | jeffc_ joined #nim |
07:55:43 | * | jeffc quit (Ping timeout: 244 seconds) |
07:58:18 | * | bjz joined #nim |
08:02:16 | * | nairobi quit (Remote host closed the connection) |
08:02:47 | * | nairobi joined #nim |
08:07:04 | * | yglukhov joined #nim |
08:08:26 | * | ftsf_ quit (Remote host closed the connection) |
08:08:50 | * | fredrik92 joined #nim |
08:12:03 | * | nairobi quit (Remote host closed the connection) |
08:13:02 | * | nairobi joined #nim |
08:13:51 | * | nicanaca0 quit (Quit: Leaving) |
08:17:18 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:21:59 | * | nairobi quit (Remote host closed the connection) |
08:22:37 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:22:43 | * | PMunch joined #nim |
08:22:55 | * | nairobi joined #nim |
08:30:58 | * | kulelu88 quit (Quit: Leaving) |
08:31:39 | * | bjz joined #nim |
08:37:43 | * | samuell joined #nim |
08:51:43 | * | bjz quit (Read error: Connection reset by peer) |
08:52:16 | * | bjz joined #nim |
08:56:27 | * | fredrik92 quit (Quit: Leaving.) |
08:57:03 | * | fredrik92 joined #nim |
08:59:07 | * | bjz quit (Read error: Connection reset by peer) |
08:59:11 | * | bjz_ joined #nim |
08:59:48 | * | Raaaa joined #nim |
09:30:56 | * | nairobi quit (Remote host closed the connection) |
09:41:53 | * | nicanaca0 joined #nim |
09:46:00 | * | coffeepot joined #nim |
09:46:29 | * | ARCADIVS quit (Quit: ARCADIVS) |
09:49:53 | * | literal_ is now known as literal |
09:50:38 | * | nairobi joined #nim |
09:52:24 | * | elrood joined #nim |
10:07:11 | coffeepot | heya :) |
10:07:12 | * | Demon_Fox quit (Quit: Leaving) |
10:07:33 | coffeepot | i noticed in ospaths there's a line checking for RISCOS, is this the old archemedies RISC OS?! :) |
10:09:19 | Araq | yes |
10:12:14 | Araq | that doesn't mean Nim has been ported to riscos ;-) |
10:14:19 | coffeepot | haha! I loved riscos, one of my favourite OS (nostalgia may play a part) |
10:18:36 | * | bjz_ quit (Ping timeout: 276 seconds) |
10:22:55 | * | bjz joined #nim |
10:23:07 | ldlework | same way I feel for os 8/9 |
10:28:39 | * | planhths quit (Ping timeout: 244 seconds) |
10:30:48 | * | brechtm_ joined #nim |
10:34:12 | * | brechtm quit (Ping timeout: 265 seconds) |
10:36:52 | * | rudi_s joined #nim |
10:41:19 | * | PMunch quit (Quit: leaving) |
10:48:35 | * | samuell quit (Quit: Hejdå) |
11:02:07 | * | Snircle joined #nim |
11:03:10 | * | planhths joined #nim |
11:06:26 | * | pie__ joined #nim |
11:06:53 | * | arnetheduck joined #nim |
11:09:55 | * | pie_ quit (Ping timeout: 255 seconds) |
11:10:53 | * | GustavoLapasta quit (Quit: Leaving) |
11:14:04 | * | planhths quit (Quit: Konversation terminated!) |
11:15:45 | * | planhths joined #nim |
11:22:47 | * | brechtm_ quit (Remote host closed the connection) |
11:23:25 | * | brechtm joined #nim |
11:31:41 | * | pie__ quit (Ping timeout: 265 seconds) |
11:41:45 | * | Raaaa quit (Quit: Page closed) |
11:43:17 | * | fredrik92 quit (Quit: Leaving.) |
11:46:02 | * | pie_ joined #nim |
11:50:33 | * | planhths quit (Quit: Konversation terminated!) |
12:03:05 | * | spindle quit (Quit: Leaving) |
12:11:46 | * | nairobi quit (Remote host closed the connection) |
12:20:20 | * | xet7 quit (Quit: Leaving) |
12:22:04 | * | nairobi joined #nim |
12:38:06 | * | nicanaca0 quit (Remote host closed the connection) |
12:40:02 | * | ThisIsZenified quit (Ping timeout: 244 seconds) |
12:41:48 | * | ThisIsZenified joined #nim |
13:14:44 | * | PMunch joined #nim |
13:27:18 | * | Trustable quit (Remote host closed the connection) |
13:32:25 | * | Trustable joined #nim |
13:46:40 | * | Trustable quit (Remote host closed the connection) |
13:51:48 | * | JeffCanJam4a20 joined #nim |
13:52:04 | * | JeffCanJam4a20 quit (Client Quit) |
14:13:08 | * | Trustable joined #nim |
14:14:02 | * | csoriano_ joined #nim |
14:14:08 | * | csoriano_ is now known as csoriano |
14:15:29 | * | kulelu88 joined #nim |
14:17:00 | * | pregressive joined #nim |
14:17:09 | * | pregressive quit (Remote host closed the connection) |
14:17:24 | * | pregressive joined #nim |
14:20:18 | * | stisa joined #nim |
14:36:30 | * | GangstaCat joined #nim |
14:42:57 | * | pafmaf joined #nim |
14:44:21 | hohlerde | should procCall still be used to call base methods? |
14:59:39 | * | PMunch quit (Quit: leaving) |
15:00:51 | * | xet7 joined #nim |
15:13:01 | FromGitter | <kless> Which is the road to next verion/s? Option to non-GC using lifetimes, mobile (compile to NDK)? |
15:20:23 | * | pafmaf quit (Ping timeout: 265 seconds) |
15:21:59 | * | irrequietus joined #nim |
15:25:55 | * | kulelu88 quit (Ping timeout: 260 seconds) |
15:26:15 | Araq | kless: 0.15 is mostly cleaning things up and hopefully better documentation |
15:26:25 | Araq | 0.16 will be stdlib cleanup |
15:26:54 | Araq | non-GC future is region-based memory management |
15:31:56 | * | arnetheduck quit (Ping timeout: 244 seconds) |
15:33:46 | FromGitter | <kless> @Araq respect to non-GC future, will be safe to avoid both dangling pointers and memory leaks? |
15:37:35 | * | irrequietus quit (Ping timeout: 260 seconds) |
15:38:14 | * | nairobi quit (Remote host closed the connection) |
15:38:30 | * | kulelu88 joined #nim |
15:38:51 | * | brson joined #nim |
15:39:39 | * | irrequietus joined #nim |
15:41:11 | * | flyx made some experiments with GC: parsing 100kb of YAML with default GC takes 28ms, with --gc:stack it takes 17ms. results vary because benchmarks are always lying, but it is a rather noticeable gap. |
15:48:02 | dom96 | flyx: I think you should try a larger YAML file, the longer the time the more reliable your results. |
15:49:35 | * | brechtm_ joined #nim |
15:49:45 | coffeepot | is nim heading toward removing the gc entirely? Or just as an option? |
15:49:47 | * | nairobi joined #nim |
15:49:58 | reactormonk | option. |
15:50:06 | * | brechtm quit (Read error: No route to host) |
15:50:07 | coffeepot | cool |
15:50:43 | coffeepot | tho am also looking forward to region memory management as a bonus :) |
15:50:50 | flyx | dom96: yeah, I just thought, nobody would come up with YAML larger than 100kb. but why not? I autogenerate the input anyway |
15:51:37 | * | filcuc quit (Read error: Connection reset by peer) |
15:52:38 | * | krux02 joined #nim |
15:54:11 | * | nairobi quit (Ping timeout: 248 seconds) |
15:59:28 | * | brechtm joined #nim |
16:03:13 | * | csoriano quit (Quit: csoriano) |
16:03:21 | * | brechtm_ quit (Ping timeout: 265 seconds) |
16:03:47 | flyx | for 1mb, I get the following values: default GC: 324ms, --gc:stack: 174ms |
16:04:07 | flyx | for 10mb, the timing library I use overflows :) |
16:04:49 | dom96 | it overflows? how? |
16:05:14 | flyx | it gives -302299μs |
16:05:24 | flyx | probably because it is actually counting nanoseconds |
16:06:19 | * | csoriano_ joined #nim |
16:06:25 | * | csoriano_ is now known as csoriano |
16:07:44 | dom96 | it should have a setting to count in ms instead :P |
16:13:55 | * | Andris_zbx quit (Remote host closed the connection) |
16:21:51 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:22:41 | * | foocraft joined #nim |
16:24:52 | * | xet7_ joined #nim |
16:25:39 | * | kulelu88 quit (Ping timeout: 248 seconds) |
16:31:58 | FromGitter | <kless> Any library to work with binary data? Reading/writing big-endian, little-endian |
16:38:00 | * | kulelu88 joined #nim |
16:38:05 | * | csoriano quit (Quit: csoriano) |
16:38:12 | * | yglukhov quit (Ping timeout: 276 seconds) |
16:41:19 | * | desophos joined #nim |
16:41:19 | * | Ven_ joined #nim |
16:44:08 | * | brechtm quit (Remote host closed the connection) |
16:44:48 | * | brechtm joined #nim |
16:46:57 | * | space-wizard joined #nim |
16:50:45 | * | csoriano_ joined #nim |
16:50:51 | * | csoriano_ is now known as csoriano |
16:54:13 | * | Jesin quit (Quit: Leaving) |
16:57:56 | * | krux02 quit (Quit: Verlassend) |
17:11:26 | * | nairobi joined #nim |
17:20:17 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:27:32 | * | nairobi quit (Read error: Connection timed out) |
17:27:40 | * | yglukhov joined #nim |
17:28:11 | * | PMunch joined #nim |
17:28:21 | * | nairobi joined #nim |
17:32:16 | * | yglukhov quit (Ping timeout: 265 seconds) |
17:33:43 | * | nairobi quit (Remote host closed the connection) |
17:53:26 | * | nairobi joined #nim |
17:55:27 | * | GustavoLapasta joined #nim |
17:55:38 | * | Ven_ joined #nim |
17:57:52 | * | nairobi quit (Ping timeout: 265 seconds) |
17:58:29 | * | nairobi joined #nim |
18:00:49 | * | yglukhov joined #nim |
18:00:50 | * | fredrik92 joined #nim |
18:08:33 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:09:49 | * | Ven_ joined #nim |
18:12:26 | * | rtr_ joined #nim |
18:18:28 | * | nairobi quit (Remote host closed the connection) |
18:35:01 | * | Ven_ quit (Ping timeout: 244 seconds) |
18:38:26 | * | Ven_ joined #nim |
18:39:47 | GustavoLapasta | In python I have mylist.pop(i) to remove and return the item in position i from mylist. What would I use with a Nim sequence? |
18:45:13 | Araq | GustavoLapasta: you can use myseq.pop |
18:46:04 | GustavoLapasta | pop(): "returns the last item of s and decreases s.len by one" |
18:46:18 | GustavoLapasta | i need to remove the i-th element from a sequence |
18:46:57 | GustavoLapasta | maybe there's no one-liner for that, I'll have tp do some slicing? |
18:48:50 | * | pregressive quit (Remote host closed the connection) |
18:49:03 | * | pregressive joined #nim |
18:50:25 | hohlerde | to remove mylist.del or mylist.delete |
18:51:07 | Araq | don't remember. I never delete in the middle, it's slow :P |
18:53:37 | hohlerde | GustavoLapasta: so basically you would have two statements: get the i'th element and then delete it. |
18:54:02 | cheatfate | its better to mark it as deleted, then delete in the middle |
18:55:23 | GustavoLapasta | what about |
18:55:24 | GustavoLapasta | popped = mylist[0] |
18:55:24 | GustavoLapasta | mylist = mylist[1..mylist.high()] |
18:55:40 | GustavoLapasta | (to pop the first item) |
18:56:52 | hohlerde | should work |
18:57:05 | GustavoLapasta | I mean, there's no one liner also to pop the first item, right? |
18:57:23 | hohlerde | I am not aware of one |
18:57:41 | GustavoLapasta | kk |
18:59:15 | * | libman joined #nim |
19:01:49 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:03:50 | * | libman quit (Read error: Connection reset by peer) |
19:15:36 | * | qaz joined #nim |
19:18:17 | * | qaz quit (Client Quit) |
19:21:02 | rudi_s | Hi, new nim user here. Just looking at the nre module (and its doc). How can I match a string and extract the groups? The docs says "abc".match(re"(\w+)").captures[0] but that fails in the current nim with: |
19:21:06 | rudi_s | foo.nim(14, 7) Error: type mismatch: got (Option[nre.RegexMatch]) |
19:21:10 | rudi_s | but expected one of: |
19:21:12 | rudi_s | proc captures(pattern: RegexMatch): Captures |
19:21:48 | rudi_s | It looks like the get is missing and it should be "abc".match(re"(\w+)").get.captures[0] |
19:22:12 | Araq | not captures[0].get ? |
19:22:25 | * | libman joined #nim |
19:22:46 | rudi_s | Maybe in addition to my get. But match/find returns an Option. |
19:23:41 | Araq | ok, then |
19:23:48 | Araq | doesn't look like you need help ;-) |
19:24:07 | rudi_s | Well, consider it a bug report ;-) - the question comes soon. |
19:24:28 | rudi_s | Oh, and is there a shorter/better way to extract data: let x = "a = b".find(re"^(\w+?)\s*=\s*(\w+?)$"); if x.isSome: echo x.get.captures[0]; echo x.get.captures[1] - feels quite long to have to use x.isSome and then get on each arg. |
19:25:48 | * | brechtm quit (Read error: Connection reset by peer) |
19:27:00 | * | brechtm joined #nim |
19:27:04 | Araq | rudi_s: we de-deprecated re.nim |
19:27:21 | rudi_s | Araq: I'm talking about nre. |
19:27:23 | Araq | if x =~ re"pattern": echo matches[0] |
19:27:40 | rudi_s | Is there a reason why Option doesn't evaluate to true/false depending if it has a value or not? Would at least make the if better. |
19:28:05 | rudi_s | Araq: Where can I find doc for that. It's not here: http://nim-lang.org/docs/nre.html |
19:28:20 | rudi_s | Ah, de-deprecated. |
19:28:28 | rudi_s | Then you didn't de-deprecate the docs. |
19:28:44 | rudi_s | "Regular expression support for Nim. Deprecated. Consider using the nre or pegs modules instead." |
19:29:20 | * | pregressive quit (Remote host closed the connection) |
19:29:45 | csoriano | Araq: do you happen to know if the gtk2 bindings were manually created? |
19:32:42 | * | stisa_ joined #nim |
19:37:40 | * | qaz joined #nim |
19:38:02 | * | qaz quit (Client Quit) |
19:39:16 | * | pregressive joined #nim |
19:39:29 | * | pregressive quit (Remote host closed the connection) |
19:39:42 | * | pregressive joined #nim |
19:39:42 | * | nairobi joined #nim |
19:44:33 | Araq | csoriano: pas2nim'ed and then heavily modified |
19:44:44 | csoriano | Araq: aha I see |
19:46:15 | Araq | rudi_s: http://nim-lang.org/0.15.0/re.html |
19:46:34 | Araq | has "Edit" buttons |
19:46:44 | Araq | so people can easily improve the docs |
19:46:55 | Araq | for now I got 0 PRs thanks to this feature. |
19:47:40 | Araq | so you would be first and since it's a githut PR, you can improve your CV with it too. |
19:54:47 | rudi_s | Araq: Ah, it was de-deprecated for 0.15 and the message is gone. That's fine. |
19:55:02 | rudi_s | Is nre deprecated for 0.15? |
19:56:28 | * | nairobi quit (Remote host closed the connection) |
19:57:10 | Araq | a good question. |
19:57:20 | Araq | no, not yet. |
19:59:04 | * | Kaini quit (Remote host closed the connection) |
19:59:45 | * | Kaini joined #nim |
20:02:18 | * | Kaini quit (Remote host closed the connection) |
20:02:19 | rudi_s | Araq: Are there any short examples for the re module? |
20:02:53 | * | Kaini joined #nim |
20:02:53 | * | libman quit (Read error: Connection reset by peer) |
20:03:32 | * | nairobi joined #nim |
20:08:20 | stisa_ | So lets say I want to build nim from github on windows, can I use 0.14.2 to build koch and then that to build devel? |
20:09:22 | Araq | stisa_: yes |
20:09:58 | rudi_s | Araq: Is if x =~ re"pattern": echo matches[0] supposed to work in 0.14.2? let x = "foo"; if x =~ re"[aeiou]": echo matches[0] prints nothing here. |
20:10:05 | stisa_ | Araq: cool, thanks |
20:11:31 | Araq | rudi_s: you need to put it in () |
20:11:38 | Araq | it's still a regex |
20:11:51 | Araq | also watch out that reExtended is the default |
20:12:06 | Araq | so you can use spaces in your regex but they don't match spaces |
20:13:10 | rudi_s | Araq: Thanks. But that still doesn't work. The if is not entered. |
20:13:19 | * | nsf quit (Quit: WeeChat 1.5) |
20:13:48 | Araq | foo doesn't contain only vowels |
20:14:11 | rudi_s | Araq: Are the regex answered by default? |
20:14:37 | Araq | 'anchored'. I think so. |
20:14:51 | rudi_s | Ah yeah, anchored ;-) |
20:15:32 | rudi_s | Is there a way to de-anchor them? It's very unexpected as I don't know any other language which anchored per default. |
20:21:24 | * | libman joined #nim |
20:24:23 | Araq | python: match vs find |
20:24:31 | * | chemist69 quit (Ping timeout: 250 seconds) |
20:24:33 | rudi_s | Yeah. But not with =~ |
20:26:13 | rudi_s | I guess it's re".*XXX.*" |
20:26:41 | Araq | you can also use re.find if you need to find things |
20:30:46 | rudi_s | Yeah. But I find this inconsistency makes it harder to read the code. I also hate that in python. |
20:31:04 | rudi_s | find vs. match is IMO not obvious and makes no sense to an unknowing reader. |
20:31:42 | * | rtr_ quit (Remote host closed the connection) |
20:31:47 | rudi_s | Btw. is there a reason why Option doesn't evaluate to true/false depending if it has a value or not? Would at least make the if better. |
20:34:34 | Araq | we don't like converters to bool. |
20:34:46 | Araq | or converters in general. |
20:35:27 | Araq | find vs match makes perfect sense, either you perform data validation (match) or you search for something (find) |
20:38:02 | Araq | anchors are harder to read, does $ match the end or a newline? |
20:38:46 | rudi_s | I see. Is there a specific reason why converters to bool are bad? |
20:39:26 | rudi_s | Hm. Never thought of it with that meaning. Sounds sane .. but I must have used it a thousand times in python and still can't remember it. |
20:40:05 | rudi_s | Depends on the regex settings. Per default of the string. |
20:42:15 | Araq | pretty sure per default $ is different from \z and stops at the newline :P |
20:42:27 | Araq | regular expressions are such a mess |
20:42:54 | rudi_s | Not in Perl. - But yeah, regex are a mess. |
20:43:05 | rudi_s | Can I get the type of a variable? |
20:43:26 | Araq | yes, but usually you know the type. |
20:43:49 | rudi_s | How? |
20:43:59 | Araq | because Nim is statically typed. |
20:44:08 | Araq | it's known at compile-time. |
20:44:49 | rudi_s | But for example in json where I can use [0] I'm not sure what the result type is. |
20:45:15 | rudi_s | And I could either look it up in the docs or maybe nim has a function to tell me. |
20:45:44 | Araq | no, you move your mouse cursor over the thing and let your editor with nimsuggest plugin tell you |
20:51:12 | rudi_s | So there's no internal way to do that? |
20:51:18 | * | chemist69 joined #nim |
20:51:42 | rudi_s | (I don't like to install plugins for such a task. Especially if I'm experimenting with a new language.) |
20:52:56 | csoriano | Araq: since the gtk2 bindings are not generated from GIR, the memory management for memory anotations (full, none, container) are not managed at all in here right? That means, it is leaking all of them, or am I missunderstanding how the FFI works here? |
20:54:09 | Araq | rudi_s: import typetraits; echo type(x).name |
20:55:29 | rudi_s | Araq: Perfect. Thank you! |
20:56:50 | Araq | csoriano: what's GIR? :-) |
20:57:00 | * | nairobi quit (Remote host closed the connection) |
20:57:11 | csoriano | GObject introspection |
20:57:23 | Araq | how does it help with memory management? |
20:59:41 | * | stisa_ quit (Quit: quitting...) |
20:59:48 | csoriano | well it helps with the whole FFI. Basically it has anotations for return values, like "transfer full" (transfers ownership of a GList and its objects), "transfer none", "transfer container" (juts the GList needs to be freed). It's of course possible to do manually just reading the docs. |
21:00:25 | csoriano | I was just wondering, I cannot see this difference management of memory in the generated nim code on the gtk2 bindings. Or maybe I'm missunderstanding how the GC works in here... |
21:01:09 | Araq | check out https://github.com/jdmansour/nim-smartgi |
21:01:50 | csoriano | Araq: ah perfect, thanks |
21:01:50 | * | libman quit (Read error: Connection reset by peer) |
21:01:51 | Araq | to answer your question: the wrapper uses 'ptr T', not 'ref T', so the GC doesn't mess with anything and you need to manually free stuff |
21:03:43 | csoriano | manually as in the user, or the binding? |
21:04:27 | csoriano | I was looking at aporia and doesn't seem to unref/ref, except in one case |
21:06:56 | Araq | the user. |
21:07:37 | Araq | why would aporia unref? it doesn't create widgets after startup and for shutdown it's meaningless |
21:07:54 | Araq | harmful even, the OS cleans up. |
21:14:34 | rudi_s | Is there a way to get qualified imports? |
21:17:00 | csoriano | maybe aporia doesn't really call anything that trasnfers onwership. So I guess it's fine. In any case, if glib/gtk+ transfer ownership, the client should do GC_ref and GC_unref right? |
21:17:22 | csoriano | s/client/user |
21:19:26 | * | libman joined #nim |
21:22:09 | * | brechtm_ joined #nim |
21:24:46 | * | brechtm quit (Ping timeout: 265 seconds) |
21:28:43 | Araq | I guess so. |
21:29:15 | Araq | rudi_s: from module import nil |
21:30:09 | rudi_s | Araq: Ah, nice. - Is the recommended way in nim to always use unqualified imports? |
21:31:46 | rudi_s | Can nim's templating support something like perl's qw( a b c ) which is converted to a list 'a', 'b', 'c'? |
21:32:54 | Araq | that's a macro away. qw"a b c " |
21:33:01 | Araq | exercise for the reader :P |
21:36:18 | * | GustavoLapasta quit (Quit: Leaving) |
21:39:42 | rudi_s | ;-) Awesome. Good to know what it will work (once I learn nim's macros). |
21:40:53 | * | stisa_ joined #nim |
21:47:06 | csoriano | Araq: the repo you pointed out has smart pointers for GObjects, which is what I was looking for. Pretty nice. https://github.com/jdmansour/nim-smartgi/blob/master/gobjectutils.nim#L95 |
21:47:34 | csoriano | also kudos for the macros, this https://github.com/jdmansour/nim-smartgi/blob/master/gobjectutils.nim#L247 in the rust bindings are much harder :) |
21:48:07 | * | Trustable quit (Remote host closed the connection) |
21:48:39 | Araq | yay, generic converters. let's hope these still work |
21:51:12 | * | Demon_Fox joined #nim |
21:53:14 | * | desophos quit (Ping timeout: 244 seconds) |
21:56:53 | * | yglukhov quit (Remote host closed the connection) |
21:59:11 | GaveUp | probably a stupid question but given a memfile opened r/w how are you suppose to write to .mem at some offset |
22:03:34 | * | elrood quit (Remote host closed the connection) |
22:03:43 | Araq | cast[ptr byte]([cast[int](x.mem) + offset])[] = 4 |
22:03:56 | Araq | usually wrapped in a template. |
22:06:11 | Araq | cast[ptr byte](cast[int](x.mem) + offset)[] = 4 # fixed typo |
22:08:12 | GaveUp | argh... stupid mistake... missing the [] |
22:08:14 | * | pie__ joined #nim |
22:08:16 | GaveUp | thanks |
22:09:55 | * | pie_ quit (Ping timeout: 244 seconds) |
22:11:41 | * | nsf joined #nim |
22:18:11 | * | brechtm_ quit (Read error: No route to host) |
22:18:23 | * | brechtm joined #nim |
22:24:44 | rudi_s | Any idea what "On most operating systems, will fail if a lonk" could mean in the doc for os.createSymlink? |
22:28:57 | Araq | s/lonk/link |
22:29:51 | Araq | s/lonk/link |
22:30:14 | rudi_s | *is already present? |
22:30:33 | * | chemist69 quit (Ping timeout: 265 seconds) |
22:31:08 | * | libman quit (Read error: Connection reset by peer) |
22:34:36 | Araq | aye |
22:34:52 | Araq | did I tell you you can easily create PRs to improve the docs? |
22:35:10 | Araq | and no, don't ask me how that got through our review process. |
22:35:25 | Araq | I suppose we don't read comments. |
22:36:50 | rudi_s | Araq: ;-) - You did and I was planing to do that. Just wasn't sure what that sentence was supposed to mean. |
22:40:14 | Araq | rudi_s: how does $_ work in perl? just some special constructs that use it? |
22:40:33 | Araq | or are there rules for non-builtin functions too? |
22:41:49 | rudi_s | Araq: Just for builtin functions. |
22:45:56 | * | kulelu88 quit (Ping timeout: 265 seconds) |
22:47:36 | rudi_s | Btw. is nim "designed" to be able to omit braces in many places or this just by accident? For example echo("hi") vs. echo "hi". I really like this but I'm not sure if it's just by accident and I shouldn't use it when writing nim-code. |
22:48:44 | Araq | I would say "designed" |
22:49:20 | * | libman joined #nim |
22:49:40 | Araq | though the rules evolved. |
22:49:50 | rudi_s | Nice, I like that. |
22:51:23 | * | ARCADIVS joined #nim |
22:54:40 | * | stisa_ quit (Quit: quitting...) |
22:56:05 | * | MyMind quit (Quit: WeeChat 1.6-dev) |
22:56:51 | * | csoriano quit (Quit: csoriano) |
22:57:31 | * | chemist69 joined #nim |
23:00:51 | rudi_s | How can I add references/links to proc's on the same page in the documentation? |
23:01:26 | rudi_s | e.g. I want to link "cstringArrayToSeq" in the system docs to the matching proc on the same page |
23:01:43 | Araq | it's RST. maybe `#anchor`_ |
23:03:25 | * | desophos joined #nim |
23:04:59 | rudi_s | Thanks will try it. How can I build the docs? |
23:05:22 | Araq | koch website |
23:06:28 | * | Matthias247 joined #nim |
23:07:06 | Araq | damn. I tried to write a macro that models Perl's $_ |
23:07:18 | Araq | but I figured, it's not even necessary |
23:08:04 | Araq | {.this: it.} and some appropriate overloads produce the same result |
23:12:27 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:13:25 | * | kain joined #nim |
23:13:35 | * | kain left #nim (#nim) |
23:16:29 | rudi_s | Nice. - I was really impressed when you showed me the =~ example which locally defines the matches variable just for this scope. Being able to write custom code which can do that feels like a really great feature. |
23:26:34 | Araq | https://gist.github.com/Araq/eb9f9168b6751737b2cc4f9872f8e562 |
23:32:05 | cheatfate | Araq, is {.bitsize.} pragma works? |
23:32:38 | Araq | it translates into ': size' in C struct decls |
23:32:55 | Araq | maybe you can find a way to break that too :P |
23:33:07 | Araq | good night. |
23:33:14 | cheatfate | good night |
23:40:03 | * | gokr quit (Ping timeout: 240 seconds) |
23:40:05 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:46:08 | * | libman left #nim (#nim) |
23:56:25 | * | irrequietus quit () |