00:00:05 | audiophile | wow that is handy |
00:00:15 | audiophile | so how about stuff like virtual environments from python |
00:00:17 | audiophile | do we have those too |
00:00:33 | Yardanico | well you can have different nimble directories and change it from the config |
00:00:44 | audiophile | oh local directories? |
00:00:52 | Yardanico | and really you can have different package versions installed at the same time |
00:01:02 | audiophile | on a global level? |
00:01:05 | Yardanico | and nimble will resolve them for different packages which need different versions of same module |
00:01:15 | audiophile | that's very very cool! |
00:01:37 | FromDiscord | <KingDarBoja> Why there are too many FP libs lol |
00:01:49 | audiophile | one can never have too many fp libs |
00:02:10 | * | ofelas joined #nim |
00:02:31 | audiophile | oh hi KingDarBoja |
00:22:12 | * | audiophile quit (Remote host closed the connection) |
00:26:36 | FromDiscord | <KingDarBoja> Hi mate |
00:26:55 | FromDiscord | <KingDarBoja> Ain't better if those people join together and develop a single one? |
00:27:02 | FromDiscord | <KingDarBoja> Like ramdajs |
00:47:27 | * | Victor joined #nim |
00:48:49 | * | dddddd__ quit (Ping timeout: 264 seconds) |
00:49:15 | * | Victor quit (Client Quit) |
00:57:30 | * | krux02_ quit (Remote host closed the connection) |
01:08:18 | leorize | well I guess you figured out why there are so many of them :P |
01:11:46 | FromDiscord | <Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/726968116013432862/standards.png |
01:12:10 | Yardanico | I knew what it is by the file name even without opening the file |
01:12:13 | Yardanico | neural networks be damned |
01:12:19 | Yardanico | well, and by the context |
01:13:48 | * | Tlongir joined #nim |
01:17:27 | * | Tongir joined #nim |
01:19:22 | FromDiscord | <KingDarBoja> Lmao |
01:19:49 | FromDiscord | <KingDarBoja> Yardanico, let's make a FP lib to cover everyone use case |
01:19:54 | Yardanico | I don't really like FP |
01:19:56 | Yardanico | and never done FP |
01:20:11 | Yardanico | I mean it's not that I don't like it, I'm neutral |
01:20:15 | * | Tlongir quit (Ping timeout: 260 seconds) |
01:20:47 | FromDiscord | <Elegant Beef> We already have 32 and 64 bit FP that's all we need |
01:20:51 | FromDiscord | <Elegant Beef> If you need more stop it |
01:28:40 | FromDiscord | <Rika> FP as in |
01:28:46 | Yardanico | floating point and functional programming |
01:28:49 | FromDiscord | <Rika> func programming? |
01:29:08 | Yardanico | finally I'm less lazy this year |
01:29:24 | Yardanico | more contribs on github |
01:29:36 | FromDiscord | <Elegant Beef> Grats! |
01:29:50 | Yardanico | 510 for the last year compared to 116 in 2019 and 172 in 2018 |
01:29:51 | FromDiscord | <Elegant Beef> I mean when i see FP i think floating point cause im a numpty |
01:30:00 | FromDiscord | <Elegant Beef> Nice im at like 600 or so |
01:30:41 | Yardanico | also I finally recreated my exercism mentor account |
01:30:49 | Yardanico | (I had it disabled for quite some time) |
01:31:32 | FromDiscord | <Elegant Beef> Damn only 2 mentors and 1k students |
01:31:56 | Yardanico | well I was quite active quite a long time ago :P |
01:32:03 | Yardanico | time to do the nim track myself |
01:32:21 | FromDiscord | <KingDarBoja> Wait what |
01:32:22 | Yardanico | ? |
01:32:34 | FromDiscord | <KingDarBoja> Then only Juan Paco was doing the reviews? |
01:32:38 | Yardanico | idk maybe |
01:32:43 | FromDiscord | <KingDarBoja> Loool |
01:32:50 | FromDiscord | <KingDarBoja> Can I become one(?) XD |
01:32:52 | Yardanico | yes |
01:33:01 | Yardanico | if you want to TAKE THE RESPONSIBILITY |
01:33:08 | FromDiscord | <KingDarBoja> I know I can but I am not confident |
01:33:10 | Yardanico | of shaping people's opinion on nim |
01:33:13 | Yardanico | jk |
01:33:18 | FromDiscord | <KingDarBoja> That's the problem |
01:33:18 | Yardanico | go to https://exercism.io/become-a-mentor |
01:33:20 | FromDiscord | <KingDarBoja> Hahahaha |
01:33:22 | FromGitter | <ynfle> Speaking of exercism, anyone wanna help contribute to v3? https://github.com/exercism/v3/tree/master/languages/nim? |
01:33:33 | FromDiscord | <KingDarBoja> Sure |
01:33:37 | FromDiscord | <Elegant Beef> Really there isnt a online editor/compiler for this stuff? |
01:33:51 | FromDiscord | <KingDarBoja> But I see most exercises are the same across languages |
01:34:10 | FromDiscord | <KingDarBoja> So maybe it's not the best idea at all(?) |
01:34:36 | FromGitter | <ynfle> @Elegant Beef that's what v3 is for |
01:34:41 | FromDiscord | <KingDarBoja> I am afraid of giving wrong feedback hahaha |
01:34:46 | Yardanico | "A representer is a program that has the responsibility of taking a solution and returning a normalized representation of it." that sounds really complicated |
01:34:56 | Yardanico | ah well seems to be just renaming stuff |
01:35:09 | FromDiscord | <KingDarBoja> Ohhh |
01:35:18 | FromGitter | <ynfle> @Yardanico, in the middle of making it ⏎ Have the first implementation almost finished |
01:35:23 | FromDiscord | <KingDarBoja> V3 sounds like a rework |
01:35:29 | Yardanico | how are you doing the checks? |
01:35:32 | Yardanico | and how can I help? :P |
01:36:00 | FromGitter | <ynfle> https://exercism-team.slack.com/files/U01102QBLNA/F015H8Q8PLM/rep.gif |
01:36:17 | FromDiscord | <Elegant Beef> need to be logged in |
01:36:19 | Yardanico | oh no slack |
01:36:23 | FromGitter | <ynfle> Well, it runs in parallel with test-runner so we know it compiles |
01:36:26 | FromGitter | <ynfle> Sorry |
01:36:35 | FromGitter | <ynfle> Primary communication is Slack |
01:36:49 | FromDiscord | <KingDarBoja> Ewww slack |
01:36:51 | FromDiscord | <KingDarBoja> Anyway |
01:36:53 | FromGitter | <ynfle> @ee7 is the senior maintainer |
01:37:09 | FromDiscord | <KingDarBoja> Sounds complicated the representer step |
01:37:11 | Yardanico | who is that? :P |
01:37:32 | FromDiscord | <KingDarBoja> Ee7 did some review on @mratsim blog post |
01:37:33 | FromGitter | <ynfle> He lurks the irc every so often |
01:37:42 | FromGitter | <ynfle> (https://files.gitter.im/5602f03e0fc9f982beb19f61/JNxz/rep.gif) |
01:37:47 | FromDiscord | <KingDarBoja> Which is still in PR waiting to get merged |
01:37:56 | * | oddp quit (Ping timeout: 258 seconds) |
01:38:17 | FromDiscord | <KingDarBoja> https://github.com/ee7 |
01:38:31 | Yardanico | eh I didn't even receive the slack invite from exercism, gonna email them |
01:38:39 | Yardanico | is the exercism-team the same as for mentors? |
01:38:44 | FromDiscord | <KingDarBoja> He has been active since last month jumm |
01:38:45 | FromGitter | <ynfle> Email jeremy |
01:39:09 | Yardanico | jeremy walker? |
01:39:20 | FromGitter | <ynfle> Yup |
01:39:22 | Yardanico | I'm not really accustomed with exercism stuff |
01:39:25 | Yardanico | so I don't know people or emails |
01:39:30 | FromGitter | <ynfle> I think [email protected] |
01:39:38 | FromDiscord | <KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726975130160463922/Screenshot_20200628-203927.png |
01:39:46 | FromDiscord | <KingDarBoja> Damn Elixir |
01:40:04 | FromGitter | <ynfle> https://exercism.io/team/staff |
01:40:18 | Yardanico | yes I saw that |
01:40:20 | Yardanico | but it doesn't have emails |
01:40:50 | FromDiscord | <KingDarBoja> Hey, where is TypeScript!? |
01:41:23 | FromDiscord | <Elegant Beef> In the trash heap where it belongs |
01:41:56 | FromDiscord | <KingDarBoja> 👿 |
01:44:27 | FromDiscord | <KingDarBoja> Anyway, would be great to help :P |
01:44:34 | Yardanico | well then we have to open a forum thread or a github repo to request nim people to come up with good candidates for "concept exercises" |
01:44:48 | Yardanico | lets see what ones C# has |
01:45:03 | Yardanico | uh |
01:45:06 | Yardanico | uhh |
01:45:16 | Yardanico | https://i.imgur.com/ToUZNEq.png |
01:45:19 | FromDiscord | <KingDarBoja> I am watching Dark, I Will check those tomorrow and see how to help |
01:45:20 | FromDiscord | <Rika> kinda wish nim had 80 bit uints now... |
01:45:22 | Yardanico | teaching the stdlib? |
01:45:26 | Yardanico | @Rika stint exists |
01:45:31 | Yardanico | https://github.com/status-im/nim-stint |
01:45:37 | FromDiscord | <KingDarBoja> Yeap |
01:45:46 | FromDiscord | <Rika> kinda big library for such a small library i'm remaking |
01:45:49 | FromDiscord | <KingDarBoja> Would be a good start, Yard |
01:45:53 | Yardanico | @KingDarBoja they say themselves that it's against their goal |
01:46:00 | FromDiscord | <KingDarBoja> Oh |
01:46:14 | FromDiscord | <KingDarBoja> Then I am confused |
01:46:29 | FromDiscord | <KingDarBoja> I have used exercism before to learn Elixir |
01:46:29 | Yardanico | lemme quote |
01:46:46 | Yardanico | from https://github.com/exercism/v3/blob/master/docs/concept-exercises.md |
01:46:52 | Yardanico | "By "Fluency", we mean: Do you get that language? Can you reason in that language? Do you write that language like a "native" programmer writes in it? Fluency is the ability to express oneself articulately in a particular language. |
01:46:52 | Yardanico | "Fluency" is different to "Proficiency", where we use proficiency to mean: Can you write programs in the language (e.g. can you nav stdlib, docs, compose complex code structures)." |
01:46:55 | FromDiscord | <KingDarBoja> So I assume they want exercises that let student learn by they own findings |
01:47:01 | Yardanico | and they say "Exercism focuses on teaching Fluency not Proficiency." |
01:47:14 | Yardanico | which means concept exercises shouldn't really teach the stdlib |
01:47:18 | FromDiscord | <KingDarBoja> Ugh |
01:47:36 | * | endragor joined #nim |
01:47:36 | Yardanico | I thought it would be about idiomatic code |
01:47:49 | FromDiscord | <KingDarBoja> I get it |
01:48:09 | Yardanico | like using iterators / templates / result / enums / etc |
01:48:14 | Yardanico | I mean where to apply them |
01:48:15 | FromDiscord | <KingDarBoja> More like how to code like a Nim expert instead of memorizing how to find things |
01:48:38 | FromDiscord | <KingDarBoja> Well now I am in doubt lmao |
01:49:16 | FromDiscord | <KingDarBoja> Like I don't know what is idiomátic Nim at all |
01:49:28 | FromDiscord | <KingDarBoja> I still using return instead of implícit result lol |
01:49:32 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:49:55 | Yardanico | well you can't always describe what "idiomatic" is in words |
01:50:04 | Yardanico | when looking at the code you just know if it's idiomatic or not :) |
01:50:53 | FromDiscord | <KingDarBoja> Now I feel like noob hahahah |
01:51:10 | Yardanico | even i don't know if my code is idiomatic enough or not :P |
01:51:14 | * | chemist69 joined #nim |
01:51:28 | FromDiscord | <KingDarBoja> Oh |
01:51:33 | FromDiscord | <KingDarBoja> Big revelation |
01:51:45 | Yardanico | well I mean |
01:51:52 | FromDiscord | <KingDarBoja> Well things like Object Variants and Enum things are correlated |
01:52:06 | FromDiscord | <KingDarBoja> Which is a good exercise to when use those |
01:52:20 | Yardanico | I just don't want to say "I write idiomatic Nim" because that's kinda a stupid thing to say |
01:52:26 | FromDiscord | <KingDarBoja> But RIP OOP if most people here are against it xD |
01:52:30 | Yardanico | you show people that you do idiomatic code by writing code :P |
01:52:45 | Yardanico | @KingDarBoja well we'll still have to get a methods/inheritance examples in there |
01:52:51 | Yardanico | since they aim to teach you to be "fluent" in the language |
01:53:11 | FromDiscord | <KingDarBoja> 🧐 does it is requires? |
01:53:28 | FromDiscord | <KingDarBoja> Required* I know Nim has OOP support but very minimal |
01:53:29 | Yardanico | macros, generics, templates, distinct, different statements, interfacing with C (maybe?) |
01:53:40 | Yardanico | @KingDarBoja I wouldn't really call it minimal though |
01:53:44 | Yardanico | it's just that it's relatively rarely used |
01:53:50 | FromDiscord | <KingDarBoja> Let's start with the simple things, shall we? |
01:54:02 | FromDiscord | <KingDarBoja> Those sounds like Medium/Advanced exercises |
01:54:08 | Yardanico | then what is hard? |
01:54:15 | FromDiscord | <KingDarBoja> Good question |
01:54:37 | FromDiscord | <KingDarBoja> Ummm |
01:54:41 | Yardanico | hard task: rewrite https://gist.github.com/Yardanico/9a2677bd8d7c5e0e869cbe451dd175cc in idiomatic nim |
01:54:51 | FromDiscord | <KingDarBoja> Lol |
01:55:10 | FromDiscord | <KingDarBoja> I think it becomes hard as soon as you start using macros |
01:55:25 | FromDiscord | <KingDarBoja> More like Advanced instead of Hard |
01:55:36 | Yardanico | I wouldn't really consider easy macros as "hard" |
01:55:42 | Yardanico | since there's stuff like quote do or macroutils module |
01:55:43 | * | audiophile joined #nim |
01:55:50 | FromDiscord | <KingDarBoja> 🧐 |
01:56:00 | FromDiscord | <KingDarBoja> Maybe navigating the AST? Idk |
01:56:14 | FromDiscord | <KingDarBoja> Also, why are we the only two discussing? |
01:56:24 | FromDiscord | <KingDarBoja> _make a poll_ lol |
01:56:43 | Yardanico | because it's not the right time |
01:56:48 | Yardanico | need a proper post on the forum |
01:56:54 | FromDiscord | <KingDarBoja> Sure |
01:57:01 | FromDiscord | <KingDarBoja> I haven't joined the forums |
01:57:02 | Yardanico | also it's night in Europe/Asia |
01:57:09 | FromDiscord | <KingDarBoja> I tend to forgot those things |
01:57:18 | FromDiscord | <KingDarBoja> It is 9 PM here at Colombia |
01:58:21 | FromDiscord | <KingDarBoja> 🧐 |
02:03:03 | FromDiscord | <flywind> It's morning at Eastern Asia.:) |
02:03:06 | FromDiscord | <Rika> it's morning in asia |
02:03:09 | FromDiscord | <Rika> fuck |
02:04:56 | FromDiscord | <KingDarBoja> Yey |
02:05:02 | FromDiscord | <KingDarBoja> It is holiday tomorrow |
02:05:09 | FromDiscord | <KingDarBoja> More Dev time for meee |
02:05:25 | FromDiscord | <KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726981616882286662/FB_IMG_1593320985356.jpg |
02:05:32 | FromDiscord | <KingDarBoja> Lmao |
02:06:07 | FromDiscord | <Rika> ugh, i was wondering why my library had a gigantic slowdown |
02:06:12 | FromDiscord | <Rika> didnt use release |
02:06:15 | FromDiscord | <Rika> :ArsGigaFace: |
02:06:34 | Yardanico | -d:danger for real men |
02:07:11 | FromDiscord | <KingDarBoja> Lol |
02:07:18 | FromDiscord | <KingDarBoja> I have never used ig |
02:07:20 | FromDiscord | <KingDarBoja> It* |
02:07:28 | Yardanico | -d:danger disables all runtime checks |
02:07:35 | Yardanico | which -d:release used to do until 0.20 |
02:07:40 | Yardanico | (i think it was 0.20) |
02:08:07 | FromDiscord | <KingDarBoja> I want discord emojis |
02:08:21 | FromDiscord | <KingDarBoja> But I am too lazy to pay for nitro |
02:09:15 | FromDiscord | <Elegant Beef> :nimrawr: you get the server ones for free, so you can post yards github profile picture |
02:09:23 | FromDiscord | <Elegant Beef> Whillst in the server i should say |
02:10:22 | FromDiscord | <Rika> feels good to make a ulid library 10x-ish faster than the existing one |
02:10:45 | FromDiscord | <Rika> though i partly owe it to nim's xoroshiro rand gen |
02:11:17 | FromGitter | <ynfle> @Yardanico When you get an invite ping me? |
02:11:23 | Yardanico | okay |
02:11:27 | FromDiscord | <Rika> 10 million uids under a second 😄 |
02:11:40 | Yardanico | and here i am stealing pics from prnt.sc |
02:11:46 | Yardanico | shhhh |
02:12:46 | FromGitter | <ynfle> They have a youtube channel with weekly chats discussing stuff related to v3 for the past three months |
02:14:21 | FromGitter | <ynfle> !repo nim-test-runner |
02:14:22 | disbot | https://github.com/FedericoCeratto/nim-testrunner -- 9nim-testrunner: 11Nim test runner 15 7⭐ 1🍴 7& 2 more... |
02:14:24 | FromDiscord | <KingDarBoja> lol |
02:14:58 | FromGitter | <ynfle> @Yardanico https://github.com/exercism/nim-test-runner/ https://github.com/exercism/nim-representer |
02:31:24 | FromDiscord | <KingDarBoja> Need to learn how websockets work |
02:31:25 | FromDiscord | <KingDarBoja> Damn |
02:33:27 | * | Tlanger joined #nim |
02:35:40 | * | Tongir quit (Ping timeout: 246 seconds) |
02:39:25 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:40:40 | * | fredrikhr quit (Read error: Connection reset by peer) |
02:40:43 | Prestige | Getting an error here that I can't recreate on the playground: https://github.com/crab-dev/snake/blob/master/src/main.nim#L26 can anyone assist? |
02:41:02 | FromDiscord | <Rika> whats the error at least T_T |
02:41:04 | * | fredrikhr joined #nim |
02:41:10 | Prestige | https://pastebin.com/raw/nWQSpeVf |
02:41:17 | * | muffindrake joined #nim |
02:41:22 | Yardanico | import deques |
02:41:29 | FromDiscord | <Rika> yeah |
02:41:30 | Prestige | my lord |
02:41:31 | Prestige | ty |
02:41:33 | FromDiscord | <Rika> i am late |
02:41:33 | FromDiscord | <Rika> 😦 |
02:42:14 | Prestige | hehe |
02:42:34 | FromDiscord | <KingDarBoja> xd |
02:42:43 | FromDiscord | <KingDarBoja> Late for what? @Rika |
02:42:55 | FromDiscord | <Rika> i was beat by yardanico |
02:43:05 | Yardanico | i have the fastest nim error fixer in the west |
02:43:23 | FromDiscord | <Rika> second to none |
02:43:29 | FromDiscord | <KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726991193434488842/9900_aqua_fingerspin.gif |
02:43:50 | Prestige | I am spoiled by auto imports D: |
02:44:37 | FromDiscord | <Rika> you can always export dequeues from gamesnake too |
02:44:42 | FromDiscord | <Rika> i mean |
02:44:44 | FromDiscord | <Rika> deques |
02:45:10 | Prestige | that keeps tripping me up too, lol |
02:45:57 | FromDiscord | <KingDarBoja> What I should do in Nim repo regarding docs? lol |
02:46:07 | FromDiscord | <KingDarBoja> _I want to contribute_ xD |
02:46:09 | FromDiscord | <Rika> @_@ i'm starting to overoptimize |
02:46:15 | FromDiscord | <KingDarBoja> JK, I am lazy now |
02:46:50 | FromDiscord | <KingDarBoja> FUUUUUU https://media.discordapp.net/attachments/371759389889003532/726992040424112208/unknown.png |
02:47:04 | FromDiscord | <KingDarBoja> _Insert Rika gun in mouth emoji_ |
02:47:10 | FromDiscord | <Rika> :KannaKMS: |
02:47:35 | FromDiscord | <KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726992226298888252/gun_mouth_emoji.png |
02:47:37 | FromDiscord | <KingDarBoja> Stolen |
02:48:10 | FromDiscord | <KingDarBoja> Btw, https://plugins.jetbrains.com/plugin/7829-nim-language-support |
02:48:37 | FromDiscord | <KingDarBoja> > Sep 26, 2015↵Ugh... |
02:48:48 | FromDiscord | <Rika> lol |
02:49:09 | FromDiscord | <KingDarBoja> https://github.com/jhspetersson/idea-nim |
02:49:26 | FromDiscord | <KingDarBoja> Yardanico, this is the time, do this plugin with latest stuff for IntelliJ xD |
02:49:57 | FromDiscord | <Rika> why |
02:49:57 | FromDiscord | <KingDarBoja> https://github.com/jhspetersson/idea-nim/blob/master/src/nim/NimSyntaxHighlighter.java ugh nvm |
02:50:06 | FromDiscord | <Rika> do you use jetbrains |
02:50:07 | FromDiscord | <KingDarBoja> It is JAVA |
02:50:09 | FromDiscord | <KingDarBoja> Yes |
02:50:14 | FromDiscord | <KingDarBoja> Mostly PyCharm for Python |
02:50:41 | FromDiscord | <Rika> why not try a lighter editor for nim |
02:51:01 | FromDiscord | <KingDarBoja> _VSCodeeee_ |
02:52:16 | hyiltiz | |
03:12:00 | FromDiscord | <KingDarBoja> https://stackoverflow.com/questions/11154668/is-the-visitor-pattern-useful-for-dynamically-typed-languages |
03:12:13 | Yardanico | yes |
03:12:20 | FromDiscord | <KingDarBoja> > the elegance of the pattern in those languages is that it avoids having explicit switching logic in the visitees, which is not possible in dynamic languages with untyped variables. Accordingly, the Visitor pattern at the top is bad for dynamic languages because it reproduces the sin which the Visitor pattern in static languages seeks to avoid. |
03:12:30 | FromDiscord | <KingDarBoja> This part is confusing af |
03:12:57 | FromDiscord | <KingDarBoja> That's part of the first answer conclusion |
03:13:36 | FromDiscord | <KingDarBoja> I feel like trash as soon as I read people speaking about several languages without doubt |
03:35:43 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:37:06 | FromDiscord | <flywind> Hello, I got: Error: internal error: environment misses: b. What's wrong with this? |
03:37:08 | FromDiscord | <flywind> https://gist.github.com/xflywind/2f6ed4475fa9cfeaa5bdb33eeb52da8b |
03:38:58 | leorize | internal error means compiler bug |
03:39:02 | leorize | have you filed an issue? |
03:40:21 | leorize | try simplifying the sample |
03:40:40 | FromDiscord | <flywind> Ok. I will make an issue. |
03:40:51 | leorize | since you have two ready to go nodes, use result = newStmtList(), then add each node in |
03:43:24 | FromDiscord | <flywind> Thanks. I will try it. |
03:50:19 | * | dmi0 quit (Remote host closed the connection) |
03:50:46 | * | dmi0 joined #nim |
03:55:23 | FromDiscord | <flywind> done. https://github.com/nim-lang/Nim/issues/14847 |
03:55:25 | disbot | ➥ create a new function definitions got Internal error: environment misses: ; snippet at 12https://play.nim-lang.org/#ix=2qsm |
03:55:39 | leorize | I think I figured out the problem |
03:55:50 | leorize | https://play.nim-lang.org/#ix=2qsn |
03:56:06 | leorize | you may notice my little line that hijacks in `b` |
03:56:50 | leorize | this is because Nim already type checked the body and make `b` refer to the function parameter of the other proc, which doesn't exist inside this proc |
03:57:16 | leorize | so I put an ident there to force rebinding |
03:57:24 | leorize | though I don't really think you can automate this... |
03:57:58 | * | NimBot joined #nim |
03:59:35 | leorize | the only way to have this work would be to get a copy of the untyped function |
03:59:36 | FromDiscord | <juan_carlos> How to check if a NimNode is a field of an Enum?, `expectkind()` cant do it `Expected nnkEnumFieldDef, got nnkIdent`. |
03:59:52 | leorize | it has to be bound as a symbol first |
04:00:08 | leorize | then symKind should tell you what it is |
04:02:10 | FromDiscord | <flywind> @leroize Thanks. Is it a bug or won't be fixed and given a better error msgs? |
04:02:23 | leorize | it's a bug |
04:02:31 | FromDiscord | <flywind> ok |
04:03:26 | leorize | guess we need a new unfunction like: getUntypedImpl :P |
04:03:29 | leorize | function* |
04:03:43 | * | B4s1l3 joined #nim |
04:03:52 | * | B4s1l3 is now known as opDispatch |
04:04:27 | * | Jjp137 quit (Read error: Connection reset by peer) |
04:04:38 | FromDiscord | <flywind> 😀 |
04:05:11 | leorize | if you can tell me what you're trying to do maybe I can figure out an alternative impl for you :) |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:21 | FromDiscord | <juan_carlos> It says `symbol()` is Deprecated. |
04:06:41 | * | supakeen joined #nim |
04:06:54 | leorize | @juan use bindSym() |
04:07:50 | FromDiscord | <flywind> I want a Non-invasive coverage tools like yglukhov's coverage. Create a new function definitions to coverage if instead of using pragma. |
04:09:06 | leorize | I guess he used pragma because you can't do it like this :P |
04:10:49 | * | dmi0 quit (Remote host closed the connection) |
04:11:13 | * | dmi0 joined #nim |
04:18:10 | FromDiscord | <flywind> I also want reflection to get function's name. timotheecour's method seems not to work now. |
04:18:12 | FromDiscord | <flywind> timotheecour |
04:18:19 | Yardanico | he's not there |
04:18:23 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/issues/8212 |
04:18:25 | disbot | ➥ we need a standard way to get name of procedure ; snippet at 12https://play.nim-lang.org/#ix=25Yt |
04:18:32 | Yardanico | well it's a hack :P |
04:20:15 | leorize | if you have the symbol then signatureHash() will work |
04:27:29 | * | mklooste2 joined #nim |
04:45:57 | * | nsf joined #nim |
04:49:43 | * | mklooste2 quit (Ping timeout: 246 seconds) |
04:58:52 | * | rockcavera quit (Remote host closed the connection) |
05:01:48 | * | rockcavera joined #nim |
05:42:57 | * | rockcavera quit (Remote host closed the connection) |
05:50:30 | * | audiophile quit (Quit: Default Quit Message) |
05:54:54 | * | narimiran joined #nim |
06:04:45 | * | Jjp137 joined #nim |
06:17:35 | * | vicfred quit (Quit: Leaving) |
06:22:22 | * | solitudesf joined #nim |
06:22:52 | * | vikfret joined #nim |
06:29:32 | * | Vladar joined #nim |
06:33:05 | * | PMunch joined #nim |
06:38:11 | * | mklooste2 joined #nim |
06:45:05 | * | mklooste2 quit (Quit: WeeChat 2.8) |
06:47:43 | * | marnix joined #nim |
06:48:51 | * | marnix quit (Client Quit) |
06:50:40 | * | marnix joined #nim |
07:10:44 | * | pbb quit (Remote host closed the connection) |
07:35:39 | * | FromDiscord quit (Remote host closed the connection) |
07:35:53 | * | FromDiscord joined #nim |
07:37:08 | Araq | the voice of reason returned |
07:37:13 | Araq | http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1947r0.pdf |
07:40:27 | * | pietroppeter joined #nim |
07:42:22 | * | HIRON joined #nim |
07:48:29 | * | HIRON quit (Quit: Leaving) |
07:54:06 | PMunch | Have anyone experimented with sorting procedures in the documentation after first type? |
07:56:09 | Araq | what? |
07:56:29 | leorize | I thought of it but never implemented anything for that |
07:56:40 | leorize | could be a nice way to sort |
07:57:22 | leorize | I haven't check jsondoc, but I kinda hope that it'd contain enough info to make a renderer with karax |
07:57:45 | PMunch | Araq, for example the tables module looks super confusing because it just repeats the same names over and over, would be nice if they had sub-heading with the type: https://nim-lang.org/docs/tables.html |
07:57:57 | PMunch | leorize, jsondoc needs some more love.. |
07:58:10 | PMunch | I think it currently only exports the signature as a string.. |
07:59:19 | PMunch | Maybe group in procedures starting with new/init that returns the same type as well |
08:00:13 | leorize | I'd like it if we can have different sorting mode for docs that can be toggled at runtime |
08:02:35 | PMunch | That should certainly be possible with jsondoc |
08:03:17 | PMunch | Not sure if it is though.. |
08:03:38 | PMunch | What is this warning? "Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]" |
08:04:14 | leorize | probably a variable without an usable default |
08:04:14 | Araq | PMunch, use 'result = Obj(fields)' instead of 'result.fields = ...' |
08:04:25 | Araq | at least that's the most common solution to the problem |
08:07:22 | * | nikita` joined #nim |
08:09:15 | PMunch | Hmm, is master broken? /home/peter/Projects/nim/nim/lib/system.nim(207, 11) Error: undeclared identifier: 'is' |
08:09:24 | FromDiscord | <Yardanico> master? |
08:09:33 | FromDiscord | <Yardanico> did you mean devel? :) |
08:09:41 | PMunch | Oh right, we've switched.. |
08:09:42 | leorize | we should get rid of master :P |
08:09:47 | FromDiscord | <Yardanico> XD |
08:09:51 | PMunch | Never mind |
08:11:06 | FromDiscord | <Elegant Beef> does the float $ use the system's language to convert to string? |
08:11:13 | FromDiscord | <Yardanico> No |
08:11:19 | FromDiscord | <Elegant Beef> Ah nice |
08:11:25 | FromDiscord | <Yardanico> You can use formatFloat though |
08:11:30 | FromDiscord | <Yardanico> To specify a custom delimiter |
08:11:41 | FromDiscord | <Elegant Beef> Nah i will force my rule of decimal points on everyone 😄 |
08:12:41 | leorize | that reminds me that we still need to figure out how to get ryu on nim :P |
08:12:44 | FromDiscord | <Elegant Beef> I was just thinking about use a CSV format, and was reminded of the issue in C# cause they do use their langauge |
08:15:11 | PMunch | Where do I find the "corresponding Defect"? "Warning: See corresponding Defect; RangeError is deprecated [Deprecated]" |
08:15:29 | FromDiscord | <Yardanico> RangeDefect |
08:15:32 | FromDiscord | <Yardanico> I guess :P |
08:15:42 | PMunch | @ElegantBeef, had that same issue in C#.. |
08:15:49 | PMunch | Yardanico, nope |
08:15:54 | FromDiscord | <Yardanico> Really m |
08:15:56 | FromDiscord | <Yardanico> ? |
08:16:31 | FromDiscord | <Yardanico> Are you on devel? |
08:16:50 | FromDiscord | <Yardanico> On 1.2 it's still RangeError |
08:17:02 | FromDiscord | <Yardanico> But in devel it's RangeDefect |
08:18:26 | leorize | and thanks to this rename we now need to use `when` everywhere just to support 1.0 :) |
08:19:06 | FromDiscord | <Yardanico> No? |
08:19:15 | FromDiscord | <Yardanico> You can just use RangeErrot |
08:19:20 | FromDiscord | <Yardanico> *error |
08:19:33 | leorize | and be bugged with deprecated warnings? |
08:19:39 | FromDiscord | <Yardanico> It'll make a warning but will compile for the entirety of 1.0 I guess |
08:19:46 | Araq | leorize, there is fusion/compat for it |
08:19:59 | Araq | I wanted to add the new exception names but forgot |
08:20:52 | leorize | we should figure out how fusion should be packaged/shipped with nim too |
08:20:58 | Araq | PMunch, yeah better links for the docs have been proposed before |
08:21:15 | leorize | it could become the first external package that we can use with the compiler |
08:21:25 | FromDiscord | <Elegant Beef> Pmunch, isnt it so nice, cause you check on your hardware and it works, but then you ship it and someone complains and you have to go through "Why doesnt it work, it doesnt crash but it doesnt work either" |
08:21:48 | FromDiscord | <Elegant Beef> Then you remember the entire world cant agree on a decimal seperator and your cry for the timezone guys |
08:21:54 | FromDiscord | <Elegant Beef> you cry* |
08:21:57 | Araq | leorize, 1.4 will have it, 1.2 or 1.0 should mark it as a Nimble dependency |
08:22:14 | FromDiscord | <Yardanico> You can set default locale in C# though |
08:22:18 | Araq | maybe we should release 1.0.x and 1.2.x that also ship with "fusion", no idea |
08:22:21 | FromDiscord | <Elegant Beef> It's like a 3 second fix |
08:22:23 | FromDiscord | <Yardanico> I mean it's annoying but not hard |
08:22:25 | FromDiscord | <Yardanico> Yeah |
08:22:30 | FromDiscord | <Elegant Beef> It's still annoying though |
08:22:40 | FromDiscord | <Elegant Beef> Cause i didnt realize it was an issue on a published game jam game |
08:22:42 | Araq | Elegant Beef: locales are stupid |
08:23:24 | FromDiscord | <Elegant Beef> Yea it implicitly should be whatever the language wants, explictly should have to be stated |
08:23:58 | FromDiscord | <Elegant Beef> I've got a feeliing that implicit using of language has annoyed more than just a handful of people |
08:24:00 | FromDiscord | <Elegant Beef> 😄 |
08:25:32 | FromDiscord | <Yardanico> So @Araq, I wanted to ask - what's the difference between `any` and `auto`? I've only seen a remark about distincts of type classes and any seems to be a distinct of auto, so in which cases they are different? |
08:25:36 | FromDiscord | <Yardanico> Just curious honestly |
08:26:34 | leorize | Araq: well let me know when you figured out how you'd want the packaging to be and whether it should be used by the compiler |
08:27:20 | leorize | once you decided I'll write CI bits for it so I can start moving code from the compiler to fusion :P |
08:28:36 | * | nikita` quit (Quit: leaving) |
08:29:05 | * | nikita` joined #nim |
08:29:21 | FromDiscord | <Elegant Beef> Before i go and write (de)serializer, is there a template to reverse the $ on an object? |
08:30:02 | Araq | <Yardanico> I don't know either |
08:30:03 | FromDiscord | <Elegant Beef> or proc i guess, just figured it'd have to be a template 😄 |
08:32:07 | * | abm joined #nim |
08:34:49 | leorize | @Beef: no, instead use json for (de)serializing |
08:35:58 | FromDiscord | <Elegant Beef> ok |
08:36:13 | FromDiscord | <Elegant Beef> Yea that'll be easy 😄 |
08:36:18 | FromDiscord | <Elegant Beef> Idk why i was going to do CSV |
08:38:35 | * | Trustable joined #nim |
08:40:25 | PMunch | @Elegant Beef, haha exactly! |
08:45:27 | FromDiscord | <Elegant Beef> Ah, hell yea that was super easy to implement |
08:45:50 | FromDiscord | <Elegant Beef> I've actually never used any automated json generator 😛 |
08:46:42 | Araq | PMunch, since it keeps coming up. |
08:47:03 | Araq | did we consider to *generate* markdown instead of HTML or JSON? |
08:47:26 | PMunch | Are you asking me? |
08:47:31 | Araq | yes |
08:47:51 | Araq | would it be a good idea? then people can use external tools |
08:47:57 | PMunch | I haven't considered it, personally I think the JSON format should be expanded so that any kind of format/tool can be built on top of it |
08:48:06 | PMunch | So you could write a jsondoc -> markdown converter |
08:48:20 | Araq | as I said, JSON is flawed because it's structured |
08:48:29 | Araq | and docs are semi-structured |
08:48:40 | PMunch | Hmm, what do you see as an issue there? |
08:48:56 | PMunch | The thing that annoys me is that signatures for example is structured |
08:49:34 | PMunch | And the AST is structured |
08:49:36 | Araq | Informal *text* here with URL and **formatting** |
08:49:50 | PMunch | And doc-comments are tied to the AST, so they are inherently structured |
08:49:59 | PMunch | Ah I see, the actual text isn't structured |
08:50:01 | PMunch | That's true |
08:50:11 | Araq | yeah |
08:50:28 | Araq | so in effect it's "JSON with RST/Markdown/HTML inside" |
08:50:40 | PMunch | I mean it is called ReStructuredText, so you'd think it's structured |
08:50:58 | Araq | and also replicating all the stuff our docgen does with the JSON isn't easy |
08:51:01 | PMunch | I guess you should theoretically be able to express RST as QSON |
08:51:06 | * | endragor quit (Remote host closed the connection) |
08:51:08 | Araq | for example, type names are turned into links |
08:51:32 | * | endragor joined #nim |
08:51:49 | Araq | usually site-building generators take markdown/RST or even HTML snippets |
08:52:04 | PMunch | Easy, output the unique name used by the C back-end along with the "display name" |
08:52:25 | PMunch | That way you can generate links from the JSON just fine |
08:52:59 | Araq | traversing the JSON is harder and harder the more information it contains |
08:53:24 | Araq | "here is it in JSON, do what you want with it" is a flawed idea |
08:53:37 | Araq | because it's not easy to "do what I want with it" at all |
08:54:11 | Araq | I can already do everything what I want by traversing the HTML and emitting different HTML |
08:54:11 | PMunch | But it's magnitudes easier than having to parse HTML and make assumptions about things that the compiler already knew when it generated the thing |
08:54:31 | Araq | we have an HTML parser in the stdlib much like we have a JSON parser |
08:54:51 | PMunch | Yeah, but you'd have to parse the signature format as well |
08:55:29 | PMunch | If it was JSON it would be simple to write a tool that takes jsondoc and for example outputs all procedures that returns an int |
08:55:41 | Araq | well we can output it in a more structured way either in JSON or in HTML |
08:56:44 | PMunch | But that locks the HTML documentation to forever keep the same style/structure |
08:57:18 | PMunch | For example adding sub headers for the procedures like I asked about earlier would likely cause tools trying to parse the HTML to stop working |
08:57:50 | PMunch | But if it was JSON converted to HTML the converter could add whatever it wanted without breaking the tools that read the JSON |
08:58:12 | PMunch | It's basically separating data from presentation |
08:59:17 | * | endragor quit (Ping timeout: 246 seconds) |
08:59:27 | Araq | that's HTML 5 in a nutshell, we only emit <div> for the structure and style it with CSS |
08:59:32 | Araq | separating data from presentation :P |
09:00:13 | Araq | but we can have a more constructive discussion, so what's your real use case? |
09:00:34 | Araq | turning the JSON yet again into HTML? Or to improve the search feature? |
09:01:05 | Araq | or to improve interop with eg. Sphinx? |
09:02:51 | FromDiscord | <mratsim> How to mess with HTML: make `div` a keyword and watch the world burn |
09:03:39 | * | endragor joined #nim |
09:03:42 | FromDiscord | <mratsim> but I would love better interop with a doc generator, sphinx being RST-based is probably the most evident choice (the other being markdown 😉 ) |
09:04:19 | * | endragor quit (Remote host closed the connection) |
09:04:47 | * | endragor joined #nim |
09:04:52 | PMunch | Off the top of my head: different formats (HTML/Markdown/Manpage), interop with tools (easier to "massage" the data into specific representations), building more complex tools (throw all the docs into a document store database and create a dynamic site where I can search across all documentation for procedures that returns a certain type), dynamic documentation with community supplied examples (eg. Clojure documentation: https://clojuredocs.org/clojure.core/d |
09:04:52 | PMunch | eclare) |
09:05:21 | Araq | mratsim: "Sphinx interop is 'just' a simple 1_000 line Nim program that turns the JSON into a Sphinx compatible format" |
09:05:43 | Araq | :P |
09:06:23 | Araq | see, that's what I'm talking about. if the tools we want better interop with all speak markdown now, let's have a markdown output |
09:07:11 | PMunch | Only one of my four "off the top of my head" ideas would benefit from Markdown support, all would benefit from better JSON output. |
09:07:41 | PMunch | And that one only because "different formats" happened to include Markdown |
09:08:04 | Araq | there is no JSON representation for <table> |
09:08:27 | PMunch | Of course there is, an array of objects |
09:08:34 | PMunch | Or an array of arrays for that matter.. |
09:08:38 | Araq | the idea of <table> exists in both RST and Markdown |
09:09:03 | FromDiscord | <mratsim> For Weave, I started to use Rust's mdBook: https://rust-lang.github.io/mdBook/ |
09:09:14 | Araq | the JSON representation is ad-hoc |
09:09:39 | * | endragor quit (Remote host closed the connection) |
09:09:41 | FromDiscord | <mratsim> Gitbook and new docgen are also embracing amrkdown: https://github.com/honkit/honkit |
09:09:44 | PMunch | I actually wanted to create the better documentation thing with comments and cross-module search, but was discouraged by how hard it was to get good data out of the documentation generation in a sensible manner.. |
09:09:45 | * | endragor joined #nim |
09:10:28 | PMunch | Of course it is, JSON is just an object notation, you're supposed to design your objects to match your data, and then display them as json |
09:12:35 | * | oddp joined #nim |
09:12:40 | Araq | mratsim: how does mdBook work with Rust's docgen? |
09:12:52 | Araq | what does Rust's docgen offer? |
09:15:06 | FromDiscord | <mratsim> https://forum.nim-lang.org/t/6505#40168 |
09:15:11 | FromDiscord | <mratsim> funny you ask that :p |
09:16:40 | Araq | https://doc.rust-lang.org/stable/rustdoc/command-line-arguments.html well I'm reading it |
09:16:59 | Araq | and it produces HTML, CSS and JS, no JSON intermediate format in sight |
09:17:11 | Araq | yet mdBook works |
09:17:52 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2qte |
09:18:00 | PMunch | Another opportunity for Nim to be better ;) |
09:18:32 | Araq | PMunch, look, I'm accepting your PRs |
09:18:40 | Araq | and I really appreciate all the work |
09:19:20 | PMunch | Thanks :) |
09:19:26 | FromDiscord | <mratsim> Basically: in the How-to, explanation, reference, tutorials from https://documentation.divio.com/ |
09:19:33 | FromDiscord | <mratsim> nim doc does the reference |
09:19:39 | FromDiscord | <mratsim> markdown does everything else |
09:19:58 | PMunch | But yeah, I think a markdown output should be a tool built on top of the JSON output. And the JSON output should be made good enough for that to happen |
09:20:13 | FromDiscord | <mratsim> (or RST like in Arraymancer though super tedious, or SPhinx) |
09:20:44 | PMunch | Hmm, maybe I should try to write a JSON -> HTML converter, and then keep adding to the JSON output until I can get it to display the same as the HTML output |
09:20:48 | FromDiscord | <mratsim> and I need some way to bridge, so that I can generate all 4 kinds of documentation |
09:20:50 | Araq | but I think there is a better way to do it |
09:21:28 | FromDiscord | <mratsim> we don't need json-html, e need to find a tool that can integrate API references from json, with highlight.js or something. |
09:21:32 | Araq | for example, the Nim docgen can leave the ## text here untouched, except for resolving Nim references |
09:21:58 | Araq | and turn the 'proc header' thing into markdown |
09:22:10 | FromDiscord | <mratsim> and we need to ensure that the json docgen can handle complex projects with public proc in many different files |
09:22:13 | Araq | then we don't need any RST or markdown parser in the core at all |
09:22:59 | Araq | nor do we need JSON output (though it might be useful to have for other reasons) |
09:23:42 | FromDiscord | <mratsim> no we don't need RST or markdown in that case indeed |
09:23:59 | FromDiscord | <mratsim> and it simplifies the Nim compiler by letting it focus on Nim code |
09:24:21 | FromDiscord | <mratsim> the json output is useful for people to write transformers/processors |
09:24:28 | FromDiscord | <mratsim> and I think I saw such doc generator |
09:24:46 | Araq | yes but in the end every transformer is yet another tool for our end users |
09:25:04 | Araq | and these tools might be better developed than nim doc or not |
09:25:31 | Araq | but let's please not pretend they are easy to write, they are not |
09:26:19 | Araq | and also let's not pretend that a tooling pipeline you need to setup yourself is a good thing |
09:26:52 | FromDiscord | <mratsim> AFAIk this has interactive API doc and I expect they consume JSON: https://meta.stoplight.io/docs/platform/3.-design/a.overview.md#what-is-an-api-description |
09:27:08 | FromDiscord | <mratsim> I didn't pretend |
09:27:31 | FromDiscord | <mratsim> I tried several time to build docs and I say it's hard currently |
09:28:49 | FromDiscord | <mratsim> other examples: https://www.twilio.com/docs/usage/api, https://stripe.com/docs/api/disputes |
09:30:26 | Araq | ok, back to work |
09:31:08 | FromDiscord | <mratsim> what's the state of CSP btw? |
09:31:32 | * | Senny quit (Ping timeout: 260 seconds) |
09:31:36 | Araq | CSP is looking for motivated programmers |
09:31:39 | FromDiscord | <mratsim> I've seen complaints on Async and request on multithreaded Async this weekend |
09:31:50 | FromDiscord | <mratsim> so I was wondering |
09:31:56 | FromDiscord | <mratsim> RFC? |
09:32:13 | Araq | well Zevv started to work on it |
09:32:31 | FromDiscord | <mratsim> can we do CSP as a library? |
09:33:09 | Araq | I don't know. |
09:34:07 | Araq | I think .liftLocals and partial objects are the key compiler features that we need, but we already have them. undocumented |
09:41:08 | bung | PMunch it will keep same looking ,when editor content has long text |
09:44:56 | FromDiscord | <mratsim> liftLocals is the thing to implement closures right? AFAIK I could use that for Weave. |
09:55:48 | Araq | liftLocals is related to closures but closures came earlier |
09:59:10 | * | krux02 joined #nim |
10:06:12 | * | Vladar quit (Quit: Leaving) |
10:25:07 | Zevv | I kind of abandoned it I'm afraind |
10:25:59 | Zevv | And it' CPS, not CSP (hear hear) |
10:26:50 | Zevv | I have some doodling in this repo, but i dont't think it is of any use: https://github.com/zevv/nimcsp |
10:27:26 | Zevv | mratsim: I dont think it can be done from a library, there's not info available in a macro to properly do the transformations. |
10:33:32 | PMunch | bung, I assume you're talking about the playground PR? Do you have an image? |
10:33:54 | PMunch | but as I said, the current solution you have breaks the tour feature, so you need to fix that |
10:39:47 | Araq | Zevv, well tell me what you need, it's crucial we get this going IMO |
10:41:15 | PMunch | Oh, turns out I have already added signatures to jsondoc :P |
10:44:37 | Zevv | I need time and peace in my life and bigger brain, that would do I guess |
10:56:09 | bung | PMunch https://transfer.sh/gpBlx/Screenshot%202020-06-29%20at%206.55.33%20PM.png |
10:57:22 | bung | the current style will hidden the btns , when has long text |
11:09:22 | PMunch | Just set max-width: 100% on .base, that fixes it without breaking the tour feature |
11:11:19 | * | pbb joined #nim |
11:19:28 | * | Lord_Nightmare quit (Remote host closed the connection) |
11:21:47 | FromGitter | <bung87> that's cool, close the issue. |
11:23:06 | * | Lord_Nightmare joined #nim |
11:26:31 | * | solitudesf quit (Remote host closed the connection) |
11:28:17 | * | solitudesf joined #nim |
11:30:08 | * | muffindrake quit (Quit: muffindrake) |
11:32:10 | Araq | Zevv, would it help to write the transformation in the compiler and not as a macro? |
11:40:57 | Zoom[m] | Hey guys, I see Araq's here, so I gotta vent. I was super excited about nimconf and enjoyed everything, but there's a common theme between most of the presentations. It's poor sound quality. It affect information retention a lot. Araq has especially reverberant room and the distance to the mic was too big. |
11:41:23 | Zoom[m] | John Dupuy probably had the best sound, but there's room for improvement (there was some clipping) |
11:42:20 | Zoom[m] | treeform had some issues with gain staging and his video came out very quiet |
11:43:57 | Zoom[m] | A few of other videos had serious clipping distortion, which is super annoying, especially with headphones. |
11:44:36 | PMunch | Sorry, but not everyone in the Nim community has a sound-guy on hand |
11:44:42 | Zoom[m] | I mix music for a living, so would be glad to answer any questions you may have |
11:44:58 | PMunch | Or professional grade audio equipment lying around the house |
11:45:29 | PMunch | I thought mine was decent though, borrowed a nice Røde mic, but I think it was a bit too far from my mouth so the gain made it hiss slightly |
11:45:35 | Zoom[m] | PMunch: yours were rather on the good side. |
11:46:19 | Zoom[m] | However, you clipped a bit on sibilances and loud passages |
11:46:35 | Zoom[m] | There's absolutely no need for "professional" equipment |
11:47:25 | Zoom[m] | Understanding proper gain staging gets you at least 50% there |
11:47:33 | PMunch | That mic was a bit tricky, seemed to be tuned to sit very close to the mic and speak directly into it. And I like to move about as I speak |
11:47:35 | supakeen | It's really hard to get that sort of information to everyone. |
11:47:42 | supakeen | And to get everyone to actually set it up. |
11:47:51 | supakeen | As long as it's understandable I'm usually fine with it tbh. |
11:48:02 | PMunch | I'd love a quick explanation/tutorial on gain staging though |
11:49:19 | * | muffindrake joined #nim |
11:49:43 | PMunch | I agree that some of the talks had poor audio quality, but at the end of the day there's only so much you can do when everyone is just volunteering their time to talk about open source |
11:49:50 | Zoom[m] | supakeen: there should have been some organization prior to conference. Just pointing presenters to a short memo with basic instructions can help a lot |
11:49:52 | PMunch | You don't want to set the bar so high that no-one can be bothered |
11:50:15 | Zoom[m] | The thing is, it's not hard. |
11:50:24 | supakeen | Zoom[m]: For a small conference that's a big thing. |
11:50:52 | supakeen | For example, I'm a volunteer for EuroPython and we're doing about 40 hours of training speakers (including setting up their microphones). |
11:50:57 | supakeen | And that's ... not enough. |
11:51:00 | PMunch | If you write such a memo I'm sure that the team will be more than happy to distribute it before the next conference :) |
11:51:11 | Zevv | Zoom[m]: it's all good points, and I think there's lessons to be learned here. This is the first time something like this was organized, and it makes perfect sense. |
11:51:24 | Zoom[m] | So, basic points: |
11:54:51 | * | ofelas quit (Ping timeout: 272 seconds) |
11:56:17 | Zoom[m] | 1. Get a mic. They are incredibly cheap nowadays, esspecially used. Stay away from "computer microphones", those on long thin goosenecks. Surprisingly, dirt-cheap chinese crap can sound decent😀 "Neweer" and others similar can be bought for $20-$30, but if you can afford Audio Technica 2020usb or Rode NT-USB it's much better. |
11:57:01 | Zoom[m] | Lavalier mikes are an option, but they are usually flimsy, are harder to handle and set up properly |
12:03:01 | * | ofelas joined #nim |
12:03:37 | Zoom[m] | 2. Gain staging. The main things to understand: 1. there's no going back from clipping. 2. digital clipping is much worse than analogue one, so if you need to choose, clip your analogue gear, not your digital (mic input on your laptop). It's better to record quiet than loud: If you record the audio with 24 bits of dynamic range there will most probably be enough of information to get things louder during editing. However, if you |
12:03:38 | Zoom[m] | go too quiet (< -30dB) you will amplify noise while normalizing. |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:38 | * | supakeen joined #nim |
12:07:51 | Zoom[m] | So it's best to be in the sweet spot. Test your rig before recording: get in a position and say a few loud phrases, including lots of T's and S's and watching the meter. Try to set up the gain so the peak loudness is in -10 to -3 dB range. |
12:14:21 | * | abm quit (Read error: Connection reset by peer) |
12:15:15 | Zevv | Zoom[m]: I totally agree, this is something to work on for next time. Would you be willing to be available for questions if/when we do a next conf? |
12:15:30 | Zoom[m] | 3. If you can, learn a bit about compression. It will bring your sound up to that last 20%. It's not a hard concept to grasp but quite hard to get good at. So, the main advice: be gentle and don't over-do it. Favor gentle ratios (1.2 to 2) + low threshold. Use automatic gain make up if you're not sure. If you can chain a gentle compressor with a limiter which acts as a brickwall preventing clipping, you'll be golden. |
12:15:45 | Zevv | We can provide a basic howto with the do's and dont's and maybe you could be avaialable to people if they have questions? |
12:16:19 | Zoom[m] | Zevv: absolutely! You can reach me on matrix: @Zoom:matrix.org |
12:16:27 | Zevv | Noted! |
12:18:08 | * | bung quit (Ping timeout: 256 seconds) |
12:18:28 | PMunch | Yeah this would be great information to send out to people along before record their videos |
12:18:33 | Zoom[m] | Ah, one other thing: 4. Acoustics. There's no hiding from it. If you're in an empty room with plasterboard walls you will sound bad, even with close miking. At least get a book shelf near a wall behind your back. |
12:19:15 | Zoom[m] | Heavy curtains will help a bit. |
12:21:42 | * | bung joined #nim |
12:22:57 | Zoom[m] | Araq would have had better sound if he opened the door behind him. 😀 Being serious, he needed a mic that would be closer to him so it would not catch so many reflections. |
12:23:41 | Zevv | I have my little persian rug for that :) |
12:24:20 | Zoom[m] | Proper living rooms usually sound nicer than coding dungeons |
12:25:03 | Araq | you really want this door to stay closed :P |
12:25:14 | Zevv | That's where the skeletons go |
12:25:29 | FromDiscord | <mratsim> :D, this reminds me of kids of politicians and journalists intruding in streams |
12:25:54 | * | bung quit (Ping timeout: 240 seconds) |
12:26:29 | Zoom[m] | mratsim To get all the way: if anyone needs mixing/editing for their music/games/YT content, visit https://thirdhemisphere.studio and book me 😛 |
12:27:06 | FromDiscord | <mratsim> The main issue, is that it already takes a lot to choose a topic, prepare slides and such. Plus for myself, I was recording on a laptop and my CPU was revving like an engine. I had to put a sound filter in software to ensure it was not audible. |
12:27:58 | Zoom[m] | mratsim: these filters rarely make things better, unfortunately. Especially if you don't have much experience tweaking them |
12:28:31 | FromDiscord | <mratsim> It was not hard there, I had a permanent more than buzz |
12:30:03 | Zoom[m] | Human ears are exceptionally good at filtering speech from noise, but not so great at processing speech ridden with filter artifacts. |
12:30:23 | alehander92_ | does this apply to streaming |
12:30:57 | alehander92_ | i feel sometimes a bit of imperfection can be ok, reminding of a more "raw/lo-fi" atmosphere |
12:31:30 | Zoom[m] | alehander92_: of course, but with streaming you have to be a bit more attentive and test your setup more beforehand, since you won't have the luxury of digitally processing recorded audio. |
12:33:10 | Zoom[m] | echo suppressing filters in current video conferencing software, for example, getting much better, but still it's nowhere near the quality of someone recording with their loudspeakers off (monitoring sound with headphones) |
12:33:28 | * | Senny joined #nim |
12:34:02 | FromDiscord | <Zed> What's the worst thing someone has ever recorded that you have heard? |
12:34:46 | Zoom[m] | Zed, You mean conceptually, or quality-wise? |
12:34:52 | FromDiscord | <Zed> both |
12:40:18 | Zoom[m] | Good question. In terms of quality, it's easy. If it's really bad, as in "I don't know what I'm doing" situation, it's bad all the same. Hard clipping, fan noise louder than speech, people singing in the wring end of the mic. Most of the time people who have these problems don't have an understanding of what they could get in the end with such source material, so either they are completely oblivious to the fact that the end |
12:40:18 | Zoom[m] | result after my work is still crappy (you can polish a turd only so hard), or they get furious in their delusions of grandeur and this is a point when I say "thanks, bye". |
12:40:23 | FromDiscord | <Synth> Hello, sorry for asking a noobish question again. How can I get the OS the binary is being ran on? Please ping me. Thank you! |
12:42:47 | Zoom[m] | Conceptually, some people just have poor taste. Dunning-Kruger all the way. It's usually heavy-handedness and inability to let any bit of control out of their hands, so they butcher the audio before passing it to sound engineers. |
12:43:14 | Zoom[m] | Sorry for hijacking the chat for a bit. Hope I can help. |
12:43:59 | Zoom[m] | Oh, and the situation with audio in Nim looks rather bleak, at least judging from Curated Packages page. |
12:44:02 | FromDiscord | <mratsim> @Synth, your binary is OS dependent |
12:44:48 | Zoom[m] | We need at least wrappers for VST. |
12:44:49 | FromDiscord | <mratsim> The new audio macro library that vitreo12 presented during the talk looks quite nice |
12:45:28 | FromDiscord | <Synth> @mratsim So there is no way to see what OS the host is? |
12:45:28 | Zoom[m] | I'm interested in how far it can go with Nim being a GC. Ironically, this is the talk I didn't yet see. |
12:46:06 | FromDiscord | <mratsim> He doesn't use the GC, everything is preallocated before latency sensitive operation, and free'd after |
12:46:08 | FromDiscord | <Technisha Circuit> @Synth there is |
12:46:12 | FromDiscord | <Technisha Circuit> But idk how |
12:46:14 | FromDiscord | <Technisha Circuit> Wait |
12:46:41 | FromDiscord | <mratsim> @Synth, you probably can use the same theniques as in C, usually those libraries try to cat /proc/cpuinfo, call /uname, etc |
12:47:02 | FromDiscord | <mratsim> but the easiest way is to store an OS enum at compile-time |
12:47:17 | FromDiscord | <mratsim> when defined(windows): const RunningOn = Windows |
12:48:13 | FromDiscord | <mratsim> Also @zoom I've been using Nim with plenty of stuff that are incompatible with the GC: GPUs, implementing a multithreading runtime, high-performance computing, interpreters, cryptography |
12:48:19 | FromDiscord | <Synth> Ohh alright, thank you |
12:48:36 | FromDiscord | <mratsim> it's not a problem, if you don't use a ref type or seq or strings, you will have no GC |
12:48:48 | FromDiscord | <mratsim> and with destructors, only ref types are left |
12:51:10 | Zoom[m] | Yeah, this is understandable and I think there's a lot of potential in the language for proper sound processing. I just think having a GC is one of the reasons Nim has some room in audio libs: it's not the first choice for the interested devs. |
12:53:26 | FromDiscord | <Clyybber> We have a new memory management strategy thats not really a GC |
12:53:30 | FromDiscord | <Clyybber> but reference counting |
12:53:32 | FromDiscord | <Technisha Circuit> @Synth so when compiling do `-d:windows` when compiling for windiws |
12:53:36 | FromDiscord | <Technisha Circuit> Windows* |
12:53:37 | FromDiscord | <Clyybber> with an optional cycle collector |
12:53:50 | FromDiscord | <Clyybber> but its deterministic |
12:53:59 | Araq | er |
12:53:59 | FromDiscord | <Technisha Circuit> Including what Mratsim said :p |
12:54:36 | FromDiscord | <Synth> > @Synth so when compiling do `-d:windows` when compiling for windiws↵I'm still confused on how to detect the OS... |
12:55:07 | Araq | refcounting plus cycle collector is a GC, it just happens to be an implementation of GC that has a different performance profile |
12:55:34 | FromDiscord | <Technisha Circuit> @Synth I'll help you |
12:55:37 | FromDiscord | <mratsim> unfortunately GC has been overloaded with Java, just like OOP |
12:55:38 | FromDiscord | <Technisha Circuit> Go to DMs :P |
12:55:46 | FromDiscord | <Synth> Thanks! |
12:57:26 | Zoom[m] | Again, I completely understand, that if you have a deterministic latency, you're all set. But most people in audio don't dig much and stay away from any GC. |
12:57:30 | FromDiscord | <Clyybber> Araq: Yeah, I was referring to arc when I said no GC |
12:57:49 | FromDiscord | <Daylight> ello |
12:57:52 | FromDiscord | <Clyybber> Zoom: Which makes sense, because you won't find many linked lists in audio |
12:58:12 | * | bung joined #nim |
13:00:58 | FromDiscord | <Clyybber> @Daylight hi |
13:02:03 | Araq | we need to find words that make sense. "deterministic" memory management isn't it as destruction of a deeply nested structure is an "unbound" pause. But that too is completely bogus. |
13:03:01 | FromDiscord | <Daylight> Is it possible to use Visual studio code for Nim? |
13:03:03 | FromDiscord | <mratsim> memory reclamation is fine |
13:03:31 | FromDiscord | <mratsim> @Daylight yes |
13:04:07 | Araq | maybe it's "scope based memory management" |
13:05:57 | FromDiscord | <Daylight> ok |
13:06:23 | FromDiscord | <mratsim> I'll let you figure out naming, this is something too hard for me |
13:06:52 | * | bung quit (Ping timeout: 256 seconds) |
13:08:01 | * | Vladar joined #nim |
13:10:05 | FromDiscord | <Clyybber> Araq: Any idea how https://github.com/nim-lang/Nim/issues/14844 could happen? |
13:10:07 | disbot | ➥ for loop in template does an extra round depending on call syntax ; snippet at 12https://play.nim-lang.org/#ix=2qtK |
13:10:17 | Araq | maybe it's local vs global. you can write a subsystem, analyze the performance profile and other subsystems don't interfere. |
13:10:22 | FromDiscord | <Clyybber> Maybe its the fact that UFCS forces the first arg to get semmed? |
13:12:53 | FromDiscord | <Daylight> confused on making a bot with nim |
13:12:57 | FromGitter | <deech> Does the `cpp` backend provide a way of generating a class that extends a C++ class but overrides some of the methods with Nim `proc`s? |
13:14:58 | Araq | deech: unfortunately not, but '.emit' worked for me when it came up |
13:15:51 | FromDiscord | <Clyybber> Araq: Does it deserve the showstopper label? |
13:16:51 | Araq | Clyybber: yes to the showstopper label |
13:16:54 | FromDiscord | <mratsim> @deech, there might be a hidden gem here : https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim |
13:17:07 | Araq | apart from that I'm as clueless as you are |
13:17:40 | Araq | I wouldn't trust the git bisecting though |
13:17:47 | FromDiscord | <Clyybber> yeah, its not the root cause |
13:18:03 | FromDiscord | <Clyybber> the root cause is that the two `i`'s are the same sym |
13:18:05 | FromGitter | <deech> mratsim: wow |
13:18:06 | FromDiscord | <Clyybber> somehow |
13:31:53 | FromDiscord | <Technisha Circuit> @Daylight use Dimscord for a discord bot with Nim |
13:32:00 | FromDiscord | <Technisha Circuit> Because DiscordNim is broken |
13:37:01 | * | Kaivo joined #nim |
13:39:18 | * | muffindrake quit (Quit: muffindrake) |
13:39:30 | FromDiscord | <Daylight> lol |
13:39:40 | FromDiscord | <Daylight> Alright |
13:39:44 | FromDiscord | <Daylight> will do @Technisha Circuit |
13:39:59 | FromDiscord | <Daylight> prob add it in a few days or smth |
13:40:07 | * | rockcavera joined #nim |
13:41:42 | FromDiscord | <Technisha Circuit> K |
13:46:09 | * | k0mpjut0r quit (Quit: killed) |
13:46:10 | * | unclechu quit (Quit: killed) |
13:46:10 | * | lnxw37d4 quit (Quit: killed) |
13:46:10 | * | neceve quit (Quit: killed) |
13:46:10 | * | sendell quit (Quit: killed) |
13:46:10 | * | salotz[m] quit (Quit: killed) |
13:46:13 | * | planetis[m] quit (Quit: killed) |
13:46:18 | * | oneark quit (Quit: killed) |
13:46:18 | * | codic quit (Quit: killed) |
13:46:18 | * | BitPuffin quit (Quit: killed) |
13:46:18 | * | MTRNord[m] quit (Quit: killed) |
13:46:23 | * | Zoom[m] quit (Quit: killed) |
13:46:24 | * | dzamo[m] quit (Quit: killed) |
13:46:24 | * | watzon quit (Quit: killed) |
13:46:33 | * | skrylar[m] quit (Quit: killed) |
13:46:33 | * | ee7[m] quit (Quit: killed) |
13:46:33 | * | GitterIntegratio quit (Quit: killed) |
13:46:41 | * | xicheng[m] quit (Quit: killed) |
13:47:28 | * | audiophile joined #nim |
13:54:26 | FromDiscord | <Daylight> how do i uninstall a module? |
13:54:57 | * | lritter joined #nim |
13:56:24 | * | muffindrake joined #nim |
14:02:27 | PMunch | It's a manual process.. |
14:02:36 | PMunch | IIRC |
14:03:29 | FromDiscord | <lqdev> uh |
14:03:31 | FromDiscord | <lqdev> nimble remove |
14:03:33 | FromDiscord | <lqdev> works |
14:07:29 | FromDiscord | <Daylight> ok |
14:07:56 | PMunch | Oh, it does? Sorry |
14:08:22 | Zevv | PMunch: amateur! |
14:08:32 | PMunch | Haha, I seldom remove packages :P |
14:08:48 | Zevv | I do rm -rf ~/.nimble every few weeks, and reinstall everything I need |
14:08:55 | * | lnxw37d4 joined #nim |
14:09:09 | PMunch | Started working on a JSON output for the RST docs by the way, jsonrst branch on my Nim fork if anyone is interested (doesn't work atm) |
14:09:20 | PMunch | Zevv, oh yeah I've done that in the past |
14:09:31 | PMunch | People are just too bad at labeling releases.. |
14:09:47 | PMunch | And I tend to hack in fixes in packages from time to time.. |
14:10:01 | PMunch | Oh well |
14:10:02 | PMunch | Time to go |
14:10:03 | * | PMunch quit (Quit: Leaving) |
14:11:32 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
14:12:46 | * | pbb joined #nim |
14:21:19 | * | dddddd joined #nim |
14:26:01 | * | Senny quit (Ping timeout: 264 seconds) |
14:31:58 | FromGitter | <ynfle> How do I implement my own hash function for use with Tables? The hash type doesn't seem to work |
14:32:24 | * | endragor quit (Remote host closed the connection) |
14:32:59 | * | endragor joined #nim |
14:34:10 | FromDiscord | <Daylight> wonder how to get env data |
14:34:49 | FromGitter | <ynfle> NVM |
14:35:56 | FromGitter | <ynfle> https://nim-lang.org/docs/os.html#getEnv%2Cstring%2Cstring @Daylight is this what you're looking for? |
14:36:50 | * | waleee-cl joined #nim |
14:37:03 | * | opal quit (Ping timeout: 240 seconds) |
14:37:07 | * | endragor quit (Ping timeout: 240 seconds) |
14:39:59 | * | opal joined #nim |
14:43:35 | * | maier joined #nim |
14:44:47 | * | maier quit (Client Quit) |
14:45:14 | * | GitterIntegratio joined #nim |
14:45:14 | * | BitPuffin joined #nim |
14:45:14 | * | MTRNord[m] joined #nim |
14:45:14 | * | unclechu joined #nim |
14:45:14 | * | sendell joined #nim |
14:45:14 | * | neceve joined #nim |
14:45:14 | * | nerdrat[m] joined #nim |
14:45:14 | * | codic joined #nim |
14:45:14 | * | salotz[m] joined #nim |
14:45:14 | * | watzon joined #nim |
14:45:14 | * | planetis[m] joined #nim |
14:45:15 | * | k0mpjut0r joined #nim |
14:45:15 | * | dzamo[m] joined #nim |
14:45:15 | * | oneark joined #nim |
14:45:21 | * | skrylar[m] joined #nim |
14:45:21 | * | xicheng[m] joined #nim |
14:45:22 | * | ee7[m] joined #nim |
14:45:22 | * | Zoom[m] joined #nim |
14:46:48 | * | bung joined #nim |
14:51:49 | * | bung quit (Ping timeout: 264 seconds) |
15:03:41 | FromDiscord | <Shucks> https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import does this support wildcards aswell? like "mylib-v*.dll" |
15:04:38 | * | endragor joined #nim |
15:07:26 | FromDiscord | <Shucks> nvm, answer is there. |
15:13:17 | * | marnix quit (Ping timeout: 258 seconds) |
15:21:13 | * | drewr quit (Remote host closed the connection) |
15:23:27 | FromDiscord | <ikrima> Is there some guidance on how to best interop from C/C++ <> nim, where the expectation is that the main app is in C/C++ and calling into nim routines? ↵I've scoured the docs/tutorials, but they mostly discuss nim calling into C/C++ |
15:24:10 | * | drewr joined #nim |
15:25:15 | FromDiscord | <ikrima> some questions for example:↵Should I define my structs in C headers vs. Nim? (these structs will need to be accessed from other parts of the app)↵Is generating a clean struct header from Nim deprecated (manual says yes but I see a git commit saying no)↵etc |
15:28:33 | Araq | there are lots of opinions I think. |
15:28:34 | FromDiscord | <mratsim> I pass nim proc to C here to write .mp4 files: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/io/mp4.nim |
15:28:56 | Araq | I would write the C header and ensure c2nim can always process it |
15:29:24 | Araq | and compile the Nim code with --gc:arc --noMain |
15:32:56 | FromDiscord | <ikrima> gotcha; would it be a BadIdea ™ to just directly link the generated nim code and skip the compilation? (i'd rather avoid creating a dll just for the nimcode) |
15:34:21 | FromDiscord | <Zachary Carter> @ikrima - I'm doing this... I haven't built any executable but I am compiling my Nim code to a shared library and invoking it from C |
15:35:03 | FromDiscord | <Zachary Carter> but to do the former you'd want to compile your code to C and not link it to an executable I imagine. When you build your C/C++ program you'd link to the C code the Nim compiler spit out |
15:35:12 | Araq | ikrima: I personally avoid DLLs |
15:35:14 | FromDiscord | <Zachary Carter> or CPP - whatever your preference is |
15:35:35 | FromDiscord | <Zachary Carter> well I'm only compiling to a DLL for development purposes - to use hot code reloading |
15:35:42 | FromDiscord | <Zachary Carter> for release builds I would compile to a static library |
15:35:57 | Araq | I think the hardest part is to setup your build system and for that Nim has a surprise |
15:36:23 | Araq | inside nimcache/ there is a project.json file describing the build's needs |
15:36:57 | Araq | I don't know how many people know this and if e.g. CMake has a plugin for it |
15:37:10 | * | jeko quit (Quit: Leaving) |
15:38:38 | FromDiscord | <ikrima> ah, i didn't realize I could get nim to generate a static c lib directly |
15:39:08 | Araq | meh |
15:39:10 | FromDiscord | <ikrima> thanks guys! have enough to keep hacking a solution |
15:39:20 | Araq | fwiw I don't use static libs either |
15:39:34 | FromDiscord | <ikrima> oh, i misunderstood then? |
15:39:45 | FromDiscord | <ikrima> > ikrima: I personally avoid DLLs↵↵what do you do then? |
15:39:54 | Araq | I would take the set of produced .c / cpp files and make it part of your build |
15:40:32 | FromDiscord | <ikrima> ah gotcha; even better. I misread as that being a discommend. thanks for the clarification |
15:45:48 | disruptek | either you distribute binaries or you distribute source. it seems obvious that if you distribute source, you want it to be as complete and reproducible as possible. if you can only reproduce your wrapper "by hand", then that's fine, but don't expect any nim programmers to want to hack at it. |
15:46:59 | * | audiophile quit (Quit: Default Quit Message) |
15:47:40 | disruptek | i distribute nimph in source form, but it's a PITA to build for many people. have i gotten many PRs? no. so why do i bother distributing source that is so hard to compile? good fucking question. |
15:47:50 | * | endragor quit (Remote host closed the connection) |
15:48:31 | * | endragor joined #nim |
15:50:46 | disruptek | just another of the unpopular opinions, i guess. |
15:51:40 | * | NimBot joined #nim |
15:53:28 | * | endragor quit (Ping timeout: 256 seconds) |
15:56:58 | Araq | I'd use nimph once I need it |
15:57:21 | Araq | currently I don't have a need for a PM |
15:58:00 | disruptek | we should all aspire to this. |
15:58:10 | Araq | I do use "bump" though and I love it |
15:58:16 | Araq | and I could build it too |
15:58:19 | disruptek | for what? |
15:58:48 | Araq | every time I have to touch one of my Nimble packages |
15:59:02 | Araq | I use bump to change the version |
15:59:05 | disruptek | well, bump is another animal that should not exist. |
15:59:36 | disruptek | it's like if there was a parasite that only eats the grey matter of republicans. |
15:59:40 | disruptek | oh wait. |
16:00:43 | FromGitter | <alehander92> this is europe, disruptek |
16:00:54 | FromGitter | <alehander92> we talk about the weather here |
16:01:04 | disruptek | the weather sucks. |
16:01:39 | disruptek | an ill wind bloweth. |
16:01:41 | FromDiscord | <Varriount> @Araq You'll love this: I'm encountering some difficulty in automating something for work because of *nix's love of extensionless files. |
16:01:59 | FromGitter | <alehander92> is this shakespeare |
16:02:12 | FromGitter | <alehander92> genuinely sounds like literature |
16:02:22 | disruptek | well, it genuinely is. |
16:02:44 | FromDiscord | <Varriount> Araq: By `bump`, you mean the Python utility? |
16:03:16 | FromGitter | <alehander92> some english proverb |
16:03:23 | disruptek | dude. |
16:03:30 | disruptek | it is /literally/ shakespeare. |
16:03:35 | FromGitter | <alehander92> we have a "the horse when to the river" |
16:03:39 | FromGitter | <alehander92> went* |
16:03:56 | FromGitter | <alehander92> well maybe shakespeare used a proverb |
16:04:11 | disruptek | well, ol' bill may not have invented it, but it /is/ in one of his plays. |
16:04:34 | FromGitter | <alehander92> its john heywood |
16:04:51 | FromGitter | <alehander92> radiohead has a song |
16:05:26 | FromGitter | <alehander92> sorry for offtopic: time to do-do-do-do-do |
16:05:42 | disruptek | https://en.wikipedia.org/wiki/John_Heywood#Famous_epigrams |
16:06:24 | disruptek | he spent all of 1546 trying to come up with cool shit to say to people. |
16:06:38 | disruptek | now 500 years later we are still parroting this schlock. |
16:06:47 | disruptek | a man could do worse in life. |
16:07:08 | disruptek | i'm gonna give up nim and just it around writing down stupid shit to say. |
16:09:36 | * | bung joined #nim |
16:09:47 | disruptek | actually, i do want to rewrite some of my nim project READMEs. this is stuff that might be a first introduction to the language. i want to exploit that better. i'm thinking of sharing nim koans, here. |
16:11:46 | FromGitter | <ynfle> What needs to be implemented to use my own type with `Table` |
16:12:05 | FromGitter | <ynfle> (With my type as the key?) |
16:12:09 | disruptek | hash(x: MyType): Hash |
16:12:13 | FromGitter | <ynfle> I implemented has |
16:12:16 | FromGitter | <ynfle> *hash |
16:12:30 | FromGitter | <alehander92> hmm |
16:12:31 | disruptek | `==`() |
16:12:35 | FromGitter | <alehander92> still i prefer Proverbs |
16:12:55 | FromGitter | <alehander92> backquote == |
16:17:24 | narimiran | @ynfle can you show us a short snippet of your implementation? |
16:17:50 | narimiran | use https://play.nim-lang.org/ so we can run/inspect it immediately |
16:24:23 | FromGitter | <ynfle> https://play.nim-lang.org/#ix=2quv |
16:24:34 | FromGitter | <ynfle> Thanks in advance |
16:24:38 | Araq | Varriount: I don't "enjoy" broken operating systems, far from it |
16:26:26 | * | audiophile_ joined #nim |
16:27:24 | Zevv | cmon, we know you dig that |
16:29:51 | FromGitter | <ynfle> The issue comes down to specifying that I want to use `string`'s `==` in my `proc` when my type isn't a `distinct string` but just `string` |
16:30:06 | narimiran | @ynfle do you know about `cmpIgnoreStyle` (https://nim-lang.github.io/Nim/strutils.html#cmpIgnoreStyle%2Cstring%2Cstring)? it looks like you're trying to invent it |
16:30:13 | FromGitter | <ynfle> So it just blows up recursively |
16:30:51 | narimiran | if you do `proc `==`(a, b: NormalizedIdent): bool = cmpIgnoreStyle(a, b) == 0` it seems to be ok |
16:31:00 | * | audiophile joined #nim |
16:31:01 | FromGitter | <ynfle> But I still `"Hello" != "hello"` & `"hello" == "heLLo"` |
16:31:29 | narimiran | this works: https://play.nim-lang.org/#ix=2quz |
16:32:25 | FromGitter | <ynfle> @narimiran Thx!!! |
16:34:37 | * | audiophile_ quit (Ping timeout: 246 seconds) |
16:35:23 | * | sagax quit (Ping timeout: 260 seconds) |
16:37:10 | FromGitter | <ynfle> @narimiran, interesting that `"Hello".NormalizedIdent == "hello".NormalizedIdent` but `"Hello".NormalizedIdent.hash != "hello".NormalizedIdent.hash` and they still ocupy different spots in the table |
16:38:25 | narimiran | is it because of your hash function? |
16:39:13 | narimiran | i.e. i'm not sure i understand your question |
16:39:16 | FromGitter | <ynfle> I want `"Hello".NormalizedIdent` & `"hello".NormalizedIdent`to occupy different spots in the Table |
16:39:33 | FromGitter | <ynfle> So their hashes aren'y the same |
16:39:35 | narimiran | hases are different and they occupy different spots in the *hash* table |
16:39:38 | FromGitter | <ynfle> *aren't |
16:40:08 | FromGitter | <ynfle> So why do I need `==` if they're hashes are different |
16:45:08 | narimiran | because manual says so :P https://nim-lang.github.io/Nim/tables.html#basic-usage-hashing |
16:49:39 | * | bung quit (Ping timeout: 265 seconds) |
16:50:24 | * | bung joined #nim |
16:50:28 | FromGitter | <ynfle> Ya but `==` and `hash` don't match up |
16:52:40 | FromGitter | <ynfle> > @narimiran, interesting that `"Hello".NormalizedIdent == "hello".NormalizedIdent` but `"Hello".NormalizedIdent.hash != "hello".NormalizedIdent.hash` and they still ocupy different spots in the table ⏎ ⏎ ^^ |
16:54:13 | * | PMunch joined #nim |
16:55:15 | * | bung quit (Ping timeout: 256 seconds) |
16:58:30 | * | salotz[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
17:06:10 | FromDiscord | <mratsim> H != h |
17:06:22 | FromGitter | <ynfle> I know |
17:06:28 | FromDiscord | <mratsim> a hash is case-sensitive |
17:06:29 | FromGitter | <ynfle> Look at my hash function |
17:06:44 | FromGitter | <ynfle> > https://play.nim-lang.org/#ix=2quv ⏎ ⏎ ^^ |
17:07:05 | FromDiscord | <mratsim> ah yes, Nim handles collision |
17:07:21 | FromDiscord | <mratsim> the hash is just to select a bucket but you can have multiple elements in the same bucket |
17:07:49 | FromDiscord | <mratsim> I had the same issue yesterday, and it comes up with ref objects as well |
17:09:13 | FromDiscord | <mratsim> I just hash whatever is the unique identifier, instead of hashing the object (for example here, instead of hashing an operant, I hash operandDesc): https://github.com/mratsim/constantine/blob/assembly-backend/constantine/primitives/macro_assembler_x86.nim#L29-L57 |
17:13:45 | * | opDispatch quit (Remote host closed the connection) |
17:14:08 | * | opDispatch joined #nim |
17:23:47 | * | bung joined #nim |
17:27:02 | * | nerdrat[m] quit (Quit: Idle for 30+ days) |
17:27:54 | * | bung quit (Ping timeout: 240 seconds) |
17:44:35 | FromDiscord | <Shucks> So if im trying to compile a binary with `nim cpp` the binaries doesnt run because of `https://stackoverflow.com/questions/46728353/mingw-w64-whats-the-purpose-of-libgcc-s-seh-dll` |
17:44:57 | FromDiscord | <Shucks> How would I static link them? I've tried `{.passC: "-static-libgcc -static-libstdc++".}` |
17:54:21 | * | audiophile is now known as BlameTheRoomba |
17:54:57 | * | ofelas quit (Ping timeout: 260 seconds) |
17:55:23 | leorize | pass them via passL |
17:55:40 | leorize | passC only use them during compilation |
17:55:49 | leorize | passL is what you want |
18:03:40 | * | bung joined #nim |
18:03:42 | * | ofelas joined #nim |
18:04:49 | FromDiscord | <Shucks> oh |
18:07:33 | * | abm joined #nim |
18:07:36 | * | nsf quit (Quit: WeeChat 2.8) |
18:08:20 | * | bung quit (Ping timeout: 256 seconds) |
18:09:33 | * | bung joined #nim |
18:14:10 | * | bung quit (Ping timeout: 260 seconds) |
18:16:55 | * | natrys joined #nim |
18:17:02 | FromDiscord | <codic> How do I get each execShellCmd to run in the same shell as the previous one to preserve env vars? |
18:17:40 | * | bung joined #nim |
18:18:40 | PMunch | @codic: https://nim-lang.org/docs/osproc.html#execProcess,string,string,openArray[string],StringTableRef,set[ProcessOption] |
18:19:14 | FromDiscord | <codic> that link takes me to the top of osproc |
18:19:24 | FromDiscord | <codic> Could you give a quick example? |
18:19:37 | FromDiscord | <codic> Also, I want to execute a *shell* command, not a process directory |
18:19:55 | PMunch | What you're looking for is execProcess |
18:20:24 | PMunch | Define "shell command" |
18:28:01 | * | bung quit (Ping timeout: 258 seconds) |
18:30:29 | * | bung joined #nim |
18:32:58 | FromDiscord | <Doongjohn> How can I cast ref object to normal object?↵ex:↵var a: ref Exception = someErr↵var b: Exception = a # <- How? |
18:33:40 | FromDiscord | <lqdev> `a[]` |
18:34:02 | FromDiscord | <lqdev> the word you're looking for is 'dereference' |
18:34:24 | FromDiscord | <Doongjohn> oh thank you! |
18:36:15 | * | tane joined #nim |
18:37:30 | * | bung quit (Ping timeout: 260 seconds) |
18:38:25 | * | bung joined #nim |
18:42:47 | * | bung quit (Ping timeout: 260 seconds) |
18:43:27 | * | bung joined #nim |
18:47:34 | * | bung quit (Ping timeout: 240 seconds) |
18:51:45 | * | bung joined #nim |
18:56:23 | * | bung quit (Ping timeout: 258 seconds) |
18:57:41 | disruptek | i guess i'm not convinced that #14844 is misbehavior, outside the for-vars being broken at toplevel scope. |
18:57:41 | disbot | https://github.com/nim-lang/Nim/issues/14844 -- 3Illegal symbol reuse with template depending on call syntax ; snippet at 12https://play.nim-lang.org/#ix=2qtK |
18:58:50 | * | sagax joined #nim |
18:59:11 | FromDiscord | <Clyybber> disruptek ??? |
18:59:18 | FromDiscord | <Clyybber> disruptek: Clearly its a bug |
18:59:36 | FromDiscord | <Clyybber> The `i`'s are getting mixed up |
18:59:43 | FromDiscord | <Clyybber> But only with the method call syntax |
18:59:43 | * | bung joined #nim |
18:59:54 | FromDiscord | <Clyybber> And I think I found the root cause |
18:59:56 | disruptek | why are you on discord or gitter? |
19:00:07 | FromDiscord | <Clyybber> ¯\_(ツ)_/¯ |
19:00:13 | FromDiscord | <Clyybber> no particular reason |
19:00:18 | FromDiscord | <Clyybber> convinience |
19:00:19 | FromDiscord | <Clyybber> maybe |
19:02:37 | disruptek | so you're saying it's a bug that the method-call behavior isn't more pervasive. 😉 |
19:03:51 | FromDiscord | <Clyybber> you mean that it isn't tested enough? |
19:05:22 | disruptek | no, i mean that this is the behavior we should expect when we /don't/ use method-call syntax. |
19:05:44 | FromDiscord | <Clyybber> the behaviour without the method-call syntax is correct yeah |
19:05:57 | disruptek | well, again, i'm not sure i agree. |
19:06:52 | FromDiscord | <Clyybber> why though? |
19:07:04 | FromDiscord | <Clyybber> how can one possibly justify that behaviour as correct? |
19:07:15 | * | PMunch quit (Quit: leaving) |
19:07:25 | * | bung quit (Ping timeout: 264 seconds) |
19:07:58 | disruptek | don't make me unmute discord. |
19:08:40 | disruptek | it's templates being templates. i'm not sure why you expect different. |
19:09:02 | FromDiscord | <Clyybber> ugh, don't be stupid |
19:09:27 | disruptek | sure. |
19:09:55 | * | bung joined #nim |
19:10:51 | FromDiscord | <Clyybber> generating invalid C code just because templates is always a bug |
19:11:24 | disruptek | i think it should compile but yield the same result. |
19:11:26 | FromDiscord | <Clyybber> and as I'm currently investigating it, I can assure you its 100% a bug |
19:11:27 | disruptek | is that better? |
19:11:32 | FromDiscord | <Clyybber> disruptek: Yeah |
19:11:42 | disruptek | okay, then we agree. |
19:12:35 | FromDiscord | <Clyybber> wait, which part do you mean? |
19:12:54 | FromDiscord | <Clyybber> do you mean the behaviour with non-method-call syntax should behave like the method-call-syntax one? |
19:13:26 | disruptek | yes. |
19:13:37 | FromDiscord | <Clyybber> then we *definitely* don't agree |
19:13:40 | disruptek | look, let me ask you this. |
19:13:47 | disruptek | do you think the assertion should fail? |
19:14:25 | disruptek | it's not a trick question. |
19:14:31 | * | bung quit (Ping timeout: 260 seconds) |
19:19:06 | * | bung joined #nim |
19:21:23 | disruptek | sorry, what did i miss? |
19:21:39 | disruptek | i was cleaning a toilet. it's something i like to give my undivided attention. |
19:22:06 | FromGitter | <iffy> What would be required to do the TODO mentioned here? https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/asyncfutures.nim#L426 Save the stack trace (string?) to a variable, then reference it within the callback? |
19:23:19 | * | bung quit (Ping timeout: 246 seconds) |
19:24:01 | * | bung joined #nim |
19:24:59 | disruptek | the radiusing in github is driving me crazy. |
19:25:23 | FromGitter | <iffy> radiusing? |
19:26:39 | disruptek | radiusing, son! |
19:27:13 | FromDiscord | <Doongjohn> why does this not work? https://play.nim-lang.org/#ix=2qvu |
19:27:36 | disruptek | !last clyybber |
19:27:37 | disbot | clyybber spoke in 12#nim 13 minutes ago 12https://irclogs.nim-lang.org/29-06-2020.html#19:13:37 |
19:27:43 | disruptek | jesus. |
19:28:14 | * | bung quit (Ping timeout: 240 seconds) |
19:29:20 | * | bung joined #nim |
19:31:53 | acidx | zz |
19:31:57 | acidx | er. sorry. |
19:32:06 | disruptek | i was so close. |
19:33:33 | FromDiscord | <lqdev> @Doongjohn seems like the compiler wasn't able to infer the types correctly in this case. try using the usual `proc (s: string)` syntax instead of `sugar.->` and `sugar.=>` |
19:34:20 | FromDiscord | <lqdev> for some reason I've never been able to use these without the compiler erroring out. |
19:35:12 | FromDiscord | <Doongjohn> ok.. it's kinda weird |
19:36:06 | * | bung quit (Ping timeout: 256 seconds) |
19:36:18 | FromDiscord | <Clyybber> oh, disruptek: No I don't think it should fail |
19:36:28 | FromDiscord | <Clyybber> I was making food |
19:36:36 | disruptek | hmm, interesting. |
19:37:17 | disruptek | you are aware of the for-var-at-toplevel bug, right? |
19:37:40 | FromDiscord | <Clyybber> yeah, but its not related |
19:37:43 | FromDiscord | <Shucks> First time im trying to code a wrapper for a small c++ library, so excuse me if im doing something stupid. It's a dll injecting library. The imported function just returns an error code which says `process id is 0` https://play.nim-lang.org/#ix=2qvC |
19:37:59 | disruptek | okay, so you think the template should be evaluated once? |
19:38:01 | FromDiscord | <Clyybber> disruptek: You can confirm it by putting the both in expandMacros: |
19:38:04 | FromDiscord | <Clyybber> No |
19:38:10 | FromDiscord | <Clyybber> It should be evaluated twice |
19:38:19 | disruptek | you think the scope should be limited to the invocation? |
19:38:27 | FromDiscord | <Clyybber> No |
19:38:34 | FromDiscord | <Clyybber> But the `i` should be different |
19:38:45 | disruptek | same scope, different i? |
19:38:51 | disruptek | psym != psym? |
19:38:59 | FromDiscord | <Clyybber> heh, no |
19:39:13 | * | marnix joined #nim |
19:39:23 | FromDiscord | <Clyybber> maybe I misunderstood what you said about scopes |
19:39:32 | FromDiscord | <Clyybber> but the `i` clearly shouldn't be the same |
19:39:35 | FromDiscord | <Clyybber> because its getting gensymmed |
19:39:59 | disruptek | but it technically /is/ the same. |
19:40:05 | FromDiscord | <Clyybber> no they are not |
19:40:07 | disruptek | it's symbol is used twice. |
19:40:11 | FromDiscord | <Clyybber> no |
19:40:14 | disruptek | its, too. |
19:40:18 | FromDiscord | <Clyybber> oh you mean in the template? |
19:40:22 | FromDiscord | <Clyybber> that doesn't matter |
19:40:22 | disruptek | yeah? |
19:40:27 | * | bung joined #nim |
19:40:38 | FromDiscord | <Clyybber> the bug is that the `i` is shared *across* templates |
19:40:44 | disruptek | i can't even remember where the code is that i have in my head. |
19:40:52 | FromDiscord | <Clyybber> (edit) 'templates' => 'the template invocations' |
19:40:56 | FromDiscord | <Clyybber> lol |
19:41:14 | disruptek | well, it's gensym'd and it's in the same scope. i dunno what you expect. |
19:41:21 | disruptek | to me, that's the behavior i expect. |
19:41:32 | * | Senny joined #nim |
19:41:39 | disruptek | it's literally the same code. that's the idea of templates. |
19:41:47 | FromDiscord | <Clyybber> no its not |
19:41:55 | FromDiscord | <Clyybber> symbols in templates get gensymmed |
19:42:00 | FromDiscord | <Clyybber> variables at least |
19:42:09 | disruptek | yes, but a template is not a generic. |
19:42:14 | disruptek | it's not a factory for making code. |
19:42:15 | FromDiscord | <Clyybber> no its not |
19:42:18 | FromDiscord | <Clyybber> it is |
19:42:19 | disruptek | it's a factory for substitution. |
19:42:34 | FromDiscord | <Clyybber> you are hung up in abstractions and terminology |
19:42:38 | disruptek | not really. |
19:42:39 | FromDiscord | <Clyybber> its a bug. |
19:42:44 | disruptek | templates are c-macros. |
19:42:51 | FromDiscord | <Clyybber> no they are not |
19:42:56 | FromDiscord | <Clyybber> C-macros are string based |
19:43:01 | FromDiscord | <Clyybber> templates are ast based |
19:43:02 | disruptek | semantically, they are. |
19:43:06 | FromDiscord | <Clyybber> no |
19:43:10 | FromGitter | <alehander92> lets |
19:43:13 | FromDiscord | <Clyybber> they are not the same |
19:43:15 | FromGitter | <alehander92> just hug each other |
19:43:28 | FromGitter | <alehander92> some days you just need ast-s and tokens |
19:43:29 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
19:43:34 | FromDiscord | <Clyybber> alehander92: We are hugging, we are whispering all this into each others ears |
19:43:40 | FromDiscord | <Clyybber> :D |
19:43:55 | FromGitter | <alehander92> ehh |
19:43:59 | FromGitter | <alehander92> ease it up a bit |
19:44:03 | disruptek | whisper me this, batman: |
19:44:07 | disruptek | how do they differ? |
19:44:31 | FromDiscord | <Clyybber> they differ because a symbol is unique per template instantiation |
19:44:39 | FromDiscord | <Clyybber> but in this case its not |
19:44:40 | disruptek | by what spec? |
19:44:41 | FromDiscord | <Clyybber> thats the whole bug |
19:44:47 | FromDiscord | <Clyybber> disruptek: By *the* spec |
19:45:06 | * | bung quit (Ping timeout: 265 seconds) |
19:45:11 | disruptek | let me play for a sec. |
19:45:56 | leorize | I got spolied by nim's template a bit too much that I wrote C macros expecting the same semantics :P |
19:46:11 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
19:46:15 | leorize | spoiler: they don't have the same semantics |
19:46:54 | disruptek | hygienic by default. |
19:47:02 | FromDiscord | <Clyybber> exactly |
19:48:18 | disruptek | so is your claim that it's an eval of the gensym issue? |
19:48:29 | alehander92_ | gensym |
19:48:38 | alehander92_ | i never rally understood that in details |
19:49:02 | disruptek | it does what it says on the tin. |
19:49:05 | leorize | it just generates a symbol with some random suffix to make it unique |
19:49:12 | * | leorize quit (Quit: WeeChat 2.8) |
19:49:20 | FromDiscord | <Clyybber> yeah, the `i` s should be unique |
19:49:25 | FromDiscord | <Clyybber> in this case they aren't but thats a bug |
19:49:31 | disruptek | i guess the debate is whether genym semantics are being used correctly in templates. |
19:49:43 | FromDiscord | <Clyybber> there is no debate |
19:49:46 | disruptek | lol |
19:49:51 | * | endragor joined #nim |
19:49:51 | FromDiscord | <Clyybber> :p |
19:50:31 | * | bung joined #nim |
19:51:03 | disruptek | two uses should yield two symbols; can we agree about that? |
19:51:11 | FromDiscord | <Clyybber> yeah, exactly |
19:51:19 | disruptek | so one use? one symbol, right? |
19:52:05 | disruptek | clyybber says no. |
19:52:16 | disruptek | clyybber says, one use, three symbols. |
19:52:23 | disruptek | or more. even more symbols. |
19:52:36 | disruptek | clyybber is a little nutty that way. |
19:52:43 | Yardanico | why? |
19:52:47 | FromDiscord | <Clyybber> lol, I didn't |
19:52:51 | FromDiscord | <Clyybber> say that |
19:53:05 | FromDiscord | <Clyybber> disruptek: See, there are two uses here |
19:53:15 | FromDiscord | <Clyybber> Because the last templates evaluates its arg twice |
19:53:24 | FromDiscord | <Clyybber> (edit) 'templates' => 'template' |
19:53:26 | disruptek | so when i'm in a template and i have an input param of `s`, that's a symbol that is evaluated when? |
19:53:44 | FromDiscord | <Clyybber> whenever you use it |
19:53:57 | disruptek | so (s, s) is two invocations. |
19:53:58 | FromDiscord | <Clyybber> if you use it twice it will get evaluated twice |
19:54:01 | FromDiscord | <Clyybber> yeah |
19:54:05 | disruptek | ergo, two symbols. |
19:54:45 | * | Senny quit (Ping timeout: 246 seconds) |
19:54:49 | * | bung quit (Ping timeout: 246 seconds) |
19:54:50 | * | endragor quit (Ping timeout: 246 seconds) |
19:54:59 | FromDiscord | <Clyybber> yeah |
19:55:06 | disruptek | okay, i'm fine with that. |
19:55:33 | Yardanico | disruptek: just so you know - that code snipped worked fine in 1.0.6 |
19:55:45 | disruptek | why is the ufcs bug with templates such a pita to fix? |
19:55:59 | FromDiscord | <Clyybber> I'm not sure it is. But I'm on it |
19:56:25 | disruptek | nice. |
19:56:55 | disruptek | almost feels like an optimization that's overreaching. |
19:57:21 | FromDiscord | <Clyybber> not an optimization |
20:00:22 | * | bung joined #nim |
20:01:43 | * | leorize joined #nim |
20:04:38 | * | bung quit (Ping timeout: 246 seconds) |
20:07:37 | * | kenran joined #nim |
20:08:05 | * | bung joined #nim |
20:10:45 | * | Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
20:10:46 | * | ForumUpdaterBot quit (Remote host closed the connection) |
20:11:10 | * | Yardanico joined #nim |
20:11:57 | * | ForumUpdaterBot joined #nim |
20:12:51 | * | bung quit (Ping timeout: 260 seconds) |
20:13:24 | * | bung joined #nim |
20:14:21 | * | Vladar quit (Quit: Leaving) |
20:18:04 | disruptek | ~gitnim |
20:18:05 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
20:18:35 | disruptek | what's awesome about this is that i can use a git browser to browse my nim distribution and jump between any change i've made. |
20:18:51 | disruptek | it just feels silly to use anything else. |
20:26:23 | * | endragor joined #nim |
20:26:50 | Yardanico | wow crashes from https://github.com/nim-lang/Nim/pull/14790 are getting more interesting :P not compiler crashes now |
20:26:50 | disbot | ➥ scoped memory management |
20:26:51 | Yardanico | but stuff like |
20:27:07 | Yardanico | *** stack smashing detected ***: terminated SIGABRT: Abnormal termination. |
20:30:54 | * | endragor quit (Ping timeout: 260 seconds) |
20:35:17 | FromDiscord | <Shucks> So i'm wrapping a library which uses `char szDllPath[MAX_PATH * 2];` as a string which got translated to nim by `szDllPath*: array[MAX_PATH * 2, char]` But how would I use a nim string on that? Casting it into that array just leads into cryptic stuff. |
20:35:41 | Yardanico | well, what encoding does this library use? |
20:35:43 | Yardanico | does it just do utf8? |
20:35:53 | FromDiscord | <Shucks> i guess yes |
20:35:54 | Yardanico | or is that windows? |
20:36:24 | Yardanico | anyway try cast[cstring](addr myszDllPath[0]) |
20:36:37 | Yardanico | it should work assuming that string is null-terminated |
20:39:33 | FromDiscord | <Shucks> if I'm just using cstring in that struct the library doesn't gets any data. |
20:39:38 | Yardanico | well of course |
20:40:54 | FromDiscord | <Shucks> heh |
20:41:09 | Yardanico | well one of the ways is just copy back by iterating over your modified cstring |
20:42:10 | Yardanico | also you can try cheating a bit and using "szDllPath: cstring" instead, not sure if that would work though |
20:42:12 | Yardanico | but it might :P |
20:45:11 | leorize | you can do that, but it will break the ABI of the struct |
20:45:31 | leorize | @Shucks so you wanted to copy the nim string into that cstring? |
20:46:41 | * | Trustable quit (Remote host closed the connection) |
20:47:51 | FromDiscord | <Shucks> The library just does anything for now if im using `szDllPath*: array[MAX_PATH * 2, char]` in that struct. However the library says: `char szDllPath[MAX_PATH * 2]; //fullpath to the dll` |
20:48:08 | FromDiscord | <Shucks> Im not sure how a char array can be a string. Im not into cpp at all lol |
20:48:12 | Yardanico | what library is it btw? if it's not a secret |
20:48:19 | leorize | it's zlib |
20:48:59 | leorize | `char*` is basically the same as `char szDllPath[MAX_PATH * 2]` btw :) |
20:49:10 | leorize | except that the latter explicitly state the size requirement and is a part of the struct |
20:49:25 | FromDiscord | <Shucks> It's a library to inject dll's into a process. I've tried using widecstrings before as suggested on the nim board https://play.nim-lang.org/#ix=2qvC |
20:49:50 | leorize | lol the convention makes me assume that it's zlib :P |
20:50:52 | leorize | @Shucks if I can see the C definition I can let you know how to wrap it |
20:51:02 | leorize | ah I'm blind :P |
20:51:28 | Yardanico | @Shucks WideCString is for utf-16 |
20:51:30 | Yardanico | for windows stuff |
20:54:27 | * | ofelas quit (Ping timeout: 240 seconds) |
20:59:48 | FromDiscord | <Shucks> mh :/ |
21:01:51 | leorize[m] | @Shucks try this https://play.nim-lang.org/#ix=2qvZ |
21:02:27 | leorize | I found the header and corrected your definitions according to it |
21:02:57 | * | ofelas joined #nim |
21:03:53 | FromDiscord | <Shucks> `File : G:/Coding/Nim/dllinject/testDLL.dll` hallelujah |
21:03:58 | * | natrys quit (Quit: natrys) |
21:07:19 | * | dmi0 quit (Remote host closed the connection) |
21:07:47 | * | dmi0 joined #nim |
21:08:35 | FromDiscord | <Shucks> ```Waiting for DLL...↵Injecting in: 16448↵DLL INJECTED!↵``` |
21:09:01 | FromDiscord | <Shucks> I finally can go to bed. My boss will thanks you. |
21:09:11 | FromDiscord | <Shucks> (edit) removed 'will' |
21:10:04 | Yardanico | lol |
21:10:26 | FromDiscord | <Shucks> So what this basically does is copying the bytes from the string into that array right. I need to find some more user friendly way |
21:10:47 | Yardanico | just wrap it in some proc/template then? |
21:11:11 | * | kenran quit (Quit: leaving) |
21:11:22 | FromDiscord | <Shucks> Yea gonna deal with that tomorrow. Thanks again ❤️ |
21:12:44 | leorize | np :) |
21:16:42 | * | abm quit (Read error: Connection reset by peer) |
21:17:54 | * | bung quit (Ping timeout: 265 seconds) |
21:22:18 | * | bung joined #nim |
21:26:42 | * | narimiran quit (Quit: leaving) |
21:26:52 | * | bung quit (Ping timeout: 246 seconds) |
21:33:39 | * | bung joined #nim |
21:38:12 | * | bung quit (Ping timeout: 265 seconds) |
21:42:36 | FromGitter | <ynfle> Any idea why there might be a <original file name>.out file in my `src` directory? |
21:42:50 | disruptek | you have a directory of the same name. |
21:43:38 | * | bung joined #nim |
21:43:38 | FromGitter | <ynfle> Ohhhhh |
21:43:40 | FromGitter | <ynfle> Thx |
21:43:43 | FromGitter | <ynfle> !!! |
21:43:44 | Yardanico | @ynfle if you're on *nix binaries don't have an extension, but as disruptek said if you already have a directory with the same name the binary will be with .out |
21:43:47 | Yardanico | also there's "nim r file.nim" btw |
21:43:51 | Yardanico | not sure if it's in stable yet |
21:47:54 | * | bung quit (Ping timeout: 240 seconds) |
21:49:41 | * | bung joined #nim |
21:51:04 | * | tane quit (Quit: Leaving) |
21:54:26 | * | bung quit (Ping timeout: 260 seconds) |
21:57:49 | * | bung joined #nim |
21:59:06 | * | waleee-cl joined #nim |
22:11:26 | * | solitudesf quit (Ping timeout: 256 seconds) |
22:13:05 | FromDiscord | <codic> PMunch: I know this is late, but "define shell command" a command run thru the shell instead of being executed directly. so that way i can use things like piping |
22:14:48 | * | dmi0 quit (Quit: Leaving) |
22:18:52 | * | BlameTheRoomba quit (Quit: Default Quit Message) |
22:19:33 | * | marnix quit (Ping timeout: 258 seconds) |
22:24:27 | * | ofelas quit (Ping timeout: 240 seconds) |
22:25:04 | * | tinga quit (Remote host closed the connection) |
22:25:17 | * | tinga joined #nim |
22:29:07 | * | nikita` quit (Quit: leaving) |
22:30:44 | * | vicfred joined #nim |
22:32:58 | * | ofelas joined #nim |
22:39:34 | * | vikfret quit (Quit: Leaving) |
22:40:36 | * | pbb quit (Read error: Connection reset by peer) |
22:41:37 | * | pbb joined #nim |
22:47:52 | * | Senny joined #nim |
22:53:17 | * | Senny quit (Ping timeout: 258 seconds) |
22:54:01 | disruptek | https://play.nim-lang.org/#ix=2qwm |
22:54:36 | Yardanico | ? |
22:55:24 | Yardanico | well yeah it shouldn't allow to have != here :P |
22:56:56 | disruptek | i think it's nice. |
22:57:23 | disruptek | i have a feeling i can find a cute use for it. |
22:58:40 | disruptek | remember, it's not a crime if no one saw you do it. |
22:59:39 | FromDiscord | <Vindaar> @codic not quite sure what you need, but maybe this can be of use https://github.com/vindaar/shell |
23:00:03 | FromGitter | <ynfle> Great library by the way |
23:01:55 | FromDiscord | <Vindaar> thanks! |
23:03:41 | * | oculux quit (Remote host closed the connection) |
23:04:48 | FromDiscord | <Recruit_main707> @Shucks will you make a repo on your dll injection things, I am interested on them bc I tried a few things, but they were wonky |
23:09:27 | * | ofelas quit (Ping timeout: 240 seconds) |
23:11:19 | * | oculux joined #nim |
23:15:42 | * | oculux quit (Remote host closed the connection) |
23:18:29 | * | oculux joined #nim |
23:19:27 | * | BlameTheRoomba joined #nim |
23:21:16 | * | audiophile_ joined #nim |
23:22:33 | * | ofelas joined #nim |
23:24:33 | * | BlameTheRoomba quit (Ping timeout: 256 seconds) |
23:24:33 | * | audiophile_ is now known as BlameTheRoomba |
23:24:36 | FromDiscord | <Daylight> > https://nim-lang.org/docs/os.html#getEnv%2Cstring%2Cstring @Daylight is this what you're looking for?↵@ynfle[Gitter]#0000 yesssssssss |
23:32:07 | * | ofelas quit (Ping timeout: 260 seconds) |
23:36:26 | * | krux02_ joined #nim |
23:40:03 | * | krux02 quit (Ping timeout: 260 seconds) |
23:41:05 | FromGitter | <ynfle> 👍 |
23:44:00 | * | ofelas joined #nim |
23:48:47 | FromGitter | <ynfle> Thx Yardanico |
23:49:02 | * | ofelas quit (Ping timeout: 260 seconds) |
23:49:09 | FromGitter | <ynfle> It's not on stable |
23:52:14 | * | ofelas joined #nim |
23:57:13 | * | ofelas quit (Ping timeout: 260 seconds) |