00:01:18 | FromDiscord | <Elegantbeef> https://github.com/marcomq/nimview yea there is stuff like this |
00:01:55 | anddam | whoa |
00:01:58 | anddam | that spot on |
00:02:05 | anddam | x/that/ a/'s/ |
00:02:29 | FromDiscord | <Elegantbeef> https://github.com/oskca/webview https://github.com/juancarlospaco/webgui are also stuff to look at |
00:02:38 | FromDiscord | <Elegantbeef> webgui relies on gtk though |
00:09:35 | NimEventer | New thread by Dom96: NimForum 2.2.0 - Fixes a big CVE!, see https://forum.nim-lang.org/t/8852 |
00:21:58 | * | noeontheend joined #nim |
00:38:12 | * | rp1 quit (Ping timeout: 250 seconds) |
00:38:30 | * | rp1 joined #nim |
00:39:21 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
00:44:26 | FromDiscord | <xx_ns> In reply to @NimEventer "New thread by Dom96:": hey i'm mentioned 🙂 |
00:44:39 | FromDiscord | <xx_ns> feelsgoodman.jpg |
00:45:30 | FromDiscord | <ajusa> are there any good dotenv parsers for Nim? https://github.com/euantorano/dotenv.nim seems to require quoting file paths for some reason |
00:46:28 | FromDiscord | <Elegantbeef> https://nimble.directory/search?query=env |
00:47:04 | FromDiscord | <ajusa> In reply to @Elegantbeef "https://nimble.directory/search?query=env": thank you, maybe I shouldn't have search `dotenv` and `.env` lol |
00:48:00 | FromDiscord | <Elegantbeef> You could always fork the otherone if that was your only issue |
00:50:02 | FromDiscord | <ajusa> I tried doing a simple change to get it to work and that didn't help, so I gave up. Looks like xmonader's doesn't have that issue, but it doesn't handle quoted strings properly. The envconfig one isn't a proper dotenv reader, it's for Nim configuration only. |
00:50:11 | FromDiscord | <ajusa> I'll just put stuff in double quotes lol |
00:51:01 | FromDiscord | <xx_ns> sent a code paste, see https://play.nim-lang.org/#ix=3NPi |
00:51:42 | FromDiscord | <xx_ns> @ajusa |
00:51:45 | FromDiscord | <ajusa> uh |
00:52:21 | FromDiscord | <ajusa> I guess clearing the environment variables becomes easier if you read it in? But yeah I see your point |
00:52:41 | FromDiscord | <ajusa> (eg it doesn't pollute a terminal with a bunch of vars potentially) |
00:53:09 | FromDiscord | <xx_ns> sent a code paste, see https://play.nim-lang.org/#ix=3NPj |
00:53:30 | FromDiscord | <xx_ns> once `./mybinary` exits and the subshell exits, the env vars are cleared |
00:53:33 | FromDiscord | <ajusa> Thanks! That's a much simpler solution |
00:57:33 | anddam | what even is https://github.com/marcomq/nimview#minimal-python-example ? installing "nimview" pip package results in a single nimview.pyd: PE32+ executable (DLL) (console) x86-64, for MS Windows into site-packages |
00:57:55 | anddam | how does that cope with Platforms: Windows, Linux, MacOS, Android, Cloud / Web |
00:58:04 | anddam | (I am on Linux) |
00:59:07 | FromDiscord | <Elegantbeef> Perhaps it's an oversight? |
00:59:27 | FromDiscord | <Elegantbeef> I mean why are you even installing the pip package? |
01:03:36 | * | noeontheend quit (Ping timeout: 268 seconds) |
01:16:14 | * | krux02 quit (Remote host closed the connection) |
01:24:49 | FromDiscord | <Patitotective> What is the closest GUI library to sublime text? |
01:24:59 | FromDiscord | <Elegantbeef> None |
01:25:36 | FromDiscord | <xx_ns> sublime uses a custom UI framework |
01:26:02 | FromDiscord | <xx_ns> something based on gtk iirc |
01:26:37 | FromDiscord | <xx_ns> so something like https://github.com/StefanSalewski/gintro may be what you're looking for? |
01:28:00 | FromDiscord | <Patitotective> In reply to @xx_ns "so something like https://github.com/StefanSalewski": Hm, yea, but it isn't highly customizable like qt |
01:28:05 | FromDiscord | <Patitotective> i think |
01:29:45 | FromDiscord | <Elegantbeef> Gtk is used for many different desktop environments |
01:29:46 | FromDiscord | <Elegantbeef> So it's pretty customizable |
01:31:04 | FromDiscord | <Patitotective> In reply to @Elegantbeef "Gtk is used for": hm, you're right, idk why i thought it wasnt |
02:19:36 | * | neurocyte0917090 quit (Ping timeout: 256 seconds) |
02:52:47 | FromDiscord | <Patitotective> is there any application built with _gintro_? |
03:02:13 | FromDiscord | <haolian9 (高浩亮)> nimforum reports `Couldn't retrieve posts.` every time i click the `load more posts` on [this page](https://forum.nim-lang.org/t/7983) |
03:14:54 | * | noeontheend joined #nim |
03:50:00 | FromDiscord | <JSONBash> In reply to @haolian9 (高浩亮) "nimforum reports `Couldn't retrieve": I get the same |
03:52:27 | FromDiscord | <JSONBash> how do you pass an immutable variable as a reference? |
03:52:39 | * | arkurious quit (Quit: Leaving) |
03:53:57 | FromDiscord | <Elegantbeef> What are you trying to do? |
03:55:32 | FromDiscord | <JSONBash> https://play.nim-lang.org/#ix=3NPG |
03:57:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NPH |
03:58:39 | FromDiscord | <Elegantbeef> There is no way to make pass it as `var string` without making a `var` copy |
04:05:09 | FromDiscord | <JSONBash> so cannot pass an immutable variable as a reference then? |
04:07:04 | FromDiscord | <Elegantbeef> well impliclity yes |
04:07:14 | FromDiscord | <Elegantbeef> Large types will be passed as reference |
04:07:54 | FromDiscord | <JSONBash> is there a size where it does that? and is that automatic? |
04:08:06 | FromDiscord | <Elegantbeef> You can also do `type MyType {.byref.} = object` |
04:08:12 | FromDiscord | <Elegantbeef> 3 float iirc |
04:08:22 | FromDiscord | <Elegantbeef> > = 3 floats will automatically be passed by ref |
04:10:33 | FromDiscord | <JSONBash> could I do this then? https://play.nim-lang.org/#ix=3NPL |
04:11:07 | FromDiscord | <Elegantbeef> distinct string might work |
04:11:11 | FromDiscord | <Elegantbeef> busy now so cant check |
04:11:20 | FromDiscord | <JSONBash> something equivalent to 3 floats in size is passed by reference? |
04:11:30 | FromDiscord | <Elegantbeef> more than |
04:13:41 | FromDiscord | <JSONBash> oh so I shouldn't spend much time worrying about this then because nim does all the heavy lifting for me? |
04:13:48 | * | rienske quit (Quit: WeeChat 3.4) |
04:13:48 | FromDiscord | <Elegantbeef> Yes |
04:14:01 | FromDiscord | <Elegantbeef> It has optimizations for copy vs ref passing |
04:14:02 | FromDiscord | <JSONBash> also is this what you meant? https://play.nim-lang.org/#ix=3NPM |
04:14:16 | FromDiscord | <JSONBash> In reply to @Elegantbeef "It has optimizations for": nice, that's even better! |
04:14:22 | FromDiscord | <Elegantbeef> Yea |
04:32:06 | FromDiscord | <noow> um how do I troubleshoot if I have an import, a public symbol from that import and it is not recognizing it |
04:32:40 | FromDiscord | <Elegantbeef> What's the compiler say |
04:32:42 | FromDiscord | <noow> sent a code paste, see https://paste.rs/nCa |
04:33:03 | FromDiscord | <noow> oh wait |
04:33:06 | FromDiscord | <noow> I can't read |
04:33:12 | FromDiscord | <noow> it's a recursive module dependency |
04:33:55 | FromDiscord | <noow> why do my generics not work tho 😭 |
04:34:24 | FromDiscord | <noow> the previous setup had a different setup and I was calling a function on a generic, and another module had the implementation of that function for that type, yet it couldn't find it |
04:34:45 | FromDiscord | <noow> honestly I will just cat all my nim files together, put function definitions on top and call it a day |
04:35:12 | FromDiscord | <that_dude> Does anyone have a good place for me too look to understand the difference between exception and defect? They seem to be used interchangeably |
04:35:12 | FromDiscord | <Elegantbeef> You could also fix the import order 😜 |
04:35:20 | FromDiscord | <noow> but it's a recursive dependency |
04:35:25 | FromDiscord | <noow> it is meant to be recursive |
04:35:33 | FromDiscord | <Elegantbeef> delayed imports allow that |
04:35:38 | FromDiscord | <noow> huh? |
04:35:39 | FromDiscord | <Elegantbeef> Is the code open? |
04:35:44 | FromDiscord | <noow> yes but not pushed |
04:35:55 | FromDiscord | <Elegantbeef> Push to a branch and i'll see if i can help |
04:36:03 | FromDiscord | <noow> okay gimme a min |
04:36:03 | FromDiscord | <Elegantbeef> Will be in a bit though |
04:36:08 | FromDiscord | <noow> i appreciate any help |
04:38:40 | FromDiscord | <noow> https://github.com/prod2/nondescript just view latest commit on the main branch |
04:39:18 | FromDiscord | <noow> fnv1a for NdValue is defined in types/value, while the generic using it is in types/hashtable.nim |
04:39:26 | FromDiscord | <noow> and value depends on hashtable through an intermediary |
04:40:36 | FromDiscord | <noow> you can `./build.sh` or `nim c --gc:arc -d:danger main` |
04:53:27 | FromDiscord | <Elegantbeef> Ok i'll take a look now |
04:56:17 | * | noeontheend quit (Ping timeout: 240 seconds) |
04:57:12 | FromDiscord | <Elegantbeef> your `findEntry` you need to `mixin` your procedures |
04:57:25 | FromDiscord | <noow> mixin? |
04:57:30 | FromDiscord | <noow> do I ctrl+f the nim manual? |
04:57:34 | FromDiscord | <Elegantbeef> ` mixin fnv1a, equal` |
04:57:39 | FromDiscord | <Elegantbeef> It forces the symbols open inside of a generic |
04:57:55 | FromDiscord | <Elegantbeef> So it reasons them at instantiation |
04:58:15 | FromDiscord | <noow> i'll try that, thank you |
04:58:25 | FromDiscord | <Elegantbeef> But there is another issue |
05:00:14 | FromDiscord | <noow> i pushed the mixin and a small fix to vm |
05:00:31 | * | noeontheend joined #nim |
05:01:24 | FromDiscord | <noow> okay it compiles and works |
05:01:27 | FromDiscord | <noow> thanks a lot!!! |
05:01:30 | FromDiscord | <Elegantbeef> No problem |
05:01:41 | FromDiscord | <Elegantbeef> last issue was doing `not x == b` instead of `x != b` |
05:01:42 | FromDiscord | <noow> i should read the nim manual from top to bottom sometime 🙂 |
05:02:10 | FromDiscord | <noow> In reply to @Elegantbeef "last issue was doing": yeah, i just changed a bunch of code at once with no compilations |
05:02:19 | FromDiscord | <noow> things like that creep in when i do that |
05:02:25 | FromDiscord | <Elegantbeef> Well anywho there you go no big file |
05:02:33 | FromDiscord | <noow> 🥲 |
05:02:46 | FromDiscord | <noow> no need for reinventing C headers |
05:03:32 | FromDiscord | <Elegantbeef> Even though some people do importing is fine in most cases |
05:03:37 | FromDiscord | <noow> yay nondescript calculates 37th fib now under 6.5 seconds |
05:03:47 | FromDiscord | <Elegantbeef> Let's get it faster! |
05:03:54 | FromDiscord | <noow> python does it under 9, lua under 3 |
05:04:35 | FromDiscord | <noow> In reply to @Elegantbeef "Let's get it faster!": yes, I ran out of ideas of optimization just by looking at the code |
05:04:38 | FromDiscord | <noow> time to bring out the profiler |
05:04:54 | FromDiscord | <Elegantbeef> How do i run the benchmark? |
05:05:09 | FromDiscord | <noow> time ./nds benchmarks/fib.nds |
05:05:34 | FromDiscord | <noow> after ./build.sh which uses arc and danger |
05:05:42 | FromDiscord | <Elegantbeef> Also you know you can use nimble to make a cross platform build task |
05:06:04 | FromDiscord | <Elegantbeef> then you could do `nimble buildFast` and it'd output nds |
05:06:16 | FromDiscord | <noow> I don't like having a src folder |
05:06:32 | FromDiscord | <Elegantbeef> You dont need one |
05:06:35 | FromDiscord | <Elegantbeef> Nimble just bitches for no reason |
05:07:01 | FromDiscord | <noow> oh? then i will look into it |
05:07:24 | FromDiscord | <Elegantbeef> Nico for instance doesnt have a `src` and uses a nimble file with tasks |
05:08:33 | FromDiscord | <noow> ah thanks, I will add it to my todo list |
05:09:05 | FromDiscord | <noow> might be useful when I start building a test suite |
05:13:46 | FromDiscord | <Elegantbeef> No hashing to access it or creating it |
05:13:47 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NPU |
05:14:26 | FromDiscord | <noow> oh, you're right |
05:15:03 | FromDiscord | <noow> wow... with all this help, would you like a mention in the commit message, or something |
05:18:32 | FromDiscord | <Elegantbeef> @lakmatiol\: https://github.com/nim-lang/Nim/pull/19467 when/if this gets merged you'll be able to use you code on devel |
05:20:00 | FromDiscord | <Elegantbeef> I mean you do you i didnt do much, I already have many contributions 😛 |
05:33:26 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3NPV |
05:34:02 | FromDiscord | <noow> time for expandArc or something 🤔 |
05:34:30 | FromDiscord | <Elegantbeef> Perhaps a double free? |
05:34:59 | FromDiscord | <Elegantbeef> Ah nevermind i'm dumb |
05:35:04 | FromDiscord | <xflywind> try also with `-d:useMalloc`? |
05:35:11 | FromDiscord | <Elegantbeef> smoke bomb |
05:38:52 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3NPW |
05:39:05 | FromDiscord | <Elegantbeef> Dont think so it should error |
05:39:29 | FromDiscord | <noow> nevermind the type is uint, it's just being cast to ptr |
05:39:37 | FromDiscord | <noow> so destroying an uint shouldn't do anything |
05:40:16 | * | Gustavo6046 joined #nim |
05:40:45 | FromDiscord | <noow> In reply to @flywind "try also with `-d:useMalloc`?": malloc: invalid size |
05:40:57 | FromDiscord | <noow> oh no something must be very wrong with my code |
05:44:30 | FromDiscord | <Rika> you cant have a destructor for a ptr object afaik |
05:44:51 | FromDiscord | <noow> it was a var uint |
05:45:16 | FromDiscord | <noow> im just casting heavily cause NaN boxing |
05:45:32 | FromDiscord | <Rika> mmmmmmmm thanks FPU |
05:46:55 | FromDiscord | <noow> im also munmap_chunk(): invalid pointer |
05:47:01 | FromDiscord | <Rika> is the broken code pushed |
05:47:31 | FromDiscord | <Rika> oh wow i kinda hate this code xd procs in procs ngl cursed |
05:47:33 | FromDiscord | <Rika> anyway |
05:47:55 | FromDiscord | <noow> In reply to @Rika "oh wow i kinda": 😦 |
05:48:00 | FromDiscord | <Rika> is the broken code pushed |
05:48:02 | FromDiscord | <noow> yes |
05:48:08 | FromDiscord | <Rika> branch? master? |
05:48:09 | FromDiscord | <noow> loops are broken specifically |
05:48:12 | FromDiscord | <noow> In reply to @Rika "branch? master?": yes |
05:48:13 | * | noeontheend quit (Ping timeout: 240 seconds) |
05:48:21 | FromDiscord | <noow> noone is relying on my code so 🤷🏻♂️ |
05:49:15 | FromDiscord | <noow> var i = 0; while (i < 3) {print i; i = i + 1;};↵triggers it |
05:49:18 | FromDiscord | <Rika> what exam |
05:49:18 | FromDiscord | <Rika> okay |
05:50:00 | FromDiscord | <Rika> i dont get the error |
05:50:07 | FromDiscord | <noow> do ./debug.sh |
05:50:07 | FromDiscord | <Rika> wait, ver of nim? |
05:50:12 | FromDiscord | <noow> 1.6.2 |
05:50:21 | FromDiscord | <Rika> neither |
05:50:29 | FromDiscord | <noow> -d:useMalloc tho |
05:50:32 | FromDiscord | <noow> oh |
05:50:33 | FromDiscord | <Rika> im on 1.6.0 |
05:50:46 | FromDiscord | <Rika> another regression? |
05:51:01 | FromDiscord | <Rika> let me check |
05:51:02 | FromDiscord | <noow> 1.6.0 is fine |
05:51:21 | FromDiscord | <Rika> no issue on 1.6.2 for me |
05:51:57 | FromDiscord | <noow> well |
05:52:11 | FromDiscord | <noow> 1.6.0 works fine on my system, 1.6.2 doesn't |
05:53:01 | FromDiscord | <Rika> neither build or debug break on 1.6.2 |
05:53:14 | FromDiscord | <Rika> maybe you have a fucked 1.6.2 somehow? that would be extremely starnge |
05:53:16 | FromDiscord | <Rika> (edit) "starnge" => "strange" |
05:53:25 | FromDiscord | <noow> I'll redownload |
05:53:26 | FromDiscord | <Rika> are you using a strange system? |
05:53:37 | FromDiscord | <noow> just a normal linux distro |
05:53:38 | FromDiscord | <noow> 😭 |
05:54:01 | FromDiscord | <noow> although |
05:54:17 | FromDiscord | <Rika> ? |
05:54:27 | FromDiscord | <noow> try running benchmarks/efib.nds |
05:54:40 | FromDiscord | <Rika> got it |
05:54:42 | FromDiscord | <Rika> got the issue |
05:55:22 | FromDiscord | <Rika> same with 1..6.0 |
05:55:23 | FromDiscord | <Rika> okay |
05:55:34 | * | rienske joined #nim |
05:57:36 | FromDiscord | <Rika> its a current bug it seems, gonna koch |
05:57:42 | FromDiscord | <Rika> actuall |
05:57:45 | FromDiscord | <noow> 1.4.8 also breaks |
05:57:49 | FromDiscord | <Rika> koch wont help, wonder whats wrong then |
05:58:00 | FromDiscord | <Rika> would expand arc help i dunno |
05:59:07 | FromDiscord | <noow> yeah im looking into that |
06:00:08 | * | rienske quit (Client Quit) |
06:00:13 | FromDiscord | <noow> okay |
06:00:20 | FromDiscord | <noow> it's an out of bounds indexing |
06:01:52 | FromDiscord | <Rika> where? |
06:01:59 | FromDiscord | <noow> line 184 in vm |
06:02:22 | FromDiscord | <Rika> do you not have bounds checks on ^^; |
06:02:40 | FromDiscord | <noow> I reimplemented seq's for optimization, but yes I turned my own bouds checks on |
06:03:39 | FromDiscord | <Bung> In reply to @Bung "<@!145405730571288577> `Error: cannot open": @ElegantBeef have you check this ? |
06:03:55 | FromDiscord | <Elegantbeef> 1.0.11 should fix it |
06:04:22 | FromDiscord | <Rika> use this https://nim-lang.org/docs/system.html#compileOption%2Cstring `compileOption("boundChecks")` |
06:04:51 | FromDiscord | <Bung> ok let me try |
06:04:56 | FromDiscord | <Elegantbeef> May i ask what optimizations you made to your seq? |
06:05:24 | FromDiscord | <noow> instead of defining with a length and a start, I am defining it in terms of pointers to the bottom and top object |
06:05:39 | FromDiscord | <noow> and capacity |
06:05:41 | FromDiscord | <Rika> idk how thats an optimisation but ok |
06:06:04 | FromDiscord | <noow> the improvements in performance could be just a different growing rate |
06:06:20 | FromDiscord | <Elegantbeef> You can implement your own growth rate using `newSeqWithCap` 😛 |
06:06:25 | FromDiscord | <Rika> not really |
06:06:30 | FromDiscord | <Rika> itll grow at the same rate |
06:06:35 | FromDiscord | <Rika> just a different cap at the start |
06:06:47 | FromDiscord | <noow> In reply to @Rika "idk how thats an": also, I can drop the last n objects by decrementing the top pointer |
06:06:57 | * | rienske joined #nim |
06:07:05 | FromDiscord | <Rika> same thing with a length? just reduce the length |
06:07:09 | FromDiscord | <Elegantbeef> You can drop the last N objects by just decrementing `len` 😀 |
06:07:28 | FromDiscord | <Rika> not sure if the bridge was slow this time |
06:07:35 | FromDiscord | <Elegantbeef> Nah i was |
06:07:55 | FromDiscord | <noow> well, that little math of adding len or just having a top directly probably doesn't make that much of a difference true |
06:08:15 | FromDiscord | <Rika> yeah most of the time is spent on the alloc and copies |
06:08:41 | FromDiscord | <Rika> so yeah newSeqWithCap would help if you knew the init.size or the max size |
06:08:48 | FromDiscord | <noow> I just straight out double the length everytime I run out and don't shrink right now |
06:09:00 | FromDiscord | <Elegantbeef> Nim seq's dont shrink eeither |
06:09:34 | FromDiscord | <Elegantbeef> seq's also have a doubling growth rate iirc until a point where they do a larger growth |
06:09:58 | FromDiscord | <Rika> you should be fine as long as you do a good/not stupid initial capacity |
06:10:28 | FromDiscord | <noow> well, sometihng improved the performance 🤷🏻♂️ or i just suck at benchmarking |
06:10:54 | FromDiscord | <Elegantbeef> Profiling is a gift |
06:10:55 | FromDiscord | <Rika> could be both |
06:11:01 | FromDiscord | <noow> probably the drop-n tho |
06:11:09 | FromDiscord | <Bung> @ElegantBeef it seems it does not add current project src to search paths |
06:11:14 | FromDiscord | <noow> since I was for countup discard popping |
06:11:31 | FromDiscord | <Elegantbeef> of course not↵(@Bung) |
06:11:33 | FromDiscord | <noow> i didn't find a easy way to drop the last n with seqs |
06:11:58 | FromDiscord | <Elegantbeef> `yourSeq.pop` |
06:12:14 | FromDiscord | <Elegantbeef> `yourSeq.setLen(yourSeq.len - n)` |
06:12:16 | FromDiscord | <Rika> well yeah thats one good point, afaik nim doesnt just dec. the length when the del is at the end |
06:12:19 | FromDiscord | <Rika> ah yeah setlen |
06:12:20 | FromDiscord | <Rika> lmao |
06:12:28 | FromDiscord | <noow> oh |
06:13:22 | FromDiscord | <Elegantbeef> Remember bung Nimscripter is a general purpose interop tool, it doesnt make many assumptions about where nim files should be |
06:14:03 | FromDiscord | <Elegantbeef> If you dont give it a `NimScriptPath` it doesnt have 0 inkling any folder other than `stdlib` is in the path |
06:15:36 | FromDiscord | <Elegantbeef> So what i'm saying is supply `getCurrentDir()` into the search paths |
06:23:45 | FromDiscord | <noow> nevermind xD |
06:23:49 | FromDiscord | <noow> it was a stupid typo |
06:23:53 | FromDiscord | <Rika> Lol |
06:23:56 | FromDiscord | <noow> i mean i did a pop instead of peek |
06:23:57 | FromDiscord | <Elegantbeef> Dont do that |
06:24:01 | FromDiscord | <Rika> Lol |
06:24:06 | FromDiscord | <noow> this happens when it's 7 am and i haven't slept all night |
06:24:27 | FromDiscord | <Bung> oh , I get new error that without idea |
06:24:40 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=3NQ8 |
06:26:10 | FromDiscord | <Elegantbeef> code you're using write's a stack trace |
06:26:24 | FromDiscord | <noow> @Rika @ElegantBeef well thanks for all the willingness to help, i hope you forgive a stupid thing or two i've done today |
06:26:49 | FromDiscord | <Elegantbeef> Hey i help people i dont care how many stupid things they do aslong as they're sincerely trying 😛 |
06:27:55 | FromDiscord | <noow> i wonder if languages with string interning GC strings 🤔 |
06:29:19 | FromDiscord | <Elegantbeef> I dont know what you just said |
06:30:26 | FromDiscord | <noow> im just crying out loud because i have no idea how I will implement a GC |
06:31:27 | FromDiscord | <Elegantbeef> mark and sweep isnt too difficult afaik |
06:32:04 | FromDiscord | <noow> yeah i'll figure it out somehow |
06:32:25 | FromDiscord | <noow> i will probably have to keep a reference to every single object on the heap though |
06:33:22 | FromDiscord | <noow> or keep track of all allocated memory and check which I can access from the root |
06:33:43 | FromDiscord | <noow> well i'll go sleep now xD thank a lot again |
06:33:51 | FromDiscord | <Elegantbeef> No problem |
06:34:33 | FromDiscord | <Rika> I was doing something |
06:34:42 | FromDiscord | <Rika> String interning is strange to think about I'd say |
06:35:36 | FromDiscord | <Bung> do know which part use writeStackTrace, my code does not use it directly |
06:36:12 | * | nrds joined #nim |
06:36:31 | FromDiscord | <Elegantbeef> I havent got a way to figure it out yet |
06:36:44 | FromDiscord | <Elegantbeef> but `fileIndex` should let us get the file |
06:37:20 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimscripter/blob/master/src/nimscripter.nim#L28-L31 feel free to figure it out if you have the time/effort |
06:37:21 | FromDiscord | <Bung> ` (8, 6): 'writeChars' [proc declared in /Users/bung/.choosenim/toolchains/nim-1.6.2/lib/system/io.nim(214, 6)]` you mean this hint , I also checked |
06:38:08 | FromDiscord | <Elegantbeef> No i mean we have the file index from `info` and we should be able to get what file, but I havent got around to it |
06:38:42 | FromDiscord | <Bung> okay , I'll try get some info from there |
06:43:30 | * | jmdaemon quit (Ping timeout: 250 seconds) |
06:44:26 | * | jmdaemon joined #nim |
06:47:34 | FromDiscord | <that_dude> Sorry to ask again, but what is the difference between exception and defect, and which one should I use. They seem to be used interchangably |
06:47:47 | FromDiscord | <Elegantbeef> Defects are for logic errors and not meant to be caught |
06:47:57 | FromDiscord | <Elegantbeef> Exceptions are exceptional code which can be caught |
06:48:34 | FromDiscord | <that_dude> So I would use defect if I did a wrong conversion in code, but exception if I couldn't load the needed data from a website? |
06:49:41 | FromDiscord | <that_dude> or defect is "kill through error" and exception is "give another chance through error" |
06:49:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NQa |
06:52:18 | FromDiscord | <that_dude> ok I think I got it |
06:52:45 | FromDiscord | <Elegantbeef> You shouldnt often use defects unless it's truely unhandleable |
06:53:52 | FromDiscord | <that_dude> Fair enough |
06:57:23 | FromDiscord | <Bung> @ElegantBeef https://github.com/beef331/nimscripter/pull/10 |
06:57:51 | FromDiscord | <Elegantbeef> Can you bump to 1.0.12? |
06:59:06 | FromDiscord | <Bung> sure |
06:59:54 | FromDiscord | <Bung> done |
07:00:31 | FromDiscord | <Elegantbeef> There you go, thanks! |
07:03:05 | * | nrds quit (Remote host closed the connection) |
07:03:08 | FromDiscord | <Bung> you can still use https://github.com/bung87/crown_ui/tree/nimscripter for reproduce , it report nimyaml use `writeStackTrace` |
07:03:37 | * | nrds joined #nim |
07:03:38 | FromDiscord | <Elegantbeef> Yea I cant do anything here, dont add files you cant use in nimscript |
07:05:13 | FromDiscord | <Bung> is there simple rule I can no which lib I cant use with nimscript ? |
07:05:54 | FromDiscord | <Elegantbeef> Well in this case the issue is a lacking flag |
07:06:26 | FromDiscord | <Elegantbeef> So perhaps i need to expose yet another parameter |
07:06:29 | FromDiscord | <Elegantbeef> Or make an object |
07:07:02 | FromDiscord | <Elegantbeef> https://github.com/flyx/NimYAML/blob/a72966374fe9c88e0974036131a36a8b4201e20d/yaml/private/internal.nim#L29-L37 i think the issue here |
07:09:05 | FromDiscord | <Bung> in there which code cant be used with nimscript ? |
07:10:03 | FromDiscord | <Elegantbeef> Any code that relies on low level code will not work |
07:10:28 | FromDiscord | <Elegantbeef> Many things will work if they dont rely on importC or similar |
07:12:46 | FromDiscord | <Bung> but here I see use nim builtin procs |
07:15:32 | FromDiscord | <Elegantbeef> `when defined(nativeStacktrace) and nativeStackTraceSupported:` |
07:15:40 | FromDiscord | <Elegantbeef> NimVm doesnt have stacktrace |
07:16:39 | FromDiscord | <Bung> okay, thanks for explanation |
07:41:11 | euantorano | @ajusa I’m the author of the dotenv library you mentioned earlier. I’m not sure I understand what you mean by “it seems to require quoting file paths for some reason”, but I’m happy to try and fix any issues you’re having. Can you please open an issue on GitHub? |
07:45:29 | * | rienske quit (Quit: WeeChat 3.4) |
07:45:48 | * | rienske joined #nim |
07:46:21 | FromDiscord | <Elegantbeef> I believe they're talking about `MyVar=/somePath/` |
07:46:33 | FromDiscord | <Elegantbeef> do you not make it so you have to do \`MyVar="/somePath/"\~ |
08:01:52 | * | jmdaemon quit (Ping timeout: 256 seconds) |
08:05:10 | * | jmdaemon joined #nim |
08:23:23 | * | jjido joined #nim |
08:46:38 | * | jmdaemon quit (Ping timeout: 256 seconds) |
08:53:13 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
09:00:10 | * | jjido joined #nim |
09:15:23 | haakon | Is there any difference between separating proc parameters with comma and semicolon? Which should I prefer? |
09:17:43 | FromDiscord | <Illusive> Is there a good text editor on Nim? |
09:18:06 | FromDiscord | <BhamidipatiNikhil> In reply to @Illusive "Is there a good": VScode |
09:19:47 | arkanoid | haakon, comma. Semicolon is used for special cases, when compiler can't find by itself what you want |
09:20:31 | haakon | arkanoid: God it, thanks |
09:20:38 | haakon | got* |
09:24:31 | arkanoid | I have kinda naive question. I see code calling dealloc(data) when data is "UncheckedArray[T]". Con can free memory if array size is not there? |
09:25:25 | arkanoid | For example in myseq example here: https://nim-lang.org/docs/destructors.html |
09:28:26 | arkanoid | Does nim keeps the size of each allocated heap size for me? |
09:30:52 | FromDiscord | <Phil> ... I think I'm missing something regarding reversing a string |
09:33:46 | FromDiscord | <Phil> Never mind, I kept using "let" strings with reverse |
09:35:14 | FromDiscord | <Phil> now how to turn a seq[char] into a string... |
09:35:34 | FromDiscord | <Phil> (edit) "string..." => "string in a simple manner that isn't me writing a loop on that array manually..." |
09:40:10 | FromDiscord | <Rika> arkanoid: i would recommend semicolon over comma once you're an "advanced user" slash you're using `using` |
09:40:31 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
09:41:24 | FromDiscord | <Rika> phil: choose, loop or memory copy or unsafe cast 😛 |
09:47:05 | FromDiscord | <mratsim> In reply to @arkanoid "Does nim keeps the": That's the role of an allocator yes, malloc/free are the same |
09:50:35 | FromDiscord | <Phil> In reply to @Rika "phil: choose, loop or": Loop it is for I am afraid of the unsafe |
09:50:46 | FromDiscord | <Phil> Namely of having to debug stuff I don't comprehend that well |
09:54:06 | FromDiscord | <Phil> ... man, that moment when you realize you can use nim aliases on 10 types and just use them by defining a proc for every single type in the alias |
09:54:13 | FromDiscord | <Phil> (edit) "a" => "an overloaded" |
09:54:34 | FromDiscord | <Rika> ? |
09:57:28 | FromDiscord | <Phil> So I have a full text search using sqlite's fts5 table |
09:57:45 | FromDiscord | <Phil> And the contents of that search table come from 10 other tables, for all of which I have model-types (using norm) |
09:58:17 | FromDiscord | <Phil> Now I still need procs that handle inserting and updating entries to and from that searchTable |
09:58:40 | FromDiscord | <Phil> And I'm not going to write 10 procs per functionality I need called "insertCharacter", "insertCreature", "insertblablabla" |
10:01:46 | FromDiscord | <Phil> sent a long message, see https://paste.rs/f4i |
10:02:28 | FromDiscord | <Phil> I maybe should add that the way to build the text and title that should go into the search table are different for every of the 10 tables |
10:02:40 | FromDiscord | <Rika> i mean if they all share mainly the same proc body that works yes |
10:02:53 | FromDiscord | <Phil> Anyway, I just realized I could do this as I was halfway of writing the very convoluted way |
10:03:01 | FromDiscord | <Phil> When Aliases and how useful they are hit me in the head |
10:03:38 | FromDiscord | <Phil> the proc body of "insertSearchEntry" is always the same, only the way of how you get the text for body and title of an entry differs |
10:28:32 | FromDiscord | <Phil> Is there a way for me to ascertain at compile time that all types of an alias have a proc with a given signature? |
10:31:02 | FromDiscord | <Rika> With concepts or compiles() |
10:31:04 | FromDiscord | <Rika> I guess |
10:31:32 | FromDiscord | <Phil> concepts are slowly but surely reaching the point of "most awaited feature for nim stable" |
10:31:50 | FromDiscord | <Phil> (edit) ""most" => "being my most" | "stable"" => "stable" |
10:31:59 | FromDiscord | <vindaar> yeah, it sounds like you want concepts. But I don't understand what you mean by "all types of an alias" |
10:32:50 | FromDiscord | <Rika> All types of a type class |
10:33:14 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3NQW |
10:34:07 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/xlY |
10:34:10 | FromDiscord | <vindaar> ah. But in that case why place them inside the type class if they don't fulfill the requirement already?↵(@Rika) |
10:34:37 | FromDiscord | <vindaar> so this is for users of some library? |
10:34:46 | FromDiscord | <Rika> Concepts is the solution pretty much… |
10:35:06 | FromDiscord | <Phil> This is for myself, see the debate above about me having a search table with content of 10 other tables.↵Yeah, concepts seem like the way to go here |
10:35:27 | FromDiscord | <vindaar> well, it's a partial solution for this. Because it will only cause type `B` to fail resolving some other proc that requires the type `MyConcept`. Nothing more |
10:36:36 | FromDiscord | <Rika> You can put outside the proc “if not compiles(…): {.error:….} |
10:37:46 | FromDiscord | <Phil> That might actually be nicer in the meantime as, while I'm eager to work with concepts, I'm hesitant to go for an experimental feature if the implementation might change on me while I'm in the middle of writing my project |
10:38:06 | FromDiscord | <Rika> Compiles is just as unstable as concepts I would say. |
10:38:22 | FromDiscord | <Phil> It is? dangit! |
10:38:25 | FromDiscord | <vindaar> I did read what you wrote above now. Still not quite following. In the snippet with `MyAB` you posted. Just having the code written like this already causes a CT error for `getNum` if you hand a `B` |
10:38:54 | FromDiscord | <Rika> But only if you hand a B |
10:38:59 | FromDiscord | <vindaar> concepts aren't actually that unstable. They can be a bit annoying if they don't match what you think / match too much. Or if you need recursive concepts |
10:39:03 | FromDiscord | <Rika> I assume they want it to error even if not |
10:39:14 | FromDiscord | <Phil> Pretty much |
10:39:20 | FromDiscord | <Phil> I want the guarantee at compile time that the procs are there |
10:39:28 | FromDiscord | <Phil> Not an error at runtime once the passing to B happens |
10:39:36 | FromDiscord | <Rika> You could just write tests 😛 |
10:40:07 | FromDiscord | <Phil> ....but....but |
10:40:20 | FromDiscord | <vindaar> that cannot work however. At least not with concepts. A concept doesn't "know" anything about all other concepts that match. It's only a way to restrict generics. That doesn't apply here. Your generic is perfectly restricted using the `MyAB` alias↵(@Rika) |
10:41:10 | FromDiscord | <vindaar> if you really want that, you'd have to write a macro that iterates the type alias and checks if the proc exists with some hack (i.e. either by calling it with a dummy or emitting `compiles` statements for each type) |
10:41:16 | FromDiscord | <Rika> In reply to @vindaar "that cannot work however.": Concepts aren’t a match in this case yes, but what I said (compiles) should be with the right predicate |
10:44:09 | FromDiscord | <vindaar> and at the same time I don't see how `getNum` with the type alias will ever match a `getNum` call for any explicit type in the alias. The explicit version of the proc will always be called instead I think |
10:44:56 | FromDiscord | <Rika> I think it’s just an example here |
10:45:00 | FromDiscord | <vindaar> of course, the other `getNum` can be something like `getNumImpl` or whatever |
10:45:09 | FromDiscord | <Phil> Ah, maybe bad example, the getNum(t: MyAB) could also be called "getANumber(t: MyAB)" for my purposes |
10:45:15 | FromDiscord | <Rika> Actually that’s kinda brilliant |
10:45:28 | FromDiscord | <Phil> Ohh I like the way of impl |
10:45:30 | FromDiscord | <Rika> If you want a proc to be guaranteed for a type in a type class |
10:45:39 | FromDiscord | <Rika> You make a proc using the type class that’s an error |
10:45:56 | FromDiscord | <Phil> I don't think I understand |
10:46:08 | FromDiscord | <Rika> Actually no |
10:46:18 | FromDiscord | <Rika> That’s still compile time error only on usage |
10:46:26 | FromDiscord | <Rika> Dude just write tests dammit hahaha |
10:46:33 | FromDiscord | <Phil> But lazyness! |
10:48:12 | FromDiscord | <vindaar> ohh, that's actually pretty smart if you want a custom error message↵(@Rika) |
10:48:25 | FromDiscord | <vindaar> but still only works on usage |
10:48:46 | FromDiscord | <vindaar> but then again, if you never need the missing proc, arguably it's not a problem if your program doesn't error at CT |
10:51:27 | FromDiscord | <Phil> ~~I hate it when people notice that I'm trying to use the compiler as my todo list reminder~~ |
10:51:33 | FromDiscord | <Phil> (edit) "~~I hate it when people notice that I'm trying to use the compiler as my todo list reminder~~ ... " added "😄" |
10:52:10 | FromDiscord | <Rika> No I get it I don’t like it either when CTEs I make only trigger on usage |
10:58:31 | FromDiscord | <Phil> Hmmm |
10:58:36 | FromDiscord | <Phil> I could use some advise organization wise |
10:58:45 | FromDiscord | <Rika> Write tests |
10:58:48 | FromDiscord | <Rika> Lol |
10:58:54 | FromDiscord | <Phil> Dang it Rika! |
11:00:17 | FromDiscord | <Phil> I organize my application by domain. ↵So I've got src/applications and inside that I've got on dir for each creature, character, location, item etc.↵Now I have one that is "search", which makes use of stuff in creature/character/location/item etc., mainly the knowledge on how to turn an instance of a character/bla into a string |
11:00:44 | FromDiscord | <Rika> What’s the issue? |
11:00:48 | FromDiscord | <Phil> I'm just contemplating whether "getSearchBody(article: Character)" should be located in the "character" folder or the "search" folder |
11:00:49 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3NR5 |
11:00:56 | FromDiscord | <Rika> In reply to @Isofruit "I'm just contemplating whether": Search |
11:01:07 | FromDiscord | <Rika> It’s not inherent to characters it’s inherent to searching |
11:01:30 | FromDiscord | <Phil> Makes sense to me, thanks! |
11:02:24 | FromDiscord | <Phil> In reply to @vindaar "well, you asked for": This is the type of thing that makes me scared of macros 😄 |
11:03:12 | FromDiscord | <vindaar> if not for the `when compiles` in there, I'd almost consider it usable. But the purpose doesn't warrant it imo |
11:04:23 | FromDiscord | <Phil> Thanks for the proof of concept though! If I'm interpreting this correctly the "explode" macro turns into code that tries to do a call for every combination of a type in MyAB with "getNumImpl" and errors out if it's not there, leaving no code behind even if it compiles |
11:04:27 | FromDiscord | <Phil> Am I reading that correctly? |
11:05:55 | FromDiscord | <vindaar> exactly↵(@Phil) |
11:06:15 | FromDiscord | <vindaar> ah wait, not quite |
11:06:29 | FromDiscord | <vindaar> nvm |
11:06:51 | FromDiscord | <vindaar> sorry 😅 I was about to say it's not quite right it doesn't leave anything behind, but I was confused for a second |
11:30:48 | * | jjido joined #nim |
11:46:49 | haakon | Is it not possible to foldl over HashSets? `@[1,2,3].toHashSet().foldl(a + b)` gives me "template/generic instantiation of `foldl` from here" |
11:47:21 | FromDiscord | <Rika> How do you iterate over a hash set |
11:47:29 | FromDiscord | <Rika> There's no order |
11:49:04 | haakon | The order would be arbitrary. You can iterate over a HashSet with `for` |
11:49:48 | FromDiscord | <Rika> In reply to @haakon "Is it not possible": What is the whole error |
11:49:53 | FromDiscord | <Rika> That is only one line of many |
11:50:45 | FromDiscord | <enthus1ast> well there is https://nim-lang.org/docs/sets.html#OrderedSet |
11:51:16 | FromDiscord | <Bung> @ElegantBeef do you have idea how that could be fixed ? |
11:51:24 | haakon | The whole error is https://paste.rs/VEI |
11:51:48 | haakon | (from the inim repl) |
11:52:11 | FromDiscord | <vindaar> most (all?) procedures / templates in `sequtils` assume your input data is a sequence↵(<@709044657232936960_haakon=5b=49=52=43=5d>) |
11:52:33 | FromDiscord | <Rika> In reply to @vindaar "most (all?) procedures /": I think it's more "sequence like" |
11:52:58 | haakon | vindaar: yeah I guess that's the problem. Folding over sets like this is simply not supported |
11:53:49 | FromDiscord | <vindaar> that's what it should really be, but the implementations aren't exactly very generic↵(@Rika) |
11:54:30 | FromDiscord | <vindaar> you can use a `toSeq` in there though. Of course means you have an additional iteration over your set. If that's fine `theSet.toSeq.foldl(a + b)` works though↵(<@709044657232936960_haakon=5b=49=52=43=5d>) |
11:54:51 | haakon | Yeah that's what I'm falling back on :-) |
12:01:21 | haakon | But toSeq is failing in the same way? `@[1,2,3].toHashSet().toSeq()` -> "template/generic instantiation of `toSeq` from here" |
12:03:26 | FromDiscord | <Rika> Sorry but again we need more context |
12:04:35 | haakon | Ah right. Here: "type mismatch: got 'int' for 'x`gensym35' but expected 'HashSet[system.int]" |
12:05:46 | FromDiscord | <Phil> I keep forgetting... but does nim have any remotely close equivalent to elvis operator? |
12:11:21 | haakon | Eh, rewrote it in a less functional way, works |
12:11:26 | FromDiscord | <Rika> No, nim does not have truthiness |
12:12:10 | FromDiscord | <Rika> Unless you only want an elvis operator for booleans, in which that's just "or" |
12:17:07 | emery | has anyone considered porting nim to solo5? |
12:30:27 | FromDiscord | <Rika> Tobwhatv |
12:30:30 | FromDiscord | <Rika> To what |
12:35:27 | FromDiscord | <Phil> In reply to @Rika "Unless you only want": Pretty much, I often used to do stuff like : ↵`let bla = procThatReturnsBool() ? valueA : valueB` |
12:35:51 | FromDiscord | <Phil> Or rather the equivalent of that in JS/Python |
12:37:50 | FromDiscord | <Rika> That’s not Elvis |
12:37:55 | FromDiscord | <Rika> That’s ternary |
12:38:20 | FromDiscord | <konsumlamm> you can just use an if expression theb |
12:38:21 | FromDiscord | <Rika> Ternary is inline if statement in Nim |
12:38:24 | FromDiscord | <konsumlamm> (edit) "theb" => "then" |
12:38:31 | FromDiscord | <Rika> Statement? Expression |
12:46:12 | * | mahlon quit (Ping timeout: 250 seconds) |
13:32:30 | * | lumo_e joined #nim |
13:53:55 | arkanoid | mratsim: (late) thanks |
14:06:42 | * | pro joined #nim |
14:14:34 | * | PMunch joined #nim |
14:15:29 | FromDiscord | <BhamidipatiNikhil> Guys, i am stuck... Any idea why the 30th line is showing indentation error? https://media.discordapp.net/attachments/371759389889003532/936987919925796915/unknown.png |
14:17:19 | * | Gustavo6046 quit (Quit: Leaving) |
14:33:13 | PMunch | @BhamidipatiNikhil, I can't see the image Discord sent.. |
14:44:37 | * | lumo_e quit (Ping timeout: 240 seconds) |
14:51:45 | * | arkurious joined #nim |
14:52:42 | FromDiscord | <BhamidipatiNikhil> I don't want to read the whole line as input... just the first element i want as input and ignore the rest.... How should i go about it? |
14:53:27 | FromDiscord | <Bung> http://debuggable.com/posts/parsing-file-uploads-at-500-mb-s-with-node-js:4c03862e-351c-4faa-bb67-4365cbdd56cb it seems this is right solution of a http multipart parser ?! |
14:57:57 | PMunch | @BhamidipatiNikhil, just read until you're happy and stop? |
15:18:14 | FromDiscord | <BhamidipatiNikhil> sent a long message, see http://ix.io/3NSs |
15:18:43 | FromDiscord | <BhamidipatiNikhil> i cannot control how i give input, because i am attempting a problem in an onlinejudge... |
15:18:52 | * | pro left #nim (WeeChat 3.4) |
15:19:58 | PMunch | Read the full line, then use "align" from strutils with "0 " as your pattern perhaps? |
15:20:27 | PMunch | Ah, it only takes a character, not a string |
15:29:04 | FromDiscord | <tandy> is there a way to get the first digit of an int without casting? |
15:29:16 | FromDiscord | <tandy> i want to check whether http error codes start with `2` |
15:29:22 | FromDiscord | <tandy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/937006441187917874): is there a way to get the first digit of an int without casting to string? |
15:29:33 | Zevv | tandy: waht about div 100 |
15:29:36 | FromDiscord | <tandy> i guess i can just do range check |
15:30:11 | Zevv | right, that's nicest. `val in 200..299` |
15:30:13 | FromDiscord | <Rika> In reply to @Zevv "<@878733865919844433>: waht about div": you mean div |
15:30:17 | FromDiscord | <Rika> oh wait |
15:30:19 | FromDiscord | <Rika> what |
15:30:24 | FromDiscord | <Rika> why did i read mod somehow? |
15:30:31 | FromDiscord | <Rika> i am going crazy |
15:30:35 | Zevv | div, mod, es ist mir alles egal |
15:30:36 | FromDiscord | <Rika> this is it guys |
15:31:18 | Zevv | remember, life is just a simulation. You're running on a cpu that does div and mod in one instruction. easy to confuse these kind of things |
15:31:34 | FromDiscord | <Rika> @_@ |
15:34:16 | FromDiscord | <tandy> oh thats clean, didnt know u could do that↵(<@709044657232936960_=5aevv=5b=49=52=43=5d>) |
15:34:18 | FromDiscord | <tandy> ty |
15:35:06 | Zevv | technically, there's nothing wrong with a >= 200 and a <= 299, of course. that's what the range check will boil down to udner the hood anyway |
15:52:56 | FromDiscord | <Patitotective> Idea: `..` first parameter should be 0 as default, so you can write `..10` |
15:57:37 | FromDiscord | <haxscramper> In reply to @Patitotective "Idea: `..` first parameter": this was implemented but then deprecated |
15:57:42 | FromDiscord | <Patitotective> why? |
15:57:53 | FromDiscord | <Patitotective> (edit) "why? ... " added "😕" |
16:13:00 | FromDiscord | <haxscramper> https://github.com/nim-lang/RFCs/issues/311 |
16:14:08 | * | noeontheend joined #nim |
16:15:43 | FromDiscord | <Patitotective> :o |
16:21:25 | FromDiscord | <Patitotective> Is it possible to build a free-dependencies _gintro_ application? Like, self-contain all the dependencies required |
16:29:03 | FromDiscord | <auxym> In reply to @Patitotective "why? 😕": you lose a explicitness to save a single character |
16:29:14 | FromDiscord | <auxym> would be my guess |
16:32:43 | FromDiscord | <Patitotective> yea, i just realize is not clear what it means |
16:32:51 | FromDiscord | <Patitotective> (edit) removed "i just realize" |
16:33:46 | * | jmdaemon joined #nim |
16:48:58 | anddam | Elegantbeef: still there? |
16:49:12 | anddam | anyway I checked out the python binding since it's what I am most accustomed to |
16:49:30 | * | PMunch quit (Quit: leaving) |
16:49:32 | anddam | and the readme suggested it could be used straight away |
16:50:18 | anddam | different topic, I have 1.6.0 installed on this computer, is there a nimble way to upgrade to 1.6.2 or should I just paint over it with choosenim (like I did in first place to install nim)? |
17:27:39 | anddam | oh choosenim has me served already |
17:29:22 | FromDiscord | <Phil> sent a long message, see http://ix.io/3NU1 |
17:30:10 | FromDiscord | <Phil> (edit) "http://ix.io/3NU1" => "http://ix.io/3NU2" |
17:30:45 | FromDiscord | <Phil> (edit) "http://ix.io/3NU2" => "http://ix.io/3NU3" |
17:40:50 | anddam | I am possibly doing something really wrong, I installed webgui package, then a simple "import webgui" in test.nim and `nim r test.nim` results in "/webgui-git/examples/test.nim(1, 8) Error: cannot open file: webgui" |
17:41:54 | anddam | the example.nim at https://github.com/marcomq/nimview/tree/main/examples has "import ../src/webgui" but isn't the point of installing a package just that you get the package namespace regardless of the source wd? |
18:02:10 | FromDiscord | <ajusa> In reply to @Isofruit "Wait, I'm designing myself": That's a wall of text but have you tried includes? |
18:02:32 | FromDiscord | <ajusa> Like have one models.nim file that just includes all the other files that you've split it into |
18:03:08 | FromDiscord | <ajusa> Unless you have mutually dependent types, then I think the compiler forces you to declare those in the same type section |
18:08:20 | FromDiscord | <Goel> I though the primitive type `int` was `int32` on x86 archit and `int64` in x64 archit, but it's not like that? Or maybe it takes that size but it remain of type `int` |
18:09:01 | FromDiscord | <Phil> In reply to @ajusa "That's a wall of": That would sort of work for models, as I tend to intentionally do multiple model-specific sub-models (e.g. Encounter needs a Diaryentry model, so they get a custom EncounterDiaryEntry Model which has only a subset of the data) |
18:09:45 | FromDiscord | <Phil> That does still leave the question open of the repositories though, where encounterRepository has a proc that depends on diaryEntryRepository, while diaryEntryRepository has its own proc that depends on a separate proc on encounterRepository |
18:10:02 | FromDiscord | <Goel> (edit) "I though the primitive type `int` was `int32` on x86 archit and `int64` in x64 archit, but it's not like that? Or maybe it takes that size but it remain of type `int`" => "sent a code paste, see https://play.nim-lang.org/#ix=3NUr" |
18:10:39 | FromDiscord | <Phil> Or wait, would "include" workon that to? I need to read up on that keyword |
18:11:17 | * | k0mpjut0r quit (Ping timeout: 252 seconds) |
18:11:20 | FromDiscord | <Phil> Oh wow, yeah that might work, if it "copy pastes" the contents of one file into another file |
18:11:29 | FromDiscord | <Phil> I could have one mega repository file and a mega model file |
18:12:32 | FromDiscord | <konsumlamm> In reply to @Goel "I though the primitive": it's not about x86 vs x64 (those are two specific architectures), it's about 32 bit vs 64 bit architectures |
18:12:56 | FromDiscord | <konsumlamm> but the answer is that `int` and `int32`/`int64` have the same size, but they're not literally the same type |
18:13:25 | FromDiscord | <konsumlamm> whereas `float` is always an alias for `float64` |
18:13:26 | FromDiscord | <Goel> Wait what, why int32 and int64 have the same size? |
18:13:34 | FromDiscord | <konsumlamm> they don't |
18:14:07 | FromDiscord | <konsumlamm> (`int` and `int32`) or (`int` and `int64`) |
18:16:00 | FromDiscord | <Phil> Wait, that wouldn't give me access in encounterRepository.nim to diaryEntryRepository.nim, hmmm |
18:16:08 | FromDiscord | <Phil> (edit) "diaryEntryRepository.nim," => "diaryEntryRepository.nim and vice versa," |
18:21:14 | * | jmdaemon quit (Ping timeout: 256 seconds) |
18:23:15 | * | mahlon joined #nim |
18:32:36 | FromDiscord | <Phil> All SO gives me is "rethink your problem domain and make repositories for that", gna |
18:35:40 | * | jmdaemon joined #nim |
18:41:15 | FromDiscord | <gcao> Today I run into this fork of Nim called Nimskull (https://github.com/nim-works/nimskull). does anyone know anything about it? |
18:41:58 | FromDiscord | <haxscramper> Aside from plans in the readme etc.? |
18:42:10 | FromDiscord | <Phil> Ah, hax is here, I can save myself the typing |
18:42:49 | FromDiscord | <haxscramper> If you want the short rant-free version then it is a fork of nim for now |
18:43:19 | FromDiscord | <Phil> Wasn't the key differentiator your focus would be more on stability and less buggs? |
18:43:52 | FromDiscord | <haxscramper> yes, that hasn't changed |
18:44:07 | FromDiscord | <Phil> Check, just wanted to see whether I recalled that correctly |
18:44:36 | FromDiscord | <haxscramper> well, right now the focus is on the massive refactoring of the compiler impl. because it is barely maintainable |
18:45:37 | FromDiscord | <haxscramper> with some intermediate steps like minor https://github.com/nim-works/nimskull/pull/214 and major https://github.com/orgs/nim-works/projects/4 tooling improvement |
18:47:23 | FromDiscord | <lpha3ch0> sent a code paste, see https://play.nim-lang.org/#ix=3NUO |
18:48:16 | FromDiscord | <haxscramper> `&` can be an overloaded prefix oeprator |
18:48:22 | FromDiscord | <haxscramper> what is the full context of this code? |
18:48:38 | FromDiscord | <lpha3ch0> In reply to @haxscramper "what is the full": https://gist.github.com/khchen/5cd03eab742517fa20ccc688e6b1a1a6 |
18:50:46 | FromDiscord | <haxscramper> https://github.com/khchen/winim/blob/master/winim/utils.nim#L43 someone can't use `addr` |
18:50:50 | FromDiscord | <haxscramper> (edit) "https://github.com/khchen/winim/blob/master/winim/utils.nim#L43 someone can't use `addr` ... " added "I guess" |
18:51:02 | FromDiscord | <haxscramper> this is a C-like addr version |
18:51:56 | FromDiscord | <Rika> Yikes |
18:52:38 | FromDiscord | <lpha3ch0> That's what it looked like to me but I was still confused because I was aware of it's application to concatenate strings and saw it was overloaded but couldn't find any references to how it was used other than concatenation. |
18:52:43 | FromDiscord | <haxscramper> In reply to @haxscramper "with some intermediate steps": btw if someone is interested in what they can theoreticallly get when implicit system import happens https://media.discordapp.net/attachments/371759389889003532/937057687169007667/151627106-713d4d46-ea9d-4694-a886-4d261eaa9d9b.png |
18:53:23 | FromDiscord | <lpha3ch0> It must be overloaded somewhere in winim. Thanks for your help. |
18:54:46 | FromDiscord | <haxscramper> '> somewhere↵↵https://github.com/khchen/winim/blob/f658fc523a7c8960b2f808d774b0f77cecec86db/winim/utils.nim#L43-L52 - this is where it is overloaded |
18:55:33 | FromDiscord | <haxscramper> In reply to @Isofruit "Ah, hax is here,": I probably should wait a little next time before jumping in |
18:58:34 | arkanoid | Any idea how to solve this issue when using OOP and finalizers? Have to fix without relying on declaring =destroy for backward compatibility: https://play.nim-lang.org/#ix=3NUW |
19:08:39 | * | k0mpjut0r joined #nim |
19:27:22 | FromDiscord | <vindaar> https://play.nim-lang.org/#ix=3NVi |
19:27:23 | FromDiscord | <vindaar> that's what I'd do |
19:40:29 | FromDiscord | <krisppurg> In reply to @Rainbow Asteroids "does anyone know how": first things first, I think you need to get member from guild (because I think message.member doesnt have as much data). Then do something like member.computePerms(guild.channels[m.channel_id]) |
19:41:11 | FromDiscord | <krisppurg> https://krisppurg.github.io/dimscord/dimscord/helpers.html#computePerms%2CGuild%2CRole |
19:42:40 | FromDiscord | <tandy> love it when you can see posts on nim forum but not actually visit them |
19:54:55 | arkanoid | vindaar, I don't understand your, example, it gives me the same error as before |
19:55:15 | arkanoid | do I have to define "gcDestructors"? |
19:55:25 | FromDiscord | <SecureThisShit> Stupid question. I have an byte sequence and would like to get a pointer to the first byte of it. How can I do that? |
19:55:47 | arkanoid | oh, you mean just branch code with and without destructors |
19:55:58 | FromDiscord | <vindaar> oops, the two branches are exchanged. The `defined(gcDestructors` should be the one that can define `=destroy` hooks. It's a variable that's automatically defined when compiling with ARC↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>) |
19:57:01 | FromDiscord | <vindaar> if `s` is your `seq[byte]` (I assume that's what you mean by a byte sequence?) it's just `s[0].addr` (or possibly `unsafeAddr` depending on the variable. That'll change soon though...)↵(@SecureThisShit) |
19:57:55 | FromDiscord | <SecureThisShit> In reply to @vindaar "if `s` is your": Nice, that worked thanks! |
19:58:08 | FromDiscord | <SecureThisShit> Easy ^^ |
19:58:17 | arkanoid | vindaar, ok, let me test this with a larger example |
19:59:08 | * | lumo_e joined #nim |
20:02:11 | arkanoid | what's happening to nim forum? |
20:02:30 | * | vicfred joined #nim |
20:02:47 | FromDiscord | <vindaar> what do you mean?↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>) |
20:03:44 | arkanoid | I was receiving cloudflare 502 bad gateway a minute ago, but now it loads |
20:04:05 | arkanoid | now again |
20:04:21 | arkanoid | maybe just some pages? https://forum.nim-lang.org/t/4132 |
20:04:47 | arkanoid | should I report it? |
20:05:25 | FromDiscord | <vindaar> oh, indeed |
20:13:37 | arkanoid | done |
20:14:03 | arkanoid | do I have to declare the non-ref type to declare it's =destroy? |
20:15:15 | arkanoid | like `ParentObj = object of RootObj` + `Parent = ref ParentObj` + `proc `=destroy`(self: Parent)` ? |
20:15:46 | arkanoid | sorry, third should be `self: ParentObj` |
20:21:04 | FromDiscord | <demotomohiro> You can also define destructor for ref object type like ``=destroy`(self: Parent()[].typeof)` |
20:21:42 | FromDiscord | <demotomohiro> `=destroy`(self: Parent()[].typeof) |
20:21:49 | arkanoid | vindaar, btw the solution you suggested is not possible to apply in my context as it would break existing code that use the `proc delete(x: T) = x.ParentT.delete` pattern |
20:23:23 | FromDiscord | <vindaar> existing code in the sense of users being dependent on it or you having to change your code?↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>) |
20:27:00 | arkanoid | the first one |
20:28:41 | FromDiscord | <Patitotective> What are you working on? @Arkanoid :p |
20:28:47 | FromDiscord | <vindaar> hm \:/ |
20:29:23 | FromDiscord | <vindaar> I'd still work toward a new major release with a breaking API, because `=destroy` hooks aren't going away |
20:30:24 | FromDiscord | <vindaar> after all, it should really only be code that must be removed for the user.↵You might as well add dummy `delete` procedures for ARC, that simply don't do anything, but write a deprecation message.That is of course, unless the `delete` has a purpose beyond being a finalizer |
20:32:19 | arkanoid | long story short: I am not the author of the lib, but an user that is trying to fix a memory leak problem when using ARC/ORC (finalizer not called, issue already posted). Everything started be removing the root of the problem, that is remove all forward declarations of the finalizers, that triggered chain reaction: had to move all constructor in same module as type declaration, had to replace include |
20:32:21 | arkanoid | with import to decouple, had to move imports to late imports (thanks beef!) and merge some modules to avoid recursive dependency issue, but now I'm facing this show stopper: https://play.nim-lang.org/#ix=3NUW |
20:34:15 | arkanoid | this is the library I'm trying to improve, but the "code smell" (just include and no imports) is actually not so wrong considering all the workarounds that I'm facing to improve it |
20:34:17 | arkanoid | https://github.com/filcuc/nimqml |
20:35:18 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=3NVH |
20:36:57 | * | elves-upstate joined #nim |
20:38:10 | FromDiscord | <demotomohiro> Adding --passC:-Ic:\path\to\your\include\dir? |
20:38:21 | arkanoid | this is the root cause that makes refc code silently leaking when using arc/orc https://github.com/nim-lang/Nim/issues/19402 |
20:40:28 | emery | is there a way to trace which modules import which? I find myself importing unusable modules |
20:43:49 | arkanoid | emery, good question, I've been facing kinda same issue when trying to deal with multiple recursive dependency issues. At least when that kind of issue is found the compiler gives you the import chain root cause. I had to write a graphviz diagram by hand |
20:45:52 | FromDiscord | <vindaar> from skimming this\:↵the `var T` issue isn't an issue in practice. Just define a regular base `object` that the thing that has the current name is a `ref object` of. Then you can just define the `=destroy` for the object (which then takes `var T`). But as one never calls `=destroy` manually (well, sometimes from a different destructor), you don't really have to change anything in the code (aside from the removal of `delete`)↵(<@709044 |
20:47:09 | emery | i'm trying to import asyncdispatch for a platform without sockets or file descriptors, i think thats my problem |
20:49:04 | arkanoid | vindaar: the library currently asks the user to extend base class, setup new finalizer, and use it to call parent finalizer: https://github.com/filcuc/nimqml/blob/04888273ce01038334e7c89b379432180acefedb/examples/abstractitemmodel/mylistmodel.nim#L20 |
20:49:21 | arkanoid | emery, which platform? |
20:49:28 | emery | its a suprise |
20:51:35 | arkanoid | :O |
20:52:48 | emery | I think I should remove genode before I add another esoteric platform |
20:53:05 | * | elves-upstate quit (Remote host closed the connection) |
20:53:22 | * | elves-upstate joined #nim |
20:53:35 | arkanoid | btw a think a simple program that walks the project folder and greps "import" and prints "srcmodule -> dstmodule" can be turned into a graphviz digraph easily |
20:54:08 | arkanoid | question is that this could be done also with a project level macro, or module level macro, but not sure about their existence |
20:54:19 | * | elves-upstate quit (Remote host closed the connection) |
20:56:29 | arkanoid | detomotohiro: thanks for the MyType()[].typeof, works nicely! and also makes a lot of sense |
20:59:43 | FromDiscord | <krisppurg> In reply to @demotomohiro "Adding --passC:-Ic:\path\to\your\include\dir?": no? |
21:03:13 | * | noeontheend quit (Ping timeout: 250 seconds) |
21:04:57 | * | lumo_e quit (Ping timeout: 240 seconds) |
21:07:50 | * | lumo_e joined #nim |
21:11:31 | FromDiscord | <demotomohiro> @krisppurg Do you have the header file that gcc says no such file? If so, you need to pass the directory to gcc with -I option. |
21:16:20 | * | jmdaemon quit (Ping timeout: 256 seconds) |
21:25:17 | FromDiscord | <noow> can I disable the "install" and "build" commands for a nimble package |
21:25:24 | FromDiscord | <noow> I only want custom tasks |
21:26:36 | FromDiscord | <tandy> anyone here know stuff / maintain karax? i wonder if its possible to add better async support |
21:26:40 | FromDiscord | <noow> or alternatively, how do I add custom flags to the custom build |
21:26:52 | FromDiscord | <noow> (edit) "custom" => "nimble" | "nimblebuild ... " added "command" |
21:28:26 | FromDiscord | <Elegantbeef> you can make a `config.nims` inside your project with the flags you want |
21:31:00 | FromDiscord | <noow> but then i'll have to --skipProjCfg and --skipParentCfg everywhere |
21:31:32 | arkanoid | can you tell me why I'm not getting destructors being called here with --gc:arc? https://play.nim-lang.org/#ix=3NWd |
21:32:03 | FromDiscord | <krisppurg> In reply to @demotomohiro "<@222794789567987712> Do you have": no |
21:32:12 | FromDiscord | <krisppurg> (edit) "In reply to @demotomohiro "<@222794789567987712> Do you have": no ... " added "i dont have the header file" |
21:37:39 | FromDiscord | <Elegantbeef> Expanding arc shows that it calls destroy for the a, but i dont get why it doesnt destroy the inner object |
21:38:57 | arkanoid | hi beef! |
21:39:07 | FromDiscord | <Elegantbeef> Hello |
21:39:07 | Amun-Ra | hmm, same with orc |
21:39:23 | FromDiscord | <Elegantbeef> Even minimized it doesnt work |
21:39:44 | arkanoid | oh no :( |
21:40:39 | FromDiscord | <oldteen> Hello, noob question, what do you use as language server with visual studio code ? |
21:40:53 | FromDiscord | <Elegantbeef> I use saem's extension |
21:41:00 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3NWh this works arknoid |
21:41:07 | arkanoid | I also use saem's extension |
21:41:16 | FromDiscord | <Elegantbeef> I think the issue is that ref's dont have destructors so it doesnt attempt to call it? |
21:41:43 | FromDiscord | <Elegantbeef> Well it attempts to call it but `=destroy(aRefObject)` is just "no call so we dont destruct" |
21:42:02 | FromDiscord | <Elegantbeef> I dont recall why ref's dont have destructors |
21:43:32 | * | lumo_e quit (Ping timeout: 256 seconds) |
21:44:31 | arkanoid | {.borro: `.`.} ... efficient, expressive, elegant |
21:45:01 | * | lumo_e joined #nim |
21:45:11 | FromDiscord | <Elegantbeef> Lol It's the least toxic borrow method |
21:45:17 | FromDiscord | <Elegantbeef> Borrowing anything else is hell on earth |
21:46:35 | arkanoid | so this means destructors + arc + ref objects are a no? |
21:46:39 | FromDiscord | <vindaar> https://play.nim-lang.org/#ix=3NWj |
21:46:53 | FromDiscord | <vindaar> same as on non arc you still have to do something to turn that ref into a non nil |
21:47:12 | FromDiscord | <Elegantbeef> Oh i didnt even notice that |
21:47:17 | FromDiscord | <Elegantbeef> Nice vindaar 😀 |
21:51:26 | arkanoid | oh! right, but is it aways necessary? I don't recall calling `new` in my constructors returning ref type all the times |
21:51:53 | FromDiscord | <Elegantbeef> Well `Type()` also `new`s internally |
21:52:19 | FromDiscord | <Elegantbeef> So you can either `new result` or do `MyType(field: someVal, ... )` |
21:52:51 | arkanoid | mmm ok |
21:54:10 | FromDiscord | <Elegantbeef> But yes you need to allocate that memory somehow 😛 |
21:54:27 | FromDiscord | <Elegantbeef> Is life making anymore sense in regard to the delayed imports |
21:55:18 | arkanoid | sure, but calling proc that returns a result of ref type should alloc it automatically, just like result for non ref returning procs |
21:56:21 | FromDiscord | <Elegantbeef> It 0's memory |
21:56:23 | FromDiscord | <Elegantbeef> Nim just 0's memory |
21:56:28 | FromDiscord | <Elegantbeef> And for a reference `0` is nil |
21:56:35 | FromDiscord | <Elegantbeef> Otherwise you have unintended allocations |
21:56:42 | arkanoid | Elegantbeef, this question of mine is still about that very same project. I've been applying delayed + merging when necessary and it seems going, problem is that I'm now facing another show stopper: https://play.nim-lang.org/#ix=3NUW |
21:57:07 | FromDiscord | <Elegantbeef> Say you're searching a list for a specific value and you return nil if you dont find it, it's bad if the result is intialized |
21:57:45 | arkanoid | Elegantbeef, there's Option[type] for that |
21:58:06 | * | vicfred quit (Quit: Leaving) |
21:58:44 | FromDiscord | <Elegantbeef> I mean sure, but that doesnt change the point |
21:58:55 | FromDiscord | <Elegantbeef> Intializing the result of something that returns ref is an allocation you cannot stop |
21:59:10 | arkanoid | true |
22:00:06 | FromDiscord | <Elegantbeef> I assume in your world `var a: MyRef` should also allocate 😛 |
22:00:31 | arkanoid | mmm no :D |
22:06:01 | arkanoid | Elegantbeef, with that project I have to deal with existing code that's calling `child.Parent.delete()' in their finalizers, this makes useless all my efforts to move constructions and finalizers on top of modules just after type declaration, as ARC will try to declare a =delete before the finalizer itself |
22:06:27 | arkanoid | just like in https://play.nim-lang.org/#ix=3NWt |
22:07:50 | FromDiscord | <demotomohiro> In reply to @krisppurg "no i dont have": Then, you need to get the header file. Read readme of module that cause the error or google library name. |
22:26:38 | * | carce joined #nim |
22:26:42 | carce | Hello] |
22:26:46 | carce | :D |
22:26:56 | FromDiscord | <Elegantbeef> Hello |
22:27:21 | arkanoid | hi! |
22:29:27 | arkanoid | so there's no way to call parent finalizer/destructor with ARC without using gcDestructors definition or triggering "Error: cannot bind another '=destroy' to: Child:ObjectType;"? |
22:30:44 | FromDiscord | <Elegantbeef> Do not know |
22:32:34 | arkanoid | thanks for the feedback. Well. I hope the original author will accept to introduce breaking changes, or at least raise compile error with ARC, otherwise code will leak memory |
22:33:56 | FromDiscord | <TurtleP> hey, I remember someone telling me I don't need to `staticRead(path/to/nimble).fromNimble(field)` to get the data I want from that, but I was never told how to do it, anyone know? |
22:34:16 | FromDiscord | <TurtleP> I tried to import `system/nimscript` but `echo(nimscript.author)` is empty |
22:34:25 | FromDiscord | <TurtleP> (edit) "I tried to import `system/nimscript` but `echo(nimscript.author)` is ... emptystring" added "printing an" | "printing anempty ... " added "string" |
22:34:51 | FromDiscord | <Elegantbeef> that stuff is only set inside the nimble VM not the compiler VM |
22:35:24 | FromDiscord | <TurtleP> right, but is there a way to do the thing I'm trying to do? |
22:35:48 | FromDiscord | <Elegantbeef> use strdefines, or parse the nimscript file |
22:36:08 | FromDiscord | <TurtleP> you mean the nimble file? |
22:36:19 | FromDiscord | <Elegantbeef> Same difference |
22:38:51 | FromDiscord | <TurtleP> though I'm confused--since I was told a while back I could just not need to read the nimble file |
22:40:03 | FromDiscord | <Elegantbeef> I mean it's interpreted so you can just read it, but in very small chances it'll not work |
22:40:25 | FromDiscord | <Elegantbeef> I dont get why you need to know the author but you do you 😀 |
22:40:36 | FromDiscord | <TurtleP> I mean it's an example |
22:40:50 | FromDiscord | <TurtleP> and it's better than having to redefine something already defined |
22:41:00 | FromDiscord | <TurtleP> e.g. outputting program version in `help` |
22:43:25 | FromDiscord | <gcao> In reply to @haxscramper "well, *right now* the": Thanks for your reply. I sent that message and went for shoveling so couldn't engage with the discussion. Are you the core contributor to Nimskull? What are the features planned for Nimskull but not in Nim? I tried to search that but couldn't find it. |
22:45:55 | FromDiscord | <haxscramper> In reply to @gcao "Thanks for your reply.": There are no planned new features for now aside from the improvements listed on the roadmap, and associated requirements for fixing different parts of the compiler/tooling |
22:47:01 | FromDiscord | <gcao> sorry for being blatant. that doesn't sound intriguing for developers to give it a try though. |
22:47:51 | FromDiscord | <Elegantbeef> Well it's the first step of features |
22:47:57 | FromDiscord | <Elegantbeef> Making a solid foundation that can be expanded |
22:52:00 | * | lumo_e quit (Ping timeout: 250 seconds) |
22:54:00 | FromDiscord | <gcao> A big refactoring or rewrite usually does not end well. Unless you have very good reason it won't fall to that trap. |
22:54:01 | * | elves-upstate joined #nim |
22:54:33 | FromDiscord | <haxscramper> Well, believe me, we do have a reason, that one I can say with absolute certainty |
22:54:44 | FromDiscord | <Elegantbeef> Well the good reason is tech debt that needs addressing |
22:55:16 | FromDiscord | <gcao> I guess Araq doesn't feel that way or it's not his priority. so the fork is born? |
22:55:17 | FromDiscord | <haxscramper> After spending last two months digging through the current compiler and testament, I would say ton of the code has never seen anyone who thought about long-term sustainability |
22:55:44 | FromDiscord | <haxscramper> For example error messages that I talked about for couple months prior |
22:55:53 | FromDiscord | <Elegantbeef> To the contrary he actually has commented multiple times about the current state of code and that things could be done better↵(@gcao) |
22:55:55 | FromDiscord | <haxscramper> RFCs #323, #324 and #325 |
22:56:19 | FromDiscord | <haxscramper> I claim that with current architecture the compiler is unable to produce good error messages |
22:56:42 | FromDiscord | <haxscramper> This is fundamentally impossible, this thing needs to be refactored with a scorched earth approach |
22:57:05 | FromDiscord | <haxscramper> One example of a refactor that I can talk in details about |
22:57:29 | FromDiscord | <haxscramper> IT has already been done by me, so far there are no major abnormalities |
22:57:52 | FromDiscord | <haxscramper> (edit) "IT" => "It" |
22:58:20 | FromDiscord | <gcao> I don't mean to question your decision, just out of pure curiosity from technical perspective.↵If the fork didn't get blessing from Araq, where will the project land? A language work like Nim but is not called Nim ? |
22:58:34 | FromDiscord | <Elegantbeef> Yes |
22:58:57 | FromDiscord | <huantian> Nimish |
22:59:13 | FromDiscord | <Elegantbeef> A language with many similarities to Nim but cares more about a technically correct compiler, and working features |
22:59:36 | FromDiscord | <Elegantbeef> For instance look at how many generic bugs exist |
22:59:37 | FromDiscord | <gcao> And it's not planned to be compatible with Nim in the long run |
22:59:59 | FromDiscord | <Elegantbeef> Well it's not Nim 😀 |
23:01:53 | FromDiscord | <gcao> If it doesn't get adoption, technically correct compiler won't matter. Do you foresee it gets same adoption as Nim which is only a niche language right now? |
23:02:08 | FromDiscord | <gcao> And it'll probably only get adoption from current Nim developers |
23:02:32 | FromDiscord | <Elegantbeef> I dont think that's presently a concern |
23:02:41 | * | jmdaemon joined #nim |
23:02:56 | FromDiscord | <Elegantbeef> The people that contribute to Nimskull want a Nim that works, cause the love the language, but hate it's short comings |
23:03:24 | FromDiscord | <Elegantbeef> You dont dedicate time making a fork a compiler for a language you find abhorrent 😀 |
23:04:06 | FromDiscord | <haxscramper> Right now main concern is to have the working implementation that is understandable to the contributors, there are so many small bits of shifting sand in this right now, that talking about grand future vision is next to useless |
23:05:10 | FromDiscord | <gcao> Agree. I just hope the people who work on the fork and who work on current compiler can join force, or the fork gets blessing from Araq. But it's just a hope. |
23:05:12 | FromDiscord | <Elegantbeef> Should clarify this is atleast my reason for backporting my fixes to Nimskull |
23:07:02 | FromDiscord | <haxscramper> In reply to @gcao "Agree. I just hope": I have my doubts |
23:08:40 | FromDiscord | <gcao> When Nim is big enough, with enough resources and backing from big companies, forks will come inevitably. But if at the early stage, lots of core contributors left to work on a fork. that doesn't help Nim to grow |
23:09:21 | FromDiscord | <haxscramper> But unmaintainable codebase with ossified garbage all over the place certainly helps nim to grow, right |
23:09:24 | FromDiscord | <gcao> Didn't mean to stop you guys doing what you think is right 🙂 |
23:10:31 | FromDiscord | <gcao> I'll end my comments here. Now I think I got the big picture |
23:10:49 | FromDiscord | <haxscramper> Not like we haven't worked on nim before, krux, xybber were core devs, saem made a vscode extension, leorize did vim one, I worked on pattern matching |
23:11:26 | FromDiscord | <haxscramper> Nimble RFCs, error message RFCs, there is also a cps that was a joint effort by several people at nimskull |
23:11:27 | FromDiscord | <Elegantbeef> How hax i very well feel included! |
23:11:28 | FromDiscord | <haxscramper> And so on |
23:13:20 | FromDiscord | <tandy> nim is in no position to receive more sponsors really↵(@gcao) |
23:13:24 | FromDiscord | <tandy> and thats why it hasnt |
23:14:07 | FromDiscord | <tandy> biggest proof that nim has failed in marketing and growth is rust |
23:14:27 | FromDiscord | <haxscramper> No, let's be honest here, rust is a bad comparison |
23:14:33 | FromDiscord | <ynfle> In reply to @tandy "biggest proof that nim": Lol. That's backed my mozzilla |
23:14:33 | FromDiscord | <haxscramper> And go as well |
23:14:34 | FromDiscord | <Elegantbeef> Eh there is a minor difference with Rust and Nim that Rust had it's origin mozilla |
23:14:40 | FromDiscord | <Elegantbeef> Nim vs Zig is more equivlent |
23:14:43 | FromDiscord | <Elegantbeef> Or Nim vs Odin |
23:14:54 | FromDiscord | <tandy> eh, zig is way lower level |
23:15:00 | FromDiscord | <haxscramper> You just can't compete with 100kk USD per month poured into the language |
23:15:12 | FromDiscord | <Elegantbeef> They're both system languages |
23:15:15 | FromDiscord | <Elegantbeef> Nim can be used everywhere Zig can be |
23:15:27 | FromDiscord | <haxscramper> In reply to @tandy "eh, zig is way": We are talking marketing here mostly |
23:15:37 | FromDiscord | <haxscramper> Well, the default rant about |
23:15:42 | FromDiscord | <haxscramper> What was it |
23:15:46 | FromDiscord | <Elegantbeef> Zig is a system language with origins aside from a large corporation |
23:15:46 | FromDiscord | <gcao> Agree. Nim didn't get Rust's adoption mainly because there is no company like Mozilla behind it. |
23:15:51 | FromDiscord | <tandy> rust wasnt backed by mozilla from the start↵(@ynfle) |
23:15:54 | * | pro joined #nim |
23:15:56 | FromDiscord | <Elegantbeef> Nim is a system language with origins aside from large corportation |
23:16:04 | FromDiscord | <Elegantbeef> > The language grew out of a personal project begun in 2006 by Mozilla employee Graydon Hoare |
23:16:12 | FromDiscord | <Elegantbeef> I mean it's closely related to mozilla |
23:16:25 | FromDiscord | <Elegantbeef> > Mozilla began sponsoring the project in 2009 |
23:17:30 | FromDiscord | <gcao> Let's not attribute the low adoption to Nim's marketing because it's not the language developer's job to push it to Rust's popularity |
23:18:04 | FromDiscord | <Elegantbeef> It's an interesting look to see how many developers of Nim have left vs. Zig or Odin |
23:18:14 | FromDiscord | <Elegantbeef> Zig has picked up an ex Nim compiler developer |
23:18:17 | FromDiscord | <haxscramper> Anyway, it is the "same shit different day" scenario, so to save the time, tldr for my rant is:↵- document things↵- enabling people to do the work is always more productive than BDFLing your opinion in↵- be more open with your plans, talk to people, show your roadmap |
23:18:51 | FromDiscord | <gcao> those I do agree |
23:18:53 | FromDiscord | <haxscramper> Put UX high on the list, irritated people don't do anything good |
23:18:57 | FromDiscord | <Elegantbeef> My view is simpler and why i still often make PRs to Nim, a more competent compiler is a better compiler |
23:19:16 | * | lumo_e joined #nim |
23:19:22 | FromDiscord | <Elegantbeef> I dont care which compiler works more, i just want fewer "X should work but doesnt" |
23:19:28 | FromDiscord | <haxscramper> Basically that's what I stand for in nimskull and that's what I completely failed to find in mainline |
23:19:55 | FromDiscord | <Elegantbeef> I'm too easily amused 😀 |
23:20:00 | FromDiscord | <haxscramper> Repeatedly, on multiple topics |
23:20:13 | FromDiscord | <gcao> is Nimskull compatible with Nim 1.6 or 1.4 or some lower version? |
23:20:20 | * | pro quit (Client Quit) |
23:20:38 | FromDiscord | <Elegantbeef> Nimskull is mostly compatible with 1.6 as that's the forking point, though async is removed and some other behaviours have changed |
23:20:57 | FromDiscord | <haxscramper> I might not be the best manager in the world, to be honest I wouldn't trust myself to run a web scraper peoject, but I at least try to follow these principles on nimskull |
23:21:12 | FromDiscord | <haxscramper> When I get the real feedback we can iterate from there |
23:21:34 | FromDiscord | <haxscramper> In reply to @gcao "is Nimskull compatible with": We still have the full test suite, largely intact in place |
23:21:48 | FromDiscord | <haxscramper> And added some 4.5k sloc of spec on top of that |
23:22:06 | FromDiscord | <haxscramper> But considering nims stability is a duct tape solution, we can't guarantee anything |
23:22:21 | FromDiscord | <haxscramper> Despite trying not to cause pointless regressions |
23:23:11 | FromDiscord | <ynfle> In reply to @Elegantbeef "Zig has picked up": Who? |
23:23:14 | FromDiscord | <Elegantbeef> There will be eventually an overhaul of the types which will cause regressions almost certainly |
23:23:19 | FromDiscord | <Elegantbeef> Lemonboy |
23:23:40 | FromDiscord | <Elegantbeef> But the regression will be due to things that arent supposed to work working |
23:24:04 | FromDiscord | <haxscramper> In reply to @Elegantbeef "There will be eventually": Yes, but for now the general plan is to stay stable for as long as possible, other we get another layer of sand under our feet |
23:24:30 | FromDiscord | <gcao> Thank you @haxscramper @ElegantBeef for taking the time to reply and explain things. I wish both Nim and Nimskull best of luck |
23:24:44 | FromDiscord | <Elegantbeef> To be fair though every time i fix a generic issue i wonder if i should attempt to improve Nim's types myself |
23:25:17 | FromDiscord | <Elegantbeef> Would take so much longer and probably wouldnt be accepted, but man so many issues with generics |
23:25:46 | FromDiscord | <auxym> huh, first I hear of nimskull. You guys plan on keeping C as a compiler target? |
23:26:03 | FromDiscord | <haxscramper> Yes, of course |
23:26:07 | FromDiscord | <Elegantbeef> Think Saem floated the idea of using Zig possibly, but C is it for now |
23:26:09 | FromDiscord | <haxscramper> C, C++, js |
23:26:31 | FromDiscord | <Elegantbeef> Think Saem was more interested in the Zig compiler as a portable GCC alternative |
23:26:54 | FromDiscord | <haxscramper> I mean, I want to reiterate on that again - we are not going to take a hammer and smash everything we see because idk, someone though it is a good idea |
23:27:11 | FromDiscord | <tandy> when backends are more pluggable im interested in setting up a typescript backend \:)↵(@auxym) |
23:27:22 | FromDiscord | <auxym> I just really like the whole "targets any platform gcc does" thing |
23:27:25 | FromDiscord | <Elegantbeef> I mean arent backends pretty pluggable? |
23:27:45 | FromDiscord | <haxscramper> There might be some back and forth discussions about different things, but in general things put on the readme roadmap are what we are going to do |
23:27:59 | FromDiscord | <haxscramper> In reply to @Elegantbeef "I mean arent backends": No |
23:28:43 | FromDiscord | <haxscramper> For example sem analyzes code little differently for expression, depending on whether we compile to c or cpp |
23:29:13 | FromDiscord | <haxscramper> Backends can do the error reports that should've been in the sem layer |
23:29:15 | FromDiscord | <Elegantbeef> Ah apparently i've never seen that before |
23:29:56 | * | elves-upstate left #nim (#nim) |
23:30:03 | FromDiscord | <haxscramper> Also there is a a `backend: RootRef # minor hack` in the module graph that is used by all backends to store their global data |
23:30:16 | FromDiscord | <haxscramper> Although that one can be called pluggable probably |
23:30:34 | FromDiscord | <tandy> `# minor hack` makes me laff |
23:30:54 | FromDiscord | <Elegantbeef> It's a bit better than `pointer` |
23:30:59 | FromDiscord | <haxscramper> A bit |
23:31:59 | FromDiscord | <haxscramper> Anyway, it's 02:30 here, so I'm going to sleep now |
23:32:08 | FromDiscord | <tandy> gnight hax |
23:32:14 | FromDiscord | <Elegantbeef> Buh bye |
23:32:15 | FromDiscord | <haxscramper> Hope inwont come back to 1.2k messages of the following nimskull discussion |
23:32:35 | FromDiscord | <haxscramper> (edit) "inwont" => "I won't" |
23:32:40 | FromDiscord | <haxscramper> That I missed |
23:32:55 | FromDiscord | <Elegantbeef> Read the roadmap 😀 |
23:39:08 | * | carce quit (Remote host closed the connection) |
23:58:18 | * | jmdaemon quit (Ping timeout: 250 seconds) |