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:50 | FromGitter | <vegansk> @Araq, hi. I got a strange codegen error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=589ac7c121d548df2cdef25e] |
07:27:26 | FromGitter | <vegansk> Can you point me please where I have to search it in the compiler? |
07:27:58 | FromGitter | <vegansk> The Nim's code is here: https://github.com/vegansk/nimfp/blob/master/src/fp/either.nim#L27 |
07:34:21 | FromGitter | <Araq> genObjConstr in ccgexprs.nim |
07:39:42 | FromGitter | <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:10 | Araq | yeah 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:41 | FromGitter | <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:18 | FromGitter | <vegansk> @konqoro, write iterator that will produce the sequence of floats and vouala :-) |
08:25:20 | * | yglukhov joined #nim |
08:27:14 | FromGitter | <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:22 | Araq | because nobody needs it. |
08:29:56 | FromGitter | <konqoro> well I was doing stuff with linealg and needed it |
08:30:43 | FromGitter | <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:17 | FromGitter | <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:09 | FromGitter | <konqoro> @endragor thanks I will check it out |
09:02:40 | FromGitter | <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:41 | FromGitter | <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:53 | FromGitter | <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:14 | FromGitter | <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:10 | Araq | looks like you almost fixed it already |
09:58:17 | Araq | the stack trace tells you where to look |
09:59:47 | * | yglukhov quit (Ping timeout: 264 seconds) |
10:00:37 | FromGitter | <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:52 | PMunch | Hmm, should the compiler be smart enough to convert a seq[empty] to the type required in initialization statements? |
14:08:06 | PMunch | As an example: b:array[ -2..2, seq[int] ] = [ @[], @[], @[], @[], @[] ] |
14:08:31 | PMunch | That throws an error that it gets seq[empty] but expects seq[int] |
14:18:53 | rokups | what on earth is return value of cpuTime()? because it surely is not seconds. |
14:19:43 | FromGitter | <andreaferretti> The value of the result has no meaning. To generate useful timing values, take the difference between the results |
14:19:49 | FromGitter | <andreaferretti> https://nim-lang.org/docs/times.html#cpuTime, |
14:20:14 | FromGitter | <andreaferretti> basically, the zero point is arbitrary |
14:20:15 | rokups | i am reading that, it also says "gets time spent that the CPU spent to run the current process in seconds" |
14:20:29 | FromGitter | <andreaferretti> the difference between two calls does |
14:20:44 | FromGitter | <andreaferretti> its a clock |
14:20:53 | * | nsf quit (Quit: WeeChat 1.7) |
14:20:53 | FromGitter | <andreaferretti> just with an aribtrary zero points |
14:21:24 | rokups | thing is it does not. i sleep for 1000ms between calls and it returns some very small value |
14:22:02 | rokups | could you try `var starts = cpuTime(); os.sleep(1000); echo cpuTime() - starts`? |
14:22:25 | rokups | on windows it works, returns weird results |
14:24:06 | FromGitter | <andreaferretti> that's because you slept :-) |
14:24:11 | FromGitter | <andreaferretti> the cpu was not working |
14:24:30 | FromGitter | <andreaferretti> if you want wall clock time use |
14:24:31 | FromGitter | <andreaferretti> https://nim-lang.org/docs/times.html#epochTime, |
14:24:39 | rokups | so thats what it means |
14:25:10 | FromGitter | <andreaferretti> yes |
14:25:15 | FromGitter | <andreaferretti> if the cpu does not work |
14:25:19 | FromGitter | <andreaferretti> no time is elasped |
14:25:22 | FromGitter | <andreaferretti> elapsed |
14:26:18 | rokups | well this one is a red flag because on windows it does not work that way |
14:27:56 | * | devted quit (Quit: Sleeping.) |
14:28:46 | FromGitter | <andreaferretti> you may be interested in |
14:28:55 | FromGitter | <andreaferretti> https://gitlab.com/define-private-public/stopwatch |
14:29:03 | FromGitter | <andreaferretti> https://github.com/ivankoster/nimbench |
14:29:45 | * | gokr quit (Ping timeout: 252 seconds) |
14:30:56 | subsetpark | Do `const`s have the effect of the {.global.} pragma? |
14:31:35 | Araq | rokups |
14:31:45 | Araq | on my win64 it returns 1.0 |
14:31:49 | Araq | aka 1 second |
14:32:13 | Araq | which implies it takes the time, not the cpu time, but still. |
14:32:13 | rokups | Araq: yeah, and on linux it returns some very tiny value because cpu was not executing |
14:32:31 | Araq | yeah, the Linux behaviour is better, use epochTime instead |
14:33:08 | rokups | yeah switched back to that. trying new func because in some builds on windows coroutine loop finishes like instantly heh |
14:33:18 | rokups | by the way figured out that clang crash thing \o/ |
14:33:57 | rokups | turns out before jumping into coroutine stack had to be 16-byte aligned and then esp-4 |
14:36:34 | * | carterza joined #nim |
14:39:06 | Arrrr | subsetpark consts are defined at compile time. You might say they end up being very close, but no the same. |
14:43:12 | subsetpark | Yeah, 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:20 | Arrrr | Yes, you can see the c code generated |
14:49:31 | subsetpark | yeah, 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:52 | FromGitter | <Varriount> rokups: How are the coroutines going? |
15:57:41 | * | yglukhov quit (Ping timeout: 255 seconds) |
16:32:50 | * | Trustable joined #nim |
16:39:19 | demi- | 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:22 | FromGitter | <Varriount> demi-: If I had to guess, because the text part of the objective C imports contain "new" and "free"? |
16:42:40 | euantor | http://stackoverflow.com/questions/719877/use-of-alloc-init-instead-of-new |
16:42:56 | euantor | `new` is a keyword in objective C, though it isn't seen much |
16:43:53 | euantor | And free is still valid, though doesn't seem to be used much |
16:44:03 | demi- | as mentioned, i know more about objc than anyone here likely, i'm questioning which runtime was used to do this |
16:44:16 | FromGitter | <Varriount> d |
16:44:23 | euantor | Not sure, Araq would know |
16:45:02 | demi- | free isn't valid, as it doesn't get implemented on NSObject |
16:45:19 | demi- | -release is the correct call |
16:46:50 | * | PMunch joined #nim |
16:47:58 | demi- | and +new isn't a reliable thing to use these days, it is actively discouraged with designated initializers |
16:50:23 | PMunch | Did anyone comment on the b:array[ -2..2, seq[int] ] = [ @[], @[], @[], @[], @[] ] error? |
16:51:08 | cheatfate_ | 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:33 | FromGitter | <Varriount> demi-: |
16:51:34 | cheatfate_ | rokups, you need monotonic clock |
16:52:17 | demi- | varriount, yes? |
16:52:47 | * | Andris_zbx quit (Remote host closed the connection) |
16:52:58 | Araq | PMunch: yeah it should work |
16:53:20 | Araq | my IO fixes broke --gc:boehm |
16:53:25 | Araq | it makes me mad |
16:53:42 | Araq | where is the connection between IO and --gc:boehm? |
16:54:35 | rokups | hmm indeed cheatfate_. well using cpuTime() was kind of attempt but it does not work consistently across platforms. |
16:54:41 | PMunch | Araq, it doesn't |
16:54:58 | Araq | PMunch: I noticed, report it |
16:55:17 | rokups | Varriount pretty good. i am out of bugs to fix. grab https://github.com/nim-lang/Nim/pull/5317 and break it please :) |
16:55:21 | PMunch | Complains that it wanted an array[-2..2, seq[int]] but got an array[-2..2,seq[empty]] |
16:55:29 | PMunch | Why is empty even a type -_- |
16:55:41 | PMunch | A seq of type empty is pretty useless :P |
16:57:09 | cheatfate_ | rokups, try to adopt system/timers.nim |
16:58:57 | demi- | Araq: would you be able to answer my question around the `{.importobjc.}` example? |
16:59:23 | Araq | demi-: nope, if I wrote it it was so long ago I don't remember anything |
16:59:44 | Araq | GNU Objective C differs from Apple's though |
16:59:54 | Araq | and at that time I only had GNU lying around |
17:00:13 | demi- | 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:26 | PMunch | https://github.com/nim-lang/Nim/issues/5356 |
17:05:07 | Araq | of course |
17:05:19 | demi- | 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:27 | FromGitter | <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:50 | FromGitter | <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:48 | rokups | Varriount 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:07 | rokups | those two registers on MS abi are saved too. everything seems to work properly |
18:20:33 | rokups | one thing is strange though - everyone all around seem to be saving all or close to all xmm registers. idk why |
18:21:35 | jjido | Is it because of barriers? |
18:21:36 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:22:31 | rokups | not entirely sure what those are |
18:26:31 | FromGitter | <Varriount> rokups: xmm are for simd operations... |
18:26:55 | FromGitter | <Varriount> I wonder if there are some conventions that use those to pass arguments. |
18:27:14 | jjido | It is a calling convention http://stackoverflow.com/questions/24299543/saving-the-xmm-register-before-function-call |
18:28:02 | rokups | good link jjido, looks like wikipedia got it wrong \o/ |
18:30:39 | rokups | hmm 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:09 | jjido | That's mentioned in my link too :p |
18:32:58 | FromGitter | <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:53 | demi- | 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:30 | Araq | what's a list of c-types? |
21:17:45 | Araq | cint, cfloat, FILE*, ... ? |
21:21:09 | * | yglukhov quit (Ping timeout: 252 seconds) |
21:21:13 | demi- | 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:19 | demi- | I'm building something like c2nim but for objective-c, and need to understand how the type translations work across the ffi |
21:23:13 | Araq | well c2nim knows. |
21:23:47 | Araq | you can ask it or read its source and you should since objective-c is similar |
21:24:12 | * | yglukhov joined #nim |
21:24:29 | Araq | but to make it short: c+name for signed, cu+name for unsigned |
21:24:51 | demi- | 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:36 | dom96 | Take note Nimians. This is how every Nimble package should start out: https://github.com/dom96/untar ;) |
22:08:50 | * | carterza joined #nim |
22:13:29 | dom96 | I'm really disliking this Nimble convention, anybody got any suggestions for an alternative? https://github.com/nim-lang/nimble/issues/308 |
22:20:18 | euantor | Regarding the `pkg` convention, IMO forcing code to be in a `src` or `lib` directory is the easiest solution |
22:20:31 | Araq | libraries can have foo.nim and a foo/ directory |
22:20:35 | euantor | Then binaries end up in the root or can be set to be output to a `bin` directory |
22:20:45 | euantor | Yes, obviously |
22:20:59 | Araq | no need for pkg suffix |
22:21:23 | euantor | That's how mom's untarnished library is structured |
22:21:34 | euantor | The problem is when executables and directories collide |
22:21:39 | Araq | we can even patch the compiler so that default output is bin/foo if 'foo' already exists and is a directory |
22:21:58 | euantor | That would be great |
22:22:28 | dom96 | Take a look at the untar package as a good example |
22:22:37 | dom96 | If I try and compile src/untar.nim then I get an error |
22:23:10 | dom96 | But sure, I can type nim c --out:foo src/untar |
22:23:22 | dom96 | just a bit annoying though |
22:23:34 | dom96 | But that's a different problem |
22:23:46 | euantor | My solution to that is to put my tests in separate files, which is also not the best approach |
22:23:47 | Araq | i don't understand your problem |
22:24:09 | dom96 | Araq: which part do you not understand? |
22:24:43 | * | nsf quit (Quit: WeeChat 1.7) |
22:25:10 | dom96 | euantor: forcing code to be in a 'src' directory doesn't solve the problem |
22:25:34 | euantor | It would if the compiler wrote outputs to the current working directory |
22:25:42 | dom96 | yes, but it doesn't |
22:25:42 | euantor | Which I thought it did, but it doesn't |
22:25:46 | * | carterza quit (Quit: carterza) |
22:25:49 | dom96 | :) |
22:26:40 | dom96 | But the 'pkg' convention only comes into effect when you want a 'hybrid' binary&library package. |
22:27:02 | dom96 | Despite this I still feel like I should be giving library packages a 'pkg' suffix. |
22:27:14 | Araq | which is: always. |
22:27:20 | dom96 | Nimble kept me right though. |
22:27:32 | Araq | because libraries should have a 'when isMainModule' with tests |
22:31:10 | FromGitter | <Varriount> dom96: What happens when you try to compile untar manually? |
22:32:12 | dom96 | varriount: what do you mean "manually"? |
22:33:54 | Araq | https://github.com/nim-lang/Nim/commit/b293e2a9ec18fbcbf83719abcd9a7e0a757fa753 |
22:34:14 | Araq | ``--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:03 | euantor | So running `nim c src/test.nim` should (in my head) result in a `./test` executable |
22:36:33 | euantor | But instead results in a `src/test` executable |
22:36:39 | euantor | Which seems counterintuitive |
22:38:04 | * | Trustable quit (Remote host closed the connection) |
22:42:44 | Araq | it seems explicit --out was fixed, but implicit wasn't. |
22:42:54 | Araq | :-) |
22:43:43 | euantor | That would explain it :) |
22:44:08 | dyce[m] | hmm what is the difference between if and when |
22:44:28 | euantor | when = compile time, if = run time |
22:44:53 | euantor | https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement |
22:45:39 | Araq | dom96: so? ok? I'll fix the compiler and the pkg suffix is history |
22:45:57 | dom96 | Araq: that won't solve the problem |
22:46:07 | Araq | what problem? |
22:46:12 | dom96 | like I said, there is a different problem |
22:46:34 | * | Jesin joined #nim |
22:46:38 | dom96 | When you have a hybrid package it is still a probem |
22:46:40 | dom96 | *problem |
22:48:30 | dom96 | because nimble stored the binaries in ~/.nimble/pkgs/pkgname-ver/ |
22:48:33 | dom96 | *stores |
22:51:01 | dom96 | so then you have ~/.nimble/pkgs/pkgname-ver/{pkgname,pkgnamepkg/} |
22:51:09 | dom96 | to prevent the conflict |
22:51:12 | dom96 | Does that make sense? |
22:53:01 | Araq | *shrug* binaries are not Nimble's business anyway |
22:53:12 | Araq | I 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:07 | cheatfate_ | I really dont understand pythoners |
23:26:23 | PMunch | ssSSssSSSSsssSSSSss |
23:26:31 | cheatfate_ | they gone to hysteria with `japronto` |
23:26:57 | cheatfate_ | but it is totaly unusable except you are showing static pages or using in-memory database |
23:27:05 | ftsf_ | 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:33 | cheatfate_ | 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:52 | cheatfate_ | they establishing connection to postgresql database at every request |
23:29:19 | cheatfate_ | its like i'm speedy only when i'm not carry anything |
23:29:52 | ftsf_ | assuming a connection pooler? |
23:29:54 | * | yglukhov quit (Remote host closed the connection) |
23:30:27 | * | yglukhov joined #nim |
23:31:27 | cheatfate_ | 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:51 | cheatfate_ | for what reason? |
23:32:27 | dom96 | cheatfate_: 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:52 | ftsf_ | and use it in the real world =) |
23:33:04 | dom96 | I was considering writing a blog post that explains how much bullshit there is in this. |
23:33:11 | dom96 | But alas, no time. |
23:34:32 | * | yglukhov quit (Ping timeout: 240 seconds) |
23:34:52 | PMunch | Yeah, 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:10 | cheatfate_ | PMunch, whole architecture of japronto is bad |
23:35:32 | cheatfate_ | because you can't use any of async packages with it |
23:35:54 | cheatfate_ | nope, i'm wrong you can use it but very ineffectively, so all benefits will be lost |
23:37:48 | dom96 | or just write an overoptimised "benchmark winner" to please the people who get excited about such benchmarks |
23:42:21 | PMunch | Exactly |
23:42:26 | * | def-pri-pub joined #nim |
23:42:58 | PMunch | If you did that you could spend the post showing it off just how bad such overoptimised benchmark winners are. |
23:43:21 | PMunch | cheatfate_, have you measured the performance of another benchmark with japronto? |
23:44:45 | cheatfate_ | PMunch, i have tried to use `japronto` and found it very slow when i want to use database for processing request... |
23:45:14 | cheatfate_ | and now i even know how to avoid this |
23:45:25 | cheatfate_ | but this needs PR to japronto code |
23:46:34 | cheatfate_ | 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:56 | cheatfate_ | 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:10 | PMunch | Well 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) |