00:15:15 | * | jaco60 quit (Ping timeout: 260 seconds) |
00:16:21 | * | Trustable quit (Remote host closed the connection) |
00:37:29 | * | kas_ quit (Ping timeout: 255 seconds) |
00:51:31 | * | yglukhov quit (Remote host closed the connection) |
01:23:59 | * | awsteele joined #nim |
01:24:07 | * | awsteele quit (Client Quit) |
02:10:15 | * | Jachy quit (Ping timeout: 240 seconds) |
02:11:25 | * | Jachy joined #nim |
02:58:27 | * | BitPuffin|osx joined #nim |
03:20:13 | * | brson quit (Quit: leaving) |
04:32:52 | * | nande quit (Remote host closed the connection) |
05:21:22 | * | darkf joined #nim |
06:14:07 | * | minmax joined #nim |
06:33:56 | * | minmax left #nim (#nim) |
06:39:21 | * | brson joined #nim |
07:18:28 | * | brson quit (Quit: leaving) |
07:23:22 | * | brson joined #nim |
07:34:03 | * | yglukhov joined #nim |
07:42:06 | * | desophos quit (Read error: Connection reset by peer) |
07:59:06 | ldlework | I've tried to replicate the sigsev in a minimal example for a few hours |
07:59:09 | ldlework | can't do it |
08:05:39 | * | nsf joined #nim |
08:06:26 | Araq_ | yeah, the VM is register-based. |
08:07:04 | Araq_ | when you change the code slightly, the register allocator uses different registers and this makes things non-reproducible |
08:07:26 | Araq_ | a definite downside of its design. |
08:08:15 | Araq_ | but I told you I don't need minimal, only self-sufficient |
08:39:16 | * | yglukhov quit (Read error: Connection reset by peer) |
08:39:48 | * | yglukhov joined #nim |
09:28:29 | * | kas_ joined #nim |
09:29:08 | * | avsej quit (Quit: Quit) |
09:30:29 | * | avsej joined #nim |
09:30:36 | * | avsej quit (Changing host) |
09:30:36 | * | avsej joined #nim |
09:44:51 | * | Demon_Fox quit (Quit: Leaving) |
10:09:29 | * | brson quit (Ping timeout: 246 seconds) |
10:42:10 | * | exebook quit (Quit: Leaving) |
11:12:39 | * | Matthias247 joined #nim |
11:24:35 | * | jaco60 joined #nim |
11:26:34 | * | mountaingoat joined #nim |
11:26:41 | mountaingoat | how is nim support for arm? |
11:42:28 | dom96 | mountaingoat: It's great |
11:42:48 | dom96 | Nim compiles to C, so as long as your C compiler supports arm it will work well. |
11:44:10 | mountaingoat | cool |
11:44:23 | mountaingoat | i presume the C compiler picks up the hardware floating point support than too |
11:44:26 | mountaingoat | then* |
11:50:59 | dom96 | possibly :) |
12:03:11 | * | kas_ quit (Ping timeout: 264 seconds) |
12:06:09 | Araq_ | I'm merging no-echo-gotcha into devel |
12:07:30 | * | kas_ joined #nim |
12:07:39 | def- | Araq_: cool, didn't find any regressions with it |
12:07:52 | Araq_ | yay :-) |
12:08:12 | Araq_ | I did find a few tests that had to be adapted |
12:08:20 | Araq_ | but the code always was questionable |
12:08:43 | Araq_ | and it's good that 'a+1' works and 'a + 1' and 'a +1' not anymore. IMO. |
12:09:04 | Araq_ | I mean both 'a+1' and 'a + 1' continue to work. |
12:10:13 | Araq_ | dom96: we can actually make the "async GC" way more efficient than I thought. |
12:10:41 | Araq_ | since stack roots are not possible we can go after a copying collector. |
12:25:51 | dom96 | cool |
12:31:27 | * | vendethiel- joined #nim |
12:31:58 | * | vendethiel quit (Ping timeout: 260 seconds) |
12:39:51 | Araq_ | dom96: one problem is that capturing a 'ref' in a closure keeps the pointer semantics |
12:40:44 | Araq_ | but if we transfer the whole heap to a worker thread that means we get copy semantics for it |
12:41:15 | Araq_ | this will be a problem for users. |
12:42:05 | Araq_ | I think we can statically detect it though. |
12:42:47 | dom96 | That would be a PITA |
12:43:17 | dom96 | Pretty sure that is a really common occurrence |
12:43:48 | Araq_ | I dunno. does 'asyncCheck foo(data)' work? |
12:46:13 | dom96 | you mean the fact that you're passing `data`? yes |
12:47:47 | Araq_ | well we can allow it |
12:48:04 | Araq_ | but if that feature is used the task won't be migrated to the thread pool |
13:01:04 | * | Trustable joined #nim |
13:01:13 | dom96 | practically every async proc takes parameters though |
13:04:47 | Araq_ | ok then we need to allow it and change the semantics under the hood |
13:05:02 | Araq_ | it's an ownership transfer, so quite a few things continue to work |
13:11:07 | dom96 | not sure how that can possibly work |
13:33:04 | * | wuehlmaus joined #nim |
13:33:35 | wuehlmaus | hi, all, i have a very strange problem: when i do |
13:33:47 | wuehlmaus | ``import posix'' and try to compile that i get |
13:33:48 | wuehlmaus | lib/nim/posix/posix.nim(32, 19) Error: undeclared identifier: 'Time' |
13:34:00 | wuehlmaus | it's that early :( |
13:34:21 | wuehlmaus | nim 0.12 on archlinux |
13:34:36 | wuehlmaus | git hash: 30cc353831a9727cfc6b4e7c379d9920b7041059 |
13:40:44 | dom96 | hello wuehlmaus |
13:41:37 | wuehlmaus | hi, dom96 |
13:42:07 | dom96 | that's really strange |
13:42:26 | dom96 | How did you install Nim? |
13:42:55 | wuehlmaus | via pacman |
13:43:08 | dom96 | ahh, could be an AUR issue. |
13:43:34 | dom96 | I would suggest you try bootstrapping the compiler manually |
13:43:47 | dom96 | and instead of installing it, just add the path of nim/bin to your PATH |
13:43:50 | wuehlmaus | hmm, nim is not in AUR |
13:44:00 | wuehlmaus | it's in community |
13:44:05 | dom96 | oh |
13:44:11 | dom96 | could still be a packaging issue though |
13:44:16 | wuehlmaus | yeah |
13:44:22 | wuehlmaus | i try to get the git version |
13:45:42 | dom96 | please let me know if that works for you |
13:46:31 | wuehlmaus | of course i will do :) |
13:46:58 | wuehlmaus | the wonderful thing about nim is that it can be compiled in a few minutes on my netbook |
13:47:01 | dom96 | make sure to remove the pacman package first |
13:47:06 | wuehlmaus | try that with swift or rust :) |
13:47:09 | dom96 | yeah :) |
13:47:31 | dom96 | if this fixes the problem then I will create a packaging issue on github |
13:47:42 | dom96 | I recall other users having similar issues with installation |
13:59:24 | wuehlmaus | hmm, sadly no difference :( |
13:59:57 | wuehlmaus | i try to restart my computer "have you tried to turn it on and off again" :) |
14:03:32 | wuehlmaus | didn't help :( |
14:06:18 | dom96 | right, can you tell me how you bootstrapped and installed Nim? |
14:06:37 | dom96 | wuehlmaus: also, did you bootstrap the devel branch or the master branch? |
14:06:46 | wuehlmaus | ./bootstrap.sh |
14:07:08 | wuehlmaus | and then ./install.sh /usr/local/bin |
14:08:05 | wuehlmaus | git clone https://github.com/nim-lang/Nim.git |
14:08:12 | wuehlmaus | that's what i used |
14:30:39 | dom96 | wuehlmaus: hehe |
14:30:52 | dom96 | wuehlmaus: Like I said, "instead of installing it, just add the path of nim/bin to your PATH" |
14:30:57 | dom96 | Don't use install.sh |
14:31:12 | dom96 | That is the root cause of this AFAIK |
14:32:02 | wuehlmaus | seems not to be a solution for me |
14:32:18 | dom96 | what do you mean? |
14:32:32 | wuehlmaus | i still get that error |
14:33:07 | dom96 | did you add Nim to your PATH instead of using install.sh? |
14:33:42 | wuehlmaus | ~/Nim/bin/nim c ~/p/nim/problem.nim |
14:33:51 | wuehlmaus | it still gives the error :( |
14:34:21 | dom96 | gist the output of `cat ~/p/nim/problem.nim` please |
14:35:02 | dom96 | also please try `PATH=$PATH:/home/yourusername/Nim/bin nim c ~/p/nim/problem.nim` |
14:35:04 | dom96 | it may just work |
14:36:17 | wuehlmaus | problem.nim has just ``import posix'' |
14:40:05 | dom96 | can you gist the full output of `PATH=$PATH:/home/yourusername/Nim/bin nim c ~/p/nim/problem.nim` and `nim -v`? |
14:41:21 | wuehlmaus | afk |
15:34:27 | wuehlmaus | back |
15:35:37 | def- | dom96: if you want to make sure that nim version is used you should prepend to the path, not append |
15:35:59 | dom96 | true |
15:36:10 | def- | (but no idea if that's the issue) |
15:36:30 | dom96 | wuehlmaus: run `PATH=/home/yourusername/Nim/bin:$PATH nim c ~/p/nim/problem.nim` |
15:36:34 | dom96 | and gist the output please |
15:36:36 | dom96 | and also `nim -v`. |
15:44:39 | * | yglukhov quit (Remote host closed the connection) |
15:46:32 | wuehlmaus | Nim Compiler Version 0.12.1 (2016-01-16) [Linux: amd64] |
15:46:47 | wuehlmaus | the rest is absolutely identical to what i wrote before |
15:49:37 | wuehlmaus | and it doesn't change one bit if i use another shell |
15:51:01 | dom96 | Could you please just paste the full output of the compilation process? There are other messages besides the error which I would like to see. |
15:53:08 | wuehlmaus | https://gist.github.com/pfefferminz132/d928660110575c10ff4e |
16:00:41 | wuehlmaus | it must be something in the problem.nim folder |
16:00:50 | wuehlmaus | it compiles in another directory |
16:05:56 | dom96 | Do you have any other files in that directory? |
16:06:17 | wuehlmaus | 82 :) |
16:06:33 | dom96 | lol |
16:06:45 | dom96 | I guess you have a `times.nim` file in there? :P |
16:06:51 | dom96 | I just reproduced your issue |
16:07:04 | wuehlmaus | yes i have :) |
16:07:18 | dom96 | I'm going to report this as an issue heh |
16:07:23 | wuehlmaus | :) |
16:07:30 | wuehlmaus | i am happy that we found it! |
16:07:54 | wuehlmaus | the reason i had that file was that i wanted to generate an html file from times.nim to have docu |
16:09:10 | dom96 | heh, me too. |
16:09:25 | dom96 | At least now you have the latest version of Nim to play around with :) |
16:09:26 | federico3 | uh? Is 0.12.1 out? |
16:09:30 | dom96 | https://github.com/nim-lang/Nim/issues/3725 |
16:09:43 | dom96 | federico3: nope? |
16:17:02 | wuehlmaus | dom96: exactly, i love it. and kudos to Araq_ for giving us such a wonderful language that even on my relatively weak system can compile without problems |
16:17:21 | dom96 | :) |
16:17:23 | wuehlmaus | btw i have compiled crystal and it quit because i had not enough memory |
16:17:32 | wuehlmaus | nim is wonderfully light |
16:17:48 | wuehlmaus | that's a huge plus |
16:17:50 | dom96 | that's nice to hear |
16:18:08 | wuehlmaus | i love it! :) |
16:19:12 | * | Jachy quit (Quit: Leaving.) |
16:23:28 | federico3 | :( |
16:24:27 | Xe | \o/ got my main nim project behind HTTP/2, Nim 0.12 and Let's Encrypt! |
16:25:17 | dom96 | Xe: cool, what's your project? |
16:25:45 | Xe | dom96: a simple little JSON api for My Little Pony: Friendship is Magic episode air dates, etc |
16:26:40 | dom96 | ooh, does it support other TV shows? |
16:26:46 | * | thotypous quit (Ping timeout: 240 seconds) |
16:27:13 | Xe | no |
16:27:23 | Xe | well |
16:27:25 | Xe | it can |
16:27:31 | Xe | but it has no disambiguation |
16:27:39 | Xe | https://github.com/Xe/PonyAPI/blob/master/fim.list |
16:27:43 | Xe | this is the list of its episodes |
16:28:49 | Xe | but yeah |
16:28:53 | Xe | if you can get the info for it all |
16:28:58 | Xe | can adapt it for other shows |
16:29:04 | * | strcmp1 quit (Quit: cycling backwards like charlie) |
16:29:11 | Xe | it's not designed for it atm though |
16:29:17 | * | strcmp1 joined #nim |
16:29:17 | Xe | never was a need, etc |
16:30:05 | * | strcmp1 quit (Client Quit) |
16:30:11 | dom96 | hrm, still awesome. Nice job! |
16:30:18 | * | strcmp1 joined #nim |
16:30:21 | dom96 | was Let's Encrypt tough to set up? |
16:31:31 | * | strcmp1 quit (Client Quit) |
16:31:40 | Xe | nope |
16:31:42 | * | strcmp1 joined #nim |
16:31:47 | Xe | https://caddyserver.com |
16:31:50 | Xe | this automates it for you |
16:31:54 | * | dom96 should set it up for the forum |
16:32:12 | Xe | yeah |
16:33:06 | def- | dom96: Let's Encrypt doesn't work on WinXP though |
16:33:22 | Xe | def-: oh god the horror of not supporting a dead os |
16:34:01 | dom96 | well, if anything I will make https optional |
16:34:15 | dom96 | at least for the forseeable future |
16:34:22 | * | yglukhov joined #nim |
16:34:35 | Xe | caddy kinda enforces https though so might not be your best option :P |
16:34:54 | def- | dom96: Google automatically checks if https is available and all google search links to the forum will then be https, and this can't be disabled anymore |
16:35:29 | dom96 | def-: :\ |
16:35:32 | def- | Xe: I understand that WinXP isn't supported anymore, but in some cases people still use it and you don't want to exclude them, so it might be good to know |
16:40:15 | dom96 | bbl |
16:43:58 | * | yglukhov quit (Remote host closed the connection) |
17:16:41 | * | thotypous joined #nim |
17:36:39 | * | vikaton joined #nim |
17:44:26 | * | yglukhov joined #nim |
17:49:46 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:02:13 | * | Jesin quit (Quit: Leaving) |
18:07:25 | * | tankfeeder joined #nim |
18:09:16 | * | tankfeeder left #nim (#nim) |
18:13:47 | * | desophos joined #nim |
18:28:11 | * | brson joined #nim |
18:36:30 | * | yglukhov joined #nim |
18:40:50 | * | yglukhov quit (Ping timeout: 246 seconds) |
18:41:18 | * | Salewski joined #nim |
18:42:24 | * | cyraxjoe_ joined #nim |
18:44:45 | * | cyraxjoe quit (Ping timeout: 260 seconds) |
18:47:54 | Salewski | There is sequtils: proc filter*[T](seq1: seq[T], pred: proc(item: T): bool {.closure.}): seq[T]. Seems not to work when seq1 is a plain array, as expected. Is there a proc for arrays available? And why is seq1 not an open array, should work for seqs and array if I understand correctly? And yes, I think I can make my own filter for array. |
18:49:38 | Araq_ | but what would it return? |
18:49:43 | Araq_ | a seq? |
18:50:12 | Salewski | Yes, a seq I assume. |
18:50:22 | Araq_ | hrm, try to patch it please |
18:50:34 | Araq_ | s/seq/openarray |
18:50:42 | Araq_ | should work |
18:50:44 | Salewski | Will try, thanks. |
18:51:02 | * | Salewski quit () |
18:58:10 | * | Jesin joined #nim |
18:58:41 | * | Matthias247 quit (Read error: Connection reset by peer) |
19:01:48 | * | vendethiel- quit (Ping timeout: 272 seconds) |
19:20:04 | * | vendethiel joined #nim |
19:25:12 | * | onionhammer quit (Quit: WeeChat 1.0.1) |
19:37:33 | * | pregressive joined #nim |
19:38:27 | * | onionhammer joined #nim |
19:42:58 | * | vendethiel quit (Ping timeout: 272 seconds) |
19:45:25 | * | vendethiel joined #nim |
19:48:21 | * | kniteli joined #nim |
20:14:11 | * | awsteele joined #nim |
20:15:36 | * | awsteele quit (Client Quit) |
20:23:06 | * | brson quit (Quit: leaving) |
20:27:34 | * | yglukhov joined #nim |
20:29:19 | * | yglukhov quit (Remote host closed the connection) |
20:41:17 | * | darkf quit (Quit: Leaving) |
20:44:50 | * | irrequietus joined #nim |
20:48:37 | * | irrequietus quit (Client Quit) |
20:52:30 | * | yglukhov joined #nim |
20:56:38 | * | yglukhov quit (Ping timeout: 246 seconds) |
21:00:51 | * | Jesin quit (Remote host closed the connection) |
21:06:32 | wuehlmaus | hmmm, i use tnim to play around with nim. |
21:06:56 | wuehlmaus | import nre and it crashes on me wit the git nim version |
21:07:14 | Araq_ | pretty sure the tests are green for nre |
21:19:38 | * | yglukhov joined #nim |
21:21:47 | * | pregressive quit (Remote host closed the connection) |
21:24:22 | * | yglukhov quit (Ping timeout: 265 seconds) |
21:35:47 | * | yglukhov joined #nim |
21:42:26 | dom96 | Araq_: Why the change from `#[ #]` to `#[ ]` for multi-line comments? |
21:43:12 | Araq_ | #[ #] is ugly |
21:43:22 | Araq_ | #[ ]# would be the alternative |
21:43:41 | Araq_ | but I am beginning to doubt I want the feature at all. |
21:43:56 | Araq_ | Updating every highlighter out there ... |
21:45:24 | dom96 | Hrm, I suppose #[ ]# will work just fine anyway, the last # will just be optional. |
21:45:36 | dom96 | You don't have to update those highlighters. |
21:45:41 | dom96 | Just the Nim one :P |
21:46:05 | yglukhov | #[ ]# Should not be optional to let commenting [] operators |
21:47:09 | yglukhov | Araq: why not nested? |
21:48:36 | yglukhov | #[ + ]# nest as you wish. don't waste time deciding what start/end tokens to use based on commented content. |
21:49:01 | Araq_ | sorry, but it doesn't work this way. |
21:49:11 | Araq_ | let foo = "#[" |
21:49:27 | Araq_ | # damn, you always need to take the content into account. |
21:50:00 | Araq_ | allowing for nesting mitigates the problem, but doesn't solve it. |
21:51:44 | * | OderWat joined #nim |
21:51:56 | OderWat | hi @all |
21:51:59 | yglukhov | imho, nesting #[ ]# will work in 99% sane cases. |
21:52:40 | OderWat | I fell like using # for something else than "comment to end of line" is not so nice.. I did not think about that before but seeing it just hurts me now :( |
21:52:45 | yglukhov | and its much more handy in those 99%. the other 1%. well, put a space between false-ending-token and thats it |
21:53:16 | Araq_ | well you can always do this: |
21:53:28 | Araq_ | let foo = "#[" # ]# |
21:53:35 | Araq_ | ;-) |
21:53:38 | OderWat | maybe that impression changes when syntax highlighter actually do highlight it correctly .. |
21:54:19 | Araq_ | OderWat: I know that's the case for me. I updated my highlighters already. |
21:54:42 | OderWat | whats the case? thats ok or that it is disturbing? |
21:54:54 | yglukhov | but that is an obviously unambiguos example, no? since string literal starts first, the multiline comment never starts |
21:55:15 | dom96 | wait, is `let foo = "#["` not going to comment out the rest of the file (until the matching ])? |
21:55:28 | dom96 | hrm, well I guess that makes sense. |
21:55:45 | OderWat | no it is a en end of line comment: # ]# ... |
21:55:51 | * | Demon_Fox joined #nim |
21:56:02 | OderWat | no it is an end of line comment: # ]# ... |
21:56:24 | yglukhov | i really cant see a. single. problem. with. nesting. come on! |
21:56:52 | dom96 | yeah, me neither. |
21:57:29 | OderWat | not as long as the end is ]# ... araq showed me that the end is ] ... which makes proc(@[1,2#[,3]],4] a problem already |
21:58:16 | yglukhov | of course. single-char terminator is too ambiguous. but ]# is pretty unique already |
21:58:36 | dom96 | indeed, that would be a good case for making ]# mandatory |
21:59:23 | OderWat | i only wished that its not # ... i think proc(@[1,2~[,3]]~,4]) would be nicer.. not mixin "end of line comment" # with the new ones.. |
22:00:33 | yglukhov | OderWat I guess other symbols are allowed as operators now. so only # has a power of comment =) |
22:01:41 | OderWat | we are not 1.0 and i don't think it would break the world to remove the single ~ from being available. buuuuut... maybe |
22:02:20 | Araq_ | pretty sure pegs already use ~ |
22:02:25 | OderWat | one could also use [:blabla:] |
22:02:47 | OderWat | [:this is multiline\nand here it stops:] |
22:03:04 | dom96 | or #| |# |
22:03:05 | Araq_ | yglukhov: ok, so let's allow nesting. I don't really care. |
22:03:16 | OderWat | no thats containing # again dom |
22:03:52 | Araq_ | OderWat: it's totally fine that that multi line comment starts with a # too. |
22:04:02 | dom96 | What's the problem with the #? |
22:04:08 | yglukhov | OderWat well, i cant see why you dont like #[. i on the countrary like it very much that both comments and multiline comments have something common in tokens |
22:04:10 | OderWat | i feel var foo = "hello" #[test]# and here code again? |
22:04:47 | yglukhov | code again - yes |
22:05:27 | OderWat | after all the time # was end of line comment and is in other languages.. dunno.. don't like that |
22:05:33 | Araq_ | so ... we use #[ ]# and allow nesting. and ##[ ]## for doc comments |
22:05:37 | dom96 | As far as I can see there is only one other language which uses #[ ]# http://rosettacode.org/wiki/Comments |
22:05:41 | dom96 | (That's Lily) |
22:06:03 | dom96 | And it doesn't allow nesting |
22:06:50 | Araq_ | what's done in other languages never bothers me. |
22:07:18 | dom96 | I know. But I find it interesting and think others might as well. |
22:07:34 | Araq_ | everything that is not like in Ruby is wrong anyway... |
22:07:40 | yglukhov | if the only argument - "in other languages" - its not enough. there should be some practical explanation. |
22:08:06 | Araq_ | how about we deprecated #[ for years now as an argument? |
22:08:31 | Araq_ | we *know* it won't break any code out there. |
22:08:54 | OderWat | hmm i tend to agree that #[ and ]# .. is ok... hum.. |
22:09:40 | Araq_ | yeah, I will change it to #[]# and ##[]## |
22:09:40 | OderWat | but not #[ something ] ... |
22:09:54 | Araq_ | and they can nest. |
22:10:24 | Araq_ | #[[ ]]# are not supported. or should they? |
22:10:24 | OderWat | nesting by using #[[ nested #[here]# ]]# .. right? |
22:10:36 | Araq_ | no, nesting as yglukhov wants it. |
22:10:42 | OderWat | or nested by #[ test #[ test ]# ]# .. |
22:10:46 | Araq_ | yes. |
22:11:11 | OderWat | ok with me.. i love that :) |
22:11:28 | OderWat | but I do not need to write highlighters :) |
22:11:29 | Araq_ | dom96: just fyi #| would break Nim's parser.nim file ... |
22:11:40 | yglukhov | omg i cant express my happiness! :D |
22:12:13 | Araq_ | hrm... seems like a bad compromise ... everybody is happy. |
22:12:18 | OderWat | i can give you my paypal address :) |
22:12:20 | Araq_ | I have done something wrong. |
22:12:55 | OderWat | haha :) you did a very good job with the LL already. why not doing more good stuff :) |
22:13:38 | yglukhov | +1, ll is really nice, thanks Araq =) |
22:13:39 | Araq_ | I'm making async multi-core ready ... |
22:14:43 | OderWat | omg in the end people don't want to use c# or go anymore. |
22:14:44 | yglukhov | do i understand correctly that all closures created in one proc will share the same context? |
22:14:54 | dom96 | It's time for everyone to start making lists of things they want to be changed before 1.0 |
22:15:07 | dom96 | Because after 1.0 changing things will not be so easy |
22:15:32 | Araq_ | yglukhov: erm yes. |
22:15:33 | OderWat | i want curly braces ... *giggles* |
22:15:54 | dom96 | OderWat: How about.... LOLCODE syntax? |
22:16:01 | OderWat | that template from the changes "captureEnv" would help? |
22:17:29 | OderWat | I think that I really see some advantage in end (block) decorations and a "strict" mode in the compiler for that. but then i don't care. I never hat a big problem in python because of indentation problems. |
22:17:42 | OderWat | ^had |
22:19:13 | dom96 | There was a time when Araq wanted to make Nim support curly brackets, indentation and 'end'. Giving you the ability to choose between them. |
22:19:35 | dom96 | Personally I think I value consistency more nowadays. |
22:19:47 | Araq_ | yeah but nowadays I think the IDE should do that and we need to get away from text based tools |
22:20:03 | Araq_ | it's 2016 ffs |
22:20:17 | OderWat | and some people write an ide which didn't do this in the past |
22:20:19 | dom96 | Would you prefer to drag boxes around? |
22:20:39 | dom96 | Text is still the most efficient way to write software. |
22:20:45 | Araq_ | there is some nice middleground and you know it. |
22:20:56 | Araq_ | so don't act like you don't, I hate that. |
22:20:59 | OderWat | i think that you need to copy/paste code effortlessly which is why I think end markers could be nice and even help the ide to indent it correctly |
22:21:59 | Araq_ | nimedit still gets it wrong most of the time but the problem is actually easy enough to solve without end markers |
22:22:02 | * | pregressive joined #nim |
22:22:09 | OderWat | i am not sure if "evaluation of indent and matching it on paste" is good enough |
22:22:42 | Araq_ | IMO it definitely is. |
22:23:12 | OderWat | I did not write code which has to do that. I thought it can work but I am not sure. |
22:24:26 | OderWat | after all you need good indent/"outdent" routines anyway with nim and for real with any language as the curly or end marker will not help until you do a full code format on every insert and that sucks for other reasons (partial code in other places) |
22:25:55 | * | yglukhov quit (Remote host closed the connection) |
22:26:55 | dom96 | btw syntax highlighters need to be updated anyway |
22:26:59 | dom96 | look at this crap https://github.com/yglukhov/nimx/blob/f15fcce7f4d4223997ee546643ce90bd5dd688fd/nimx/linkage_details.nim#L68 |
22:27:55 | * | yglukhov joined #nim |
22:31:03 | OderWat | I found that the ACE code editor does feature >120 languages but no Nim :( |
22:31:26 | OderWat | Afaik GitHub uses this for code editing somewhere too. |
22:32:03 | OderWat | see .. https://github.com/blog/905-edit-like-an-ace |
22:32:11 | * | yglukhov quit (Ping timeout: 246 seconds) |
22:32:47 | Araq_ | I use 4 different editors but no ACE :P |
22:35:38 | OderWat | well they said 2011 they do .. but that can have changed of course. ace still says they use it.. and i think that adding Nim is probably not that hard... https://github.com/ajaxorg/ace/tree/master/lib/ace/mode .. I of course have another motivation for wanting that :) |
22:47:36 | * | jakesyl joined #nim |
23:02:48 | * | apotheon joined #nim |
23:03:11 | apotheon | Hey, all. |
23:03:23 | dom96 | hey apotheon |
23:03:28 | OderWat | why was '' (double single quote) not being considered for multi line comments? I just thought thats also an option which does not break existing code imho? |
23:04:22 | OderWat | var test = [1,''2,''3] # end of line comment |
23:04:37 | OderWat | (besides looking like " .. well) |
23:05:26 | apotheon | dom96: Do you know whether Nim supports a way to "guarantee" (at least as well as C, though it's not exactly a guarantee per se sometimes) clearing a particular segment of RAM without using inlined C or a C library to do it? |
23:06:18 | * | pregressive quit (Remote host closed the connection) |
23:06:34 | dom96 | apotheon: no idea sorry |
23:06:45 | apotheon | I guess I'll ask Araq_ . . . |
23:07:16 | apotheon | Araq_: Can you tell me whether Nim supports a way to "guarantee" (at least as well as C, though it's not exactly a guarantee per se sometimes) clearing a particular segment of RAM without using inlined C or a C library to do it? |
23:07:58 | apotheon | Araq_: Also, keeping RAM from being written to swap, while I'm asking about memory management. |
23:09:23 | OderWat | guess you mean for storing passwords/auth data @apotheon? |
23:09:52 | apotheon | Yeah, sensitive data management is the use case. |
23:10:37 | apotheon | Encryption keys and data temporarily unencrypted on the system are more directly the kind of thing than passwords. |
23:11:21 | apotheon | . . . and I guess I don't mean *storing* so much as *in use*, so that (for instance) with a long-running process unencrypted data won't get left in RAM beyond when it's needed, and won't get swapped to disk. |
23:15:10 | OderWat | i think this is kinda unsolveable as there is hibernation in the game. so far the only way to store such data "safe" is using a smartcard like device. I think as soon as the data is (even temporary) in memory you trust the system (kernel) for it |
23:15:59 | OderWat | same goes for DMA like in those apple vulnerabilities through the thunderbold port. |
23:16:58 | * | joelmo joined #nim |
23:19:56 | dom96 | yay https://twitter.com/d0m96/status/688500909052145664 |
23:26:39 | OderWat | cool dom.. this may replace https://github.com/julienXX/terminal-notifier for me :) |
23:27:34 | apotheon | OderWat: Considering most OSes don't seem able to do suspend-to-disk reliably, that doesn't seem like a huge problem, and that shouldn't be a real issue for the kind of software I'm likely to write in the next year anyway. |
23:28:20 | apotheon | . . . and I try to be very careful about DMA stuff. I don't buy $2.5K monitors or play graphics-intensive games, anyway. |
23:28:21 | dom96 | OderWat: It's a pity that I need to overwrite Nim's main() function and use Cocoa's NSApplication event loop thing. |
23:29:31 | apotheon | OderWat: If I can just get the level of confidence I can get from C, that'd be good enough for me, for now. The big problem is that I don't want to have *less* assurance of memory safety than C provides. |
23:29:42 | apotheon | . . . but I'd like to be able to use something other than C, sometimes. |
23:29:46 | OderWat | on linux you can just `swapoff -a` and nothing will get swapped to disk anyway... erasing the data in ram could be easy if you allocated it yourself such that it is never relocated. |
23:30:32 | apotheon | OderWat: Yeah, but I realized what I said about displays and games was irrelevant to my needs for the same reason `swapoff -a` is irrelevant; my software will presumably have users ot her than me. |
23:30:39 | apotheon | err, s/ot her/other/ |
23:33:17 | OderWat | what type of memory safety you are talking about? afaik you can simply allocate some ram in Nim too? |
23:35:21 | OderWat | so you can wipe it.. if that gets swapped to the harddrive .. well still not that easy to find. i am not sure how and if you can lock that ram to not be swapable. but if somebody has the right to "read" all your applications memory thats something you can't stop imho and then there comes the smartcard or an external server which decrypts the data outside of the system. |
23:37:12 | apotheon | Preventing swap is probably the big problem. |
23:37:24 | apotheon | (on a per-process basis, as opposed to per-system or something like that) |
23:37:56 | apotheon | In theory, in C you can prevent allocated memory from being swapped. In practice, it sometimes depends on the OS, I think. |
23:39:11 | apotheon | Some languages' implementations are obviously particularly deficient in this area, using garbage collection that offers no guarantee of clearing RAM at any given point and stuff like that. |
23:39:34 | OderWat | hmm there is https://msdn.microsoft.com/en-us/library/aa366895%28VS.85%29.aspx .. |
23:39:59 | OderWat | which locks a memory region from getting swapped out |
23:40:08 | apotheon | Yeah, C++ can do it, too -- but I'm not particularly interested in using C++ for this stuff. |
23:40:53 | OderWat | Nim can do "anything" C or C++ can.. worst case you emit some code for it to the c compiler. |
23:41:33 | OderWat | that windows thing is not about c++ but about windows itself |
23:41:37 | apotheon | Yeah, but you might notice I asked about whether it can be done in Nim, rather than in some inlined C or something like that. One reason to use something like Nim or Rust is to avoid having to use C. |
23:41:51 | apotheon | Oh, I didn't really look at it very closely. |
23:42:04 | apotheon | C++ can do much the same thing C can in this respect, though, as I recall. |
23:42:25 | apotheon | (on Unixy systems, which is my primary target platform) |
23:42:45 | OderWat | http://linux.die.net/man/2/mlock .. |
23:42:47 | dom96 | I don't think there are any Nim libraries which do this for you, so you would need to write one yourself. |
23:42:52 | apotheon | mlock is the thing, indeed |
23:42:58 | dom96 | For that you would need to wrap C functions |
23:43:09 | OderWat | so just use it :) |
23:43:19 | apotheon | Yeah, I guess so. |
23:43:25 | dom96 | Even if one existed, it would still use external C functions to do its job. |
23:43:39 | apotheon | dom96: As long as I wouldn't have to write the C, it'd make me happy. |
23:44:37 | apotheon | Almost any generally available, widely used language can make use of some C stuff, of course, but (for instance) that doesn't mean you can write a program in Python or Ruby and use C to manage the memory used by the rest of the program. |
23:44:51 | apotheon | I get the impression you can in Nim(?). |
23:44:54 | OderWat | int mlock(const void *addr, size_t len); |
23:44:54 | OderWat | int munlock(const void *addr, size_t len); .. should be "importc" able.. and are pretty easy to use with self allocated memory I guess (so the gc does not relocate it. but that may be safe for not changing it's size anyway.. dunno). |
23:45:40 | apotheon | Well . . . I've been at this coffee shop long enough. I need to buy some ingredients for dinner and go collapse at home. |
23:45:45 | OderWat | Nim compiles to C and has probably the best FF interface of all languages available |
23:46:00 | apotheon | Being ill sucks. Thanks for the info. I'll leave my IRC client connected in my absence. |
23:46:34 | apotheon | later |
23:49:54 | * | jakesyl quit (Ping timeout: 256 seconds) |