00:07:14 | FromGitter | <zetashift> Does the playground compile with any special options? My code compiles fine on playground but on my local laptop it fails with a type mismatch |
00:07:21 | FromGitter | <zetashift> and the code is just copy pasted >< |
00:07:28 | leorize | no |
00:07:54 | Yardanico | can you share the code? |
00:07:59 | Yardanico | and maybe it's arch/os specific |
00:08:41 | FromGitter | <zetashift> https://play.nim-lang.org/#ix=2fBQ |
00:08:47 | FromGitter | <zetashift> well it's a type mismatch error |
00:09:06 | FromGitter | <zetashift> The error being: `C:\Users\Administrator\.choosenim\toolchains\nim-1.0.6\lib\pure\unittest.nim(665, 14) Error: type mism ⏎ atch: got <Matrix[W - 1, H - 1], Matrix[3, 3]> ⏎ but expected one of: ⏎ proc `==`I, T (x, y: array[I, T]): bool ⏎ first type mismatch at position: 2` [https://gitter.im/nim-lang/Nim?at=5e7d4422d783bb5a9d8dfa18] |
00:09:42 | Yardanico | works for me on latest devel on linux |
00:09:50 | Yardanico | and passes the test |
00:10:25 | FromGitter | <zetashift> I'm on Windows but I really don't see how this could be OS specific |
00:10:39 | FromDiscord | <KingDarBoja> I am on Windows, let me see |
00:11:39 | * | Guest13532 quit (Ping timeout: 265 seconds) |
00:11:58 | * | vivus joined #nim |
00:12:11 | FromDiscord | <KingDarBoja> All good here! |
00:12:13 | dom96 | different nim version? |
00:12:22 | FromGitter | <zetashift> I tried with 1.0.6 and devel |
00:12:42 | FromDiscord | <KingDarBoja> 1.0.6 |
00:14:28 | FromGitter | <zetashift> So in my project I do have the `==` operator defined in another file |
00:14:46 | FromGitter | <zetashift> might that be an issue? I made that snippet to repro my error |
00:15:39 | Yardanico | and is Matrix defined in the same file too? |
00:17:31 | * | dadada joined #nim |
00:17:55 | * | dadada is now known as Guest40664 |
00:30:13 | * | ksandvik quit (Quit: Leaving.) |
00:33:37 | * | krux02_ joined #nim |
00:35:19 | FromDiscord | <Spy653> Hey do you guys mind if I post a survey I've made? It's about what techies think of IoT products (examples in the survey) |
00:35:48 | Yardanico | it's better if you would post it on the forum, this is a real-time chat after all :) |
00:36:06 | * | krux02 quit (Ping timeout: 240 seconds) |
00:38:26 | FromDiscord | <Spy653> I'm throwing it around some discord servers |
00:41:09 | * | Guest40664 quit (Ping timeout: 250 seconds) |
00:43:13 | * | dsrw joined #nim |
00:43:26 | Yardanico | well that's not the best way, it's better to post it on relevant forums |
00:46:44 | FromDiscord | <Spy653> Fair, I'll throw it there when I can |
00:47:39 | * | dadada_ joined #nim |
00:48:20 | * | rnrwashere joined #nim |
00:49:22 | * | sagax quit (Remote host closed the connection) |
00:51:39 | * | opal joined #nim |
00:52:21 | * | rnrwashere quit (Remote host closed the connection) |
00:57:48 | * | thomasross joined #nim |
01:00:08 | FromGitter | <zetashift> @Yardanico yeah Matrix is defined in the same file as the `==` but not in the same file as the test |
01:00:34 | Yardanico | well it even works for me even if I define matrix and == in a separate file |
01:01:49 | FromGitter | <zetashift> Yea, I have an overloaded func of submatrix that takes no parameter and that works fine |
01:02:02 | FromGitter | <zetashift> but I have no idea why this one gives me the type mismatch error |
01:10:59 | * | dadada_ quit (Ping timeout: 260 seconds) |
01:17:26 | * | dadada joined #nim |
01:17:50 | * | dadada is now known as Guest8146 |
01:18:53 | FromGitter | <zetashift> https://github.com/zetashift/naytracer here is my full project |
01:19:09 | FromGitter | <zetashift> I'm also calling it night, too tired to look at this ;__;. Good night y'all |
01:23:17 | * | Trustable quit (Remote host closed the connection) |
01:36:17 | disruptek | fucking alcoholic family members are going to kill us all because they cannot get their drugs delivered like the rest of us. |
01:38:39 | * | dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:41:03 | * | Asgaroth_ joined #nim |
01:41:23 | * | Guest8146 quit (Ping timeout: 250 seconds) |
01:41:25 | FromDiscord | <KingDarBoja> Whaaat |
01:42:59 | disruptek | irl intensifies |
01:44:18 | * | Asgaroth quit (Ping timeout: 256 seconds) |
01:46:12 | disruptek | might have to handcuff some bitches to the radiator. |
01:46:31 | * | vivus quit (Quit: Leaving) |
01:46:47 | * | rnrwashere joined #nim |
01:47:32 | * | dadada_ joined #nim |
01:58:36 | * | endragor joined #nim |
02:06:08 | * | krux02_ quit (Remote host closed the connection) |
02:09:02 | * | ksandvik joined #nim |
02:11:31 | * | dadada_ quit (Ping timeout: 265 seconds) |
02:15:14 | * | zacharycarter quit (Ping timeout: 240 seconds) |
02:16:15 | * | dsrw joined #nim |
02:17:26 | * | dadada joined #nim |
02:17:50 | * | dadada is now known as Guest50054 |
02:22:07 | * | endragor quit (Remote host closed the connection) |
02:22:39 | * | dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
02:23:36 | * | endragor joined #nim |
02:26:59 | * | ksandvik quit (Quit: Leaving.) |
02:30:29 | * | chemist69_ joined #nim |
02:33:14 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:36:35 | * | rnrwashere quit (Remote host closed the connection) |
02:41:11 | * | Guest50054 quit (Ping timeout: 250 seconds) |
02:47:30 | * | dadada_ joined #nim |
02:47:56 | * | zacharycarter joined #nim |
02:53:14 | * | zacharycarter quit (Ping timeout: 240 seconds) |
03:07:18 | * | endragor quit (Remote host closed the connection) |
03:10:07 | * | endragor joined #nim |
03:10:52 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:11:29 | * | dadada_ quit (Ping timeout: 258 seconds) |
03:14:23 | * | endragor quit (Remote host closed the connection) |
03:17:28 | * | dadada joined #nim |
03:17:52 | * | dadada is now known as Guest54221 |
03:21:27 | * | zacharycarter joined #nim |
03:25:49 | * | zacharycarter quit (Ping timeout: 250 seconds) |
03:28:50 | * | rnrwashere joined #nim |
03:38:01 | FromDiscord | <Yardanico> oh noes |
03:38:01 | FromDiscord | <Yardanico> https://cdn.discordapp.com/attachments/371759389889003532/692940466315984946/2020-03-27-06-37-39_grim.png |
03:38:22 | FromGitter | <Knaque> I made a CLI that makes it a bit easier to host a home Git server: https://github.com/Knaque/prigit/ |
03:40:07 | * | rnrwashere quit (Remote host closed the connection) |
03:41:37 | * | Guest54221 quit (Ping timeout: 264 seconds) |
03:47:28 | * | dadada_ joined #nim |
03:52:08 | * | muffindrake quit (Ping timeout: 256 seconds) |
03:52:19 | FromDiscord | <Benumbed> Problem solved |
03:54:15 | * | muffindrake joined #nim |
03:59:28 | * | sagax joined #nim |
04:03:00 | * | sagax quit (Client Quit) |
04:11:38 | * | dadada_ quit (Ping timeout: 256 seconds) |
04:17:27 | * | dadada joined #nim |
04:17:52 | * | dadada is now known as Guest6997 |
04:25:50 | Yardanico | !last shashlick |
04:25:51 | disbot | shashlick spoke in 12#nim 29 hours ago |
04:27:14 | Yardanico | shashlick: you around? just wanted to ask a question about nimterop - what if it errors on a header while doing cImport (with recurse=true) if that header imports other ones like "vlc/libvlc.h" even if they're in same dir? I wanted to make a libvlc wrapper so I wrote some code but it errors because of this https://play.nim-lang.org/#ix=2fDd |
04:28:10 | Yardanico | well I guess it would work if I cImport every header separately |
04:29:02 | shashlick | Sup |
04:29:23 | Yardanico | i've never used nimterop before so I'm really stupid with it :P |
04:30:03 | shashlick | No worries |
04:30:06 | * | endragor joined #nim |
04:30:13 | shashlick | You need to set the include directory correctly |
04:31:05 | shashlick | I don't remember if it gets set automatically with search dir |
04:31:16 | Yardanico | oh yeah cIncludeDir(baseDir / "include") worked |
04:31:36 | Yardanico | now I get tons of errors but that's expected :P |
04:31:52 | * | rockcavera quit (Remote host closed the connection) |
04:31:55 | Yardanico | but it processes all header files at least |
04:32:05 | shashlick | Cool ya |
04:32:19 | shashlick | I thought someone else had worked on vlc before |
04:32:33 | Yardanico | yeah, I thought the same, but found no repos |
04:35:19 | Yardanico | shashlick: is it ok if I got a sigsegv? :P |
04:35:28 | * | nsf joined #nim |
04:35:42 | Yardanico | https://play.nim-lang.org/#ix=2fDe |
04:35:45 | shashlick | I don't think anyone likes those 😄 |
04:36:38 | shashlick | What's the crash |
04:37:03 | Yardanico | No stack traceback available |
04:37:03 | Yardanico | SIGSEGV: Illegal storage access. (Attempt to read from nil?) [AssertionError] |
04:37:16 | Yardanico | after it inputs some generated nim code on the stdout |
04:37:32 | shashlick | Ugh toast is crashing but it's unclear why |
04:38:04 | shashlick | Can you recompile toast? |
04:38:20 | Yardanico | yeah, I can try |
04:38:44 | shashlick | I've seen this before and tried to compile with debug but couldn't reproduce again |
04:39:46 | Yardanico | do I just need to compile toast.nim from nimterop and put it in PATH so nimterop picks it? |
04:40:45 | Yardanico | ah nvm found toastExePath so I can edit it real quick |
04:40:55 | shashlick | https://github.com/genotrance/nimarchive/issues/10 |
04:40:56 | disbot | ➥ SIGSEGV Nim 1.2+ |
04:41:06 | Yardanico | yeah I have devel too |
04:41:13 | * | Guest6997 quit (Ping timeout: 250 seconds) |
04:41:57 | shashlick | I discussed this with Juan on telegram few days ago |
04:42:11 | shashlick | Will be great if you can get a stack trace |
04:42:27 | Yardanico | wair it doesn't sigsegv with a binary compiled manually |
04:42:31 | Yardanico | either in debug or -d:release |
04:42:40 | shashlick | I couldn't get it to print one and it worked fine in gdb as well |
04:42:43 | Yardanico | the one built by nimterop does |
04:42:52 | Yardanico | (when it builds toast automatically on installing) |
04:43:25 | Yardanico | I just tried reinstalling it and it doesn't sigsegv either :D |
04:43:26 | shashlick | You're able to recreate the crash? |
04:43:46 | shashlick | Exactly what I saw |
04:43:57 | Yardanico | maybe a codegen/gc issue then? |
04:44:09 | Yardanico | if the same code works or doesn't work sometimes |
04:44:17 | shashlick | Could be but how to report such an issue |
04:44:56 | shashlick | Nimterop is tested with devel in the CI |
04:45:12 | Yardanico | yeah, IDK how to reproduce it now, after recompiling toast binary it just disappeared |
04:45:59 | shashlick | 4raq's fault :) |
04:46:15 | Yardanico | btw, why don't the generated nim files pick my "dynvlc" thing? |
04:46:23 | Yardanico | nimterop puts them all in "failed" cache dir |
04:47:27 | * | dadada_ joined #nim |
04:47:38 | shashlick | That's cause the generated code has errors or missing symbols |
04:48:31 | shashlick | dynvlc will be set as a pragma but it's only defined in your wrapper |
04:49:32 | Yardanico | seems like there's a lot of code like "media_discoverer_lan* = 1.media_discoverer_category_t" |
04:49:57 | Yardanico | but nim doesn't like it, guess the enum didn't get generated |
04:50:08 | Yardanico | ah hmm "defineEnum(media_discoverer_category_t)" |
04:50:11 | shashlick | Those are enums remapped to distinct int |
04:50:42 | shashlick | Since c enums can be out of order or have duplicates |
04:50:51 | Yardanico | yeah, I know |
04:51:02 | Yardanico | guess that it all fails coz of some syntax error at the beginning on the file :P |
04:52:41 | shashlick | What's the actual error |
04:52:59 | Yardanico | a ton of errors from nim check |
04:53:06 | Yardanico | it fails for every enum member in all enums |
04:53:20 | Yardanico | ah, I guess it all starts because of "'r' << 16* = 1.teletext_key_t" |
04:53:26 | Yardanico | that's of course not corrent Nim syntax :)) |
04:53:45 | Yardanico | this enum https://git.videolan.org/?p=vlc.git;a=blob;f=include/vlc/libvlc_media_player.h;h=5e0255a10ac84c449a15e6e3eb2fba2123dd035c;hb=HEAD#l154 |
04:54:20 | Yardanico | wait why does it try to assign the enum value (?) to itself or something |
04:55:01 | Yardanico | that's how the whole file looks and where it starts - https://gist.github.com/Yardanico/0af5164651914ab17d37daa49af0af41#file-libvlc-nim-L452 |
04:55:20 | * | dadada_ quit (Ping timeout: 256 seconds) |
04:56:04 | shashlick | You might want to cOverride that and hand wrap it instead |
04:56:16 | Yardanico | yeah, I understand that |
04:56:18 | shashlick | And report it :) |
04:56:41 | Yardanico | so I just do cOverride and define this values manually or what? |
04:56:50 | Yardanico | so it doesn't generate enum values for this enum |
04:57:40 | shashlick | Ya |
04:59:10 | shashlick | If you don't need that enum you could hear cSkipSymbol for now |
04:59:21 | shashlick | But it might be used by some other proc |
04:59:47 | shashlick | People do such crazy things with c |
05:08:03 | Yardanico | shashlick: so I do it like cSkipSymbol(@["libvlc_teletext_key_t"]) ? |
05:08:12 | Yardanico | because for some reason it's still in generated Nim code |
05:12:20 | Yardanico | it seems that most of the wrapper generated successfully, there's an issue with this enum, vlc_log_t, video_setup_device_info_t and video_output_cfg_t |
05:12:27 | Yardanico | if I remove all procs/types which use these nim check passes |
05:16:14 | shashlick | What's with those enums |
05:16:37 | Yardanico | well, how can I skip that enum for now? I mean I understand how to rewrite it, but how to say to nimterop to skip it |
05:16:54 | Yardanico | I've even tried using cSkipSymbol and put names of all members and enum itself, both with and without the libvlc_ prefix |
05:18:01 | shashlick | Do you run with -f |
05:18:11 | shashlick | Cause it might be caching stuff |
05:18:18 | Yardanico | yeah |
05:19:16 | shashlick | It should be skipping it, I don't see why not |
05:19:39 | Yardanico | i've tried with putting all the possible names https://play.nim-lang.org/#ix=2fDo |
05:19:57 | shashlick | Run the toast command with -d |
05:20:28 | shashlick | Put rmFile under static |
05:20:37 | Yardanico | it doesn't work there for some reason |
05:21:25 | shashlick | Also cSkipSymbol since it is a proc |
05:22:00 | Yardanico | under static too? |
05:22:33 | shashlick | Yep |
05:27:18 | * | dadada joined #nim |
05:27:42 | * | dadada is now known as Guest20842 |
05:35:18 | Yardanico | shashlick: well, how I can remove 1 line from the header then? I don't really need that deprecated.h, but vlc.h includes it |
05:35:44 | Yardanico | I figured out it removes that file successfully, but then toast fails because vlc.h includes deprecated.h |
05:36:10 | Yardanico | well actually I guess it's mostly ok |
05:38:48 | Yardanico | wait, so I just use the code that this program outputs? |
05:38:55 | Yardanico | I mean it outputs some generated wrapper |
05:39:12 | Yardanico | can't I make it output to a file? |
05:40:54 | * | Guest20842 quit (Ping timeout: 240 seconds) |
05:46:50 | shashlick | You can redirect and save the output |
05:47:16 | Yardanico | well seems like one file in libvlc folder references a type which is not related to vlc but a part of vlc (include file) |
05:47:28 | * | dadada_ joined #nim |
05:47:38 | shashlick | You'd have to edit the header before processing to remove deprecated |
05:48:05 | * | defection joined #nim |
05:48:18 | shashlick | You can also simply import this wrapper in your code and it will generate only the first time |
05:48:33 | Yardanico | can I cImport multiple files somehow? |
05:48:37 | shashlick | After that it is cached so is fast |
05:48:53 | shashlick | Sure just call it multiple times |
05:49:21 | Yardanico | so I don't understand, nimterop will create actual wrapper files only if it finds no issues with nim check? |
05:49:23 | * | opal quit (Ping timeout: 240 seconds) |
05:49:25 | shashlick | Call that header before vlc |
05:49:59 | shashlick | Well when you cimport, it runs parseStmt on the code |
05:50:14 | shashlick | If the wrapper is bad, it will fail compile |
05:50:28 | Yardanico | well seems like it just straight up skipped the struct I needed :P |
05:50:43 | * | leorize quit (Ping timeout: 240 seconds) |
05:50:46 | Yardanico | it's this one https://git.videolan.org/?p=vlc.git;a=blob;f=include/vlc_messages.h;h=b6d5843985dccfad5d24a6d7ae1e4a4728023ccd;hb=HEAD#l55 |
05:50:46 | shashlick | But the error isn't useful to debug so we write the file and run Nim check so that we get a useful error |
05:51:08 | * | silvernode joined #nim |
05:51:38 | shashlick | Probably those comments throwing it off |
05:51:44 | Yardanico | ah nvm it's my own fault |
05:51:49 | shashlick | Whew |
05:52:07 | Yardanico | I wanted to ignore it at first but then added vlc_messages.h and forgot to remove them from ignored ones |
05:52:15 | shashlick | Ok cool |
05:52:54 | Yardanico | seems like it actually generated that object now |
05:52:58 | Yardanico | well I mean struct |
05:53:03 | shashlick | Neat |
05:54:03 | Yardanico | uh-oh, can nimterop handle this struct? https://git.videolan.org/?p=vlc.git;a=blob;f=include/vlc/libvlc_media_player.h;h=5e0255a10ac84c449a15e6e3eb2fba2123dd035c;hb=HEAD#l511 |
05:54:13 | Yardanico | it's a union struct with structs (???) |
05:54:31 | shashlick | Nope it cannot do nested stuff |
05:54:40 | shashlick | Am working on that for ast2 |
05:54:55 | shashlick | Best to c2nim just that and cOverride |
05:55:50 | * | opal joined #nim |
06:02:29 | * | narimiran joined #nim |
06:02:54 | Yardanico | shashlick: so how do I actually try again after changing code in the wrapper generator? add -f to nim compiler? it doesn't seem to work |
06:03:13 | Yardanico | ah nvm it works I think |
06:03:31 | Yardanico | so another question - what to do if there's a type on cOverrides which uses an enum defined in one of the headers? |
06:04:36 | shashlick | It should get inserted in place |
06:05:04 | shashlick | In context |
06:05:31 | Yardanico | well it seems like if I have 3 cImports, it gets included into all of them, and already fails with the first one |
06:05:42 | Yardanico | but that enum is defined in the second header (so in the second cImport call) |
06:06:29 | shashlick | Make sure the cOverride is added after you import those files |
06:06:34 | Yardanico | oh |
06:07:13 | Yardanico | it ran with no issues!!!! now where are my files? :P |
06:08:07 | shashlick | Awesome! |
06:08:36 | shashlick | How big is this wrapper output |
06:08:41 | shashlick | Vlc must be huge |
06:08:47 | Yardanico | nah it's not the entire vlc |
06:08:57 | Yardanico | it's libvlc |
06:09:20 | Yardanico | wait lemme actually make sure it's not failing on something |
06:09:41 | Yardanico | yeah doesn't seem so |
06:09:46 | Yardanico | now how can I get the files it made? |
06:11:37 | * | dadada_ quit (Ping timeout: 264 seconds) |
06:11:42 | shashlick | Like I said, either import this wrapper in your code |
06:11:49 | Yardanico | ah yeah sorry |
06:11:57 | shashlick | Or redirect output to file |
06:12:37 | shashlick | And turn off cDebug if the output is too verbose |
06:13:14 | shashlick | Also look at the docs capability if you want to generate html docs |
06:14:09 | * | silvernode quit (Ping timeout: 265 seconds) |
06:14:28 | shashlick | https://nimterop.github.io/nimterop/docs.html |
06:15:53 | shashlick | https://github.com/genotrance/nimarchive/blob/master/nimarchive.nimble#L17 |
06:16:25 | Yardanico | well, first of all I need to figure out if it works :P |
06:16:32 | Yardanico | I initially wanted to use it together with gintro |
06:16:48 | shashlick | Agreed |
06:17:06 | * | hoffentlichja joined #nim |
06:17:32 | * | dadada joined #nim |
06:17:55 | * | dadada is now known as Guest99340 |
06:19:22 | hoffentlichja | How does nimble solve package version conflicts? |
06:19:24 | Yardanico | ok let's try playing a song |
06:21:56 | * | rmt quit (Remote host closed the connection) |
06:23:13 | * | leorize joined #nim |
06:25:12 | Yardanico | it works!!!! |
06:25:14 | Yardanico | amazing |
06:26:09 | Yardanico | i thought it would be much harder than just *that* |
06:38:13 | * | defection quit (Ping timeout: 250 seconds) |
06:38:17 | * | arecaceae quit (Remote host closed the connection) |
06:38:34 | * | arecaceae joined #nim |
06:39:23 | * | silvernode joined #nim |
06:41:14 | * | Guest99340 quit (Ping timeout: 256 seconds) |
06:43:43 | Yardanico | shashlick: again thanks a lot :) https://github.com/Yardanico/nim-libvlc |
06:47:32 | * | dadada_ joined #nim |
06:52:54 | FromDiscord | <Varriount> Araq: I really don't think byaddr should be in Nim. It complicates an already tricky memory situation, especially since the move/copy/borrow stuff is still progressing. |
06:53:28 | leorize | + it's not even documented :P |
06:55:49 | * | solitudesf joined #nim |
06:58:11 | * | silvernode quit (Ping timeout: 260 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:01:31 | FromDiscord | <Varriount> leorize: And actually, it's not even memory safe in it's current form: https://github.com/nim-lang/Nim/blob/devel/lib/std/pragmas.nim |
07:01:39 | FromDiscord | <Varriount> Of course, the documentation doesn't say that |
07:02:00 | FromDiscord | <Varriount> I don't see what advantage it has compared to just using `addr` |
07:03:56 | FromDiscord | <Varriount> And yes, I know that you have to import it to use it, but that doesn't mean it should be in the standard library |
07:04:40 | * | gmpreussner joined #nim |
07:22:25 | * | dddddd quit (Ping timeout: 250 seconds) |
07:32:26 | leorize | the only good thing that come out of it is that we got proper custom pragma support for variables |
07:33:34 | FromDiscord | <Varriount> leorize: I did notice that. |
07:34:33 | FromDiscord | <Varriount> Right now I'm mostly against new additions to the standard library, unless they really implement functionality that can't already be reasonably achieved using existing language/library functionality. |
07:36:29 | FromDiscord | <Varriount> To be blunt, many parts of the standard library are a mess, because various people have built onto the modules without any greater plan for what the api should be. |
07:52:33 | * | Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
07:53:30 | * | Yardanico joined #nim |
07:56:02 | * | dadada_ quit (Ping timeout: 256 seconds) |
08:01:20 | * | solitudesf- joined #nim |
08:02:31 | * | Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
08:02:33 | * | dadada joined #nim |
08:02:56 | * | dadada is now known as Guest45313 |
08:03:59 | * | solitudesf quit (Ping timeout: 260 seconds) |
08:05:05 | * | Yardanico joined #nim |
08:05:30 | * | Yardanico quit (Client Quit) |
08:05:49 | * | Yardanico joined #nim |
08:06:18 | * | Yardanico quit (Client Quit) |
08:12:31 | Araq | Varriount: it's opt-in though and fills a void |
08:13:05 | Araq | and the borrow checking is coming sooner rather than later, other already existing parts of the languae require it |
08:20:31 | * | rokups joined #nim |
08:26:37 | * | Guest45313 quit (Ping timeout: 264 seconds) |
08:28:43 | * | dadada joined #nim |
08:29:06 | * | dadada is now known as Guest81327 |
08:30:46 | Araq | and it's always easy to meta-critic anything (the stdlib has no great plan and is a mess) |
08:31:20 | Araq | maybe it doesn't need a great plan though. |
08:32:38 | FromDiscord | <Varriount> Araq: Perhaps not as a whole, but there are plenty of modules that don't really have a clean or well thought out interface. |
08:33:14 | FromDiscord | <Varriount> A prime example are the DB modules that always return result values as strings |
08:34:40 | * | sleepyqt joined #nim |
08:35:32 | FromDiscord | <Varriount> Or the two regex modules |
08:36:26 | * | arecaceae quit (Remote host closed the connection) |
08:36:50 | FromDiscord | <Varriount> Or strmisc and wordwrap |
08:36:50 | * | arecaceae joined #nim |
08:37:53 | * | btop_ quit (Quit: Lost terminal) |
08:39:50 | * | PMunch joined #nim |
08:40:47 | * | krux02 joined #nim |
08:40:52 | FromDiscord | <Varriount> (I could go on) |
08:44:00 | FromDiscord | <Varriount> And while every standard library has its share of warts, Nim has a far higher relative wart occurrence |
08:55:46 | FromDiscord | <Rika> the regex ones are just "wrapper vs higher level version" `pcre` vs `re` isnt it? |
08:56:08 | * | Vladar joined #nim |
08:56:45 | FromDiscord | <Varriount> Somewhat, but they also have vastly different API styles |
08:57:02 | FromDiscord | <Varriount> And it's re vs nre |
09:00:52 | FromDiscord | <Rika> i see |
09:01:59 | FromDiscord | <Rika> ah so if its re vs nre its more of "theres basically no difference in functionality" |
09:05:25 | lqdev[m] | not to mention weird naming like `flushFile` vs `open`, `setPosition` and `getPosition`, and so on |
09:06:14 | lqdev[m] | too bad we can't change those. |
09:07:54 | FromDiscord | <Rika> `setPosition` in streams, `setFilePos` in io |
09:08:08 | FromDiscord | <Rika> `flush` in streams, `flushFile` in io |
09:08:23 | FromDiscord | <Rika> basically: just import streams and use that instead 😛 |
09:11:50 | lqdev[m] | but `seek` and `position` are better names for `setPosition` and `getPosition` respectively |
09:12:38 | lqdev[m] | even so, the stdlib naming guidelines discourage the use of `get`/`set` prefixes in favor of getter and setter syntax |
09:17:25 | FromDiscord | <Rika> oh man, i used to always type `seek` instead of `setposition` |
09:17:40 | FromDiscord | <Rika> also anything with the `get` prefix should have it removed no? |
09:18:11 | FromDiscord | <Rika> also i'm not sure about `setPosition` being replaced with `position=` |
09:25:35 | PMunch | I agree, the stdlib is a bit wonky in places |
09:26:10 | PMunch | Don't get me wrong, it's great, lots of things supported out of the box, but as you mention there are some weird discrepancies in naming and interfaces. |
09:26:27 | PMunch | Sometimes getting something from one module and passing it to another can also be super inconvenient.. |
09:26:38 | PMunch | I guess we should write a nonstandard library :P |
09:27:09 | FromDiscord | <Rika> a standard nonstandard library let's call it |
09:27:28 | FromDiscord | <Rika> perhaps a standardized nonstandard library is more accurate of a name |
09:29:04 | FromDiscord | <Varriount> PMunch: I'm currently attempting to port various modules from other stdlibs. Go's is quite nice, though a bit anemic in some areas |
09:31:02 | FromDiscord | <Varriount> We will see how that goes |
09:33:08 | FromDiscord | <Rika> you got a repo for that? |
09:33:23 | FromDiscord | <Varriount> Not yet |
09:33:28 | FromDiscord | <Rika> i wanna see it and maybe report possible mistakes |
09:35:44 | PMunch | Well I guess it's easier to write a cohesive stdlib if it is a bit sparse :P |
09:35:56 | PMunch | Means there is less places you can mess up at least |
09:35:56 | FromDiscord | <Varriount> Rika: I started from the bottom up, function by function. Line 323 is where I've stopped for now. |
09:36:36 | FromDiscord | <Rika> incomplete code is code, code doesnt have to be buildable to be pushable 😛 |
09:39:47 | FromDiscord | <Varriount> Rika: I might take some inspiration from Python's pathlib, but in my opinion it does slightly too much for my taste - https://docs.python.org/3/library/pathlib.html |
09:40:11 | FromDiscord | <Rika> i love pathlib |
09:40:12 | FromDiscord | <Varriount> Primarily the filesystem operations. |
09:40:29 | Demos[m] | Check out c++'s std::filesystem::path, it also takes insparation from pathlib but is a little more focused on just paths |
09:40:30 | FromDiscord | <Rika> the FS ones are a bit weird i think too |
09:40:40 | FromDiscord | <Varriount> Demos: Thanks, I will |
09:40:53 | FromDiscord | <Rika> but there's already `os` though, any issues with os? |
09:41:13 | FromDiscord | <Varriount> Rika: Nothing in particular. I just want to do this. |
09:41:21 | FromDiscord | <Rika> ah i see that's fine |
09:41:50 | FromDiscord | <Varriount> Demos: I'll admit I had discounted C++ - I assumed that any path API would be too foreign to take any ideas from |
09:41:56 | Demos[m] | nope! |
09:42:10 | FromDiscord | <Varriount> Rika: I like pathlib too, although it's a pain when you end up passing a Path object to a function expecting a string path. |
09:42:16 | Demos[m] | tbqh c++ is pretty close to nim semantically |
09:44:08 | FromDiscord | <Rika> just `converter toSt`-- well python wouldnt have this but if pathlib were a nim module i'd do this in a heartbeat |
09:45:34 | FromDiscord | <Varriount> Eh, you would still have problems if, say, you passed a sequence of Path types to a function expecting a sequence of string paths. |
09:47:06 | FromDiscord | <Rika> another `converter toOAString[S: openarray](sq: S[Path]): S[string]` or something or so |
09:47:20 | FromDiscord | <Rika> i dont think that'd work but you get my idea |
09:47:34 | FromDiscord | <Rika> ahaha, its gonna be a pain yes' |
09:47:37 | FromDiscord | <Varriount> Yeah, but what about other containers? Or a sequence of sequence of strings |
09:48:01 | FromDiscord | <Varriount> Converters are tempting, though, I'll admit |
09:50:01 | FromDiscord | <Varriount> Demos: It's been a while since I've heard from you - are you in a different time zone or something? |
09:50:14 | Demos[m] | nah just busy, new job and all |
09:50:16 | Demos[m] | less time for nim |
09:50:26 | FromDiscord | <Varriount> Don't I know it. :< |
09:50:27 | Demos[m] | well less busy now |
09:50:29 | Demos[m] | what with covid-19 |
09:50:45 | Demos[m] | I am in a different timezone though, moved to washington |
09:50:54 | FromDiscord | <Varriount> Ah, that would explain it. |
09:51:18 | FromDiscord | <Varriount> My sleep schedule has lost all sense of normalcy without the constraint of appointments, etc. |
09:51:27 | Demos[m] | same |
09:51:33 | Demos[m] | and apperently same for my entire team :D |
09:51:47 | Demos[m] | it's 3AM here.... |
09:54:39 | FromDiscord | <Varriount> Nearly 6 AM here |
09:55:21 | Demos[m] | that almost reasonable |
09:56:03 | FromDiscord | <Varriount> It might be, if I hadn't woken up at 3:00 yesterday. |
09:56:05 | PMunch | Depends, is it 6AM because you got up, or 6AM because you haven't gone to bed.. |
09:56:24 | Demos[m] | heh |
09:56:39 | * | filcuc joined #nim |
09:57:00 | PMunch | I at least have video meetings and such still, otherwise my sleep cycle would be completely out of wack as well |
09:57:23 | PMunch | Last time I was left to myself for an extended period of time my cycle drifted 12 hours in about two-three weeks |
09:57:34 | Demos[m] | yeah we've been less and less productive as this has gone on |
09:57:36 | PMunch | So I got up at 8PM and went to bed around 11-12AM |
09:57:52 | PMunch | That was, strange |
09:58:24 | Demos[m] | my problem is I start playing Kerbal Space Program and forget to take my sleepy meds |
09:58:52 | PMunch | And super inconvenient if I wanted to grab some beers with friends. Basically getting up, having breakfast and then head to a bar. Get home from the bar and realise it's mid-day for me, so now I'm jut going to be drunk for the rest of the day.. |
09:59:12 | PMunch | That game is so much fun! |
09:59:17 | Demos[m] | you can still go to bars? |
09:59:42 | PMunch | Nah, this was last time I was without any schedule restrictions |
09:59:55 | PMunch | When I was studying and my GF was out of town |
10:00:09 | * | endragor quit (Remote host closed the connection) |
10:01:58 | * | solitudesf- quit (Remote host closed the connection) |
10:04:19 | * | solitudesf joined #nim |
10:14:57 | * | NimBot joined #nim |
10:17:48 | PMunch | nim dump? |
10:17:52 | * | endragor joined #nim |
10:18:41 | FromGitter | <Vindaar> I remember there was one which just echoed the paths it checked at runtime |
10:19:28 | FromDiscord | <Varriount> Verbosity maybe? |
10:21:42 | FromGitter | <Vindaar> nope :/ |
10:24:49 | FromGitter | <Vindaar> well, figured it out without it. I was confused, because I was just testing ggplotnim on windows. And I was sure to get the same "could not load libcairo2.dll" error @Lecale got the other day (and I got a few weeks ago). ⏎ But the thing is, by installing emacs on windows and adding its `bin` dir to PATH I also installed cairo, since emacs on windows uses GTK |
10:37:37 | Araq | > A prime example are the DB modules that always return result values as strings |
10:37:56 | Araq | no, it's a prime example for ranting about what you don't understand. |
10:38:37 | * | filcuc quit (Ping timeout: 264 seconds) |
10:38:44 | Araq | and what's wrong with 'wordwrap' anyway |
10:39:26 | FromDiscord | <Rika> i think the DB modules are fine |
10:39:43 | FromDiscord | <Rika> ive never used wordwrap but i think they think its an issue because its tiny |
10:40:08 | Araq | nre was an external contribution and it shows |
10:42:01 | PMunch | til wordwrap |
10:43:31 | * | filcuc joined #nim |
10:43:41 | Araq | so instead of 'nre' it should have been left in a Nimble package and then others can import nre and the same API differences would exist and in everyday life nothing whatsoever would change |
10:44:54 | Araq | but you couldn't complain about it *shrug* |
10:49:40 | Araq | > but `seek` and `position` are better names for `setPosition` and `getPosition` respectively |
10:49:44 | Araq | I don't agree |
10:50:11 | FromDiscord | <Rika> why so for the 2nd one? |
10:50:52 | Araq | 'seek' doesn't "seek" (= search) for anything whatsoever, the name is bullshit |
10:51:31 | FromDiscord | <Rika> that makes sense yeah |
10:51:33 | FromDiscord | <Rika> but the position one? |
10:54:58 | * | sunwukong joined #nim |
10:58:57 | Araq | getPosition was chosen but its cost is unclear, could be an expensive syscall (unlikely though) |
10:59:06 | Araq | same for setPosition |
11:00:19 | Araq | setPosition vs setFilePos is a valid complaint but it's nitpicking |
11:11:36 | * | narimiran quit (Ping timeout: 256 seconds) |
11:21:13 | * | defection joined #nim |
11:23:59 | * | abm joined #nim |
11:25:21 | * | narimiran joined #nim |
11:25:26 | defection | Question, I'm using the terminal module to make a simple little TUI app, is there a nicer way to clear all of the junk in scrollback rather than using `stdout.write("\e[3J")` |
11:30:17 | * | rnrwashere joined #nim |
11:31:13 | * | filcuc quit (Ping timeout: 265 seconds) |
11:32:50 | * | filcuc joined #nim |
11:34:37 | * | rnrwashere quit (Ping timeout: 250 seconds) |
11:40:46 | FromDiscord | <Rika> that makes me feel like making an ansicodes module or something |
11:41:22 | * | filcuc quit (Ping timeout: 265 seconds) |
11:41:45 | * | letto quit (Quit: Konversation terminated!) |
11:43:43 | * | letto joined #nim |
11:50:38 | defection | That would be cool, have the possibility of merging some of that into the terminal module too considering there's some common escape sequences in there already. |
11:54:51 | FromDiscord | <Rika> well the issue of having an ansicodes library is that i either > only handle output ansicodes or > i require raw mode to handle input ansi codes too or something |
11:54:58 | FromDiscord | <Rika> i dont think thats a big issue actually |
11:55:57 | * | sunwukong quit (Quit: Leaving) |
12:06:39 | * | sleepyqt quit (Ping timeout: 260 seconds) |
12:12:01 | * | rockcavera joined #nim |
12:13:36 | Araq | defection, there is only eraseScreen |
12:13:49 | Araq | and in general terminal.nim only offers what is portable |
12:14:30 | Araq | for posix specific stuff there is also termios.nim |
12:15:39 | defection | Fair enough, I don't know all of the intricacies of terminals/ANSI stuff :P |
12:15:59 | defection | Nice, I'll have to take a look! |
12:17:36 | Araq | speaking of which, 'nimble init' is broken on Windows with its terminal based UI |
12:18:48 | FromGitter | <zetashift> what's broken on it? |
12:19:39 | FromGitter | <zetashift> seems to work fine for me, using Windows 10 |
12:19:55 | FromDiscord | <Recruit_main707> for me it also seems finew |
12:21:36 | * | sleepyqt joined #nim |
12:25:03 | Araq | run it inside VSCode |
12:26:47 | FromDiscord | <Recruit_main707> it also seems to work |
12:27:11 | Araq | never mind then, for me it didn't |
12:33:19 | * | clemens3 quit (Quit: reboot) |
12:36:30 | * | clemens3 joined #nim |
12:37:53 | * | dsrw joined #nim |
12:38:28 | PMunch | defection https://nim-lang.org/docs/terminal.html#eraseScreen.t |
12:39:12 | PMunch | Oh sorry, didn't see that others had answered you already |
12:39:12 | * | dsrw quit (Read error: Connection reset by peer) |
12:50:58 | FromGitter | <alehander92> guys, what do you think about `nimtrace program.nim` which compiles a program with `-d:nimtrace` and just prints out callgraph in real time |
12:51:11 | FromGitter | <alehander92> similar to way `strace program` works for syscalls |
12:59:15 | * | zacharycarter joined #nim |
12:59:58 | * | filcuc joined #nim |
13:01:20 | * | kenran joined #nim |
13:02:41 | * | kenran quit (Client Quit) |
13:08:14 | krux02 | hard to say. Usability highly on the quality of the implementation. |
13:08:33 | krux02 | also you should explore existing tracers for c++, how much does it apply to Nim as well |
13:09:36 | Araq | alehander92: is your zero-functional currently broken or is it my PR... |
13:16:42 | FromGitter | <alehander92> sorry! |
13:17:06 | FromGitter | <alehander92> krux02 you're right, i work on something like that in my work, but i admit i havent analyzed enough c/c++ solutions |
13:17:52 | FromGitter | <alehander92> the fastest way i've done it until now is by producing a minimal binary trace which is later postprocessed to a more analyzeable callgraph |
13:18:24 | FromGitter | <alehander92> but i admit this can be also be maybe doable with `-finstrument`* family of gcc/clang(?) + some objdump info |
13:18:59 | FromGitter | <alehander92> however i am not sure how easy is to collect sensible info for args this way : i was more playing with the idea of more naive prettyprinting high level hook |
13:19:14 | FromGitter | <alehander92> for smaller/mid programs quick introspection |
13:19:24 | FromGitter | <alehander92> Araq hm sorry, have to look at it |
13:20:38 | FromGitter | <alehander92> https://github.com/nim-lang/Nim/pull/13776/checks?check_run_id=539189372 ? |
13:20:39 | disbot | ➥ '.push raises: []' now also affects proc types |
13:22:35 | FromGitter | <alehander92> honestly sorry, havent looked at it lately no idea |
13:25:04 | FromGitter | <alehander92> ugh i pressed re-run, can i like cancel it |
13:25:12 | * | nsf quit (Quit: WeeChat 2.7) |
13:26:07 | FromGitter | <alehander92> what i dont understand is how can it fail only on windows, if its a type error issue |
13:26:27 | * | Tungki joined #nim |
13:26:54 | * | filcuc quit (Quit: Konversation terminated!) |
13:27:04 | * | filcuc joined #nim |
13:28:47 | * | chemist69_ quit (Ping timeout: 272 seconds) |
13:29:28 | * | chemist69 joined #nim |
13:30:31 | PMunch | alehander92: `when defined(windows)` |
13:37:31 | FromDiscord | <Recruit_main707> can somebody from irc or gitter or other try to @ everyone and see if it works in discord? |
13:37:47 | * | aEverr joined #nim |
13:37:53 | FromDiscord | <Rika> i doubt it doed |
13:37:54 | FromGitter | <alehander92> sorry |
13:37:54 | FromDiscord | <Rika> does |
13:38:06 | FromGitter | <alehander92> i cant think of an obvious when defined(windows) |
13:38:22 | FromGitter | <alehander92> recruit this can annoy a lot of people :) |
13:38:29 | FromDiscord | <Recruit_main707> personal @s dont woek because we have an special number after the name, but everyone doesnt. |
13:38:50 | FromDiscord | <Recruit_main707> alehander92: its in the name of science |
13:38:51 | FromDiscord | <Rika> the bot probably does sanitizing nonetheless |
13:38:54 | aEverr | <@259277943275126785> |
13:38:59 | FromDiscord | <Recruit_main707> wow |
13:39:01 | FromDiscord | <Rika> i see |
13:39:08 | aEverr | <@386230567571554305> |
13:39:14 | aEverr | muahahaha |
13:39:20 | FromDiscord | <Recruit_main707> is this your alt? |
13:39:23 | FromDiscord | <Rika> no |
13:39:23 | aEverr | no |
13:39:25 | * | lritter joined #nim |
13:39:35 | FromDiscord | <Recruit_main707> are you copying the number? |
13:39:40 | aEverr | no |
13:39:41 | FromDiscord | <Rika> no |
13:39:45 | FromDiscord | <Rika> (i am) |
13:39:53 | FromDiscord | <Recruit_main707> it works out of the box? wow |
13:40:12 | FromDiscord | <Recruit_main707> this is new right? |
13:40:44 | FromDiscord | <Rika> i am copyinh the number pls |
13:40:53 | FromDiscord | <Rika> right click copy id then <@number> |
13:40:55 | FromDiscord | <Rika> lmao 😛 |
13:41:10 | aEverr | i'm hesitant on trying an everyone ping though |
13:41:15 | aEverr | for good reasons |
13:41:18 | FromDiscord | <Recruit_main707> https://tenor.com/view/not-funny-didnt-laugh-not-funny-didnt-laugh-dancing-money-dance-gif-14496446 |
13:41:52 | aEverr | cant see gifs on my irc client lol |
13:42:21 | FromDiscord | <Recruit_main707> well, we could ping everyone for nim updates and such |
13:42:50 | aEverr | i really wanna try it but also i dont want to fucking die |
13:47:40 | Araq | alehander92: well if you didn't touch it it must be my PR |
13:47:52 | FromGitter | <alehander92> guys you can test it in nim-offtopic |
13:47:56 | FromGitter | <alehander92> if its connected to discord |
13:48:10 | FromDiscord | <Rika> we uh did |
13:48:13 | FromGitter | <alehander92> and nim-lang/twitch on gitter |
13:48:13 | FromDiscord | <Rika> uh |
13:48:15 | FromDiscord | <Recruit_main707> yep, we already have awaken discord offtopic XD |
13:48:22 | * | liblq-dev joined #nim |
13:48:30 | FromDiscord | <Rika> uh yeah we've prolly incurred the wrath of literally everyone on the discord server |
13:48:49 | FromDiscord | <Simula> anyone have experience with the posix module? how do i use `getgrname`? |
13:48:50 | liblq-dev | quite literally |
13:49:05 | FromDiscord | <Simula> no matter what i pass it, i get a null pointer in return |
13:49:31 | FromGitter | <alehander92> and gitter |
13:50:00 | FromGitter | <alehander92> Araq well, i am not sure but https://github.com/zero-functional/zero-functional/commits/master last commit is from february |
13:50:12 | FromGitter | <alehander92> sorry for re-running the ci again |
13:54:27 | * | dddddd joined #nim |
13:55:34 | FromDiscord | <Simula> oh i'm using the api wrong |
13:58:04 | FromDiscord | <Simula> aaaaaand i found a compiler bug |
13:58:13 | FromDiscord | <Rika> ? what happened |
13:58:25 | FromDiscord | <Simula> `stat` from posix_utils is broken |
13:58:53 | FromGitter | <alehander92> thats maybe a stdlib bug |
13:59:24 | Araq | so ... how does 'ensures' work |
13:59:38 | FromDiscord | <Simula> https://pastebin.com/cgc6QAU6 |
14:01:14 | Araq | SImula: that's a stdlib/OS combination problem, not a compiler bug |
14:01:14 | FromDiscord | <Simula> aaaaaand i can't get a minimal example to fail |
14:01:36 | FromDiscord | <Simula> oh fun |
14:02:09 | FromDiscord | <Simula> ah, it looks like the `$` is just broken for the Stat type |
14:02:41 | Araq | sure continue to claim nonsense, in reality Stat's very definition is broken |
14:02:53 | Araq | for your OS |
14:03:12 | FromDiscord | <Rika> what os are you on |
14:03:30 | Araq | ZergLinux |
14:03:32 | FromDiscord | <Simula> im not claiming nonsense lmao, using it properly works fine |
14:03:34 | FromDiscord | <Simula> fedora 31 |
14:03:47 | FromDiscord | <Simula> as long as you don't try `$mystat` it works |
14:13:59 | * | filcuc quit (Quit: Konversation terminated!) |
14:14:13 | * | filcuc joined #nim |
14:28:57 | FromGitter | <alehander92> is it a valid strategy to |
14:29:15 | FromGitter | <alehander92> discard async futures on purpose in test code |
14:29:30 | FromGitter | <alehander92> to test that internal logic deals with some possible logic races |
14:35:02 | * | zacharycarter quit (Read error: Connection reset by peer) |
14:35:20 | krux02 | Simula: can you try to just delete the filed pad0 and reserved from the definition of Stat? |
14:35:48 | krux02 | as far as I can tell right now, they are not used and don't serve any purpose. |
14:37:03 | krux02 | Araq: can you please stop insulting people who report problems in Nim? |
14:37:36 | krux02 | It is not job of people to correctly categorize a bug in Nim. |
14:38:12 | PMunch | alehander42, why would you do that? |
14:38:23 | Araq | krux02: I'm not aware I insulted anybody, I did categorize the bug for the OP |
14:40:58 | FromGitter | <alehander92> PMunch well, because my ui can generate events in a bit random order so two operations might happen in a bit interleaving way |
14:41:19 | PMunch | Araq, Simula, pretty sure it's this error you're seeing: https://github.com/nim-lang/Nim/pull/12655 |
14:41:19 | FromDiscord | <Simula> it's not the first time you've gotten aggressive because someone was harmlessly wrong |
14:41:20 | FromGitter | <alehander92> so i want my cli test runner to simulate that, but asyncCheck is probably what i want yeah :D |
14:41:20 | disbot | ➥ Fix issue with fields trying to use wrong name ; snippet at 12https://play.nim-lang.org/#ix=2aYc |
14:41:39 | * | liblq-dev quit (Ping timeout: 265 seconds) |
14:42:00 | PMunch | I don't think he's aggressive, just a limitation of the text medium :P |
14:42:09 | krux02 | Araq: Here you did isult: "sure continue to claim nonsense," |
14:42:34 | Araq | I didn't. |
14:42:39 | PMunch | alehander42, yeah asyncCheck essentially just adds a callback that will raise the error |
14:43:08 | PMunch | Hi didn't insult him, an insult would be "sure you idiot, continue to claim nonsense" |
14:43:24 | * | liblq-dev joined #nim |
14:43:59 | FromDiscord | <Simula> the thing is, i wasn't claiming nonsense |
14:44:06 | FromDiscord | <Simula> i was wrong at first and corrected myself |
14:44:08 | PMunch | Well, it wasn't a compiler bug |
14:44:21 | PMunch | So it was nonsense, just not maliciously so |
14:44:22 | FromDiscord | <Simula> and i corrected myself |
14:44:33 | Araq | it's neither a compiler bug nor a $ bug |
14:44:39 | PMunch | It's not $ that's broken either |
14:44:50 | FromDiscord | <Simula> and yet, trying to use $ on a Stat is bhroken |
14:44:54 | PMunch | It's the Stat type that incorrectly imports fields from the C definition |
14:45:10 | PMunch | Yes, because it tries to access the field pad0 which doesn't exists |
14:45:17 | PMunch | As the field is called __pad0 |
14:45:24 | FromGitter | <alehander92> i think its just a language thing maybe |
14:45:37 | Araq | Simula: I'm sorry anyway, but no offense was implied |
14:45:49 | FromDiscord | <Simula> thank you, i appreciate it |
14:45:59 | PMunch | If you look at the PR I linked you will see that there is an issue with some of the posix parts where this is the case, but I haven't found a good way to detect them all.. |
14:46:17 | FromGitter | <alehander92> oh well i need to read stuff with nim-prompt, i just realized this is blocking my async loop |
14:46:26 | PMunch | Basically that field should be declared with {.importc: "__pad0".} |
14:46:34 | FromGitter | <alehander92> that explains why i saw it used in a thread iirc |
14:46:39 | FromGitter | <alehander92> ok todo for now |
14:48:10 | * | Trustable joined #nim |
14:48:34 | krux02 | PMunch: that field just needs to be deleted |
14:48:56 | krux02 | that field is supposed to be private. That is the reason it stearts with __ |
14:48:57 | PMunch | Nope, then Nim and C would disagree on the size of that struct |
14:49:03 | krux02 | Nope |
14:49:04 | krux02 | they won't |
14:49:14 | krux02 | I implemented the sizeof calculation in Nim |
14:49:27 | krux02 | and when a type is imported, it doesn't calculate the size on the size side. |
14:49:30 | * | Trustable quit (Client Quit) |
14:49:31 | PMunch | Oh, so it actually takes that into consideration? Cool |
14:49:36 | krux02 | yes |
14:49:48 | krux02 | you should be able to safely delete it. |
14:49:51 | PMunch | I've just run into issues when I've declared a struct wrong |
14:49:57 | krux02 | you could test it if you are not sure about it. |
14:50:11 | * | Trustable joined #nim |
14:50:16 | * | waleee-cl joined #nim |
14:50:17 | krux02 | can you open an issue about it? Then I can take a look into it. |
14:50:20 | PMunch | But those weren't imported, just declared as the same kind |
14:50:31 | PMunch | You can probably reuse my PR? |
14:50:51 | krux02 | I don.t know how to reuse a PR, never did those git magic tricks. |
14:51:03 | krux02 | can you link your issue? |
14:51:06 | krux02 | PR? |
14:51:58 | * | filcuc quit (Ping timeout: 256 seconds) |
14:52:08 | PMunch | And alehander92, I think you are right, it's probably a language thing. I'm from a place known for our rough language and cursing, so my bar for insults is probably a bit higher :P |
14:52:30 | PMunch | It's the one I linked a second ago #12655 |
14:52:32 | disbot | https://github.com/nim-lang/Nim/pull/12655 -- 3Fix issue with fields trying to use wrong name ; snippet at 12https://play.nim-lang.org/#ix=2aYc |
14:53:03 | * | sagax joined #nim |
14:53:40 | FromGitter | <alehander92> PMunch well cursing is bad |
14:53:53 | FromGitter | <alehander92> i meant that nonsense might just mean "not reasonable/incorrect |
14:54:07 | FromGitter | <alehander92> " in some languages/cultures maybe, not so sure how it translates |
14:55:07 | PMunch | What do you mean "cursing is bad", it's part of our culture.. |
14:55:35 | PMunch | To the point were insulting a policeman is legal where I'm from. Was a ruling on it a couple of years ago |
14:56:37 | * | Guest81327 quit (Ping timeout: 264 seconds) |
14:57:17 | FromGitter | <sheerluck> I don't like when people quarrel https://bit.ly/33O0WOq |
14:57:28 | PMunch | Some drunken guy called a policeman a "jævla hestkuk" (common curse here, translates to something like a fucking horse cock) and was charged with insulting an officer. But the courts said that in northern Norway that isn't considered a curse and the guy was acquitted. |
14:59:54 | * | liblq-dev quit (Ping timeout: 256 seconds) |
14:59:59 | * | marmotini_ joined #nim |
15:00:18 | * | marmotini_ left #nim (#nim) |
15:00:26 | krux02 | PMunch, I just wrote a comment in your PR. I can't take it over. I am sorry. I have other things to do. |
15:01:50 | * | liblq-dev joined #nim |
15:02:33 | * | dadada joined #nim |
15:02:56 | * | dadada is now known as Guest52804 |
15:14:12 | * | Tungki quit (Read error: Connection reset by peer) |
15:14:26 | * | filcuc joined #nim |
15:14:35 | * | Tungki joined #nim |
15:16:13 | * | Tungki quit (Client Quit) |
15:26:20 | * | Guest52804 quit (Ping timeout: 258 seconds) |
15:26:50 | * | clyybber joined #nim |
15:32:28 | * | dadada joined #nim |
15:32:51 | * | dadada is now known as Guest29904 |
15:33:42 | FromGitter | <alehander92> well PMunch I believe you , but i still think its ugly |
15:35:12 | clyybber | Araq: What does #13778 do ? |
15:35:13 | disbot | https://github.com/nim-lang/Nim/pull/13778 -- 3new minor feature: macros for proc types, to be documented |
15:35:49 | clyybber | Is it related to pragma macros like {.async.} |
15:35:51 | clyybber | ? |
15:35:55 | disruptek | lets us annotate for drnim. |
15:36:22 | clyybber | how does it look? |
15:36:31 | clyybber | or work? |
15:36:44 | disruptek | proc foo(x: int) {.requires: x > 0.} |
15:36:56 | clyybber | Oh, and that wasn't possible before? |
15:37:07 | clyybber | I thought the async macro did something like that? |
15:37:25 | disruptek | i think it's the syntax that needed doing. |
15:39:32 | disruptek | looks like it's mostly useful for type foo: proc ... {.requires.} |
15:39:39 | * | aEverr quit (Ping timeout: 265 seconds) |
15:40:04 | * | aEverr joined #nim |
15:45:13 | FromGitter | <alehander92> ok so we can write |
15:45:22 | FromGitter | <alehander92> complexity in signatures |
15:45:35 | FromGitter | <alehander92> with that ! |
15:50:17 | * | filcuc quit (Ping timeout: 250 seconds) |
15:52:08 | Araq | clyybber: it's for 'async' proc types |
15:54:17 | * | endragor quit (Remote host closed the connection) |
15:55:20 | Araq | drnim doesn't need it because drnim simply introduces new pragmas :P |
15:57:53 | shashlick | Yardanico: nice work! can you please put tests in place and maybe a CI so that I can test ast2 and make sure stuff still works with it |
15:58:16 | * | skelett is now known as ssd |
15:58:32 | * | ssd is now known as skelett |
15:59:41 | PMunch | Is DrNim the proof thingy? |
16:01:57 | Araq | yes |
16:02:26 | * | shadowbane quit (Quit: Konversation terminated!) |
16:10:48 | * | Guest29904 quit (Ping timeout: 256 seconds) |
16:14:01 | FromGitter | <alehander92> Araq is there a reason |
16:14:19 | FromGitter | <alehander92> hm, `tags` is not picked up when `async` is used |
16:14:29 | FromGitter | <alehander92> is this somehow related to your fix |
16:14:31 | Araq | well it allows you to write 'type T = proc () {.async.}' |
16:14:37 | Araq | and previously you couldn't |
16:14:43 | FromGitter | <alehander92> ah sorry ok |
16:17:39 | * | dadada_ joined #nim |
16:20:20 | FromGitter | <pigmej> Hey guys |
16:20:49 | FromGitter | <pigmej> .choosenim/toolchains/nim-1.0.6/lib/impure/re.nim(77, 28) Error: VM is only allowed to 'cast' between integers and/or floats of same size |
16:20:52 | FromGitter | <pigmej> is that known? |
16:21:18 | FromGitter | <pigmej> unless I'm doing something very wrong with RE but ... I don't think so |
16:27:28 | leorize[m] | you're definitely doing something really wrong :p |
16:28:16 | clyybber | Araq: Ah, nice! |
16:29:51 | FromGitter | <alehander92> Araq so can i use |
16:29:55 | FromGitter | <alehander92> tags: [] with async |
16:30:11 | FromGitter | <alehander92> sorry, it just seems it doesnt get triggered in my program |
16:31:13 | FromDiscord | <Rika> pigmej what are you doing?? |
16:31:26 | FromGitter | <pigmej> ok so that was clearly wtf |
16:31:37 | FromGitter | <pigmej> I just did `const foo = re"foo"` |
16:31:40 | FromGitter | <pigmej> and that raises that error |
16:31:57 | leorize[m] | you can't do that |
16:31:59 | leorize[m] | it's to be a `let` |
16:32:29 | clyybber | basically, re doesn't work at CT yet |
16:32:48 | leorize[m] | this is because re is just a high-level abstraction over libpcre |
16:32:54 | FromDiscord | <Rika> is nitely's regex CT compatible? |
16:32:57 | FromGitter | <pigmej> I know that I can't |
16:33:03 | FromGitter | <pigmej> but still the error is at least awkward |
16:33:19 | leorize[m] | @Rika: yes |
16:33:25 | FromDiscord | <Rika> noice |
16:34:00 | leorize[m] | @pigmej: well what caused the error should be fixed in 1.2 |
16:34:12 | leorize[m] | since we get integer casting in VM now iirc |
16:39:33 | * | tane joined #nim |
16:40:22 | clyybber | Araq: Is setLen supposed to zero out the memory? |
16:41:18 | Araq | I think so |
16:48:53 | * | akitoshi joined #nim |
16:50:37 | FromGitter | <alehander92> can i somehow |
16:50:46 | FromGitter | <alehander92> preserve a non closure reference to a procedure |
16:50:48 | FromGitter | <alehander92> in a field |
16:52:03 | FromGitter | <alehander92> nimcall ? |
16:52:16 | FromGitter | <alehander92> from older nim chats / github |
16:52:53 | Araq | system.rawEnv |
16:58:47 | FromGitter | <alehander92> so does nimcall check if something is a closure |
16:59:55 | * | rokups quit (Quit: Connection closed for inactivity) |
17:17:42 | watzon | I have to say, nim has a pretty nice built in PEG parser https://nim-lang.org/docs/pegs.html |
17:18:31 | * | Trustable quit (Remote host closed the connection) |
17:20:41 | * | Trustable joined #nim |
17:33:27 | * | solitudesf quit (Remote host closed the connection) |
17:34:03 | disruptek | !repo npeg |
17:34:04 | disbot | https://github.com/zevv/npeg -- 9npeg: 11PEGs for Nim, another take 15 91⭐ 4🍴 |
17:35:23 | disruptek | i guess i can't use dot operators in the compiler. |
17:35:51 | * | solitudesf joined #nim |
17:40:43 | * | ksandvik joined #nim |
17:41:37 | * | Yardanico joined #nim |
17:45:44 | * | hax-scramper joined #nim |
17:52:10 | FromGitter | <geotre> Is there anything in stdlib to convert camelCase to snake_case etc? "thisCase" -> "this_case" ? |
17:52:17 | disruptek | why? |
17:52:30 | Yardanico | nim has partial case insensitivity anyway |
17:52:32 | * | shadowbane joined #nim |
17:52:37 | Yardanico | thisCall() == this_call() |
17:52:42 | Yardanico | thisVar == this_var |
17:52:45 | FromGitter | <geotre> Interop with json APIs that use that for keys |
17:52:49 | * | dadada_ quit (Ping timeout: 252 seconds) |
17:52:54 | Yardanico | you don't have to really |
17:53:06 | Yardanico | you can just define fields in your object as snake_case and then use them as camelCase |
17:53:17 | FromGitter | <geotre> Yeah |
17:53:30 | FromGitter | <geotre> I just want to ideally write the nim obj defs using camel case |
17:53:43 | FromGitter | <geotre> Better for autocomplete etc |
17:53:49 | disruptek | go for it. |
17:53:55 | * | shadowbane quit (Client Quit) |
17:54:18 | disruptek | i have a sanitizer in openapi that you can adapt. search for sanitizer. |
17:54:21 | disruptek | !repo openapi |
17:54:22 | disbot | https://github.com/disruptek/openapi -- 9openapi: 11OpenAPI Code Generator for Nim 15 19⭐ 1🍴 7& 4 more... |
17:54:43 | FromGitter | <geotre> Nice one will have a look |
17:54:47 | * | shadowbane joined #nim |
17:54:57 | disruptek | it will convert any string into a valid nim identifier. |
17:55:09 | FromGitter | <geotre> Would be better if it was in stdlib so I could add something to the nim json module |
17:55:34 | FromGitter | <geotre> Ah that's not what I'm really looking for |
17:55:36 | disruptek | no such animal exists. |
17:55:45 | FromGitter | <geotre> Ok thanks |
17:56:16 | disruptek | i think you should look at my solution, first. |
17:56:48 | FromGitter | <geotre> I will have a look but it sounds like it's doing the opposite (i.e. snake_case -> camelCase) |
17:57:01 | disruptek | that's why you need to look at the code. |
17:57:04 | FromGitter | <geotre> https://github.com/disruptek/openapi/search?q=sanitizer&unscoped_q=sanitizer |
17:57:06 | * | rnrwashere joined #nim |
17:57:09 | FromGitter | <geotre> No results |
17:57:15 | disruptek | it has all the levers that you want. |
17:58:23 | disruptek | see src/openapi/codegen.nim -- sanitizeIdentifier() |
17:58:34 | FromGitter | <geotre> Ok got it |
17:58:43 | * | shadowbane quit (Client Quit) |
17:59:22 | disruptek | just toggle elideUnder. |
17:59:23 | * | dadada joined #nim |
17:59:46 | * | dadada is now known as Guest13768 |
18:00:41 | lbart | what is the best way to create a type with a const field? example type myNewType = object data: t field = 123 |
18:00:58 | Yardanico | there's no such a way |
18:01:03 | FromDiscord | <Rika> make it a normal const |
18:01:06 | FromDiscord | <Rika> outside the type |
18:01:26 | FromDiscord | <Rika> consts are a compile time construct, they no longer "exist" in run time |
18:01:33 | FromDiscord | <Rika> imagine them as template variables |
18:03:22 | lbart | ok thanks |
18:04:33 | * | rnrwashere quit (Remote host closed the connection) |
18:06:24 | * | rnrwashere joined #nim |
18:09:29 | ksandvik | Generic question, would using const for all cases we know will never change be performance-wise better (compiled away) than let? Or it just looks bad? |
18:09:47 | Yardanico | well it'll be a bit better |
18:10:05 | Yardanico | since you will set it at compile-time, and at runtime it will just *be there* |
18:10:18 | Yardanico | you wouldn't spend time at runtime calculating that value |
18:10:24 | ksandvik | I'm all in for as much as possible compile-time away coding. |
18:11:14 | * | silvernode joined #nim |
18:11:17 | Yardanico | don't overdo it pls :P |
18:11:27 | FromDiscord | <Rika> let is just an "immutable" RT var |
18:11:33 | FromDiscord | <Rika> why? whats wrong with overdoing it? |
18:11:34 | Yardanico | because then you have programs which do everything at compile-time and then nothing at runtime |
18:11:44 | Yardanico | dont abuse compiletime xd |
18:11:44 | disruptek | sounds good to me. |
18:11:49 | FromDiscord | <Rika> is that an issue? |
18:12:01 | disruptek | only for Yardanico. |
18:12:22 | FromDiscord | <Rika> yardanico prolly got scarred by the mainly compile time discord library |
18:12:24 | ksandvik | With large apps there's always some time needed to initialize the runtime. If that's compiled away then the better. |
18:14:40 | ksandvik | Small to medum ones, does not really matter. |
18:17:28 | ksandvik | I should read the manual but does Nim have a similar concept as constexpr in C++? |
18:17:34 | * | freepump[m] left #nim ("User left") |
18:17:51 | ksandvik | We use that a lot in large systems to build compile time constants from defined functions. |
18:18:03 | Yardanico | I think nim compiler automatically figures out if something can be computed at compile-time |
18:19:26 | ksandvik | Are macros compile time expresions, that would then do the same thing? |
18:22:52 | leorize | anything when put in a compile-time context will be run at compile time |
18:23:03 | krux02 | ksandvik, computations at compile time are generally slow as they are computed on a vm similar to a python like VM. |
18:23:16 | krux02 | runtime is much better at computation. |
18:23:25 | leorize | 4raq benchmarks show that Nim VM is faster than python :P |
18:23:32 | leorize | yea, but it's still slow :P |
18:23:37 | ksandvik | That is fine with fast computers, I rather take the hit then than for customers running the app. |
18:24:17 | krux02 | After what really matters is turnaround time. And if you can pick for your initialization to run at compilte time or at startup time of the program. You should pick startup time |
18:24:25 | krux02 | because it is faster. |
18:24:49 | ksandvik | Well, I rather code for users than for myself. |
18:25:00 | * | Sembei joined #nim |
18:25:05 | krux02 | both is important. |
18:25:18 | krux02 | But during development, you are the most important user of your application. |
18:25:42 | krux02 | don't underestimate that. |
18:25:45 | ksandvik | I'm talking about large scale programs, though, similar to Final cut Pro X and so on, where every millisecond counts. For these small command line tools and so on, does not really matter. |
18:26:14 | krux02 | Final cut Pro X is an application where everey millisecond counts? |
18:26:14 | * | a_b_m joined #nim |
18:26:34 | ksandvik | Indeed. Startup time is measured. Same with other large scale apps. |
18:26:44 | krux02 | yea |
18:26:53 | ksandvik | If we have millions of objects that need to be created it impacts the startup time. |
18:27:09 | krux02 | you should start thinking about that, as soon as your are as big as tha program. |
18:27:23 | ksandvik | Same with embedded systems I'm working on just now. We try to squeeze everything we get from compile time. |
18:27:25 | * | a_b_m quit (Client Quit) |
18:27:56 | krux02 | if you create millions of objects during every compilation, your development experience might become invisible. |
18:28:04 | ksandvik | Most embedded system are running low-end ARM chips and not much RAM. And the Flash is also not that fast. |
18:28:24 | krux02 | just a figure, what would you choose: |
18:28:31 | ksandvik | It depends, with incremental compilation the large sized pro apps actually built really fast, I could tweak something and have it up and running in 10 seconds. |
18:28:46 | krux02 | 1 minute extra compilation time vm 1 second extra startup time. |
18:28:58 | FromDiscord | <Rika> we dont got incremental compilation yet do we |
18:29:10 | ksandvik | Engineering management would say 1 ms startup time gain. or more. |
18:29:11 | krux02 | somebody is working on it. |
18:29:19 | krux02 | but we don't have incremental compilation. |
18:29:38 | * | abm quit (Ping timeout: 256 seconds) |
18:29:51 | * | silvernode quit (Ping timeout: 252 seconds) |
18:29:51 | ksandvik | They just buy us faster workstations if compilation time could squeeze out better performance. |
18:29:56 | FromDiscord | <Rika> i think what krux is basically saying is that if you're developing it and it's not released for prod yet go for the startup time first |
18:29:58 | krux02 | btw how long does final cut pro take to start up? |
18:30:06 | FromDiscord | <Rika> and once it's a burden then switch to CT |
18:30:14 | Yardanico | yeah @Rika i agree |
18:30:31 | krux02 | ^^ yes thask you |
18:30:34 | Yardanico | in most cases switching from rt to ct can be as simple as switching "let" to "const" |
18:30:39 | ksandvik | I don't remember the exact numbers just now - — I know the flow of what needs tobe set up and it's quite a lot. |
18:30:46 | FromDiscord | <Rika> once the importance shifts from "i must finish this as quickly as possible" to "our users need the speed now" switch |
18:31:34 | FromDiscord | <Rika> its unnecessary to spend so much time in CT if you're not releasing that binary in prod |
18:31:41 | ksandvik | What I'm saying is for command line tools and simple stuff like that, no worry about all this. |
18:31:43 | FromDiscord | <Rika> just like why we dont dev with -d:release on all the time |
18:31:59 | krux02 | But honestly, you can't compare final cut pro x, with products that are developed by individuals in Nim. |
18:32:02 | ksandvik | If you do large scale embedded work, web servers, or pro apps, then this is what we are worried about on a daily scale. |
18:32:23 | krux02 | Final cut pro has apple behind it. |
18:32:24 | FromDiscord | <Rika> once theyre released and fully fledged sure i guess |
18:32:48 | krux02 | no really. You can't. |
18:33:27 | krux02 | Final Cut pro (never used it), is probably a pretty bloated application that has a lot of startup time wasted on unnecessary stuff. |
18:33:41 | ksandvik | If Nim wants to be a systems/pro app dev language, these are the things engineers look at. I do like Nim, I think it's a good start, |
18:33:57 | krux02 | I don't know how long it need to start up, but I guess is is probably more than 15 seconds. |
18:34:18 | ksandvik | Final Cut pro X, yes and no. It was a full rewrite but the functionality required is *a lot*. |
18:34:50 | ksandvik | Just the UI updating with *thousands* of views takes its own toll. |
18:35:02 | ksandvik | Audio apps same thing. |
18:35:20 | krux02 | ksandvik, I don't know what your message here it. |
18:35:56 | krux02 | is |
18:36:02 | ksandvik | My message is that for toy apps and command line tools, yes anything goes. For pro apps and embedded systems, thinking about data structures and compile time optimization is a daily task. |
18:36:05 | FromDiscord | <Recruit_main707> how is this done: `from x import *` in nim? |
18:36:13 | Yardanico | "import module" |
18:36:24 | FromDiscord | <Recruit_main707> oki |
18:36:38 | krux02 | ksandvik, and yet you sound like you have no idea what Nim actually does, otherwise you wouldn't say such things. |
18:37:03 | ksandvik | That's why I asked for constexpr and if macros are compiled time executions. |
18:37:25 | krux02 | Nim is fast. Quite fast to compile. Extremely fast to execute, and metaprogramming beyond the possibilities of any other languge anybody ever showed to me. |
18:37:34 | Yardanico | krux02: what about the forbidden word |
18:37:40 | Yardanico | lisp |
18:37:50 | krux02 | we recently had a lisper change to Nim |
18:38:15 | krux02 | axion is his name |
18:38:31 | Yardanico | well another lisper with who I talked on tg uses emacs with lisp and doesn't agree with that :P |
18:38:32 | ksandvik | Lisp is fine but for runtime execution, uh huh, so many failed Apple projects that tried to use Lisp but that's another story (when I'm retired) |
18:38:49 | Yardanico | yeah, nim is easier to write after all |
18:38:52 | krux02 | Nim has better metaprogramming possibilities than lisp, because Nim has type information in the AST |
18:38:57 | Yardanico | I mean it's easier for new people to understand and stuff |
18:39:23 | krux02 | I do a bit of Lisp as well, but only emacs lisp. |
18:40:04 | krux02 | lisp is cool, especially the dynamic lisp environment where everything can be changed at runtime. Nim doesn't have that. |
18:40:40 | * | Guest13768 is now known as dadada |
18:41:01 | dadada | krux02: do you know how rust's new metaprogramming capabilities compare? |
18:41:11 | krux02 | actually I do. |
18:41:11 | Yardanico | uh oh |
18:41:24 | krux02 | Rust metaprogramming work on token streams. |
18:41:27 | * | m4r35n357 quit (Quit: Ex-Chat) |
18:41:31 | Yardanico | $*>?%*$ |
18:41:38 | Yardanico | {}#:: |
18:42:02 | krux02 | so you basically write your own parser in it. |
18:42:19 | krux02 | That also means, no type information. |
18:43:01 | krux02 | not sure what functions macros can call though. |
18:43:52 | * | ksandvik quit (Quit: Leaving.) |
18:46:32 | * | ksandvik joined #nim |
18:46:37 | FromDiscord | <Rika> sounds super painful to use |
18:46:49 | FromDiscord | <Rika> macros on nim are unlike any macros ive ever fuckin seen and i love it |
18:48:40 | * | ksandvik quit (Client Quit) |
18:54:17 | * | clyybber quit (Quit: WeeChat 2.7.1) |
18:55:21 | * | rnrwashere quit (Remote host closed the connection) |
18:58:27 | * | akitoshi quit (Quit: Connection closed for inactivity) |
19:03:49 | * | solitudesf quit (Ping timeout: 264 seconds) |
19:05:40 | * | hax-scramper quit (Quit: Quit) |
19:10:15 | FromGitter | <zetashift> this type mismatch error is driving me insane, can somebody try `nimble test` on my repo https://github.com/zetashift/naytracer and see if they get a type mismatch error? |
19:11:10 | * | dadada quit (Ping timeout: 256 seconds) |
19:11:29 | Yardanico | i get it too |
19:11:42 | Yardanico | on latest devel |
19:12:43 | FromGitter | <zetashift> ok so it shouldn't be an OS thing |
19:12:54 | FromDiscord | <Rika> you got no CI? |
19:14:18 | * | dadada joined #nim |
19:14:41 | * | dadada is now known as Guest77797 |
19:15:17 | * | rnrwashere joined #nim |
19:16:28 | FromGitter | <zetashift> No, I don't really have any experience with CI |
19:16:48 | FromGitter | <zetashift> most of my programming stuff are small scripts for bioinformatics D: |
19:26:33 | FromGitter | <zetashift> oh wow I can reproduce this problem |
19:26:41 | FromGitter | <zetashift> in the playground |
19:26:50 | Yardanico | nice! (:P) |
19:26:52 | FromGitter | <zetashift> it seems to be because in my tests I have a 3x3 matrix too |
19:27:56 | FromGitter | <zetashift> https://play.nim-lang.org/#ix=2fGK anyone know if this is because type inference? |
19:38:22 | * | Guest77797 quit (Ping timeout: 256 seconds) |
19:39:23 | * | solitudesf joined #nim |
19:44:13 | * | lmariscal0641 quit (Ping timeout: 265 seconds) |
19:44:18 | * | dadada joined #nim |
19:44:36 | * | lmariscal0641 joined #nim |
19:44:41 | * | dadada is now known as Guest96016 |
19:45:02 | * | Ckatt joined #nim |
19:45:03 | * | leorize quit (Ping timeout: 240 seconds) |
19:45:11 | * | idxu_ joined #nim |
19:45:21 | * | gmpreussner_ joined #nim |
19:45:23 | * | gmpreussner quit (Read error: Connection reset by peer) |
19:45:40 | * | dv^_^ quit (Ping timeout: 265 seconds) |
19:45:40 | * | Ckat quit (Ping timeout: 265 seconds) |
19:45:40 | * | idxu quit (Ping timeout: 265 seconds) |
19:45:43 | * | Ckatt is now known as Ckat |
19:46:01 | * | idxu_ is now known as idxu |
19:47:13 | * | dwdv joined #nim |
19:47:16 | * | dv^_^ joined #nim |
19:50:03 | * | leorize joined #nim |
19:50:53 | * | Guest96016 quit (Ping timeout: 252 seconds) |
19:51:23 | * | ksandvik joined #nim |
19:52:39 | * | dadada_ joined #nim |
20:04:22 | * | rnrwashere quit (Remote host closed the connection) |
20:07:34 | * | dadada_ quit (Ping timeout: 240 seconds) |
20:13:53 | * | rnrwashere joined #nim |
20:14:23 | * | dadada_ joined #nim |
20:23:34 | * | deepend quit (Excess Flood) |
20:23:45 | krux02 | zetashift: what I can tell, your scipt misses a `let`. |
20:25:55 | * | deepend joined #nim |
20:26:08 | FromDiscord | <Rika> your `==` proc only allows for equal size matrices to be compared |
20:26:43 | FromDiscord | <Rika> wait huh one moment |
20:32:51 | * | PMunch quit (Quit: leaving) |
20:37:52 | * | dadada_ quit (Ping timeout: 265 seconds) |
20:39:20 | * | Vladar quit (Quit: Leaving) |
20:43:14 | * | narimiran quit (Ping timeout: 240 seconds) |
20:44:11 | axion | I was summoned. |
20:44:20 | FromDiscord | <Rika> hello lisp convert |
20:44:23 | * | dadada joined #nim |
20:44:28 | axion | Oh talking about Lisp I see. |
20:44:47 | * | dadada is now known as Guest99090 |
20:45:20 | axion | There's a lot of well-known software written in Lisp. It's kind of amazing a language 20 years older than C is still kicking strong. |
20:45:55 | FromDiscord | <Rika> the discussion passed a few hours ago afaik |
20:46:04 | axion | and newer languages like Nim taking advantage of some of its main selling points for a change is welcome |
20:46:07 | FromDiscord | <Rika> so yeah sadly it seems like the people who mentioned it are gone |
20:48:54 | * | Kaivo quit (Quit: Off to game) |
20:49:10 | ksandvik | There's this saying that each generation of new computer scientists will re-invent something that was available in Li |
20:49:18 | ksandvik | LISP in the sixties. |
20:49:34 | FromDiscord | <Rika> like haskell? |
20:50:02 | axion | Greenspun's Tenth Rule |
20:50:47 | ksandvik | I've seen in the parking space here a custom number plate CADR. |
20:51:49 | * | Guest99090 is now known as dadada |
20:53:20 | axion | Until last month I was using CL every day for nearly 2 decades. Nim is pretty great. |
21:10:24 | * | jjido_ joined #nim |
21:15:20 | * | ksandvik quit (Quit: Leaving.) |
21:18:28 | * | ksandvik joined #nim |
21:19:12 | * | ksandvik quit (Client Quit) |
21:26:53 | * | ksandvik joined #nim |
21:27:36 | axion | But I haven't been coding in a couple days. Trying to build something :) |
21:27:42 | FromGitter | <zetashift> @krux02 yea because I commented out a wrong line :P: https://play.nim-lang.org/#ix=2fGO |
21:30:53 | ksandvik | tuལ༏འ |
21:31:13 | ksandvik | ༣།་མནན \༴qbradley'\349jhngfdsio |
21:31:37 | disruptek | tbh you had me at tuལ༏འ |
21:31:39 | ksandvik | Ooops, cleaning my keyboard and had this view focused. |
21:31:43 | ksandvik | Tibetan :-). |
21:32:27 | ksandvik | Have to take care of these MacBookPro keyboards, tiny particles get in and a key is blocked…. |
21:33:32 | FromDiscord | <treeform> Tibetan is an impossible language to learn... |
21:33:38 | ksandvik | I have some non-work related small projects I will try to use Nim for. |
21:34:08 | ksandvik | ག་ལེ་ག་ལེར་ - slowly slowly. |
21:36:07 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
21:36:08 | axion | Also I never got an answer to my nimble question a couple days ago :/ |
21:37:27 | FromDiscord | <treeform> what was you nimble question? |
21:38:34 | axion | I want a way to be able to run `nimble test` for any project regardless of its nimscript config, and be able to have it placed the compiled code in a dedicated build directory and not clutter up my directory tree, but of course, --outdir:build or any flag for that matter doesn't work with nimble test. |
21:39:15 | * | jjido_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:40:04 | * | jjido joined #nim |
21:40:07 | axion | Basically, I'm trying to run all the tests for the project whose file I am visiting with an editor key binding |
21:40:26 | ksandvik | Sounds reasonable. |
21:40:30 | axion | I don't want to have to depend on project-specific nimscript to enable flags or anything like that. I just want it to work for any project |
21:40:47 | FromDiscord | <treeform> axion, I have no clue how to do that. I suggest forum post. Probably will require custom reading of nimble files. |
21:41:39 | ksandvik | Or maybe a feature request via github. A global nimble test that finds all the test targets and keeps the output separate from the src file system sounds like a good idea. |
21:43:17 | axion | It's just unfortunate that no flags are honored for `nimble test`. I also want to hide hints too. My only solution currently is to edit every project's config.nims |
21:43:53 | axion | Mostly because I'm still rather new to this tooling and language in general. I'm sure there is a nicer solution somewhere |
21:55:33 | * | mal`` quit (Quit: Leaving) |
21:57:48 | krux02 | axion: my personal recommendation, forget about nimble. It isn't really maintained anymore, and the implementation is beyond repair. |
21:59:26 | kungtotte | krux02: even for package management? |
21:59:40 | krux02 | either make your project use submodules/subtrees for the dependencies and add the paths manually to the build script (just bash/bat but only a single call to nim with many args), or try using https://github.com/disruptek/nimph |
22:00:17 | * | mal`` joined #nim |
22:00:26 | krux02 | kungtotte, if nimble works for you and you like it or you rely on it, you can continue to use it. |
22:00:39 | FromDiscord | <Recruit_main707> is there some python to nim transpiler? at least for classes? |
22:01:01 | krux02 | In other words, if it serves your needs very well. I just realized for my part, that nimble tries to do many things that I don't want. |
22:01:23 | Yardanico | @Recruit_main707 There's https://github.com/metacraft-labs/py2nim |
22:01:30 | Yardanico | and https://github.com/metacraft-labs/py2nim_deprecated/ |
22:02:03 | krux02 | like it hides basically every error or warning message. Then something goes wrong and you have to restart your job again but this time with the "verbose" flag and then you drown in massages that you don't care about. |
22:02:12 | Yardanico | but really there's no such a tool which works for most python code |
22:02:14 | Yardanico | translate by hand :) |
22:02:14 | FromDiscord | <Recruit_main707> which is an script that calls another program XD, ill have a look at it. |
22:02:33 | FromDiscord | <Recruit_main707> Yaradinco: but im lazyyyyy |
22:02:59 | Yardanico | overcome the laziness |
22:03:02 | Yardanico | make your will stronger! |
22:03:13 | krux02 | And last but not least, it is impossible to debug a .nimble file. |
22:03:51 | ksandvik | Looks like someone is working on nimble sources in github. |
22:04:40 | axion | Thanks but I was planning on waiting for nimph to mature a bit. I'd rather have reliable yet limited tooling. |
22:05:27 | * | mal`` quit (Ping timeout: 252 seconds) |
22:05:48 | krux02 | axion, yes |
22:05:59 | * | mal`` joined #nim |
22:06:47 | krux02 | but until then, you can just work without a build tool. |
22:07:18 | axion | I don't want to mess with git submodules/version pinning etc manually |
22:07:26 | axion | That's _why_ I use a build tool |
22:07:45 | leorize | nimph actually works better whan nimble :P |
22:08:28 | axion | Well watching disruptek spend hours fixing bugs didn't get me excited about it just yet |
22:08:35 | Yardanico | lol |
22:08:47 | ksandvik | There's something beautiful with cargo, hope we only have one official/supported Nim project build tool. |
22:08:50 | leorize | better than no hours of bug fixing for nimble :P |
22:09:26 | Yardanico | well afaik d0m96 is busy these days |
22:09:27 | ksandvik | <whatever> build/run/test/doc/publish |
22:10:21 | ksandvik | and new, of course! |
22:10:38 | ksandvik | Even better, a way to add custom tools into this <whatever> |
22:11:12 | leorize | that's already a thing |
22:11:36 | leorize | nimble files are nimscript, and you can specify custom tasks there that could be run via: nimble <task name> |
22:11:40 | FromGitter | <zetashift> dom96 should just bribe a facebook manager to let him work on Nim |
22:11:47 | Yardanico | or just rewrite facebook in nim |
22:11:48 | Yardanico | easy |
22:12:05 | ksandvik | Facebook has turned into a big rust-fanfest place nowadays. |
22:12:26 | FromGitter | <zetashift> "The secret tool FB is using to spy on you! Try it out now, Nim!" |
22:12:52 | FromGitter | <zetashift> Rust did a lot of things well, can't blame em |
22:12:58 | kungtotte | Better they play around with Rust than yet another JS framework |
22:13:08 | Yardanico | better Rust than PHP |
22:13:28 | ksandvik | rust is used there for their back-end dev tools. Mercury was rewritten in Rust. |
22:13:55 | ksandvik | Facebook used to be a big PHP-house, maybe still there are plenty of remnants of that there. |
22:15:24 | FromGitter | <zetashift> they are putting a bit of work into a ReasonML/OCaml to PHP compiler |
22:15:33 | FromGitter | <zetashift> / transpiler whatever floats your boat |
22:15:50 | axion | The day nimble caves into the "rewrite it in rust" meme is the day I go back to Lisp :) |
22:16:04 | Yardanico | wdym lol |
22:16:26 | FromGitter | <zetashift> Nim likes dogfooding a lot I don't think it's gonna get rewritten in another language lmao |
22:16:31 | axion | Everything is rewritten in Rust these days. That technical debt will undoubtedly have to be paid eventually. |
22:16:38 | axion | and plus, this is Nim :) |
22:16:41 | Yardanico | not nim tools though |
22:16:47 | Yardanico | nim tries to rewrite everything in nim |
22:16:54 | Yardanico | playground in nim, forum in nim, nimble in nim, nim in nim |
22:17:03 | leorize | nim compiler still haven't been rewritten in (idiomatic) nim yet :P |
22:17:09 | Yardanico | sadly the website is not in nim (I mean it's static but the generator isn't in nim) |
22:17:17 | ksandvik | Yes, Nim should be written in nim. Same with a build tool (note singular)/ |
22:17:26 | Yardanico | well, it is written in nim |
22:17:33 | axion | Yup, which is why I'm here with Nim to stay. Just don't like that _nearly_ everything is being rewritten in Rust |
22:18:09 | * | solitudesf quit (Ping timeout: 256 seconds) |
22:19:35 | kungtotte | nimph can't handle perfectly valid URLs for remotes, so that's kind of a non-starter for me. |
22:20:19 | leorize | disruptek: ^ |
22:20:21 | * | rnrwashere quit () |
22:20:27 | leorize | you gotta investigate that |
22:21:39 | axion | I agree there should be a singular build tool. nimble was that, but if it's not maintained and beyond repair, the documentation and official releases need to switch it out |
22:21:48 | Yardanico | well nimble is still maintained |
22:22:05 | leorize | the build tool is the nim compiler itself |
22:22:15 | Yardanico | well yeah |
22:22:19 | Yardanico | nimscript is in nim compiler |
22:22:23 | leorize | I'd say nimble is just a dependency manager |
22:24:47 | disruptek | kungtotte: gimme an example or file a bug report, please. |
22:24:59 | axion | Well, I think more than a compiler and dependency manager is part of build infrastructure, but that's just me |
22:25:01 | kungtotte | Just double-checked the nimph url issue, it works on another repo so it's definitely choking on this specific URL |
22:25:45 | watzon | I'm confused as to how nimble is "beyond repair" |
22:25:46 | kungtotte | disruptek: the URL in question is [email protected]:~kungtotte/dtt |
22:25:48 | watzon | Works pretty well for me |
22:26:00 | ksandvik | The nim community is not that big so the more fractured the build story is, the harder it is to sell. |
22:26:32 | leorize | nimble and nimph uses the same project configuration scheme |
22:26:35 | leorize | via .nimble file |
22:26:53 | ksandvik | I must say, cargo has been a big evangelizing point for Rust. |
22:26:54 | disruptek | honestly, the only nimph bugs i know about arrive from the compiler. |
22:27:25 | FromDiscord | <Rika> `Just don't like that nearly everything is being rewritten in Rust` what's the issue with that? |
22:28:30 | kungtotte | Because most people do RIIR the wrong way and end up costing tons of resources implementing a version of the old code that doesn't actually deliver all of the features of the old code. |
22:28:57 | FromDiscord | <Rika> RIIR? |
22:29:05 | leorize | rewrite it in rust |
22:29:09 | kungtotte | ^ |
22:29:11 | watzon | yep |
22:29:18 | disruptek | kungtotte: https://github.com/disruptek/nimph/issues/121 |
22:29:19 | disbot | ➥ special handling is needed for either GitHub or non-GitHub URLs |
22:29:23 | axion | 1) Technical debt. 2) Incompetent developers expecting different results. |
22:29:30 | kungtotte | See? The phenomenon has an acronym. That means it's happening too much. |
22:29:35 | watzon | You end up saying "well I'm rewriting this in rust, may as well rewrite that too" |
22:29:55 | FromDiscord | <Rika> *whistles* |
22:29:56 | watzon | And before you know is the scope has gotten out of control |
22:30:03 | FromDiscord | <Rika> I totally don't do that, of course not, no |
22:30:10 | leorize | it's not too surprising tbh |
22:30:19 | FromDiscord | <Rika> *whistles harder* I swear I don't |
22:30:35 | leorize | you can't even get the same result just rewriting in the same language |
22:30:37 | watzon | I'm guilty haha. It's easy to get a bit over excited. |
22:31:13 | leorize | people thought rust is the "magic" fix for all of their bugs |
22:31:57 | leorize | the sad reality is that it's not, usually you end up with more bugs than what you started with |
22:32:02 | ksandvik | The rust rewrites I know of are usually python or similar tools that need to be rewritten for better performance to scale — something where Nim would be as suitable. |
22:32:06 | kungtotte | No programming language has been invented that prevents bugs at a greater rate than writing more code produces bugs. |
22:32:58 | axion | Sure. After all rubustness is inversely proprtional to the number of users. |
22:33:19 | ksandvik | Or then total new system level projects such as Google's Fuchsia OS. They actually tried go for a while. |
22:33:36 | kungtotte | ksandvik: there's a bunch of zealotry going on where people do driveby suggestions on random projects to rewrite them in Rust. That doesn't really happen (at scale) with any other language. |
22:34:05 | ksandvik | Rust is just now the 'hipster' language, me thinks. It's not that bad, actually. But overkill for many cases. |
22:34:13 | Yardanico | honestly I just don't understand why Rust is good for writing high-level apps like web server backends or typical GUI apps |
22:34:21 | ksandvik | Exactly. |
22:34:22 | leorize | it's mainly driven by rust claims of "1000% memory safety" |
22:34:24 | disruptek | axion: if there's something you can criticize in nimph, i'm all ears. |
22:34:25 | Yardanico | I understand when it's used for writing more low-level stuff |
22:34:30 | Yardanico | where safety can actually hel |
22:34:32 | Yardanico | help |
22:35:04 | kungtotte | Safety helps everywhere, it just becomes a problem much faster in certain domains |
22:35:27 | axion | disruptek: I will let you know if I ever decide to use it. For now, I'm sticking with what Nim ships with and mentions in their docs as it's what most users will have and be familiar with. |
22:35:34 | leorize | people idea was: written in C => full of memory-related bugs |
22:35:53 | leorize | and rust was like this magical cure |
22:35:58 | FromDiscord | <Rika> Idk, I've seen bandwagoning when it comes to rust |
22:36:39 | ksandvik | It also helps that the Rust project really focused on a very good developer community. |
22:36:49 | ksandvik | Things like that go far. |
22:37:12 | disruptek | sure. it'd be great if nim had nice tooling like rust. |
22:37:22 | watzon | Right? |
22:37:24 | disruptek | but as long as people refuse to use nice nim tooling, it won't improve. |
22:37:33 | leorize | well when you have mozilla backing and use c++-style syntax, it'd be surprising if it doesn't have that much traction |
22:37:44 | disruptek | because, as axion claims, use is inversely proportional to robustness. |
22:37:52 | disruptek | people like this are part of the problem and not part of the solution. |
22:38:01 | axion | It's second main driving point was that it produces efficient machine code. Now look at Rust developers. They are making more use of dynamic dispatch to alleviate the compile times, even though the compiler is 3x faster than it was a year or 2 ago |
22:38:03 | * | dadada quit (Ping timeout: 260 seconds) |
22:38:47 | axion | That's mostly because a large project might have the same library in its transitive dependency graph multiple times, with tons of monomorphization for each |
22:38:59 | ksandvik | doesn't that remind me of my morning comments :-) about compilers and runtime. |
22:39:23 | axion | It's kind of ironic that Rust developers are starting to trend towards dynamic dispatch if you ask me. |
22:39:48 | FromDiscord | <Recruit_main707> function overloading with `+, -, *, /` doesnt work when compiled to dll? |
22:39:51 | leorize | turns out that rust is not easy to compile :) |
22:39:56 | ksandvik | I used to program in Objective-C for 12 years non-stop so I know the pain. |
22:40:00 | Yardanico | @Recruit_main707 what do you mean |
22:40:02 | Yardanico | it'll still work lol |
22:40:04 | kungtotte | Compile times and binary sizes are both major issues with Rust, IMO. They're getting better, but they're not great. |
22:40:18 | Yardanico | you're probably doing something wrong :P |
22:40:28 | FromDiscord | <Recruit_main707> i guess... |
22:40:59 | kungtotte | This was a while ago but I remember trying some examples from the Rust book and even something as simple as a fibonacci function ended up being like a 5MB binary on my system |
22:41:01 | FromDiscord | <Rika> So I just extremely quickly skimmed through how Zig does exceptions and errors, is there a way to "enforce catching errors" like that in nim? |
22:41:20 | Yardanico | {.raises: [].} I guess? |
22:41:30 | leorize | return a value :) |
22:41:32 | Yardanico | annonate your procs with that and you'll have to catch all exceptions :P |
22:41:56 | leorize | the best way to enforce error handling is to return a value :) |
22:42:14 | leorize | !repo nim-result |
22:42:15 | FromDiscord | <Recruit_main707> its throwing this error, which confuses me if its actually the name: https://play.nim-lang.org/#ix=2fHD |
22:42:15 | disbot | https://github.com/arnetheduck/nim-result -- 9nim-result: 11Friendly, exception-free value-or-error returns, similar to Option[T] 15 24⭐ 2🍴 7& 4 more... |
22:42:30 | disruptek | not that friendly. |
22:42:33 | disruptek | !repo badresult |
22:42:34 | disbot | https://github.com/disruptek/badresults -- 9badresults: 11like results but worse 15 0⭐ 0🍴 |
22:42:43 | disruptek | more friendly. |
22:43:05 | leorize | Recruit_main707: can you make a reproducible sample and file an issue? |
22:43:19 | FromDiscord | <Rika> disruptek what's the differenxe |
22:43:25 | Yardanico | @Recruit_main707 that's a codegen issue |
22:43:43 | Yardanico | if it's erroring on the c compiler stage |
22:43:45 | disruptek | nim-results requires that you impl a side-effect-free $ for every value you return in a Result. |
22:43:56 | FromDiscord | <Recruit_main707> Yaradinco: https://play.nim-lang.org/#ix=2fHE |
22:43:58 | disruptek | obnoxious, imo. |
22:44:13 | Yardanico | why are you doing exportc? |
22:44:21 | * | dadada joined #nim |
22:44:30 | FromDiscord | <Recruit_main707> dont i need both flags? |
22:44:38 | disruptek | for semaphores, yes. |
22:44:44 | * | dadada is now known as Guest76476 |
22:44:45 | disruptek | highly recommended. |
22:44:48 | leorize | Recruit_main707: why do you need them? |
22:44:56 | FromDiscord | <Recruit_main707> this is compiled to a dll |
22:45:01 | leorize | so? |
22:45:08 | leorize | do you call them from outside the dll? |
22:45:22 | FromDiscord | <Recruit_main707> thats it XD, yes, thats the intention |
22:45:41 | FromDiscord | <Rika> Yardanico: why? |
22:45:50 | leorize | Recruit_main707: then you need to export them with C-friendly name |
22:46:16 | leorize | something like `exportc: "add_vector"` |
22:46:23 | FromDiscord | <Recruit_main707> well, thinking it better there was no way it worked in python when exported so... |
22:50:21 | leorize | what are you trying to do lol |
22:51:43 | FromDiscord | <Recruit_main707> essentially, someone made a bet, and if i transpile some utils (compatible with python), they will create a nim rocket league bot and will make a branch for my nim version of this utils. |
22:52:14 | FromDiscord | <Recruit_main707> so, a python library to sum up :p |
22:52:58 | leorize | ok I still don't know why you want to make it a dll :p |
22:53:39 | FromDiscord | <Recruit_main707> for interoping with python, i am gonna wrap my functions back to a user friendly python file/s |
22:53:48 | leorize | ah, use nimpy |
22:53:52 | leorize | problem solved :P |
22:54:04 | leorize | !repo nimpy |
22:54:05 | disbot | https://github.com/yglukhov/nimpy -- 9nimpy: 11Nim - Python bridge 15 507⭐ 25🍴 7& 4 more... |
22:54:08 | FromDiscord | <Recruit_main707> it throwed me some weird errors |
22:54:19 | leorize | they maybe you should investigate that :P |
22:54:38 | leorize | nimpy is the best way to interact between nim and python atm |
22:54:56 | disruptek | ~news |
22:54:56 | disbot | news: 11the #nim-news channel has a Nim news feed of updates to pull requests, issues, and packages. -- disruptek |
22:54:59 | FromDiscord | <Recruit_main707> nimpy doesnt like nim objects |
22:55:33 | FromDiscord | <Recruit_main707> and messing a bit with objects inside objects seems to make it give up |
22:56:33 | leorize | have you filed an issue to the project? |
22:57:57 | FromDiscord | <Recruit_main707> well, it says types and methods are still not very well supported, so i will just let yglukhov extend those functionalities a bit more and then check if the error persists |
22:58:23 | * | defection quit (Quit: defection) |
22:58:45 | disruptek | we need to get the ball rolling on the nim coronavirus badge project. |
23:01:31 | FromDiscord | <Rika> On the nim what |
23:02:50 | disruptek | it's a badge that measures how near you've been to other badges and sums/shares your risk. |
23:03:34 | disruptek | a small embedded project; hopefully something we can give away at fosdem, etc. |
23:03:41 | leorize | Recruit_main707: looks like nimpy can help you if you can deal with PyObject directly |
23:04:09 | disruptek | i dunno how else to interop with python in any serious way. |
23:04:32 | leorize | hmm, actually nimpy does support nim objects |
23:05:36 | FromDiscord | <Recruit_main707> yes, it does work keeping things simple, but i have an object, with one field being an object |
23:05:39 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:06:10 | disruptek | Araq: any reason i shouldn't abstract out the BModule.labels interface? |
23:06:21 | disruptek | it's a pain in the ass. |
23:06:26 | leorize | Recruit_main707: yea it might actually supports that |
23:06:36 | Araq | disruptek: what do you mean? |
23:06:54 | FromDiscord | <Recruit_main707> its getting confised with PyObjects and my object or something |
23:07:20 | disruptek | its manipulated everywhere with inc and creates something too sensitive. |
23:07:37 | disruptek | too sensitive to order, mutation, on and on. |
23:08:14 | disruptek | i'm stuck with this damned bug again. something to do with a particular append. maybe it's a reflection of a bug somewhere else. |
23:08:34 | disruptek | but it seems to be labels-related and i dunno. i'm irritated. |
23:08:37 | * | Guest76476 quit (Ping timeout: 264 seconds) |
23:08:40 | disruptek | damn alcoholics. |
23:09:03 | disruptek | and my dotOperator hack didn't work. |
23:09:23 | disruptek | so now i get to somehow bounce from ast to module, which will be... y'know, fun. |
23:09:27 | leorize | Recruit_main707: wdym? |
23:09:48 | Araq | well sure, replace the label counter with something else |
23:10:10 | disruptek | yeah. it can be anything else as long as it's anything else. |
23:10:51 | FromDiscord | <Recruit_main707> leorize, do you want to see the error? |
23:11:05 | * | Sembei quit (Ping timeout: 252 seconds) |
23:11:05 | disruptek | it's actually a loc bug but labels are a similar problem. |
23:12:49 | disruptek | genStrAppend takes a mutable TLoc and merely checks that it's empty. does nothing else with it. |
23:13:43 | * | tane quit (Quit: Leaving) |
23:14:19 | * | dadada_ joined #nim |
23:15:58 | * | qbradley quit (Quit: WeeChat 2.6) |
23:19:31 | leorize | Recruit_main707: sure? |
23:20:37 | * | leorize quit (Quit: WeeChat 2.7.1) |
23:22:02 | shashlick | Looks like the nimble beat down is over |
23:22:54 | shashlick | Fact is that package management is not easy nor solved, see the dime a dozen attempts at it and continuous innovation |
23:23:25 | ksandvik | Yes. |
23:23:35 | ksandvik | Could be good to focus collectively on one project. |
23:23:53 | shashlick | On top of that nimble takes on building as well which has its own dozen of implementations out there |
23:24:52 | ksandvik | That's fine, we only need one tool with the extension option for additional tools. But that's just my opinion. |
23:25:07 | shashlick | I spent some time thinking about it, I'm an expert in neither and unless the community is willing to tolerate some bumbling around, I'm not willing to invest the time |
23:25:16 | ksandvik | I've seen so many build systems so far where just a Makefile works really well, but it's the constant re-innovation factor. |
23:25:18 | FromDiscord | <Recruit_main707> leorize: https://play.nim-lang.org/#ix=2fHM |
23:26:21 | FromDiscord | <Recruit_main707> wait, this one: https://play.nim-lang.org/#ix=2fHO |
23:26:29 | * | leorize joined #nim |
23:27:28 | * | Trustable quit (Remote host closed the connection) |
23:28:12 | disruptek | the real problem is that we cannot agree on the problem. |
23:29:37 | shashlick | The real problem is that PR's just don't have the same velocity as being a maintainer |
23:30:10 | disruptek | i guess you should fork nimble and we'll compete to improve the ecosystem. |
23:30:48 | shashlick | The amount of code I rewrote for nimterop ast2 just wouldn't work as PR's |
23:31:28 | disruptek | i'm beginning to wonder if the amount of code i've written for IC will "work." |
23:32:20 | shashlick | And I'd hate the person who would create a PR with this scale of change |
23:33:20 | disruptek | so you're saying that you should have created a new project instead. |
23:35:35 | FromGitter | <zetashift> Reminds me of Scala which also has a lot of build systems |
23:36:20 | disruptek | imo it should just be done in nimscript, but you can't even fetch your cwd in nimscript, so... fuck it. |
23:37:47 | * | NimBot joined #nim |
23:38:42 | shashlick | disruptek: no, I mean that when you want contributors, you need to let them have some free reign else it is too slow and pointless |
23:39:09 | shashlick | and I acknowledge that it isn't easy to figure that out since visions need to match |
23:39:12 | disruptek | i agree, so why don't you fork nimble and allow contributions? |
23:39:32 | shashlick | i'm neck deep in nimterop so perhaps some day |
23:39:33 | disruptek | visions don't need to match, they just need to be compatible. |
23:39:58 | disruptek | i'm not a fan of the silly banner added to `bump`, but it's compatible with my goals, so i merged it. |
23:40:21 | * | qbradley joined #nim |
23:40:45 | shashlick | more importantly, it should be possible to experiment, mess up and fix things incrementally than expecting an individual PR to be ready to go |
23:40:50 | qbradley | Is there a way in nim to read a file at compile time, and perhaps include it as static data in the resulting executable? |
23:40:59 | disruptek | see staticRead() |
23:41:03 | shashlick | nimdeps |
23:42:37 | disruptek | shashlick: i dunno what happened but i'm pretty sure you're to blame. now nimph is unable to prevent the compiler's config parser from emitting hints even though i have always omitted hintConf from the config. |
23:42:49 | disruptek | any ideas? |
23:43:04 | shashlick | devel? |
23:43:16 | qbradley | disruptek: thank you |
23:43:24 | disruptek | i believe so. |
23:44:03 | shashlick | i think someone recently merged some code around hints |
23:44:10 | shashlick | is it working on 1.0.6 |
23:44:17 | * | dadada joined #nim |
23:44:41 | * | dadada is now known as Guest9910 |
23:45:16 | disruptek | i will test 1.0.6 now. |
23:45:16 | * | sleepyqt quit (Ping timeout: 256 seconds) |
23:45:47 | disruptek | qbradley: see also nimdeps |
23:45:50 | disruptek | !repo nimdeps |
23:45:51 | disbot | https://github.com/genotrance/nimdeps -- 9nimdeps: 11Nim library to bundle dependency files into executable 15 14⭐ 2🍴 |
23:46:03 | dom96 | I wonder what the context of this Nimble conversation is |
23:46:16 | disruptek | seems to be a PR problem. |
23:46:38 | qbradley | disruptek: very cool - thanks |
23:47:26 | dom96 | Anything I can do to help? |
23:47:42 | disruptek | manage your PR? |
23:48:04 | dom96 | oh, you mean public relations? |
23:48:08 | disruptek | yeah. |
23:48:30 | dom96 | what's the problem? |
23:48:33 | disruptek | shashlick: no extra output in 1.0.6 |
23:49:01 | disruptek | i think some people are unhappy with the pace of nimble development. |
23:52:39 | dom96 | Understandable, I'm unhappy with it as well. |
23:57:23 | ksandvik | It's never too late. I could help out with some higher level work, if there's something simple, like just gathering the state and requirements? |
23:57:59 | ksandvik | Or just learn the code base, too. |
23:58:11 | ksandvik | Sorry, have to quit, should be back tomorrow. |
23:58:13 | shashlick | We have 14 commits in nimble in the last six months |
23:58:13 | * | ksandvik quit (Quit: Leaving.) |
23:58:51 | shashlick | You had 17 commits in one day |