<< 16-01-2016 >>

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:06ldleworkI've tried to replicate the sigsev in a minimal example for a few hours
07:59:09ldleworkcan't do it
08:05:39*nsf joined #nim
08:06:26Araq_yeah, the VM is register-based.
08:07:04Araq_when you change the code slightly, the register allocator uses different registers and this makes things non-reproducible
08:07:26Araq_a definite downside of its design.
08:08:15Araq_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:41mountaingoathow is nim support for arm?
11:42:28dom96mountaingoat: It's great
11:42:48dom96Nim compiles to C, so as long as your C compiler supports arm it will work well.
11:44:10mountaingoatcool
11:44:23mountaingoati presume the C compiler picks up the hardware floating point support than too
11:44:26mountaingoatthen*
11:50:59dom96possibly :)
12:03:11*kas_ quit (Ping timeout: 264 seconds)
12:06:09Araq_I'm merging no-echo-gotcha into devel
12:07:30*kas_ joined #nim
12:07:39def-Araq_: cool, didn't find any regressions with it
12:07:52Araq_yay :-)
12:08:12Araq_I did find a few tests that had to be adapted
12:08:20Araq_but the code always was questionable
12:08:43Araq_and it's good that 'a+1' works and 'a + 1' and 'a +1' not anymore. IMO.
12:09:04Araq_I mean both 'a+1' and 'a + 1' continue to work.
12:10:13Araq_dom96: we can actually make the "async GC" way more efficient than I thought.
12:10:41Araq_since stack roots are not possible we can go after a copying collector.
12:25:51dom96cool
12:31:27*vendethiel- joined #nim
12:31:58*vendethiel quit (Ping timeout: 260 seconds)
12:39:51Araq_dom96: one problem is that capturing a 'ref' in a closure keeps the pointer semantics
12:40:44Araq_but if we transfer the whole heap to a worker thread that means we get copy semantics for it
12:41:15Araq_this will be a problem for users.
12:42:05Araq_I think we can statically detect it though.
12:42:47dom96That would be a PITA
12:43:17dom96Pretty sure that is a really common occurrence
12:43:48Araq_I dunno. does 'asyncCheck foo(data)' work?
12:46:13dom96you mean the fact that you're passing `data`? yes
12:47:47Araq_well we can allow it
12:48:04Araq_but if that feature is used the task won't be migrated to the thread pool
13:01:04*Trustable joined #nim
13:01:13dom96practically every async proc takes parameters though
13:04:47Araq_ok then we need to allow it and change the semantics under the hood
13:05:02Araq_it's an ownership transfer, so quite a few things continue to work
13:11:07dom96not sure how that can possibly work
13:33:04*wuehlmaus joined #nim
13:33:35wuehlmaushi, all, i have a very strange problem: when i do
13:33:47wuehlmaus``import posix'' and try to compile that i get
13:33:48wuehlmauslib/nim/posix/posix.nim(32, 19) Error: undeclared identifier: 'Time'
13:34:00wuehlmausit's that early :(
13:34:21wuehlmausnim 0.12 on archlinux
13:34:36wuehlmausgit hash: 30cc353831a9727cfc6b4e7c379d9920b7041059
13:40:44dom96hello wuehlmaus
13:41:37wuehlmaushi, dom96
13:42:07dom96that's really strange
13:42:26dom96How did you install Nim?
13:42:55wuehlmausvia pacman
13:43:08dom96ahh, could be an AUR issue.
13:43:34dom96I would suggest you try bootstrapping the compiler manually
13:43:47dom96and instead of installing it, just add the path of nim/bin to your PATH
13:43:50wuehlmaushmm, nim is not in AUR
13:44:00wuehlmausit's in community
13:44:05dom96oh
13:44:11dom96could still be a packaging issue though
13:44:16wuehlmausyeah
13:44:22wuehlmausi try to get the git version
13:45:42dom96please let me know if that works for you
13:46:31wuehlmausof course i will do :)
13:46:58wuehlmausthe wonderful thing about nim is that it can be compiled in a few minutes on my netbook
13:47:01dom96make sure to remove the pacman package first
13:47:06wuehlmaustry that with swift or rust :)
13:47:09dom96yeah :)
13:47:31dom96if this fixes the problem then I will create a packaging issue on github
13:47:42dom96I recall other users having similar issues with installation
13:59:24wuehlmaushmm, sadly no difference :(
13:59:57wuehlmausi try to restart my computer "have you tried to turn it on and off again" :)
14:03:32wuehlmausdidn't help :(
14:06:18dom96right, can you tell me how you bootstrapped and installed Nim?
14:06:37dom96wuehlmaus: also, did you bootstrap the devel branch or the master branch?
14:06:46wuehlmaus./bootstrap.sh
14:07:08wuehlmausand then ./install.sh /usr/local/bin
14:08:05wuehlmausgit clone https://github.com/nim-lang/Nim.git
14:08:12wuehlmausthat's what i used
14:30:39dom96wuehlmaus: hehe
14:30:52dom96wuehlmaus: Like I said, "instead of installing it, just add the path of nim/bin to your PATH"
14:30:57dom96Don't use install.sh
14:31:12dom96That is the root cause of this AFAIK
14:32:02wuehlmausseems not to be a solution for me
14:32:18dom96what do you mean?
14:32:32wuehlmausi still get that error
14:33:07dom96did you add Nim to your PATH instead of using install.sh?
14:33:42wuehlmaus~/Nim/bin/nim c ~/p/nim/problem.nim
14:33:51wuehlmausit still gives the error :(
14:34:21dom96gist the output of `cat ~/p/nim/problem.nim` please
14:35:02dom96also please try `PATH=$PATH:/home/yourusername/Nim/bin nim c ~/p/nim/problem.nim`
14:35:04dom96it may just work
14:36:17wuehlmausproblem.nim has just ``import posix''
14:40:05dom96can you gist the full output of `PATH=$PATH:/home/yourusername/Nim/bin nim c ~/p/nim/problem.nim` and `nim -v`?
14:41:21wuehlmausafk
15:34:27wuehlmausback
15:35:37def-dom96: if you want to make sure that nim version is used you should prepend to the path, not append
15:35:59dom96true
15:36:10def-(but no idea if that's the issue)
15:36:30dom96wuehlmaus: run `PATH=/home/yourusername/Nim/bin:$PATH nim c ~/p/nim/problem.nim`
15:36:34dom96and gist the output please
15:36:36dom96and also `nim -v`.
15:44:39*yglukhov quit (Remote host closed the connection)
15:46:32wuehlmausNim Compiler Version 0.12.1 (2016-01-16) [Linux: amd64]
15:46:47wuehlmausthe rest is absolutely identical to what i wrote before
15:49:37wuehlmausand it doesn't change one bit if i use another shell
15:51:01dom96Could 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:08wuehlmaushttps://gist.github.com/pfefferminz132/d928660110575c10ff4e
16:00:41wuehlmausit must be something in the problem.nim folder
16:00:50wuehlmausit compiles in another directory
16:05:56dom96Do you have any other files in that directory?
16:06:17wuehlmaus82 :)
16:06:33dom96lol
16:06:45dom96I guess you have a `times.nim` file in there? :P
16:06:51dom96I just reproduced your issue
16:07:04wuehlmausyes i have :)
16:07:18dom96I'm going to report this as an issue heh
16:07:23wuehlmaus:)
16:07:30wuehlmausi am happy that we found it!
16:07:54wuehlmausthe reason i had that file was that i wanted to generate an html file from times.nim to have docu
16:09:10dom96heh, me too.
16:09:25dom96At least now you have the latest version of Nim to play around with :)
16:09:26federico3uh? Is 0.12.1 out?
16:09:30dom96https://github.com/nim-lang/Nim/issues/3725
16:09:43dom96federico3: nope?
16:17:02wuehlmausdom96: 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:21dom96:)
16:17:23wuehlmausbtw i have compiled crystal and it quit because i had not enough memory
16:17:32wuehlmausnim is wonderfully light
16:17:48wuehlmausthat's a huge plus
16:17:50dom96that's nice to hear
16:18:08wuehlmausi love it! :)
16:19:12*Jachy quit (Quit: Leaving.)
16:23:28federico3:(
16:24:27Xe\o/ got my main nim project behind HTTP/2, Nim 0.12 and Let's Encrypt!
16:25:17dom96Xe: cool, what's your project?
16:25:45Xedom96: a simple little JSON api for My Little Pony: Friendship is Magic episode air dates, etc
16:26:40dom96ooh, does it support other TV shows?
16:26:46*thotypous quit (Ping timeout: 240 seconds)
16:27:13Xeno
16:27:23Xewell
16:27:25Xeit can
16:27:31Xebut it has no disambiguation
16:27:39Xehttps://github.com/Xe/PonyAPI/blob/master/fim.list
16:27:43Xethis is the list of its episodes
16:28:49Xebut yeah
16:28:53Xeif you can get the info for it all
16:28:58Xecan adapt it for other shows
16:29:04*strcmp1 quit (Quit: cycling backwards like charlie)
16:29:11Xeit's not designed for it atm though
16:29:17*strcmp1 joined #nim
16:29:17Xenever was a need, etc
16:30:05*strcmp1 quit (Client Quit)
16:30:11dom96hrm, still awesome. Nice job!
16:30:18*strcmp1 joined #nim
16:30:21dom96was Let's Encrypt tough to set up?
16:31:31*strcmp1 quit (Client Quit)
16:31:40Xenope
16:31:42*strcmp1 joined #nim
16:31:47Xehttps://caddyserver.com
16:31:50Xethis automates it for you
16:31:54*dom96 should set it up for the forum
16:32:12Xeyeah
16:33:06def-dom96: Let's Encrypt doesn't work on WinXP though
16:33:22Xedef-: oh god the horror of not supporting a dead os
16:34:01dom96well, if anything I will make https optional
16:34:15dom96at least for the forseeable future
16:34:22*yglukhov joined #nim
16:34:35Xecaddy kinda enforces https though so might not be your best option :P
16:34:54def-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:29dom96def-: :\
16:35:32def-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:15dom96bbl
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:54SalewskiThere 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:38Araq_but what would it return?
18:49:43Araq_a seq?
18:50:12SalewskiYes, a seq I assume.
18:50:22Araq_hrm, try to patch it please
18:50:34Araq_s/seq/openarray
18:50:42Araq_should work
18:50:44SalewskiWill 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:32wuehlmaushmmm, i use tnim to play around with nim.
21:06:56wuehlmausimport nre and it crashes on me wit the git nim version
21:07:14Araq_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:26dom96Araq_: Why the change from `#[ #]` to `#[ ]` for multi-line comments?
21:43:12Araq_#[ #] is ugly
21:43:22Araq_#[ ]# would be the alternative
21:43:41Araq_but I am beginning to doubt I want the feature at all.
21:43:56Araq_Updating every highlighter out there ...
21:45:24dom96Hrm, I suppose #[ ]# will work just fine anyway, the last # will just be optional.
21:45:36dom96You don't have to update those highlighters.
21:45:41dom96Just the Nim one :P
21:46:05yglukhov#[ ]# Should not be optional to let commenting [] operators
21:47:09yglukhovAraq: why not nested?
21:48:36yglukhov#[ + ]# nest as you wish. don't waste time deciding what start/end tokens to use based on commented content.
21:49:01Araq_sorry, but it doesn't work this way.
21:49:11Araq_let foo = "#["
21:49:27Araq_# damn, you always need to take the content into account.
21:50:00Araq_allowing for nesting mitigates the problem, but doesn't solve it.
21:51:44*OderWat joined #nim
21:51:56OderWathi @all
21:51:59yglukhovimho, nesting #[ ]# will work in 99% sane cases.
21:52:40OderWatI 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:45yglukhovand its much more handy in those 99%. the other 1%. well, put a space between false-ending-token and thats it
21:53:16Araq_well you can always do this:
21:53:28Araq_let foo = "#[" # ]#
21:53:35Araq_;-)
21:53:38OderWatmaybe that impression changes when syntax highlighter actually do highlight it correctly ..
21:54:19Araq_OderWat: I know that's the case for me. I updated my highlighters already.
21:54:42OderWatwhats the case? thats ok or that it is disturbing?
21:54:54yglukhovbut that is an obviously unambiguos example, no? since string literal starts first, the multiline comment never starts
21:55:15dom96wait, is `let foo = "#["` not going to comment out the rest of the file (until the matching ])?
21:55:28dom96hrm, well I guess that makes sense.
21:55:45OderWatno it is a en end of line comment: # ]# ...
21:55:51*Demon_Fox joined #nim
21:56:02OderWatno it is an end of line comment: # ]# ...
21:56:24yglukhovi really cant see a. single. problem. with. nesting. come on!
21:56:52dom96yeah, me neither.
21:57:29OderWatnot 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:16yglukhovof course. single-char terminator is too ambiguous. but ]# is pretty unique already
21:58:36dom96indeed, that would be a good case for making ]# mandatory
21:59:23OderWati 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:33yglukhovOderWat I guess other symbols are allowed as operators now. so only # has a power of comment =)
22:01:41OderWatwe 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:20Araq_pretty sure pegs already use ~
22:02:25OderWatone could also use [:blabla:]
22:02:47OderWat[:this is multiline\nand here it stops:]
22:03:04dom96or #| |#
22:03:05Araq_yglukhov: ok, so let's allow nesting. I don't really care.
22:03:16OderWatno thats containing # again dom
22:03:52Araq_OderWat: it's totally fine that that multi line comment starts with a # too.
22:04:02dom96What's the problem with the #?
22:04:08yglukhovOderWat 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:10OderWati feel var foo = "hello" #[test]# and here code again?
22:04:47yglukhovcode again - yes
22:05:27OderWatafter all the time # was end of line comment and is in other languages.. dunno.. don't like that
22:05:33Araq_so ... we use #[ ]# and allow nesting. and ##[ ]## for doc comments
22:05:37dom96As far as I can see there is only one other language which uses #[ ]# http://rosettacode.org/wiki/Comments
22:05:41dom96(That's Lily)
22:06:03dom96And it doesn't allow nesting
22:06:50Araq_what's done in other languages never bothers me.
22:07:18dom96I know. But I find it interesting and think others might as well.
22:07:34Araq_everything that is not like in Ruby is wrong anyway...
22:07:40yglukhovif the only argument - "in other languages" - its not enough. there should be some practical explanation.
22:08:06Araq_how about we deprecated #[ for years now as an argument?
22:08:31Araq_we *know* it won't break any code out there.
22:08:54OderWathmm i tend to agree that #[ and ]# .. is ok... hum..
22:09:40Araq_yeah, I will change it to #[]# and ##[]##
22:09:40OderWatbut not #[ something ] ...
22:09:54Araq_and they can nest.
22:10:24Araq_#[[ ]]# are not supported. or should they?
22:10:24OderWatnesting by using #[[ nested #[here]# ]]# .. right?
22:10:36Araq_no, nesting as yglukhov wants it.
22:10:42OderWator nested by #[ test #[ test ]# ]# ..
22:10:46Araq_yes.
22:11:11OderWatok with me.. i love that :)
22:11:28OderWatbut I do not need to write highlighters :)
22:11:29Araq_dom96: just fyi #| would break Nim's parser.nim file ...
22:11:40yglukhovomg i cant express my happiness! :D
22:12:13Araq_hrm... seems like a bad compromise ... everybody is happy.
22:12:18OderWati can give you my paypal address :)
22:12:20Araq_I have done something wrong.
22:12:55OderWathaha :) you did a very good job with the LL already. why not doing more good stuff :)
22:13:38yglukhov+1, ll is really nice, thanks Araq =)
22:13:39Araq_I'm making async multi-core ready ...
22:14:43OderWatomg in the end people don't want to use c# or go anymore.
22:14:44yglukhovdo i understand correctly that all closures created in one proc will share the same context?
22:14:54dom96It's time for everyone to start making lists of things they want to be changed before 1.0
22:15:07dom96Because after 1.0 changing things will not be so easy
22:15:32Araq_yglukhov: erm yes.
22:15:33OderWati want curly braces ... *giggles*
22:15:54dom96OderWat: How about.... LOLCODE syntax?
22:16:01OderWatthat template from the changes "captureEnv" would help?
22:17:29OderWatI 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:42OderWat^had
22:19:13dom96There 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:35dom96Personally I think I value consistency more nowadays.
22:19:47Araq_yeah but nowadays I think the IDE should do that and we need to get away from text based tools
22:20:03Araq_it's 2016 ffs
22:20:17OderWatand some people write an ide which didn't do this in the past
22:20:19dom96Would you prefer to drag boxes around?
22:20:39dom96Text is still the most efficient way to write software.
22:20:45Araq_there is some nice middleground and you know it.
22:20:56Araq_so don't act like you don't, I hate that.
22:20:59OderWati 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:59Araq_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:09OderWati am not sure if "evaluation of indent and matching it on paste" is good enough
22:22:42Araq_IMO it definitely is.
22:23:12OderWatI did not write code which has to do that. I thought it can work but I am not sure.
22:24:26OderWatafter 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:55dom96btw syntax highlighters need to be updated anyway
22:26:59dom96look at this crap https://github.com/yglukhov/nimx/blob/f15fcce7f4d4223997ee546643ce90bd5dd688fd/nimx/linkage_details.nim#L68
22:27:55*yglukhov joined #nim
22:31:03OderWatI found that the ACE code editor does feature >120 languages but no Nim :(
22:31:26OderWatAfaik GitHub uses this for code editing somewhere too.
22:32:03OderWatsee .. https://github.com/blog/905-edit-like-an-ace
22:32:11*yglukhov quit (Ping timeout: 246 seconds)
22:32:47Araq_I use 4 different editors but no ACE :P
22:35:38OderWatwell 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:11apotheonHey, all.
23:03:23dom96hey apotheon
23:03:28OderWatwhy 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:22OderWatvar test = [1,''2,''3] # end of line comment
23:04:37OderWat(besides looking like " .. well)
23:05:26apotheondom96: 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:34dom96apotheon: no idea sorry
23:06:45apotheonI guess I'll ask Araq_ . . .
23:07:16apotheonAraq_: 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:58apotheonAraq_: Also, keeping RAM from being written to swap, while I'm asking about memory management.
23:09:23OderWatguess you mean for storing passwords/auth data @apotheon?
23:09:52apotheonYeah, sensitive data management is the use case.
23:10:37apotheonEncryption keys and data temporarily unencrypted on the system are more directly the kind of thing than passwords.
23:11:21apotheon. . . 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:10OderWati 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:59OderWatsame goes for DMA like in those apple vulnerabilities through the thunderbold port.
23:16:58*joelmo joined #nim
23:19:56dom96yay https://twitter.com/d0m96/status/688500909052145664
23:26:39OderWatcool dom.. this may replace https://github.com/julienXX/terminal-notifier for me :)
23:27:34apotheonOderWat: 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:20apotheon. . . 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:21dom96OderWat: It's a pity that I need to overwrite Nim's main() function and use Cocoa's NSApplication event loop thing.
23:29:31apotheonOderWat: 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:42apotheon. . . but I'd like to be able to use something other than C, sometimes.
23:29:46OderWaton 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:32apotheonOderWat: 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:39apotheonerr, s/ot her/other/
23:33:17OderWatwhat type of memory safety you are talking about? afaik you can simply allocate some ram in Nim too?
23:35:21OderWatso 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:12apotheonPreventing swap is probably the big problem.
23:37:24apotheon(on a per-process basis, as opposed to per-system or something like that)
23:37:56apotheonIn theory, in C you can prevent allocated memory from being swapped. In practice, it sometimes depends on the OS, I think.
23:39:11apotheonSome 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:34OderWathmm there is https://msdn.microsoft.com/en-us/library/aa366895%28VS.85%29.aspx ..
23:39:59OderWatwhich locks a memory region from getting swapped out
23:40:08apotheonYeah, C++ can do it, too -- but I'm not particularly interested in using C++ for this stuff.
23:40:53OderWatNim can do "anything" C or C++ can.. worst case you emit some code for it to the c compiler.
23:41:33OderWatthat windows thing is not about c++ but about windows itself
23:41:37apotheonYeah, 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:51apotheonOh, I didn't really look at it very closely.
23:42:04apotheonC++ can do much the same thing C can in this respect, though, as I recall.
23:42:25apotheon(on Unixy systems, which is my primary target platform)
23:42:45OderWathttp://linux.die.net/man/2/mlock ..
23:42:47dom96I don't think there are any Nim libraries which do this for you, so you would need to write one yourself.
23:42:52apotheonmlock is the thing, indeed
23:42:58dom96For that you would need to wrap C functions
23:43:09OderWatso just use it :)
23:43:19apotheonYeah, I guess so.
23:43:25dom96Even if one existed, it would still use external C functions to do its job.
23:43:39apotheondom96: As long as I wouldn't have to write the C, it'd make me happy.
23:44:37apotheonAlmost 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:51apotheonI get the impression you can in Nim(?).
23:44:54OderWatint mlock(const void *addr, size_t len);
23:44:54OderWatint 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:40apotheonWell . . . I've been at this coffee shop long enough. I need to buy some ingredients for dinner and go collapse at home.
23:45:45OderWatNim compiles to C and has probably the best FF interface of all languages available
23:46:00apotheonBeing ill sucks. Thanks for the info. I'll leave my IRC client connected in my absence.
23:46:34apotheonlater
23:49:54*jakesyl quit (Ping timeout: 256 seconds)