<< 24-05-2024 >>

00:08:45FromDiscord<Robyn [She/Her]> Is there a way to get the expanded output of a block of Nim code when it has only been expanded once?
00:10:14FromDiscord<Robyn [She/Her]> I need to get the body of `adtEnum` from my enum, but I need to try and delay symbol resolution as much as possible
00:13:02*def- quit (Quit: -)
00:14:05*def- joined #nim
00:15:26FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=nSnyofov this is a hacky attempt, fungus isn't on the playground but yeah I just need to get the result of `adtEnum` while the symbols inside the produced types are still untyped
00:39:22*SchweinDeBurg joined #nim
00:48:26FromDiscord<sOkam! 🫐> I have a setup with many functions that all need to call a single other recursive function↵That function also calls those multiple functions sometimes for each of its cases↵Could there be a way to separate their code into multiple files in some way?
00:50:23*beholders_eye quit (Ping timeout: 260 seconds)
00:53:14FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=oaTxMaQm
00:55:07FromDiscord<sOkam! 🫐> The main problem I have is that I need to forward declare `CoreFunc` in every file... but I can only forward declare once... and that function also has to call the other inner functions... so struggling to figure out how to separate them
01:32:20*krux02_ quit (Remote host closed the connection)
01:56:07FromDiscord<saint.___.> In reply to @absenth "the sad realization was": What is wrong with iterm2?
01:56:40FromDiscord<saint.___.> In reply to @absenth "but holy crap is": theres some option to make it faster
01:56:51FromDiscord<saint.___.> I dont' notice a diff between it and alacritty
01:57:24FromDiscord<MDuardo> You won't notice unless you parse huge quantities of text
01:59:05FromDiscord<demotomohiro> In reply to @chronos.vitaqua "Is there a way": This macro might help you: https://github.com/demotomohiro/littlesugar/blob/main/src/littlesugar/expandFirst.nim
02:02:03*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
02:31:58FromDiscord<serif7> Setting up nim on windows is kind of annoying. I installed with choosenim and vscode isnt finding it
02:34:30FromDiscord<serif7> ah, nvm, I've got it running code now
02:34:32FromDiscord<demotomohiro> You probably need to set `PATH` environment variable and restart vscode or reboot
02:40:47FromDiscord<serif7> I'm all set up now, thanks
03:36:57*SchweinDeBurg joined #nim
03:50:11FromDiscord<albassort> @demotomohiro your presence is appreciated
03:50:20FromDiscord<albassort> i should make an appreciation post
03:50:37FromDiscord<polylokh_39446> oh I read that as a command to appear
03:50:51FromDiscord<polylokh_39446> "Your presence will be appreciated at the meeting room, immediately."
03:51:08FromDiscord<Elegantbeef> You might be wondering why I gathered you here tomorrow
03:51:24FromDiscord<albassort> Is that person English native, that isn't a common way of phrasing that, poly
03:52:01FromDiscord<albassort> it sounds like a failed attempt at elegant business speak
04:26:14FromDiscord<Elegantbeef> @madonuko btw if you use a compiler with atleast https://github.com/nim-lang/Nim/commit/d837d32fd571eb701b380f68c88231ff08ee124a fungus should work
04:40:43FromDiscord<madonuko> In reply to @Elegantbeef "<@653086042752286730> btw if you": my repo bump nightly every day so yeah should have the patch now
04:58:42*eternalbliss joined #nim
05:00:02*eternalbliss quit (Quit: leaving)
06:28:34*PMunch joined #nim
06:36:03FromDiscord<odexine> In reply to @albassort "it sounds like a": “Your presence is appreciated” sounds exactly like that though
06:42:24Amun-Ra“Your presence is appreciated” sounds like Vader quote
06:43:19*def- quit (Quit: -)
06:44:00*def- joined #nim
06:45:01FromDiscord<odexine> Dystopian corpo speak
06:45:42Amun-RaI've never worked in any corpo, lucky /me
06:54:05FromDiscord<Robyn [She/Her]> In reply to @demotomohiro "This macro might help": Oof I can't figure out how to get this to do what I want :/↵↵I'm trying to expand the `adtEnum` specifically but I don't want to call it myself, I want to let my macro handle the resolution
06:54:10FromDiscord<Robyn [She/Her]> I might have an idea...
06:59:38FromDiscord<albassort> what is the pragma for creating a variable on all threads
06:59:56FromDiscord<albassort> threadvar
06:59:57FromDiscord<albassort> thank you
07:00:36Amun-Raglad I could help
07:11:13FromDiscord<Elegantbeef> Amun really is helpful
07:13:46Amun-Rathanks Elegantbeef, I really appreciate it
07:14:25FromDiscord<Elegantbeef> It takes real skill to help someone without saying anything
07:14:36FromDiscord<Elegantbeef> Sheer silence has never been so empowering
07:15:20Amun-Ra;)
07:42:30FromDiscord<Robyn [She/Her]> I've gotten pretty far now, last thing though... How do I import specific symbols that are normally private in a package? Macro I'm using generates a `to` statement which is a no go since importing `fungus` with the `{.all.}` pragma imports `to` causing a duplicate definition
07:51:27FromDiscord<0x0oz> I am trying to find docs/manual for nimble install, what I've seen wasn't comprehensive. Are there any recommendations?
07:53:17FromDiscord<Robyn [She/Her]> In reply to @0x0oz "I am trying to": Have you looked here? https://nim-lang.github.io/nimble/use-packages.html
07:53:33FromDiscord<0x0oz> In reply to @chronos.vitaqua "Have you looked here?": Yes,
07:53:42ehmry0x0oz: I recommend not using nimble
07:54:21FromDiscord<0x0oz> The issue is I am not a nim dev but I am trying to use nimble for something and I can't find enough information about it/ examples using it
07:54:48FromDiscord<Elegantbeef> What package are you installing?
07:55:42FromDiscord<0x0oz> Well, not a specific package. I want to know how the package installation works (externally/locally if exist)↵Long story short, I am playing a CTF and need to know what I can do with nimble install 😅
07:56:28FromDiscord<Elegantbeef> You install packages with it
07:56:32FromDiscord<Elegantbeef> You can provide compiler flags
07:57:05ehmry0x0oz: its not well documented and you can probably do a lot
07:57:11FromDiscord<Elegantbeef> No one has made a nimble man page
07:57:56FromDiscord<m4ul3r> In reply to @0x0oz "Well, not a specific": Naham moment
08:00:07ehmry0x0oz: you'll have to look at examples of nimble files in the wild
08:01:07ehmrynimble can do arbitrary stuff because its not a format, its an interpreter for some underspecified scripting language
08:02:15FromDiscord<0x0oz> I tried to install a simple package to at least see if it installs things to /usr/bin or /bin but got some errors, I tried to see if there is a way to run arbitrary code when doing install but didn't find an idea about i
08:02:16FromDiscord<0x0oz> (edit) "i" => "it"
08:02:31ehmrylook at the "tasks"
08:02:45FromDiscord<0x0oz> Okay, thanks!
08:25:21*rockcavera quit (Read error: Connection reset by peer)
08:25:41*rockcavera joined #nim
08:26:02NimEventerNew thread by pegra4: Karax, redraw a textarea, see https://forum.nim-lang.org/t/11639
08:29:56FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=DbYZwWxf
08:30:05FromDiscord<Robyn [She/Her]> Beef, is this the compiler error you mentioned?
08:30:15FromDiscord<Robyn [She/Her]> Doesn't seem like it but idk
08:47:05*def- quit (Quit: -)
08:48:33*def- joined #nim
08:51:35FromDiscord<Elegantbeef> What compiler error?
08:54:30FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "What compiler error?": The bad codegen, something about fungus causing an issue that had to be patched but iirc that was with stringifying
08:54:54FromDiscord<Elegantbeef> The bug I fixed was unrelated to codegen and was Nim being funny
08:56:14FromDiscord<Robyn [She/Her]> Fair enough
08:56:28FromDiscord<Robyn [She/Her]> Yeah so I have no idea how to fix this, hacking the compiler is never good xD
08:57:01FromDiscord<Elegantbeef> Well minrepro it
08:57:48FromDiscord<Elegantbeef> Though I assume it's a Nim type system error
08:58:22FromDiscord<Robyn [She/Her]> `mfungus.nim`: https://paste.ecorous.org/iqabuwuyol↵`main.nim`: https://paste.ecorous.org/biyofasoju
08:58:31FromDiscord<Robyn [She/Her]> Relies on Fungus, otherwise I'd put it on the playground
08:58:52FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Though I assume it's": Tbf my code for this is _very_ hacky
08:59:37FromDiscord<Elegantbeef> I'm going to blame the `Option` conversion
08:59:46FromDiscord<Elegantbeef> do `echo Option[string](...)`
09:01:08FromDiscord<Elegantbeef> `types[0].strVal.toLowerAscii() == "adtenum" and types[0].strVal[0] == 'a'` wtf
09:01:20FromDiscord<Elegantbeef> is `types[0].eqIdent"adtEnum"` too hard 😄
09:02:57FromDiscord<Robyn [She/Her]> I didn't realise that was a thing :P
09:03:38FromDiscord<nnsee> In reply to @chronos.vitaqua "Relies on Fungus, otherwise": (could've still put it on the playground)
09:03:44FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "do `echo Option[string](...)`": Ah yep, that works!
09:04:00FromDiscord<Robyn [She/Her]> In reply to @nnsee "(could've still put it": True
09:04:07FromDiscord<Elegantbeef> Seems someone broke parameterless conversions
09:04:16FromDiscord<Robyn [She/Her]> I should probably make a simple script like the haste script I made
09:04:25FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Seems someone broke parameterless": Me? :p
09:05:15FromDiscord<Robyn [She/Her]> Ooor someone who did work on the compiler?
09:05:28FromDiscord<Robyn [She/Her]> I will say that just using Fungus normally worked iirc, let me test that again
09:06:15FromDiscord<Elegantbeef> So something got the type graph to compile that
09:06:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=BIHcodaF
09:06:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=yLBhCLYm
09:06:36FromDiscord<Elegantbeef> Nim's type system is duct tape and bubble gum
09:07:04FromDiscord<Robyn [She/Her]> Oh fun
09:07:15FromDiscord<Robyn [She/Her]> Should I open a bug report or is that something you're gonna do?
09:07:25FromDiscord<Elegantbeef> Go do that
09:08:26FromDiscord<Robyn [She/Her]> Alright!
09:08:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=jhyWjwKY
09:08:37FromDiscord<Elegantbeef> So seems only down casting works
09:08:42FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=JyHnWmyX
09:09:02FromDiscord<Robyn [She/Her]> In reply to @nnsee "my one-liner to upload": `wl-paste`? Is that the clipboard stuff?
09:09:20FromDiscord<Robyn [She/Her]> Termux has clipboard set and get so I can easily modify the oneliner for that
09:09:22FromDiscord<nnsee> wl-copy and wl-paste do what the name implies, but only for wayland
09:13:56FromDiscord<nnsee> that `@/proc/self/fd/0` can be changed to just `@-` btw
09:13:57FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=DIkgxNJh
09:14:00FromDiscord<nnsee> i'm not really sure why i did that
09:14:21FromDiscord<Robyn [She/Her]> In reply to @nnsee "that `@/proc/self/fd/0` can be": Assumed so, `0` is stdin, right? Which `-` is an alias for
09:14:30FromDiscord<nnsee> yep
09:14:59FromDiscord<Robyn [She/Her]> Neato
09:17:41FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=dWonDBMz
09:17:57FromDiscord<Robyn [She/Her]> This should be good to post on the issue tracker I think, lmk if I should add anything else
09:24:25FromDiscord<Elegantbeef> Why does everyone include my name
09:24:25FromDiscord<Elegantbeef> I don't need credits!
09:25:02FromDiscord<Robyn [She/Her]> You must have an uneraseable online presence :)
09:28:45FromDiscord<Robyn [She/Her]> In reply to @nnsee "my one-liner to upload": Where's `url` from?
09:29:04FromDiscord<nnsee> remove everything after the curl command and you'll see
09:29:18FromDiscord<Robyn [She/Her]> Aah
09:29:32FromDiscord<Robyn [She/Her]> Thanks Ras :>
09:29:59FromDiscord<nnsee> also, huh, it looks like discord added a space between the dot and url? it should be `.url` as one word
09:31:28FromDiscord<Robyn [She/Her]> Aaah okay that was the issue
09:33:23FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=eBVOLlYb
09:34:02FromDiscord<Robyn [She/Her]> Also small suggestion Ras: Why not return the ID of the URL from Pasty?
09:34:20FromDiscord<Robyn [She/Her]> (edit) "URL from" => "code uploaded to"
09:34:54FromDiscord<Robyn [She/Her]> Unless the key can also do that
09:35:41FromDiscord<Robyn [She/Her]> I wanted to do `https://play.nim-lang.org/#pasty={pastyId}`
09:36:14FromDiscord<nnsee> the key is for when you want to delete or modify your pastes
09:36:30FromDiscord<nnsee> (yes, you can modify already-uploaded pastes, and even look at older revisions of the same paste if you want)
09:36:41FromDiscord<nnsee> i felt like returning the full url is a bit more ergonomic for usage in shell scripts
09:37:01FromDiscord<nnsee> if you want just the ID, a simple `cut` would do
09:37:46FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=RhrLNRKH
09:37:53FromDiscord<odexine> In reply to @chronos.vitaqua "You must have an": Me reading this as unreasonable
09:38:00FromDiscord<nnsee> i also read it as unreasonable
09:38:16FromDiscord<nnsee> i was even going to say that i read it as unreasonable, but i got sidetracked
09:38:18*xutaxkamay quit (Ping timeout: 252 seconds)
09:38:58*xutaxkamay joined #nim
09:39:40FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=kdQkMKua
09:39:58FromDiscord<Robyn [She/Her]> In reply to @nnsee "the key is for": Time to add some support for that in my little script for personal usage :)
09:40:52FromDiscord<nnsee> yeah my own script actually saves all of the keys to a directory with the paste ID as the filename just in case i want to change or delete any of them
09:44:18FromDiscord<Robyn [She/Her]> Makes sense
09:46:44FromDiscord<Robyn [She/Her]> Wait does `jq -r` reformat the response from pasty as JSON or something?
09:47:20FromDiscord<Robyn [She/Her]> Nope
09:47:25FromDiscord<Robyn [She/Her]> My code is just broken
09:49:53FromDiscord<nnsee> -r takes the raw value
09:50:08FromDiscord<nnsee> otherwise jq would return the jq value as a json string, double quotes and everything
09:50:16FromDiscord<nnsee> (edit) "jq" => "json"
09:50:36FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=pieckuBL↵For some reason I can't seem to get the response from Pasty as JSON
09:50:45FromDiscord<Robyn [She/Her]> In reply to @nnsee "otherwise jq would return": Yeah that makes sense
09:50:59FromDiscord<nnsee> did you notice the `Accept: application/json` header in curl?
09:51:05FromDiscord<Robyn [She/Her]> Yep
09:51:05FromDiscord<nnsee> (edit) "curl?" => "the curl command?"
09:51:16FromDiscord<Robyn [She/Her]> `headers.add("Accept", "application/json")`
09:51:27FromDiscord<nnsee> that _should_ work then
09:51:43FromDiscord<Robyn [She/Her]> I am also adding my own user agent, but that shouldn't do anything
09:52:11FromDiscord<Robyn [She/Her]> ...
09:52:26FromDiscord<Robyn [She/Her]> Well what do you know, that was the issue
09:52:54FromDiscord<nnsee> wut
09:52:55FromDiscord<nnsee> wait
09:53:49FromDiscord<Robyn [She/Her]> Wait
09:53:51FromDiscord<Robyn [She/Her]> No
09:53:52FromDiscord<Robyn [She/Her]> What?
09:53:58FromDiscord<Robyn [She/Her]> The issue just fixed itself
09:54:26FromDiscord<Robyn [She/Her]> Wait, does pasty have a cache for responses or something?
09:54:32FromDiscord<nnsee> no
09:54:43FromDiscord<Robyn [She/Her]> Then I have no idea what the issue was
09:55:49FromDiscord<nnsee> i'm assuming `Pasty-Nim (1.0)` was you
09:56:41FromDiscord<Robyn [She/Her]> Yep
09:56:51FromDiscord<Robyn [She/Her]> Works now at least: https://play.nim-lang.org/#pasty=uufwVxtx
09:56:53FromDiscord<nnsee> your first few requests had no Accept header as far as I can see
09:56:56FromDiscord<Robyn [She/Her]> Uploaded using the script
09:57:13FromDiscord<Robyn [She/Her]> In reply to @nnsee "your first few requests": Yeah, that's when I switched to using `Accept` and still had the issue
09:57:19FromDiscord<Robyn [She/Her]> Unless I didn't recompile the script...
09:57:28FromDiscord<Robyn [She/Her]> That could've been it, actually
09:58:15*xutaxkamay quit (Ping timeout: 260 seconds)
09:58:46NimEventerNew thread by pietroppeter: Where does the complexity of quote from the manual comes from, see https://forum.nim-lang.org/t/11642
10:00:51*xutaxkamay joined #nim
11:03:33FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua ">>> Heya, just making": Anyone able to think of a name for the issue that's decent?
11:37:00*PMunch quit (Remote host closed the connection)
11:37:14*PMunch joined #nim
12:17:35FromDiscord<0111011110> My simple hello world nim code flagged as malware in virustotal why is there a solution ???
12:27:06rockcavera0111011110, rest assured that a simple hello world in C, compiled with mingw/gcc on Windows will also indicate a false positive
12:27:19FromDiscord<Phil> In reply to @0111011110 "My simple hello world": You have the same options as the nim team:↵Keep bringing it up to AV vendors that this is a false positive.↵And/or buy a licence for your piece of software from microsoft that states "This is totally safe guys, here, I paid money!".↵That's the only ways how you can change an AV not to flag a nim binary automatically as malicious.
12:27:59FromDiscord<Phil> If you want your own AV to just not flag it as malicious because you know its safe, then that entirely depends on the AV that flagged it. I'd assume they have some sort of whitelist or other mechanism for you to tell it "This binary is alright, trust it!"
12:29:09FromDiscord<0111011110> Hhhhh this is totally safe guys that ia nice
12:29:13FromDiscord<0111011110> Funny
12:30:05FromDiscord<0111011110> In reply to @isofruit "You have the same": Maybe using old compiler ??
12:30:14FromDiscord<0111011110> Would this work ?
12:30:36FromDiscord<zumi.dxy> or MSVC, apparently
12:30:40FromDiscord<0111011110> (edit) "ia" => "is"
12:30:53FromDiscord<0111011110> In reply to @zumi.dxy "or MSVC, apparently": Msvc can compile nim ?
12:31:47FromDiscord<nnsee> In reply to @rockcavera "0111011110, rest assured that": tbh
12:31:52rockcaverayou can use msvc (vcc), gcc, clang ...
12:32:18FromDiscord<nnsee> i just did a test
12:32:34FromDiscord<nnsee> nim hello world + mingw: 17 detections
12:32:42FromDiscord<nnsee> c hello world + mingw: 3 detections
12:32:55rockcaverannsee, I don't know the abbreviation/language expression "tbh"
12:33:04FromDiscord<nnsee> "to be honest"
12:33:08rockcaverathanks
12:34:34FromDiscord<0111011110> In reply to @rockcavera "0111011110, rest assured that": I never got my c code flagged whwn using gcc
12:34:35rockcaverahere C hello world gave 3. Nim also gave 3
12:34:47FromDiscord<0111011110> Use gcc
12:35:03FromDiscord<0111011110> With the optimization flag -O3
12:35:06FromDiscord<0111011110> And see
12:35:22FromDiscord<0111011110> It will never be flagged
12:35:28FromDiscord<nnsee> In reply to @rockcavera "here C hello world": did you do -d:release for nim?
12:35:33FromDiscord<0111011110> Yes
12:35:43FromDiscord<nnsee> i meant rockcavera
12:35:54FromDiscord<0111011110> Ok
12:35:59rockcaverannsee debug
12:36:25FromDiscord<0111011110> Is there another optimization flag beside -d:release ?
12:36:46rockcaverarelease mode gave 5 in Nim
12:36:59FromDiscord<0111011110> Yeah
12:37:10FromDiscord<nnsee> In reply to @rockcavera "release mode gave 5": how?
12:37:17FromDiscord<0111011110> We need solution
12:37:19FromDiscord<nnsee> what is your example code?
12:37:32FromDiscord<nnsee> d:debug gave me 8 detections with a simple `echo "hello world"`
12:37:45rockcaveraecho "Hello, World!"
12:38:10FromDiscord<0111011110> Can u try using old compiler
12:38:20FromDiscord<0111011110> They say it works with nim 2
12:38:27FromDiscord<0111011110> 2.0.0
12:38:48rockcaverahttps://pastecode.io/s/040rskh6
12:38:57rockcaveraNim devel and gcc 14.1.0
12:40:18FromDiscord<nnsee> maybe it's because of nim devel
12:40:25FromDiscord<0111011110> Nim can be compiled with gcc ????
12:40:26FromDiscord<nnsee> are you cross compiling?
12:40:39FromDiscord<nnsee> In reply to @0111011110 "Nim can be compiled": nim uses gcc by default
12:40:47FromDiscord<nnsee> but any C compiler will do
12:41:03FromDiscord<0111011110> So -O3 will work ???
12:41:04FromDiscord<nnsee> nim compiles to C code, which in turn needs to be compiled with a C compiler
12:41:06FromDiscord<nnsee> in case you're confused
12:41:17rockcaveraI believe that on macos clang is the default
12:41:24FromDiscord<nnsee> ah true
12:41:45FromDiscord<0111011110> ??
12:41:57FromDiscord<0111011110> So the flag -O3 works in nim ???
12:42:21FromDiscord<0111011110> My pc is off i cannot try i am on phone
12:42:31rockcavera0111011110, this flag is passed when compiling with -d:danger or -d:release
12:42:55rockcaveraand --opt:speed
12:43:22FromDiscord<0111011110> Will nim be flagged with --opt:speed ??
12:44:16rockcaveraI didnt understand
12:44:41FromDiscord<0111011110> Will nim exe file i mean source code the code u write
12:45:05FromDiscord<0111011110> Will the compiled nim source file be flagged if i used --opt:speed
12:45:38FromDiscord<odexine> No one knows how AV flags binaries
12:45:41rockcaveracould it be
12:46:03FromDiscord<0111011110> I tried my compiled nim source files in vt
12:46:08FromDiscord<0111011110> Virustotal
12:46:19FromDiscord<0111011110> When my pc fully charged i will try
12:46:39rockcaverathere are executables that AV flags and others that do not. it's a big russian roulette
12:47:26FromDiscord<nnsee> my question is why do you care? the vendors that flag these executables are niche. most consumer AV does not flag these
12:48:16FromDiscord<0111011110> Because i want to delivery undetectable executable file
12:48:27FromDiscord<0111011110> (edit) "delivery" => "deliver"
12:49:06FromDiscord<nnsee> for what purpose?
12:49:26FromDiscord<0111011110> I am a freelancer my customers will be suspicious
12:49:48FromDiscord<nnsee> well that's fair i suppose
12:49:49FromDiscord<0111011110> (edit) "suspicious" => "skeptical"
12:50:02FromDiscord<nnsee> but you can always just tell your customers that it's a false positive and these happen all the time
12:50:20FromDiscord<0111011110> Hhh it is hard
12:50:32FromDiscord<nnsee> alternatively you can get a code signing certificate
12:50:36FromDiscord<nnsee> if you're swimming in cash
12:51:20FromDiscord<0111011110> I mean it is hard to get those customers so making 400 dollars a week is not rich
12:51:35FromDiscord<0111011110> This will be spent on food and rent
12:51:52FromDiscord<0111011110> Shitty life
12:51:56FromDiscord<0111011110> Anyways
12:53:40rockcaveradepending on the type of executable, you can exploit some switches to decrease the amount of AV pointing out as malicious software.
12:54:07FromDiscord<0111011110> Seriously ???
12:54:08rockcavera-d:useMalloc --threads:off -d:strip -d:lto
12:54:31FromDiscord<0111011110> Hmmm
12:54:33rockcaverasee https://nim-lang.org/docs/nimc.html
12:55:23rockcaverayou can try another memory manager and not the default orc
12:55:55rockcaveraeverything is a matter of testing and checking that the changes will not affect the performance of your program...
13:01:34FromDiscord<0111011110> Does not work
13:01:54FromDiscord<0111011110> All the flags u mentioned can be used only if the --run flag used
13:02:31rockcavera?
13:03:36FromDiscord<nnsee> In reply to @0111011110 "All the flags u": that is definitely not the case
13:03:41FromDiscord<0111011110> https://media.discordapp.net/attachments/371759389889003532/1243549985841217576/rn_image_picker_lib_temp_b36e66a1-3908-45da-986c-3a4d73be3d87.jpg?ex=6651e1ac&is=6650902c&hm=cf585b48501ab367d61c7cf44f464510c19910a12f25d7da7905d41fc877d572&
13:03:53FromDiscord<odexine> Before the name of the code file
13:03:55FromDiscord<nnsee> the flags go before the filename
13:04:03rockcaveranim c -d:strip SOURCE
13:05:50FromDiscord<nocturn9x> Currently at PyCon Italy, listening to an amazing talk about Nim :)) https://media.discordapp.net/attachments/371759389889003532/1243550527913201774/IMG_20240524_144727_406.jpg?ex=6651e22d&is=665090ad&hm=50dee0204a3f8a979471a25ef79241d39b91ca8cc0c59ecb02f3341105862370&
13:05:59FromDiscord<nnsee> nice!
13:06:41FromDiscord<odexine> Nice
13:06:56FromDiscord<nnsee> say hello to Pietro for me
13:32:37FromDiscord<Robyn [She/Her]> In reply to @rockcavera "you can try another": Wouldn't refc be flagged more since that was more common?
13:38:41rockcaveraI wouldn't know how to tell you, it's all a matter of testing
13:39:15rockcaveraI haven't used refc in a long time
13:42:07FromDiscord<Robyn [She/Her]> Fair
13:42:14FromDiscord<Robyn [She/Her]> Neither have I tbf
13:42:48FromDiscord<exelotl> hey, has anyone had a `could not write the nim.cfg` error when using atlas?
13:43:29FromDiscord<exelotl> I created a workspace, cloned a repo inside it, am attempting to run commands such as `atlas install` or `atlas use <package>` and they all fail with this error and no additional info
13:43:29FromDiscord<Robyn [She/Her]> I haven't but if I had to guess, it could be permission errors?
13:43:56FromDiscord<Robyn [She/Her]> Odd
13:44:25FromDiscord<exelotl> yeah, I was thinking something like that... but it can modify other files with no problem, and I checked the permissions on windows and they seem fine
13:47:09*ntat joined #nim
13:49:08FromDiscord<nnsee> In reply to @exelotl "hey, has anyone had": you could try using procmon to see exactly what it's trying to do
14:14:21*PMunch quit (Quit: Leaving)
14:34:19*coldfeet joined #nim
14:47:03*xet7 joined #nim
14:55:08*coldfeet quit (Remote host closed the connection)
15:04:38FromDiscord<arlecchino_55871> does anyone have an example of passing `env` argument to `osproc.execCmdEx`? I'm trying to modify the PATH env var of the process
15:19:03FromDiscord<arlecchino_55871> herp a derp
15:19:04FromDiscord<arlecchino_55871> got it
15:19:31FromDiscord<arlecchino_55871> I was doing `{"PATH": "$PATH"}.toNewStringTable` but shouldn't use shell expansions like that
16:32:41FromDiscord<Robyn [She/Her]> https://github.com/nim-lang/Nim/issues/23648
16:44:54*dtomato quit (Ping timeout: 256 seconds)
16:46:00*dtomato joined #nim
16:46:36FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=Ymtujjpu
16:47:27*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
16:48:08FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=pBtGbccE
16:48:57FromDiscord<Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=XvFgglOn" => "https://play.nim-lang.org/#pasty=bDMEPhvK"
16:49:12FromDiscord<Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=QKCsivTc" => "https://play.nim-lang.org/#pasty=ZeuTEkYf"
17:02:08*lucasta joined #nim
17:16:03FromDiscord<arthurmiiengineering> greetings!
17:16:38FromDiscord<Phil> Cheers
17:16:55FromDiscord<arthurmiiengineering> In reply to @isofruit "Cheers": how are you friend :p
17:17:53FromDiscord<arthurmiiengineering> also im making a game engine and want to use nim. i was using python but people wanted it to be in a compiled language. does it support vulkan or some other 3d renderer?
17:20:04*lucasta quit (Quit: Leaving)
17:20:41FromDiscord<griffith1deadly> In reply to @arthurmiiengineering "also im making a": sokol / naylib↵or just use opengl/vulkan bindings with windy/etc for windowing stuff
17:21:07FromDiscord<arthurmiiengineering> In reply to @griffith1deadly "sokol / naylib or": awesome! thanks 🫂
17:22:50FromDiscord<arthurmiiengineering> oh, im going to make it free and open source. i would love for nim to have an engine like unity or bevy
17:23:08FromDiscord<arthurmiiengineering> especially since i like this so much better than rust and c# (no offense, just not for me)
17:33:15*coldfeet joined #nim
17:39:06FromDiscord<arthurmiiengineering> are there any videos or other resources you guys would recommend to learn nim?
17:42:12FromDiscord<Phil> Kiloneie has a couple videos for beginners, there's also the nim tutorial for an introduction etc. to get some syntax basics down, beyond that it really is learning by doing and asking here, at least that was my journey
17:42:36FromDiscord<Phil> The amount of stuff to learn heavily depends on how familiar you are with various programming concepts
17:43:06FromDiscord<demotomohiro> In reply to @arthurmiiengineering "are there any videos": I recommend to read official tutorial and Manual: https://nim-lang.org/documentation.html
17:43:27FromDiscord<Phil> Like compiletime, metaprogramming/macros, dynamic libraries, static libraries, compilers etc.↵Depending on what you want you don't need to know all of those, it's highly usecase dependent
17:45:21FromDiscord<Robyn [She/Her]> In reply to @arthurmiiengineering "also im making a": I think there's also WGPU bindings if that's your type of thing
17:45:21FromDiscord<Robyn [She/Her]> I think there's also WGPU bindings if that's your type of thing
17:46:00FromDiscord<arthurmiiengineering> In reply to @chronos.vitaqua "I think there's also": thanks! ill check that out >:p
17:46:02*Guest77 joined #nim
17:46:21*Guest77 quit (Client Quit)
17:46:31FromDiscord<Phil> That reminds me that if I ever build anything based on WGPU I will explicitly tell Safari users to go bark at apple for their subpar shitty browser
17:47:02FromDiscord<Phil> The longer I have to fix issues related to specifically to that piece of trash the more aggro it make sme
17:47:04FromDiscord<Phil> (edit) "make sme" => "makes me"
17:47:50FromDiscord<Phil> It would also be my advice to anyone doing anything web-based: Ignore safari or accept you're about to deal with a lot of crap
17:50:07FromDiscord<Robyn [She/Her]> I really do wanna look into making BGFX bindings tbh
17:50:23FromDiscord<Robyn [She/Her]> But I already have a project I wanna finish first, for now
17:50:38FromDiscord<arthurmiiengineering> In reply to @isofruit "That reminds me that": lol
17:50:45FromDiscord<arthurmiiengineering> thats just apple bro
17:51:02FromDiscord<arthurmiiengineering> ive heard so many people complain about how much it sucks developing for apple products
17:51:08FromDiscord<that_dude.> Bit of a wierd question, I need to pass numbers around and can only use the string data type. Is there an easy way to convert an int to "text" that I can decode later? I know I could just use $ and parseint, but I think that would be way slower than some casts
17:52:03FromDiscord<Phil> In reply to @that_dude. "Bit of a wierd": you can just cast individual characters
17:52:04FromDiscord<Robyn [She/Her]> In reply to @that_dude. "Bit of a wierd": I mean, you could cast it to a char array, maybe?
17:52:40FromDiscord<Phil> an int should be possible to represent as a char.↵If not, you could get away with representing individual digits as char
17:53:01FromDiscord<Phil> Further I don't think the conversion would be that expensive
17:53:12FromDiscord<Robyn [She/Her]> An int is 64 bits on x64 CPUs Phil
17:53:51FromDiscord<that_dude.> I checked, an int is usually 4/8 bytes, but that should be fine
17:54:05FromDiscord<that_dude.> In reply to @chronos.vitaqua "I mean, you could": Forgot that these are equivalent
17:54:10FromDiscord<polylokh_39446> In reply to @that_dude. "Bit of a wierd": are zero bytes fine?
17:54:54FromDiscord<that_dude.> In reply to @polylokh_39446 "are zero bytes fine?": Yeah, I just need to find a way to send 4 integers to a function
17:54:56FromDiscord<Robyn [She/Her]> `proc toCharArray[T](val: T): array[sizeof(T), T] = cast[sizeof(T), typeof result]`
17:55:07FromDiscord<Robyn [She/Her]> Could do this nicer perhaps but this should work
17:55:21FromDiscord<Robyn [She/Her]> (edit) "toCharArray[T](val:" => "toCharArray[T: SomeInteger](val:"
17:56:04FromDiscord<arthurmiiengineering> In reply to @demotomohiro "I recommend to read": thanks buddy
17:56:14FromDiscord<Robyn [She/Her]> Oops, `proc toCharArray[T: SomeInteger](val: T): array[sizeof(T), T] = cast[typeof result](val)`
17:56:20FromDiscord<Robyn [She/Her]> That's the correct code
17:56:28FromDiscord<that_dude.> Thanks
17:56:44FromDiscord<Robyn [She/Her]> Oh yeah, you'll need to account for endianness if you plan to store it fyi
17:57:12FromDiscord<Robyn [She/Her]> `std/endians` or `stew/endians2` are good choices for that (though the latter is better)
18:05:31FromDiscord<that_dude.> In reply to @chronos.vitaqua "Oh yeah, you'll need": The good news is that it's staying local. I just need to pass some data between threads
18:06:17FromDiscord<Robyn [She/Her]> Any reason you can't just pass the int?
18:06:25FromDiscord<drunkenalcoholic> can someone explain to me how and why you would use a "yield" statement in a iteration, I'm a noob and don't really understand the yield statement as opposed to maybe break
18:06:26FromDiscord<Robyn [She/Her]> Copying ints are basically free, so
18:07:00FromDiscord<that_dude.> `proc mainloop(in_channel, out_channel: ptr Deque[string], in_lock, out_lock: ptr RwLock)`
18:07:27FromDiscord<that_dude.> That's the structure I'm using, but my mainloops are interchangable based on the mode
18:10:03FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=kpBLgvVG
18:10:17FromDiscord<Robyn [She/Her]> Though this is a pretty useless example haha
18:10:21FromDiscord<polylokh_39446> In reply to @drunkenalcoholic "can someone explain to": control flow stops at the yield, the caller of the iterator gets what's yielded, control flow resumes after the caller wants to continue
18:10:47FromDiscord<polylokh_39446> write some code and see small examples work.
18:12:35FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RhByImKt
18:14:24FromDiscord<drunkenalcoholic> thanks @Robyn [She/Her] and @polylokh_39446 , ill go and play with the yield statement and see if I can get a better idea of what it is all about, as the nim manual didn't have much about it
18:22:48FromDiscord<Robyn [She/Her]> In reply to @drunkenalcoholic "thanks <@524288464422830095> and <@1162491071339712": No worries, have fun!
18:31:37*coldfeet quit (Remote host closed the connection)
18:53:30*SchweinDeBurg joined #nim
18:55:27FromDiscord<ebahi> my first somewhat working nim project https://media.discordapp.net/attachments/371759389889003532/1243638510653669458/Zyzko8r.mp4?ex=6652341e&is=6650e29e&hm=8b06f10d5cd41b6afc112b494fb7b30486af0487797d4225dbbbf79f3327e35e&
18:55:40FromDiscord<ebahi> a cli tool to only watch serial experiments lain
19:05:31FromDiscord<polylokh_39446> what are you going to use illwill for?
19:13:38FromDiscord<ebahi> In reply to @polylokh_39446 "what are you going": im planning on making it so if you dont provide any arguments it has a simple tui to select which episode to watch
19:13:42FromDiscord<ebahi> but im working on iot
19:13:44FromDiscord<ebahi> (edit) "iot" => "it"
19:28:11FromDiscord<Elegantbeef> @Robyn [She/Her] adtEnumProc?
19:41:08FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "Oh yeah Beef, that": Beef, here
19:42:27FromDiscord<Robyn [She/Her]> Wait
19:42:31FromDiscord<Robyn [She/Her]> Apparently it does not
19:42:36FromDiscord<Robyn [She/Her]> But I swore it did before...
19:42:45FromDiscord<Robyn [She/Her]> It gave a Nim compiler errr instead of bad codegen
19:43:51FromDiscord<Elegantbeef> Maybe you should make a test when you're making a PR
19:47:05FromDiscord<Robyn [She/Her]> Yeah yk what, I should :P
19:47:15FromDiscord<Robyn [She/Her]> Oh well
19:47:35FromDiscord<Robyn [She/Her]> I'd say having a proc is still useful since you can't call a macro in a macro :p
19:48:16FromDiscord<Elegantbeef> But you didn't expose the proc so what difference does it make?
19:48:19FromDiscord<Robyn [She/Her]> But it's probably useless for everyone else
19:48:43FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "But you didn't expose": `import fungus {.all.}`
19:48:52FromDiscord<Elegantbeef> Sorry we don't use that here
19:49:00FromDiscord<Elegantbeef> If you're using `{.all.}` I assume you hate writing code
19:49:01FromDiscord<Robyn [She/Her]> 😔
19:49:08*ntat quit (Quit: Leaving)
19:50:00FromDiscord<Elegantbeef> If you want the procedures to be exported, PR exporting them 😄
19:50:42FromDiscord<Robyn [She/Her]> Yay
19:51:07FromDiscord<Robyn [She/Her]> Should I also write a test for the bad codegen? Idk if I can even test that
19:51:30FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=XmaOTHtx
19:53:34FromDiscord<Robyn [She/Her]> That might be useful... Reason why I made a proc in the first place was so I could merge type sections and ADT enum types together so I could reference both
19:54:43FromDiscord<Robyn [She/Her]> It'd be ugly and imo not pretty enough to make its way into `fungus` but it'd be nice for me to have
19:57:11FromDiscord<fwsgonzo> how can I copy from a string to an `array[32, cchar]`?
19:57:53FromDiscord<Elegantbeef> `arr[0..31] = myStr.toOpenArray(0, 31)`
19:58:27FromDiscord<Elegantbeef> Throw in a cast if needed 😄
19:59:34*jmdaemon joined #nim
20:01:15FromDiscord<threefour> What is `{.all.}`? I can't find it in the docs anywhere.
20:01:56FromDiscord<Elegantbeef> It imports all procedures and annoys me
20:02:00FromDiscord<Elegantbeef> The latter is just a benefit
20:02:06Amun-Raall, even non-public
20:02:23FromDiscord<threefour> Why not includem
20:02:27FromDiscord<threefour> (edit) "includem" => "include?"
20:02:38FromDiscord<Elegantbeef> Cause then types are not the same
20:02:53FromDiscord<Elegantbeef> Two includes will have different types
20:03:21Amun-Raright, if you both include c.nim in a.nim and b.nim
20:03:43Amun-Rainclude work just like copy & paste
20:14:33FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#pasty=tPDWxvtJ
20:19:10FromDiscord<polylokh_39446> >index out of bounds: 0..31 notin 0..20
20:20:35Amun-Ra"Hello Buffered World!".len == 21
20:21:13FromDiscord<fwsgonzo> thanks, my brain did not do its job
20:23:02FromDiscord<polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=PWKxDsKg
20:23:42FromDiscord<polylokh_39446> no point in that assert, though
20:25:26FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=fvkDfRDM works just fine
20:37:31*jmdaemon quit (Ping timeout: 255 seconds)
20:42:02*def- quit (Quit: -)
20:43:56*def- joined #nim
20:44:35*beholders_eye joined #nim
20:59:45*jmdaemon joined #nim
21:23:32*def- quit (Quit: -)
21:23:45*def- joined #nim
21:47:26*krux02 joined #nim
22:04:47*jmdaemon quit (Ping timeout: 272 seconds)
22:18:41FromDiscord<Robyn [She/Her]> Is it not possible to return a type from a macro? :/
22:35:34FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=ALLadydq
22:39:44FromDiscord<morgan> are generic converters cursed or something? it ran until i moved them into another file (i am importing them and they are public) and nimsuggest gets mad now and got mad before
22:40:11FromDiscord<morgan> tho i can probably simplify stuff, i don't think i really need that type
22:41:05FromDiscord<polylokh_39446> my impression is that both converters and nimsuggest are slightly cursed to begin with
22:41:16*def- quit (Quit: -)
22:41:36*def- joined #nim
22:42:08FromDiscord<morgan> i've often closed the window to restart nimsuggest since the command palette thing wouldn't actually do it
22:44:41FromDiscord<Robyn [She/Her]> Are you using choosenim, by any chance?
22:46:30FromDiscord<morgan> yea
22:47:37FromDiscord<Robyn [She/Her]> Yeah, ditch that to solve the dead processes
22:47:47FromDiscord<morgan> ugh now that i replaced my custom vec2 with entirely unnamed field tuples, i still get errors because nim still isn't seeing my generic `[]`/`[]=` procs
22:47:53FromDiscord<morgan> oh interesting
22:48:14FromDiscord<Robyn [She/Her]> Choosenim's proxy binaries causes an issue with leaving processes alive in the background
22:48:17FromDiscord<Robyn [She/Her]> It's... Unfortunate
22:54:24FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=sVoOnphb
22:54:46FromDiscord<Robyn [She/Her]> This is causing so much pain
23:01:28*lucasta joined #nim
23:02:07FromDiscord<Robyn [She/Her]> Finally fixed it, god
23:03:22*madprops left #nim (Leaving)
23:06:30FromDiscord<Robyn [She/Her]> `join` macro with possibly useless template: https://play.nim-lang.org/#pasty=wbLMlDee
23:07:39FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=jGaJiWPy
23:11:17*lucasta quit (Ping timeout: 240 seconds)
23:14:54FromDiscord<Elegantbeef> @morgan are you attempting to overload `[]` for tuples?
23:15:00FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=nbKOHyRV
23:16:58FromDiscord<Elegantbeef> In an ideal world we bodge the ast so `type Bleh {.adtEnum.} = object` works
23:16:59*beholders_eye quit (Read error: Connection reset by peer)
23:17:01FromDiscord<Elegantbeef> But that does not work with generics
23:20:47FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "In an ideal world": Yeah, but oh well
23:22:28*beholders_eye joined #nim
23:44:20*beholders_eye quit (Read error: Connection reset by peer)
23:45:15FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "This horrid code also": Oh Beef, any reason why `None` and `Some` are `distinct TestA` instead of making them simple templates?
23:50:09*beholders_eye joined #nim
23:53:26*def- quit (Quit: -)
23:53:41*def- joined #nim
23:58:12FromDiscord<Elegantbeef> Cause you cannot dispatch on templates
23:59:48FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Cause you cannot dispatch": What do you mean exactly?
23:59:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ysPLVDrU