<< 06-05-2017 >>

00:06:00FromGitter<Varriount> rb66: Memslices can only be done with double pointers to strings/sequences
00:06:18*chemist69 quit (Ping timeout: 264 seconds)
00:06:23FromGitter<Varriount> Er, references
00:07:20*rb66 quit (Quit: rb66)
00:10:45*chemist69 joined #nim
00:16:50FromGitter<barcharcraz> is there a good way to print the result of a gorge command at compile time?
00:16:56FromGitter<barcharcraz> gorgeEx that is
00:26:11*couven92 quit (Quit: Client Disconnecting)
00:43:10*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:55:38*icebattle quit (Quit: leaving)
00:56:32*Kingsquee joined #nim
01:02:47*rb66 joined #nim
01:04:34rb66Interesting. It’s just that I noticed that there are a lot of string utility functions that can be directly applied to memslices (or c-strings) without having to allocate new memory
01:05:39rb66It’s probably a niche request, but definitely worthy of consideration.
01:06:16rb66Then again, it’s probably opening up a new can of worms
01:06:44*chemist69 quit (Ping timeout: 240 seconds)
01:15:15*zachcarter quit (Quit: zachcarter)
01:20:38*chemist69 joined #nim
01:29:19*jsgrant_om quit (Ping timeout: 260 seconds)
01:30:36*bjz joined #nim
01:37:44*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:37:59*rb66 quit (Quit: rb66)
01:40:52*bjz joined #nim
01:45:18*def-pri-pub quit (Quit: leaving)
02:05:57*jsgrant_om joined #nim
02:22:05FromGitter<Varriount> rb66: Strings and sequences are references to dynamically allocated arrays (plus some other data) . Making multiple references to them can be very tricky
02:24:16FromGitter<Varriount> Since when they are resized, the memory is usually moved
02:52:07*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
02:57:01*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:07:49*chemist69 quit (Ping timeout: 258 seconds)
03:10:30*zachcarter joined #nim
03:11:04*chemist69 joined #nim
03:11:18*yglukhov joined #nim
03:15:50*yglukhov quit (Ping timeout: 268 seconds)
03:27:08*jsgrant_om quit (Ping timeout: 260 seconds)
03:31:02*bjz joined #nim
03:41:00ftsfhi, where can I find the compiler settings for -d:debug ?
03:41:21ftsfi'm getting very different behaviour between release and debug, but i'm not sure which change is making the difference
03:41:27ftsfmaybe if i figure that out i can narrow down the problem
03:45:35zachcarterasserts are removed with -d:release
03:45:38zachcarterthat’s one thing I know
03:45:43ftsfzachcarter, oh
03:45:54ftsfhmm well they're not hit in release mode so i don't think that's it
03:45:58ftsfbut that's good to know
03:56:31ftsfso weird... in debug mode the second point in my sequence is being set to 0,0...
04:15:17ftsfcannot evaluate at compile time: self / method update(self: ShipDesigner, dt: float) =
04:15:18ftsfwhat?
04:19:38ftsfstrangely it just appeared when i changed something in another module
04:19:41*dddddd quit (Remote host closed the connection)
04:24:01FromGitter<Varriount> ftsf: Look in the configuration files
04:24:06FromGitter<Varriount> nim.cfg
04:24:57ftsfVarriount, I did, nothing defined for debug that I can see
04:27:10ftsfahh but maybe the options in release
04:31:51ftsfwhoa!
04:31:55ftsfit was dead code elimination
04:32:17ftsfwhen that's turned off my code behaves differently
04:33:21ftsf(well it behaves incorrectly)
04:33:56ftsfhmm maybe it's choosing the wrong code path in the generic?
04:46:04FromGitter<Varriount> ftsf: Look foot any open issues regarding generics and deaf code elimination
04:49:37ftsfcan't see anything, will try and make a small test case
05:01:54ftsfhmm seems like it's an issue with the glm module
05:02:23ftsftook the same code that fails and changed it to use basic2d and it works
05:04:29*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:05:29ftsfcombination of dead code elim off + using glm breaks.
05:12:54*yglukhov joined #nim
05:14:35ftsfhttps://gist.github.com/ftsf/3f4e7c5e234a4cacdbb043fa28a88a87
05:15:12ftsftry compiling with deadCodeElim:on and off
05:15:19ftsfworks with on and fails with off
05:17:04*yglukhov quit (Ping timeout: 240 seconds)
06:13:09*Trustable joined #nim
06:24:28*chemist69 quit (Ping timeout: 260 seconds)
06:28:43*chemist69 joined #nim
07:15:12*yglukhov joined #nim
07:20:03*yglukhov quit (Ping timeout: 268 seconds)
07:39:34*zachcarter quit (Quit: zachcarter)
07:46:14*tankfeeder joined #nim
07:59:37*tankfeeder quit (Ping timeout: 240 seconds)
08:11:16*yglukhov joined #nim
08:12:51*yglukhov quit (Remote host closed the connection)
08:22:35*Arrrr joined #nim
08:27:45*gokr joined #nim
08:37:57*yglukhov joined #nim
09:07:00*gokr quit (Ping timeout: 258 seconds)
09:29:06*peted quit (Quit: WeeChat 1.4)
09:33:28*tankfeeder joined #nim
09:35:14*bjz quit (Ping timeout: 260 seconds)
09:36:52*bjz_ joined #nim
09:42:26*peted joined #nim
09:50:40*sz0 joined #nim
10:05:27*zachcarter joined #nim
10:15:33*Matthias247 joined #nim
10:22:32*DebugDude12 joined #nim
10:24:14DebugDude12How can i call a private function from a template in the same module? Kinda like this, but for procs: https://nim-lang.org/docs/manual.html#templates-symbol-binding-in-templates
10:40:41*Tiberium joined #nim
10:44:47*DebugDude12 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:50:59*krux02 joined #nim
11:00:25dom96DebugDude12: bind procName (maybe?)
11:00:57dom96Just released choosenim! Testing very much welcome https://github.com/dom96/choosenim
11:01:40*kunev quit (Ping timeout: 260 seconds)
11:02:35*Snircle joined #nim
11:04:12*kunev joined #nim
11:11:12*krux02 quit (Remote host closed the connection)
11:13:03Tiberiumdom96, will test it now (manjaro based on arch)
11:15:12Tiberiumdom96, installed successfully, works good, now downloading devel with it :)
11:15:19dom96Tiberium: yay, thanks!
11:15:26dom96Did it also give you a warning about a missing C compiler?
11:15:32dom96It did on my Linux server
11:15:39Tiberiumdom96, ehn, not for me
11:15:45dom96hrm, weird.
11:16:08dom96oh well, not a big deal, it's just a warning anyway
11:16:08Tiberiumonly some warnings because I had custom nim build already in my path
11:16:38Tiberiumif everything is good, I'll delete this custom folder :) because it's easier to use some programs like "choosenim" instead of manual installing
11:17:08dom96cool yeah, you can also switch to your custom folder so you can keep it if you'd like
11:17:18dom96See --help for some examples
11:17:34Tiberiumdom96, so choosenim makes a symlink in .nimble/bin ?
11:17:48Tiberiumto nim version that is chosen
11:18:00Tiberiumneat, installed devel without any warnings
11:18:12Tiberium(only "Building from latest C sources" warning)
11:18:29dom96sorta, it creates a proxy exe that acts like a symlink
11:19:04dom96It does some magic like reading ~/.choosenim/current
11:19:50Tiberiumdom96, also *my suggesting* maybe we can make a shorter command name than "choosenim" ?
11:20:38dom96like what?
11:20:46Araq'picknim'
11:21:14Tiberiumdom96, also, you can add git commit hash check for updating nim devel via choosenim
11:21:56Tiberiumbecause now I've tried "choosenim update devel" and it build latest Nim again
11:23:33Tiberiumdom96, wow, it installs mingw on windows automatically? that's very good
11:23:44dom96yep, and the DLLs
11:25:43dom96I've already renamed it once (it was called picknim) and I won't be renaming it again unless the new name is significantly shorter
11:28:06Araqlen("picknim") / len("choosenim") --> 77%
11:28:31*kunev quit (Ping timeout: 240 seconds)
11:28:39Araqsavings of 20% is significant by any statistic measure I can come up with
11:29:06demi-lol
11:29:48FromGitter<TiberiumN> Anyway probably I would do an alias for
11:30:03FromGitter<TiberiumN> Just for me- like "can"
11:30:18FromGitter<TiberiumN> cn, stupid auto correction
11:30:36FromGitter<TiberiumN> Also gitter mobile client sucks
11:31:01dom96Araq: I doubt the difference in time it takes to type picknim vs. choosenim is significant :P
11:31:13demi-dom96: nice! congrats on the release
11:31:16dom96And indeed, make an alias if you hate typing so much.
11:31:25dom96demi-: thanks :)
11:31:29*kunev joined #nim
11:31:54Araqpicknim choosenim picknim choosenim picknim choosenim picknim choosenim picknim choosenim picknim choosenim
11:32:18AraqI typed it mutiple times now. pretty sure I can type 'picknim' faster by 23%
11:32:38demi-i'm not sure i understand the argument of command length if you are using a shell with auto-complete 
11:33:42FromGitter<Varriount> demi-: Not all shells have advanced autocomplete
11:34:04dom96Feel free to rename the exe
11:34:07demi-Varriount, hence my assertion that people should be using a good shell :P
11:34:58Araqneither name seems good at autocompletion
11:35:12Araqch
11:35:12Araqchat checknr chfn chmod chpass chsh
11:35:12Araqcheckgid chflags chgrp chown chroot
11:35:14*Ven joined #nim
11:35:24Araqpi
11:35:24Araqpic piconv pictd ping6 pip2.7
11:35:24Araqpic2graph piconv5.16 pidpersec.d pip
11:35:25*Ven is now known as Guest35758
11:35:26Araqpico piconv5.18 ping pip2
11:36:12demi-looks like `cho` would complete, whereas `pic` would not
11:36:21Araqchown?
11:36:23FromGitter<TiberiumN> chonim :D
11:36:38*Guest35758 quit (Client Quit)
11:36:45FromGitter<TiberiumN> ncho
11:37:08dom96Araq: Any other observations? You know, other than the name? -.-
11:37:14demi-nenv
11:39:01AraqI was only concerned about your "significantly shorter" statement, just say you won't rename it because you like it this way. don't pretend we have anything to say about this when we don't.
11:39:54Araqwhich is remarkable anyway because the only thing I really cared about was the 'picknim' name
11:39:54dom96I have already told you this. We had this discussion already over Skype.
11:40:50demi-Is there a way I could map a nim object to contents of a file loaded into memory. I'm wondering if there is a similar way to doing this as you would simply cast a packed struct to a memory office to get easy file mapping in C
11:41:03*tankfeeder quit (Remote host closed the connection)
11:41:09Araqdemi-: use a .packed object?
11:41:14*Ven_ joined #nim
11:41:19*tankfeeder joined #nim
11:41:41demi-so that would give me the same C style size and mapping (assuming i'm using Nim's C-types)
11:41:48Araqyes
11:41:56demi-that is awesome, thank you
11:43:02*Ven_ quit (Client Quit)
11:45:05*Tiberium quit (Remote host closed the connection)
11:45:19*Tiberium joined #nim
11:46:07*kunev quit (Ping timeout: 240 seconds)
11:48:16*kunev joined #nim
11:49:53*Tiberium quit (Remote host closed the connection)
11:50:05*Tiberium joined #nim
11:53:43Tiberiumdom96, hmm, maybe it's my problem, but it seems vscode can't find nimsuggest executable (maybe because it's a "symlink"?)
11:54:17dom96no idea how VS code looks for it
11:54:23dom96Can you execute it from the terminal?
11:54:29Tiberiumdom96, yes
11:54:40*couven92 joined #nim
11:54:47Tiberiumdom96, will find now how nim plugin looks for it
11:54:52*Matthias247 quit (Read error: Connection reset by peer)
11:57:12*tankfeeder quit (Ping timeout: 240 seconds)
11:57:14Tiberiumdom96, wow, nimsuggest exits with a sigsegv
11:58:44Tiberiumdom96, will try to find out if it's a nimsuggest problem, choosenim problem, or vscode plugin problem
11:59:00FromGitter<Varriount> @zacharycarter What editor does the playground use? Because it barely works on mobile devices
11:59:03*kunev quit (Ping timeout: 246 seconds)
11:59:20dom96Varriount: ace
11:59:25dom96Tiberium: thanks!
12:01:38*kunev joined #nim
12:02:22FromGitter<Varriount> https://github.com/ajaxorg/ace/issues/2964
12:11:34*arnetheduck joined #nim
12:16:07*kunev quit (Ping timeout: 240 seconds)
12:17:11*tankfeeder joined #nim
12:17:55*kunev joined #nim
12:21:48*tankfeeder quit (Client Quit)
12:23:48*EastByte_ quit (Quit: WeeChat 1.7)
12:25:13*EastByte joined #nim
12:25:57*Ven_ joined #nim
12:29:24*kunev quit (Ping timeout: 258 seconds)
12:31:10FromGitter<zacharycarter> dom96: do you think we should / can turn cloudflare back on?
12:31:10*kunev joined #nim
12:32:54FromGitter<zacharycarter> @Varriount hrm not sure what to do about that one
12:33:01*Ven_ quit (Ping timeout: 255 seconds)
12:33:57*Ven joined #nim
12:34:21*Ven is now known as Guest37184
12:34:58dom96zacharycarter: sure, done.
12:35:52FromGitter<Varriount> @zacharycarter Use a regular text box on mobile?
12:36:58dom96why would you even be using this on mobile?
12:37:54*pie_ joined #nim
12:38:58FromGitter<Varriount> To test out Nim snippets?
12:39:38FromGitter<Varriount> Installing Nim on android isn't straightforward
12:45:37*kunev quit (Ping timeout: 240 seconds)
12:46:46*Tiberium quit (Remote host closed the connection)
12:48:18*kunev joined #nim
12:48:37*Guest37184 quit (Ping timeout: 240 seconds)
12:49:59*Ven_ joined #nim
12:52:38AraqVarriount: why not?
12:53:24FromGitter<Varriount> Because there's no "Nim compiler" app?
12:57:01FromGitter<zacharycarter> dom96: thank you
12:58:04Araqok, so after a successful installation you'd still be complaining
13:00:24*kunev quit (Ping timeout: 240 seconds)
13:01:20*kunev joined #nim
13:01:54*Ven_ quit (Ping timeout: 240 seconds)
13:04:11*Ven_ joined #nim
13:06:32*vlad1777d joined #nim
13:17:31*kunev quit (Ping timeout: 240 seconds)
13:18:24*kunev joined #nim
13:18:37*Ven_ quit (Ping timeout: 240 seconds)
13:21:34*Ven_ joined #nim
13:29:21*kunev quit (Ping timeout: 246 seconds)
13:30:58*kunev joined #nim
13:32:31*Ven_ quit (Ping timeout: 268 seconds)
13:33:07*Ven joined #nim
13:33:32*Ven is now known as Guest45772
13:38:00*Guest45772 quit (Ping timeout: 260 seconds)
13:40:20*kunev quit (Ping timeout: 260 seconds)
13:40:22*jsgrant_om joined #nim
13:40:47*Ven_ joined #nim
13:41:13BennyElgAny beginner guide for async and await
13:41:14BennyElg?
13:42:26*kunev joined #nim
13:45:29*pie_ quit (Ping timeout: 260 seconds)
14:02:45*Ven_ quit (Ping timeout: 240 seconds)
14:03:23*Ven_ joined #nim
14:07:55*Ven_ quit (Ping timeout: 258 seconds)
14:09:58*Ven_ joined #nim
14:30:29*Ven_ quit (Read error: Connection reset by peer)
14:31:05*Ven joined #nim
14:31:29*Ven is now known as Guest38218
14:35:37*Guest38218 quit (Ping timeout: 240 seconds)
14:38:05*Ven_ joined #nim
14:42:44*Ven_ quit (Ping timeout: 245 seconds)
14:44:34*Ven_ joined #nim
14:45:00*Ven_ quit (Read error: Connection reset by peer)
14:45:36*Ven_ joined #nim
14:47:25*jsgrant_om quit (Ping timeout: 240 seconds)
14:48:15FromGitter<TiberiumN> I think no, but for me it was eventually the same as in python
15:01:05*chemist69 quit (Ping timeout: 240 seconds)
15:01:27*chemist69 joined #nim
15:03:09*pie_ joined #nim
15:12:54*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:30:07*Jesin quit (Ping timeout: 240 seconds)
15:36:20*fredrik92 joined #nim
15:38:25*couven92 quit (Ping timeout: 240 seconds)
15:45:17*Jesin joined #nim
15:50:58ArrrrMmm, {.checks:off.} wont work if code is inside a proc. Is this supposed to be a bug?
15:50:59Arrrrhttps://glot.io/snippets/eplxjmnnki
15:50:59Arrrrhttps://glot.io/snippets/eplxjzx0s6
15:51:30ArrrrI said this before, but now i have actual proofs
15:54:04*SusWombat joined #nim
15:59:53*arnetheduck quit (Ping timeout: 260 seconds)
16:05:46*PMunch joined #nim
16:09:15*adeohluwa joined #nim
16:10:42*GustavoLapasta joined #nim
16:12:24*Ven joined #nim
16:12:48*Ven is now known as Guest29528
16:19:42*fvs joined #nim
16:23:07*Guest29528 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:24:05*ludocode joined #nim
16:33:16AraqArrrr: known limitation, the compiler should flag it as invalid imo
16:36:02*Ven_ joined #nim
16:37:25*Matthias247 joined #nim
16:39:36ArrrrA big limitation though.
16:43:14Araqnot really, .checks: off is about optimization, not about changing semantics
16:43:51Araqwhen was the last time you needed optimization for a single block within a proc? yeah, I thought so.
16:46:25*nsf joined #nim
16:46:49*Tiberium joined #nim
16:47:47ArrrrI'm not sure, maybe you have a big program and you want to make a certain loop fast and retaining safety for the rest of the code.
16:55:25*GustavoLapasta quit (Quit: Leaving)
16:56:40*yglukhov quit (Remote host closed the connection)
16:58:04*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:59:56Araqmaybe you can put that loop in its own proc then
17:09:11*PMunch quit (Quit: leaving)
17:09:58Tiberiumdom96, yep, it's a nimsuggest issue
17:10:18TiberiumAraq, can I do an error log like "koch temp c", but for nimsuggest?
17:10:25Tiberiumor I just need to compile it in debug mode?
17:10:56Araqyeah, just debug mode
17:12:41*jsgrant_om joined #nim
17:13:08dom96Tiberium: interesting
17:14:12Tiberiumehm, how can I compile nimsuggest in debug mode? trying to compile it from "nimsuggest" folder fails
17:17:31Tiberiumok, will just patch koch.nim slightly
17:21:48Tiberiumok, will file an issue now
17:21:59Tiberium(and post a file which triggers an error)
17:28:46Tiberiumhttps://github.com/nim-lang/nimsuggest/issues/61
17:29:42Tiberiumyeah, I didn't include all files that are dependencies for vkapi, because it crashes nimsuggest without them
17:31:41Tiberiumif you want, I can make a zip archive of the whole project
17:34:12Arrrr"maybe you can put that loop in its own proc then" in my test this doesnt work
17:38:17TiberiumLOL, my github account is "flagged" now
17:38:21Tiberiumwtf
17:40:28ArrrrYep, i get a 404 from your profile
17:40:52TiberiumArrrr, maybe their spam-bot is too aggressive. I think I got "flagged" because of my gist - https://gist.github.com/TiberiumN/21d31dfdb84be76e5aa80d06a4ab299a
17:40:57TiberiumBTW, can you see it?
17:41:51ArrrrNop
17:42:04Tiberiumoh no, issue I reported is 404 now for everyone except me
17:42:51ArrrrI'm sorry i think i shouldn't talk to strangers. I don't want any problems with the FBI
17:43:42TiberiumAraq, dom96, this is the issue I've reported on nimsuggest repo, but my github account got flagged immediately (IDK why) - https://hastebin.com/ekaredeqas.sql
17:44:07Tiberiumlol, my profile is unflagged now
17:44:10dom96Tiberium: contact Github support
17:44:27Tiberiumdom96, They unflagged me
17:44:45dom96aren't you curious why they flagged you in the first place?
17:44:45Tiberiumeven without answering my question (I've already sent an email to support)
17:45:05Tiberiumdom96, yes I am curious, will wait for them to answer
17:45:16Tiberiumanyway, sorry for offtopic and flood - https://github.com/nim-lang/nimsuggest/issues/61
17:55:43TiberiumAbout github - "Hi Daniil, Sorry about that! Sometimes our spam-detecting practices miss the mark and need to be adjusted. I've reset your profile, so your repositories and gists should be available again, and you shouldn't see that message anymore."
17:56:06*pie_ quit (Quit: Leaving)
17:57:09*yglukhov joined #nim
18:01:31*yglukhov quit (Ping timeout: 260 seconds)
18:13:38*bungoman quit (Ping timeout: 258 seconds)
18:14:13*bungoman joined #nim
18:36:17*nsf quit (Quit: WeeChat 1.7.1)
18:44:41*jsgrant_om quit (Ping timeout: 258 seconds)
18:50:55*jsgrant_om joined #nim
18:54:16*BennyElg quit (Remote host closed the connection)
18:54:35*BennyElg joined #nim
19:29:15*yglukhov joined #nim
19:37:17*sz0 quit (Quit: Connection closed for inactivity)
19:41:40*Arrrr quit (Quit: Leaving.)
19:48:58*jsgrant_om left #nim (#nim)
19:53:30*jsgrant_om joined #nim
19:58:28*zachcarter quit (Read error: Connection reset by peer)
20:18:55*adeohluwa quit (Quit: Connection closed for inactivity)
20:26:27*nsf joined #nim
20:36:14*yglukhov quit (Read error: Connection reset by peer)
20:36:47*yglukhov joined #nim
21:01:42*GustavoLapasta joined #nim
21:05:13*yglukhov quit (Remote host closed the connection)
21:05:46*yglukhov joined #nim
21:09:54*yglukhov quit (Ping timeout: 240 seconds)
21:13:42ftsfhttps://gist.github.com/ftsf/3f4e7c5e234a4cacdbb043fa28a88a87 anyone have any idea why this doesn't work with deadCodeElim:off but works with it on?
21:21:59*Jesin quit (Quit: Leaving)
21:48:24FromGitter<Varriount> ftsf: memory corruption?
21:49:32*Trustable quit (Read error: Connection reset by peer)
21:50:09ftsfVarriount, valgrind looks good
21:50:29ftsfno sign of mem corruption
21:50:50FromGitter<Varriount> Hm. Look at the generated C code then?
21:52:13Tiberiumdoes epochTime() always gives UTC time?
21:56:09ftsfgenerated code is pretty difficult to read =\
22:07:22*brson joined #nim
22:07:31ftsfseems like it's being modified before/during return
22:07:43ftsfif i do the same operation outside a function it works
22:09:30ftsfhmm mysterious! using result instead of returns work too
22:09:53ftsfI assumed they were equivalent
22:11:41ftsfhttps://gist.github.com/ftsf/62107e4a1d5a00462ead75dc4dd96cf8 copyPoly using result works fine with deadCodeElim:off, copyPolyBroken does not. both work fine with deadCodeElim:on
22:25:04*Sembei joined #nim
22:26:48*Pisuke quit (Ping timeout: 240 seconds)
22:38:34*Kingsquee joined #nim
22:40:43*GustavoLapasta quit (Quit: Leaving)
22:58:31*nsf quit (Quit: WeeChat 1.7.1)
23:05:16*Matthias247 quit (Read error: Connection reset by peer)
23:14:32*Tiberium quit (Remote host closed the connection)
23:15:39FromGitter<barcharcraz> what's the best way to emulate dynamic scope?
23:32:47*Kingsquee quit (Excess Flood)
23:35:49*Kingsquee joined #nim
23:50:21*fredrik92 quit (Quit: Client Disconnecting)