<< 05-08-2017 >>

00:15:42*nsf quit (Quit: WeeChat 1.9)
00:16:59FromGitter<aboisvert> what is a nim "project file" ?
00:17:15FromGitter<aboisvert> (what is fed to nimsuggest or what is configured in VSCode)
00:17:24FromGitter<aboisvert> is that the .nimble file?
00:18:33dom96aboisvert: it's the main .nim file
00:18:39dom96so the file you would compile
00:19:12FromGitter<aboisvert> ok, thanks. having issues with auto-complete in VSCode
00:19:39Araqyou can also give it a directory
00:20:44dom96oh, is that a new thing?
00:20:45FromGitter<aboisvert> let me try that...
00:22:02FromGitter<aboisvert> Hmmm... still just getting file-local completions, no completions from other files
00:22:22FromGitter<aboisvert> All my sources are under "src", and "src/{projectName}/"
00:22:29FromGitter<aboisvert> and tests are under "test"
00:25:09FromGitter<aboisvert> in my .nimble file, I compile using: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59851065f5b3458e30b055b0]
00:26:09Elronndover here https://github.com/nim-lang/nimbot/blob/master/src/nimbot.nim#L74, what's the purpose of ": Future[void]"? Why not just proc pmOrig(msg: string) =...?
00:31:54doznPerhaps I've missed it in the documentation, but is there any way to ensure that all exceptions are caught?
00:37:06*UxerUospr joined #nim
00:38:57doznElronnd, https://nim-lang.org/docs/asyncdispatch.html
00:40:56dom96Elronnd: Normally {.async.} would add that implicitly, but since that proc doesn't use that it needs to be specified.
00:45:57*v17d quit (Ping timeout: 240 seconds)
00:47:43doznAlso looking for a way to cleanup unused imports
00:50:41Araq{.raises: [].}
00:51:16Araqunused imports: remove the modules from the list and see if it still compiles (with nimsuggest integration, easy enough to do)
00:53:03doznAraq, Thanks, that helped me find the documentation as well https://nim-lang.org/docs/tut2.html#exceptions-annotating-procs-with-raised-exceptions
00:53:15doznAnd yes, that's one way to check for unused modules =b
00:55:57*mahtov2 joined #nim
00:57:37*mahtov quit (Ping timeout: 248 seconds)
01:04:50*UxerUospr quit (Quit: Lost terminal)
01:06:10*UxerUospr joined #nim
01:08:06*chemist69 quit (Ping timeout: 258 seconds)
01:11:42mahmudovhttps://github.com/3dicc/Urhonimo is discountinued ?
01:11:51mahmudovcan we run it with 0.17.0 ?
01:13:38doznmahmudov, What happens when you try running it?
01:14:24mahmudovi mean can we compile it
01:14:47mahmudovalso
01:14:48mahmudovhttps://urho3d.github.io/documentation/1.32/_building.html
01:14:50mahmudovnot found
01:16:36*rauss joined #nim
01:17:00doznmahmudov, of course it isn't, it's for an old version or has moved.
01:17:33doznThe URL is a good indicator =)
01:18:08doznI'd probably just skip it for another game library if possible
01:18:32mahmudovhttps://www.youtube.com/watch?v=-T0MrJkLB8Y
01:18:54mahmudovis there any tool written nim that can we do like these
01:20:32*chemist69 joined #nim
01:21:30doznhttps://github.com/fragworks/frag
01:21:36doznmahmudov, ^
01:24:12mahmudovthnks dozn. lemme dig
01:27:39*djellemah_ joined #nim
01:29:06doznIf I create an enum mapped to string values, is there any way to retrieve those string values given the enum value?
01:30:18doznI know I can already do parseEnum for the opposite direction...
01:31:30*djellemah__ quit (Ping timeout: 268 seconds)
01:32:04doznI feel like type casting should work in this instance...
01:35:50Elronndare there plans to add a "nimble run" command?
01:36:03doznnim has a run option
01:36:22doznhttps://nim-lang.org/docs/nimc.html
01:36:29dozn--run
01:36:32Elronndyes but it's not in nimble
01:37:04dozn"c, cc, js [opts, ...] f.nim Builds a file inside a package. Passes options
01:37:04dozn to the Nim compiler."
01:37:24doznI'm assuming that means it should work for nimble as well
01:37:59Elronndultimately though that complicates it, and that's just for one file. I just want to be able to type "nimble run" and have it do nimble build and then ./whatever
01:38:45doznYou can automate what it builds using .nimble
01:39:21doznSo I'm assuming (keep in mind I haven't really used nimble properly yet) that you can just use "nimble c" at some point, and it'll grab the parameters you've stored in the .nimble file
01:39:42doznBarring that, I'd just write a simple .sh or .bat file
01:40:39Elronndok
01:41:48*yglukhov joined #nim
01:47:27*yglukhov quit (Ping timeout: 260 seconds)
02:00:16Elronndis there a good way to handle quitting in the irc module? (Using async) I made a command that triggered client.close, and while it does make it quit, I get this ugly traceback: https://0x0.st/khc.txt
02:00:20Elronndwhich...doesn't look nice?
02:01:09Elronndhttp://sprunge.us/BQfO?nim here's my source code
02:03:02*Elronnd is now known as strangebod
02:03:04*strangebod is now known as strangebot
02:03:28*strangebot is now known as Elronnd
02:16:22*UxerUospr quit (Quit: Lost terminal)
02:25:19*Sentreen joined #nim
02:27:06Elronndis there to use ssl with nim's irc library?
02:29:46*endragor joined #nim
03:04:14*shadwick quit (Ping timeout: 260 seconds)
03:36:31Elronndok, I got ssl working
04:03:57*enthus1ast- quit (Ping timeout: 240 seconds)
04:16:15FromGitter<gogolxdong> Is there anyone who attempt writing blockchain in nim?
04:38:09ElronndI don't think so
04:38:18Elronndcould probably translate an existing one with c2nim and then make improvements
04:40:02def-pri-pubc2nim isn't a magic bullet though. In my experience, it's a good tool to get started on something, but there always needs to be a lot of hand tweaking of things in the end to make it nice.
04:42:05*yglukhov joined #nim
04:44:42*def-pri-pub quit (Quit: leaving)
04:46:55*yglukhov quit (Ping timeout: 276 seconds)
04:48:44Elronndis there any chance of float80 (long double in c) being added to nim?
05:02:45Elronndis it possible to manually free something in nim?
05:12:37*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:17:00*gangstacat quit (Quit: Ĝis!)
05:36:02doznElronnd, I believe dealloc is what you're looking for
05:36:17doznThere's some good notes at the bottom of https://nim-lang.org/docs/manual.html#types-reference-and-pointer-types
05:36:37doznIt mentions using GCunref to tell the GC that it's not needed anymore as well
05:41:28Elronndok
05:47:34*haha joined #nim
05:47:57*haha is now known as Guest24020
06:05:11*MonsterAbyss quit (Ping timeout: 240 seconds)
06:06:33*MonsterAbyss joined #nim
06:08:30ElronndI'm getting "Error: undeclared identifier: 'rawFileSize'", why? It's in sysio.nim
06:22:00doznElronnd, have a minimal test case?
06:26:15Elronnddozn: http://sprunge.us/OfKZ?nim
06:28:26doznYou need to import sysio, no?
06:28:51ElronndI don't think so. It's part of system
06:28:57Elronndand anyway when I tried that it gave me an error
06:29:46*Trustable joined #nim
06:31:34*skrylar joined #nim
06:31:43skrylari didn't see a bson serializer in nimble so i started building one. it has a decent chunk of parsing done
06:32:11doznOh of course not Elronnd, it's not an exported proc
06:34:05Elronndso I have to copy-paste the implementation into my own file?
06:34:06Elronnd;-;
06:44:15*yglukhov joined #nim
06:47:01doznThere's probably a better way to do whatever you're trying to do, but I wouldn't know
06:49:07*yglukhov quit (Ping timeout: 276 seconds)
06:50:54doznWonder if documentation overhaul is planned before .1
06:50:56doznv1
06:51:27doznLots of links don't work, almost every anchor'd link doesn't work
06:53:45*xet7 quit (Quit: Leaving)
06:54:58*MonsterAbyss quit (Ping timeout: 276 seconds)
06:54:58doznAlso curious if the {.raises: [].} pragma will ever be littered around in std code, feels too easy to miss raised errors atm
06:57:12*MonsterAbyss joined #nim
06:57:17*madmalik joined #nim
07:01:09*skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…)
07:07:20*rauss quit (Quit: WeeChat 1.9)
07:08:58*pilne quit (Quit: Quitting!)
07:11:04*nsf joined #nim
07:36:32*nsf quit (Quit: WeeChat 1.9)
07:45:07*yglukhov joined #nim
08:12:27*dankrad quit (Ping timeout: 260 seconds)
08:14:24*dankrad joined #nim
08:43:06*Trustable quit (Read error: Connection reset by peer)
08:43:19*Trustable joined #nim
08:46:47*Matthias247 joined #nim
08:48:31*Trustable_2 joined #nim
08:48:31*Trustable quit (Read error: Connection reset by peer)
08:59:22Araqdozn: it's inferred by the compiler, so we don't annotate the stdlib with it
09:01:11*dankrad quit (Ping timeout: 240 seconds)
09:01:49doznAraq, if it was inferred by the compiler, I shouldn't be able to compile without catching all of the exceptions then, no? Or is there a compile-time flag for it?
09:03:06Araqhttps://nim-lang.org/docs/manual.html#effect-system-exception-tracking read this at least please before going on with the discussion
09:03:36*dankrad joined #nim
09:06:06doznRight, so that states that the "raises" pragma must be manually used, which the compiler then verifies is being followed.
09:06:46doznThat's why I can call https://github.com/nim-lang/Nim/blob/master/lib/pure/httpclient.nim#L1180 without having to handle the possibly-raised exception
09:07:45doznHell, for the first two days of using nim, I didn't handle any errors at all, it was frightening
09:11:45*Trustable_2 quit (Quit: Leaving)
09:18:31*yglukhov quit (Remote host closed the connection)
09:33:46*Trustable joined #nim
09:52:58Araqdozn: so? yeah, what's the question?
09:53:23doznAraq, is there a way that I can know if I haven't caught an exception from the std?
09:53:47Araqyou can ignore exceptions and then an error quits your program with a somewhat nice error message, is reasonable for simple programs
09:53:53doznSo no, thanks.
09:54:13Araqif you want to be forced to handle them, write
09:54:22Araqproc main() {.raises: [].} = ...
09:55:26doznNah, it's not inside a proc
09:55:42Araqhttps://nim-lang.org/docs/os.html#symlinkExists,string
09:55:52doznOh well, thanks for the somewhat roundabout help
09:55:56Araqclick on the '{.' to make it expand
09:56:06Araqthen it shows the possible exceptions it can raise
09:56:53doznThat' neat, never knew about that
09:57:53*couven92 joined #nim
09:58:03Araqthat's inferred by the compiler, so reading the official docs gives more information than reading the source code ... ;-)
09:58:21doznI can tell, I've done a lot of source reading
09:58:38Araqsorry about that
09:58:56doznDocumentation is a PITA
09:58:58Araqany idea how we can make it more obvious?
09:59:04doznTo create*
09:59:21doznThat's really the problem with pragmas, they're so hidden, even in plain sight
10:00:30dozn(as their effects are invisible)
10:00:54doznFor starters, I don't believe I'd hide the fields in the same manner you've chosen to
10:01:15doznAlthough there's lots of fluff there as well, you're just hiding the magic
10:01:26Araqwell otherwise the prototypes are overwhelming
10:02:07Araqwe can not emit implementation details like extern: "nos$1" but that's the only implementation detail
10:02:23Araqand even that tells you it's shared among DLLs if you build DLLs
10:02:24doznYou could include a separate field for pragmas, honestly, I thought those {..} in the documentation were simply to explain that that's where the rest of the code lay
10:02:45AraqI did hide them on user's demands :P
10:03:07Araqyou complain they should be shown all the time, others complained they are just confusing for the newbies
10:03:10doznWere those users who were already good at using Nim, by any chance?
10:03:17doznhmm
10:03:46AraqI guess we can generate a sepearate 'raises' section for each proc
10:03:49doznCould just do a "Pragmas:" section
10:03:55Araqand the other effects can stay hidden
10:03:56doznAnd show all the pragmas there instead
10:04:04doznCould do that as well
10:04:25AraqI dunno but then it's still verbose but with a better layout
10:04:38doznOff-topic but TaintedString is brilliant, where was that idea from?
10:05:00AraqI stole it from Perl and adapted it to Nim's static typing setting
10:05:22doznBrilliant
10:06:44*mahmudov quit (Remote host closed the connection)
10:10:46*rokups joined #nim
10:14:31*mahtov2 quit (Ping timeout: 276 seconds)
10:31:43FromGitter<TiberiumN> skrylar: there is - see nimongo
10:32:02FromGitter<TiberiumN> it has a bson serializer
10:37:06*Matthias247 quit (Read error: Connection reset by peer)
10:42:55*Guest24020 quit (Quit: it is possible that i just died)
10:51:22*xet7 joined #nim
10:58:38*mahtov joined #nim
11:00:31*enthus1ast- joined #nim
11:13:23*enthus1ast- quit (Remote host closed the connection)
11:13:44*enthus1ast- joined #nim
11:20:34*mahmudov joined #nim
11:29:05*couven92 quit (Ping timeout: 248 seconds)
11:30:42*couven92 joined #nim
12:01:48*yglukhov joined #nim
12:07:35*dankrad quit (Ping timeout: 240 seconds)
12:09:00*v17d joined #nim
12:10:00*dankrad joined #nim
12:14:13FromGitter<zacharycarter> o/
12:28:23*Sentreen quit (Quit: WeeChat 1.6)
12:29:27*Sentreen joined #nim
12:30:35FromGitter<TiberiumN> skrylar: this module from nimongo - https://github.com/SSPkrolik/nimongo/blob/master/nimongo/bson.nim
12:30:44FromGitter<TiberiumN> it's standalone as I can see
12:31:21couven92@TiberiumN regard the Android support for Nim... Uhm, I just bricked my phone... -.-
12:32:02FromGitter<TiberiumN> adb stuff?
12:32:09FromGitter<TiberiumN> you can almost always restore it btw
12:32:11couven92PR 5772
12:32:21FromGitter<TiberiumN> just reflash it
12:32:35enthus1ast-what have you done couven92?
12:32:55couven92enthus1ast-, I don't know! :(
12:33:12FromGitter<TiberiumN> well you can always reflash your phone
12:33:13couven92it won't even react to hard-reset (Vol- + POWER)
12:33:24FromGitter<TiberiumN> hm
12:33:26FromGitter<TiberiumN> what's your phone?
12:33:39couven92yeah... no problem... I'll just have to wait for it to drain the battery and restart it...
12:33:48couven92@TiberiumN HTC One m8
12:34:36couven92Well... I should really just run Android on the VS Android Emulator, that's actually quite decent...
12:35:16enthus1ast-phones with integrated battery should be prohibited...
12:35:23FromGitter<TiberiumN> well
12:35:26FromGitter<TiberiumN> it works quite well for me
12:35:31FromGitter<TiberiumN> my phone has integrated battery
12:36:23*haha joined #nim
12:36:46*haha is now known as Guest80930
12:37:00*Guest80930 is now known as haha_
12:37:46couven92@TiberiumN but anyways the android build chain really works quite well now... I am still going though the testament tests that fail on android, but that's pretty few of them... we currently have ~40 tests failing out of 1500 on android
12:38:06FromGitter<TiberiumN> well that's good
12:38:31FromGitter<TiberiumN> because, for example, I've tried python3.5 async app, and it FAILS because there's something unimplemented
12:38:36FromGitter<TiberiumN> and nim async app works :)
12:39:27FromGitter<TiberiumN> anyway if you need some testing, I can help
12:39:29couven92I haven't yet started on doing stuff outside of termux yet though... that will be my next target... I'd really like to get nim to be independant from termux... giving the oppurtunity to run it from the adb shell
12:39:50FromGitter<TiberiumN> that would be harder
12:39:53FromGitter<TiberiumN> a lot
12:40:03FromGitter<TiberiumN> you'll need all standart libraries
12:40:12FromGitter<TiberiumN> which are available in termux but not in nim
12:40:19couven92yup... but it will be SO much fun! :P
12:40:32FromGitter<TiberiumN> well we can build nim compiler android app on top of termux :)
12:40:33FromGitter<TiberiumN> it's opensource
12:40:34FromGitter<zacharycarter> why does everyone want to compile / run Nim on android I don't really get the appeal
12:40:43FromGitter<TiberiumN> well
12:40:46FromGitter<zacharycarter> like I get running a Nim binary on android
12:40:47FromGitter<TiberiumN> playground at least :)
12:40:59FromGitter<TiberiumN> you can run your console app on android
12:41:02FromGitter<TiberiumN> without cross-compiling
12:41:22FromGitter<zacharycarter> true
12:41:43couven92yeah, @TiberiumN is right... and we could in the furture actually also do stuff against the android NDK making REAL android apps natively in Nim, I'd like that
12:41:52FromGitter<TiberiumN> we can already do that btw
12:42:00FromGitter<zacharycarter> yeah
12:42:06couven92yeah probably...
12:42:10FromGitter<zacharycarter> I've done it
12:42:19FromGitter<zacharycarter> frag had an android example
12:42:29FromGitter<zacharycarter> it's not fun
12:42:32FromGitter<zacharycarter> but nothing with the NDK is
12:42:49FromGitter<TiberiumN> yeah
12:42:54FromGitter<TiberiumN> you can do it with jnim I think?
12:43:05FromGitter<TiberiumN> https://github.com/vegansk/jnim
12:46:22FromGitter<TiberiumN> without NDK
12:46:31FromGitter<TiberiumN> but yeah, this would be much work too
12:46:40couven92@TiberiumN here's the roadmap with the last testresults for android: http://thnetii.td.org.uit.no/testament-results.html
12:46:58couven92if you hide all successful tests, you can see what fails... :)
12:47:24FromGitter<TiberiumN> yeah
12:47:53FromGitter<TiberiumN> about asyncdial - maybe you've had internet disabled?
12:48:02couven92for example it looks we have a lot of fails with boehm gc... I know nothing about the boehm-gc in Nim... so I hvae no idea how to fix that
12:48:21FromGitter<TiberiumN> maybe we need explicitely tell nim that this is clang and not gcc?
12:48:25FromGitter<TiberiumN> maybe there's some differences anyway
12:48:43couven92@TiberiumN i did tell Nim that it was clang in my nim.cfg
12:49:46couven92@TiberiumN I don't think internet was the problem there... because other inet tests succeeded... I skimmed over it and I think it was a problem with IPv6
12:49:59couven92which seems a little weird...
12:50:13*Sentreen quit (Quit: WeeChat 1.6)
12:50:18dom96couven92: that sucks :( how did you brick it?
12:51:49couven92dom96, I not really sure I bricked it... I moved a lot files from SD card to internal memory in an SSH connection and suddely everything stopped reacting... So now I am draining the battery and hoping for a successful reboot that way
12:52:18dom96I see. Hope it works out!
12:52:58couven92yeah... testing stuff on real Hardware... always fun living on the edge! :D
12:56:53couven92@TiberiumN, Araq: I have an idea for the issue that android cannot reliably be detected in build.sh: we could override the ucpu, uos and uosname variables in build.sh with environment variables like ARCH, OS and OSNAME if they are defined... That way one could run: `OSNAME=android ./build.sh` and it would just discard whatever uname says and assume you're on android
12:59:40couven92@TiberiumN do you have an idea why `arithm/tshr.nim` fails on Android? it looks like it's using 32-bit values whereas Nim expects 64-bit values, right? since the expected `9223372036854775804'i64`is about int64.high whereas the actual `2147483644` is int32.high
12:59:59*yglukhov quit (Remote host closed the connection)
13:00:42FromGitter<zacharycarter> http://imgur.com/a/TpLsc
13:01:07FromGitter<TiberiumN> @zacharycarter, wow!
13:01:13couven92@zacharycarter nice! :)
13:01:14FromGitter<TiberiumN> couven92: probably
13:01:22FromGitter<TiberiumN> because termux support different arm architectures
13:01:30FromGitter<TiberiumN> for example I have aarch64, which is ARM64
13:01:47FromGitter<TiberiumN> which is ARMv8
13:01:51FromGitter<zacharycarter> thanks
13:01:59couven92oh... right... but I have ARMv7 and also compiled Nim for ARMv7
13:02:35Araqcouven92: why not './build.sh andriod' instead?
13:03:21couven92Araq, yeah I thought about that as well, but the build.sh already does check for stuff on the command-line...
13:03:46Araqor just ./build_android'
13:03:54Araqas I suggested before.
13:04:10Araqthen we don't need freaking argument handling in a posix shell script
13:04:36couven92Araq, yeah I know, but do you really want another build.sh file that is very much similar to the one we already have?
13:05:00Araqyes, it's generated anyway
13:05:16couven92okay... fine with me... :)
13:05:23Araqyou only need to adapt the template and we can generate 2 files from the same template
13:05:53*Snircle joined #nim
13:06:38couven92oh? okay... We're doing that for the Windows batch files, right? so, I should have a look at the Windows template and use similar technique for Android?
13:06:38Araqtools/niminst/buildsh.tmpl
13:06:51Araqno, look at
13:06:52Araqtools/niminst/buildsh.tmpl
13:07:26*enthus1ast- quit (Remote host closed the connection)
13:07:42*enthus1ast- joined #nim
13:07:49couven92looking at it :P
13:12:24couven92okay Araq, so you're saying create a special case for android in the "call the compiler" section and output that to a different file?
13:15:36couven92ah... I am too stupid and have too little sh-knowledge to deal with this now... I'll start with doing `./build.sh android` instead, seems easier right now...
13:18:16*Sentreen joined #nim
13:19:45*dddddd joined #nim
13:20:57*Sentreen quit (Client Quit)
13:24:20*Sentreen joined #nim
13:32:54*andrzejku joined #nim
13:43:29*andrzejku quit (Quit: My iMac has gone to sleep. ZZZzzz…)
13:46:23couven92Hey! look at that... I managed to force-boot my phone!!! Wuhuu! :D
13:50:31couven92and more important: it works again!!! :D
13:54:15FromGitter<zacharycarter> :D \o/
13:56:56couven92Araq, done: https://github.com/nim-lang/Nim/pull/5772/commits/9c55d5a9a004988c90f033020f846a834ee39d9b
13:58:06couven92means that we now can run things like: `./build.sh --os android --cpu arm` or even `./build.sh --os linux --cpu arm` if you have a xplat gcc in your path and wnat to cross-compile nim binaries
14:02:01*Sentreen quit (Ping timeout: 276 seconds)
14:03:28dom96\o/
14:05:07FromGitter<zacharycarter> I don't like this part - if you have a xplat gcc in your path
14:05:17FromGitter<zacharycarter> what about using something like docker here
14:06:51couven92@zacharycarter it was just a random idea that popped into my head while typing... :P But we really would need this for `build.sh` on Android
14:07:57FromGitter<zacharycarter> true
14:08:51couven92@zacharycarter but anyhow as a quickfix build-from-csources using the command-line argument overrides would certainly work
14:11:02FromGitter<zacharycarter> ah yeah good point
14:14:06couven92hmm... I still surprised how fast Nim is even on a stupid 4 years old Andoird phone! :P
14:14:36*Sentreen joined #nim
14:24:42*pilne joined #nim
14:27:39couven92@TiberiumN, now after I revived my phone again, I have started a new testament testrun on my phone... let's see if something changed in the last month :P
14:28:58*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:31:32Araqcouven92: seems like a decent patch
14:32:14couven92Araq, want it the repo immediately? i.e. should I make an own PR just for that so we can merge that in immediately?
14:32:39Araqwhy? is the rest of your PR still not ready?
14:33:36couven92well technically it is... but we cannot guarantee that Nim works as expected on Android... so we might have to tweak the stdlib later
14:34:26couven92but the yeah, building and running Nim is really stable now... only nimble worries me a little, because of the temp-path, but well...
14:35:08couven92no really good answer for that there... temporary directories simply don't exist on android and we can't really change that easily in Nim
14:36:05Araqcan't we use something like $HOME/nimtempfs/ instead?
14:36:47Araqfyi the boehm tests fail if you don't have boehm installed
14:36:55Araqthat's ok.
14:38:06couven92I tried that in nim.cfg, but I couldn't get nim.cfg to expand $HOME here: https://github.com/couven92/Nim/blob/niminst-android/config/nim.cfg#L99
14:38:36couven92Araq, okay... then we'll ignore boehm-gc on android! Yeah less worries! :D
14:38:44*def- left #nim (#nim)
14:40:16Araqdefine:"tempDir:$HOME/../tmp" is the wrong idea ;-) even if it would work
14:40:43Araqthen the Android binary would be specialized to the dev's HOME
14:40:57Araqsee the problem? you need to do it at runtime via Nim code in os.nim
14:42:32couven92Araq, oh, right... I hadn't thought of that... okay, so in os.nim we make an own when defined(android) and expand the HOME envvar, creata a nimtempfs directory and return that as tempDir, okay got it, will do that
14:44:21*nsf joined #nim
14:45:44Araqthanks
14:47:57couven92Araq, i know your aversion to .file and .dirs, but may I do nimtempfs to .nimtempfs?
14:56:41*Sentreen quit (Quit: WeeChat 1.6)
14:57:45*Sentreen joined #nim
15:01:02Araqmaybe make it .__NIMTEMPFS__
15:01:11couven92really? okay... sure
15:01:35Araqthen it's at least really ugly by any measure
15:01:42couven92:D
15:04:11couven92well, let's start with just nimtempfs (as you originally suggested) and see if nobody complains... Hiding away a tempdirectory might also be no good idea, because you might forget about and later wonder where all your harddisk space went to...
15:06:07*v17d quit (Remote host closed the connection)
15:06:43couven92Araq, should I create the tempdir? because if I do, Nim complains that I should add the WriteDirEffect to the getTempDir proc?
15:08:00Araqhummm
15:08:18Araqstupid Nim compiler... he is right
15:08:24couven92He is!
15:09:08couven92question is: should I just add the tag? I could add the tag just in Android, right?
15:09:20couven92that would probably be best
15:09:28Araqmeh, that's not good. you can hide the effect though
15:09:34Araqbut that's not good either.
15:10:08*v17d joined #nim
15:10:54couven92problem is: everyone will asssume the tempDir to already be there... So on Android we should really make sure it's there, right? Or should I should we just say screw it and get people to create the dir on their own?
15:11:27couven92I'll add the WriteDirEffect conditionally for android...
15:11:59Araqmaybe use $HOMEDIR instead?
15:12:11couven92what do you mean?
15:12:25Araqmake getTempDir return $HOMEDIR
15:12:34couven92hmm... okay...
15:12:42Araqit's a general dumping ground on Unix systems anyway.
15:13:02Araqshows how much it values your personal data :P
15:13:51couven92though I'd rather we do it proper and create a separate nim temp dir...
15:15:09Araqfine so add the effect
15:18:50dom96https://twitter.com/d0m96/status/893853686228824064
15:20:01*ShalokShalom quit (Ping timeout: 276 seconds)
15:20:15FromGitter<zacharycarter> dom96: nice
15:20:23FromGitter<zacharycarter> I see you used bulma for the book's website
15:20:28FromGitter<zacharycarter> looks good
15:20:29dom96Yeah :)
15:20:37*dom96 submits to HN
15:20:59dom96Help getting it to the front page appreciated *hint hint*
15:20:59*nhywyll joined #nim
15:21:19couven92Araq, I did it like this now: https://github.com/couven92/Nim/blob/android-testament/lib/pure/ospaths.nim#L531
15:22:08Araq+1
15:22:35couven92Actually, I noticed that we don't read any IO when returning the Temp Path, so... should we remove the ReadIOEffect there?
15:23:11*enthus1ast- quit (Ping timeout: 246 seconds)
15:23:30*def- joined #nim
15:23:38*mahmudov quit (Remote host closed the connection)
15:23:45*dankrad quit (Ping timeout: 248 seconds)
15:25:14*enthus1ast- joined #nim
15:25:25*dankrad joined #nim
15:27:12Araqno
15:30:23couven92Araq, ok... I'll run another test and if nimble works fine, I'll say that PR 5772 is ready... How to disable boehm test runs when running testament?
15:31:59Araqhttps://github.com/nim-lang/Nim/blob/devel/tests/testament/categories.nim#L142
15:32:11Araqadd 'and not defined(android)' here
15:32:41couven92okay :)
15:32:56FromGitter<TiberiumN> dom96: any progress on option types for json "to" macro? or you're doing other things at the time?
15:33:07dom96other things :)
15:33:24FromGitter<TiberiumN> because without option types it's almost impossible to create stub procedures for API (with all parameters, and parsing answer too)
15:39:09FromGitter<TiberiumN> anyway it would be nice to try to generate full procedures for this api, because it has json schema with all methods, their types and return values
16:03:20*http_GK1wmSU joined #nim
16:04:41*http_GK1wmSU left #nim (#nim)
16:13:45couven92Araq, @TiberiumN, okay: got nimble running on Andrdoid! Very nice! :)
16:18:30*endragor quit (Remote host closed the connection)
16:19:56*skrylar joined #nim
16:22:30*skrylar quit (Client Quit)
16:22:59*nhywyll quit (Quit: nhywyll)
16:24:50FromGitter<TiberiumN> yay!
16:25:11FromGitter<TiberiumN> hmm
16:25:15FromGitter<TiberiumN> can you resolve conflicts?
16:25:20FromGitter<TiberiumN> so maybe araq can merge this
16:30:46couven92@TiberiumN working on it...
16:31:10couven92uhm, in a format string how to escape a liteal $ character?
16:32:06couven92ah $$ okay
16:35:47*endragor joined #nim
16:40:32*endragor quit (Ping timeout: 260 seconds)
16:47:29*sz0 quit (Quit: Connection closed for inactivity)
16:54:54*Ven joined #nim
16:55:17*Ven is now known as Guest18728
16:57:13*dankrad quit (Ping timeout: 255 seconds)
16:59:13*dankrad joined #nim
17:16:44*madmalik quit (Quit: Connection closed for inactivity)
17:17:56*def-pri-pub joined #nim
17:18:52*kunev quit (Ping timeout: 255 seconds)
17:19:40*kunev joined #nim
17:26:51*vivus joined #nim
17:29:24*nsf quit (Quit: WeeChat 1.9)
17:33:34*Matthias247 joined #nim
17:46:09*v17d quit (Ping timeout: 248 seconds)
17:59:19demi-so i'm using asyncnet to run a daemon locally. can i assume that each of the async client callbacks are a separate thread i can safely sleep for a period of time?
17:59:36*v17d joined #nim
18:01:09*v17d quit (Remote host closed the connection)
18:03:29*v17d joined #nim
18:04:10*Guest18728 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:04:35FromGitter<TiberiumN> yes, with sleepAsync
18:04:51FromGitter<TiberiumN> but they're not threads
18:07:39dom96^^
18:07:50couven92@TiberiumN ok, now I have fixed the conflicts in #5772 don't really know what happened there, but well... now it at least runs the tests
18:08:20couven92I have also updated http://thnetii.td.org.uit.no/testament-results.html
18:08:43couven92it shows that we now fail 24 tests out of 1478 (~1.62%)
18:10:20couven92BTW, http://thnetii.td.org.uit.no/testament-results.html is a result from my proposed upgrade for testament (PR #6058) what do you think?
18:10:41FromGitter<TiberiumN> nice!
18:11:50*dddddd quit (Remote host closed the connection)
18:14:58*v17d quit (Remote host closed the connection)
18:16:29*v17d joined #nim
18:22:51FromGitter<TiberiumN> I'll now clone your repo
18:23:22couven92@TiberiumN remember to clone the branch niminst-android for the android stuff
18:23:29FromGitter<TiberiumN> yeah
18:24:20FromGitter<TiberiumN> do I need to manually modify csources for now?
18:24:48*mahmudov joined #nim
18:24:57couven92Uhm no... I don't do it... But I run `./koch csources -d:release` from the repo
18:25:13FromGitter<TiberiumN> ah
18:25:26FromGitter<TiberiumN> but I need to compile koch firstly :)
18:26:12couven92yes, I drop the csources on my Ubuntu shell and then tar the csources and scp them to the phone
18:27:15FromGitter<TiberiumN> ah
18:27:20couven92but that's only because csources is not updated yet, it will be once PR #5772 is merged
18:27:30FromGitter<TiberiumN> yeah, I know, thanks
18:27:35FromGitter<TiberiumN> I forgot that I can do that :)
18:28:17couven92it's a nice trick... it also makes Nim validate that all the compiler and stdlib code is valid for all archs and oses it supports
18:28:40FromGitter<TiberiumN> also why csources are provided as git repo? wouldn't it be better if they're provided as a file?
18:28:52FromGitter<TiberiumN> because it's slower to git clone them
18:28:57couven92go ahead and ask Araq :P
18:29:33demi-hmmm; ok if they aren't threads then how can i setup some sort of scheduler system
18:29:46FromGitter<TiberiumN> they're like coroutines
18:29:49FromGitter<TiberiumN> if one sleeps - others work
18:29:56FromGitter<TiberiumN> *one of others
18:29:59FromGitter<TiberiumN> so for example
18:30:13FromGitter<TiberiumN> one coroutine can sleep, second is waiting for response from the server, and third is doing something
18:30:42*v17d quit (Remote host closed the connection)
18:32:23FromGitter<TiberiumN> couven92: what can be the reason of this? https://gist.github.com/TiberiumN/378640af09297cc1c4aae1f7db7f847a
18:32:33FromGitter<TiberiumN> C:\Users\Tiberium\Nim>git branch ⏎ ⏎ 1) niminst-android
18:32:52*v17d joined #nim
18:32:56FromGitter<TiberiumN> so i do koch csources -d:release and it fails on compiling android csources
18:33:00couven92you have to boot nim, since the nim version you are using probalby doesn't know --os:android yet
18:33:07FromGitter<TiberiumN> ah
18:34:19demi-TiberiumN, so having one sleep won't impact the rest?
18:35:15FromGitter<TiberiumN> yes
18:35:19*v17d quit (Remote host closed the connection)
18:35:20FromGitter<TiberiumN> if you use sleepAsync
18:35:23FromGitter<TiberiumN> like
18:35:27FromGitter<TiberiumN> "await sleepAsync(5000)"
18:35:39FromGitter<TiberiumN> this proc would sleep 5 seconds, and other async procs can still do things
18:36:21*Vladar joined #nim
18:36:44*v17d joined #nim
18:37:45couven92Araq, @TiberiumN, this should probably have been spotted sooner, right? https://github.com/nim-lang/Nim/pull/6189
18:38:48*yglukhov joined #nim
18:40:59Araqcorrect, good catch
18:43:29*haha_ quit (Quit: haha_)
18:44:02*haha joined #nim
18:44:26*haha is now known as Guest86037
18:45:25Araqother failures are
18:45:36Araqa) socket handling problems (not sure why)
18:45:50Araqb) Nim's VM not good enough for the 32bit targets
18:47:36couven92any idea why coro fails?
18:49:09couven92that one look serious as it shows nim actually crashing... right? `reNimcCrash` means a hard nim crash?
18:49:45FromGitter<TiberiumN> well, I've used my async app on android, and it worked :)
18:50:00FromGitter<TiberiumN> more than one month ago
18:50:56AraqreNimcCrash can also mean some other error (sorry ;-) )
18:51:16Araqit's nothing to be overly concerned about in comparison to other failing tests
18:54:03couven92okay... Araq, I have posted an update in https://github.com/nim-lang/Nim/pull/5772#issuecomment-320463145, it sounds as the other failing tests seem to be more general and not necessarily exclusive to Anroid, so a this point we can consider PR 5772 to be ready for merge... I have also brought it up to speed with origin/devel now... :)
18:55:10couven92I'll have a look at the IPv6 netdial stuff... because that's where the error occurs... maybe Android doesn't like IPv6? :O
18:56:55*yglukhov quit (Remote host closed the connection)
18:58:28FromGitter<TiberiumN> also, after we merge this repo - we can add nim to termux-packages :)
18:58:55couven92@TiberiumN, oh, yes we can! :) I hadn't considered that actually :P
18:59:26FromGitter<TiberiumN> https://github.com/termux/termux-packages
19:00:22FromGitter<TiberiumN> where are "csources" is located after I've done "koch csources -d:release" ?
19:00:30FromGitter<TiberiumN> *where csources are located
19:00:32couven92build/
19:01:05couven92so I just run `tar -czvf csources.tar.gz build` from the repo root to create csources to scp to my phone
19:03:07couven92Araq, this might be the reason for the netdial failure: https://github.com/couven92/Nim/blob/niminst-android/lib/pure/nativesockets.nim#L236
19:03:17couven92probably need to add Android there as well...
19:03:20*v17d quit (Ping timeout: 260 seconds)
19:04:29*Ven joined #nim
19:05:08*Ven is now known as Guest52379
19:06:40*Trustable quit (Remote host closed the connection)
19:08:43couven92or actually no... it returns ENOENT... which would suggest Android cannot resolve ::1 to localhost?
19:08:54FromGitter<TiberiumN> probably
19:09:34*Trustable joined #nim
19:09:50couven92Hmm... let's try "[::1]" :P
19:13:23couven92aha: Additional info: Invalid value for ai_flags [OSError]
19:13:53couven92okay... so Android, like OpenBSD and NetBSD does not support AI_V4MAPPED
19:14:50*v17d joined #nim
19:15:14*Guest86037 quit (Quit: Guest86037)
19:15:23couven92so as stated in https://github.com/couven92/Nim/blob/niminst-android/lib/pure/nativesockets.nim#L234 Android seems to behave like OpenBSD, defining AI_V4MAPPED, but not supporting it :P
19:17:49FromGitter<TiberiumN> hmm, I have an issue compiling csources in termux
19:18:09couven92okay, what does it say?
19:19:06FromGitter<TiberiumN> https://gist.github.com/TiberiumN/08e46496dd12e09df9f4a4b4f4d2b84a
19:19:25FromGitter<TiberiumN> maybe I need some libraries? i've installed libandroid-glob and libandroidglob-dev
19:19:42couven92that's correct... (I think
19:20:26couven92hmmm... that's during the linking, right?
19:20:34FromGitter<TiberiumN> yeah, probably
19:20:52couven92hmm... haven't hit that issue before...
19:21:39couven92@TiberiumN, can you run `sh build.sh --cpu arm --os android` to force 32-bit android?
19:21:53couven92just as a try?
19:22:12FromGitter<TiberiumN> Nim and C compiler disagree on target architecture :(
19:22:23couven92ah! that's good! :)
19:22:26FromGitter<TiberiumN> my phone is arm8
19:22:35FromGitter<TiberiumN> aarch64 as reported by termux
19:23:13couven92yeah... Hmm... But it correctly detects your phone being arm64 as it prints on the second line...
19:24:50FromGitter<TiberiumN> I'll try to google a bit
19:24:57FromGitter<TiberiumN> most probably this is a termux issue
19:25:14couven92yeah... might be
19:26:21*nsf joined #nim
19:29:28FromGitter<TiberiumN> well, generally this error is (from SO): "This error means that, while linking, compiler is not able to find the definition of main() function anywhere."
19:29:41*yglukhov joined #nim
19:29:56couven92@TiberiumN just in case I forgot a package that I installed, maybe compare your `packages list-installed` to min? https://gist.github.com/couven92/57cad011f3383b5ea09279217cc59602
19:30:02couven92s/min/mine
19:32:37FromGitter<zetashift> what is a TaintedString? I'm following the crafting interpreters book and feeling lost how Nim handles commandline params
19:32:51FromGitter<TiberiumN> well by default it's just a string
19:33:08FromGitter<TiberiumN> see here - https://nim-lang.org/docs/manual.html#taint-mode
19:33:49FromGitter<zetashift> mhmh weird; I have a proc called runFile(filename: string) and calling it with runFile(paramStr(1)) gives me an undeclared identifier error
19:34:00FromGitter<TiberiumN> did you import "os" ?
19:34:02FromGitter<zetashift> wait undeclared routine*
19:34:03FromGitter<zetashift> yea
19:34:23FromGitter<TiberiumN> can you post full source to gist?
19:34:30FromGitter<TiberiumN> or maybe your runFile is declared after it's used?
19:34:40FromGitter<zetashift> oh yeah! it is haha
19:34:58FromGitter<TiberiumN> well nim will add support for declaring procs before they're used
19:35:00FromGitter<TiberiumN> for simple cases
19:35:06FromGitter<TiberiumN> you can already do that with latest devel
19:35:11FromGitter<TiberiumN> {.reorder: on.}
19:35:12FromGitter<zetashift> yea I read that a few days ago in the chat
19:35:24FromGitter<zetashift> maybe that's why I was typing in auto-pilot
19:35:50*dankrad quit (Ping timeout: 240 seconds)
19:36:27*enthus1ast- quit (Ping timeout: 240 seconds)
19:38:09*dankrad joined #nim
19:42:03*Jesin quit (Quit: Leaving)
19:42:53FromGitter<TiberiumN> couven92: hmm, I see some sections in build.sh like this: ⏎ android) ⏎ case $mycpu in ⏎ i386) [https://gitter.im/nim-lang/Nim?at=59861fbcc101bc4e3af0075c]
19:43:00FromGitter<TiberiumN> and in this "case" statement there's no arm64
19:43:16FromGitter<TiberiumN> only i386, amd64, powerpc64, and arm
19:43:18FromGitter<TiberiumN> not arm64
19:43:19couven92hmm... that's weird
19:43:27*enthus1ast- joined #nim
19:43:32FromGitter<TiberiumN> on line 8119
19:44:15FromGitter<TiberiumN> or maybe I'm mistaken and I don't know how build.sh works :)
19:45:07FromGitter<TiberiumN> well, yeah, it has compile statements
19:45:14*Sentreen quit (Quit: WeeChat 1.6)
19:45:14FromGitter<TiberiumN> on line 3109
19:46:16*Jesin joined #nim
19:46:24FromGitter<TiberiumN> i'll try to copy these statements
19:46:25couven92@TiberiumN here's where it detects arm64: https://github.com/couven92/Nim/blob/niminst-android/tools/niminst/buildsh.tmpl#L167
19:46:28FromGitter<TiberiumN> and run them manually
19:48:52couven92no @TiberiumN, you're right! look at line 8415 in build.sh
19:49:05couven92it's empty! that's bad! :(
19:50:37couven92Araq, you got any ideas why niminst doesn't generate any compile statements for arm64, but does create some for arm?
19:51:37*Vladar quit (Remote host closed the connection)
19:52:09FromGitter<TiberiumN> yes it works
19:52:12FromGitter<TiberiumN> it's compiling right now
19:52:18FromGitter<TiberiumN> if I copy compile statements myself
19:52:21FromGitter<TiberiumN> from build.sh
19:52:34FromGitter<TiberiumN> from line 3109
19:53:02FromGitter<TiberiumN> so I've copied build.sh body (before case statements), and copied commands to compile nim for arm64
19:53:34FromGitter<TiberiumN> so maybe build.sh generates them in wrong place?
19:54:16couven92@TiberiumN, problem is: build.sh is auto-generates by a tool called niminst... And I don't remember what trick I did to get it to add android arm compilation :P
19:55:32couven92I'll have to look through the git commits of niminst-android... fairly early... I check... two secs...
19:55:38Araqcouven92: sorry, what?
19:56:02couven92niminst does not create any CC instructions for android/arm64
19:56:06FromGitter<TiberiumN> build.sh detects my arm64, but doesn't compile it, and just tries to link nim executable right away
19:57:05FromGitter<TiberiumN> with some odd command "gcc -o bin/nim -lrt -landroid-glob -ldl -lm -lrt -landroid-glob"
19:57:09FromGitter<TiberiumN> without compiling any C sources
19:57:10couven92Ah!!!! found it! :)
19:57:14FromGitter<TiberiumN> yes?!
19:57:24couven92https://github.com/nim-lang/Nim/pull/5772/files#diff-70ac71b30cf97a53a16048ee73297c73R17
19:57:33couven92we need to add arm64 there
19:57:38couven92okay, that's easy :)
19:57:38FromGitter<TiberiumN> ahh!
19:57:59*tankfeeder left #nim (#nim)
19:58:02FromGitter<TiberiumN> anyway I've compiled nim already :)
19:58:13FromGitter<TiberiumN> but I'll test it after you push
19:58:35FromGitter<TiberiumN> so I think after arm64 change this pull request is good to go?
19:59:03couven92should be, yes :P at least good enough that you can test it and then we can compare amrv7 with armv8
20:00:19couven92@TiberiumN, pushed
20:00:28FromGitter<TiberiumN> ok
20:01:37FromGitter<TiberiumN> I'll test it right now (after I regenerate csources)
20:01:45couven92:+1:
20:03:44FromGitter<TiberiumN> ah also
20:03:48FromGitter<TiberiumN> don't forget to add x64 arch!
20:03:52FromGitter<TiberiumN> oh sorry
20:03:53FromGitter<TiberiumN> i mean i386
20:03:57FromGitter<TiberiumN> there's some androids with i386 :)
20:04:07couven92shit, true... okay, I'll do that :P
20:04:26couven92Have I heard about amd64 android devices as well?
20:05:51FromGitter<TiberiumN> hmm I don't know if I'm corrent, but there's definitely i386 androids
20:05:58FromGitter<TiberiumN> but I don't know if termux supports them
20:06:14couven92too late, added already! :D
20:06:36FromGitter<TiberiumN> we need to find someone with i386 android phone/tablet
20:06:47couven92or just run on emulator
20:06:56FromGitter<TiberiumN> but anyway, arm and arm64 works - they are main platforms for android
20:07:31couven92so build.sh on your phone worked?
20:07:41FromGitter<TiberiumN> i didn't transfer it to the phone yet :)
20:08:49*haha joined #nim
20:09:13*haha is now known as Guest18395
20:09:24couven92Ha! I just fixed netdial issue as well! :) That elimates another 4 failures! No we're down to 19 / 1478! :)
20:09:56*Trustable quit (Remote host closed the connection)
20:10:42FromGitter<TiberiumN> also android x64 would be useful for someone with android installed on a laptop/pc
20:10:46FromGitter<Varriount> Someone might want to post a comment here: https://news.ycombinator.com/item?id=14934900
20:11:16FromGitter<TiberiumN> "But if you do wish to minimize pause times at the expense of everything else, then by all means, check out the Go GC."
20:11:59FromGitter<TiberiumN> couven92: yes, it works now!
20:12:24*Guest18395 quit (Client Quit)
20:12:48couven92@TiberiumN, great! :)
20:14:03*haha_ joined #nim
20:21:38FromGitter<TiberiumN> couven92: I've also found this statement on SO: "Yes, some differences to linux are expected. Even though Android runs on a Linux kernel, the libc, bionic, is pretty much based on BSD (some parts of it is from a pretty old version as well, although that has been brought up to date recently)."
20:21:43FromGitter<TiberiumN> about ipv6 stuff
20:21:50FromGitter<TiberiumN> https://stackoverflow.com/questions/39674147/getaddrinfo-on-android-returning-error-eai-badflags
20:21:56*Guest52379 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:22:02couven92yeah, I know... I writing that up right now :)
20:22:21FromGitter<TiberiumN> yay, I've also booted nim from your main nim repo on my phone :)
20:23:04couven92@TiberiumN, install tmux on your phone (yes tmux on termux) and run testament in a detachable terminal :)
20:23:20FromGitter<TiberiumN> how can I run testament?
20:23:22FromGitter<TiberiumN> I forgot :)
20:23:35FromGitter<TiberiumN> but for stuff like this I use screen, because I didn't use tmux yet :)
20:23:49couven92okay, that works :)
20:23:52couven92Testament:
20:23:59couven92`nim c --taintMode:on -d:nimCoroutines tests/testament/tester`
20:24:08couven92`tests/testament/tester --pedantic all -d:nimCoroutines`
20:24:46couven92copied from .travis.yml the file the GitHub CI runs for testing :)
20:28:03*Ven joined #nim
20:28:26*Ven is now known as Guest75975
20:28:44FromGitter<TiberiumN> what libraries I need for it? sqlite3, what else?
20:29:26couven92sqlite3 should be sufficient
20:29:33FromGitter<TiberiumN> ok, i've already started it
20:29:47couven92great, it will take some time! :P
20:29:55FromGitter<TiberiumN> yeah, I know
20:30:01FromGitter<TiberiumN> sadly it's not multithreaded :(
20:30:07FromGitter<TiberiumN> because I have 8 cores in my phone
20:30:28couven92outch, yeah that's a waste :)
20:31:31FromGitter<TiberiumN> even on my pc I have only four (i5 without HT)
20:32:14couven92yeah, same here... though my old HTC only has two I think...
20:32:35couven92I'm also running a 4th gen i5
20:34:41FromGitter<TiberiumN> how much time did it take to run testament?
20:35:17couven92on my phone... I think about 40 minutes?
20:35:44Araqwell can we get an CI thing out of this somehow?
20:36:46couven92Araq, hmm... only if we found a CI-provider that does Android and has termux installed...
20:37:12couven92Or if we put a phone onto the network and run a custom GitHub CI-service on that to run tests
20:37:29couven92Huh... I have an old HTC Desire HD lying around...
20:37:53*couven92 realized that is a terrible idea... :O
20:38:07FromGitter<TiberiumN> hmm
20:38:11FromGitter<TiberiumN> https://circleci.com/docs/1.0/android/ ?
20:38:36FromGitter<TiberiumN> it has android emulator
20:38:48couven92@TiberiumN, actually I just compares timestamps between the first and last test I ran: difference: 1h 26' 33''
20:39:10FromGitter<TiberiumN> oh
20:39:28FromGitter<TiberiumN> well ok, i have time :)
20:39:43FromGitter<TiberiumN> and it probably should be faster on arm64
20:40:00couven92hope dies last, it seems! :P
20:40:05Araqwill merge once tests are green, everything looks fine now
20:42:13couven92AppVeyor is slow... all CI runs are only queued, not even started
20:53:26*Sentreen joined #nim
20:58:33FromGitter<TiberiumN> also my little observation: searching "termux android-glob" in google - first result is http://stisa.space/articles/compile-nim-on-android/
20:58:55couven92nice! :D
21:00:26couven92@stisa maybe you should update you article to reflect #5772 ?
21:00:33couven92meybe he's around! :P
21:02:54FromGitter<TiberiumN> couven92: also, when testament ends - where results will be located?
21:03:10couven92repo root, testament.db
21:04:49couven92if you send me your testament.db I can put up another testresults.html for you... laternatively you can clone my testament branch from GitHub and compile testament there, and then run `tests/testament/tester html` to produce tesresults.html like the one hosted on my server
21:04:51FromGitter<TiberiumN> so I can just upload it and give you the link?
21:05:21couven92yup, the file isn't that big :)
21:05:33couven92The HTML though is huge! :P
21:07:19FromGitter<stisa> couven92 I'll try it out and update the post tomorrow if I get some time, that post is fairly out of date anyway
21:07:29couven92Araq, I have a TFS server that supports running CI from GitHub repos... And it does have a crossplatform build agent... But I haven't yet finished my investigations on compiling .NET Core on Android (I am playing with that, but it will take some time), so I can't really compile dotnet for Android yet... else it would actually be farily simple to run a build agent on my old HTC Desire HS :)
21:10:03couven92@stisa, Nice! Thanks BTW for the initial work on this... I based most of the initial stdlib tweaking from you posts and comments here and there! Else I wouldn't even have known where to start! :)
21:11:36FromGitter<TiberiumN> why not circle ci?
21:12:04FromGitter<TiberiumN> we can use adb shell after installing termux
21:13:09couven92@TiberiumN, haven't tested that yet... Ideally I'd like to set up a complete build chain, including gettin clang for Android from somewhere outside Termux...
21:13:45couven92And then using ONLY adb shell for everything... But that build chain is still some headaches away, I'd say
21:14:03FromGitter<TiberiumN> also circleci have 2 hours time limit (maybe this is enough)
21:14:50FromGitter<TiberiumN> yes, compiling nim without termux would be more interesting, but it would be way harder
21:14:54couven92yeah... if we get it working at all, time is not really the issue, I'd happily turn off some tests if it run automagically anyways
21:15:44FromGitter<TiberiumN> but you'll need to compile gcc or clang for arm and arm64
21:16:16couven92yup... either cross compile or place it somewhere on the phone where you can use it for adb shell...
21:17:07couven92cross-compiling from linux would probably be fairly easy as the NDK guides explain that fairly thoroughly
21:17:16FromGitter<TiberiumN> but it's long
21:17:26FromGitter<TiberiumN> installing termux is faster :)
21:17:26couven92yup
21:17:47FromGitter<TiberiumN> also termux is open-source
21:18:10FromGitter<TiberiumN> so we can make some "nim compiler" android app
21:18:12*Sentreen quit (Ping timeout: 260 seconds)
21:18:33couven92we could! that would actually be the other way to go! :)
21:19:23couven92But ideally, I'd like to get the nim compiler binary self-bootstrapping on its own without termux first and then write a GUI in Nim for the Nim compiler app! ;)
21:20:04FromGitter<TiberiumN> wat
21:20:07FromGitter<TiberiumN> lol :)
21:20:16couven92Dream BIG! :D
21:20:55couven92come-on! that would be cool, though!
21:21:10couven92And probably quite performant! :D
21:21:22couven92(since it would be native)
21:22:11*rokups quit (Quit: Connection closed for inactivity)
21:22:16*Sentreen joined #nim
21:22:27*Sentreen quit (Client Quit)
21:23:19*yglukhov quit (Remote host closed the connection)
21:24:13couven92oh Araq, actually we just found an unexpected error: Android does not support amd64! It seems
21:24:55Araqso what? it only support ARM, yes
21:25:14couven92and arm64 and i386
21:25:46couven92but I got greedy and just added amd64 to installer.ini without thinking about it... :P well, that's what CI is for, right?
21:28:22couven92huh, I actually wanted to play some Civ V today... didn't happen, Nim on Android is way too much fun! :P
21:33:03*Guest75975 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:35:09FromGitter<TiberiumN> termux is fully native :(
21:35:11FromGitter<TiberiumN> :)
21:35:20FromGitter<TiberiumN> it's just a wrappee
21:35:22FromGitter<TiberiumN> wrapper
21:35:35couven92Huh, cool... let's steal his build-chain then! :D
21:35:37FromGitter<TiberiumN> with package manager and libraries
21:36:49FromGitter<singularperturbation> Do Travis CI's instances that we use have multiple cores? I have a dumb idea for running testament "in parallel" so that tests finish more quickly by spawning testament instances that run tests by category
21:37:48FromGitter<singularperturbation> got it running locally and have a (hacky) proof of concept https://github.com/nim-lang/Nim/pull/6190
21:37:56couven92Araq, didn't you have an explaination why testament cannot run in parallel? iirc we talked about this some time ago...
21:37:59FromGitter<singularperturbation> but it won't do any good if travis's CI instances only have one core
21:38:04FromGitter<TiberiumN> 2 corea
21:38:06FromGitter<TiberiumN> cores
21:38:59couven92Araq, BTW, CI for https://github.com/nim-lang/Nim/pull/6189 just lit up all green
21:39:08Araqwe need to disable the sqlite stuff in testament which isn't used anymore anyway
21:39:23Araqand then we can run tests easily in parallel
21:39:39couven92I use the SQLite for the HTML gen
21:40:00couven92but yeah... we could gen the HTML on the fly at runtime without the DB
21:40:03FromGitter<singularperturbation> I uh... had a... "workaround" for the sqlite stuff but it's incredibly kludgy
21:40:09Araqit's just that our CI systems wouldn't take much advantage of it
21:40:48FromGitter<TiberiumN> but travis has 2 cores
21:40:48*rational joined #nim
21:41:31FromGitter<TiberiumN> and appveyor too :(
21:41:34FromGitter<TiberiumN> :)
21:41:47Araqplus the tests are mostly IO bound
21:42:08Araqcould mean we can run many more in parallel than number of cores
21:42:21Araqor could mean we can't, not sure
21:42:55FromGitter<TiberiumN> also about circleci
21:42:57FromGitter<TiberiumN> We offer a total of four free linux containers ($2400 annual value) for open-source projects. Simply keeping your project public will enable this for you!
21:43:11FromGitter<TiberiumN> this is that circle ci says
21:44:35FromGitter<TiberiumN> it has 2 cores too
21:44:52FromGitter<TiberiumN> but you can run 4 machines at once
21:45:25FromGitter<TiberiumN> https://circleci.com/pricing/
21:48:55couven92@TiberiumN, okay... CircleCI actually look REALLY good! :)
21:49:22FromGitter<singularperturbation> I use circle CI at work and it's pretty nice :)
21:49:44couven92Hmm... maybe I'll hack together a build script tomorrow... (it's close to midnight here now)
21:49:47FromGitter<TiberiumN> also you can use some circleci tools to parallelise your tests
21:50:13FromGitter<TiberiumN> When you use CircleCI’s parallelization, we run your code on multiple separate VMs. To use parallelism, you make your test runner run only a subset of tests on each VM.
21:50:18FromGitter<dom96> Writing on the forum sure is painful on mobile :)
21:50:27FromGitter<dom96> But it is doable!
21:50:38FromGitter<TiberiumN> not sure if it' possible with nim
21:50:52FromGitter<TiberiumN> dom96: yeah, it can be
21:50:54Araqspeaking of which ... can we finally get a forum update?
21:51:03couven92Araq, couldn't I just enumerate every t*.nim under tests and `testament/tester run t<file>.nim`?
21:51:05Araqit needs to use the new website's style
21:51:22couven92and let all run in simulatneous processes?
21:51:33Araqthat doesn't work really
21:51:40Araqnot all tests are equal
21:52:01Araqyou can do that per category though
21:52:06FromGitter<TiberiumN> well just split in 4 chunks anyway? 120 time limit is enough
21:52:08FromGitter<dom96> Sure. But which is more important, forum revamp or stdlib cleanup?
21:52:25FromGitter<TiberiumN> dom96: Using Nim on Microcontrollers.?
21:52:32Araqforum revamp if that actually gets done in this year :P
21:52:55Araqbut you misunderstood me anyway
21:53:00AraqI wasn't suggesting you do it
21:53:15FromGitter<TiberiumN> I have an esp8266 and I wanted to do something with it in nim
21:53:35AraqI was suggesting it to TiberiumN and couven92
21:53:48FromGitter<dom96> Araq: I see. :)
21:54:12couven92Araq, sorry what?
21:54:15FromGitter<TiberiumN> sadly it has too low ram to run a gc
21:54:25FromGitter<dom96> @TiberiumN yeah. The book originally had a tenth chapter on microcontrollers. I was mainly thinking of using an Arduino.
21:54:52FromGitter<TiberiumN> can I use any nim gc with 192kb of ram ?
21:54:59FromGitter<dom96> That's where --gc:stack comes in
21:55:09AraqTiberiumN: I'm working on making the compiler work with memory regions but I have no idea if that will reduce RAM usages
21:55:29FromGitter<dom96> Which reminds me. Federico3 used Nim on microcontrollers and complained that --gc:stack didn't work.
21:56:15FromGitter<TiberiumN> oh wait esp8266 has much less ram than 192kb
21:56:59FromGitter<TiberiumN> 64 KiB of instruction RAM, 96 KiB of data RAM
21:57:44Araqwhat does it mean? "does not work"?
21:58:42FromGitter<dom96> Can't remember :)
21:58:47*d33pb00k-GK1wmSU joined #nim
21:59:39FromGitter<TiberiumN> couven92: https://transfer.sh/dnA1B/testament.db this is a direct link
21:59:51FromGitter<TiberiumN> but it showed much more failures
22:00:21FromGitter<TiberiumN> well can you share html after you generate it?
22:00:31couven92will do... two secs
22:00:55*d33pb00k-GK1wmSU left #nim (#nim)
22:02:23couven92@TiberiumN ah! you haven't installed nodejs on your phone, therefore, all JS tests failed :)
22:02:33couven92Hmm... I can just remove them from the DB
22:05:35FromGitter<dom96> Damn. I need to pay more attention to the forum. That crystal discussion is super interesting.
22:05:53FromGitter<dom96> And indeed. I think we need an OOP macro in the stdlib.
22:05:58Araqif you think so ...
22:06:04*Sentreen joined #nim
22:07:15FromGitter<dom96> I'll think about it some more.
22:07:41FromGitter<dom96> But it seems like one idea to attract more users.
22:08:24couven92Araq, what about my testament HTML generator upgrade? You said it was difficult to review, but all I added were binary blobs for bootstrap and jquery that don't relly need to be reviewed, right?
22:08:39Araqyeah well
22:08:54AraqI'm not gonna add binary blobs, sorry
22:09:20AraqI can see the merit in nicer HTML test results outputs
22:09:23couven92Understandable
22:09:51Araqbut this makes our repo uglier
22:10:11Araqcan't you refer to these things via some stable URL instead?
22:10:33AraqI heard there are now services that provide minified JS libs and when they die, the internet collapses
22:10:34FromGitter<dom96> Use a CDN.
22:10:45FromGitter<dom96> Cdnjs.com
22:10:53Araqah yeah, CDN was the name
22:10:54couven92Yeah, I did that originally, that's where the blobs come from
22:11:11Araqhuh? and some old version of Araq refused?
22:11:26couven92But, then you'd actually need an internet connection on the device where you display the testament HTML
22:11:56*haha_ quit (Quit: haha_)
22:12:02couven92If that's not a concern, then I'll remove the inling immediately and put the CDN link in instead!
22:12:18Araqthat's fine, the contents are visible either way, right?
22:12:26FromGitter<TiberiumN> maybe use google cdn?
22:12:27couven92Araq, yes!
22:12:31Araqthat's how websites work, gradual failures
22:12:46Araqer
22:12:54Araqgraceful failures
22:12:59FromGitter<TiberiumN> https://developers.google.com/speed/libraries/
22:13:06couven92yes, okay... will modify my PR and remove the inlined sources and put CDN in instead
22:13:10couven92BTW, @TiberiumN http://thnetii.td.org.uit.no/testament-results-TiberiumN.html
22:13:37Araqgreat
22:13:42couven92I stripped the failures against the JS category, preventing you from having to run testament again with nodejs installed
22:14:03Araqthat would be another testament patch then
22:14:16Araqshould be easy enough to do
22:14:56couven92Araq, I'll just revert my commits in PR #6058 I have already put the CDN links in there in aticipation
22:14:57couven92:)
22:16:35*Matthias247 quit (Read error: Connection reset by peer)
22:19:32Araqso where is the android PR again?
22:20:10couven92https://github.com/nim-lang/Nim/pull/5772, but with the merge you just did, I have to merge the tshr.nim test again :P sorry
22:21:16Araqoh, sorry about that
22:21:41couven92np, should have thought about that myself...
22:23:15couven92AppVeyor is lagging behin anyways, so if you're waiting for all green it's probably best to offset that for tomorrow instead (I try to behave and push anything anymore :P )
22:23:26couven92*not push anything
22:24:03couven92Travis is happy though, that merge from tshr should not fuck up anything
22:25:47Araqyeah, agreed
22:26:04Xewhat does `koch distrohelper` do?
22:26:57Araqit builds the install.sh script as the foundation for packagers
22:29:38Araqit helps your linux distribution
22:37:16*Sentreen quit (Quit: WeeChat 1.6)
22:38:27*Sentreen joined #nim
22:41:14*eizua joined #nim
22:44:40*eizua quit (Remote host closed the connection)
22:52:40Elronndwoah
22:52:47Elronndthe autogenerated c code is fucking weird
22:53:06ElronndI expected it would look at least a little bit similar to the regular nim code...and it is, but the names are all extermely mangled
22:53:10Elronnd*extremel
22:53:12Elronndy
22:55:20couven92okay Araq, now the Testament HTML gen uses CDN for jQuery and Bootstrap, I squashed and rewrote history to purge all record from the blob ever being in the repo
22:55:32couven92https://github.com/nim-lang/Nim/pull/6058
23:00:10FromGitter<TiberiumN> does .. iterator accepts only ordinal types?
23:01:05Araqelronnd: local vars mostly stay untouched and the weird stuff is just a stable checksum because C doesn't support overloading or namespaces or any feature invented after 1940
23:02:34FromGitter<TiberiumN> because if so, error messages. lcan be improved like with iterator `..`S, T: Ordinal (a: S; b: T): T
23:07:18*Sentreen quit (Quit: WeeChat 1.6)
23:09:53*Sentreen joined #nim
23:11:21*nsf quit (Quit: WeeChat 1.9)
23:12:32FromGitter<zacharycarter> is there any way to view 2017 survey results yet?
23:12:51FromGitter<zacharycarter> I'm interested in the gc topic and how that vote went mainly
23:19:39*endragor joined #nim
23:23:43Araqcan tell you that the majority wants the GC to stay ;-)
23:23:48*endragor quit (Ping timeout: 240 seconds)
23:24:16FromGitter<zacharycarter> Araq: is the GC staying and one of the other options being implemented also possible?
23:24:47Elronndis there any chance of getting suggestions, like clang has? So for instance instead of "Error: undeclared identifier: 'whateve'", "Error: undeclared identifier: 'whateve' (maybe you meant 'whatever'?)"
23:24:49FromGitter<zacharycarter> I guess it wouldn't be
23:26:12FromGitter<zacharycarter> thank you for the answer though
23:26:46FromGitter<zacharycarter> I'm kind of actually okay with the gc with all the options it has
23:27:18Araqreplacing the GC with "reaps" in the compiler is an on going research project ;-)
23:27:36FromGitter<zacharycarter> I don't even know what reaps is but I'm now going to google it
23:27:44FromGitter<zacharycarter> thank for this info
23:28:13AraqIMO it fits Nim somewhat better, better interop with other languages, more control, faster (slightly less safe :P )
23:28:43*rational quit (Remote host closed the connection)
23:28:52FromGitter<zacharycarter> I like the sound of it
23:29:21FromGitter<TiberiumN> what is it?
23:29:25Araqbut it's a freaking pita to design ;-)
23:29:26FromGitter<singularperturbation> https://people.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf
23:29:30FromGitter<singularperturbation> I think?
23:29:41Araqyup, that one
23:29:45FromGitter<singularperturbation> "We present a generalization of general-purpose and region-based allocators that we call reaps"
23:33:35Araqelronnd: nah, we encourage users to try 'nimsuggest' instead
23:33:57FromGitter<TiberiumN> :)
23:34:06ElronndAraq: ok
23:35:23FromGitter<TiberiumN> araq: reaps is currently just a design concept?
23:36:43Araqha, I wish. since my designs went nowhere, I'm patching my compiler instead
23:36:54Araqto see where it leads me
23:37:39Araqit's a complex piece of software that uses dynamic memory everywhere so whatever comes out of it is immediately useful... I hope
23:38:14Araqthe design concept can then be a followup
23:42:59FromGitter<zacharycarter> I'm going to add nuklear to zengine now
23:43:06FromGitter<zacharycarter> and then start working on some examples I guess
23:49:44Elronndhow can I call a function like splitLines on a Future[string]?
23:52:14FromGitter<TiberiumN> well
23:52:29FromGitter<TiberiumN> firstly you need to await a result from the async proc
23:52:55FromGitter<TiberiumN> "splitLines(await myProc())
23:53:04Elronndohhhh
23:53:07Elronndthat makes sense
23:53:21ElronndI had been doing foo = await myProc.splitLines
23:54:08FromGitter<TiberiumN> well you're trying to splitLined and after that await a result from it