<< 08-02-2017 >>

00:39:15*devted joined #nim
00:48:52*def-pri-pub joined #nim
00:55:44*Jesin quit (Quit: Leaving)
00:55:52*devted quit (Quit: Sleeping.)
00:56:26*devted joined #nim
01:16:37*pregressive joined #nim
01:23:48*pregressive quit (Ping timeout: 252 seconds)
01:36:50*chemist69 quit (Ping timeout: 255 seconds)
01:38:28*yglukhov joined #nim
01:40:15*chemist69 joined #nim
01:44:11*yglukhov quit (Ping timeout: 264 seconds)
02:01:56*greenlight_ left #nim (#nim)
02:02:27*xet7 quit (Quit: Leaving)
02:08:47*chemist69 quit (Ping timeout: 264 seconds)
02:09:23*def-pri-pub quit (Ping timeout: 255 seconds)
02:11:10*def-pri-pub joined #nim
02:15:05*gokr quit (Ping timeout: 255 seconds)
02:22:02*devted quit (Quit: Sleeping.)
02:22:21*chemist69 joined #nim
02:25:34*devted joined #nim
02:31:32*def-pri-pub quit (Ping timeout: 240 seconds)
02:32:42*def-pri-pub joined #nim
02:32:42*def-pri-pub quit (Changing host)
02:32:42*def-pri-pub joined #nim
02:34:06*Demos quit (Ping timeout: 240 seconds)
02:50:56*shashlick joined #nim
03:22:30*adeohluwa joined #nim
03:23:03*Jesin joined #nim
03:25:26*dashed joined #nim
03:27:14*Kingsquee joined #nim
03:36:48*carterza quit (Read error: Connection reset by peer)
03:37:09*carterza joined #nim
03:41:49*aedigix quit (Quit: disconnecting)
03:53:21*brson quit (Quit: leaving)
03:53:42*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:56:08*yglukhov joined #nim
03:59:48*devted quit (Quit: Sleeping.)
04:00:11*yglukhov quit (Ping timeout: 240 seconds)
04:22:30*krux02 quit (Remote host closed the connection)
04:23:47*adeohluwa quit (Ping timeout: 256 seconds)
04:32:18*yay quit (Quit: ZZZzzz…)
04:35:45*def-pri-pub quit (Quit: leaving)
04:38:08*smt quit (Quit: Leaving)
04:49:32*aedigix joined #nim
04:50:07*aedigix quit (Remote host closed the connection)
04:50:27*aedigix joined #nim
05:01:28*carterza quit (Quit: carterza)
06:23:18*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
06:31:26*Kingsquee joined #nim
06:32:48*nsf joined #nim
07:15:57*dashed quit (Quit: Connection closed for inactivity)
07:24:29*ftsf_ quit (Quit: :q!)
07:24:50FromGitter<vegansk> @Araq, hi. I got a strange codegen error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=589ac7c121d548df2cdef25e]
07:27:26FromGitter<vegansk> Can you point me please where I have to search it in the compiler?
07:27:58FromGitter<vegansk> The Nim's code is here: https://github.com/vegansk/nimfp/blob/master/src/fp/either.nim#L27
07:34:21FromGitter<Araq> genObjConstr in ccgexprs.nim
07:39:42FromGitter<vegansk> @Araq, thanks! One more question. What do you think about that ``setupForeignThreadGC`` must be marked as {.gcsafe.}? No it's not and there is a problem with that in our code
07:40:10Araqyeah make it happen please
07:40:27*filcuc joined #nim
07:50:56*jh32 joined #nim
07:52:27*joshbaptiste quit (Ping timeout: 258 seconds)
07:54:02*joshbaptiste joined #nim
08:00:14*chemist69 quit (Ping timeout: 255 seconds)
08:06:38*yglukhov joined #nim
08:07:45*gokr joined #nim
08:07:59*yglukhov quit (Remote host closed the connection)
08:08:13*yglukhov joined #nim
08:09:35*yglukhov quit (Remote host closed the connection)
08:10:10*yglukhov joined #nim
08:14:25*yglukhov quit (Ping timeout: 248 seconds)
08:17:42*Andris_zbx joined #nim
08:19:41FromGitter<konqoro> ok dump question, why there are no for loops with floats in nim?
08:21:26*tankfeeder joined #nim
08:23:15*dyce quit (Ping timeout: 245 seconds)
08:24:18FromGitter<vegansk> @konqoro, write iterator that will produce the sequence of floats and vouala :-)
08:25:20*yglukhov joined #nim
08:27:14FromGitter<konqoro> well I have, also used while loops, but I just wonder why it is missing
08:27:40*chemist69 joined #nim
08:27:52*couven92 joined #nim
08:28:22Araqbecause nobody needs it.
08:29:56FromGitter<konqoro> well I was doing stuff with linealg and needed it
08:30:43FromGitter<konqoro> couldn't do proc(i, j: int): float = i.float all the time
08:37:56*Vladar joined #nim
08:39:50*rokups joined #nim
08:45:00*shashlick quit (Quit: Connection closed for inactivity)
08:46:17FromGitter<endragor> linealg does plenty of very specific things and I think it makes sense for them to stay in linealg libraries. Python's stdlib doesn't have what you ask, too, but NumPy does. ⏎ https://github.com/unicredit/linear-algebra - see if this has what you need
08:51:45*dyce joined #nim
09:02:09FromGitter<konqoro> @endragor thanks I will check it out
09:02:40FromGitter<konqoro> but I am not asking to solve linear equation in stdlib, just want to iterate over floats
09:03:29*Matthias247 joined #nim
09:06:41FromGitter<endragor> sure, but iterating over floats is not a common use case
09:32:59*yglukhov quit (Remote host closed the connection)
09:33:34*yglukhov joined #nim
09:36:04*cheatfate_ joined #nim
09:36:19*Matthias247_ joined #nim
09:38:17*yglukhov quit (Ping timeout: 256 seconds)
09:40:50*SianaGea1z joined #nim
09:40:51*rektide_ joined #nim
09:40:59*literal_ joined #nim
09:41:35*Calinou_ joined #nim
09:44:17*Eyess joined #nim
09:45:48*Matthias247 quit (*.net *.split)
09:45:48*Kingsquee quit (*.net *.split)
09:45:48*Jesin quit (*.net *.split)
09:45:48*niv quit (*.net *.split)
09:45:48*cheatfate quit (*.net *.split)
09:45:48*ekarlso_ quit (*.net *.split)
09:45:48*literal quit (*.net *.split)
09:45:48*Calinou quit (*.net *.split)
09:45:48*SunDwarf quit (*.net *.split)
09:45:49*rektide quit (*.net *.split)
09:45:49*javax quit (*.net *.split)
09:45:49*SianaGearz quit (*.net *.split)
09:45:49*joebo quit (*.net *.split)
09:45:49*heinrich5991 quit (*.net *.split)
09:48:22*heinrich5991 joined #nim
09:48:28*yglukhov joined #nim
09:51:53FromGitter<vegansk> @Araq, the problem is not in genObjConstr, here is the real problem: https://github.com/nim-lang/Nim/issues/5354
09:51:55*Kingsquee joined #nim
09:52:05*joebo joined #nim
09:52:16*Jesin joined #nim
09:52:42*ekarlso_ joined #nim
09:54:14FromGitter<vegansk> When you use typedesc of the type with case field as a first parameter in UCS, you get an error
09:54:15*yglukhov quit (Remote host closed the connection)
09:54:48*yglukhov joined #nim
09:55:35*yay joined #nim
09:57:43*tankfeeder quit (Quit: Leaving)
09:58:10Araqlooks like you almost fixed it already
09:58:17Araqthe stack trace tells you where to look
09:59:47*yglukhov quit (Ping timeout: 264 seconds)
10:00:37FromGitter<vegansk> yep, will fix it later
10:04:55*chemist69 quit (Ping timeout: 245 seconds)
10:06:34*tankfeeder joined #nim
10:07:27*chemist69 joined #nim
10:08:11*yglukhov joined #nim
10:10:00*yglukhov quit (Remote host closed the connection)
10:10:50*yglukhov joined #nim
10:29:25*gangstacat joined #nim
11:09:26*Arrrr joined #nim
11:09:26*Arrrr quit (Changing host)
11:09:26*Arrrr joined #nim
11:12:30*sz0 joined #nim
11:16:50*bjz joined #nim
11:19:17*gangstacat quit (Ping timeout: 255 seconds)
11:22:25*gangstacat joined #nim
11:51:45*Sembei joined #nim
12:02:30*Snircle joined #nim
12:12:15*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:15:32*bjz quit (Ping timeout: 240 seconds)
12:15:55*bjz_ joined #nim
12:20:47*devted joined #nim
12:31:39*jjido joined #nim
12:32:49*jjido quit (Read error: Connection reset by peer)
12:42:14*carterza joined #nim
13:10:31*PMunch joined #nim
13:18:23*handlex joined #nim
13:19:38*handlex quit (Client Quit)
13:20:16*couven92 quit (Quit: Client disconnecting)
13:25:24*chemist69 quit (Ping timeout: 252 seconds)
13:27:42*chemist69 joined #nim
13:31:40*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:32:27*couven92 joined #nim
13:41:38*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:45:42*carterza quit (Quit: carterza)
13:59:50*sz0 quit (Quit: Connection closed for inactivity)
14:05:46*vlad1777d joined #nim
14:07:52PMunchHmm, should the compiler be smart enough to convert a seq[empty] to the type required in initialization statements?
14:08:06PMunchAs an example: b:array[ -2..2, seq[int] ] = [ @[], @[], @[], @[], @[] ]
14:08:31PMunchThat throws an error that it gets seq[empty] but expects seq[int]
14:18:53rokupswhat on earth is return value of cpuTime()? because it surely is not seconds.
14:19:43FromGitter<andreaferretti> The value of the result has no meaning. To generate useful timing values, take the difference between the results
14:19:49FromGitter<andreaferretti> https://nim-lang.org/docs/times.html#cpuTime,
14:20:14FromGitter<andreaferretti> basically, the zero point is arbitrary
14:20:15rokupsi am reading that, it also says "gets time spent that the CPU spent to run the current process in seconds"
14:20:29FromGitter<andreaferretti> the difference between two calls does
14:20:44FromGitter<andreaferretti> its a clock
14:20:53*nsf quit (Quit: WeeChat 1.7)
14:20:53FromGitter<andreaferretti> just with an aribtrary zero points
14:21:24rokupsthing is it does not. i sleep for 1000ms between calls and it returns some very small value
14:22:02rokupscould you try `var starts = cpuTime(); os.sleep(1000); echo cpuTime() - starts`?
14:22:25rokupson windows it works, returns weird results
14:24:06FromGitter<andreaferretti> that's because you slept :-)
14:24:11FromGitter<andreaferretti> the cpu was not working
14:24:30FromGitter<andreaferretti> if you want wall clock time use
14:24:31FromGitter<andreaferretti> https://nim-lang.org/docs/times.html#epochTime,
14:24:39rokupsso thats what it means
14:25:10FromGitter<andreaferretti> yes
14:25:15FromGitter<andreaferretti> if the cpu does not work
14:25:19FromGitter<andreaferretti> no time is elasped
14:25:22FromGitter<andreaferretti> elapsed
14:26:18rokupswell this one is a red flag because on windows it does not work that way
14:27:56*devted quit (Quit: Sleeping.)
14:28:46FromGitter<andreaferretti> you may be interested in
14:28:55FromGitter<andreaferretti> https://gitlab.com/define-private-public/stopwatch
14:29:03FromGitter<andreaferretti> https://github.com/ivankoster/nimbench
14:29:45*gokr quit (Ping timeout: 252 seconds)
14:30:56subsetparkDo `const`s have the effect of the {.global.} pragma?
14:31:35Araqrokups
14:31:45Araqon my win64 it returns 1.0
14:31:49Araqaka 1 second
14:32:13Araqwhich implies it takes the time, not the cpu time, but still.
14:32:13rokupsAraq: yeah, and on linux it returns some very tiny value because cpu was not executing
14:32:31Araqyeah, the Linux behaviour is better, use epochTime instead
14:33:08rokupsyeah switched back to that. trying new func because in some builds on windows coroutine loop finishes like instantly heh
14:33:18rokupsby the way figured out that clang crash thing \o/
14:33:57rokupsturns out before jumping into coroutine stack had to be 16-byte aligned and then esp-4
14:36:34*carterza joined #nim
14:39:06Arrrrsubsetpark consts are defined at compile time. You might say they end up being very close, but no the same.
14:43:12subsetparkYeah, I guess I'm wondering about the implications of having a const in a proc - they're evaluated at compile time, does that mean their values are also inlined wherever they are used?
14:44:20ArrrrYes, you can see the c code generated
14:49:31subsetparkyeah, looks good
14:58:15*nsf joined #nim
15:02:19*tankfeeder quit (Quit: Leaving)
15:10:53*devted joined #nim
15:14:12*yglukhov quit (Remote host closed the connection)
15:14:48*yglukhov joined #nim
15:17:08*brson joined #nim
15:19:08*yglukhov quit (Ping timeout: 255 seconds)
15:25:43*PMunch quit (Quit: leaving)
15:32:58*yglukhov joined #nim
15:41:10*Jesin quit (Quit: Leaving)
15:43:35*Jesin joined #nim
15:48:37*yglukhov quit (Remote host closed the connection)
15:49:10*yglukhov joined #nim
15:52:16*gokr joined #nim
15:52:56*yglukhov quit (Read error: Connection reset by peer)
15:53:21*yglukhov joined #nim
15:55:52FromGitter<Varriount> rokups: How are the coroutines going?
15:57:41*yglukhov quit (Ping timeout: 255 seconds)
16:32:50*Trustable joined #nim
16:39:19demi-could someone please explain to me the purpose of "new" and "free" in the objective-c example here? https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importobjc-pragma (context i'm a language expert here and not sure why those two phrases are used instead of -alloc -init and -release)
16:42:22FromGitter<Varriount> demi-: If I had to guess, because the text part of the objective C imports contain "new" and "free"?
16:42:40euantorhttp://stackoverflow.com/questions/719877/use-of-alloc-init-instead-of-new
16:42:56euantor`new` is a keyword in objective C, though it isn't seen much
16:43:53euantorAnd free is still valid, though doesn't seem to be used much
16:44:03demi-as mentioned, i know more about objc than anyone here likely, i'm questioning which runtime was used to do this
16:44:16FromGitter<Varriount> d
16:44:23euantorNot sure, Araq would know
16:45:02demi-free isn't valid, as it doesn't get implemented on NSObject
16:45:19demi--release is the correct call
16:46:50*PMunch joined #nim
16:47:58demi-and +new isn't a reliable thing to use these days, it is actively discouraged with designated initializers
16:50:23PMunchDid anyone comment on the b:array[ -2..2, seq[int] ] = [ @[], @[], @[], @[], @[] ] error?
16:51:08cheatfate_rokups, usage of epochTime() is not very good for coroutines, because it uses system time (which can be adjusted) and because of conversion to float is expensive operation...
16:51:33FromGitter<Varriount> demi-:
16:51:34cheatfate_rokups, you need monotonic clock
16:52:17demi-varriount, yes?
16:52:47*Andris_zbx quit (Remote host closed the connection)
16:52:58AraqPMunch: yeah it should work
16:53:20Araqmy IO fixes broke --gc:boehm
16:53:25Araqit makes me mad
16:53:42Araqwhere is the connection between IO and --gc:boehm?
16:54:35rokupshmm indeed cheatfate_. well using cpuTime() was kind of attempt but it does not work consistently across platforms.
16:54:41PMunchAraq, it doesn't
16:54:58AraqPMunch: I noticed, report it
16:55:17rokupsVarriount pretty good. i am out of bugs to fix. grab https://github.com/nim-lang/Nim/pull/5317 and break it please :)
16:55:21PMunchComplains that it wanted an array[-2..2, seq[int]] but got an array[-2..2,seq[empty]]
16:55:29PMunchWhy is empty even a type -_-
16:55:41PMunchA seq of type empty is pretty useless :P
16:57:09cheatfate_rokups, try to adopt system/timers.nim
16:58:57demi-Araq: would you be able to answer my question around the `{.importobjc.}` example?
16:59:23Araqdemi-: nope, if I wrote it it was so long ago I don't remember anything
16:59:44AraqGNU Objective C differs from Apple's though
16:59:54Araqand at that time I only had GNU lying around
17:00:13demi-ok, i assume PRs to update the docs are welcome?
17:00:35*nsf quit (Quit: WeeChat 1.7)
17:02:41*couven92 quit (Quit: Client disconnecting)
17:03:26PMunchhttps://github.com/nim-lang/Nim/issues/5356
17:05:07Araqof course
17:05:19demi-ok cool, thanks
17:06:31*joebo quit (Ping timeout: 256 seconds)
17:26:44*joebo joined #nim
17:31:09*smt joined #nim
17:31:32*filcuc quit (Ping timeout: 240 seconds)
17:35:37*yglukhov joined #nim
17:37:08*yglukhov quit (Remote host closed the connection)
17:37:22*yglukhov joined #nim
17:43:15*yglukhov quit (Remote host closed the connection)
17:43:51*yglukhov joined #nim
17:48:06*yglukhov quit (Ping timeout: 240 seconds)
17:48:50*couven92 joined #nim
17:55:18*jjido_ joined #nim
18:01:13*jjido_ quit (Remote host closed the connection)
18:02:03*MyMind quit (Ping timeout: 252 seconds)
18:02:05*carterza_ joined #nim
18:02:27FromGitter<Varriount> rokups: I can test on OSX, probably over the weekend.
18:04:19*carterza quit (Ping timeout: 256 seconds)
18:04:19*carterza_ is now known as carterza
18:04:29*jjido joined #nim
18:05:15*jjido quit (Read error: Connection reset by peer)
18:08:09*yglukhov joined #nim
18:08:52*dddddd joined #nim
18:13:30*jjido joined #nim
18:16:50FromGitter<Varriount> rokups: I saw the note in the PR regarding floating point registers. What kind of behavior occurs when floating point registers aren't saved?
18:16:58*yglukhov quit (Remote host closed the connection)
18:17:33*yglukhov joined #nim
18:19:32*Sembei quit (Ping timeout: 240 seconds)
18:19:48rokupsVarriount it seems that all registers (except for two in MS ABI) are volatile and compiler ensures correct state between calls. Since yielding from a coroutine does a call we are all good
18:20:07rokupsthose two registers on MS abi are saved too. everything seems to work properly
18:20:33rokupsone thing is strange though - everyone all around seem to be saving all or close to all xmm registers. idk why
18:21:35jjidoIs it because of barriers?
18:21:36*yglukhov quit (Ping timeout: 240 seconds)
18:22:31rokupsnot entirely sure what those are
18:26:31FromGitter<Varriount> rokups: xmm are for simd operations...
18:26:55FromGitter<Varriount> I wonder if there are some conventions that use those to pass arguments.
18:27:14jjidoIt is a calling convention http://stackoverflow.com/questions/24299543/saving-the-xmm-register-before-function-call
18:28:02rokupsgood link jjido, looks like wikipedia got it wrong \o/
18:30:39rokupshmm according to https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf xmm registers dont need saving at all on unixes
18:32:09jjidoThat's mentioned in my link too :p
18:32:58FromGitter<Varriount> "Yes, on Microsoft Windows you are required to preserve the XMM6-XMM15 registers [...] However on Linux those are temporary registers, and therefore don't have to be preserved."
18:35:30*euantor quit (Remote host closed the connection)
18:37:05*yglukhov joined #nim
18:37:23*Syneh_ quit (Remote host closed the connection)
18:40:23*Vladar quit (Read error: Connection reset by peer)
18:43:45*Calinou_ is now known as Calinou
18:45:07*subsetpark quit (Remote host closed the connection)
18:45:07*r4vi quit (Remote host closed the connection)
18:45:07*zielmicha_ quit (Remote host closed the connection)
18:45:07*libman quit (Remote host closed the connection)
18:50:39*GustavoLapasta joined #nim
19:04:23*nsf joined #nim
19:10:53*gokr quit (Ping timeout: 255 seconds)
19:21:28*smt quit (Quit: Leaving)
19:28:13*gokr joined #nim
19:28:25*zielmicha_ joined #nim
19:38:11*Arrrr quit (Ping timeout: 264 seconds)
19:42:04*yay quit (Quit: ZZZzzz…)
19:49:52*subsetpark joined #nim
19:50:27*Arrrr joined #nim
19:50:27*Arrrr quit (Changing host)
19:50:27*Arrrr joined #nim
19:52:54*euantor joined #nim
19:55:23*niv joined #nim
19:56:20*bjz joined #nim
20:00:12*yay joined #nim
20:00:16*yay quit (Client Quit)
20:05:08*r4vi joined #nim
20:10:01*Syneh_ joined #nim
20:21:09*libman joined #nim
20:28:08*Matthias247_ quit (Read error: Connection reset by peer)
20:30:00*chemist69 quit (Ping timeout: 252 seconds)
20:35:21*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:35:29*gokr quit (Ping timeout: 255 seconds)
20:46:08*Sembei joined #nim
20:47:00*Gonzih quit (Ping timeout: 245 seconds)
20:52:08*rokups quit (Quit: Connection closed for inactivity)
20:57:02*chemist69 joined #nim
20:57:03*Gonzih joined #nim
20:57:55*macbeth joined #nim
21:02:53demi-is there a list of c-types that nim uses?
21:08:46*fredrik92 joined #nim
21:10:48*Snircle joined #nim
21:16:09*yglukhov quit (Remote host closed the connection)
21:16:28*Jesin quit (Quit: Leaving)
21:16:43*yglukhov joined #nim
21:17:30Araqwhat's a list of c-types?
21:17:45Araqcint, cfloat, FILE*, ... ?
21:21:09*yglukhov quit (Ping timeout: 252 seconds)
21:21:13demi-yeah, how do the C primitive types (int, char, short, long, long long, double, float) translate into nim (cint, cshort, cdouble, etc) and how does that work for signed and unsigned versions?
21:22:19demi-I'm building something like c2nim but for objective-c, and need to understand how the type translations work across the ffi
21:23:13Araqwell c2nim knows.
21:23:47Araqyou can ask it or read its source and you should since objective-c is similar
21:24:12*yglukhov joined #nim
21:24:29Araqbut to make it short: c+name for signed, cu+name for unsigned
21:24:51demi-thank you!
21:25:29*yglukhov quit (Remote host closed the connection)
21:26:02*yglukhov joined #nim
21:26:50*carterza quit (Quit: carterza)
21:30:30*yglukhov quit (Ping timeout: 252 seconds)
21:37:46*Gustavo_ joined #nim
21:40:24*GustavoLapasta quit (Ping timeout: 252 seconds)
21:46:28*gokr joined #nim
21:47:49*fredrik92 quit (Quit: Bye)
21:48:12*Arrrr quit (Read error: Connection reset by peer)
21:52:38*couven92 quit (Quit: Client disconnecting)
22:04:35*yglukhov joined #nim
22:07:36dom96Take note Nimians. This is how every Nimble package should start out: https://github.com/dom96/untar ;)
22:08:50*carterza joined #nim
22:13:29dom96I'm really disliking this Nimble convention, anybody got any suggestions for an alternative? https://github.com/nim-lang/nimble/issues/308
22:20:18euantorRegarding the `pkg` convention, IMO forcing code to be in a `src` or `lib` directory is the easiest solution
22:20:31Araqlibraries can have foo.nim and a foo/ directory
22:20:35euantorThen binaries end up in the root or can be set to be output to a `bin` directory
22:20:45euantorYes, obviously
22:20:59Araqno need for pkg suffix
22:21:23euantorThat's how mom's untarnished library is structured
22:21:34euantorThe problem is when executables and directories collide
22:21:39Araqwe can even patch the compiler so that default output is bin/foo if 'foo' already exists and is a directory
22:21:58euantorThat would be great
22:22:28dom96Take a look at the untar package as a good example
22:22:37dom96If I try and compile src/untar.nim then I get an error
22:23:10dom96But sure, I can type nim c --out:foo src/untar
22:23:22dom96just a bit annoying though
22:23:34dom96But that's a different problem
22:23:46euantorMy solution to that is to put my tests in separate files, which is also not the best approach
22:23:47Araqi don't understand your problem
22:24:09dom96Araq: which part do you not understand?
22:24:43*nsf quit (Quit: WeeChat 1.7)
22:25:10dom96euantor: forcing code to be in a 'src' directory doesn't solve the problem
22:25:34euantorIt would if the compiler wrote outputs to the current working directory
22:25:42dom96yes, but it doesn't
22:25:42euantorWhich I thought it did, but it doesn't
22:25:46*carterza quit (Quit: carterza)
22:25:49dom96:)
22:26:40dom96But the 'pkg' convention only comes into effect when you want a 'hybrid' binary&library package.
22:27:02dom96Despite this I still feel like I should be giving library packages a 'pkg' suffix.
22:27:14Araqwhich is: always.
22:27:20dom96Nimble kept me right though.
22:27:32Araqbecause libraries should have a 'when isMainModule' with tests
22:31:10FromGitter<Varriount> dom96: What happens when you try to compile untar manually?
22:32:12dom96varriount: what do you mean "manually"?
22:33:54Araqhttps://github.com/nim-lang/Nim/commit/b293e2a9ec18fbcbf83719abcd9a7e0a757fa753
22:34:14Araq ``--out`` and ``--nimcache`` command line arguments are now relative to current directory. Previously they were relative to project directory.
22:34:29*jjido quit (Ping timeout: 240 seconds)
22:36:03euantorSo running `nim c src/test.nim` should (in my head) result in a `./test` executable
22:36:33euantorBut instead results in a `src/test` executable
22:36:39euantorWhich seems counterintuitive
22:38:04*Trustable quit (Remote host closed the connection)
22:42:44Araqit seems explicit --out was fixed, but implicit wasn't.
22:42:54Araq:-)
22:43:43euantorThat would explain it :)
22:44:08dyce[m]hmm what is the difference between if and when
22:44:28euantorwhen = compile time, if = run time
22:44:53euantorhttps://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement
22:45:39Araqdom96: so? ok? I'll fix the compiler and the pkg suffix is history
22:45:57dom96Araq: that won't solve the problem
22:46:07Araqwhat problem?
22:46:12dom96like I said, there is a different problem
22:46:34*Jesin joined #nim
22:46:38dom96When you have a hybrid package it is still a probem
22:46:40dom96*problem
22:48:30dom96because nimble stored the binaries in ~/.nimble/pkgs/pkgname-ver/
22:48:33dom96*stores
22:51:01dom96so then you have ~/.nimble/pkgs/pkgname-ver/{pkgname,pkgnamepkg/}
22:51:09dom96to prevent the conflict
22:51:12dom96Does that make sense?
22:53:01Araq*shrug* binaries are not Nimble's business anyway
22:53:12AraqI know it supports it, but it really shouldn't.
23:02:16*synshroud_ quit (Quit: ZNC 1.6.4 - http://znc.in)
23:04:46*synshroud joined #nim
23:07:05*macbeth quit (Quit: Connection closed for inactivity)
23:07:26*Gustavo_ quit (Quit: Leaving)
23:14:11*Jesin quit (Ping timeout: 264 seconds)
23:19:54*ftsf_ joined #nim
23:22:33*devted quit (Quit: Sleeping.)
23:24:50*libman is wondering if there are gaps in my IRCCloud presence here. Did anyone see me drop out in the last few days (since I briefly used the nick libmanCloud)?
23:26:07cheatfate_I really dont understand pythoners
23:26:23PMunchssSSssSSSSsssSSSSss
23:26:31cheatfate_they gone to hysteria with `japronto`
23:26:57cheatfate_but it is totaly unusable except you are showing static pages or using in-memory database
23:27:05ftsf_cheatfate_, what's to understand? they escaped the hell of PHP and took the first better thing they found and fell in love and ignored all the problems because it's so much better than PHP
23:28:33cheatfate_this new frameworks `japronto` and `sanic` could not be used in real world, because even in examples https://github.com/channelcat/sanic/blob/master/examples/sanic_aiopg_example.py
23:28:52cheatfate_they establishing connection to postgresql database at every request
23:29:19cheatfate_its like i'm speedy only when i'm not carry anything
23:29:52ftsf_assuming a connection pooler?
23:29:54*yglukhov quit (Remote host closed the connection)
23:30:27*yglukhov joined #nim
23:31:27cheatfate_https://github.com/channelcat/sanic/blob/master/examples/sanic_aiopg_example.py#L52 this line establishes connection poll at every request so in every request like 10 connections to postgresql will be established
23:31:51cheatfate_for what reason?
23:32:27dom96cheatfate_: so let's use this to our advantage, write some super fast http server in Nim and then advertise it via a blog post.
23:32:52ftsf_and use it in the real world =)
23:33:04dom96I was considering writing a blog post that explains how much bullshit there is in this.
23:33:11dom96But alas, no time.
23:34:32*yglukhov quit (Ping timeout: 240 seconds)
23:34:52PMunchYeah, it would be nice to write something like japronto in Nim. Probably faster than japronto itself. And in the blog post just write about how it, and japronto, is just a completely silly solution..
23:35:10cheatfate_PMunch, whole architecture of japronto is bad
23:35:32cheatfate_because you can't use any of async packages with it
23:35:54cheatfate_nope, i'm wrong you can use it but very ineffectively, so all benefits will be lost
23:37:48dom96or just write an overoptimised "benchmark winner" to please the people who get excited about such benchmarks
23:42:21PMunchExactly
23:42:26*def-pri-pub joined #nim
23:42:58PMunchIf you did that you could spend the post showing it off just how bad such overoptimised benchmark winners are.
23:43:21PMunchcheatfate_, have you measured the performance of another benchmark with japronto?
23:44:45cheatfate_PMunch, i have tried to use `japronto` and found it very slow when i want to use database for processing request...
23:45:14cheatfate_and now i even know how to avoid this
23:45:25cheatfate_but this needs PR to japronto code
23:46:34cheatfate_there only one thing which i like in all of this python frameworks, they are all almost compatible... like you need to replace some lines and you can use other framework :)
23:46:56cheatfate_in Nim lands we don't have such compatibility :)
23:47:28*aziz_ joined #nim
23:48:45*aziz_ is now known as aziz
23:50:10PMunchWell Nim has awesome macros so most people tend to "make their own" which isn't great for compatibility
23:50:53*Ven joined #nim
23:51:05*brson quit (Quit: leaving)