00:01:08 | * | shaiekx quit (Quit: Leaving) |
00:04:48 | * | crem quit (Ping timeout: 240 seconds) |
00:07:09 | * | crem joined #nim |
00:29:23 | * | yglukhov joined #nim |
00:35:13 | * | yglukhov quit (Ping timeout: 248 seconds) |
00:54:22 | * | Nobabs27 joined #nim |
01:12:23 | * | def-pri-pub quit (Ping timeout: 240 seconds) |
01:15:02 | * | arnetheduck quit (Ping timeout: 260 seconds) |
01:19:19 | * | arnetheduck joined #nim |
01:25:46 | * | TjYoco quit (Quit: Leaving) |
02:00:36 | * | chemist69 quit (Ping timeout: 252 seconds) |
02:05:57 | FromGitter | <zacharycarter> def-pri-pub: I'm assuming you're trying to get the sphere to rotate? |
02:14:06 | * | chemist69 joined #nim |
02:17:28 | FromGitter | <zacharycarter> def-pri-pub: I need to make a commit and then I have an example for you, lmk when you're around please |
02:20:55 | FromGitter | <zacharycarter> I'm digging theses spaceships |
02:21:21 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/ksLd/Screen-Shot-2017-09-16-at-10.20.45-PM.png) |
02:32:58 | * | yglukhov joined #nim |
02:37:34 | * | yglukhov quit (Ping timeout: 264 seconds) |
02:37:35 | * | nkr joined #nim |
02:37:52 | * | nkr left #nim ("Leaving") |
02:40:06 | FromGitter | <zacharycarter> https://github.com/zacharycarter/nimrl |
02:55:38 | * | def-pri-pub joined #nim |
02:55:38 | * | def-pri-pub quit (Changing host) |
02:55:38 | * | def-pri-pub joined #nim |
03:08:42 | * | relax joined #nim |
03:16:48 | def-pri-pub | zacharycarter: have you been able to take a look at that one thing yet? |
03:26:08 | FromGitter | <zacharycarter> yup |
03:26:18 | FromGitter | <zacharycarter> def-pri-pub: I'm going to push up a commit |
03:27:45 | FromGitter | <zacharycarter> def-pri-pub: please see the latest commit |
03:29:46 | * | Jesin quit (Quit: Leaving) |
03:35:40 | * | def-pri-pub quit (Quit: leaving) |
04:10:02 | * | relax quit (Ping timeout: 260 seconds) |
04:33:39 | * | rauss quit (Read error: Connection reset by peer) |
04:42:16 | * | Nobabs27 quit (Quit: Leaving) |
05:03:27 | * | kier quit (Quit: No Ping reply in 180 seconds.) |
05:08:52 | * | kier joined #nim |
05:20:48 | * | endragor joined #nim |
05:36:59 | * | hcorion joined #nim |
05:37:44 | hcorion | Hey all, I'm having trouble, I want to set a const public variable, but have it behind an if, else statement |
05:38:22 | hcorion | but it complains that 'export is only allowed at top level' |
05:41:27 | hcorion | The if statement is just checking if the cpuEndian == bigEndian |
05:41:36 | def- | hi hcorion |
05:41:43 | def- | make that a compile-time "when" instead of "if" |
05:41:50 | hcorion | ahh, thanks |
05:41:58 | FromGitter | <Bennyelg> GOod Morning all |
05:42:16 | FromGitter | <Bennyelg> I'm starting to dream on nim at night |
05:42:52 | hcorion | Also, how might I add a pointer to a function in say, an object? |
05:43:21 | def- | funcPointer: proc(x: int): string |
05:43:30 | def- | and then foo.funcPointer = myFunc |
05:44:03 | hcorion | Awesome, thanks a ton @def- |
05:46:51 | * | Sembei joined #nim |
05:48:58 | * | Pisuke quit (Ping timeout: 264 seconds) |
05:59:23 | * | endragor quit (Remote host closed the connection) |
06:02:38 | * | miran joined #nim |
06:06:03 | * | endragor joined #nim |
06:21:36 | * | gokr joined #nim |
06:23:24 | * | Yardanico joined #nim |
06:25:15 | * | kang0 joined #nim |
06:26:50 | * | jsgrant quit (Ping timeout: 246 seconds) |
06:27:24 | * | solitudesf joined #nim |
06:29:54 | * | Arrrr joined #nim |
06:29:54 | * | Arrrr quit (Changing host) |
06:29:54 | * | Arrrr joined #nim |
06:29:55 | * | kang0 quit (Read error: Connection reset by peer) |
06:32:44 | * | endragor_ joined #nim |
06:36:23 | * | Sentreen quit (Ping timeout: 240 seconds) |
06:36:58 | * | endragor quit (Ping timeout: 264 seconds) |
06:43:08 | * | kang0 joined #nim |
06:44:39 | * | haha_ joined #nim |
06:46:41 | * | kang0 quit (Client Quit) |
06:48:30 | Araq | https://github.com/nim-lang/Nim/issues/6393 who wants to give it a shot? |
06:48:45 | Araq | I guide you. |
06:49:26 | * | Sentreen joined #nim |
06:49:46 | Yardanico | Araq, btw, maybe I'm wrong, but I think there's an issue like this already |
06:49:57 | Yardanico | it's hard to search for it though |
06:52:56 | Yardanico | ah, no |
06:53:07 | Yardanico | but it's a related one - https://github.com/nim-lang/Nim/issues/4971 |
06:53:09 | Yardanico | (maybe) |
06:53:46 | Yardanico | Araq, so where in nim compiler a check for this can be added? |
06:55:30 | Araq | compiler/types.nim line 799 |
06:55:39 | Araq | you need to check why that doesn't trigger |
06:58:38 | * | endragor joined #nim |
06:58:45 | Yardanico | Araq, probably because a == b is true then both a and b are nil |
06:59:36 | Araq | they are not nil, the return types are 'int' and 'string' |
06:59:41 | FromGitter | <Bennyelg> @Yardanico I managed to create PrestoDB locally, With Mysql as a metastore. ⏎ I'll create docker + tests to allow others easily improve the libarary |
07:01:53 | * | endragor_ quit (Ping timeout: 240 seconds) |
07:12:38 | Yardanico | Araq, so I need to add warning or to fix it so this code compiles? |
07:19:36 | Araq | the code shouldn't compile |
07:19:44 | Araq | the bug is about "why does this compile?" |
07:26:24 | * | hcorion quit (Ping timeout: 260 seconds) |
07:29:38 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
07:37:41 | * | haha_ quit (Quit: haha_) |
07:38:41 | * | Sentreen quit (Ping timeout: 255 seconds) |
07:51:55 | * | Sentreen joined #nim |
07:53:34 | * | claudiuinberlin joined #nim |
07:54:32 | * | rokups joined #nim |
08:00:42 | * | yglukhov joined #nim |
08:02:23 | * | gokr quit (Ping timeout: 240 seconds) |
08:04:08 | Araq | (NCSTRING)((($1>0)*((NU)($1->data))) | (($1==0)*((NU)(\"\")))) |
08:06:30 | * | yglukhov quit (Remote host closed the connection) |
08:11:13 | Yardanico | Araq, not nil string? |
08:11:23 | Yardanico | or without null terminator? |
08:11:49 | Araq | krux02's patch produces totally puzzling crashes :-) |
08:12:06 | Araq | I thought because of this weird construct |
08:12:11 | Araq | but it makes no difference... |
08:16:15 | Yardanico | Araq, does "assert" work in nim testament? |
08:17:51 | Araq | sure |
08:21:36 | Yardanico | Araq, ah, maybe I should've used doAssert instead of "assert" ? |
08:22:08 | Araq | it's better for tests yes but most tests are not run with -d:release |
08:24:19 | * | yglukhov joined #nim |
08:27:59 | * | yglukhov quit (Remote host closed the connection) |
08:29:04 | * | yglukhov joined #nim |
08:47:27 | * | gangstacat quit (Quit: Ĝis!) |
08:48:41 | * | miran quit (Remote host closed the connection) |
08:52:55 | Arrrr | in the past i had some bugs because of assert and -d:release. I didn't realize why some code would not run under release |
09:24:27 | * | haha_ joined #nim |
09:35:39 | Araq | Arrrr: unfortunately x{noSideEffect} is broken, otherwise 'assert' could enforce the condition must not have side effects |
09:43:46 | * | arnetheduck quit (Remote host closed the connection) |
09:44:24 | * | arnetheduck joined #nim |
09:48:44 | * | nsf joined #nim |
09:56:00 | FromGitter | <ephja> like I said, asserts don't seem to work for me unless I add something like `output: ""`. are you sure that incorrect assertions are being caught? |
09:56:07 | * | gangstacat joined #nim |
09:56:36 | Yardanico | Araq, yeah, it seems they're not caught |
09:56:58 | Araq | that has nothing to do with assert |
09:57:10 | Araq | tests without output section are not run at all |
09:57:14 | Yardanico | oh |
09:57:33 | FromGitter | <ephja> so your test also does nothing? :p good to know |
09:59:15 | FromGitter | <ephja> I'll check if any other tests are missing something |
09:59:36 | Yardanico | can you make a PR after? I think I saw a couple of tests without "discard" section |
09:59:55 | Araq | which one? |
10:00:35 | Yardanico | so wait, tests without "discard" section are not run, but still compiled? |
10:01:02 | FromGitter | <ephja> tvectorspace.nim? I wonder if static asserts are different |
10:03:26 | FromGitter | <ephja> possibly |
10:03:31 | Araq | Yardanico: yes, that is the point |
10:03:51 | Yardanico | Araq, oh, then I should change tvmmisc |
10:03:54 | Araq | probably we should change it to an explicit norun |
10:05:38 | FromGitter | <ephja> yeah static asserts work without a test spec |
10:06:53 | * | Arrrr quit (Ping timeout: 240 seconds) |
10:13:05 | * | yglukhov quit (Remote host closed the connection) |
10:15:51 | * | dddddd joined #nim |
10:22:00 | FromGitter | <ephja> `exitcode` doesn't do anything on its own |
10:25:46 | * | yglukhov joined #nim |
10:27:51 | * | Arrrr joined #nim |
10:27:51 | * | Arrrr quit (Changing host) |
10:27:51 | * | Arrrr joined #nim |
11:00:51 | * | ShalokShalom quit (Read error: Connection reset by peer) |
11:01:02 | * | ShalokShalom joined #nim |
11:06:08 | * | Sentreen quit (Ping timeout: 246 seconds) |
11:14:10 | * | shaiekx joined #nim |
11:16:49 | shaiekx | can I see when a thread dies? |
11:16:54 | shaiekx | var x = spawn openProc() |
11:19:44 | * | Sentreen joined #nim |
11:26:44 | FromGitter | <Bennyelg> @Shaiekx you can do var x = ^spawn openProc() |
11:27:02 | FromGitter | <Bennyelg> var x should be available only after openProc done, |
11:27:07 | FromGitter | <Bennyelg> Try, Im not sure |
11:28:44 | FromGitter | <zacharycarter> https://gist.github.com/zacharycarter/5887af4e36b74f0236b997126731edb7 |
11:28:47 | FromGitter | <zacharycarter> big ship |
11:29:19 | FromGitter | <Bennyelg> lol |
11:30:02 | FromGitter | <zacharycarter> I sense a sci fi roguelike in my future :D |
11:33:33 | * | PMunch joined #nim |
11:38:50 | shaiekx | @Bennyelg that does work but that locks my http server |
11:39:10 | FromGitter | <Bennyelg> because it's waiting for him to be down |
11:39:21 | shaiekx | https://pastebin.com/Y3V4Gvze |
11:39:30 | FromGitter | <Bennyelg> you can try var x = spwan proc ⏎ then xif .isReady: |
11:41:31 | FromGitter | <zacharycarter> https://nim-lang.org/rst.html is broken |
11:41:51 | Yardanico | yes |
11:41:53 | Yardanico | proper link is https://nim-lang.org/docs/rst.html |
11:42:01 | FromGitter | <zacharycarter> I'll put a pr into the forums |
11:45:00 | shaiekx | var x = spawn openProc() |
11:45:00 | shaiekx | if x.isReady: |
11:45:00 | shaiekx | echo "x" |
11:45:14 | Yardanico | well no |
11:45:18 | Yardanico | it wouldn't work |
11:45:22 | shaiekx | yeah i thought so |
11:45:32 | Yardanico | you need to spawn it once |
11:45:37 | Yardanico | and then check if it's done |
11:45:47 | Yardanico | maybe in some async loop |
11:46:13 | FromGitter | <Bennyelg> waitFor loop probably |
11:46:30 | Yardanico | noooa |
11:46:34 | Yardanico | " that does work but that locks my http server" |
11:46:40 | Yardanico | he would use "asyncCheck loop" |
11:46:54 | Yardanico | shaiekx, wait |
11:47:02 | Yardanico | you want to give user the answer from spawned proc? |
11:47:03 | FromGitter | <Bennyelg> but asyncCheck discard the return value |
11:47:09 | FromGitter | <Bennyelg> he want it |
11:47:20 | shaiekx | Yes, yardanico |
11:47:42 | Yardanico | shaiekx, ah, ok |
11:47:44 | shaiekx | basically the user will give a youtube url and it will return when its ready to the user |
11:49:37 | Yardanico | I'll try to make it work now :) |
11:50:23 | shaiekx | thank you |
11:51:20 | FromGitter | <zacharycarter> @qqtop I replied to your issue on NimRL btw, I think you just have to do a nimble install to get things going |
11:52:05 | * | ShalokShalom_ joined #nim |
11:55:34 | * | ShalokShalom quit (Ping timeout: 264 seconds) |
12:16:06 | FromGitter | <qqtop> @zacharycarter Thank you , aStar is ok but test still fails , see traceback in issues |
12:18:15 | FromGitter | <Bennyelg> Does nim have any docs generator ? |
12:19:47 | federico3 | Bennyelg nim doc |
12:19:59 | * | Sentreen quit (Ping timeout: 246 seconds) |
12:20:08 | federico3 | see https://nim-lang.org/docs/docgen.html |
12:20:19 | FromGitter | <Bennyelg> :-* |
12:24:18 | FromGitter | <ephja> 肋 |
12:32:59 | * | nattefrost joined #nim |
12:33:14 | * | Sentreen joined #nim |
12:39:45 | FromGitter | <zacharycarter> @qqtop : replied |
12:41:23 | * | forcefaction joined #nim |
12:48:38 | * | yglukhov quit (Remote host closed the connection) |
12:58:52 | * | BigEpsilon joined #nim |
13:01:43 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:04:22 | FromGitter | <ephja> what should we call the concepts that define some container interface? C++ uses the term 'iterator' and D uses the term 'range'. |
13:05:35 | Araq | we call it 'int' |
13:06:56 | FromGitter | <ephja> what's that now? :p |
13:07:34 | Yardanico | Iterable |
13:07:38 | Yardanico | iterable |
13:07:50 | * | rokups quit (Quit: Connection closed for inactivity) |
13:13:08 | * | Matthias247 joined #nim |
13:17:28 | * | yglukhov joined #nim |
13:19:01 | * | yglukhov quit (Remote host closed the connection) |
13:23:46 | obadz | so vscode calls nim c -r … is there a way for me to change the default compile options it invokes when I hit F6 ? |
13:24:20 | FromGitter | <Bennyelg> command /shift , |
13:24:25 | FromGitter | <Bennyelg> search for nim |
13:24:49 | FromGitter | <Bennyelg> // Nim build command (c, cpp, doc, etc) ⏎ "nim.buildCommand": "c" |
13:24:51 | FromGitter | <Bennyelg> try there |
13:25:39 | obadz | but that's global to all projects. if I have a project that just needs a C library, I ought to be able to specify that somewhere? |
13:26:11 | FromGitter | <ephja> doesn't vscode support project local settings? |
13:26:21 | Araq | I never found project specific settings for vscode |
13:26:43 | obadz | Araq: what editor do you recommend then? |
13:26:54 | obadz | that has good interop with nimsuggest |
13:26:56 | * | yglukhov joined #nim |
13:27:57 | FromGitter | <ephja> I've seen .vscode directories in various directories that I've opened |
13:29:29 | FromGitter | <ephja> `> Preferences: Open Workspace Settings`? |
13:30:02 | obadz | ephja: Command 'Preferences: Open Workspace Settings' is not enabled in the current context. |
13:30:37 | FromGitter | <ephja> obadz: have you opened a directory? |
13:30:49 | obadz | ephja: I'm in a nim file |
13:31:02 | obadz | ah I see, I need to 'open folder' |
13:31:05 | obadz | let me try |
13:31:14 | FromGitter | <ephja> @Bennyelg the task mapped to F6 is called "run" something though, so it might not be relevant |
13:32:26 | FromGitter | <ephja> ```code paste, see link``` |
13:32:34 | obadz | can't I put some nim.cfg in the folder? |
13:33:03 | obadz | To fix this for instance: lib/pure/concurrency/threadpool.nim(13, 10) Error: Threadpool requires --threads:on option. |
13:34:50 | Araq | yeah that works |
13:34:54 | FromGitter | <ephja> yes, you can specify any of the options in the cfg |
13:36:03 | obadz | ah, cfg did the trick |
13:42:55 | * | ShalokShalom_ is now known as ShalokShalom |
13:48:17 | obadz | --clib:blas in the .cfg somehow expands to -l/path/to/project/blas |
13:48:19 | obadz | instead of -lblas |
13:49:42 | FromGitter | <ephja> maybe slices references should be called views |
13:49:56 | obadz | is there a documentation for the nim.cfg format somewhere? |
13:51:25 | FromGitter | <mratsim> There is a nimblas package already, if it doesn’t auto link to your system BLAS, change nimblas.nimble with switch(‘clibdir’, $PATHTOBLAS) (not sure of the clibdir) and it should always compile with it instead of having to specify it on the commandline |
13:52:25 | Araq | the format is |
13:52:27 | Araq | #comment |
13:52:31 | Araq | --option:value |
13:52:44 | Araq | @if windows: ... @else ... @end |
13:53:09 | Araq | the lexing is done according to Nim's rules |
13:53:17 | FromGitter | <ephja> option:value works too, right? and option=value IIRC |
13:53:23 | Araq | true |
13:54:50 | obadz | but --clib:blas in the cfg does not behave the same as --clib:blas on the command line |
13:55:01 | obadz | --clib:blas in the cfg prepends blas by some path |
13:55:43 | obadz | sorry I take that back |
13:55:46 | obadz | command line does the same |
13:56:11 | obadz | but either way, I can't use --clib as it doesn't pass it straight through to gcc. It adds a path.. |
13:56:11 | * | BigEpsilon quit (Remote host closed the connection) |
13:56:34 | Araq | use --passc instead |
13:56:47 | * | BigEpsilon joined #nim |
13:56:50 | FromGitter | <ephja> is anything using the 'coro' module? |
13:57:34 | Araq | no. |
13:58:38 | obadz | {.passL: "-L" & gorge("nix-build '<nixpkgs>' -A blas --no-out-link") & " -lblas".} ⇐ this worked! |
13:59:51 | FromGitter | <ephja> I might try it if I can think of anything to use it for |
14:02:50 | obadz | can I use gorge() in the .cfg ? |
14:10:41 | * | obadz quit (Ping timeout: 248 seconds) |
14:16:07 | * | BigEpsilon quit (Ping timeout: 255 seconds) |
14:16:18 | * | obadz joined #nim |
14:18:25 | * | Snircle joined #nim |
14:24:35 | Araq | no. |
14:31:14 | * | haha_ quit (Quit: haha_) |
14:39:56 | FromGitter | <ephja> https://gist.github.com/ephja/6be3d70c31cb0a586df274a62757cd5b this might not have been reported |
14:42:42 | obadz | am I correct in assuming that nim packaging works in such a way that all libraries are included as nim sources rather than separately compiled binaries? |
14:42:54 | * | adeohluwa joined #nim |
14:43:03 | obadz | (and I assume this is a consequence of the overloading mechanisms?) |
14:44:43 | Araq | yes (and no, that's completely unrelated, learn how compilers work) |
14:46:01 | * | jsgrant joined #nim |
14:48:02 | obadz | I'm not an expert in compilers but I've done a decent bit of reading… Seems to be than a C compiler is nearly always able to produce object code that is linked later on. C++ templates however requires knowledge of which types are instantiated so the source code is required at compiled time… In languages like Haskell typeclasses have a strict structure that enables separate compilation but specialization (for |
14:48:04 | obadz | performance) requires some hacky things that are essentially equivalent to having the source code of the depencency when compiling the dependent… If not for template-style polymorphism, why else does one need full nim source code? |
14:48:21 | obadz | (as oppposed to object code + some headers) |
14:50:35 | Araq | "why else" because it's work to implement, that's why. |
14:51:24 | Araq | btw overloading is orthogonal to type specialization for generics. |
14:51:47 | Araq | the C model would work fine with overloading. |
14:51:57 | obadz | That's a completely acceptable answer, but not sure how me 'learning about compilers' would have taken me to it… |
14:52:38 | * | ofelas joined #nim |
14:52:53 | * | forcefaction quit (Quit: Using Circe, the loveliest of all IRC clients) |
14:53:08 | obadz | how would you overload in C without any runtime implications? name mangling? |
14:53:28 | Araq | for instance, yes. |
14:53:50 | Araq | in fact the later C versions have some support for overloading |
14:53:59 | obadz | but then if you need an implementation for a combination of types that hasn't yet been produced, you need the original source (a la C++ template), no? |
14:54:07 | * | TjYoco joined #nim |
14:54:45 | * | forcefaction joined #nim |
14:55:15 | * | forcefaction quit (Remote host closed the connection) |
14:55:35 | * | forcefaction joined #nim |
14:56:30 | obadz | unless you eagerly produce all object code for all possible type combos as soon as they become 'feasible; |
14:56:37 | Araq | you only need the AST, not the source |
14:56:45 | obadz | yes agreed |
14:56:56 | obadz | that's the haskell hack I was referring to ;-) |
14:57:15 | Araq | that's not a "hack" |
14:58:14 | * | forcefaction quit (Client Quit) |
14:59:12 | * | forcefaction joined #nim |
14:59:29 | * | forcefaction quit (Remote host closed the connection) |
15:01:17 | Araq | the real hack here is assuming that the object file format came from god and cannot ever support monorphization. |
15:02:26 | obadz | well one could also include an interpreter and source code in the object file.. I'd classify that as a hack but I suppose that's subjective. |
15:03:50 | Araq | you need an internal representation (IR) that doesn't lose as much information as the current object file formats do. |
15:06:01 | obadz | yes if memory serves, haskell stores pre-specialization stuff in its core IR which is essentially system F |
15:10:18 | * | haha_ joined #nim |
15:10:38 | * | shaiekx quit (Quit: Leaving) |
15:12:48 | * | mahsav2 quit (Ping timeout: 240 seconds) |
15:12:59 | FromGitter | <mratsim> Is it possible to configure the compiler/compile switches directly in a .nim file (instead of .nimble or .nims)? ⏎ ⏎ I would like to have a cuda.nim file that automatically use nvcc instead of gcc/clang. |
15:13:08 | * | mahsav joined #nim |
15:13:29 | FromGitter | <mratsim> so that people can just `import arraymancer/cuda` to be properly configured |
15:15:30 | FromGitter | <mratsim> oh, maybe import nimscript |
15:16:40 | Araq | that's not possible |
15:16:51 | Araq | and would be a pita to support |
15:17:09 | * | smt` joined #nim |
15:17:20 | Araq | your cuda uses nvcc, my wxWidgets use g++, see the problem? |
15:18:41 | * | nsf quit (Quit: WeeChat 1.9) |
15:20:41 | * | smt_ quit (Ping timeout: 240 seconds) |
15:21:05 | * | Yardanico quit (Ping timeout: 240 seconds) |
15:21:16 | FromGitter | <mratsim> Well, you found clever solutions for a lot of things, why not this one ;) |
15:21:17 | * | BigEpsilon joined #nim |
15:21:25 | federico3 | how to undefine/delete a variable? |
15:21:43 | * | endragor quit (Remote host closed the connection) |
15:21:56 | Araq | federico3: --undef:var ? |
15:22:18 | * | endragor joined #nim |
15:23:44 | * | endragor quit (Remote host closed the connection) |
15:25:42 | * | Yardanico joined #nim |
15:27:15 | federico3 | a variable in a proc scope, not a conditional symbol :) |
15:27:37 | Yardanico | would "sleep" called from a proc which is being called using "spawn" block the whole program or only the thread where this proc is running? |
15:28:03 | * | yglukhov quit (Remote host closed the connection) |
15:28:31 | Yardanico | guys, 19 stars on github for 4k !!! |
15:28:53 | federico3 | Yardanico: 4k? |
15:29:02 | Yardanico | federico3, 4000 stars |
15:29:04 | FromGitter | <Bennyelg> 4000 |
15:29:10 | Araq | Yardanico: sleep is thread local |
15:29:13 | FromGitter | <Bennyelg> Very very impressive |
15:29:37 | federico3 | Yardanico: URL? :) |
15:29:45 | Yardanico | federico3, https://github.com/nim-lang/Nim ? |
15:29:57 | Yardanico | 3981 stars right now |
15:30:30 | federico3 | hah :D |
15:32:24 | * | Sentreen quit (Ping timeout: 246 seconds) |
15:32:41 | * | endragor joined #nim |
15:37:23 | Yardanico | Araq, am I doing something wrong here? https://gist.github.com/Yardanico/923a1d7ea798d15210a32b95489532c4 |
15:37:33 | Yardanico | e.g. one request will block whole process |
15:37:44 | Yardanico | it's the same with asynchttpserver |
15:38:32 | FromGitter | <Bennyelg> @Yardanico dont u need to use poll(500) ? |
15:38:39 | Araq | to figure out why that is, you need to read the code :-) |
15:38:57 | Araq | oh sorry, I misread lol |
15:39:41 | Araq | 'spawn' is allowed to block |
15:39:47 | Yardanico | ah |
15:39:59 | Araq | and often does so because "cpu usage is low, so I'm gonna run this on the very same core" |
15:40:29 | Araq | we have a better spawn implementation in the works |
15:40:45 | Yardanico | so it would allow stuff like this? cool |
15:42:10 | Yardanico | well also, in this example "spawn" doesn't block - e.g. this "while" loop can run |
15:45:57 | Araq | dunno, async is too clever for me. |
15:46:08 | * | Sentreen joined #nim |
15:49:39 | * | yglukhov joined #nim |
15:49:47 | * | couven92 joined #nim |
16:00:48 | * | mahmudov joined #nim |
16:04:50 | Yardanico | hmm, nice! https://github.com/IoTone/huenim |
16:04:59 | Yardanico | https://github.com/IoTone |
16:05:32 | Yardanico | well code looks a lot C-like :) |
16:05:58 | Yardanico | and for some reason it uses async http client + waitFor |
16:13:28 | Yardanico | well it seems this was written by someone who's not familiar with Nim |
16:16:05 | * | claudiuinberlin joined #nim |
16:19:24 | * | SusWombat joined #nim |
16:29:16 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:32:29 | * | Matthias247 joined #nim |
16:32:48 | * | BigEpsilon quit (Ping timeout: 240 seconds) |
16:33:08 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:34:11 | * | Matthias247 joined #nim |
16:39:57 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:40:59 | Calinou | Yardanico: by the way, don't include binaries in Git repositories |
16:41:07 | Yardanico | Calinou, I don't |
16:41:07 | Calinou | if you want to publish binaries, use GitHub Releases |
16:41:12 | Calinou | oh, I thought that was you |
16:41:14 | Yardanico | Calinou, it's not my repo :) |
16:41:18 | Calinou | sorry :P |
16:41:22 | Yardanico | I wouldn't do this :P |
16:48:17 | * | nsf joined #nim |
16:49:30 | FromGitter | <mratsim> the `.gitignore` setup for Nim is a bit different from other languages. If you use plain `nim c foo` for compilation, your directories will be littered with executable with no extensions that you must ignore and same thing for nimcache |
16:50:20 | * | yglukhov quit (Remote host closed the connection) |
16:50:20 | Yardanico | well it's the same for other languages |
16:50:40 | Yardanico | most binaries on linux doesn't have extensions |
16:51:09 | TjYoco | This works well enough for me https://github.com/Tyler-Yocolano/nimbomb/blob/master/.gitignore |
16:51:41 | TjYoco | I guess it gets worse the bigger your project is though |
16:53:09 | FromGitter | <zacharycarter> so for a 256x256 ship - CPU Time [ship generation] 2.650s |
16:53:13 | FromGitter | <zacharycarter> that's not toooo bad |
16:53:27 | Yardanico | do you have source? |
16:53:30 | Yardanico | of this benchmark :) |
16:53:45 | FromGitter | <zacharycarter> oh yeah |
16:53:48 | FromGitter | <zacharycarter> one sec |
16:54:18 | FromGitter | <zacharycarter> I'd be curious for any thoughts on the library so far |
16:55:10 | FromGitter | <zacharycarter> https://github.com/zacharycarter/nimrl |
16:55:45 | FromGitter | <zacharycarter> run tests/test.nim from the root of the project directory Yardanico |
16:55:49 | Yardanico | ok :) |
16:56:46 | FromGitter | <zacharycarter> :D |
17:05:07 | * | endragor quit (Remote host closed the connection) |
17:13:00 | * | solitudesf quit (Remote host closed the connection) |
17:13:47 | * | nsf quit (Quit: WeeChat 1.9) |
17:17:41 | * | nsf joined #nim |
17:20:25 | FromGitter | <zacharycarter> can anyone explain why this is segfaulting? |
17:20:46 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59beaeee1081499f1f4223a7] |
17:21:11 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59beaf07bac826f054cc196f] |
17:21:16 | FromGitter | <Yardanico> soomething to do with unsafe things ? :) |
17:21:17 | FromGitter | <Yardanico> freeShared |
17:21:21 | FromGitter | <zacharycarter> nope |
17:21:32 | FromGitter | <zacharycarter> if I remove spaceship.doors[].add(...) everything is fine |
17:21:44 | FromGitter | <Yardanico> This procedure is dangerous! If one forgets to free the memory a leak occurs; if one tries to access freed memory (or just freeing it twice!) a core dump may happen or other memory may be corrupted |
17:22:08 | FromGitter | <zacharycarter> I tried it without shared memory first of course and it blew up with the same issue |
17:23:04 | * | Trustable joined #nim |
17:23:15 | FromGitter | <zacharycarter> something with parallel I think |
17:24:44 | TjYoco | add a lock for the door[] |
17:25:07 | TjYoco | so only one thread can write/read to it at a time |
17:26:21 | FromGitter | <zacharycarter> thanks TjYoco I'll try that |
17:27:43 | TjYoco | I'm just guessing. Maybe import locks; var doorLock: Lock; initLock(doorLock); var spaceship.doors[] {.guard: doorLock.} = @[]; in the generateHallways proc |
17:28:18 | Yardanico | well then parallel wouldn't have any performance impact here :) |
17:29:07 | TjYoco | well split the spaceship into two halves and do that |
17:29:17 | Yardanico | yeah |
17:29:18 | TjYoco | idk haha |
17:31:53 | FromGitter | <zacharycarter> I have another idea |
17:32:08 | FromGitter | <zacharycarter> simplify the problem |
17:32:35 | * | nsf quit (Quit: WeeChat 1.9) |
17:33:12 | * | haha_ quit (Quit: haha_) |
17:39:07 | * | nsf joined #nim |
17:44:41 | FromGitter | <zacharycarter> well I didn't simplify the problem but I'm about to have to |
17:44:47 | FromGitter | <zacharycarter> I tried a lock and that didn't resolve the error |
17:46:23 | * | madmalik quit (Quit: Connection closed for inactivity) |
17:48:47 | * | shashlick joined #nim |
17:49:14 | * | haha_ joined #nim |
17:50:51 | * | yglukhov joined #nim |
17:52:19 | * | nsf quit (Quit: WeeChat 1.9) |
17:54:39 | * | shashlick quit (Ping timeout: 248 seconds) |
17:55:11 | * | BigEpsilon joined #nim |
17:55:34 | * | yglukhov quit (Ping timeout: 264 seconds) |
18:00:48 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
18:02:27 | * | haha_ quit (Quit: haha_) |
18:02:43 | * | yglukhov joined #nim |
18:03:07 | Araq | yglukhov: can we get your threadpool impl for 0.18? |
18:04:01 | * | nsf joined #nim |
18:08:37 | yglukhov | Araq: no promises. parallel requires some labor ( |
18:09:08 | * | TjYoco quit (Quit: Leaving) |
18:10:07 | * | vendethiel- quit (Ping timeout: 248 seconds) |
18:11:39 | * | nsf quit (Quit: WeeChat 1.9) |
18:13:18 | Arrrr | https://github.com/nim-lang/Nim/pull/6032 the more goodest. We need one for enums |
18:14:00 | * | nsf joined #nim |
18:28:56 | * | solitudesf joined #nim |
18:29:41 | * | Guest89124 quit (Ping timeout: 240 seconds) |
18:35:43 | * | haha_ joined #nim |
18:37:22 | * | Guest89124 joined #nim |
18:37:24 | * | haha_ quit (Client Quit) |
18:42:46 | * | yglukhov quit (Remote host closed the connection) |
18:43:49 | FromGitter | <ephja> Arrr: https://github.com/nim-lang/Nim/pull/6180 |
18:48:20 | * | haha_ joined #nim |
18:49:03 | * | haha_ quit (Read error: Connection reset by peer) |
18:49:55 | * | haha_ joined #nim |
18:49:56 | Arrrr | I think it won't happen, Araq is against it. |
18:51:31 | Araq | I don't mind the feature but the implementation is overkill |
18:51:42 | Araq | sorry that I try to care about code quality here |
18:52:21 | Yardanico | well you can manually merge a part of it ? :) |
18:53:06 | Araq | 240 lines to cover a fringe case? come on |
18:53:37 | Araq | 4 new magics, 2 new VM opcodes |
18:53:45 | * | nsf quit (Quit: WeeChat 1.9) |
18:54:06 | Yardanico | Araq, well I'm about length |
18:57:04 | * | nsf joined #nim |
18:57:08 | FromGitter | <ephja> yeah it's kinda big :p |
18:57:40 | Yardanico | length for enums is only 3 lines in the compiler :P |
18:57:56 | FromGitter | <Bennyelg> Im trying to install Nim using tavis.yml and the devel version but I failed to do so :( |
18:58:04 | FromGitter | <Bennyelg> I get something at the end ⏎ /Users/travis/.travis/job_stages: line 57: shell_session_update: command not found |
18:58:09 | FromGitter | <Bennyelg> No Idea how to trace this |
18:58:10 | Yardanico | can you give me your repo? |
18:58:16 | Yardanico | where you've added .travis.yml |
18:58:16 | FromGitter | <Bennyelg> Sure |
18:58:45 | FromGitter | <Bennyelg> https://github.com/Bennyelg/nimPresto/tree/tests_builds |
18:59:13 | Yardanico | ehm, and the link for travis? |
18:59:16 | * | sz0 joined #nim |
18:59:31 | FromGitter | <Bennyelg> at the top of this directory |
18:59:35 | FromGitter | <Bennyelg> https://github.com/Bennyelg/nimPresto/blob/tests_builds/.travis.yml |
18:59:42 | Araq | bennyelg: copy&adapt the travis.yml of my karax project |
18:59:57 | FromGitter | <Bennyelg> OK, I''l try to do it |
19:00:04 | Yardanico | https://github.com/nim-lang/Nim/wiki/BuildServices |
19:00:20 | Yardanico | there's circleci/travis/appveyor |
19:02:38 | * | adeohluwa joined #nim |
19:05:50 | * | def-pri-pub joined #nim |
19:07:35 | * | shashlick joined #nim |
19:07:42 | FromGitter | <ephja> Yardanico: iteration excluding holes is nice too :p |
19:07:44 | * | haha_ quit (Quit: haha_) |
19:12:49 | FromGitter | <ephja> jsgen.nim(1562) createVar "Error: internal error: createVar: tyUserTypeClassInst" should a node with this kind not end up here? |
19:14:42 | Yardanico | any ICE should be reported I think :) |
19:16:10 | FromGitter | <ephja> I'm making slightly less half assed attempts at fixing bugs these days :p |
19:22:05 | * | def-pri-pub quit (Ping timeout: 240 seconds) |
19:24:23 | * | def-pri-pub joined #nim |
19:26:46 | * | BigEpsilon quit (Ping timeout: 264 seconds) |
19:26:59 | def-pri-pub | zacharycarter: I've pushed the latest version of what I'm trying to do. If you could explain how ZGL works, or how to use it properly I'd be appreciative of that. |
19:27:26 | def-pri-pub | The gist of what I'm trying to do is to get that box to rotate about a non-center origin |
19:30:07 | Yardanico | 16 stars for 4000 ! |
19:31:04 | FromGitter | <zacharycarter> def-pri-pub: okay sure |
19:31:26 | * | smt_ joined #nim |
19:31:41 | * | def-pri-pub quit (Ping timeout: 240 seconds) |
19:32:40 | FromGitter | <zacharycarter> I will try to write something up in a few moments |
19:33:49 | * | def-pri-pub joined #nim |
19:33:49 | * | def-pri-pub quit (Changing host) |
19:33:49 | * | def-pri-pub joined #nim |
19:35:18 | * | smt` quit (Ping timeout: 246 seconds) |
19:43:17 | * | yglukhov joined #nim |
19:46:34 | FromGitter | <mratsim> Is it possible to remove compiler flags like “-fno-strict-aliasing” or “-fpermissive” directly from a nimble package with switches? |
19:47:28 | * | yglukhov quit (Ping timeout: 240 seconds) |
19:49:21 | Yardanico | ehm I don't think so |
19:49:50 | Yardanico | ideally, as I said - you may add nvcc as a proper C compiler (in nim source) |
19:51:06 | * | gokr joined #nim |
19:51:57 | FromGitter | <mratsim> I guess I will have to |
19:56:34 | * | yglukhov joined #nim |
20:00:03 | FromGitter | <mratsim> With nvcc, nim c -d:release is broken because -fno-strict-aliasing must be behind -Xcompiler. no release works ⏎ Funnily, nim cpp is broken because of -fpermissive but nim cpp -d:release works >_> |
20:03:08 | * | yglukhov quit (Ping timeout: 240 seconds) |
20:04:54 | * | PMunch quit (Quit: leaving) |
20:07:37 | * | Arrrr quit (Read error: Connection reset by peer) |
20:08:23 | * | mahmudov quit (Ping timeout: 255 seconds) |
20:10:54 | Yardanico | Araq, can I create a list of (most probably) fixed issues (maybe on gist)? because sometimes I'm bored and I'm looking at random nim issues |
20:11:03 | * | def-pri-pub quit (Quit: leaving) |
20:11:13 | Yardanico | and it would be better to have 1 place instead of commenting in every issue :) |
20:13:53 | * | ofelas quit (Quit: shutdown -h now) |
20:19:12 | * | Trustable quit (Remote host closed the connection) |
20:33:34 | * | nsf quit (Quit: WeeChat 1.9) |
20:34:21 | * | Yardanico quit (Remote host closed the connection) |
20:42:14 | * | nsf joined #nim |
20:48:50 | FromGitter | <mratsim> maybe something like https://waffle.io/ would be useful |
20:48:57 | * | xet7 quit (Quit: Leaving) |
20:51:47 | * | nsf quit (Quit: WeeChat 1.9) |
21:03:21 | FromGitter | <mratsim> @Yardanico I found out how to remove the compiler flags. You can overwrite the whole config flags with switches in the .nimble. I don’t know how it interacts with user-defined flags though |
21:08:47 | * | solitudesf quit (Ping timeout: 248 seconds) |
21:11:29 | * | gokr left #nim (#nim) |
21:18:52 | * | nsf joined #nim |
21:21:21 | * | Sentreen quit (Ping timeout: 246 seconds) |
21:26:14 | * | nsf quit (Quit: WeeChat 1.9) |
21:27:34 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:28:53 | * | Serenitor joined #nim |
21:33:21 | shashlick | why does Nim default to fastcall? When interop'ing with C, I end up having to use cdecl or stdcall or end up running into issues. https://stackoverflow.com/questions/5479362/why-is-fastcall-slower-than-stdcall |
21:33:35 | shashlick | I'm on Windows |
21:35:08 | * | Sentreen joined #nim |
21:40:18 | * | TjYoco joined #nim |
21:40:50 | obadz | has anyone nimified the linux kernel headers? I find myself in a deep rabbit whole of c2nim requiring lots and lots of dependencies.. |
21:51:37 | * | TjYoco quit (Quit: Leaving) |
21:52:57 | obadz | it seems that when I "import mod as M", all the symbols in mod are still visible unqualified (i.e. without the M. prefix). Is that expected? |
21:56:38 | FromGitter | <superfunc> obadz: I think you want `from mod as M import nil` |
21:57:19 | FromGitter | <superfunc> I think your example is expected to just provide an alias, not change what gets imported |
21:57:26 | obadz | @superfunc: indeed that is. thx |
21:57:31 | FromGitter | <superfunc> np |
21:57:57 | FromGitter | <superfunc> I wonder if a macro in the stdlib/compiler would be useful for ppl who want that behavior by default |
21:58:51 | obadz | bah it's an odd bit of syntax but I think it's fine as is |
22:00:39 | FromGitter | <superfunc> Sure, it'd be a p easy template though: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59bef087b59d55b8230ac8c1] |
22:03:59 | Serenitor | he I'll use that. the import nil thing is a bit odd indeed. just have to keep in mind that when doing this, you can't use the method syntax any longer: type.proc() instead of proc(type) |
22:05:01 | FromGitter | <superfunc> Ah thats a nice point, thanks |
22:05:23 | FromGitter | <superfunc> I don't mind the default import semantics at all personally, I just know its a bit weird to ppl coming from other langs |
22:05:26 | * | nsf joined #nim |
22:06:51 | obadz | why couldn't you use val.proc() ? |
22:07:25 | * | couven92 quit (Read error: Connection reset by peer) |
22:15:44 | FromGitter | <zacharycarter> def-pri-pub: you around? |
22:26:19 | obadz | So, c2nim produced this type for me: https://gist.github.com/obadz/f2bbee7028e872bc99ef69d7d355e105 — how would I instantiate a value that's essentially x = { ifr_ifrn = "blah", ifr_ifru = 3 } ? |
22:26:31 | federico3 | Can nimPNG be used to generate animated PNGs? |
22:26:47 | obadz | I get type mismatch: got (cshort) but expected 'ifr_ifru_union = object' |
22:39:35 | * | nsf quit (Quit: WeeChat 1.9) |
22:40:25 | * | nsf joined #nim |
22:57:10 | FromGitter | <zacharycarter> def-pri-pub: I replied |
22:57:24 | * | nsf quit (Quit: WeeChat 1.9) |
22:57:25 | * | xet7 joined #nim |
23:00:35 | * | Jesin joined #nim |
23:08:27 | * | sz0 quit (Quit: Connection closed for inactivity) |
23:19:21 | * | arnetheduck quit (Ping timeout: 240 seconds) |
23:20:48 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
23:23:45 | FromGitter | <Varriount> How is it that people actually like javascript. |
23:24:10 | FromGitter | <Varriount> when something like this exists: https://stackoverflow.com/questions/4059147/check-if-a-variable-is-a-string |
23:26:10 | * | Sembei quit (Ping timeout: 264 seconds) |
23:41:35 | * | pilne joined #nim |
23:56:53 | * | jsgrant quit (Remote host closed the connection) |