00:07:01 | madprops | About initRand seeds ... is it ok if I use them for integration tests or would the seed be different on every machine? |
00:07:13 | madprops | or is it assured to remain constant |
00:11:11 | FromDiscord | <konsumlamm> what? the point of `initRand` is that you pass the seed |
00:21:26 | arkanoid | what is the difference from a "typedef struct mystruct {...}" and "struct mystruct {...}" from nim point of view? |
00:22:04 | arkanoid | I have c2nim writing wrong cimports and I'd like to know how and if I can fix the .h |
00:22:13 | arkanoid | but I'm not a seasoned C programmer |
00:23:14 | madprops | I'm just wondering if the random implementation might change one day making seeds output a different thing eventually |
00:23:54 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
00:24:45 | FromDiscord | <konsumlamm> oh, probably not |
00:26:43 | * | krux02 quit (Remote host closed the connection) |
00:28:44 | madprops | why is this not working in the playground, but works locally? https://play.nim-lang.org/#ix=3xgy |
00:28:48 | madprops | I don't see the echos |
01:11:30 | * | neurocyte3 joined #nim |
01:11:30 | * | neurocyte3 quit (Changing host) |
01:11:30 | * | neurocyte3 joined #nim |
01:13:31 | * | neurocyte quit (Ping timeout: 250 seconds) |
01:13:31 | * | neurocyte3 is now known as neurocyte |
01:16:46 | * | Guest78 joined #nim |
01:20:48 | * | Guest78 quit (Client Quit) |
01:35:58 | * | mst quit (Quit: Reconnecting) |
01:36:05 | * | mst joined #nim |
01:51:28 | NimEventer | New thread by Niminem: Design choice advice for Python-to-Nim transpiler (Python Devs), see https://forum.nim-lang.org/t/8379 |
02:00:06 | FromDiscord | <Peaceful Gamer> Is there an equivalent to C's `union` in nim? |
02:31:12 | * | arkurious quit (Quit: Leaving) |
02:33:55 | FromDiscord | <hamidb80> In reply to @Peaceful Gamer "Is there an equivalent": https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
02:35:19 | FromDiscord | <hamidb80> i don't know whether you can use to interop with C or not |
02:37:08 | FromDiscord | <hamidb80> is there any tutorials/articles about using `ref` in nim > |
02:37:11 | FromDiscord | <hamidb80> (edit) ">" => "?" |
02:38:28 | FromDiscord | <Peaceful Gamer> Oh, this should work for my use case. Thank you! |
02:54:07 | arkanoid | I've finally succeeded in wrapping all function of my target lib via lots of mangling, but now I have tons of C like function "int foo(prt Tinput, ptr Toutput)" and I'd like to turn all them into something more appropriate like "proc foo(ptr Tinput): ptr Toutput" and maybe raise exception internally if int is not OK. What's the best approach to accomplish this? |
03:33:49 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
03:35:24 | FromDiscord | <hamidb80> ah |
03:35:38 | FromDiscord | <hamidb80> channels đ |
03:37:51 | FromDiscord | <hamidb80> https://github.com/hamidb80/watch_for_files/blob/fbedd6451ff331da3288be4afae331323963ef9d/src/watch_for_files.nim#L47 |
03:38:03 | FromDiscord | <hamidb80> why do my code blocks here |
03:38:30 | FromDiscord | <hamidb80> (edit) "do" => "does" |
03:38:36 | FromDiscord | <hamidb80> (edit) "blocks" => "block" |
03:40:11 | FromDiscord | <hamidb80> note: you can try `nimble test` |
03:45:01 | FromDiscord | <hamidb80> actually the thread stops here |
03:45:14 | FromDiscord | <hamidb80> without any errors |
03:50:51 | FromDiscord | <Rika> you sure tunnel isnt nil |
03:50:55 | FromDiscord | <Rika> (edit) "nil" => "nil?" |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:30 | * | supakeen joined #nim |
04:07:42 | * | Gustavo6046 joined #nim |
04:15:57 | * | flynn quit (Read error: Connection reset by peer) |
04:17:04 | * | flynn joined #nim |
04:19:11 | * | vicfred joined #nim |
04:33:09 | * | Gustavo6046 quit (Remote host closed the connection) |
04:33:39 | * | Gustavo6046 joined #nim |
04:37:36 | * | Gustavo6046_ joined #nim |
04:38:55 | * | Gustavo6046 quit (Ping timeout: 250 seconds) |
04:39:54 | * | Gustavo6046_ is now known as Gustavo6046 |
04:43:46 | FromDiscord | <hamidb80> yes |
04:43:54 | FromDiscord | <hamidb80> see `tests/test.nim` |
06:30:22 | * | Gustavo6046 quit (Remote host closed the connection) |
06:31:30 | * | Gustavo6046 joined #nim |
07:03:56 | * | max22- joined #nim |
07:10:17 | * | vicfred quit (Quit: Leaving) |
08:07:52 | * | jjido joined #nim |
08:10:50 | NimEventer | New thread by Ingo: Httpclient woes, see https://forum.nim-lang.org/t/8380 |
09:23:17 | * | andinus quit (Quit: ERC (IRC client for Emacs 27.1)) |
09:46:25 | * | andinus joined #nim |
10:04:24 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
10:51:10 | * | jjido joined #nim |
10:54:25 | FromDiscord | <Hamid Bluri> In reply to @NimEventer "New thread by Ingo:": "puppy triggered it in my poor old brain" |
11:00:20 | FromDiscord | <gerwy> hi, so im making a small tool, that will fetch Youtube videos and count how many tutorials are for that subjectâ”im making it for Godot, mostly to see its growth and compare it to Unityâ”but maybe i could also do it for Nim? I don't expect much tho |
11:03:24 | FromDiscord | <gerwy> currently im checking for keywords such as "tutorial", "course", "How to" and so on, in title and description of the videoâ”but i found a way to get video Subtitles and i will also make a more advanced search that will also look for some keywords in the generated subtitles |
11:09:00 | FromDiscord | <Yardanico> how will you actually find youtube videos? |
11:09:25 | FromDiscord | <Yardanico> their search is quite limited in terms of what you can get and it won't give you all results |
11:10:16 | * | xet7 quit (Read error: Connection reset by peer) |
11:19:52 | * | auxym_ joined #nim |
11:21:18 | FromDiscord | <gerwy> sent a long message, see http://ix.io/3xjo |
11:21:37 | FromDiscord | <gerwy> i could go by every month, or every two week, depends on how popular the subject is |
11:22:07 | FromDiscord | <Yardanico> well, that's not really a good way IMO, because search is pretty wonky when you try to find _all_ videos for the specific subject |
11:22:12 | FromDiscord | <Yardanico> it's next to impossible to do on youtube I'd say |
11:23:25 | FromDiscord | <Yardanico> anyway, when you do complete it, please share on the forum :) |
11:25:10 | * | auxym_ quit (Ping timeout: 252 seconds) |
11:25:40 | FromDiscord | <gerwy> well im currently thinking of making it more preciseâ”but its rather okay way to do it, obviously there are better ways, but i didn't found them yetâ”it would be far harder if i would include also tutorials made outside the youtube, fetching videos and classifying them is easier than doing it with websites i guess |
11:26:23 | FromDiscord | <Yardanico> well, you should also know that not all people like watching tutorials on youtube - they'd rather read an article or a blog post :) |
11:26:40 | FromDiscord | <Rika> Or the docs |
11:27:16 | FromDiscord | <Hamid Bluri> In reply to @hamidb80 "https://github.com/hamidb80/watch_for_files/blob/fb": should i open an issue? |
11:27:23 | FromDiscord | <gerwy> and i can also save those videos in fileâ”youtube's id is 11 character, so you could say its 11 bytes per video 10k videos is only 110KB |
11:27:48 | FromDiscord | <Yardanico> yes, but how is that really related |
11:28:08 | FromDiscord | <Yardanico> you still wouldn't be able to find a lot of youtube videos that don't have a lot of views |
11:28:59 | FromDiscord | <gerwy> In reply to @Yardanico "well, you should also": yeah i know that :// i like articles or reading well made docs but i also enjoy hearing someone explaining it and not like i need to read one sentence few times to really understand what the meaning of it isâ”and i think you will agree that Youtube is a place where there are a loot of tutorials |
11:29:09 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
11:29:32 | FromDiscord | <Yardanico> i'd also say that some languages have a higher tendency for textual representation rather than visual |
11:29:54 | FromDiscord | <Yardanico> i mean some communities are more inclined to make articles than videos, some are the opposite |
11:30:12 | FromDiscord | <gerwy> In reply to @Yardanico "you still wouldn't be": why? i can easily find videos who has like 10 views and are still tutorials or just videos making some stuff in Godot or even Nimâ”im literally watching video with 141 views about person learning SDL and Nim |
11:30:32 | FromDiscord | <Yardanico> because youtube is youtube, and its search would never give you all results |
11:30:42 | FromDiscord | <gerwy> unless i make it more narrow |
11:30:50 | FromDiscord | <Yardanico> you can't bruteforce all words |
11:30:55 | FromDiscord | <gerwy> like, only videos from 2017-05-01 |
11:31:03 | FromDiscord | <gerwy> with keyword Nim |
11:31:32 | FromDiscord | <gerwy> if the video doesn't have Nim in title, description or even in hashtags, there is very high chance its not even about Nim so i don't even count it |
11:31:51 | FromDiscord | <gerwy> there are youtube operators, you can use them to make your search more narrow |
11:31:52 | * | jjido joined #nim |
11:31:53 | FromDiscord | <Yardanico> In reply to @Life Sucks "like, only videos from": except that you can't do that |
11:31:59 | FromDiscord | <gerwy> like using wildcards |
11:32:03 | * | jjido quit (Client Quit) |
11:32:05 | FromDiscord | <gerwy> or specifying the order of words |
11:32:12 | FromDiscord | <gerwy> In reply to @Yardanico "except that you can't": i can :3 |
11:32:15 | FromDiscord | <Yardanico> how? |
11:32:35 | FromDiscord | <gerwy> well it is a feature in Youtube's v3 API |
11:32:37 | FromDiscord | <gerwy> but |
11:32:39 | FromDiscord | <gerwy> im not using it |
11:32:43 | FromDiscord | <Yardanico> youtube doesn't allow you to search videos newer than specified date, and if you're using Google search to find youtube videos - believe me, even google doesn't have all of youtube videos indexed |
11:32:50 | FromDiscord | <Yardanico> as strange as that might sound |
11:32:51 | FromDiscord | <gerwy> because of that, i found out you can use Youtube search operators |
11:32:59 | FromDiscord | <gerwy> and when you do something like |
11:33:05 | FromDiscord | <Yardanico> also let's move to #offtopic |
11:33:11 | FromDiscord | <gerwy> oh okay |
11:33:19 | FromDiscord | <haxscramper> Honestly with amount of nim videos it would be faster to just hand-pick them into community list |
11:35:16 | FromDiscord | <Hamid Bluri> In reply to @hamidb80 "https://github.com/hamidb80/watch_for_files/blob/fb": it does work with passing `ptr` instead of `ref` |
11:35:56 | FromDiscord | <gerwy> In reply to @haxscramper "Honestly with amount of": thats why i said i wasn't expecting a lot :// but its different story for Godot â”i noticed a big growth of videos that came up about Godot in 2020 and in 2021 (can be about Ace Attorney idk lol) |
11:37:06 | FromDiscord | <Yardanico> @haxscramper i think you underestimate number of youtube videos a bit :) |
11:37:14 | FromDiscord | <Yardanico> nim youtube videos |
11:38:56 | FromDiscord | <haxscramper> there are that many? |
11:39:11 | FromDiscord | <haxscramper> I thought there several dozens at best, if you exclude this nim tutorial series |
11:39:14 | FromDiscord | <Yardanico> no, there are much more than that |
11:39:23 | FromDiscord | <gerwy> i think there are more than we think, they are just not as popular, they mostly have less than 1k views |
11:39:41 | FromDiscord | <haxscramper> Good to know |
11:41:34 | FromDiscord | <gerwy> i have two issues with Youtube search tho |
11:41:51 | FromDiscord | <gerwy> first is that there can't be more than 500 videos uploaded in one day, because i won't know if there is more |
11:41:58 | FromDiscord | <Yardanico> @haxscramper there are nim videos like that https://www.youtube.com/watch?v=ZJu0ljI_uUU :P |
11:42:19 | FromDiscord | <Yardanico> https://www.youtube.com/watch?v=LZJwRS9VXwQ |
11:42:42 | FromDiscord | <haxscramper> well, I was talking more about meaningful things |
11:42:49 | FromDiscord | <Yardanico> don't be rude :P |
11:43:10 | FromDiscord | <gerwy> second, idk if that happens in code, can be because i didn't tried yet but, when i type NimConf for exampleâ”it doesn't want to search for NimConf, instead it does this annoying "did you mean: MiniConf?" and doesn't include operators then and just does a default search |
11:43:15 | * | xet7 joined #nim |
11:43:26 | * | krux02 joined #nim |
11:43:42 | FromDiscord | <gerwy> btw, here is a little article about operators Yardanicoâ”https://seosly.com/youtube-search-operators/ |
11:43:47 | FromDiscord | <Yardanico> yeah i read that |
11:43:49 | FromDiscord | <gerwy> i took it from here |
11:43:52 | FromDiscord | <Yardanico> i know most of them already |
11:43:59 | FromDiscord | <Yardanico> because they're the same on google, also we should be in #offtopic :) |
11:44:00 | FromDiscord | <gerwy> because i knew some of them, i didn't know there was more |
11:44:13 | FromDiscord | <gerwy> oh right i thought this is offtopic |
11:49:18 | FromDiscord | <Hamid Bluri> In reply to @Rika "you sure tunnel isnt": do `ref` types get deep copied when i pass them to another thread? |
11:50:06 | FromDiscord | <Rika> yes |
11:50:24 | FromDiscord | <Rika> `Sends a message to a thread. msg is deeply copied.` |
11:50:35 | FromDiscord | <Hamid Bluri> so i can't pass a `ref Channel[T]` |
11:50:43 | FromDiscord | <Rika> oh you mean that way |
11:51:20 | FromDiscord | <Hamid Bluri> i think compiler should give me a warning |
11:51:23 | FromDiscord | <Rika> well i think its still deep copied |
11:51:42 | FromDiscord | <Hamid Bluri> yeah it works fine with `ptr` |
11:53:54 | * | jjido joined #nim |
11:54:07 | arkanoid | haxscramper, I've finally succeeded in the "last 5%" conversion process of the header file I've sent you. I've used c2nim wit lots of mangle, grep, sed and so on, but at the end it seems to work |
11:54:45 | arkanoid | I've put the whole process into a bash script |
11:54:53 | FromDiscord | <haxscramper> With c2nim it is more like 20+%, but congratulations |
11:57:10 | arkanoid | this is yeah but I had to preprocess first, just like nimterop |
11:59:27 | arkanoid | here's the final bash script https://termbin.com/f7xv |
12:03:59 | FromDiscord | <haxscramper> > `(cat - soapStub.nim | sponge soapStub.nim) <<'EOF'â”type` |
12:04:03 | arkanoid | it may be possible to skip preprocessing with some more work |
12:04:50 | arkanoid | haxscramper, yes, it was to put all the generated types into a single type section, as they are mutually recursive |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:30 | * | supakeen joined #nim |
12:07:11 | arkanoid | probably there are many many possible improvements, I jent went on until compilation and successfull test of one call. Surely is everything but a rigorous way to handle the code |
12:07:58 | arkanoid | I've also found a bug in c2nim on the way, I've already shared a minumum testcase |
12:09:12 | arkanoid | long story short, my work is surely proof that c2nim helps but cannot replace a tool like yours |
12:09:39 | NimEventer | New post on r/nim by WrongJudgment6: Anyone interested in making a PR adding Nim?, see https://reddit.com/r/nim/comments/pdu3d4/anyone_interested_in_making_a_pr_adding_nim/ |
12:12:10 | arkanoid | what I'm missing the most in c2nim mangle engine is the possibility to uppercase a capture |
12:12:27 | arkanoid | maybe is possible, but I don't know how |
12:12:33 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
12:15:02 | FromDiscord | <haxscramper> You can probably make some kind of abomination that replaces a with A, b with B, c with C etc. |
12:16:03 | arkanoid | yeah I've been thinking about that, but yeah, abomination. I've added a capital T in front of every type and stop |
12:17:28 | arkanoid | "how i stopped worrying and learned to love the PEG" |
12:19:02 | arkanoid | I can schrink down the transformation rule, actually. I'm in the refactoring phase |
12:21:41 | arkanoid | would be nice if I could put string format functions in the second argument of the mangle |
12:22:37 | FromDiscord | <haxscramper> c2nim could've called to `format_logic.nims` for that |
12:23:28 | FromDiscord | <haxscramper> ACtually I should do this as well, I depend on compiler anyway, so it does not matter. |
12:23:35 | FromDiscord | <haxscramper> It didn't occur to me (until now) that I don't have to force users to compile whole `hcparse` thing, even if they use libclang variant |
12:23:39 | arkanoid | something like #mangle "^ 'foo__' {@}'_bar'" "capitalize($1) 'Bar'" |
12:25:50 | arkanoid | I've a question for you |
12:27:02 | arkanoid | as I've finally succeeded in wrapping all function of my target lib via lots of mangling I now have tons of functions like "int foo(prt Tinput, ptr Toutput)" and I'd like to turn all them into something more appropriate like "proc foo(ptr Tinput): ptr Toutput" and maybe raise exception internally if int is not OK. What's the best approach to accomplish this? |
12:28:16 | arkanoid | I could surely build a macro that does this given the ProcDef, but I need to call this on every proc defined in .nim file |
12:28:54 | arkanoid | long story short: how to parse the ast of a nim module/file at compile time? |
12:29:11 | emery | I like to use custom pragmas to dedup whatever I get from c2nim |
12:30:09 | arkanoid | emery, could you please elaborate a little? Or give example |
12:32:16 | FromDiscord | <haxscramper> `> how to parse the ast of a nim module/file at compile time?` - https://nim-lang.org/docs/macros.html#parseStmt%2Cstring |
12:32:40 | emery | arkanoid: i do stuff like this over and over, but i don't know about uppercasing https://git.sr.ht/~ehmry/nim_opusenc/tree/master/item/src/opusenc.nim#L7 |
12:33:11 | FromDiscord | <haxscramper> But I doubt that's what you really need |
12:33:46 | emery | bbl |
12:34:08 | FromDiscord | <haxscramper> You can write a pragma macro that wraps raw C proc (either by creating new toplevel, or wrapping raw one inside like in emery's example) |
12:37:18 | FromDiscord | <haxscramper> Something like `{.wrapC(outArgs = [Toutput], goodInt = 0).}` |
12:37:19 | FromDiscord | <haxscramper> Or something less verbose |
12:38:51 | arkanoid | emery, that's for the link. What is $1 in importc: "ope_$1" ? |
12:40:48 | arkanoid | ok I guess $1 is the nim proc name |
12:41:44 | arkanoid | but after adding custom pragma to every proc? What's the next step to generate "modified" version for each of them at compile time? |
12:43:27 | FromDiscord | <haxscramper> Implement a macro that generates code |
12:44:21 | FromDiscord | <haxscramper> Not sure if I understand the question. You annotate all required procs with macro, and it does generate code |
12:44:21 | FromDiscord | <haxscramper> I don't think there is a way around annotating all proc arguments somehow, so that solution is as good as any |
12:44:41 | FromDiscord | <haxscramper> `s/all arguments/special arguments/` |
12:49:07 | arkanoid | sadly I can't add macro to every proc with c2nim, I could regex, or actually parseStmt the whoe nim and filter nnkProcDef |
12:54:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
12:55:58 | FromDiscord | <haxscramper> There are too many procs to manually annotate? Well, I suppose there are. Yes, you can do it with `parseStmt`, though honestly it feels like a bad tool for the job, and `compiler/parser` feels like a better suited tool. https://github.com/haxscramper/hack/blob/e73fc20ce103e1a195826fc6abcc14285dda0283/testing/nim/compilerapi/visit_each_proc.nim |
12:56:28 | FromDiscord | <haxscramper> Or you can use hnimast/pnode\_parse |
12:57:39 | arkanoid | yeah but this round I prefer a compile time thing instread of generating a nim file with another program |
12:57:53 | arkanoid | how can I print a NimNode as an ast tree? |
12:58:03 | arkanoid | noob question, but I'm stuck |
12:58:43 | arkanoid | I've proc foo(n: NimNode) called from static block, the input is a filtered node from parseStmt |
12:59:29 | FromDiscord | <haxscramper> `.repr()` |
12:59:30 | FromDiscord | <haxscramper> Also `parseStmt` is exactly the same as think I've linked |
12:59:30 | FromDiscord | <haxscramper> You would have to `parseStmt()` on the whole file and then write it back |
13:01:57 | arkanoid | yeah, I'm using it because you linked it :D I'm on your answer right now |
13:02:37 | arkanoid | .repr prints the rendered AST, nim code basically. I'd like something like dumpTree |
13:07:53 | FromDiscord | <haxscramper> `.treeRepr()` |
13:11:04 | arkanoid | thanks! why did autocomplete missed it? I've this strange problem that when I move vscode window to second screen the autocomplete engine goes wild. I have to close and reopen vscode. Same thing happens after resuming from standby. Not blaming nim extension, but vscode |
13:29:12 | * | arkurious joined #nim |
14:53:04 | arkanoid | At the end I think the best solution is like emery suggested ad add a custom pragma to every proc using regex after c2nim pass |
14:55:40 | * | Gustavo6046 quit (Ping timeout: 240 seconds) |
14:56:04 | * | flynn quit (Read error: Connection reset by peer) |
14:57:11 | * | flynn joined #nim |
14:59:04 | * | Gustavo6046 joined #nim |
15:14:15 | * | max22- quit (Remote host closed the connection) |
15:32:36 | NimEventer | New question by The Fool: installing the nimpretty binary, see https://stackoverflow.com/questions/68974409/installing-the-nimpretty-binary |
15:50:53 | FromDiscord | <linux user> if it was nux , much easier |
15:50:58 | FromDiscord | <linux user> (edit) "nux" => "nix" |
15:51:11 | FromDiscord | <Yardanico> wdym? |
15:51:29 | FromDiscord | <Yardanico> that guy is on debian, ubuntu or some other distro with `apt` |
15:51:56 | FromDiscord | <Yardanico> ah, probably ubuntu 20.04 LTS, it has nim 1.0.6 |
15:52:34 | FromDiscord | <linux user> brruh |
15:52:54 | FromDiscord | <linux user> you can download the latest nightly build, it has nimpretty in nim1/bin |
15:53:01 | FromDiscord | <linux user> sudo cp nimpretty /bin |
15:53:03 | FromDiscord | <Yardanico> did you even read the SO post? |
15:53:13 | FromDiscord | <linux user> no |
15:53:16 | FromDiscord | <Yardanico> In reply to @richard stallmen(crazy GNU guy) "sudo cp nimpretty /bin": doing that is pretty stupid, you don't need nimpretty system-wide |
15:53:22 | FromDiscord | <Yardanico> In reply to @richard stallmen(crazy GNU guy) "you can download the": or you can just use choosenim |
16:16:13 | * | stkrdknmibalz joined #nim |
16:22:55 | * | max22- joined #nim |
17:24:04 | * | flynn quit (Read error: Connection reset by peer) |
17:25:11 | * | flynn joined #nim |
17:40:49 | * | supakeen quit (Remote host closed the connection) |
17:41:14 | * | supakeen joined #nim |
17:50:13 | * | auxym_ joined #nim |
17:51:51 | * | Gustavo6046_ joined #nim |
17:52:47 | * | Gustavo6046 quit (Ping timeout: 240 seconds) |
17:54:17 | * | Gustavo6046_ is now known as Gustavo6046 |
17:59:16 | * | Gustavo6046 quit (Remote host closed the connection) |
17:59:28 | * | Gustavo6046 joined #nim |
18:01:39 | * | vicfred joined #nim |
18:15:47 | * | max22- quit (Ping timeout: 240 seconds) |
18:27:24 | * | neurocyte2 joined #nim |
18:27:24 | * | neurocyte2 quit (Changing host) |
18:27:24 | * | neurocyte2 joined #nim |
18:27:53 | * | neurocyte quit (Ping timeout: 250 seconds) |
18:27:53 | * | neurocyte2 is now known as neurocyte |
18:38:22 | FromDiscord | <Anuke> How do I pass the instantiated generic type of a generic proc to a macro? https://play.nim-lang.org/#ix=3xlX |
18:40:40 | * | max22- joined #nim |
18:54:08 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3xm5 |
18:56:25 | FromDiscord | <Anuke> That works, thanks |
19:02:24 | * | jjido joined #nim |
19:22:29 | * | auxym_ quit (Ping timeout: 250 seconds) |
19:40:57 | NimEventer | New Nimble package! watch_for_files - cross-platform file watcher with database, see https://github.com/hamidb80/watch_for_files |
19:41:00 | nrds | <R2D299> itHub: 7"a cross-platform file watcher with database" |
20:51:30 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
20:52:14 | * | jjido joined #nim |
21:15:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
21:28:33 | FromDiscord | <Varriount> Anyone know how I would go about calling the Nim compiler as a library? |
21:34:35 | arkanoid | What does export `[]` do? |
21:36:11 | FromDiscord | <Varriount> sent a code paste, see https://play.nim-lang.org/#ix=3xn3 |
21:46:15 | arkanoid | Varriount yes |
21:49:31 | FromDiscord | <Varriount> arkanoid: https://nim-lang.org/docs/manual.html#modules-export-statement , for the `[]` procedure (usually invoked via `somevariable[n]`) |
21:52:01 | arkanoid | Varriount: but here there is no proc [] https://github.com/nim-lang/irc/blob/master/src/irc.nim |
22:00:40 | * | max22- quit (Quit: Leaving) |
22:02:54 | FromDiscord | <dom96> In reply to @Varriount "Anyone know how I": What's your use case? |
22:03:15 | FromDiscord | <dom96> arkanoid: it's exporting tables.`[]` IIRC |
22:14:23 | arkanoid | OK. Thanks |
22:27:44 | FromDiscord | <Varriount> In reply to @dom96 "What's your use case?": Using AFL-Fuzz on the Nim compiler. But I think I got it now. It looks like it would be too complex to do effectively at the moment. |
22:29:22 | FromDiscord | <Varriount> One would need to write something to take AFL-Fuzz's input, and split it into multiple modules (possibly based on some pattern). |
22:41:39 | FromDiscord | <leorize> you can direct the fuzzer input into Nim's parser |
22:41:46 | FromDiscord | <leorize> s/in/out/ |
22:42:29 | FromDiscord | <leorize> should let it train on some actual nim programs first though so it doesn't spam the parser with inputs that does nothing |
22:44:18 | FromDiscord | <Varriount> leorize: But the parser will only get one "module" that way. |
22:45:14 | FromDiscord | <Varriount> For fuzzing a compiler, you ideally want to have the compiler handle multiple modules, to find bugs related to symbol handling and such. |
22:45:30 | FromDiscord | <leorize> for those I think PBT is better |
22:45:35 | FromDiscord | <Varriount> PBT? |
22:45:44 | FromDiscord | <leorize> property-based testing |
22:46:06 | FromDiscord | <leorize> [saem](https://matrix.to/#/@saem:matrix.org) is very knowledgeable in that subject |
22:46:21 | FromDiscord | <leorize> I'd say that to start, you just need to fuzz the parser |
22:46:23 | FromDiscord | <Varriount> In my case specifically, I'd like to find bugs related to incremental compilation. |
22:46:26 | FromDiscord | <leorize> you don't even need to start sem |
22:47:12 | FromDiscord | <leorize> if you wanna fuzz IC you gotta get through the #1 bug that is IC doesn't work \:p |
22:47:31 | FromDiscord | <Varriount> Oh. I thought it was "finished"? |
22:47:56 | FromDiscord | <leorize> looks like there are some phase ordering issues, it's not compatible with arc/orc destructors |
22:48:23 | FromDiscord | <Varriount> I know Araq did some work on it, so I had assumed that it was working now (or, well, supposed to work) |
22:48:53 | FromDiscord | <leorize> it is supposed to work |
22:48:55 | FromDiscord | <leorize> it just doesn't |
22:49:40 | * | redj quit (Ping timeout: 240 seconds) |
22:49:40 | * | nisstyre quit (Ping timeout: 240 seconds) |
22:50:47 | FromDiscord | <Elegantbeef> Wait are you talking about me or IC? |
22:50:53 | * | redj joined #nim |
22:51:41 | FromDiscord | <Varriount> Just society in general |
22:53:18 | FromDiscord | <Varriount> zevv: Just so you know, NPeg appears to be handling a translated version of PostgreSQL's 8000 line-long grammer fairly well. |
23:00:21 | NimEventer | New thread by Lotzz: Doc2tex, see https://forum.nim-lang.org/t/8381 |
23:03:02 | * | nisstyre joined #nim |
23:06:19 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
23:06:32 | * | Gustavo6046 joined #nim |
23:22:27 | * | auxym_ joined #nim |
23:29:37 | * | auxym_ quit (Ping timeout: 245 seconds) |
23:33:50 | * | auxym_ joined #nim |
23:38:57 | madprops | hmm so the doc generator for tables looks messed up |
23:39:08 | madprops | it displays: (-173515851481370370, 45, "-....-") |
23:39:16 | * | flynn quit (Read error: Connection reset by peer) |
23:39:22 | madprops | when it should be like 'K': "-.-" etc |
23:39:55 | madprops | might as well make the table private since it looks terrible |
23:40:22 | * | flynn joined #nim |
23:45:55 | madprops | a solution is to make the keys a string too |
23:46:27 | FromDiscord | <Elegantbeef> You could always just use a char array |
23:46:37 | FromDiscord | <Elegantbeef> char indexed array |
23:48:15 | madprops | actually making them strings didn't help .. going to try that char array |
23:51:32 | madprops | this is the table https://play.nim-lang.org/#ix=3xnL |
23:52:08 | madprops | idk if the keys are supposed to have a certain order, for they to work as an array |
23:52:21 | madprops | `Error: invalid order in array constructor` |
23:52:35 | FromDiscord | <Elegantbeef> Yea they have to be in the ordinal order |
23:54:11 | FromDiscord | <Elegantbeef> So yea this wont be the most ideal for an array, but you could |