<< 11-04-2024 >>

00:53:07FromDiscord<nikruiz> sent a long message, see https://pasty.ee/HpirJlxzzAqO
01:12:31*beholders_eye quit (Read error: Connection reset by peer)
01:13:33FromDiscord<that_dude.> <@&371760044473319454> Sus?
01:18:08*beholders_eye joined #nim
01:43:16FromDiscord<Robyn [She/Her]> Is this the same guy as before but with a different account?
01:52:04*Jjp137 quit (Ping timeout: 260 seconds)
01:52:56*def- quit (Quit: -)
01:53:44*def- joined #nim
01:58:16*fallback quit (Read error: Connection reset by peer)
01:58:40*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
02:01:29*fallback joined #nim
02:07:25*def- quit (Quit: -)
02:08:03*def- joined #nim
02:19:05*def- quit (Quit: -)
02:19:16*def- joined #nim
02:42:17*def- quit (Quit: -)
02:44:18*def- joined #nim
02:57:39*def- quit (Quit: -)
02:59:44*def- joined #nim
03:06:17*def- quit (Quit: -)
03:19:48*beholders_eye quit (Ping timeout: 252 seconds)
03:24:34*def- joined #nim
03:28:11FromDiscord<s0cketinc> In reply to @odexine "uh welcome": ty
03:48:22*SchweinDeBurg joined #nim
03:58:12*def- quit (Quit: -)
03:58:43*def- joined #nim
04:00:31*Jjp137 joined #nim
04:01:36*def- quit (Client Quit)
04:01:48*def- joined #nim
04:05:43*rockcavera quit (Remote host closed the connection)
04:10:33FromDiscord<Phil> In reply to @nikruiz "Hello, we are looking": This is not nim related, or at least it seems to me like it. This channel is for programming related chatter, not for job seeking.↵Thus I'm deleting your post and giving you a warning. Repeat infractions will eventually lead to a ban, keep that in mind
04:11:10FromDiscord<Elegantbeef> Bold of you to assume there is a person behind that pretendboard
04:11:24FromDiscord<Elegantbeef> So uhh Phil gtkdjustments huh? 😄
04:12:04FromDiscord<Phil> its 6 in the morning and I just got up, I am not thinking about anything
04:19:39*rockcavera joined #nim
04:27:00*ntat joined #nim
04:36:28FromDiscord<the_real_hypno> If one of you guys/girls has educational Code/sources of additional information regarding everything involving Nims FFI I would be happy if you would mention me or paste it into a DM. Best case would be actual real life thinkgs someone has implemented. I happy about everything someone is willing to share. Gy
04:36:38FromDiscord<the_real_hypno> (edit) "Gy" => "Ty"
04:37:31FromDiscord<Elegantbeef> https://github.com/beef331/seeya has a bunch of Nim -\> C material
04:38:14*def- quit (Quit: -)
04:39:18*def- joined #nim
04:54:35FromDiscord<demotomohiro> In reply to @the_real_hypno "If one of you": https://internet-of-tomohiro.pages.dev/nim/clibrary.en↵This is related to Nim's FFI.
04:56:45*def- quit (Quit: -)
05:02:04*def- joined #nim
05:22:17*def- quit (Quit: -)
05:24:13*def- joined #nim
05:33:50*def- quit (Quit: -)
05:34:36*def- joined #nim
05:49:08*def- quit (Quit: -)
05:57:48*Guest43 joined #nim
06:03:01*Guest43 quit (Quit: Client closed)
06:09:58*def- joined #nim
06:11:00*rockcavera quit (Remote host closed the connection)
06:18:39*ntat quit (Quit: Leaving)
06:42:27*def- quit (Quit: -)
06:42:49*def- joined #nim
07:00:57*def- quit (Quit: -)
07:01:15*def- joined #nim
07:04:12*def- quit (Client Quit)
07:05:07*def- joined #nim
07:10:46*def- quit (Quit: -)
07:11:18*def- joined #nim
07:14:13FromDiscord<the_real_hypno> In reply to @demotomohiro "https://internet-of-tomohiro.pages.dev/nim/clibrary": Thanks!
07:14:31FromDiscord<the_real_hypno> In reply to @Elegantbeef "https://github.com/beef331/seeya has a bunch": Thank you, too
07:15:08*def- quit (Client Quit)
07:15:52*ntat joined #nim
07:16:13*def- joined #nim
07:51:15*ntat quit (Quit: Leaving)
07:54:24*def- quit (Quit: -)
08:12:48*def- joined #nim
08:27:32*def- quit (Quit: -)
08:28:01*def- joined #nim
08:31:01*def- quit (Client Quit)
08:32:21*def- joined #nim
08:35:22*def- quit (Client Quit)
08:41:52*def- joined #nim
08:45:14FromDiscord<vindaar> In reply to @om3ga "<@150345911057252352>: please ignore, I": Cool, good to know!
08:57:26FromDiscord<ringabout> > Neither inline nor closure iterators have the special result variable.↵Why isn't it disabled in the closure iterators?
09:11:57FromDiscord<bsljth> Have sum types come to Nim yet?
09:12:21FromDiscord<bsljth> I mean the 2024 variant, as announced.
09:15:57FromDiscord<ringabout> In reply to @bsljth "Have sum types come": Not yey
09:16:00FromDiscord<ringabout> (edit) "yey" => "yet"
09:18:53FromDiscord<bsljth> Any idea when it'll be released?
09:19:48FromDiscord<ringabout> I don't see any effort has been made on that direction
09:50:18*def- quit (Quit: -)
09:51:08*def- joined #nim
10:21:51*def- quit (Quit: -)
10:22:07*def- joined #nim
10:36:01*def- quit (Quit: -)
10:47:45*PMunch joined #nim
10:55:23*def- joined #nim
11:03:37FromDiscord<0b110111101> why i cannot do ↵↵system.auto ?????
11:03:54FromDiscord<0b110111101> auto is defined there in system
11:07:06FromDiscord<nnsee> In reply to @0b110111101 "why i cannot do": what exactly are you trying to do? post your code on https://play.nim-lang.org
11:07:22FromDiscord<0b110111101> i told u
11:07:29FromDiscord<0b110111101> why i cannot use system.auto
11:07:51FromDiscord<nnsee> also as a rule of thumb, you should never have to specify (or import) `system`, it's automatically available
11:07:57FromDiscord<nnsee> In reply to @0b110111101 "why i cannot use": "use" how?
11:08:24FromDiscord<nnsee> respectfully, it's impossible for us to help you if you don't tell us what you're trying to do
11:08:35FromDiscord<0b110111101> In reply to @nnsee "also as a rule": why i should never ?
11:08:50FromDiscord<nnsee> i just told you
11:09:02FromDiscord<0b110111101> In reply to @nnsee "respectfully, it's impossible for": var name suto = "hello world"↵↵this is what i am trying to do
11:09:10FromDiscord<odexine> your syntax is wrong
11:09:10FromDiscord<0b110111101> (edit) "suto" => "auto"
11:09:15FromDiscord<0b110111101> why ?
11:09:18FromDiscord<odexine> `var name: auto = "hello world"`
11:09:19FromDiscord<nnsee> In reply to @0b110111101 "why i should never": everything in `system` is automatically available
11:09:24FromDiscord<nnsee> read the top of this page: https://nim-lang.org/docs/system.html
11:09:29FromDiscord<odexine> you need a colon before the type of the variable
11:10:45FromDiscord<0b110111101> In reply to @nnsee "read the top of": ok but i see the auto type is under types
11:10:51FromDiscord<0b110111101> i just wanna try
11:11:09FromDiscord<nnsee> In reply to @0b110111101 "var name auto =": and what error message are you getting? what does the error message _tell you_?
11:11:55FromDiscord<0b110111101> sent a code paste, see https://play.nim-lang.org/#pasty=FjbPhWddSPXS
11:12:25*def- quit (Quit: -)
11:12:27FromDiscord<0b110111101> sent a code paste, see https://play.nim-lang.org/#pasty=ZpUKIAqVuJwl
11:12:34*beholders_eye joined #nim
11:12:42*def- joined #nim
11:13:22FromDiscord<nnsee> again
11:13:30FromDiscord<nnsee> you _do not_ specify `system`
11:13:39FromDiscord<0b110111101> why ?????????
11:13:45FromDiscord<0b110111101> i am curious
11:13:47FromDiscord<0b110111101> why
11:14:14FromDiscord<nnsee> did you read the documentation i sent you?
11:14:16FromDiscord<odexine> you can't
11:14:18FromDiscord<0b110111101> yes
11:14:24FromDiscord<0b110111101> but i still want to know why
11:14:37FromDiscord<0b110111101> it says system depends on the compiler and the compiler depends on it
11:14:40FromDiscord<0b110111101> and many do so
11:14:49FromDiscord<odexine> i'm actually unsure why, because you can specify `system.add` and other things just fine
11:14:59FromDiscord<odexine> i assume `auto` is special because of compiler magic
11:15:00FromDiscord<nnsee> because auto is a special keyword
11:15:12FromDiscord<nnsee> specifying `system.auto` uses the `auto` type which is not the same as the keyword
11:15:37*def- quit (Client Quit)
11:16:08FromDiscord<0b110111101> is auto a keyword ?
11:16:14FromDiscord<odexine> auto doesnt seem to be a keyword as specified by the manual
11:17:25FromDiscord<0b110111101> yes it is not a keyword it is not listed with the reserved ones
11:17:32FromDiscord<0b110111101> that is why i am so confused
11:17:54FromDiscord<nnsee> In reply to @odexine "auto doesnt seem to": not "keyword" per the technical meaning, but the same with all of the other "special types" like untyped, any, void etc
11:18:03FromDiscord<odexine> okay so its a magic
11:18:28FromDiscord<0b110111101> listed but cannot be referenced with system
11:18:32FromDiscord<0b110111101> hmmmmmmmmmmmmmmmm
11:18:40FromDiscord<0b110111101> i wanna know this magic
11:18:49FromDiscord<0b110111101> i will look for the system source code
11:25:05*casaca quit (Remote host closed the connection)
11:25:05*robertmeta quit (Remote host closed the connection)
11:25:05*mronetwo quit (Remote host closed the connection)
11:25:06*ursa-major quit (Read error: Connection reset by peer)
11:25:06*johuck quit (Remote host closed the connection)
11:25:07*noeontheend quit (Remote host closed the connection)
11:25:07*adigitoleo quit (Remote host closed the connection)
11:25:16*mronetwo joined #nim
11:25:22*ursa-major joined #nim
11:25:25*noeontheend joined #nim
11:25:27*robertmeta joined #nim
11:25:29*johuck joined #nim
11:25:32*adigitoleo joined #nim
11:25:57*ursa-major quit (Remote host closed the connection)
11:26:03FromDiscord<nnsee> https://github.com/nim-lang/Nim/blob/devel/compiler/semtypes.nim#L2250
11:26:23*adigitoleo quit (Read error: Connection reset by peer)
11:26:24*robertmeta quit (Remote host closed the connection)
11:26:24*johuck quit (Remote host closed the connection)
11:26:24*noeontheend quit (Remote host closed the connection)
11:26:25*mronetwo quit (Remote host closed the connection)
11:26:28FromDiscord<nnsee> the compiler only detects `auto` and not `system.auto`
11:27:47FromDiscord<nnsee> if you look two lines above you can see this is the code path processing `mExpr` - if you read the `system` documentation or the source for that type, you can see it is annotated with a `.magic: Expr` pragma
11:28:10*mronetwo joined #nim
11:28:10FromDiscord<nnsee> at least, that's my guess on what is happening exactly
11:28:14FromDiscord<nnsee> might be totally wrong here too
11:28:15*ursa-major joined #nim
11:28:15*noeontheend joined #nim
11:28:17*johuck joined #nim
11:28:19*robertmeta joined #nim
11:28:24*adigitoleo joined #nim
11:33:04FromDiscord<_nenc> oh my god, system is like Python's `builtin`
11:33:53*def- joined #nim
11:34:05FromDiscord<wannabelokesh> Nvim for Nim setup help needed.
11:34:29FromDiscord<wannabelokesh> Tools I'm using are Lazy and Mason, nvim-cmp (idk the names are pretty confusing)
11:39:07FromDiscord<0b110111101> i see
11:43:10*def- quit (Quit: -)
11:44:00*def- joined #nim
11:45:04FromDiscord<wannabelokesh> can you help me pls?
11:50:13*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
11:55:02FromDiscord<marioboi3112> is there anyways to use Java libraries through jnim, https://github.com/yglukhov/jnim
11:55:07FromDiscord<marioboi3112> (edit) "anyways" => "anyway"
12:04:48*def- quit (Quit: -)
12:05:31*def- joined #nim
12:15:08NimEventerNew thread by foxoman: Windows command injection CVE - Nim affected too, see https://forum.nim-lang.org/t/11412
12:15:24FromDiscord<firasuke> How do you ensure that `walkDirRec` yields files in an alphabetical order?
12:20:55*def- quit (Quit: -)
12:29:37*def- joined #nim
12:46:10FromDiscord<sOkam! 🫐> is there a way to generate an `import ./dir/file` for every file inside a folder, without manually writing those imports?
12:47:37FromDiscord<solitudesf> In reply to @heysokam "is there a way": yeah, write a macro
12:48:32FromDiscord<sOkam! 🫐> ok, but how. I figure a macro is the way, but any tips would be really helpful
12:49:02FromDiscord<sOkam! 🫐> I always get giga-stuck with macro logic, even for the simplest stuff
12:55:10FromDiscord<solitudesf> walk the directory and emit an import for each file
12:56:59FromDiscord<sOkam! 🫐> I meant in terms of generating the AST required
12:57:21FromDiscord<solitudesf> do you need a macro tutorial or what?
12:57:38FromDiscord<solitudesf> https://nim-lang.org/docs/tut3.html
12:58:00FromDiscord<sOkam! 🫐> I don't appreciate the passive agressiveness, I would prefer being ignored and having to figure it out
12:58:15FromDiscord<solitudesf> lol, i was asking
12:58:21FromDiscord<solitudesf> feel free to be upset
12:58:26FromDiscord<sOkam! 🫐> the "or what" made it passive agressive
12:58:47FromDiscord<sOkam! 🫐> im not upset, im letting you know how your message sounded, thats all
13:01:03*ntat joined #nim
13:01:36FromDiscord<pmunch> A combination of `walkDir` (or `walkDirRec` depending on your needs) with `nnkImportStmt.newTree(filename.ident)` should work
13:01:50FromDiscord<pmunch> Might have to fiddle around with getting the filename right
13:02:11FromDiscord<sOkam! 🫐> kk will try that, ty for pointing me in the right direction ✍️ 🙏
13:02:35FromDiscord<pmunch> I guess `toLit` might be better, seeing how you can use strings in `import` to import files
13:04:17FromDiscord<pmunch> For us who are used to writing macros it's easy to forget that their logic might be a bit foreign. I think that's why Solitude offered up some pretty basic advice, because it's a fairly simple piece of AST you want to generate.
13:05:01FromDiscord<sOkam! 🫐> I figured, yeah. ty for clarifying
13:09:44FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=LhRQQkErAiOP
13:10:39FromDiscord<pmunch> Oh sorry, it's `newLit` for basic types to a literal NimNode
13:11:21FromDiscord<pmunch> Why do you preface everything with `macros`?
13:11:59FromDiscord<sOkam! 🫐> because I get giga confused where things come from already, without prefacing explicitly
13:12:07FromDiscord<pmunch> In reply to @wannabelokesh "can you help me": You'd have to be a bit more specific..
13:12:09FromDiscord<sOkam! 🫐> (edit) "because I get giga confused where things come from already, without prefacing explicitly ... " added "it would be much worse"
13:12:23FromDiscord<pmunch> Hmm, okay
13:12:41FromDiscord<pmunch> Rule of thumb, everything that has to do with macros comes from the macros module 😛
13:13:24FromDiscord<sOkam! 🫐> but you have to mentally parse to remember it
13:13:32FromDiscord<sOkam! 🫐> when its explicit, there is no mental parsing at all
13:13:52PMunchBut you have to parse out the `macros` part when you don't need that information..
13:13:53FromDiscord<sOkam! 🫐> _(which i struggle with a lot, so for me personally its extremely helpful)_
13:14:16PMunchI much prefer `nnkImportStmt.newTree(filename.newLit)`, just flows better in my brain
13:14:36FromDiscord<sOkam! 🫐> because you know where things come from and are comfortable with those things
13:14:37PMunchWe're all wired differently, so do whatever works for you :)
13:14:57FromDiscord<sOkam! 🫐> yeah also that. I believe its a "my brain" thing, noticed since I first started programming
13:19:02FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=jUDKheKulKez
13:19:26FromDiscord<sOkam! 🫐> `tst.nim(14, 10) Error: expression has no type:` sorry
13:20:08FromDiscord<pmunch> Add a `result = newStmtList()` before your loop
13:20:15FromDiscord<pmunch> Otherwise it's a nil
13:20:53FromDiscord<sOkam! 🫐> tyty
13:31:30*def- quit (Quit: -)
13:32:11*def- joined #nim
13:33:08*rockcavera joined #nim
13:35:04*def- quit (Client Quit)
13:36:03*def- joined #nim
13:37:20FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=AZHotXJKIPXz
13:38:17FromDiscord<sOkam! 🫐> trying `result.add newTree(nnkDiscardStmt, newEmpty())`, but it doesn't find the `newEmpty` and doesn't let me add a newtree with nnkEmpty either 😦
13:42:16*def- quit (Quit: -)
13:43:15FromDiscord<solitudesf> You dont need to create empty
13:44:03*beholders_eye quit (Ping timeout: 252 seconds)
13:44:56FromDiscord<sOkam! 🫐> but its failing, so im trying to stop it from crashing on compilation
13:45:07FromDiscord<solitudesf> failing how
13:45:33*def- joined #nim
13:45:48FromDiscord<sOkam! 🫐> I found the issue. randomly tried `macro ( ... ) :untyped= ...` instead of `: NimNode = ...` and it worked
13:46:48FromDiscord<solitudesf> yeah, you return NimNode only in macro context, not outside of it.
13:50:39*def- quit (Quit: -)
13:51:04FromDiscord<pmunch> A macro returning `NimNode` would mean that it returns an AST which when executed returns a `NimNode`
13:51:11FromDiscord<pmunch> Macros are a bit strange that way
13:54:27*def- joined #nim
14:00:18*def- quit (Quit: -)
14:01:14*SchweinDeBurg joined #nim
14:13:43*PMunch quit (Quit: Leaving)
14:19:13*def- joined #nim
14:28:06NimEventerNew thread by stbalbach: Include a file dynamically, see https://forum.nim-lang.org/t/11414
14:30:05*def- quit (Quit: -)
14:30:58*def- joined #nim
14:34:08*def- quit (Client Quit)
14:40:55FromDiscord<0b110111101> In reply to @nnsee "https://github.com/nim-lang/Nim/blob/devel/compiler": is the system a collection of libraries or it is just for nim ?
14:47:16*krux02 joined #nim
14:52:15*def- joined #nim
14:54:49FromDiscord<jakub19245sdf> Any scripters that are willing to help me with this peice of code please DM me.
15:09:55*def- quit (Quit: -)
15:23:26*ntat quit (Quit: Leaving)
15:28:12FromDiscord<0b110111101> where is quit defined ? https://media.discordapp.net/attachments/371759389889003532/1228003678103797892/9958.png?ex=662a768c&is=6618018c&hm=a81257e109e4cd39963e262c4482b7731ec42b3bda236affd9b2de7ac5157292&
15:29:04FromDiscord<Phil> In reply to @jakub19245sdf "Any scripters that are": You can just post it here, this server tends to not deal with private help
15:29:27FromDiscord<Robyn [She/Her]> In reply to @0b110111101 "where is quit defined": In system.nim iirc
15:29:36FromDiscord<0b110111101> ok
15:29:51FromDiscord<0b110111101> thanks for the comment
15:29:56FromDiscord<Robyn [She/Her]> No worries!
15:32:40*def- joined #nim
15:33:27FromDiscord<kots> sent a long message, see https://pasty.ee/jgdFTpQQUYJW
15:34:39FromDiscord<0b110111101> thanks it is much easier to look through the doc this way
15:40:14*def- quit (Quit: -)
15:40:51*def- joined #nim
15:52:18*beholders_eye joined #nim
15:58:44FromDiscord<0b110111101> https://media.discordapp.net/attachments/371759389889003532/1228011359514660894/77.png?ex=662a7db3&is=661808b3&hm=27c7402cad9a148c5ab6fa9ac83fc8afb0b9fee68ce6ebd973a61d17c1b21bb0&
15:58:49FromDiscord<0b110111101> https://media.discordapp.net/attachments/371759389889003532/1228011378711855115/88.png?ex=662a7db8&is=661808b8&hm=8fb24721daa63be0049b6930b92d56db13c1a54f287f39b17bc50250e9ad1d6c&
15:58:53FromDiscord<0b110111101> is ptr a type or a keyword ?
15:58:59*krux02_ joined #nim
16:01:22*krux02 quit (Ping timeout: 246 seconds)
16:02:37FromDiscord<_nenc> In reply to @0b110111101 "is ptr a type": a keyword for representing types
16:04:16*xet7 quit (Remote host closed the connection)
16:04:21FromDiscord<kots> It's a keyword in that you're not allowed e.g. to use it as a variable name
16:04:23FromDiscord<0b110111101> In reply to @_nenc "a keyword for representing": thanks for the comment
16:04:42FromDiscord<kots> It's also a typeclass (?)
16:05:46FromDiscord<_nenc> btw if you want `void` it's `pointer` not `ptr`, and `T` is `ptr T`
16:06:40FromDiscord<0b110111101> In reply to @_nenc "btw if you want": i know
16:07:24*def- quit (Quit: -)
16:08:15FromDiscord<kots> ptr is seemingly also a typeclass for typed pointers (i.e. not `pointer`)
16:09:01FromDiscord<0b110111101> i am not at that chapter yet
16:09:06FromDiscord<0b110111101> i am reading the docs
16:27:05FromDiscord<0b110111101> what is the point of defining float that is the same as float64 it is an alias to float64 https://media.discordapp.net/attachments/371759389889003532/1228018495191646299/534.png?ex=662a8458&is=66180f58&hm=8031c68dbd981fba8fa2d358fa461225645d03dd136a4b08340f02fdcc612f56&
16:27:18FromDiscord<0b110111101> and magic ?
16:27:24*def- joined #nim
16:30:24*def- quit (Client Quit)
16:31:31*def- joined #nim
16:35:24rockcavera0b110111101 `float` will always be `float64`, regardless of the destination. Different from `int` and `uint`.
16:35:56rockcavera0b110111101 `magic` pragma delegates the implementation to the compiler
16:40:34FromDiscord<0b110111101> In reply to @rockcavera "0b110111101 `float` will always": so what is the point ?
16:48:14FromDiscord<jakub19245sdf> Does anyone want to help me / work for me in this project?
16:51:15*def- quit (Quit: -)
16:51:48FromDiscord<pmunch> In reply to @jakub19245sdf "Does anyone want to": You haven't shared any details what it's about, so kinda hard for people to tell. As Phil pointed out this server doesn't really deal with help over DMs. If you have anything to say you can say it here.
16:53:17*def- joined #nim
16:53:23FromDiscord<jakub19245sdf> yh
16:54:14rockcavera0b110111101 I don't know. It may be that the purpose was the same as `int` and `uint`, but it was never implemented for some reason
16:56:12*def- quit (Client Quit)
16:56:55FromDiscord<0b110111101> In reply to @rockcavera "0b110111101 I don't know.": i understand but now i am confused whether to use or not since it doesn't have any meaning and why i would use it
16:58:41FromDiscord<stoneface86> I use `float` when the exact precision used doesn't matter
16:59:27FromDiscord<stoneface86> same idea with ints
16:59:37*def- joined #nim
17:00:25FromDiscord<0b110111101> it is still meaningless
17:00:33FromDiscord<0b110111101> you can use float64
17:01:24FromDiscord<stoneface86> but then I'd have to type two extra characters
17:02:16FromDiscord<0b110111101> float is not a machine type why would you switch between the two types
17:02:34FromDiscord<0b110111101> you are making use of a meaningless type
17:03:46FromDiscord<stoneface86> it's the default floating point type in nim, I wouldn't say it's meaningless
17:04:49FromDiscord<0b110111101> i understand that you want to explicitly say this is 8 bytes when needed
17:04:59FromDiscord<0b110111101> i understand exactly what you are doing
17:05:15FromDiscord<0b110111101> but it is meaningless
17:06:02FromDiscord<odexine> i dont know why you're debating this
17:06:27FromDiscord<0b110111101> In reply to @odexine "i dont know why": do you use it rika ?
17:06:30FromDiscord<odexine> what does it matter to you what other people use in their code if it is as inconsequential as two characters
17:06:34FromDiscord<odexine> In reply to @0b110111101 "do you use it": i do not care
17:06:41FromDiscord<odexine> you should not either
17:07:00FromDiscord<0b110111101> i don't really care i am just curious
17:07:40FromDiscord<odexine> it doesnt matter
17:08:52FromDiscord<0b110111101> In reply to @odexine "it doesnt matter": fine
17:16:45FromDiscord<kots> Use `float` when you want a floating point number. `float32` when you want a 32 bit floating point number. `float64` when you want a 64 bit floating point number. Case closed.
17:17:53FromDiscord<0b110111101> In reply to @k0ts "Use `float` when you": i decided to not use that meaningless type
17:18:28FromDiscord<kots> Cool
17:19:23*ntat joined #nim
17:20:13*def- quit (Quit: -)
17:21:39*def- joined #nim
17:21:39*xet7 joined #nim
17:24:42*def- quit (Client Quit)
17:26:10*def- joined #nim
17:59:10*rockcavera quit (Remote host closed the connection)
18:18:13NimEventerNew thread by DMisener: Help with macro/template extrapolating of parameters, see https://forum.nim-lang.org/t/11417
18:30:49*ntat quit (Quit: Leaving)
18:34:10FromDiscord<0b110111101> do i need c to use nim ?
18:35:47FromDiscord<0b110111101> there are a lot of interoperability
18:35:54FromDiscord<0b110111101> (edit) "are" => "is"
18:37:33FromDiscord<raycatwhodat> Depends on what you're making.
18:37:45FromDiscord<0b110111101> In reply to @raycatwhodat "Depends on what you're": give me an example
18:38:23FromDiscord<raycatwhodat> I dunno, having to do interop with a C-based library of some sort
18:38:32FromDiscord<raycatwhodat> Playdate comes to mind for me
18:38:48FromDiscord<0b110111101> https://media.discordapp.net/attachments/371759389889003532/1228051643983990805/312.png?ex=662aa338&is=66182e38&hm=27e27358fde0415fffe0bbfebf8bbfa70c4ecb3a94e7ffb39e352af2717f8ef9&
18:38:53FromDiscord<0b110111101> i can use it i know c
18:38:54FromDiscord<0b110111101> but
18:39:00FromDiscord<0b110111101> why would i want
18:39:49FromDiscord<0b110111101> nim is already rich of libraries
18:40:09FromDiscord<raycatwhodat> I mean, looking over the previous conversation, it sounds like you're just reading the manual for want of ideas
18:40:26FromDiscord<raycatwhodat> It's always best to just try it in some sort of project and come back with specific questions
18:41:05FromDiscord<raycatwhodat> You may not even need to use C like that
18:41:16FromDiscord<kots> Nim's ffi capabilities give you easy access to a wide range of well established C libraries (and libraries that provide C-compatible interfaces)
18:41:23FromDiscord<kots> Other than that, you don't need to know C to use Nim
18:41:54FromDiscord<raycatwhodat> In reply to @k0ts "Other than that, you": Oh, yeah, that. I misread the original question
18:41:57FromDiscord<raycatwhodat> (edit) "question" => "question."
18:42:01*def- quit (Quit: -)
18:42:10FromDiscord<0b110111101> i see
18:42:27*def- joined #nim
18:45:58*def- quit (Client Quit)
18:47:03*rockcavera joined #nim
18:55:19FromDiscord<Phil> In reply to @0b110111101 "why would i want": Depends. For example: Owlkettle provides nim bindings to GTK and provides a DSL to make specifying something easier
18:55:49FromDiscord<Phil> There's also nim bindings for various parts of QT and Unreal Engine. That kind of stuff is so gigantic you would not ever want to write your own
18:56:10FromDiscord<Phil> There's also libs for example to do webp compression. I don't know a single one that isn't somewhere C under the hood
18:57:12FromDiscord<0b110111101> but
18:57:16FromDiscord<0b110111101> i cannot se variables
18:57:24FromDiscord<0b110111101> when interoping with c
18:57:31FromDiscord<Phil> Libsodium is an example of where you absolutely want to use C bindings instead of writing your own.↵Cryptography is insanely hard to get right and I'll always prefer to use the most widely used and renowned lib out there for a given area when it comes to something that important.
18:57:32FromDiscord<0b110111101> (edit) "se" => "use"
18:57:52FromDiscord<Phil> Sure you can, you can pass pointers back and forth. It's just more complicated to deal with
18:58:07FromDiscord<0b110111101> In reply to @isofruit "Libsodium is an example": but nim has cryptography
18:58:13FromDiscord<0b110111101> i just checked
18:58:19FromDiscord<0b110111101> nimble directory
19:00:06FromDiscord<Phil> sent a long message, see https://pasty.ee/KvICbreaIAVP
19:00:21FromDiscord<0b110111101> sent a code paste, see https://play.nim-lang.org/#pasty=adoHDNORLZWt
19:00:31FromDiscord<0b110111101> In reply to @isofruit "Yes, but 1)": i see
19:00:48FromDiscord<Phil> And 3) nimcrypto is by no means as widely used as openssl.↵The chances of nimcrypto having a bug is far higher than openssl or any of the other more widely used ssl libs
19:02:08FromDiscord<Phil> For a web-framework I'm all in on going with whatever you want.↵When it comes to anything touching security I would want to be as standard and default as you possibly can be in order to reduce chances of getting screwed where it matters.↵A bug in a webserver is bad, but you can deal with it.↵A bug in a crypto lib meaning that now all your hashes are flawed is catastrophic.
19:02:57FromDiscord<jviega> Agreed. For nimcrypto, I had to embarrass them into fixing an obvious problem with a major crypto algorithm, reporting it wasn't enough
19:03:40FromDiscord<Phil> Precisely for this kind of stuff I very much like the fact that C bindings are so easy
19:03:51FromDiscord<Phil> When you need to you can default back to "the standard" or provide your own API over it.
19:04:51FromDiscord<kots> Insert obligatory futhark mention here
19:05:40FromDiscord<Phil> In reply to @0b110111101 "i see": The reason outlined above btw. is why I provide a lib for password hashing that uses openssl under the hood so others don't need to know that kind of stuff.↵I could've used nimcrypto, but I don't have the trust to want to take that risk
19:06:15*def- joined #nim
19:07:08FromDiscord<Phil> And for the argon version for hashing I use a lib that wraps libsodium, so the underlying hashing functions are all C all the time, the "higher-level-API" over it is just written in nim and far more convenient to use.
19:17:11*def- quit (Quit: -)
19:17:42*def- joined #nim
19:35:39*def- quit (Quit: -)
19:36:03FromDiscord<jakub19245sdf> @Phil
19:36:09FromDiscord<jakub19245sdf> yo can I DM you
19:36:14FromDiscord<jakub19245sdf> maybe you could work for me
19:36:37FromDiscord<jakub19245sdf> This job might be leaning a bit more to the dark side of discord
19:36:57FromDiscord<Phil> In reply to @jakub19245sdf "<@180601887916163073>": Again, we don't do DM help here, you can ask it in this channel
19:37:15FromDiscord<jakub19245sdf> Read the rest
19:37:16FromDiscord<Phil> If it isn't nim related then it doesn't belong here anyway, asking here is pointless then as well
19:37:25FromDiscord<jakub19245sdf> nim?
19:37:32FromDiscord<jakub19245sdf> ok.
19:37:42*def- joined #nim
19:40:41*def- quit (Client Quit)
19:41:56Amun-Rayou haven't even disclose what that project is
19:42:01Amun-Rad*
19:42:09*def- joined #nim
19:42:29FromDiscord<Phil> I am at this point dubiosu whether this is nim related at all tbh, therefore I assume it isn't until proven otherwise
19:43:00FromDiscord<Phil> I am also dubious, not just dubiosu
19:43:52Amun-Raright, I don't think so too
19:43:58FromDiscord<kots> I'm kind of hurt he didn't ask me to work for him :(
19:46:52*def- quit (Client Quit)
19:47:10*def- joined #nim
19:51:32*def- quit (Client Quit)
19:53:01*def- joined #nim
19:56:17*def- quit (Client Quit)
20:03:40FromDiscord<solitudesf> In reply to @k0ts "Insert obligatory futhark mention": used futhark for the first time yesterday. kinda sexy, was surprised at how fast and seamless it worked. wish it existed before nimterop so we didnt have libraries that rely on nimterop and its awful ux.
20:15:35FromDiscord<djazz> Futhark mentioned lets goooo
20:16:50FromDiscord<kots> Never tried nimterop but futhark surely is the bee's knees
20:17:21Amun-Raprimeagen vibes detected ;)
20:17:51*def- joined #nim
20:20:50FromDiscord<Robyn [She/Her]> Primeagen?
20:21:12Amun-Ra(yt)
20:24:00FromDiscord<Robyn [She/Her]> Ah
20:27:17*def- quit (Quit: -)
20:30:54FromDiscord<nikruiz> sent a long message, see https://pasty.ee/aIDEBtKNBDTo
20:38:34FromDiscord<Robyn [She/Her]> In reply to @nikruiz "Hello, we are looking": <@&371760044473319454>
20:39:34FromDiscord<Robyn [She/Her]> https://media.discordapp.net/attachments/371759389889003532/1228082034304356495/image0.gif?ex=662abf85&is=66184a85&hm=0a41e93150647c0db64fe1fe50b3b47ca3f745bc20ba8a332cdb625230975f91&
20:48:12*def- joined #nim
20:53:05*def- quit (Client Quit)
21:12:23*def- joined #nim
21:20:08FromDiscord<0b110111101> i can interop only with functions in nim with c ?
21:22:56FromDiscord<nnsee> In reply to @jakub19245sdf "This job might be": what? what does this even mean?
21:24:58FromDiscord<0b110111101> https://media.discordapp.net/attachments/371759389889003532/1228093459739447326/8475.png?ex=662aca29&is=66185529&hm=09f99c8ae45c7981a879c5e78caca63d6954a25685be6968ad2d31f674d8e290&
21:25:02FromDiscord<0b110111101> i see
21:25:12FromDiscord<0b110111101> i will use stdlib.h this time and see
21:27:22FromDiscord<0b110111101> but i cannot use the c variables
21:27:29FromDiscord<0b110111101> i think only ffi ?
21:27:39FromDiscord<0b110111101> ffi = foreign function interface
21:28:15FromDiscord<jakub19245sdf> @nnsee
21:28:26FromDiscord<jakub19245sdf> If you interested DM me
21:28:33FromDiscord<jakub19245sdf> Don’t ask questions
21:28:38FromDiscord<jakub19245sdf> 😀
21:31:12FromDiscord<nnsee> no thanks brother
21:38:35FromDiscord<0b110111101> sent a code paste, see https://play.nim-lang.org/#pasty=YxIRKnhbuZlV
21:38:37FromDiscord<0b110111101> guys
21:38:47FromDiscord<0b110111101> Error: invalid indentation
21:38:52FromDiscord<0b110111101> where is the problem ?
21:40:43FromDiscord<stoneface86> put the pragmas after the variable name instead of the type
21:41:57FromDiscord<0b110111101> https://media.discordapp.net/attachments/371759389889003532/1228097734066704485/8475-----.png?ex=662ace24&is=66185924&hm=306ffb3b3c2d1a30329832de34b2b35c46929a1b3097e6042929e76eb659007b&
21:42:01FromDiscord<0b110111101> it works with functions
21:42:19FromDiscord<stoneface86> different syntax for variables
21:42:49FromDiscord<0b110111101> In reply to @stoneface86 "put the pragmas after": i see
21:42:54FromDiscord<0b110111101> ok ok i will try
21:43:53FromDiscord<0b110111101> https://media.discordapp.net/attachments/371759389889003532/1228098219461054544/99586.png?ex=662ace98&is=66185998&hm=f6b4e7636c2bf6b4f50765dbde7beddc05d7588c28a33ff44dfe7a6d2dea0b14&
21:43:58FromDiscord<0b110111101> it works
21:46:06FromDiscord<0b110111101> In reply to @stoneface86 "different syntax for variables": but ``int`` doesn't work with int c type ?
21:46:09FromDiscord<0b110111101> why
21:47:36FromDiscord<stoneface86> use `cint` in nim for C's int type, nim's `int` is compiled as `NI` or something like that iirc
21:47:56FromDiscord<Elegantbeef> `int` is `intptr_t` in C
21:48:06FromDiscord<Elegantbeef> `int32` == `cint` for most platforms
21:48:12FromDiscord<0b110111101> In reply to @stoneface86 "use `cint` in nim": whaaaat
21:48:19FromDiscord<0b110111101> that is not listed in the docs
21:50:35FromDiscord<Elegantbeef> Why are you putting `header` on a variable you emit?
21:50:52FromDiscord<0b110111101> In reply to @Elegantbeef "Why are you putting": it is stdint.h
21:50:57FromDiscord<0b110111101> the ctypes
21:51:07FromDiscord<0b110111101> i used it my entire life
21:51:34FromDiscord<stoneface86> In reply to @0b110111101 "that is not listed": https://nim-lang.org/docs/ctypes.html#cint
21:51:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=vmRKopNVAhYT
21:51:51FromDiscord<0b110111101> In reply to @stoneface86 "https://nim-lang.org/docs/ctypes.html#cint": this is a different header
21:51:54FromDiscord<Elegantbeef> Right but you do not need to include a header that code includes
21:52:28FromDiscord<0b110111101> https://media.discordapp.net/attachments/371759389889003532/1228100380785643643/----.png?ex=662ad09b&is=66185b9b&hm=b71460f41588be2fc3348290a9b65cde63d2e4dceb1e01f612f6cef9c51594d5&
21:52:56FromDiscord<0b110111101> that is why i hate interoperability with c
22:23:13*beholders_eye quit (Ping timeout: 246 seconds)
22:30:08FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=nmamiXKnYgTQ
22:30:30NimEventerNew Nimble package! stylus - A standards compliant CSS level 3 tokenizer and parser written in pure Nim, see https://github.com/ferus-web/stylus
22:30:30NimEventerNew Nimble package! mirage - A bytecode language generator and runtime, see https://github.com/ferus-web/mirage
22:30:34NimEventerNew Nimble package! ferusgfx - A high-performance graphics renderer made for web engines, see https://github.com/ferus-web/mirage
22:32:19FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "Okay so someone has": Or is it better like this? Since I could make a custom import statement (`import_proto 478`) and I wouldn't have to do as much fiddly macro code...
22:36:13FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "Or is it *better*": I think this might be better honestly
22:59:26*casaca joined #nim