00:05:37 | * | cyberjpn joined #nim |
00:30:05 | * | mosORadi quit (Quit: Connection closed for inactivity) |
00:30:52 | * | vlad1777d quit (Ping timeout: 245 seconds) |
00:52:57 | * | theelous3_ quit (Ping timeout: 245 seconds) |
01:02:12 | * | xet7 quit (Remote host closed the connection) |
01:08:07 | * | cyberjpn quit (Quit: WeeChat 2.4) |
01:08:57 | * | cyberjpn joined #nim |
01:11:19 | * | rayman22201 joined #nim |
01:22:31 | * | rnrwashere quit (Ping timeout: 276 seconds) |
01:24:24 | * | JappleAck quit (Remote host closed the connection) |
01:27:18 | * | rnrwashere joined #nim |
01:31:17 | * | JappleAck joined #nim |
02:00:17 | * | banc quit (Quit: Bye) |
02:21:54 | * | banc joined #nim |
02:47:38 | * | leorize quit (Remote host closed the connection) |
02:48:17 | * | leorize joined #nim |
03:27:21 | * | JappleAck left #nim (#nim) |
03:29:19 | * | JappleAck joined #nim |
03:31:56 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
03:35:18 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:38:22 | * | cyberjpn quit (Ping timeout: 258 seconds) |
03:41:54 | FromGitter | <kaushalmodi> Araq: does this make any sense? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc915821cd0b8307da09a14] |
03:42:51 | FromGitter | <kaushalmodi> this is in continuation of my debug of why that `boolToBit` returned random uint8 values (`Bit` is type alias of `byte` aka `uint8`) |
03:53:36 | FromGitter | <jrfondren> whatever the test, you're setting result to one of two values and you were getting others. |
03:53:45 | FromGitter | <jrfondren> what was the codegen for the buggy code? |
03:54:36 | FromGitter | <jrfondren> find ~/.cache/nim -name the_filename_of_the_nim_module.c |
03:55:21 | FromGitter | <jrfondren> I think it has to be a codegen bug that result was left undefined. |
04:01:10 | FromGitter | <kaushalmodi> this seems to be the generated cpp of the buggy code: http://ix.io/1HIe (when using `if inp == true:`) |
04:02:25 | FromGitter | <kaushalmodi> and here's the working code: http://ix.io/1HIf (when using `if $inp == "true":`) |
04:03:42 | FromGitter | <jrfondren> and from the buggy version you get invalid result values? |
04:04:16 | FromGitter | <kaushalmodi> yes |
04:04:46 | FromGitter | <jrfondren> do you see that when you add an echo to these functions as well? |
04:06:35 | FromGitter | <kaushalmodi> yes .. with: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc91b4b8446a6023ea630a7] |
04:06:47 | FromGitter | <kaushalmodi> I get: http://ix.io/1HIg/text |
04:06:58 | FromGitter | <jrfondren> what's the codegen for that? |
04:07:24 | FromGitter | <kaushalmodi> http://ix.io/1HIh |
04:08:22 | FromGitter | <kaushalmodi> note that this is using `nim cpp` (cannot use `nim c` on this project) |
04:08:36 | * | lestus joined #nim |
04:08:37 | FromGitter | <jrfondren> :/ |
04:09:14 | FromGitter | <jrfondren> do you get the bug if you compile without -d:release ? |
04:09:39 | FromGitter | <jrfondren> although I don't think that could actually matter in this case. |
04:10:41 | FromGitter | <kaushalmodi> wow, no! |
04:10:50 | FromGitter | <kaushalmodi> bug goes away without -d:release |
04:11:40 | FromGitter | <jrfondren> you don't get a new error? the bug just goes away? |
04:12:12 | FromGitter | <jrfondren> it could be that there's an exception, but you're catching it |
04:12:41 | FromGitter | <kaushalmodi> there isn't any error to begin with |
04:12:47 | FromGitter | <kaushalmodi> I get functionally wrong values |
04:13:05 | FromGitter | <jrfondren> in this case it'd be an error elsewhere in your code. |
04:13:12 | FromGitter | <kaushalmodi> here's the code gen with `if inp == true` and without release: http://ix.io/1HIk |
04:13:24 | FromGitter | <kaushalmodi> yeah, random crashes |
04:13:50 | FromGitter | <kaushalmodi> because that value which must be only 0 or 1 crosses over to the other language compiler where it pukes |
04:14:05 | FromGitter | <kaushalmodi> .. if that value is not actually 0 or 1 |
04:14:09 | FromGitter | <jrfondren> suppose for example you're writing to some wildly-off index of an array, and normally catch and discard the write as an IndexError, but in -d:release that write's allowed to happen, and it's randomly breaking this code. |
04:15:25 | FromGitter | <kaushalmodi> I am working with a c++ code base that returns a nested struct with may be 200 total elements in total and about 20 of those are bools |
04:16:04 | FromGitter | <kaushalmodi> I am converting those bools to Nim bytes and passing that struct along to SystemVerilog where those bytes (uint8) are mapped to bits (which can be 0 or 1) |
04:16:51 | FromGitter | <jrfondren> how about -d:release --boundChecks:on ? |
04:17:14 | FromGitter | <kaushalmodi> I am not dealing with arrays here, but will try that switch |
04:18:06 | lestus | just came on to express my thank you to all the contributors and creators of nim, you've done wonderful work, nim is a dream come true for me |
04:18:39 | FromGitter | <kaushalmodi> @jrfondren nope, same error (different rand values) with that switch |
04:18:42 | FromGitter | <kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc91e223d78aa6c03c47566] |
04:22:31 | FromGitter | <jrfondren> aye so it's not the IndexError story. there are other checks though. if you still get the error with -d:release --checks:on --assertions:on , then it's probably more of a "there's undefined behavior somewhere and therefore the C compiler feels that it has license to apply nonsensical optimizations to it like removing critical parts of control flow" |
04:23:10 | FromGitter | <jrfondren> in the latter case, you might find that you don't get the bug with a different compiler. |
04:23:20 | * | nsf joined #nim |
04:24:33 | FromGitter | <jrfondren> ah, or by changing --opt |
04:26:57 | FromGitter | <kaushalmodi> yep! `-d:release --opt:none` results in bugfree behavior |
04:27:10 | FromGitter | <kaushalmodi> the other switches you suggested earlier made no difference |
04:29:28 | FromGitter | <jrfondren> OK, that still makes it a codegen bug. But I don't see a problem in the code seen so far. |
04:32:08 | FromGitter | <kaushalmodi> yeah, the code seems straightforward even to me non-C/C++ coder |
04:33:41 | * | druonysus quit (Ping timeout: 252 seconds) |
04:34:21 | FromGitter | <jrfondren> you might try -d:release --opt:none -t:"-O2" |
04:34:36 | FromGitter | <jrfondren> Nim does -O3 on --opt:speed |
04:35:58 | FromGitter | <kaushalmodi> -O2 spoiled it again |
04:36:19 | FromGitter | <kaushalmodi> both --opt:speed and --opt:size don't work either |
04:36:25 | FromGitter | <jrfondren> yikes. |
04:36:36 | FromGitter | <kaushalmodi> I mean, what kind of optimization is this? |
04:36:58 | FromGitter | <kaushalmodi> If I code to set a var to 0 or 1, why would any other rand value make sense to the compiler? |
04:37:55 | FromGitter | <kaushalmodi> though, thanks for taking your time in helping me find this workaround |
04:38:11 | FromGitter | <kaushalmodi> there's this one thing to try if I see funny results like these again |
04:38:19 | FromGitter | <jrfondren> an example is `int x = 0; while (x++ > 0) { something(); }`. A C compiler can look at that, and reason: x starts as 0. x++ only increases the numbers that x could be during the loop. The test then is for something that will *always* be true. Great, I can optimize this code by removing the test and making it an infinite loop, since it's infinite anyway. |
04:38:36 | * | rnrwashere quit (Remote host closed the connection) |
04:38:45 | FromGitter | <kaushalmodi> yes, that makes sense there |
04:39:18 | FromGitter | <kaushalmodi> but here I am compiling a .so, which the compiler does not know how it's going to get used by another application |
04:39:31 | FromGitter | <jrfondren> well, I'd prefer that C compilers recognize that they're always compiling for a target architecture and that none of those target architectures have infinite-width integers. |
04:40:19 | FromGitter | <jrfondren> I think what must be happening in your case is some change to the control flow, so that result isn't always set, and your random values are undefined memory on the stack. |
04:41:12 | FromGitter | <jrfondren> in an early pass the C compiler might say: well there's an either/or here and both of them set result, so I can remove this earlier set of result to 0 as dead code. And then in a later pass something creates a third way through the either/or. |
04:42:38 | FromGitter | <kaushalmodi> I spent 2 nights and an entire work day to try to figure out that boolToBit bug :P |
04:42:39 | FromGitter | <jrfondren> anyway, to get the bug fixed, since you don't want to make your code public and can't cut it down while retaining the bug, maybe you can make your code privately available to one of the devs who can look into the codegen issue. |
04:43:53 | FromGitter | <jrfondren> I haven't been doing Nim for very long, but already I've got "try it without -d:release" and "use nim check" as important troubleshooting steps :) |
04:44:09 | FromGitter | <kaushalmodi> yep, thank you! |
04:45:42 | FromGitter | <kaushalmodi> I think that I'll need to go through NDA, etc. to share the full code, which will also pull in a lot of proprietary C++ code |
04:46:07 | FromGitter | <kaushalmodi> .. which would be necessary to compile this whole Nim project |
04:46:59 | * | sentreen quit (Read error: Connection reset by peer) |
04:47:08 | FromGitter | <kaushalmodi> great! just when I was about to declare the day successful: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc924cc4b4cb471d9888fde] |
04:47:21 | FromGitter | <kaushalmodi> 32-bit worked, 64-bit crashed :P |
04:49:53 | * | sentreen joined #nim |
04:52:22 | * | rayman22201 joined #nim |
04:54:31 | * | rnrwashere joined #nim |
05:35:18 | * | lestus quit (Quit: leaving) |
05:46:31 | * | rnrwashere quit (Remote host closed the connection) |
05:50:31 | * | absolutejam3 joined #nim |
06:07:13 | * | narimiran joined #nim |
06:18:10 | * | solitudesf- joined #nim |
06:33:12 | * | solitudesf- quit (Quit: Leaving) |
06:33:45 | * | solitudesf joined #nim |
06:36:03 | Araq | kaushalmodi: run your code through 'valgrind' |
06:38:19 | * | rokups joined #nim |
06:50:37 | * | absolutejam3 quit (Ping timeout: 246 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:01:57 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
07:04:37 | * | gmpreussner joined #nim |
07:17:47 | * | narimiran quit (Ping timeout: 246 seconds) |
07:34:49 | * | vlad1777d joined #nim |
07:52:00 | FromGitter | <bluenote10> Any spontaneous ideas how to pass an ad-hoc AST involving acc-quoted ops into a compile time proc? Something like this, but that doesn't compile: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc9502097dcb371d84318b6] |
07:56:05 | leorize | bluenote10: use a macro? |
07:58:55 | FromGitter | <jrfondren> s/proc/macro/ and add :untyped and that works as is. |
07:59:19 | FromGitter | <jrfondren> well, it does something. |
07:59:41 | FromGitter | <jrfondren> I'm not sure what 16x '+' symbols is telling me |
08:00:18 | FromGitter | <jrfondren> ah that looks to be about the number of + candidates |
08:01:54 | * | neceve joined #nim |
08:02:21 | FromGitter | <bluenote10> I cannot use a macro, because I want to write a bunch of unit tests for some existing compile time procs. So I cannot change these compile time procs to macros -- they are used by some top level macros, but I'm trying to test them on a lower level. |
08:04:05 | FromGitter | <bluenote10> think of writing tests for ``proc parseUserAst(n: NimNode): ParsingResult`` |
08:04:12 | * | solitudesf quit (Ping timeout: 245 seconds) |
08:04:12 | FromGitter | <jrfondren> ok, I believe your code fails because `+` isn't the usual stropping syntax, but is quasiquote syntax |
08:04:33 | FromGitter | <jrfondren> yeah your exact code with a + b instead works |
08:05:41 | FromGitter | <bluenote10> yes the problem only comes from the acc quoting. The problem is that the DSL I'm designing (and I want to test) relies on acc quotes, so I cannot avoid them ;) |
08:15:42 | * | stefanos82 joined #nim |
08:20:37 | FromGitter | <jrfondren> quote says it takes a second argument that changes the quoting but I'm not sure how that works |
08:22:22 | FromGitter | <bluenote10> yeah me neither, because if I pass in a block statement I don't think I can pass in the ``op`` as a second arg. |
08:23:33 | FromGitter | <bluenote10> Wrapping it in a macro like this (https://github.com/bluenote10/oop_utils/blob/5a680c025f9f95b57025fb301704dcc4679b07c4/tests/standard_class/parse_self_block_test.nim#L36) also doesn't work (on the bottom of the file you can see the use case) |
08:23:33 | FromGitter | <jrfondren> I feel like duplicating the magic should work but it doesn't either: ⏎ ⏎ ```proc quote2*(bl: typed, op = "!!"): NimNode {.magic: "QuoteAst", noSideEffect.}``` [https://gitter.im/nim-lang/Nim?at=5cc957852e2caa1aa6ebbbae] |
08:41:41 | * | Vladar joined #nim |
08:47:15 | FromGitter | <mratsim> @bluenote10, unfortunately changing the quotation symbol is broken as well, there is a bug (maybe mine) on that ... |
08:48:28 | FromGitter | <mratsim> ah yes it's mine: https://github.com/nim-lang/Nim/issues/7589 |
08:49:48 | FromGitter | <mratsim> The discussion on the new quoting AST is here: https://github.com/nim-lang/RFCs/issues/122 |
08:56:04 | FromGitter | <jrfondren> I'm not happy with how this looks but I'm happy it's possible: https://gist.github.com/jrfondren/829889fe6519118a71fb1ce76386e972 . I started out wanting "%maturity" syntax though, which failed strangely. |
08:57:25 | * | theelous3_ joined #nim |
08:59:15 | FromGitter | <bluenote10> @mratsim oh indeed that might be the same problem, thanks for the links, maybe I can find a hint for workarounds there |
09:00:44 | FromGitter | <mratsim> @jrfondren are you writing a D&D game? |
09:00:51 | FromGitter | <mratsim> no workaround :P |
09:01:01 | FromGitter | <mratsim> I wrote my code differently AFAIK |
09:01:16 | FromGitter | <jrfondren> no. I just like D&D-themed examples, rather than Foo, Bar, a, b, c. |
09:02:42 | FromGitter | <mratsim> btw are you still working on Kadro @bluenote10 ? |
09:05:27 | * | cyberjpn joined #nim |
09:05:54 | FromGitter | <jrfondren> that "accuracy", "maturity" stuff isn't D&D though. It's mod_security rules. |
09:07:30 | * | theelous3_ quit (Ping timeout: 250 seconds) |
09:12:28 | FromGitter | <bluenote10> @mratsim it's still on my todo list, but I'm waiting for write tracking to continue. |
09:24:01 | * | slugm joined #nim |
10:23:00 | * | clyybber joined #nim |
10:28:32 | clyybber | leorize: Hi, did you succeed in creating a testcase for the memory corruption with --newruntime? |
10:28:41 | * | theelous3_ joined #nim |
10:29:07 | leorize | clyybber: the mem corruption was a known bug https://github.com/nim-lang/Nim/issues/9799 |
10:30:09 | leorize | koch was using a global string variable, and that variable got wiped out too early |
10:32:06 | clyybber | leorize: I'm facing memory corruption with --newruntime too, but I'm not using .global. anywhere in my code |
10:32:21 | leorize | any global / top-level variable |
10:32:35 | leorize | they are all subjected to this bug |
10:32:40 | clyybber | damn |
10:38:13 | leorize | clyybber: here's a sample: http://ix.io/1HJg |
10:38:35 | leorize | ofc this will still print "string" because nothing has overridden that memory area yet |
10:39:11 | clyybber | so destructors don't free immediately? |
10:39:33 | clyybber | thats why no segfault is happening right? |
10:39:46 | leorize | `free` merely mark an area as "unused", for performance reasons |
10:40:13 | clyybber | I guessed so, thats cool. |
10:40:35 | clyybber | is there any work around you know of? |
10:41:55 | clyybber | Araq: Maybe #9799 should be labeled high priority? |
10:42:06 | leorize | move everything out of the top-level :p |
10:42:19 | leorize | not everyday you got an excuse to make your program usable as a library :p |
10:44:55 | clyybber | shouldn't be too hard. For some reason none of my procs rely on global variables |
10:46:25 | leorize | !eval echo NimVersion |
10:46:27 | NimBot | 0.19.4 |
10:51:51 | FromGitter | <Clyybber> !eval #!/usr/bin/env -S nim --d:something ⏎ echo defined(something) |
10:51:53 | NimBot | <no output> |
10:52:46 | FromGitter | <Clyybber> !eval #!/usr/bin/env -S nim -d:something ⏎ echo defined(something) |
10:52:47 | NimBot | <no output> |
11:01:12 | FromGitter | <liquid600pgm> is there any way to download and unpack a tar.gz file in nimterop? |
11:13:21 | * | cybj joined #nim |
11:21:03 | shashlick | It could be added |
11:21:43 | shashlick | There's an extract function that does zip i think |
11:22:06 | FromGitter | <liquid600pgm> yeah, there's extractZip |
11:22:25 | FromGitter | <liquid600pgm> but idk if it works for tar.gz |
11:23:33 | shashlick | Nope |
11:24:27 | shashlick | PR's welcome :) |
11:24:28 | FromGitter | <liquid600pgm> what I'd like to do is to download the freetype sources at compile time, unfortunately they're not hosted in a git repo afaik |
11:24:57 | shashlick | There might be a mirror |
11:25:37 | shashlick | You could always use static exec to run tar |
11:25:47 | shashlick | But that won't be cross platform |
11:26:10 | FromGitter | <liquid600pgm> I know that, that's why I want to avoid doing this |
11:26:11 | shashlick | Windows is a pain |
11:26:29 | FromGitter | <liquid600pgm> I found this http://git.savannah.gnu.org/cgit/freetype/freetype2.git/ which seems to be the official git repo for freetype |
11:28:03 | * | ng0 joined #nim |
11:30:28 | shashlick | There's also @dom96's untar package |
11:30:48 | shashlick | @Araq - is https://github.com/nim-lang/Nim/pull/11148 good to go? |
11:38:23 | shashlick | @dom96 - there's this https://github.com/nim-lang/nimble/pull/643 |
11:43:48 | * | cyberjpn quit (Ping timeout: 244 seconds) |
11:44:18 | * | lritter joined #nim |
11:49:37 | xace | is breaking Nimbot encouraged? |
11:50:09 | FromGitter | <liquid600pgm> please don't `staticExec("rm -rf /")` |
11:50:21 | FromGitter | <kayabaNerve> Do? |
11:50:43 | FromGitter | <kayabaNerve> :P |
11:58:08 | FromGitter | <dom96> @shashlick: looks good |
11:58:13 | * | cyberjpn joined #nim |
11:59:13 | FromGitter | <dom96> Xace: you can't break NimBot. You can break the playground though. These two are distinct :) |
12:03:03 | xace | dom96: does it have a webinterface that is open to the public? |
12:03:14 | * | uptime quit (Excess Flood) |
12:03:21 | leorize | play.nim-lang.org? |
12:03:38 | xace | leorize: yeah, seems to be it :) |
12:07:49 | FromGitter | <liquid600pgm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc98c15b4700e023d02c461] |
12:07:55 | FromGitter | <liquid600pgm> what does that mean? |
12:08:06 | FromGitter | <liquid600pgm> those pre-compiled headers, that is |
12:10:22 | shashlick | @dom96 ok thanks merging |
12:11:10 | FromGitter | <liquid600pgm> I'm getting the following error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc98cde3b6cb0686a84752d] |
12:11:26 | FromGitter | <liquid600pgm> seems strange since I use GCC, and not Visual C++ |
12:11:29 | * | uptime joined #nim |
12:25:38 | FromGitter | <liquid600pgm> shashlick: is there any way of doing something line `#inclide FT_FREETYPE_H` in nimterop? |
12:25:46 | FromGitter | <liquid600pgm> like* |
12:28:17 | * | uptime quit (Excess Flood) |
12:35:26 | * | uptime joined #nim |
12:35:41 | * | Snircle joined #nim |
12:39:03 | shashlick | cDefine maybe? |
12:39:41 | * | uptime quit (Excess Flood) |
12:43:59 | * | uptime joined #nim |
12:44:20 | FromGitter | <liquid600pgm> nope, not the thing I need |
12:46:46 | FromGitter | <liquid600pgm> I tried to import the header directly, but it raises an AssertionError (toast fails) |
13:04:21 | FromGitter | <genotrance> How do they handle that include in their make file |
13:11:02 | FromGitter | <genotrance> Looks like it is defined in http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/internal/internal.h |
13:11:37 | FromGitter | <genotrance> Need to make sure your include paths are set correctly and that the right #defines are set |
13:11:59 | FromGitter | <genotrance> Their configure or cmake scripts must be doing a bunch of stuff |
13:21:02 | FromGitter | <mratsim> so ugly: https://github.com/nim-lang/Nim/pull/11145 <//< |
13:22:06 | FromGitter | <jrfondren> ugliness is what he was going for |
13:22:56 | FromGitter | <mratsim> That's probably a critical hit |
13:23:24 | FromGitter | <jrfondren> oh, or rather: <Araq> it is allowed to be ugly btw |
13:33:06 | * | solitudesf joined #nim |
13:37:31 | * | solitudesf quit (Ping timeout: 258 seconds) |
13:41:21 | * | arecaceae quit (Remote host closed the connection) |
13:41:41 | * | arecaceae joined #nim |
14:00:31 | * | slugm quit (Remote host closed the connection) |
14:00:46 | * | slugm joined #nim |
14:15:26 | federico3 | https://github.com/nim-lang/Nim/blob/737fff5902772485537b4ff12ec5002bd48e3d55/changelog.md was the subex module deprecated before moving it to the graveyard? |
14:17:27 | * | rnrwashere joined #nim |
14:20:03 | * | cyberjpn quit (Ping timeout: 245 seconds) |
14:20:10 | * | rnrwashere quit (Remote host closed the connection) |
14:20:59 | * | rnrwashere joined #nim |
14:21:03 | * | solitudesf joined #nim |
14:28:32 | * | rnrwashere quit (Remote host closed the connection) |
14:38:00 | FromGitter | <liquid600pgm> @genotrance afaik ther's just one include path, and that is `(freetype_root)/include` |
14:49:48 | * | Snircle quit (Ping timeout: 244 seconds) |
15:00:53 | * | rnrwashere joined #nim |
15:05:08 | * | rnrwashere quit (Remote host closed the connection) |
15:07:16 | * | rnrwashere joined #nim |
15:10:15 | * | Tyresc joined #nim |
15:10:49 | * | arecaceae quit (Remote host closed the connection) |
15:11:08 | * | arecaceae joined #nim |
15:31:12 | shashlick | @liquid600pgm - did you figure it out? |
15:31:23 | FromGitter | <liquid600pgm> nope |
15:31:55 | shashlick | okay what do you have so far? i can try |
15:31:58 | shashlick | and win/lin? |
15:32:38 | FromGitter | <liquid600pgm> linux, give me a sec to set up my coding env (fresh OS install) |
15:46:03 | shashlick | @liquid600pgm - looks like it only gets set if FT2_BUILD_LIBRARY is defined |
15:46:08 | shashlick | cDefine("FT2_BUILD_LIBRARY") |
15:47:09 | * | rnrwashere quit (Remote host closed the connection) |
15:57:11 | FromGitter | <liquid600pgm> added that, but now I get a bunch of other errors |
15:57:21 | FromGitter | <liquid600pgm> I'll trace all of those down and set the appropriate switches |
15:57:33 | shashlick | hold i'm making a wrapper |
15:57:43 | shashlick | need to make an h file since |
15:57:50 | shashlick | https://www.freetype.org/freetype2/docs/tutorial/step1.html |
15:58:04 | shashlick | we need all the macro stuff in one place |
16:07:41 | shashlick | am stuck with FT_RasterRec which is undefined |
16:07:59 | * | ryukoposting joined #nim |
16:21:58 | shashlick | @liquid600pgm: so I got everything except two enums which are too complicated |
16:22:02 | shashlick | ideally you don't need them |
16:22:44 | shashlick | so create an h file with two lines - #include "ft2build.h", #include FT_FREETYPE_H |
16:23:37 | shashlick | and use this wrapper - http://ix.io/1HKQ/nim |
16:24:10 | shashlick | change that a.h to whatever you call your h file |
16:24:32 | shashlick | now you need to either passL or cCompile the rest of the lib in |
16:25:23 | shashlick | freetype freetype2 nim wrapper using nimterop for all those googlers out there |
16:26:38 | shashlick | you might want to add the gitPull and related calls above that and fix the relative paths |
16:27:32 | FromGitter | <liquid600pgm> thanks for your help! |
16:29:23 | * | xet7 joined #nim |
16:29:39 | shashlick | here's what the output looks like though it won't compile in isolation since it needs those opaque objects - http://ix.io/1HKW/nim |
16:30:22 | * | slugm quit (Read error: Connection reset by peer) |
16:30:43 | * | slugm joined #nim |
16:49:21 | * | ryukoposting quit (Quit: Lost terminal) |
16:49:27 | * | rnrwashere joined #nim |
16:56:24 | FromGitter | <SolitudeSF> can anybody tell me why this doesnt compile (`Error: undeclared identifier: 'convert'`) and if its a know bug or i am retarded? https://gist.github.com/SolitudeSF/1ee4a11adb60e6ec32a3a885d1e281bc |
16:56:56 | FromGitter | <SolitudeSF> it compiles if i change in `test` proc `HSlice` to `HSlice[int, int]` |
16:57:32 | shashlick | export convert? |
16:57:34 | shashlick | convert* |
16:59:27 | FromGitter | <SolitudeSF> i dont understand why i should. if i remove implicit generic from test it compiles with convert unexported |
17:02:13 | shashlick | okay never mind, you aren't using convert outside |
17:02:16 | clyybber | looks like a bug to me |
17:03:35 | clyybber | probably because of the generic instantiation invoking varargs to be resolved in module b.nim instead of a.nim |
17:06:38 | * | rnrwashere quit (Remote host closed the connection) |
17:12:18 | * | rnrwashere joined #nim |
17:13:08 | FromGitter | <mratsim> HSlice is a generic, so test is a generic and all symbols in a generic proc must be available and resolved in the calling context |
17:13:16 | FromGitter | <mratsim> it might work with mixin convert |
17:14:38 | FromGitter | <mratsim> If it doesn't, I think it's different enough from my previous generics symbol resolution issue, but even if you don't create a new issue you can still add your test case to this meta discussion: https://github.com/nim-lang/Nim/issues/8677 |
17:19:23 | * | jjido joined #nim |
17:24:53 | * | narimiran joined #nim |
17:29:19 | * | neceve quit (Remote host closed the connection) |
17:33:23 | * | rokups quit (Quit: Connection closed for inactivity) |
17:34:49 | * | zyklon quit (Quit: Konversation terminated!) |
17:34:51 | * | uvegbot joined #nim |
17:40:28 | * | Snircle joined #nim |
17:47:23 | * | Trustable joined #nim |
17:50:12 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:51:04 | FromDiscord_ | <deeuu> theme |
17:52:06 | * | thomasross quit (Remote host closed the connection) |
17:52:20 | * | thomasross joined #nim |
17:55:18 | FromGitter | <liquid600pgm> any way I can get rid of unnecessary font format drivers from FreeType? I tried compiling only the TrueType and OpenType ones, but there were a bunch of linker errors |
17:56:15 | FromGitter | <liquid600pgm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc9ddbf3d78aa6c03c9afae] |
17:58:53 | disruptek | SolitudeSF: weirdly, if you add a call to test in same file where it is defined, it will compile and run (calling test twice). |
17:59:27 | FromGitter | <genotrance> @liquid600pgm - there might be some #defines you can set/unset to limit it |
18:03:58 | * | vlad1777d quit (Ping timeout: 250 seconds) |
18:05:24 | * | vlad1777d joined #nim |
18:06:32 | shashlick | seems like you could try commenting out some modules here - http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftmodule.h |
18:08:14 | FromGitter | <liquid600pgm> aw crap, I suppose editing that file won't be very easy |
18:08:39 | FromGitter | <liquid600pgm> I guess I could write to it after pulling it from git |
18:09:38 | shashlick | ya you can at compile time in a static block |
18:09:49 | shashlick | readFile and writeFile should work i think |
18:09:52 | shashlick | i do that in nimterop |
18:10:00 | FromGitter | <liquid600pgm> I'm just reading the CUSTOMIZING file, and it appears I can override FT_CONFIG_MODULES_H |
18:10:09 | shashlick | https://github.com/nimterop/nimterop/blob/master/nimterop/setup.nim#L25 |
18:11:01 | FromGitter | <liquid600pgm> yeah but I still need a custom ft2build.h |
18:11:08 | FromGitter | <liquid600pgm> I'll stay with the writeFile method |
18:11:31 | shashlick | what are you chanign in ft2build.h |
18:11:54 | FromGitter | <liquid600pgm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cc9e16a4b4cb471d98dbca8] |
18:12:02 | shashlick | you could just add #include FT_FREETYPE_H to the bottom of that file and not need an extra a.h like i did |
18:12:53 | shashlick | ya but just easier to edit the main file and reset it with gitReset() at the end |
18:13:14 | shashlick | since it will be in your nim code |
18:26:07 | clyybber | solitudesf: I think that wont work when you call it with a differently typed HSlice |
18:27:18 | FromGitter | <liquid600pgm> I still get the same linker errors, not sure what I'm doing wrong https://github.com/liquid600pgm/rapid/blob/master/src/rapid/lib/freetype.nim |
18:31:05 | shashlick | am trying locally |
18:31:24 | shashlick | you could throw out freetype_import.h and add that one line to ft2build.h like i mentioned |
18:32:10 | shashlick | i could nim c freetype.nim and it compiled fine |
18:32:19 | shashlick | of course, nothing is being used so how did you test this |
18:32:33 | FromGitter | <liquid600pgm> just nim c freetype.nim |
18:32:50 | shashlick | compiled fine for me on ubuntu |
18:32:52 | FromGitter | <liquid600pgm> I also tried cDisableCaching but no luck |
18:33:11 | FromGitter | <liquid600pgm> I also removed the freetype_src directory, no luck |
18:37:06 | * | Trustable quit (Remote host closed the connection) |
18:38:55 | shashlick | yep, tried FT_Init_FreeType() and it worked - returned 0 |
18:39:08 | FromGitter | <liquid600pgm> huh, strange |
18:39:26 | shashlick | trying the tutorial - https://www.freetype.org/freetype2/docs/tutorial/step1.html |
18:41:57 | shashlick | opened a ttf face also |
18:42:21 | shashlick | probably remove nimcache |
18:45:04 | FromGitter | <liquid600pgm> that fixed the issue, thank you |
18:45:15 | shashlick | awesome work! |
18:45:32 | FromGitter | <liquid600pgm> I wouldn't succeed without you :) thanks a lot |
18:45:33 | shashlick | any general feedback using nimterop? what more can be done to make it better |
18:46:02 | FromGitter | <liquid600pgm> it's already a very nice library, it makes wrapping libraries a piece of cake |
18:46:36 | FromGitter | <liquid600pgm> haven't used it enough to notice anything that could be improved, but I guess that will change as time goes and I wrap more libs ;) |
18:47:00 | shashlick | just tried freetype.nim on windows - it just works! |
18:47:18 | FromGitter | <liquid600pgm> nice! |
18:47:34 | FromGitter | <liquid600pgm> too bad t_window.nim doesn't work :( there's some strange segfault I'm yet to debug |
18:58:00 | * | solitudesf quit (Quit: Leaving) |
19:01:10 | * | slugm quit (Remote host closed the connection) |
19:01:33 | * | slugm joined #nim |
19:10:27 | * | solitudesf joined #nim |
19:15:48 | FromGitter | <kaushalmodi> shashlick: your nimterop library, work on the static nightly builds and you are just awesome |
19:17:25 | shashlick | Thanks buddy |
19:19:32 | FromGitter | <alehander42> yeah you seem to do very useful stuff <3 |
19:19:33 | FromGitter | <alehander42> <3 |
19:29:22 | FromGitter | <mratsim> +1 |
19:36:07 | FromGitter | <zetashift> yes much appreciated! ;D |
19:38:36 | narimiran | +1 |
19:39:13 | FromGitter | <liquid600pgm> +1 |
19:45:09 | * | Vladar quit (Remote host closed the connection) |
19:45:56 | shashlick | oh wow thanks everyone 🙂 |
20:06:22 | * | slugm quit (Ping timeout: 276 seconds) |
20:10:56 | * | jjido joined #nim |
20:15:04 | * | luis_ joined #nim |
20:16:42 | luis_ | Dear all, is there any implementation for a multidimensional array on Nim? Like R's data.table? |
20:20:59 | * | nsf quit (Quit: WeeChat 2.4) |
20:26:02 | FromDiscord_ | <kodkuce> soory newer used R , duno if [][] works |
20:28:44 | * | narimiran quit (Ping timeout: 244 seconds) |
20:36:26 | * | luis_ quit (Quit: luis_) |
20:37:09 | * | luis_ joined #nim |
20:45:13 | * | rnrwashere quit (Remote host closed the connection) |
20:55:02 | * | luis_ quit (Ping timeout: 245 seconds) |
20:55:36 | FromGitter | <gogolxdong> Who uses ryzen CPU, is there any issue to compile Nim on ryzen CPUs? |
21:02:47 | FromGitter | <mratsim> @luis_ multidimensional arrays and R data.table are different |
21:03:16 | * | fredrik92 joined #nim |
21:03:50 | FromGitter | <mratsim> for 2D arrays you have neo: https://github.com/unicredit/neo ⏎ for Nd arrays you have Arraymancer: https://github.com/mratsim/Arraymancer ⏎ for dataframes you have nimdata: https://github.com/bluenote10/NimData |
21:03:53 | FromDiscord_ | <kodkuce> i have 2400g |
21:04:29 | FromDiscord_ | <kodkuce> gogolxdong tought i dient try to compile anything soon but 3-4 months ago it owrke dnp |
21:05:39 | * | couven92 quit (Disconnected by services) |
21:05:45 | * | fredrik92 is now known as couven92 |
21:05:55 | FromGitter | <mratsim> @Araq, why was nnkVarTuple needed, isn't nnkPar enough? |
21:06:06 | * | fredrik92 joined #nim |
21:20:57 | * | xet7 quit (Quit: Leaving) |
21:36:18 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:39:11 | * | Tyresc quit (Quit: WeeChat 2.5-dev) |
21:39:28 | * | rnrwashere joined #nim |
21:44:31 | * | rnrwashere quit (Ping timeout: 276 seconds) |
21:48:43 | * | clyybber quit (Quit: WeeChat 2.4) |
22:08:12 | * | rnrwashere joined #nim |
22:11:10 | * | solitudesf quit (Ping timeout: 276 seconds) |
22:12:04 | * | rnrwashe_ joined #nim |
22:12:12 | * | rnrwashe_ quit (Remote host closed the connection) |
22:12:18 | * | rnrwashe_ joined #nim |
22:13:01 | * | rnrwashere quit (Ping timeout: 268 seconds) |
22:31:30 | * | lritter quit (Quit: Leaving) |
22:39:05 | * | rnrwashe_ quit (Remote host closed the connection) |
22:42:00 | * | rnrwashere joined #nim |
22:53:24 | FromGitter | <lf-araujo> @mratsim Thank you! This is what I was looking... |
22:54:35 | * | NimBot joined #nim |
22:58:55 | * | luis_ joined #nim |
23:04:02 | * | rnrwashere quit (Remote host closed the connection) |
23:06:18 | * | rnrwashere joined #nim |
23:12:22 | * | couven92 quit (Quit: Client Disconnecting) |
23:38:38 | * | al_ joined #nim |
23:41:42 | * | rnrwashere quit (Remote host closed the connection) |
23:44:37 | * | rnrwashere joined #nim |
23:46:03 | * | luis__ joined #nim |
23:46:38 | * | luis_ quit (Ping timeout: 258 seconds) |
23:47:57 | * | jasper_ joined #nim |
23:49:00 | * | rnrwashere quit (Ping timeout: 246 seconds) |
23:49:25 | * | al_ quit (Quit: al_) |
23:50:54 | * | rnrwashere joined #nim |
23:51:56 | * | luis__ quit (Ping timeout: 250 seconds) |
23:55:29 | * | rnrwashere quit (Ping timeout: 255 seconds) |
23:56:45 | * | jasper_ quit (Ping timeout: 256 seconds) |
23:59:38 | * | rnrwashere joined #nim |