<< 29-06-2020 >>

00:00:05audiophilewow that is handy
00:00:15audiophileso how about stuff like virtual environments from python
00:00:17audiophiledo we have those too
00:00:33Yardanicowell you can have different nimble directories and change it from the config
00:00:44audiophileoh local directories?
00:00:52Yardanicoand really you can have different package versions installed at the same time
00:01:02audiophileon a global level?
00:01:05Yardanicoand nimble will resolve them for different packages which need different versions of same module
00:01:15audiophilethat's very very cool!
00:01:37FromDiscord<KingDarBoja> Why there are too many FP libs lol
00:01:49audiophileone can never have too many fp libs
00:02:10*ofelas joined #nim
00:02:31audiophileoh hi KingDarBoja
00:22:12*audiophile quit (Remote host closed the connection)
00:26:36FromDiscord<KingDarBoja> Hi mate
00:26:55FromDiscord<KingDarBoja> Ain't better if those people join together and develop a single one?
00:27:02FromDiscord<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:18leorizewell I guess you figured out why there are so many of them :P
01:11:46FromDiscord<Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/726968116013432862/standards.png
01:12:10YardanicoI knew what it is by the file name even without opening the file
01:12:13Yardaniconeural networks be damned
01:12:19Yardanicowell, and by the context
01:13:48*Tlongir joined #nim
01:17:27*Tongir joined #nim
01:19:22FromDiscord<KingDarBoja> Lmao
01:19:49FromDiscord<KingDarBoja> Yardanico, let's make a FP lib to cover everyone use case
01:19:54YardanicoI don't really like FP
01:19:56Yardanicoand never done FP
01:20:11YardanicoI mean it's not that I don't like it, I'm neutral
01:20:15*Tlongir quit (Ping timeout: 260 seconds)
01:20:47FromDiscord<Elegant Beef> We already have 32 and 64 bit FP that's all we need
01:20:51FromDiscord<Elegant Beef> If you need more stop it
01:28:40FromDiscord<Rika> FP as in
01:28:46Yardanicofloating point and functional programming
01:28:49FromDiscord<Rika> func programming?
01:29:08Yardanicofinally I'm less lazy this year
01:29:24Yardanicomore contribs on github
01:29:36FromDiscord<Elegant Beef> Grats!
01:29:50Yardanico510 for the last year compared to 116 in 2019 and 172 in 2018
01:29:51FromDiscord<Elegant Beef> I mean when i see FP i think floating point cause im a numpty
01:30:00FromDiscord<Elegant Beef> Nice im at like 600 or so
01:30:41Yardanicoalso I finally recreated my exercism mentor account
01:30:49Yardanico(I had it disabled for quite some time)
01:31:32FromDiscord<Elegant Beef> Damn only 2 mentors and 1k students
01:31:56Yardanicowell I was quite active quite a long time ago :P
01:32:03Yardanicotime to do the nim track myself
01:32:21FromDiscord<KingDarBoja> Wait what
01:32:22Yardanico?
01:32:34FromDiscord<KingDarBoja> Then only Juan Paco was doing the reviews?
01:32:38Yardanicoidk maybe
01:32:43FromDiscord<KingDarBoja> Loool
01:32:50FromDiscord<KingDarBoja> Can I become one(?) XD
01:32:52Yardanicoyes
01:33:01Yardanicoif you want to TAKE THE RESPONSIBILITY
01:33:08FromDiscord<KingDarBoja> I know I can but I am not confident
01:33:10Yardanicoof shaping people's opinion on nim
01:33:13Yardanicojk
01:33:18FromDiscord<KingDarBoja> That's the problem
01:33:18Yardanicogo to https://exercism.io/become-a-mentor
01:33:20FromDiscord<KingDarBoja> Hahahaha
01:33:22FromGitter<ynfle> Speaking of exercism, anyone wanna help contribute to v3? https://github.com/exercism/v3/tree/master/languages/nim?
01:33:33FromDiscord<KingDarBoja> Sure
01:33:37FromDiscord<Elegant Beef> Really there isnt a online editor/compiler for this stuff?
01:33:51FromDiscord<KingDarBoja> But I see most exercises are the same across languages
01:34:10FromDiscord<KingDarBoja> So maybe it's not the best idea at all(?)
01:34:36FromGitter<ynfle> @Elegant Beef that's what v3 is for
01:34:41FromDiscord<KingDarBoja> I am afraid of giving wrong feedback hahaha
01:34:46Yardanico"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:56Yardanicoah well seems to be just renaming stuff
01:35:09FromDiscord<KingDarBoja> Ohhh
01:35:18FromGitter<ynfle> @Yardanico, in the middle of making it ⏎ Have the first implementation almost finished
01:35:23FromDiscord<KingDarBoja> V3 sounds like a rework
01:35:29Yardanicohow are you doing the checks?
01:35:32Yardanicoand how can I help? :P
01:36:00FromGitter<ynfle> https://exercism-team.slack.com/files/U01102QBLNA/F015H8Q8PLM/rep.gif
01:36:17FromDiscord<Elegant Beef> need to be logged in
01:36:19Yardanicooh no slack
01:36:23FromGitter<ynfle> Well, it runs in parallel with test-runner so we know it compiles
01:36:26FromGitter<ynfle> Sorry
01:36:35FromGitter<ynfle> Primary communication is Slack
01:36:49FromDiscord<KingDarBoja> Ewww slack
01:36:51FromDiscord<KingDarBoja> Anyway
01:36:53FromGitter<ynfle> @ee7 is the senior maintainer
01:37:09FromDiscord<KingDarBoja> Sounds complicated the representer step
01:37:11Yardanicowho is that? :P
01:37:32FromDiscord<KingDarBoja> Ee7 did some review on @mratsim blog post
01:37:33FromGitter<ynfle> He lurks the irc every so often
01:37:42FromGitter<ynfle> (https://files.gitter.im/5602f03e0fc9f982beb19f61/JNxz/rep.gif)
01:37:47FromDiscord<KingDarBoja> Which is still in PR waiting to get merged
01:37:56*oddp quit (Ping timeout: 258 seconds)
01:38:17FromDiscord<KingDarBoja> https://github.com/ee7
01:38:31Yardanicoeh I didn't even receive the slack invite from exercism, gonna email them
01:38:39Yardanicois the exercism-team the same as for mentors?
01:38:44FromDiscord<KingDarBoja> He has been active since last month jumm
01:38:45FromGitter<ynfle> Email jeremy
01:39:09Yardanicojeremy walker?
01:39:20FromGitter<ynfle> Yup
01:39:22YardanicoI'm not really accustomed with exercism stuff
01:39:25Yardanicoso I don't know people or emails
01:39:30FromGitter<ynfle> I think [email protected]
01:39:38FromDiscord<KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726975130160463922/Screenshot_20200628-203927.png
01:39:46FromDiscord<KingDarBoja> Damn Elixir
01:40:04FromGitter<ynfle> https://exercism.io/team/staff
01:40:18Yardanicoyes I saw that
01:40:20Yardanicobut it doesn't have emails
01:40:50FromDiscord<KingDarBoja> Hey, where is TypeScript!?
01:41:23FromDiscord<Elegant Beef> In the trash heap where it belongs
01:41:56FromDiscord<KingDarBoja> 👿
01:44:27FromDiscord<KingDarBoja> Anyway, would be great to help :P
01:44:34Yardanicowell 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:48Yardanicolets see what ones C# has
01:45:03Yardanicouh
01:45:06Yardanicouhh
01:45:16Yardanicohttps://i.imgur.com/ToUZNEq.png
01:45:19FromDiscord<KingDarBoja> I am watching Dark, I Will check those tomorrow and see how to help
01:45:20FromDiscord<Rika> kinda wish nim had 80 bit uints now...
01:45:22Yardanicoteaching the stdlib?
01:45:26Yardanico@Rika stint exists
01:45:31Yardanicohttps://github.com/status-im/nim-stint
01:45:37FromDiscord<KingDarBoja> Yeap
01:45:46FromDiscord<Rika> kinda big library for such a small library i'm remaking
01:45:49FromDiscord<KingDarBoja> Would be a good start, Yard
01:45:53Yardanico@KingDarBoja they say themselves that it's against their goal
01:46:00FromDiscord<KingDarBoja> Oh
01:46:14FromDiscord<KingDarBoja> Then I am confused
01:46:29FromDiscord<KingDarBoja> I have used exercism before to learn Elixir
01:46:29Yardanicolemme quote
01:46:46Yardanicofrom https://github.com/exercism/v3/blob/master/docs/concept-exercises.md
01:46:52Yardanico"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:52Yardanico"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:55FromDiscord<KingDarBoja> So I assume they want exercises that let student learn by they own findings
01:47:01Yardanicoand they say "Exercism focuses on teaching Fluency not Proficiency."
01:47:14Yardanicowhich means concept exercises shouldn't really teach the stdlib
01:47:18FromDiscord<KingDarBoja> Ugh
01:47:36*endragor joined #nim
01:47:36YardanicoI thought it would be about idiomatic code
01:47:49FromDiscord<KingDarBoja> I get it
01:48:09Yardanicolike using iterators / templates / result / enums / etc
01:48:14YardanicoI mean where to apply them
01:48:15FromDiscord<KingDarBoja> More like how to code like a Nim expert instead of memorizing how to find things
01:48:38FromDiscord<KingDarBoja> Well now I am in doubt lmao
01:49:16FromDiscord<KingDarBoja> Like I don't know what is idiomátic Nim at all
01:49:28FromDiscord<KingDarBoja> I still using return instead of implícit result lol
01:49:32*chemist69 quit (Ping timeout: 260 seconds)
01:49:55Yardanicowell you can't always describe what "idiomatic" is in words
01:50:04Yardanicowhen looking at the code you just know if it's idiomatic or not :)
01:50:53FromDiscord<KingDarBoja> Now I feel like noob hahahah
01:51:10Yardanicoeven i don't know if my code is idiomatic enough or not :P
01:51:14*chemist69 joined #nim
01:51:28FromDiscord<KingDarBoja> Oh
01:51:33FromDiscord<KingDarBoja> Big revelation
01:51:45Yardanicowell I mean
01:51:52FromDiscord<KingDarBoja> Well things like Object Variants and Enum things are correlated
01:52:06FromDiscord<KingDarBoja> Which is a good exercise to when use those
01:52:20YardanicoI just don't want to say "I write idiomatic Nim" because that's kinda a stupid thing to say
01:52:26FromDiscord<KingDarBoja> But RIP OOP if most people here are against it xD
01:52:30Yardanicoyou show people that you do idiomatic code by writing code :P
01:52:45Yardanico@KingDarBoja well we'll still have to get a methods/inheritance examples in there
01:52:51Yardanicosince they aim to teach you to be "fluent" in the language
01:53:11FromDiscord<KingDarBoja> 🧐 does it is requires?
01:53:28FromDiscord<KingDarBoja> Required* I know Nim has OOP support but very minimal
01:53:29Yardanicomacros, generics, templates, distinct, different statements, interfacing with C (maybe?)
01:53:40Yardanico@KingDarBoja I wouldn't really call it minimal though
01:53:44Yardanicoit's just that it's relatively rarely used
01:53:50FromDiscord<KingDarBoja> Let's start with the simple things, shall we?
01:54:02FromDiscord<KingDarBoja> Those sounds like Medium/Advanced exercises
01:54:08Yardanicothen what is hard?
01:54:15FromDiscord<KingDarBoja> Good question
01:54:37FromDiscord<KingDarBoja> Ummm
01:54:41Yardanicohard task: rewrite https://gist.github.com/Yardanico/9a2677bd8d7c5e0e869cbe451dd175cc in idiomatic nim
01:54:51FromDiscord<KingDarBoja> Lol
01:55:10FromDiscord<KingDarBoja> I think it becomes hard as soon as you start using macros
01:55:25FromDiscord<KingDarBoja> More like Advanced instead of Hard
01:55:36YardanicoI wouldn't really consider easy macros as "hard"
01:55:42Yardanicosince there's stuff like quote do or macroutils module
01:55:43*audiophile joined #nim
01:55:50FromDiscord<KingDarBoja> 🧐
01:56:00FromDiscord<KingDarBoja> Maybe navigating the AST? Idk
01:56:14FromDiscord<KingDarBoja> Also, why are we the only two discussing?
01:56:24FromDiscord<KingDarBoja> _make a poll_ lol
01:56:43Yardanicobecause it's not the right time
01:56:48Yardaniconeed a proper post on the forum
01:56:54FromDiscord<KingDarBoja> Sure
01:57:01FromDiscord<KingDarBoja> I haven't joined the forums
01:57:02Yardanicoalso it's night in Europe/Asia
01:57:09FromDiscord<KingDarBoja> I tend to forgot those things
01:57:18FromDiscord<KingDarBoja> It is 9 PM here at Colombia
01:58:21FromDiscord<KingDarBoja> 🧐
02:03:03FromDiscord<flywind> It's morning at Eastern Asia.:)
02:03:06FromDiscord<Rika> it's morning in asia
02:03:09FromDiscord<Rika> fuck
02:04:56FromDiscord<KingDarBoja> Yey
02:05:02FromDiscord<KingDarBoja> It is holiday tomorrow
02:05:09FromDiscord<KingDarBoja> More Dev time for meee
02:05:25FromDiscord<KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726981616882286662/FB_IMG_1593320985356.jpg
02:05:32FromDiscord<KingDarBoja> Lmao
02:06:07FromDiscord<Rika> ugh, i was wondering why my library had a gigantic slowdown
02:06:12FromDiscord<Rika> didnt use release
02:06:15FromDiscord<Rika> :ArsGigaFace:
02:06:34Yardanico-d:danger for real men
02:07:11FromDiscord<KingDarBoja> Lol
02:07:18FromDiscord<KingDarBoja> I have never used ig
02:07:20FromDiscord<KingDarBoja> It*
02:07:28Yardanico-d:danger disables all runtime checks
02:07:35Yardanicowhich -d:release used to do until 0.20
02:07:40Yardanico(i think it was 0.20)
02:08:07FromDiscord<KingDarBoja> I want discord emojis
02:08:21FromDiscord<KingDarBoja> But I am too lazy to pay for nitro
02:09:15FromDiscord<Elegant Beef> :nimrawr: you get the server ones for free, so you can post yards github profile picture
02:09:23FromDiscord<Elegant Beef> Whillst in the server i should say
02:10:22FromDiscord<Rika> feels good to make a ulid library 10x-ish faster than the existing one
02:10:45FromDiscord<Rika> though i partly owe it to nim's xoroshiro rand gen
02:11:17FromGitter<ynfle> @Yardanico When you get an invite ping me?
02:11:23Yardanicookay
02:11:27FromDiscord<Rika> 10 million uids under a second 😄
02:11:40Yardanicoand here i am stealing pics from prnt.sc
02:11:46Yardanicoshhhh
02:12:46FromGitter<ynfle> They have a youtube channel with weekly chats discussing stuff related to v3 for the past three months
02:14:21FromGitter<ynfle> !repo nim-test-runner
02:14:22disbothttps://github.com/FedericoCeratto/nim-testrunner -- 9nim-testrunner: 11Nim test runner 15 7⭐ 1🍴 7& 2 more...
02:14:24FromDiscord<KingDarBoja> lol
02:14:58FromGitter<ynfle> @Yardanico https://github.com/exercism/nim-test-runner/ https://github.com/exercism/nim-representer
02:31:24FromDiscord<KingDarBoja> Need to learn how websockets work
02:31:25FromDiscord<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:43PrestigeGetting 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:02FromDiscord<Rika> whats the error at least T_T
02:41:04*fredrikhr joined #nim
02:41:10Prestigehttps://pastebin.com/raw/nWQSpeVf
02:41:17*muffindrake joined #nim
02:41:22Yardanicoimport deques
02:41:29FromDiscord<Rika> yeah
02:41:30Prestigemy lord
02:41:31Prestigety
02:41:33FromDiscord<Rika> i am late
02:41:33FromDiscord<Rika> 😦
02:42:14Prestigehehe
02:42:34FromDiscord<KingDarBoja> xd
02:42:43FromDiscord<KingDarBoja> Late for what? @Rika
02:42:55FromDiscord<Rika> i was beat by yardanico
02:43:05Yardanicoi have the fastest nim error fixer in the west
02:43:23FromDiscord<Rika> second to none
02:43:29FromDiscord<KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726991193434488842/9900_aqua_fingerspin.gif
02:43:50PrestigeI am spoiled by auto imports D:
02:44:37FromDiscord<Rika> you can always export dequeues from gamesnake too
02:44:42FromDiscord<Rika> i mean
02:44:44FromDiscord<Rika> deques
02:45:10Prestigethat keeps tripping me up too, lol
02:45:57FromDiscord<KingDarBoja> What I should do in Nim repo regarding docs? lol
02:46:07FromDiscord<KingDarBoja> _I want to contribute_ xD
02:46:09FromDiscord<Rika> @_@ i'm starting to overoptimize
02:46:15FromDiscord<KingDarBoja> JK, I am lazy now
02:46:50FromDiscord<KingDarBoja> FUUUUUU https://media.discordapp.net/attachments/371759389889003532/726992040424112208/unknown.png
02:47:04FromDiscord<KingDarBoja> _Insert Rika gun in mouth emoji_
02:47:10FromDiscord<Rika> :KannaKMS:
02:47:35FromDiscord<KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/726992226298888252/gun_mouth_emoji.png
02:47:37FromDiscord<KingDarBoja> Stolen
02:48:10FromDiscord<KingDarBoja> Btw, https://plugins.jetbrains.com/plugin/7829-nim-language-support
02:48:37FromDiscord<KingDarBoja> > Sep 26, 2015↵Ugh...
02:48:48FromDiscord<Rika> lol
02:49:09FromDiscord<KingDarBoja> https://github.com/jhspetersson/idea-nim
02:49:26FromDiscord<KingDarBoja> Yardanico, this is the time, do this plugin with latest stuff for IntelliJ xD
02:49:57FromDiscord<Rika> why
02:49:57FromDiscord<KingDarBoja> https://github.com/jhspetersson/idea-nim/blob/master/src/nim/NimSyntaxHighlighter.java ugh nvm
02:50:06FromDiscord<Rika> do you use jetbrains
02:50:07FromDiscord<KingDarBoja> It is JAVA
02:50:09FromDiscord<KingDarBoja> Yes
02:50:14FromDiscord<KingDarBoja> Mostly PyCharm for Python
02:50:41FromDiscord<Rika> why not try a lighter editor for nim
02:51:01FromDiscord<KingDarBoja> _VSCodeeee_
02:52:16hyiltiz
03:12:00FromDiscord<KingDarBoja> https://stackoverflow.com/questions/11154668/is-the-visitor-pattern-useful-for-dynamically-typed-languages
03:12:13Yardanicoyes
03:12:20FromDiscord<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:30FromDiscord<KingDarBoja> This part is confusing af
03:12:57FromDiscord<KingDarBoja> That's part of the first answer conclusion
03:13:36FromDiscord<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:06FromDiscord<flywind> Hello, I got: Error: internal error: environment misses: b. What's wrong with this?
03:37:08FromDiscord<flywind> https://gist.github.com/xflywind/2f6ed4475fa9cfeaa5bdb33eeb52da8b
03:38:58leorizeinternal error means compiler bug
03:39:02leorizehave you filed an issue?
03:40:21leorizetry simplifying the sample
03:40:40FromDiscord<flywind> Ok. I will make an issue.
03:40:51leorizesince you have two ready to go nodes, use result = newStmtList(), then add each node in
03:43:24FromDiscord<flywind> Thanks. I will try it.
03:50:19*dmi0 quit (Remote host closed the connection)
03:50:46*dmi0 joined #nim
03:55:23FromDiscord<flywind> done. https://github.com/nim-lang/Nim/issues/14847
03:55:25disbotcreate a new function definitions got Internal error: environment misses: ; snippet at 12https://play.nim-lang.org/#ix=2qsm
03:55:39leorizeI think I figured out the problem
03:55:50leorizehttps://play.nim-lang.org/#ix=2qsn
03:56:06leorizeyou may notice my little line that hijacks in `b`
03:56:50leorizethis 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:16leorizeso I put an ident there to force rebinding
03:57:24leorizethough I don't really think you can automate this...
03:57:58*NimBot joined #nim
03:59:35leorizethe only way to have this work would be to get a copy of the untyped function
03:59:36FromDiscord<juan_carlos> How to check if a NimNode is a field of an Enum?, `expectkind()` cant do it `Expected nnkEnumFieldDef, got nnkIdent`.
03:59:52leorizeit has to be bound as a symbol first
04:00:08leorizethen symKind should tell you what it is
04:02:10FromDiscord<flywind> @leroize Thanks. Is it a bug or won't be fixed and given a better error msgs?
04:02:23leorizeit's a bug
04:02:31FromDiscord<flywind> ok
04:03:26leorizeguess we need a new unfunction like: getUntypedImpl :P
04:03:29leorizefunction*
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:38FromDiscord<flywind> 😀
04:05:11leorizeif 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:21FromDiscord<juan_carlos> It says `symbol()` is Deprecated.
04:06:41*supakeen joined #nim
04:06:54leorize@juan use bindSym()
04:07:50FromDiscord<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:06leorizeI 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:10FromDiscord<flywind> I also want reflection to get function's name. timotheecour's method seems not to work now.
04:18:12FromDiscord<flywind> timotheecour
04:18:19Yardanicohe's not there
04:18:23FromDiscord<flywind> https://github.com/nim-lang/Nim/issues/8212
04:18:25disbotwe need a standard way to get name of procedure ; snippet at 12https://play.nim-lang.org/#ix=25Yt
04:18:32Yardanicowell it's a hack :P
04:20:15leorizeif 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:08Araqthe voice of reason returned
07:37:13Araqhttp://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:06PMunchHave anyone experimented with sorting procedures in the documentation after first type?
07:56:09Araqwhat?
07:56:29leorizeI thought of it but never implemented anything for that
07:56:40leorizecould be a nice way to sort
07:57:22leorizeI haven't check jsondoc, but I kinda hope that it'd contain enough info to make a renderer with karax
07:57:45PMunchAraq, 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:57PMunchleorize, jsondoc needs some more love..
07:58:10PMunchI think it currently only exports the signature as a string..
07:59:19PMunchMaybe group in procedures starting with new/init that returns the same type as well
08:00:13leorizeI'd like it if we can have different sorting mode for docs that can be toggled at runtime
08:02:35PMunchThat should certainly be possible with jsondoc
08:03:17PMunchNot sure if it is though..
08:03:38PMunchWhat is this warning? "Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]"
08:04:14leorizeprobably a variable without an usable default
08:04:14AraqPMunch, use 'result = Obj(fields)' instead of 'result.fields = ...'
08:04:25Araqat least that's the most common solution to the problem
08:07:22*nikita` joined #nim
08:09:15PMunchHmm, is master broken? /home/peter/Projects/nim/nim/lib/system.nim(207, 11) Error: undeclared identifier: 'is'
08:09:24FromDiscord<Yardanico> master?
08:09:33FromDiscord<Yardanico> did you mean devel? :)
08:09:41PMunchOh right, we've switched..
08:09:42leorizewe should get rid of master :P
08:09:47FromDiscord<Yardanico> XD
08:09:51PMunchNever mind
08:11:06FromDiscord<Elegant Beef> does the float $ use the system's language to convert to string?
08:11:13FromDiscord<Yardanico> No
08:11:19FromDiscord<Elegant Beef> Ah nice
08:11:25FromDiscord<Yardanico> You can use formatFloat though
08:11:30FromDiscord<Yardanico> To specify a custom delimiter
08:11:41FromDiscord<Elegant Beef> Nah i will force my rule of decimal points on everyone 😄
08:12:41leorizethat reminds me that we still need to figure out how to get ryu on nim :P
08:12:44FromDiscord<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:11PMunchWhere do I find the "corresponding Defect"? "Warning: See corresponding Defect; RangeError is deprecated [Deprecated]"
08:15:29FromDiscord<Yardanico> RangeDefect
08:15:32FromDiscord<Yardanico> I guess :P
08:15:42PMunch@ElegantBeef, had that same issue in C#..
08:15:49PMunchYardanico, nope
08:15:54FromDiscord<Yardanico> Really m
08:15:56FromDiscord<Yardanico> ?
08:16:31FromDiscord<Yardanico> Are you on devel?
08:16:50FromDiscord<Yardanico> On 1.2 it's still RangeError
08:17:02FromDiscord<Yardanico> But in devel it's RangeDefect
08:18:26leorizeand thanks to this rename we now need to use `when` everywhere just to support 1.0 :)
08:19:06FromDiscord<Yardanico> No?
08:19:15FromDiscord<Yardanico> You can just use RangeErrot
08:19:20FromDiscord<Yardanico> *error
08:19:33leorizeand be bugged with deprecated warnings?
08:19:39FromDiscord<Yardanico> It'll make a warning but will compile for the entirety of 1.0 I guess
08:19:46Araqleorize, there is fusion/compat for it
08:19:59AraqI wanted to add the new exception names but forgot
08:20:52leorizewe should figure out how fusion should be packaged/shipped with nim too
08:20:58AraqPMunch, yeah better links for the docs have been proposed before
08:21:15leorizeit could become the first external package that we can use with the compiler
08:21:25FromDiscord<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:48FromDiscord<Elegant Beef> Then you remember the entire world cant agree on a decimal seperator and your cry for the timezone guys
08:21:54FromDiscord<Elegant Beef> you cry*
08:21:57Araqleorize, 1.4 will have it, 1.2 or 1.0 should mark it as a Nimble dependency
08:22:14FromDiscord<Yardanico> You can set default locale in C# though
08:22:18Araqmaybe we should release 1.0.x and 1.2.x that also ship with "fusion", no idea
08:22:21FromDiscord<Elegant Beef> It's like a 3 second fix
08:22:23FromDiscord<Yardanico> I mean it's annoying but not hard
08:22:25FromDiscord<Yardanico> Yeah
08:22:30FromDiscord<Elegant Beef> It's still annoying though
08:22:40FromDiscord<Elegant Beef> Cause i didnt realize it was an issue on a published game jam game
08:22:42AraqElegant Beef: locales are stupid
08:23:24FromDiscord<Elegant Beef> Yea it implicitly should be whatever the language wants, explictly should have to be stated
08:23:58FromDiscord<Elegant Beef> I've got a feeliing that implicit using of language has annoyed more than just a handful of people
08:24:00FromDiscord<Elegant Beef> 😄
08:25:32FromDiscord<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:36FromDiscord<Yardanico> Just curious honestly
08:26:34leorizeAraq: 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:20leorizeonce 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:21FromDiscord<Elegant Beef> Before i go and write (de)serializer, is there a template to reverse the $ on an object?
08:30:02Araq<Yardanico> I don't know either
08:30:03FromDiscord<Elegant Beef> or proc i guess, just figured it'd have to be a template 😄
08:32:07*abm joined #nim
08:34:49leorize@Beef: no, instead use json for (de)serializing
08:35:58FromDiscord<Elegant Beef> ok
08:36:13FromDiscord<Elegant Beef> Yea that'll be easy 😄
08:36:18FromDiscord<Elegant Beef> Idk why i was going to do CSV
08:38:35*Trustable joined #nim
08:40:25PMunch@Elegant Beef, haha exactly!
08:45:27FromDiscord<Elegant Beef> Ah, hell yea that was super easy to implement
08:45:50FromDiscord<Elegant Beef> I've actually never used any automated json generator 😛
08:46:42AraqPMunch, since it keeps coming up.
08:47:03Araqdid we consider to *generate* markdown instead of HTML or JSON?
08:47:26PMunchAre you asking me?
08:47:31Araqyes
08:47:51Araqwould it be a good idea? then people can use external tools
08:47:57PMunchI 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:06PMunchSo you could write a jsondoc -> markdown converter
08:48:20Araqas I said, JSON is flawed because it's structured
08:48:29Araqand docs are semi-structured
08:48:40PMunchHmm, what do you see as an issue there?
08:48:56PMunchThe thing that annoys me is that signatures for example is structured
08:49:34PMunchAnd the AST is structured
08:49:36AraqInformal *text* here with URL and **formatting**
08:49:50PMunchAnd doc-comments are tied to the AST, so they are inherently structured
08:49:59PMunchAh I see, the actual text isn't structured
08:50:01PMunchThat's true
08:50:11Araqyeah
08:50:28Araqso in effect it's "JSON with RST/Markdown/HTML inside"
08:50:40PMunchI mean it is called ReStructuredText, so you'd think it's structured
08:50:58Araqand also replicating all the stuff our docgen does with the JSON isn't easy
08:51:01PMunchI guess you should theoretically be able to express RST as QSON
08:51:06*endragor quit (Remote host closed the connection)
08:51:08Araqfor example, type names are turned into links
08:51:32*endragor joined #nim
08:51:49Araqusually site-building generators take markdown/RST or even HTML snippets
08:52:04PMunchEasy, output the unique name used by the C back-end along with the "display name"
08:52:25PMunchThat way you can generate links from the JSON just fine
08:52:59Araqtraversing the JSON is harder and harder the more information it contains
08:53:24Araq"here is it in JSON, do what you want with it" is a flawed idea
08:53:37Araqbecause it's not easy to "do what I want with it" at all
08:54:11AraqI can already do everything what I want by traversing the HTML and emitting different HTML
08:54:11PMunchBut 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:31Araqwe have an HTML parser in the stdlib much like we have a JSON parser
08:54:51PMunchYeah, but you'd have to parse the signature format as well
08:55:29PMunchIf 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:41Araqwell we can output it in a more structured way either in JSON or in HTML
08:56:44PMunchBut that locks the HTML documentation to forever keep the same style/structure
08:57:18PMunchFor 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:50PMunchBut if it was JSON converted to HTML the converter could add whatever it wanted without breaking the tools that read the JSON
08:58:12PMunchIt's basically separating data from presentation
08:59:17*endragor quit (Ping timeout: 246 seconds)
08:59:27Araqthat's HTML 5 in a nutshell, we only emit <div> for the structure and style it with CSS
08:59:32Araqseparating data from presentation :P
09:00:13Araqbut we can have a more constructive discussion, so what's your real use case?
09:00:34Araqturning the JSON yet again into HTML? Or to improve the search feature?
09:01:05Araqor to improve interop with eg. Sphinx?
09:02:51FromDiscord<mratsim> How to mess with HTML: make `div` a keyword and watch the world burn
09:03:39*endragor joined #nim
09:03:42FromDiscord<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:52PMunchOff 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:52PMuncheclare)
09:05:21Araqmratsim: "Sphinx interop is 'just' a simple 1_000 line Nim program that turns the JSON into a Sphinx compatible format"
09:05:43Araq:P
09:06:23Araqsee, 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:11PMunchOnly 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:41PMunchAnd that one only because "different formats" happened to include Markdown
09:08:04Araqthere is no JSON representation for <table>
09:08:27PMunchOf course there is, an array of objects
09:08:34PMunchOr an array of arrays for that matter..
09:08:38Araqthe idea of <table> exists in both RST and Markdown
09:09:03FromDiscord<mratsim> For Weave, I started to use Rust's mdBook: https://rust-lang.github.io/mdBook/
09:09:14Araqthe JSON representation is ad-hoc
09:09:39*endragor quit (Remote host closed the connection)
09:09:41FromDiscord<mratsim> Gitbook and new docgen are also embracing amrkdown: https://github.com/honkit/honkit
09:09:44PMunchI 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:28PMunchOf 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:40Araqmratsim: how does mdBook work with Rust's docgen?
09:12:52Araqwhat does Rust's docgen offer?
09:15:06FromDiscord<mratsim> https://forum.nim-lang.org/t/6505#40168
09:15:11FromDiscord<mratsim> funny you ask that :p
09:16:40Araqhttps://doc.rust-lang.org/stable/rustdoc/command-line-arguments.html well I'm reading it
09:16:59Araqand it produces HTML, CSS and JS, no JSON intermediate format in sight
09:17:11Araqyet mdBook works
09:17:52FromDiscord<mratsim> sent a long message, see http://ix.io/2qte
09:18:00PMunchAnother opportunity for Nim to be better ;)
09:18:32AraqPMunch, look, I'm accepting your PRs
09:18:40Araqand I really appreciate all the work
09:19:20PMunchThanks :)
09:19:26FromDiscord<mratsim> Basically: in the How-to, explanation, reference, tutorials from https://documentation.divio.com/
09:19:33FromDiscord<mratsim> nim doc does the reference
09:19:39FromDiscord<mratsim> markdown does everything else
09:19:58PMunchBut 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:13FromDiscord<mratsim> (or RST like in Arraymancer though super tedious, or SPhinx)
09:20:44PMunchHmm, 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:48FromDiscord<mratsim> and I need some way to bridge, so that I can generate all 4 kinds of documentation
09:20:50Araqbut I think there is a better way to do it
09:21:28FromDiscord<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:32Araqfor example, the Nim docgen can leave the ## text here untouched, except for resolving Nim references
09:21:58Araqand turn the 'proc header' thing into markdown
09:22:10FromDiscord<mratsim> and we need to ensure that the json docgen can handle complex projects with public proc in many different files
09:22:13Araqthen we don't need any RST or markdown parser in the core at all
09:22:59Araqnor do we need JSON output (though it might be useful to have for other reasons)
09:23:42FromDiscord<mratsim> no we don't need RST or markdown in that case indeed
09:23:59FromDiscord<mratsim> and it simplifies the Nim compiler by letting it focus on Nim code
09:24:21FromDiscord<mratsim> the json output is useful for people to write transformers/processors
09:24:28FromDiscord<mratsim> and I think I saw such doc generator
09:24:46Araqyes but in the end every transformer is yet another tool for our end users
09:25:04Araqand these tools might be better developed than nim doc or not
09:25:31Araqbut let's please not pretend they are easy to write, they are not
09:26:19Araqand also let's not pretend that a tooling pipeline you need to setup yourself is a good thing
09:26:52FromDiscord<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:08FromDiscord<mratsim> I didn't pretend
09:27:31FromDiscord<mratsim> I tried several time to build docs and I say it's hard currently
09:28:49FromDiscord<mratsim> other examples: https://www.twilio.com/docs/usage/api, https://stripe.com/docs/api/disputes
09:30:26Araqok, back to work
09:31:08FromDiscord<mratsim> what's the state of CSP btw?
09:31:32*Senny quit (Ping timeout: 260 seconds)
09:31:36AraqCSP is looking for motivated programmers
09:31:39FromDiscord<mratsim> I've seen complaints on Async and request on multithreaded Async this weekend
09:31:50FromDiscord<mratsim> so I was wondering
09:31:56FromDiscord<mratsim> RFC?
09:32:13Araqwell Zevv started to work on it
09:32:31FromDiscord<mratsim> can we do CSP as a library?
09:33:09AraqI don't know.
09:34:07AraqI think .liftLocals and partial objects are the key compiler features that we need, but we already have them. undocumented
09:41:08bungPMunch it will keep same looking ,when editor content has long text
09:44:56FromDiscord<mratsim> liftLocals is the thing to implement closures right? AFAIK I could use that for Weave.
09:55:48AraqliftLocals is related to closures but closures came earlier
09:59:10*krux02 joined #nim
10:06:12*Vladar quit (Quit: Leaving)
10:25:07ZevvI kind of abandoned it I'm afraind
10:25:59ZevvAnd it' CPS, not CSP (hear hear)
10:26:50ZevvI have some doodling in this repo, but i dont't think it is of any use: https://github.com/zevv/nimcsp
10:27:26Zevvmratsim: 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:32PMunchbung, I assume you're talking about the playground PR? Do you have an image?
10:33:54PMunchbut as I said, the current solution you have breaks the tour feature, so you need to fix that
10:39:47AraqZevv, well tell me what you need, it's crucial we get this going IMO
10:41:15PMunchOh, turns out I have already added signatures to jsondoc :P
10:44:37ZevvI need time and peace in my life and bigger brain, that would do I guess
10:56:09bungPMunch https://transfer.sh/gpBlx/Screenshot%202020-06-29%20at%206.55.33%20PM.png
10:57:22bungthe current style will hidden the btns , when has long text
11:09:22PMunchJust 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:47FromGitter<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:10AraqZevv, would it help to write the transformation in the compiler and not as a macro?
11:40:57Zoom[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:23Zoom[m]John Dupuy probably had the best sound, but there's room for improvement (there was some clipping)
11:42:20Zoom[m]treeform had some issues with gain staging and his video came out very quiet
11:43:57Zoom[m]A few of other videos had serious clipping distortion, which is super annoying, especially with headphones.
11:44:36PMunchSorry, but not everyone in the Nim community has a sound-guy on hand
11:44:42Zoom[m]I mix music for a living, so would be glad to answer any questions you may have
11:44:58PMunchOr professional grade audio equipment lying around the house
11:45:29PMunchI 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:35Zoom[m]PMunch: yours were rather on the good side.
11:46:19Zoom[m]However, you clipped a bit on sibilances and loud passages
11:46:35Zoom[m]There's absolutely no need for "professional" equipment
11:47:25Zoom[m]Understanding proper gain staging gets you at least 50% there
11:47:33PMunchThat 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:35supakeenIt's really hard to get that sort of information to everyone.
11:47:42supakeenAnd to get everyone to actually set it up.
11:47:51supakeenAs long as it's understandable I'm usually fine with it tbh.
11:48:02PMunchI'd love a quick explanation/tutorial on gain staging though
11:49:19*muffindrake joined #nim
11:49:43PMunchI 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:50Zoom[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:52PMunchYou don't want to set the bar so high that no-one can be bothered
11:50:15Zoom[m]The thing is, it's not hard.
11:50:24supakeenZoom[m]: For a small conference that's a big thing.
11:50:52supakeenFor example, I'm a volunteer for EuroPython and we're doing about 40 hours of training speakers (including setting up their microphones).
11:50:57supakeenAnd that's ... not enough.
11:51:00PMunchIf 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:11ZevvZoom[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:24Zoom[m]So, basic points:
11:54:51*ofelas quit (Ping timeout: 272 seconds)
11:56:17Zoom[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:01Zoom[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:37Zoom[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:38Zoom[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:51Zoom[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:15ZevvZoom[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:30Zoom[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:45ZevvWe 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:19Zoom[m]Zevv: absolutely! You can reach me on matrix: @Zoom:matrix.org
12:16:27ZevvNoted!
12:18:08*bung quit (Ping timeout: 256 seconds)
12:18:28PMunchYeah this would be great information to send out to people along before record their videos
12:18:33Zoom[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:15Zoom[m]Heavy curtains will help a bit.
12:21:42*bung joined #nim
12:22:57Zoom[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:41ZevvI have my little persian rug for that :)
12:24:20Zoom[m]Proper living rooms usually sound nicer than coding dungeons
12:25:03Araqyou really want this door to stay closed :P
12:25:14ZevvThat's where the skeletons go
12:25:29FromDiscord<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:29Zoom[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:06FromDiscord<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:58Zoom[m]mratsim: these filters rarely make things better, unfortunately. Especially if you don't have much experience tweaking them
12:28:31FromDiscord<mratsim> It was not hard there, I had a permanent more than buzz
12:30:03Zoom[m]Human ears are exceptionally good at filtering speech from noise, but not so great at processing speech ridden with filter artifacts.
12:30:23alehander92_does this apply to streaming
12:30:57alehander92_i feel sometimes a bit of imperfection can be ok, reminding of a more "raw/lo-fi" atmosphere
12:31:30Zoom[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:10Zoom[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:02FromDiscord<Zed> What's the worst thing someone has ever recorded that you have heard?
12:34:46Zoom[m]Zed, You mean conceptually, or quality-wise?
12:34:52FromDiscord<Zed> both
12:40:18Zoom[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:18Zoom[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:23FromDiscord<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:47Zoom[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:14Zoom[m]Sorry for hijacking the chat for a bit. Hope I can help.
12:43:59Zoom[m]Oh, and the situation with audio in Nim looks rather bleak, at least judging from Curated Packages page.
12:44:02FromDiscord<mratsim> @Synth, your binary is OS dependent
12:44:48Zoom[m]We need at least wrappers for VST.
12:44:49FromDiscord<mratsim> The new audio macro library that vitreo12 presented during the talk looks quite nice
12:45:28FromDiscord<Synth> @mratsim So there is no way to see what OS the host is?
12:45:28Zoom[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:06FromDiscord<mratsim> He doesn't use the GC, everything is preallocated before latency sensitive operation, and free'd after
12:46:08FromDiscord<Technisha Circuit> @Synth there is
12:46:12FromDiscord<Technisha Circuit> But idk how
12:46:14FromDiscord<Technisha Circuit> Wait
12:46:41FromDiscord<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:02FromDiscord<mratsim> but the easiest way is to store an OS enum at compile-time
12:47:17FromDiscord<mratsim> when defined(windows): const RunningOn = Windows
12:48:13FromDiscord<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:19FromDiscord<Synth> Ohh alright, thank you
12:48:36FromDiscord<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:48FromDiscord<mratsim> and with destructors, only ref types are left
12:51:10Zoom[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:26FromDiscord<Clyybber> We have a new memory management strategy thats not really a GC
12:53:30FromDiscord<Clyybber> but reference counting
12:53:32FromDiscord<Technisha Circuit> @Synth so when compiling do `-d:windows` when compiling for windiws
12:53:36FromDiscord<Technisha Circuit> Windows*
12:53:37FromDiscord<Clyybber> with an optional cycle collector
12:53:50FromDiscord<Clyybber> but its deterministic
12:53:59Araqer
12:53:59FromDiscord<Technisha Circuit> Including what Mratsim said :p
12:54:36FromDiscord<Synth> > @Synth so when compiling do `-d:windows` when compiling for windiws↵I'm still confused on how to detect the OS...
12:55:07Araqrefcounting plus cycle collector is a GC, it just happens to be an implementation of GC that has a different performance profile
12:55:34FromDiscord<Technisha Circuit> @Synth I'll help you
12:55:37FromDiscord<mratsim> unfortunately GC has been overloaded with Java, just like OOP
12:55:38FromDiscord<Technisha Circuit> Go to DMs :P
12:55:46FromDiscord<Synth> Thanks!
12:57:26Zoom[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:30FromDiscord<Clyybber> Araq: Yeah, I was referring to arc when I said no GC
12:57:49FromDiscord<Daylight> ello
12:57:52FromDiscord<Clyybber> Zoom: Which makes sense, because you won't find many linked lists in audio
12:58:12*bung joined #nim
13:00:58FromDiscord<Clyybber> @Daylight hi
13:02:03Araqwe 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:01FromDiscord<Daylight> Is it possible to use Visual studio code for Nim?
13:03:03FromDiscord<mratsim> memory reclamation is fine
13:03:31FromDiscord<mratsim> @Daylight yes
13:04:07Araqmaybe it's "scope based memory management"
13:05:57FromDiscord<Daylight> ok
13:06:23FromDiscord<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:05FromDiscord<Clyybber> Araq: Any idea how https://github.com/nim-lang/Nim/issues/14844 could happen?
13:10:07disbotfor loop in template does an extra round depending on call syntax ; snippet at 12https://play.nim-lang.org/#ix=2qtK
13:10:17Araqmaybe it's local vs global. you can write a subsystem, analyze the performance profile and other subsystems don't interfere.
13:10:22FromDiscord<Clyybber> Maybe its the fact that UFCS forces the first arg to get semmed?
13:12:53FromDiscord<Daylight> confused on making a bot with nim
13:12:57FromGitter<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:58Araqdeech: unfortunately not, but '.emit' worked for me when it came up
13:15:51FromDiscord<Clyybber> Araq: Does it deserve the showstopper label?
13:16:51AraqClyybber: yes to the showstopper label
13:16:54FromDiscord<mratsim> @deech, there might be a hidden gem here : https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim
13:17:07Araqapart from that I'm as clueless as you are
13:17:40AraqI wouldn't trust the git bisecting though
13:17:47FromDiscord<Clyybber> yeah, its not the root cause
13:18:03FromDiscord<Clyybber> the root cause is that the two `i`'s are the same sym
13:18:05FromGitter<deech> mratsim: wow
13:18:06FromDiscord<Clyybber> somehow
13:31:53FromDiscord<Technisha Circuit> @Daylight use Dimscord for a discord bot with Nim
13:32:00FromDiscord<Technisha Circuit> Because DiscordNim is broken
13:37:01*Kaivo joined #nim
13:39:18*muffindrake quit (Quit: muffindrake)
13:39:30FromDiscord<Daylight> lol
13:39:40FromDiscord<Daylight> Alright
13:39:44FromDiscord<Daylight> will do @Technisha Circuit
13:39:59FromDiscord<Daylight> prob add it in a few days or smth
13:40:07*rockcavera joined #nim
13:41:42FromDiscord<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:26FromDiscord<Daylight> how do i uninstall a module?
13:54:57*lritter joined #nim
13:56:24*muffindrake joined #nim
14:02:27PMunchIt's a manual process..
14:02:36PMunchIIRC
14:03:29FromDiscord<lqdev> uh
14:03:31FromDiscord<lqdev> nimble remove
14:03:33FromDiscord<lqdev> works
14:07:29FromDiscord<Daylight> ok
14:07:56PMunchOh, it does? Sorry
14:08:22ZevvPMunch: amateur!
14:08:32PMunchHaha, I seldom remove packages :P
14:08:48ZevvI do rm -rf ~/.nimble every few weeks, and reinstall everything I need
14:08:55*lnxw37d4 joined #nim
14:09:09PMunchStarted 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:20PMunchZevv, oh yeah I've done that in the past
14:09:31PMunchPeople are just too bad at labeling releases..
14:09:47PMunchAnd I tend to hack in fixes in packages from time to time..
14:10:01PMunchOh well
14:10:02PMunchTime 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:58FromGitter<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:10FromDiscord<Daylight> wonder how to get env data
14:34:49FromGitter<ynfle> NVM
14:35:56FromGitter<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:41FromDiscord<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:26FromDiscord<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:27FromDiscord<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:15FromDiscord<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:33Araqthere are lots of opinions I think.
15:28:34FromDiscord<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:56AraqI would write the C header and ensure c2nim can always process it
15:29:24Araqand compile the Nim code with --gc:arc --noMain
15:32:56FromDiscord<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:21FromDiscord<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:03FromDiscord<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:12Araqikrima: I personally avoid DLLs
15:35:14FromDiscord<Zachary Carter> or CPP - whatever your preference is
15:35:35FromDiscord<Zachary Carter> well I'm only compiling to a DLL for development purposes - to use hot code reloading
15:35:42FromDiscord<Zachary Carter> for release builds I would compile to a static library
15:35:57AraqI think the hardest part is to setup your build system and for that Nim has a surprise
15:36:23Araqinside nimcache/ there is a project.json file describing the build's needs
15:36:57AraqI 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:38FromDiscord<ikrima> ah, i didn't realize I could get nim to generate a static c lib directly
15:39:08Araqmeh
15:39:10FromDiscord<ikrima> thanks guys! have enough to keep hacking a solution
15:39:20Araqfwiw I don't use static libs either
15:39:34FromDiscord<ikrima> oh, i misunderstood then?
15:39:45FromDiscord<ikrima> > ikrima: I personally avoid DLLs↵↵what do you do then?
15:39:54AraqI would take the set of produced .c / cpp files and make it part of your build
15:40:32FromDiscord<ikrima> ah gotcha; even better. I misread as that being a discommend. thanks for the clarification
15:45:48disruptekeither 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:40disrupteki 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:46disruptekjust another of the unpopular opinions, i guess.
15:51:40*NimBot joined #nim
15:53:28*endragor quit (Ping timeout: 256 seconds)
15:56:58AraqI'd use nimph once I need it
15:57:21Araqcurrently I don't have a need for a PM
15:58:00disruptekwe should all aspire to this.
15:58:10AraqI do use "bump" though and I love it
15:58:16Araqand I could build it too
15:58:19disruptekfor what?
15:58:48Araqevery time I have to touch one of my Nimble packages
15:59:02AraqI use bump to change the version
15:59:05disruptekwell, bump is another animal that should not exist.
15:59:36disruptekit's like if there was a parasite that only eats the grey matter of republicans.
15:59:40disruptekoh wait.
16:00:43FromGitter<alehander92> this is europe, disruptek
16:00:54FromGitter<alehander92> we talk about the weather here
16:01:04disruptekthe weather sucks.
16:01:39disruptekan ill wind bloweth.
16:01:41FromDiscord<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:59FromGitter<alehander92> is this shakespeare
16:02:12FromGitter<alehander92> genuinely sounds like literature
16:02:22disruptekwell, it genuinely is.
16:02:44FromDiscord<Varriount> Araq: By `bump`, you mean the Python utility?
16:03:16FromGitter<alehander92> some english proverb
16:03:23disruptekdude.
16:03:30disruptekit is /literally/ shakespeare.
16:03:35FromGitter<alehander92> we have a "the horse when to the river"
16:03:39FromGitter<alehander92> went*
16:03:56FromGitter<alehander92> well maybe shakespeare used a proverb
16:04:11disruptekwell, ol' bill may not have invented it, but it /is/ in one of his plays.
16:04:34FromGitter<alehander92> its john heywood
16:04:51FromGitter<alehander92> radiohead has a song
16:05:26FromGitter<alehander92> sorry for offtopic: time to do-do-do-do-do
16:05:42disruptekhttps://en.wikipedia.org/wiki/John_Heywood#Famous_epigrams
16:06:24disruptekhe spent all of 1546 trying to come up with cool shit to say to people.
16:06:38disrupteknow 500 years later we are still parroting this schlock.
16:06:47disrupteka man could do worse in life.
16:07:08disrupteki'm gonna give up nim and just it around writing down stupid shit to say.
16:09:36*bung joined #nim
16:09:47disruptekactually, 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:46FromGitter<ynfle> What needs to be implemented to use my own type with `Table`
16:12:05FromGitter<ynfle> (With my type as the key?)
16:12:09disruptekhash(x: MyType): Hash
16:12:13FromGitter<ynfle> I implemented has
16:12:16FromGitter<ynfle> *hash
16:12:30FromGitter<alehander92> hmm
16:12:31disruptek`==`()
16:12:35FromGitter<alehander92> still i prefer Proverbs
16:12:55FromGitter<alehander92> backquote ==
16:17:24narimiran@ynfle can you show us a short snippet of your implementation?
16:17:50narimiranuse https://play.nim-lang.org/ so we can run/inspect it immediately
16:24:23FromGitter<ynfle> https://play.nim-lang.org/#ix=2quv
16:24:34FromGitter<ynfle> Thanks in advance
16:24:38AraqVarriount: I don't "enjoy" broken operating systems, far from it
16:26:26*audiophile_ joined #nim
16:27:24Zevvcmon, we know you dig that
16:29:51FromGitter<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:06narimiran@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:13FromGitter<ynfle> So it just blows up recursively
16:30:51narimiranif you do `proc `==`(a, b: NormalizedIdent): bool = cmpIgnoreStyle(a, b) == 0` it seems to be ok
16:31:00*audiophile joined #nim
16:31:01FromGitter<ynfle> But I still `"Hello" != "hello"` & `"hello" == "heLLo"`
16:31:29narimiranthis works: https://play.nim-lang.org/#ix=2quz
16:32:25FromGitter<ynfle> @narimiran Thx!!!
16:34:37*audiophile_ quit (Ping timeout: 246 seconds)
16:35:23*sagax quit (Ping timeout: 260 seconds)
16:37:10FromGitter<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:25narimiranis it because of your hash function?
16:39:13narimirani.e. i'm not sure i understand your question
16:39:16FromGitter<ynfle> I want `"Hello".NormalizedIdent` & `"hello".NormalizedIdent`to occupy different spots in the Table
16:39:33FromGitter<ynfle> So their hashes aren'y the same
16:39:35narimiranhases are different and they occupy different spots in the *hash* table
16:39:38FromGitter<ynfle> *aren't
16:40:08FromGitter<ynfle> So why do I need `==` if they're hashes are different
16:45:08narimiranbecause 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:28FromGitter<ynfle> Ya but `==` and `hash` don't match up
16:52:40FromGitter<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:10FromDiscord<mratsim> H != h
17:06:22FromGitter<ynfle> I know
17:06:28FromDiscord<mratsim> a hash is case-sensitive
17:06:29FromGitter<ynfle> Look at my hash function
17:06:44FromGitter<ynfle> > https://play.nim-lang.org/#ix=2quv ⏎ ⏎ ^^
17:07:05FromDiscord<mratsim> ah yes, Nim handles collision
17:07:21FromDiscord<mratsim> the hash is just to select a bucket but you can have multiple elements in the same bucket
17:07:49FromDiscord<mratsim> I had the same issue yesterday, and it comes up with ref objects as well
17:09:13FromDiscord<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:35FromDiscord<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:57FromDiscord<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:23leorizepass them via passL
17:55:40leorizepassC only use them during compilation
17:55:49leorizepassL is what you want
18:03:40*bung joined #nim
18:03:42*ofelas joined #nim
18:04:49FromDiscord<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:02FromDiscord<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:40PMunch@codic: https://nim-lang.org/docs/osproc.html#execProcess,string,string,openArray[string],StringTableRef,set[ProcessOption]
18:19:14FromDiscord<codic> that link takes me to the top of osproc
18:19:24FromDiscord<codic> Could you give a quick example?
18:19:37FromDiscord<codic> Also, I want to execute a *shell* command, not a process directory
18:19:55PMunchWhat you're looking for is execProcess
18:20:24PMunchDefine "shell command"
18:28:01*bung quit (Ping timeout: 258 seconds)
18:30:29*bung joined #nim
18:32:58FromDiscord<Doongjohn> How can I cast ref object to normal object?↵ex:↵var a: ref Exception = someErr↵var b: Exception = a # <- How?
18:33:40FromDiscord<lqdev> `a[]`
18:34:02FromDiscord<lqdev> the word you're looking for is 'dereference'
18:34:24FromDiscord<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:41disrupteki guess i'm not convinced that #14844 is misbehavior, outside the for-vars being broken at toplevel scope.
18:57:41disbothttps://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:11FromDiscord<Clyybber> disruptek ???
18:59:18FromDiscord<Clyybber> disruptek: Clearly its a bug
18:59:36FromDiscord<Clyybber> The `i`'s are getting mixed up
18:59:43FromDiscord<Clyybber> But only with the method call syntax
18:59:43*bung joined #nim
18:59:54FromDiscord<Clyybber> And I think I found the root cause
18:59:56disruptekwhy are you on discord or gitter?
19:00:07FromDiscord<Clyybber> ¯\_(ツ)_/¯
19:00:13FromDiscord<Clyybber> no particular reason
19:00:18FromDiscord<Clyybber> convinience
19:00:19FromDiscord<Clyybber> maybe
19:02:37disruptekso you're saying it's a bug that the method-call behavior isn't more pervasive. 😉
19:03:51FromDiscord<Clyybber> you mean that it isn't tested enough?
19:05:22disruptekno, i mean that this is the behavior we should expect when we /don't/ use method-call syntax.
19:05:44FromDiscord<Clyybber> the behaviour without the method-call syntax is correct yeah
19:05:57disruptekwell, again, i'm not sure i agree.
19:06:52FromDiscord<Clyybber> why though?
19:07:04FromDiscord<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:58disruptekdon't make me unmute discord.
19:08:40disruptekit's templates being templates. i'm not sure why you expect different.
19:09:02FromDiscord<Clyybber> ugh, don't be stupid
19:09:27disrupteksure.
19:09:55*bung joined #nim
19:10:51FromDiscord<Clyybber> generating invalid C code just because templates is always a bug
19:11:24disrupteki think it should compile but yield the same result.
19:11:26FromDiscord<Clyybber> and as I'm currently investigating it, I can assure you its 100% a bug
19:11:27disruptekis that better?
19:11:32FromDiscord<Clyybber> disruptek: Yeah
19:11:42disruptekokay, then we agree.
19:12:35FromDiscord<Clyybber> wait, which part do you mean?
19:12:54FromDiscord<Clyybber> do you mean the behaviour with non-method-call syntax should behave like the method-call-syntax one?
19:13:26disruptekyes.
19:13:37FromDiscord<Clyybber> then we *definitely* don't agree
19:13:40disrupteklook, let me ask you this.
19:13:47disruptekdo you think the assertion should fail?
19:14:25disruptekit's not a trick question.
19:14:31*bung quit (Ping timeout: 260 seconds)
19:19:06*bung joined #nim
19:21:23disrupteksorry, what did i miss?
19:21:39disrupteki was cleaning a toilet. it's something i like to give my undivided attention.
19:22:06FromGitter<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:59disruptekthe radiusing in github is driving me crazy.
19:25:23FromGitter<iffy> radiusing?
19:26:39disruptekradiusing, son!
19:27:13FromDiscord<Doongjohn> why does this not work? https://play.nim-lang.org/#ix=2qvu
19:27:36disruptek!last clyybber
19:27:37disbotclyybber spoke in 12#nim 13 minutes ago 12https://irclogs.nim-lang.org/29-06-2020.html#19:13:37
19:27:43disruptekjesus.
19:28:14*bung quit (Ping timeout: 240 seconds)
19:29:20*bung joined #nim
19:31:53acidxzz
19:31:57acidxer. sorry.
19:32:06disrupteki was so close.
19:33:33FromDiscord<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:20FromDiscord<lqdev> for some reason I've never been able to use these without the compiler erroring out.
19:35:12FromDiscord<Doongjohn> ok.. it's kinda weird
19:36:06*bung quit (Ping timeout: 256 seconds)
19:36:18FromDiscord<Clyybber> oh, disruptek: No I don't think it should fail
19:36:28FromDiscord<Clyybber> I was making food
19:36:36disruptekhmm, interesting.
19:37:17disruptekyou are aware of the for-var-at-toplevel bug, right?
19:37:40FromDiscord<Clyybber> yeah, but its not related
19:37:43FromDiscord<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:59disruptekokay, so you think the template should be evaluated once?
19:38:01FromDiscord<Clyybber> disruptek: You can confirm it by putting the both in expandMacros:
19:38:04FromDiscord<Clyybber> No
19:38:10FromDiscord<Clyybber> It should be evaluated twice
19:38:19disruptekyou think the scope should be limited to the invocation?
19:38:27FromDiscord<Clyybber> No
19:38:34FromDiscord<Clyybber> But the `i` should be different
19:38:45disrupteksame scope, different i?
19:38:51disruptekpsym != psym?
19:38:59FromDiscord<Clyybber> heh, no
19:39:13*marnix joined #nim
19:39:23FromDiscord<Clyybber> maybe I misunderstood what you said about scopes
19:39:32FromDiscord<Clyybber> but the `i` clearly shouldn't be the same
19:39:35FromDiscord<Clyybber> because its getting gensymmed
19:39:59disruptekbut it technically /is/ the same.
19:40:05FromDiscord<Clyybber> no they are not
19:40:07disruptekit's symbol is used twice.
19:40:11FromDiscord<Clyybber> no
19:40:14disruptekits, too.
19:40:18FromDiscord<Clyybber> oh you mean in the template?
19:40:22FromDiscord<Clyybber> that doesn't matter
19:40:22disruptekyeah?
19:40:27*bung joined #nim
19:40:38FromDiscord<Clyybber> the bug is that the `i` is shared *across* templates
19:40:44disrupteki can't even remember where the code is that i have in my head.
19:40:52FromDiscord<Clyybber> (edit) 'templates' => 'the template invocations'
19:40:56FromDiscord<Clyybber> lol
19:41:14disruptekwell, it's gensym'd and it's in the same scope. i dunno what you expect.
19:41:21disruptekto me, that's the behavior i expect.
19:41:32*Senny joined #nim
19:41:39disruptekit's literally the same code. that's the idea of templates.
19:41:47FromDiscord<Clyybber> no its not
19:41:55FromDiscord<Clyybber> symbols in templates get gensymmed
19:42:00FromDiscord<Clyybber> variables at least
19:42:09disruptekyes, but a template is not a generic.
19:42:14disruptekit's not a factory for making code.
19:42:15FromDiscord<Clyybber> no its not
19:42:18FromDiscord<Clyybber> it is
19:42:19disruptekit's a factory for substitution.
19:42:34FromDiscord<Clyybber> you are hung up in abstractions and terminology
19:42:38disrupteknot really.
19:42:39FromDiscord<Clyybber> its a bug.
19:42:44disruptektemplates are c-macros.
19:42:51FromDiscord<Clyybber> no they are not
19:42:56FromDiscord<Clyybber> C-macros are string based
19:43:01FromDiscord<Clyybber> templates are ast based
19:43:02disrupteksemantically, they are.
19:43:06FromDiscord<Clyybber> no
19:43:10FromGitter<alehander92> lets
19:43:13FromDiscord<Clyybber> they are not the same
19:43:15FromGitter<alehander92> just hug each other
19:43:28FromGitter<alehander92> some days you just need ast-s and tokens
19:43:29*waleee-cl quit (Quit: Connection closed for inactivity)
19:43:34FromDiscord<Clyybber> alehander92: We are hugging, we are whispering all this into each others ears
19:43:40FromDiscord<Clyybber> :D
19:43:55FromGitter<alehander92> ehh
19:43:59FromGitter<alehander92> ease it up a bit
19:44:03disruptekwhisper me this, batman:
19:44:07disruptekhow do they differ?
19:44:31FromDiscord<Clyybber> they differ because a symbol is unique per template instantiation
19:44:39FromDiscord<Clyybber> but in this case its not
19:44:40disruptekby what spec?
19:44:41FromDiscord<Clyybber> thats the whole bug
19:44:47FromDiscord<Clyybber> disruptek: By *the* spec
19:45:06*bung quit (Ping timeout: 265 seconds)
19:45:11disrupteklet me play for a sec.
19:45:56leorizeI 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:15leorizespoiler: they don't have the same semantics
19:46:54disruptekhygienic by default.
19:47:02FromDiscord<Clyybber> exactly
19:48:18disruptekso is your claim that it's an eval of the gensym issue?
19:48:29alehander92_gensym
19:48:38alehander92_i never rally understood that in details
19:49:02disruptekit does what it says on the tin.
19:49:05leorizeit just generates a symbol with some random suffix to make it unique
19:49:12*leorize quit (Quit: WeeChat 2.8)
19:49:20FromDiscord<Clyybber> yeah, the `i` s should be unique
19:49:25FromDiscord<Clyybber> in this case they aren't but thats a bug
19:49:31disrupteki guess the debate is whether genym semantics are being used correctly in templates.
19:49:43FromDiscord<Clyybber> there is no debate
19:49:46disrupteklol
19:49:51*endragor joined #nim
19:49:51FromDiscord<Clyybber> :p
19:50:31*bung joined #nim
19:51:03disruptektwo uses should yield two symbols; can we agree about that?
19:51:11FromDiscord<Clyybber> yeah, exactly
19:51:19disruptekso one use? one symbol, right?
19:52:05disruptekclyybber says no.
19:52:16disruptekclyybber says, one use, three symbols.
19:52:23disruptekor more. even more symbols.
19:52:36disruptekclyybber is a little nutty that way.
19:52:43Yardanicowhy?
19:52:47FromDiscord<Clyybber> lol, I didn't
19:52:51FromDiscord<Clyybber> say that
19:53:05FromDiscord<Clyybber> disruptek: See, there are two uses here
19:53:15FromDiscord<Clyybber> Because the last templates evaluates its arg twice
19:53:24FromDiscord<Clyybber> (edit) 'templates' => 'template'
19:53:26disruptekso when i'm in a template and i have an input param of `s`, that's a symbol that is evaluated when?
19:53:44FromDiscord<Clyybber> whenever you use it
19:53:57disruptekso (s, s) is two invocations.
19:53:58FromDiscord<Clyybber> if you use it twice it will get evaluated twice
19:54:01FromDiscord<Clyybber> yeah
19:54:05disruptekergo, 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:59FromDiscord<Clyybber> yeah
19:55:06disruptekokay, i'm fine with that.
19:55:33Yardanicodisruptek: just so you know - that code snipped worked fine in 1.0.6
19:55:45disruptekwhy is the ufcs bug with templates such a pita to fix?
19:55:59FromDiscord<Clyybber> I'm not sure it is. But I'm on it
19:56:25disrupteknice.
19:56:55disruptekalmost feels like an optimization that's overreaching.
19:57:21FromDiscord<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:04disruptek~gitnim
20:18:05disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek
20:18:35disruptekwhat'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:51disruptekit just feels silly to use anything else.
20:26:23*endragor joined #nim
20:26:50Yardanicowow crashes from https://github.com/nim-lang/Nim/pull/14790 are getting more interesting :P not compiler crashes now
20:26:50disbotscoped memory management
20:26:51Yardanicobut stuff like
20:27:07Yardanico*** stack smashing detected ***: terminated SIGABRT: Abnormal termination.
20:30:54*endragor quit (Ping timeout: 260 seconds)
20:35:17FromDiscord<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:41Yardanicowell, what encoding does this library use?
20:35:43Yardanicodoes it just do utf8?
20:35:53FromDiscord<Shucks> i guess yes
20:35:54Yardanicoor is that windows?
20:36:24Yardanicoanyway try cast[cstring](addr myszDllPath[0])
20:36:37Yardanicoit should work assuming that string is null-terminated
20:39:33FromDiscord<Shucks> if I'm just using cstring in that struct the library doesn't gets any data.
20:39:38Yardanicowell of course
20:40:54FromDiscord<Shucks> heh
20:41:09Yardanicowell one of the ways is just copy back by iterating over your modified cstring
20:42:10Yardanicoalso you can try cheating a bit and using "szDllPath: cstring" instead, not sure if that would work though
20:42:12Yardanicobut it might :P
20:45:11leorizeyou can do that, but it will break the ABI of the struct
20:45:31leorize@Shucks so you wanted to copy the nim string into that cstring?
20:46:41*Trustable quit (Remote host closed the connection)
20:47:51FromDiscord<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:08FromDiscord<Shucks> Im not sure how a char array can be a string. Im not into cpp at all lol
20:48:12Yardanicowhat library is it btw? if it's not a secret
20:48:19leorizeit's zlib
20:48:59leorize`char*` is basically the same as `char szDllPath[MAX_PATH * 2]` btw :)
20:49:10leorizeexcept that the latter explicitly state the size requirement and is a part of the struct
20:49:25FromDiscord<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:50leorizelol the convention makes me assume that it's zlib :P
20:50:52leorize@Shucks if I can see the C definition I can let you know how to wrap it
20:51:02leorizeah I'm blind :P
20:51:28Yardanico@Shucks WideCString is for utf-16
20:51:30Yardanicofor windows stuff
20:54:27*ofelas quit (Ping timeout: 240 seconds)
20:59:48FromDiscord<Shucks> mh :/
21:01:51leorize[m]@Shucks try this https://play.nim-lang.org/#ix=2qvZ
21:02:27leorizeI found the header and corrected your definitions according to it
21:02:57*ofelas joined #nim
21:03:53FromDiscord<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:35FromDiscord<Shucks> ```Waiting for DLL...↵Injecting in: 16448↵DLL INJECTED!↵```
21:09:01FromDiscord<Shucks> I finally can go to bed. My boss will thanks you.
21:09:11FromDiscord<Shucks> (edit) removed 'will'
21:10:04Yardanicolol
21:10:26FromDiscord<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:47Yardanicojust wrap it in some proc/template then?
21:11:11*kenran quit (Quit: leaving)
21:11:22FromDiscord<Shucks> Yea gonna deal with that tomorrow. Thanks again ❤️
21:12:44leorizenp :)
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:36FromGitter<ynfle> Any idea why there might be a <original file name>.out file in my `src` directory?
21:42:50disruptekyou have a directory of the same name.
21:43:38*bung joined #nim
21:43:38FromGitter<ynfle> Ohhhhh
21:43:40FromGitter<ynfle> Thx
21:43:43FromGitter<ynfle> !!!
21:43:44Yardanico@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:47Yardanicoalso there's "nim r file.nim" btw
21:43:51Yardaniconot 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:05FromDiscord<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:01disruptekhttps://play.nim-lang.org/#ix=2qwm
22:54:36Yardanico?
22:55:24Yardanicowell yeah it shouldn't allow to have != here :P
22:56:56disrupteki think it's nice.
22:57:23disrupteki have a feeling i can find a cute use for it.
22:58:40disruptekremember, it's not a crime if no one saw you do it.
22:59:39FromDiscord<Vindaar> @codic not quite sure what you need, but maybe this can be of use https://github.com/vindaar/shell
23:00:03FromGitter<ynfle> Great library by the way
23:01:55FromDiscord<Vindaar> thanks!
23:03:41*oculux quit (Remote host closed the connection)
23:04:48FromDiscord<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:36FromDiscord<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:05FromGitter<ynfle> 👍
23:44:00*ofelas joined #nim
23:48:47FromGitter<ynfle> Thx Yardanico
23:49:02*ofelas quit (Ping timeout: 260 seconds)
23:49:09FromGitter<ynfle> It's not on stable
23:52:14*ofelas joined #nim
23:57:13*ofelas quit (Ping timeout: 260 seconds)