<< 13-06-2023 >>

00:02:07FromDiscord<elcritch> Yah, looks like infix operators with macro types aren't expanded
00:03:19FromDiscord<Elegantbeef> Well PR time for you! 😛
00:03:24FromDiscord<huantian> In reply to @Reggie <3 "what up": Nim 😛
00:22:57FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4y6y
00:31:13*derpydoo joined #nim
00:44:32*azimut quit (Ping timeout: 240 seconds)
00:51:00*oldpcuser quit (Ping timeout: 250 seconds)
00:51:02*oldpcuser_ joined #nim
01:04:13*oldpcuser_ quit (Ping timeout: 255 seconds)
01:30:12*oldpcuser joined #nim
01:40:58*oldpcuser_ joined #nim
01:41:44*oldpcuser_ quit (Remote host closed the connection)
01:43:05*oldpcuser quit (Read error: Connection reset by peer)
01:58:22*oldpcuser joined #nim
02:31:46*systemdsucks quit (*.net *.split)
02:31:46*calebtj quit (*.net *.split)
02:31:46*om3ga quit (*.net *.split)
02:31:47*noeontheend quit (*.net *.split)
02:31:47*henrytill quit (*.net *.split)
02:31:47*casaca quit (*.net *.split)
02:31:47*mronetwo quit (*.net *.split)
02:31:47*oddish quit (*.net *.split)
02:31:47*Amun-Ra quit (*.net *.split)
02:31:47*ehmry quit (*.net *.split)
02:31:57*oddish joined #nim
02:31:57*mronetwo joined #nim
02:32:30*henrytill joined #nim
02:33:01*om3ga joined #nim
02:33:51*ehmry joined #nim
02:33:54*noeontheend joined #nim
02:33:59*casaca joined #nim
02:35:12*calebtj joined #nim
02:35:31*systemdsucks joined #nim
02:39:42*oldpcuser_ joined #nim
02:42:30*oldpcuser quit (Ping timeout: 260 seconds)
02:43:57*oldpcuser_ is now known as oldpcuser
02:59:52*oldpcuser quit (Read error: Connection reset by peer)
03:00:33*oldpcuser joined #nim
03:02:41*Amun-Ra joined #nim
03:05:43*oldpcuser_ joined #nim
03:08:16*oldpcuser quit (Ping timeout: 248 seconds)
03:11:25*oldpcuser_ quit (Quit: "mIRC sucks because is non-free software" Richard Stallman)
03:11:48*oldpcuser joined #nim
03:21:05FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4y6R
03:27:00FromDiscord<yepoleb> In reply to @ripluke "im trying to generate": c2nim often has problems with ifdef, i always remove the non matching case
03:27:27FromDiscord<yepoleb> In this case i'd remove everything except line 89
03:27:38FromDiscord<ringabout> What's wrong with git?↵`git checkout -q head` works on Windows but no Linux↵`git checkout -q #head` works on Linux but not Windows
03:28:31FromDiscord<ringabout> (edit) "no Linux↵`git checkout -q #head` works on" => "not" | removed "but not Windows"
03:29:06FromDiscord<graveflo> idk maybe there is a shell issue on win
03:29:38FromDiscord<graveflo> yea the `#` is a powershell comment. Idk if that will mess it up
03:29:51FromDiscord<graveflo> and I dont have a win vm to test it
03:30:49FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4y6S
03:31:10FromDiscord<graveflo> it might have been made a special case for windows because people kept fing it up. idk though I'm just guessing
03:31:47FromDiscord<graveflo> does the `#head` work in powershell?
03:32:15FromDiscord<ringabout> Nope
03:32:23FromDiscord<ringabout> Seems to be a comment
03:32:25FromDiscord<graveflo> well thatd be my guess
03:32:52FromDiscord<graveflo> god i love windows
03:34:20FromDiscord<Invisible> How would I kill a process by process ID using nim?
03:34:26FromDiscord<Invisible> on win
03:34:31FromDiscord<ringabout> Guess `git checkout -q devel` should have the same effect.
03:34:33FromDiscord<graveflo> btw `"#head"` might work
03:35:27FromDiscord<graveflo> In reply to @Invisible "How would I kill": https://nim-lang.org/docs/osproc.html#kill%2CProcess
03:35:36FromDiscord<Invisible> Not by ID
03:35:43FromDiscord<Invisible> It only kills proccesses it started
03:36:23FromDiscord<graveflo> you can make a `Process` object that has the right handle
03:36:52FromDiscord<Invisible> I need to kill notepad.exe. my program didn't start t
03:36:55FromDiscord<Invisible> (edit) "t" => "it"
03:38:19FromDiscord<demotomohiro> In reply to @Invisible "How would I kill": If you want to kill arbitrary process with ID, you probably need to use windows API or find out Nim library that do so.↵I dont think there is a proc that can kill process with ID in Nim's stdlib.
03:39:53FromDiscord<graveflo> In reply to @Invisible "I need to kill": There are many different ways to do this but this is the way I have do it in the past↵winapi (psapi.EnumProcesses) - to get the process handles↵psapi.GetProcessImageFileNameW to get the "image name" of each
03:40:20FromDiscord<graveflo> then you can use the handle from the matching image name to make a nim `Process` object and then you can prob just use `kill` from std
03:40:25FromDiscord<Invisible> I've never used the winapi
03:40:32FromDiscord<graveflo> or use the winapi method which I think is `PostMessage`
03:40:59FromDiscord<Invisible> Can I pass the proccess object as a string?
03:41:03FromDiscord<Invisible> or no
03:41:23FromDiscord<Invisible> @graveflo
03:41:39FromDiscord<graveflo> tot he `kill` proc? no
03:41:57FromDiscord<Invisible> basically im just trying to have one nimlang program kill another one
03:41:58FromDiscord<graveflo> try this `nimble install winim`
03:42:01FromDiscord<graveflo> https://github.com/khchen/winim/blob/master/winim/inc/psapi.nim#L130
03:42:36FromDiscord<graveflo> well if you are writing both nim programs you can use IPC to send a shutdown command. It'll prob be easier that way
03:42:57FromDiscord<Invisible> In reply to @graveflo "well if you are": Again, no clue what tihs s
03:43:03FromDiscord<Invisible> (edit) "tihs s" => "this is"
03:43:20FromDiscord<graveflo> inter-process communication. Simple way is using a loopback socket
03:43:44FromDiscord<Invisible> Is there a nim library for that?
03:44:27FromDiscord<demotomohiro> sent a long message, see https://paste.rs/vZeRY
03:45:06FromDiscord<Invisible> This is legit my second nim application coming from python I have no clue what this shit is
03:45:16FromDiscord<graveflo> there are sockets... but I think maybe youll need someone to help you with the threading tho bc I havent dont that... tbh I would just use `winim` and if this is really only going to be on windows
03:45:20FromDiscord<demotomohiro> sockets, or pipes are part of IPC and Nim's stdlib support them
03:45:31FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4y6W
03:45:43FromDiscord<Invisible> In reply to @demotomohiro "sockets, or pipes are": Sometimes I get a piperror when abruptley stopping a file stream, is it that?
03:47:27FromDiscord<demotomohiro> In reply to @ripluke "does anyone know how": It seems nimscripter depends on modules in Nim's compiler but it directly import `/usr/compiler/nimeval`?
03:48:39FromDiscord<demotomohiro> Maybe, if you have Nim's compiler module, adding `--path:/path/to/Nim` might allows nimscripter to import compiler module.
03:48:51FromDiscord<!&luke> Oh
03:49:31FromDiscord<graveflo> In reply to @Invisible "This is legit my": if you bear with me I can try to get you on the right track but I dont have a win computer right now. You'll prob have to put some pieces together yourself
03:49:51FromDiscord<Invisible> I dont either im compiling thru a vm
03:52:33FromDiscord<!&luke> In reply to @demotomohiro "Maybe, if you have": It seems upgrade to 1.6.12 from 1.6.10 fixed it
03:52:42FromDiscord<!&luke> (edit) "upgrade" => "upgrading"
03:55:21FromDiscord<graveflo> In reply to @Invisible "I dont either im": something like this should get the process handles. This would be the first step:
03:55:32FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4y6Y
03:55:54FromDiscord<Invisible> SIGSEGV: Illegal storage access. (Attempt to read from nil?)
03:55:56FromDiscord<demotomohiro> You probably can find a C lang book for beginner in book store for learning C lang. Then, you can learn how to use windows APIs in microsoft web sites for developers.
03:56:24FromDiscord<Invisible> Im not reading a book on C just to learn how to kill a proccess dawg
03:58:04FromDiscord<demotomohiro> In reply to @Invisible "Im not reading a": But microsoft web sites for developers is mostly written for C developer, and you might fail to use windows api if you dont read their documents.
03:58:05FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4y6Z
03:58:45FromDiscord<Invisible> sent a long message, see http://ix.io/4y70
03:58:46FromDiscord<Invisible> 8,6
03:58:48FromDiscord<graveflo> lat line `echo returned[]` sorry
03:58:57FromDiscord<graveflo> (edit) "lat" => "last"
03:59:27FromDiscord<Invisible> spat out "380"
03:59:45FromDiscord<graveflo> nice that means you have 380 processes running and it dumped them into the memory you allocated 🙂
03:59:55FromDiscord<graveflo> thats a lot of procs actually LOL
04:00:13FromDiscord<graveflo> oh wait thats the size in bytes purhaps
04:00:20FromDiscord<Invisible> 4 apps 25 background
04:00:25FromDiscord<Invisible> 29 total
04:03:32FromDiscord<michaelb.eth> In reply to @Invisible "This is legit my": Glad you're here and trying Nim!↵↵Something to realize/know is that, in practice, in some situations, there can be a fairly thin layer of abstraction between the Nim code and some raw C API stuff it's wrapping. That can be frustrating/challening, but it's also an opportunity to learn more and understand better what's "under the hood". Nim is not a scripting language.
04:04:05FromDiscord<michaelb.eth> (edit) "In reply to @Invisible "This is legit my": Glad you're here and trying Nim!↵↵Something to realize/know is that, in practice, in some ... situations," added "(many?)"
04:04:12FromDiscord<graveflo> In reply to @Invisible "4 apps 25 background": I'll dm you so we arent fogging up this chat how about?
04:04:19FromDiscord<Invisible> alright ig
04:04:22FromDiscord<Elegantbeef> Ugh dming
04:04:27FromDiscord<demotomohiro> Using windows API without reading a official document about it is like driving a car without going to driving school.↵https://learn.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocesses↵> To determine how many processes were enumerated, divide the lpcbNeeded value by sizeof(DWORD).
04:04:32FromDiscord<Invisible> In reply to @Elegantbeef "Ugh dming": Ugh non-discord user
04:04:43FromDiscord<graveflo> In reply to @Elegantbeef "Ugh dming": I'll post it for you if you want beef
04:04:49FromDiscord<graveflo> I didn't know you were so invested
04:05:04FromDiscord<odexine> Lol
04:05:41FromDiscord<Elegantbeef> It's not that i'm so invested but people going into dms from a public forum is ripe for misinformation
04:05:54FromDiscord<Elegantbeef> I dislike it myself, you do you
04:12:57FromDiscord<demotomohiro> In reply to @Invisible "How would I kill": If you know the process ID you want to kill, calling OpenProcess and TerminateProcess might be enough.↵https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocess↵https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess
04:13:19FromDiscord<huantian> I 99% agree with you beef, but there are situations where a convo is being wack because too many people are trying to convince 1 person of something
04:13:51FromDiscord<Elegantbeef> I'm sorry huan you really should drink water
04:14:01FromDiscord<huantian> Which doesnt work in a live chat like discord because it just feels like dog piling and multiple people have separate intermeginglhing convos with one person
04:14:05FromDiscord<!&luke> How do you run shell commands in nimscript, specifically through nimscripter
04:14:13FromDiscord<michaelb.eth> discord threads?
04:14:21FromDiscord<huantian> In reply to @Elegantbeef "I'm sorry huan you": What does that mean lmao
04:14:43FromDiscord<Elegantbeef> > too many people are trying to convince 1 person of something
04:14:44FromDiscord<Elegantbeef> I was jokingly responding to that
04:15:01FromDiscord<Elegantbeef> Uhh you might need to get the vmops luke
04:15:17FromDiscord<Elegantbeef> I personally would probably suggest just exposing your own proc to handle it
04:15:28FromDiscord<huantian> In reply to @Elegantbeef "I was jokingly responding": Sorry I don’t get the joke haha
04:16:04FromDiscord<Elegantbeef> Trying to convince you to drink water
04:16:14FromDiscord<Elegantbeef> Implying you argued you don't need it
04:16:23FromDiscord<huantian> Huh
04:16:24FromDiscord<!&luke> In reply to @Elegantbeef "I personally would probably": I tried that but I get no output when running the binary
04:17:39FromDiscord<Elegantbeef> What?
04:18:15FromDiscord<Elegantbeef> What was your exposed procedure like
04:22:09FromDiscord<!&luke> Oh wait the exported procedure is evaluated as nimscript itself
04:22:31FromDiscord<!&luke> That would explain why it didn't work as it straight up just called execShellCmd
04:28:06*Lord_Nightmare quit (Ping timeout: 260 seconds)
04:31:58*Lord_Nightmare joined #nim
04:36:35FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4y75
04:37:01FromDiscord<graveflo> (edit) "https://play.nim-lang.org/#ix=4y75" => "https://play.nim-lang.org/#ix=4y76"
04:52:07FromDiscord<demotomohiro> In reply to @graveflo "well if you want": It seems there is another way to get a list of processes using CreateToolhelp32Snapshot↵https://learn.microsoft.com/en-us/windows/win32/toolhelp/taking-a-snapshot-and-viewing-processes↵https://learn.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-createtoolhelp32snapshot
04:55:10FromDiscord<graveflo> yep that sounds familiar. The win api is an arduous beast unless you have a lot of patience. Do you think that the tool help method is better then `OpenProcess` ? perhaps one is unnecessarily permissive
04:55:45*ntat joined #nim
04:59:20FromDiscord<demotomohiro> It seems you need to allocate large storage before calling `EnumProcesses` without knowing the number of currently running processes.↵`CreateToolhelp32Snapshot` doesn't requires large storage.↵Im not sure you need to care about these API to just kill a process.
04:59:28FromDiscord<graveflo> actually speaking of unnecessarily permissive I bet `PROCESS_TERMINATE` is all that is needed for my code snippet. I was looking at some code that I wrote a year ago for messing with another procs memory
04:59:51*krux02 quit (Remote host closed the connection)
05:01:34FromDiscord<graveflo> In reply to @demotomohiro "It seems you need": thats true the help seems to use a linked list. I had seen other people mess around wit the os process tracking and it was a linked list so perhaps that is the underlying data type. I think it's going to be as complicated as the above or walking the linked list unless someone has written the code for you. I didn't see anything in nim std or `winim` that managed these API calls on a higher
05:02:10FromDiscord<graveflo> (edit) "wit the os" => "with window" | "with windowprocess tracking and it was a linked list ... so" added "also,"
05:09:16*oldpcuser quit (Remote host closed the connection)
05:09:41*oldpcuser joined #nim
05:21:15FromDiscord<Invisible> Whne using execCmdEx in app:gui mode, how can I prevent the CMD window from flashing for a breif moment?
05:21:44FromDiscord<Invisible> In reply to @graveflo "well if you want": Also I no longer need help with this, I found an alternative to what I was doing
05:23:15FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4y7e
05:33:24FromDiscord<demotomohiro> In reply to @Invisible "Whne using execCmdEx in": `execProcess` or `startProcess` in osproc module without `poEvalCommand` option probably dont open cmd window.
05:39:31*calebtj quit (Quit: WeeChat 3.8)
06:11:05*calebtj joined #nim
06:12:57*Guest78 joined #nim
06:13:39*Guest78 quit (Quit: Client closed)
06:21:54*PMunch joined #nim
07:42:40NimEventerNew thread by grd: Why is the posix package so "low level"?, see https://forum.nim-lang.org/t/10269
08:22:26*a11e99z joined #nim
08:30:14*marcus quit (Remote host closed the connection)
08:32:06*marcus joined #nim
10:18:13NimEventerNew thread by giga84: How doeas NIM differ from Mojo programming language?, see https://forum.nim-lang.org/t/10270
10:34:14*azimut joined #nim
10:45:58*derpydoo quit (Quit: derpydoo)
11:18:03*beholders_eye joined #nim
11:26:17FromDiscord<tecknicalwarrior> how do I turn an Int to str
11:26:45FromDiscord<tecknicalwarrior> there is intToStr
11:26:48FromDiscord<tecknicalwarrior> why isnt there the inverse?
11:26:51FromDiscord<dissolved girl> `$`
11:27:02FromDiscord<tecknicalwarrior> In reply to @dissolved girl "`$`": ?
11:27:42FromDiscord<dissolved girl> In reply to @tecknicalwarrior "?": Check out https://nim-lang.org/docs/dollars.html
11:28:46FromDiscord<tecknicalwarrior> this confuses me
11:29:33FromDiscord<dissolved girl> Did you see the example? 😅
11:29:40FromDiscord<tecknicalwarrior> yeah i dont
11:29:45FromDiscord<tecknicalwarrior> see any proc here that goes
11:29:49FromDiscord<tecknicalwarrior> inttostr
11:30:54FromDiscord<tecknicalwarrior> idk it didnt work initially
11:30:55FromDiscord<tecknicalwarrior> its working now
11:31:39FromDiscord<tecknicalwarrior> wait no it didnt
11:31:41FromDiscord<dissolved girl> https://play.nim-lang.org/#ix=4y8a
11:31:42FromDiscord<tecknicalwarrior> it gave me type of str
11:31:44FromDiscord<dissolved girl> Here's an example for you
11:32:02FromDiscord<tecknicalwarrior> In reply to @dissolved girl "Here's an example for": i want str to int
11:32:05FromDiscord<dissolved girl> I thought a string is what you wanted? You asked how to turn an int to string
11:32:06FromDiscord<tecknicalwarrior> not int to str
11:32:18FromDiscord<tecknicalwarrior> im
11:32:24FromDiscord<tecknicalwarrior> retartded
11:32:27FromDiscord<tecknicalwarrior> I want the inverse
11:32:33FromDiscord<dissolved girl> Oh, that's https://nim-lang.org/docs/parseutils.html#parseInt%2Cstring%2Cint%2Cint
11:32:34FromDiscord<tecknicalwarrior> https://media.discordapp.net/attachments/371759389889003532/1118140852158603304/image.png
11:32:42FromDiscord<tecknicalwarrior> I was already doing this
11:33:26FromDiscord<dissolved girl> wait no, wrong link
11:33:33FromDiscord<tecknicalwarrior> yeah I got an error
11:33:37FromDiscord<tecknicalwarrior> for type mismatch of char
11:33:58FromDiscord<dissolved girl> https://nim-lang.org/docs/strutils.html#parseInt%2Cstring
11:34:01FromDiscord<dissolved girl> This one
11:34:30FromDiscord<tecknicalwarrior> I dont see the difference between these 2
11:34:34FromDiscord<tecknicalwarrior> I still get the error
11:35:08FromDiscord<tecknicalwarrior> one is a fun but
11:35:42FromDiscord<dissolved girl> In reply to @tecknicalwarrior "I dont see the": The signatures are different
11:35:47FromDiscord<dissolved girl> What error are you getting?
11:36:05FromDiscord<tecknicalwarrior> sent a code paste, see https://paste.rs/Wi1A0
11:36:56FromDiscord<dissolved girl> Well... yeah, the proc takes a string, not a char. The dollar would help you once again https://nim-lang.org/docs/dollars.html#%24%2Cchar
11:37:13FromDiscord<tecknicalwarrior> okay im very new to nim
11:37:16FromDiscord<tecknicalwarrior> i just
11:37:21FromDiscord<tecknicalwarrior> wanna turn a number
11:37:26FromDiscord<tecknicalwarrior> like "43"
11:37:31FromDiscord<tecknicalwarrior> to "fourty three"
11:37:46FromDiscord<tecknicalwarrior> so I figured id do something like index it against a table
11:37:50FromDiscord<dissolved girl> Oh, that's... entirely different to what I thought you meant by "int to string"
11:37:57FromDiscord<tecknicalwarrior> well yeah
11:37:59FromDiscord<tecknicalwarrior> im trying
11:38:02FromDiscord<tecknicalwarrior> index it against a table
11:38:12FromDiscord<tecknicalwarrior> but the table takes a int value
11:38:45FromDiscord<dissolved girl> Can you share your code on https://play.nim-lang.org/
11:39:03FromDiscord<dissolved girl> The "share to ix" button on the bottom left of the editor
11:39:09FromDiscord<tecknicalwarrior> https://play.nim-lang.org/#ix=4y8c
11:39:11FromDiscord<graveflo> its `parseInt` right?
11:39:37FromDiscord<graveflo> https://nim-lang.org/docs/parseutils.html#parseInt%2Cstring%2Cint%2Cint
11:40:01FromDiscord<tecknicalwarrior> In reply to @graveflo "its `parseInt` right?": yeah well i need char input not string
11:40:02FromDiscord<tecknicalwarrior> so char to int
11:40:14FromDiscord<graveflo> just `int` then
11:40:18FromDiscord<dissolved girl> In reply to @tecknicalwarrior "https://play.nim-lang.org/#ix=4y8c": So basically, I think you're over-engineering this
11:40:27FromDiscord<tecknicalwarrior> In reply to @dissolved girl "So basically, I think": yeah im kinda bad
11:40:28FromDiscord<tecknicalwarrior> at nim
11:40:34FromDiscord<tecknicalwarrior> my native program is python
11:41:01FromDiscord<tecknicalwarrior> this is the starter program i write to learn a language
11:41:15FromDiscord<dissolved girl> Are you new to typing?
11:41:20FromDiscord<dissolved girl> Just for context
11:41:30FromDiscord<tecknicalwarrior> seeing as my primary langs are python lua and js
11:41:51FromDiscord<tecknicalwarrior> i have done very little c/c++, little java, less c#
11:43:51FromDiscord<dissolved girl> Okay, well, for starters, I think making a table is a bit overkill - arrays, for example, are already accessed by their index, so you could just create an array `["zero", "one", "two"]` and so on. You could access what you need using `[]`, so `digits[1]` would get you `"one"`, for example
11:44:17FromDiscord<tecknicalwarrior> okay sure
11:44:32FromDiscord<tecknicalwarrior> that doesnt help me deconstruct this tho
11:44:37FromDiscord<dissolved girl> Logically speaking, what you want to do is:
11:44:45FromDiscord<tecknicalwarrior> I still need to get that 1 to be of type int
11:45:03FromDiscord<graveflo> yea and notice that its a `string` not a `char`
11:47:59FromDiscord<dissolved girl> sent a long message, see http://ix.io/4y8g
11:48:08FromDiscord<dissolved girl> or, `"fourty"`, i guess
11:48:42FromDiscord<tecknicalwarrior> i see
11:48:43FromDiscord<tecknicalwarrior> thanks
11:52:04FromDiscord<graveflo> could also be worth noting that if you have a char digit `int('5')-int('0')` will also give you 5
11:54:23FromDiscord<dissolved girl> Yes, but that's kind of "magic" 😀 I would not do it like that
11:56:45FromDiscord<tecknicalwarrior> https://media.discordapp.net/attachments/371759389889003532/1118146939976949790/image.png
11:56:47FromDiscord<tecknicalwarrior> yay it works
11:56:59FromDiscord<dissolved girl> A few other pointers if you don't mind
11:57:18FromDiscord<tecknicalwarrior> okay so real quick, how can i strip the ending string of any whitespace?
11:57:58FromDiscord<dissolved girl> As in, remove all whitespace (anywhere in the string)? Or just leading or trailing whitespace?
11:58:58FromDiscord<graveflo> `string.strip(leading=false)`
11:59:02FromDiscord<tecknicalwarrior> In reply to @dissolved girl "As in, remove all": leading + trailing
11:59:09FromDiscord<tecknicalwarrior> In reply to @graveflo "`string.strip(leading=false)`": i see
11:59:51FromDiscord<dissolved girl> sent a code paste, see https://play.nim-lang.org/#ix=4y8k
12:01:50FromDiscord<dissolved girl> `num.len()-1` - this isn't required. You can do `num.high` to get the index of the last element, or just `^1` (as in - `num[^1]` would get the last element of `num`)
12:02:27FromDiscord<tecknicalwarrior> In reply to @dissolved girl "`num.len()-1` - this isn't": i see
12:03:17FromDiscord<dissolved girl> When importing from std, the leading `std/` isn't required. But you can use it if you want. You can also combine imports, so in your case `import std/[strutils, random, tables]` would work. If you feel like your imports are getting too long
12:04:12FromDiscord<tecknicalwarrior> how do I return multiple values?
12:04:31FromDiscord<dissolved girl> You can return a tuple
12:05:03FromDiscord<tecknicalwarrior> I see
12:05:19FromDiscord<dissolved girl> sent a code paste, see https://play.nim-lang.org/#ix=4y8m
13:21:58*xxgg joined #nim
13:48:13*krydos quit (Server closed connection)
13:48:27*krydos joined #nim
14:10:32*PMunch quit (Quit: Leaving)
14:13:27FromDiscord<System64 ~ Flandre Scarlet> Hi, In Nim, how is Sine calculated? With a precalculated table or with another method?
14:13:49FromDiscord<odexine> with whatever the math.h sine does?
14:15:23FromDiscord<voidwalker> Anyone have experience analysing program memory (with tools such as cheat engine etc) ? I need to extract some info, very clueless.
14:16:48FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "with whatever the math.h": This is the only thing I see https://media.discordapp.net/attachments/371759389889003532/1118182186978398278/image.png
14:20:16FromDiscord<juan_carlos> In reply to @voidwalker "Anyone have experience analysing": scanmem
14:20:42*deadmarshal_ quit (Quit: IRCNow and Forever!)
14:21:16NimEventerNew thread by noxnivi_: NimQML> How to pack resource files or gui files in compiled package, see https://forum.nim-lang.org/t/10271
14:30:06*tk quit (Server closed connection)
14:30:14*tk joined #nim
14:43:23FromDiscord<voidwalker> @juan_carlos thanks but I already have a toold for analysing the memory (cheat engine looks much more complex than game conqueror). What I miss is the know how, methods to obtain a pattern that I can use to transpose in code
14:44:41*deadmarshal_ joined #nim
14:49:43*xet7 quit (Quit: Leaving)
15:05:19*xet7 joined #nim
15:14:57*xxgg quit (Quit: Client closed)
15:16:11FromDiscord<Invisible> In reply to @demotomohiro "`execProcess` or `startProcess` in": Would iet let me run a CMD command?
15:18:58FromDiscord<demotomohiro> They run executable files. You can run cmd.exe commands like `cmd foo`. But I don't know whether it open console window.
15:23:02FromDiscord<System64 ~ Flandre Scarlet> Is it normal I can't do that? https://media.discordapp.net/attachments/371759389889003532/1118198850314833981/image.png
15:23:44FromDiscord<Elegantbeef> game is not mutable so yes
15:23:55FromDiscord<Elegantbeef> also why are you using method for a `object`
15:24:13FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "also why are you": methods are for ref object only?
15:25:30*xet7_ joined #nim
15:25:58FromDiscord<ieltan> iirc, methods are only useful when you have `object of`
15:27:41FromDiscord<Elegantbeef> Methods are for dynamic dispatch
15:27:47FromDiscord<Elegantbeef> Only for inheritance
15:28:26FromDiscord<System64 ~ Flandre Scarlet> oh alright, so I only should use procs here?
15:28:44*xet7 quit (Ping timeout: 240 seconds)
15:28:46FromDiscord<Elegantbeef> Yes
15:30:31*xet7_ quit (Quit: Leaving)
15:30:55*xet7 joined #nim
15:39:54madpropshow can i avoid optparser from treating "--thisString" as an argument? it's enclosed in quotes, it should treat it as a string
15:40:01madpropsas a flag i mean
15:40:06madpropsit's meant to be an argument
15:44:31FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4y9E
15:46:33FromDiscord<juan_carlos> sent a code paste, see https://play.nim-lang.org/#ix=4y9G
15:50:35FromDiscord<System64 ~ Flandre Scarlet> Bruh I marked it as gcsafe https://media.discordapp.net/attachments/371759389889003532/1118205783042162838/image.png
15:55:49FromDiscord<System64 ~ Flandre Scarlet> So that means I have to turn every function into gcsafe? Not very practical https://media.discordapp.net/attachments/371759389889003532/1118207103119675574/image.png
15:56:01FromDiscord<System64 ~ Flandre Scarlet> (edit) "function" => "proc"
16:03:02FromDiscord<System64 ~ Flandre Scarlet> so I really need to turn every proc into gcsafe?
16:03:05*strogon14 joined #nim
16:06:38FromDiscord<krab4t> what special in nim 2?
16:08:31FromDiscord<Elegantbeef> They changed teh 1 to 2
16:10:27*oldpcuser_ joined #nim
16:11:11FromDiscord<spotlightkid> nim 2, bekomme 1 gratis
16:11:19*oldpcuser quit (Killed (NickServ (GHOST command used by oldpcuser_)))
16:11:21*oldpcuser_ is now known as oldpcuser
16:12:00FromDiscord<juan_carlos> 2 Nim at the price of 1.
16:12:34FromDiscord<dissolved girl> The main character dies
16:13:03FromDiscord<spotlightkid> they already have nim 3 in the can
16:13:04FromDiscord<odexine> nim becomes 2
16:15:38FromDiscord<dissolved girl> If you scroll down on this page, you'll see some changes and bug fixes https://nim-lang.org/blog/2022/12/21/version-20-rc.html
16:19:39FromDiscord<krab4t> so nothing really special just to remove "legacy"
16:21:51FromDiscord<Elegantbeef> Little know fact in semver breaking changes indicates a major release
16:23:12FromDiscord<dissolved girl> All of the changes in any of my codebase are breaking
16:30:57FromDiscord<juan_carlos> In reply to @krab4t "so nothing really special": Thats actually big, so it wont become cpp-ish.
16:36:52FromDiscord<_gumbercules> In reply to @sys64 "so I really need": why are you using `method` with an `object`?
16:38:36FromDiscord<_gumbercules> In reply to @sys64 "so I really need": do you have more code to share? screenshots showing snippets like this are the worst
16:39:42FromDiscord<_gumbercules> `gcsafe` means something - it is a satisfiable constraint. I'm not sure about the state of Nim's `threadpool` but based on the code you shared in those screenshots, no one can tell if you're doing anything unsafe in the procedures you are calling in the proc that is pased to `createThread` or `spawn` or whatever
16:40:24FromDiscord<_gumbercules> If you don't know what `gcsafe` means or does, wading into multithreading is going to most likely be a world of pain for you
16:40:34FromDiscord<_gumbercules> (edit) "know" => "understand"
16:43:02*a11e99z quit (Quit: Leaving)
16:44:11FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4y9O
16:45:35FromDiscord<_gumbercules> `bootGameInstance` isn't `gcsafe` because it accesses globally scoped variables like `delta` which are not `threadvar`
16:45:51FromDiscord<_gumbercules> so the compiler is correct in complaining about the call to `spawn`
16:46:17FromDiscord<odexine> i think you intended to move them to the game instance fields?
16:46:57FromDiscord<_gumbercules> the real question is - what are you trying to do here and why are you trying to use threads to do it?
16:47:06FromDiscord<chmod222> What do you mean, forever being saddled with `std::vector<bool>` specializing into a bitfield because the C++ people wanted to demonstrate how specializing works is a great idea
16:47:34FromDiscord<odexine> In reply to @chmod222 "What do you mean,": oof
16:48:47FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "i think you intended": yeah I'm refactoring that
16:48:50FromDiscord<_gumbercules> @System64 ~ Flandre Scarlet threadpools generally should be used for short lived tasks that are CPU bound
16:48:57FromDiscord<System64 ~ Flandre Scarlet> In reply to @_gumbercules "the real question is": multi instance servers
16:48:59FromDiscord<_gumbercules> not initializing your game engine
16:49:13FromDiscord<System64 ~ Flandre Scarlet> In reply to @_gumbercules "not initializing your game": This is my backend
16:49:19FromDiscord<odexine> i think having an OS thread per instance is a bad idea?
16:49:20FromDiscord<_gumbercules> well the backend of your game engine then
16:49:26FromDiscord<odexine> you'd run out of resources really quickly
16:49:52FromDiscord<_gumbercules> you probably want to have a threadpool to handle conncections to your backend with
16:49:55FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "i think having an": Wdym by OS thread?
16:50:20FromDiscord<_gumbercules> but that can be tricky as well if the requests to your web server are long running / IO bound
16:50:23FromDiscord<System64 ~ Flandre Scarlet> In reply to @_gumbercules "you probably want to": I can have multiple servers on the same machine
16:50:26FromDiscord<odexine> nim std threading uses raw OS threads which are pretty resource heavy
16:50:34FromDiscord<System64 ~ Flandre Scarlet> Oh alright
16:50:41FromDiscord<System64 ~ Flandre Scarlet> what to do then?
16:50:42FromDiscord<_gumbercules> In reply to @sys64 "I can have multiple": yes - but you don't do this with threads typically
16:50:52FromDiscord<hugop707> In reply to @odexine "nim std threading uses": go fast or go home 😎
16:50:53FromDiscord<_gumbercules> you typically run several instances of your program and load balance them
16:51:06FromDiscord<odexine> In reply to @hugop707 "go fast or go": raw threads arent necessarily fast
16:51:11FromDiscord<_gumbercules> what to do is study how a production web server is written fi you want to write your own
16:51:16FromDiscord<hugop707> dont make me use the nerd emoju
16:51:20FromDiscord<Elegantbeef> Multi instance servers means spawning multiple processes
16:51:22FromDiscord<Elegantbeef> Even worse is that if one crashes they all crash
16:51:23FromDiscord<_gumbercules> or use an already existing web server that does whatever you're trying to do
16:51:24FromDiscord<Elegantbeef> Why wouldnt you just spawn a process per instance
16:51:25FromDiscord<Elegantbeef> You're using multi-threading to emulate a multi process OS on an multi process OS
16:51:39*antranigv quit (Quit: ZNC 1.8.2 - https://znc.in)
16:51:44FromDiscord<_gumbercules> yeah if you want to run multiple instances of your web server
16:51:48FromDiscord<_gumbercules> just run multiple instances of your program
16:51:53FromDiscord<_gumbercules> and put nginx in front of them
16:51:54FromDiscord<_gumbercules> done
16:52:03FromDiscord<dissolved girl> In reply to @odexine "i think having an": Tell that to https://github.com/guzba/mummy
16:52:14FromDiscord<odexine> well
16:52:17FromDiscord<odexine> it depends on the use case
16:52:24FromDiscord<odexine> and how theyre used
16:52:32FromDiscord<_gumbercules> In reply to @dissolved girl "Tell that to https://github.com/guzba/mummy": how many mummy users are there in the world really?
16:52:32FromDiscord<odexine> using OS threads isnt bad inherently
16:52:35*rockcavera joined #nim
16:52:42FromDiscord<dissolved girl> In reply to @_gumbercules "how many mummy users": At least one!
16:52:43FromDiscord<_gumbercules> and what is their load like
16:52:58FromDiscord<dissolved girl> Well
16:53:07FromDiscord<dissolved girl> Negligible
16:53:12FromDiscord<_gumbercules> I just wouldn't point to a library that uses threads for concurrent IO and call the dilemma solved
16:53:21FromDiscord<dissolved girl> I was making a joke 😅
16:53:25FromDiscord<_gumbercules> mummy I'm sure performs very poorly under certain workloads
16:53:28FromDiscord<_gumbercules> I gotcha
16:53:45*antranigv joined #nim
16:54:22FromDiscord<_gumbercules> @System64 ~ Flandre Scarlet you're definitely overcomplicating whatever you're trying to do - focus on a single instance of your game server for now and worry about multiple instances when you have the players to require it
16:56:03FromDiscord<odexine> In reply to @_gumbercules "mummy I'm sure performs": its all a use case thing really
16:56:12FromDiscord<odexine> whichever fits your situation the best
16:57:12FromDiscord<_gumbercules> yes but knowing what you are dealing with and what you need are often difficult questions to answer
16:57:34FromDiscord<_gumbercules> unless you've already built the thing, and then you're probably not asking these questions anyway because you now know 🙂
16:57:37FromDiscord<System64 ~ Flandre Scarlet> In reply to @_gumbercules "<@380360389377916939> you're definitely overcomplic": Ah alright then
16:58:07FromDiscord<_gumbercules> If you haven't written a networked game server before, it'd be best to follow along with some tutorial and make something simple
16:58:12FromDiscord<_gumbercules> even if it's not in Nim
16:58:19FromDiscord<_gumbercules> the concepts will still apply
16:59:18FromDiscord<_gumbercules> There's a pretty great blog post series from the creator of the Construct game engine re: building a 2d multiplayer RTS: https://www.construct.net/en/blogs/ashleys-blog-2/im-going-game-1596
16:59:24FromDiscord<_gumbercules> might be of interest to you
16:59:53FromDiscord<_gumbercules> there's also: https://gafferongames.com/categories/game-networking/ which is a ust read
16:59:56FromDiscord<_gumbercules> (edit) "ust" => "must"
17:00:09FromDiscord<_gumbercules> https://github.com/ThusSpokeNomad/GameNetworkingResources - has a bunch of links to good resources
17:00:34FromDiscord<System64 ~ Flandre Scarlet> Ah thanks for the resources!
17:00:59FromDiscord<anuke> Just to make sure, is the fastest way of appending characters to a string in a loop `newStringOfCap(...)` and `str &= 'c'`? I'd rather not have it do silly things like copy the entire string before appending each time.
17:01:18FromDiscord<_gumbercules> Of course and if you have specific questions there's probably a few of us in #gamedev who know the answer
17:01:52FromDiscord<Elegantbeef> `copyMem` is likely faster
17:02:22FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/ZB2Ft
17:02:30FromDiscord<Chronos [She/Her]> Anyone know if redis compiles for Nim 2.0?
17:02:37FromDiscord<Chronos [She/Her]> `nim-lang/redis`
17:03:23FromDiscord<anuke> In this case I am filtering character-by-charactger, the source is not a buffer
17:03:38FromDiscord<anuke> I specifically need to build it up in a loop
17:03:41FromDiscord<anuke> (edit) "character-by-charactger," => "character-by-character,"
17:04:01FromDiscord<Elegantbeef> If possible it's also likely quicker to do `newString(len)` then do `a[i] = c` if possible
17:04:05FromDiscord<Elegantbeef> Redundancy
17:04:54FromDiscord<Elegantbeef> `&=` will increment the length of course, whereas `a[i] = c` skips that
17:04:57FromDiscord<Elegantbeef> It's negligible of course, but you said fast!
17:05:58FromDiscord<anuke> right, as long as it doesn't do redundant copies
17:07:00FromDiscord<Elegantbeef> If you ever grow larger than the string's length you of course need to copy into a new allocation, otherwise no copies should be made
17:28:36*Jjp137 quit (Server closed connection)
17:28:56*Jjp137 joined #nim
17:44:27*beholders_eye quit (Ping timeout: 255 seconds)
17:50:47*rockcavera quit (Remote host closed the connection)
18:15:03ntatI make this pattern with 3 group delimited by brackets: let pattern = re"""(title=".+>)(.+)(</a>)""" and now found all text. How can I get only second group (.+)?
18:15:57ntatI use findAll(data, pattern)
18:20:34FromDiscord<Elegantbeef> use strscans is my response
18:20:43FromDiscord<Elegantbeef> Or parse the xml and extract it
18:22:59NimEventerNew thread by mantielero: Procs: forward declaration, see https://forum.nim-lang.org/t/10272
18:26:20*krux02 joined #nim
18:27:46*strogon14 left #nim (Und tschüss!)
18:34:48*Amun-Ra quit (Quit: Gdyby mi się chciało tak jak mi się nie chce...)
18:36:59*Amun-Ra joined #nim
19:05:54FromDiscord<System64 ~ Flandre Scarlet> So I can't do multithreading because I use a callback?? https://media.discordapp.net/attachments/371759389889003532/1118254938930282561/image.png
19:18:48ntatElegantbeef, i try parseHtml from htmlparser and now I have xmlnode. How can I print xmlnode?
19:29:18FromDiscord<_gumbercules> In reply to @sys64 "So I can't do": https://bholley.net/blog/2015/must-be-this-tall-to-write-multi-threaded-code.html
19:30:29FromDiscord<_gumbercules> you're also still using `method` and we can't really infer much from a screenshot of five lines of code
19:31:04FromDiscord<_gumbercules> we don't even know what `callbacks` is
19:31:56*dza quit (Ping timeout: 246 seconds)
19:32:44*rockcavera joined #nim
19:45:29FromDiscord<michaelb.eth> in a macro that has a generic param `S`, can I get the name of the type I passed for `S`?
19:48:56*azimut quit (Remote host closed the connection)
19:49:26*azimut joined #nim
20:05:12FromDiscord<starkiller1493> How do you do pass formdata like files etc to Nim's HTTP client? (curl -F)
20:47:02FromDiscord<spotlightkid> https://nim-lang.org/docs/httpclient.html#using-http-post↵(@starkiller1493)
21:09:42FromDiscord<Saint> In reply to @sys64 "So I can't do": What editor is that btw?
21:10:32FromDiscord<graveflo> looks like vscode
21:11:33FromDiscord<System64 ~ Flandre Scarlet> In reply to @Saint "What editor is that": Cursor
21:13:56FromDiscord<Saint> In reply to @sys64 "Cursor": Interesting, thank you!
21:18:42FromDiscord<System64 ~ Flandre Scarlet> You're welcome
21:20:25FromDiscord<taurusdaemon> speaking of IDEs, does anybody happen to know how the nim plugin for CLion is handled by the folks at Jetbrains?
21:21:14FromDiscord<taurusdaemon> I see that it has not received updates since January, it is not even compatible with the last couple IDE releases
21:24:25FromDiscord<graveflo> That was always totally broken for me. I think it is abandoned unfortunately
21:26:22FromDiscord<ieltan> Is it possible to have openArray default arguments?
21:26:35FromDiscord<ieltan> seems like i cant do it
21:27:15FromDiscord<graveflo> In reply to @taurusdaemon "speaking of IDEs, does": and as far as how things are "handled" over at jetbrains I'd say most of the time they simply aren't. There are regression bugs all over their products that have a lot of attention and have been broken for years. I think the plugin was just a small feature someone made and "support" isn't going to happen unless they whimsically decide to care about it.
21:29:14FromDiscord<graveflo> In reply to @ieltan "Is it possible to": I think `openArray` only really makes sense in relation to memory that has already been allocated. Like a `string` or `seq`. In this way a default parameter of this type doesn't make much sense
21:29:59*Jjp137 quit (Ping timeout: 240 seconds)
21:31:29FromDiscord<taurusdaemon> In reply to @graveflo "and as far as": That's unfortunate, I kinda like CLion, but vscodium+nim is not too bad
21:33:17FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4yay
21:33:37FromDiscord<!&luke> In reply to @sys64 "Cursor": Can u send a link to where u got it, I can't find it
21:33:48FromDiscord<graveflo> In reply to @taurusdaemon "That's unfortunate, I kinda": It's not too bad. A little finicky but that's alright
21:35:32FromDiscord<taurusdaemon> What other alternatives are there for something non-terminal based?
21:35:45FromDiscord<graveflo> nada as far as I know
21:37:07FromDiscord<graveflo> I mean you can use a lang-server editor like kate but its basically going to be the same tooling
22:00:50*ntat quit (Quit: Leaving)
22:05:38*dza joined #nim
22:28:29FromDiscord<Elegantbeef> `$typeof(S)`↵(@michaelb.eth)
22:28:47FromDiscord<Elegantbeef> No they're not existent types make an overload without any↵(@ieltan)
22:29:11FromDiscord<Elegantbeef> Or just `$S` should work
22:29:34FromDiscord<michaelb.eth> In reply to @Elegantbeef "`$typeof(S)` (<@383034029135364096>)": yes, but, if my original type named `MyType` is `enum` then in the macro I end up with the string-name `enum` instead of `MyType`
22:29:35FromDiscord<Elegantbeef> ntat did you solve your xml woes?
22:29:57FromDiscord<Elegantbeef> Huh?
22:30:41FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4yaG
22:31:11FromDiscord<Elegantbeef> Oh I didnt read macro
22:32:59FromDiscord<Elegantbeef> It's best to just supply them as a parameter really
22:33:23FromDiscord<Elegantbeef> Generic parameters do not really do what you want with macros
22:33:23FromDiscord<Elegantbeef> Passing in a typedesc achieves the same thing
22:34:17FromDiscord<michaelb.eth> that's what I went with, but in my case I also need the generic parameter because a parameter after the typedesc parameter needs to be of that type, which seems to work in procs but not in macro
22:35:10FromDiscord<elegantbeef> One day I won't have to swap to discord mid conversation
22:35:14FromDiscord<elegantbeef> What's the macro header?
22:35:37FromDiscord<huantian> i feel like the bridge is slowly getting worse rather than better lmao
22:35:40FromDiscord<Elegantbeef> What's the macro header?
22:36:13FromDiscord<elegantbeef> Losing pfps, delayed messages, dropped messages, it's really peak
22:36:24FromDiscord<elegantbeef> Ooh that was instant :d
22:36:41FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4yaI
22:36:42FromDiscord<huantian> maybe we should try mautrix-discord
22:37:06FromDiscord<elegantbeef> That's a lot of typedescs
22:37:08FromDiscord<graveflo> whats wrong with regular discord?
22:37:16FromDiscord<elegantbeef> "regular discord"?
22:37:27FromDiscord<graveflo> ?
22:37:32FromDiscord<elegantbeef> I do not like proprietary software, I mostly only use discord cause my friends use it
22:37:50FromDiscord<graveflo> just run it in a browser. I doubt all the sites you go to are open source
22:37:55FromDiscord<huantian> In reply to @graveflo "whats wrong with regular": we're using matrix-appservice-discord rn
22:38:02FromDiscord<elegantbeef> How does that resolve anything
22:38:07FromDiscord<elegantbeef> Also I do not do webapps
22:38:08FromDiscord<elegantbeef> So...
22:38:09FromDiscord<huantian> (edit) "rn" => "rn, via t2bot i think"
22:38:20FromDiscord<elegantbeef> By that i mean I do not do in browser webapps
22:38:29FromDiscord<elegantbeef> Ok so to the real conversation
22:38:50FromDiscord<elegantbeef> You have a type constrained to 3 enum types eh?
22:38:50FromDiscord<huantian> (edit) "think" => "think↵I was suggesting to try mautrix-discord, a different discord matrix brdige"
22:39:54FromDiscord<elegantbeef> You do not use `S` anywhere so you can lose the `S: Enum` and just do `intial: enum`
22:40:17FromDiscord<elegantbeef> then inside the macro you should be able to do `initial.getTypeInst`
22:40:25FromDiscord<elegantbeef> So no more generic constraint there
22:41:04FromDiscord<elegantbeef> Since I'm crazy about tuples in generic programming, I'd suggest using a tuple instead of the three parameters, but that's just cause I'm off
22:41:25FromDiscord<elegantbeef> You write one ECS based on tuples, and a GUI based on tuples and then suddenly any generic seems like a tuple is better 😄
22:41:56FromDiscord<elegantbeef> Huan is that bridge more recently updated?
22:42:32FromDiscord<elegantbeef> I still say I should work on the matrix API that tandy had, further develop it and make a bridge
22:43:11FromDiscord<elegantbeef> Fuck now discord's discord bridge has shit the bed, all these AI stopped talking to me
22:45:29FromDiscord<Invisible> Yeah I can't figure out how to run console commands in a app:gui without the cmd flickering
22:46:11FromDiscord<graveflo> is it flickering because the window is open for the command duration or does it become hidden while the subprocess is running?
22:47:02FromDiscord<Invisible> In reply to @graveflo "is it flickering because": Its open for the command's duration, im assuming. execCmdEx("whoami").output.strip()
22:47:37FromDiscord<Elegantbeef> use `osproc` and pass `poDaemon`
22:47:42FromDiscord<Elegantbeef> > poDaemon ## Windows\: The program creates no Window.
22:47:43FromDiscord<huantian> In reply to @elegantbeef "Huan is that bridge": I think so? not sure
22:47:47FromDiscord<huantian> In reply to @elegantbeef "I still say I": do it
22:47:50FromDiscord<Invisible> In reply to @Elegantbeef "use `osproc` and pass": as an option?
22:47:52FromDiscord<graveflo> yea so when you execute something in windows you have to give it startup flags to prevent a window from popping up. Usually the subprocess api has a way of controlling these flags
22:48:01FromDiscord<graveflo> what method are you using to call the subprocess?
22:48:01FromDiscord<Invisible> In reply to @graveflo "yea so when you": /c doesn't work
22:48:10FromDiscord<Invisible> In reply to @graveflo "what method are you": Im not using subproccesses
22:48:11FromDiscord<elegantbeef> Yes as option
22:48:32FromDiscord<elegantbeef> `execCmdEx("whoami", options = {poDaemon})`
22:48:44FromDiscord<graveflo> I'm not talking about the module a subprocess is a general concept
22:48:46FromDiscord<elegantbeef> probably also `poUsePath` or anything else you need
22:49:11FromDiscord<graveflo> and `cmd /c` just instructs cmd to open another /c and run the command
22:49:22FromDiscord<graveflo> (edit) "/c" => "cmd"
22:49:38FromDiscord<Invisible> In reply to @elegantbeef "`execCmdEx("whoami", options = {poDaemon})`": Thank you
22:49:41FromDiscord<Invisible> helped a ton 🙂
22:49:56FromDiscord<Invisible> what does poDaemon do exactly?
22:50:15FromDiscord<Elegantbeef> Read the docs
22:50:59FromDiscord<Invisible> OK
23:04:52FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4yaN
23:30:40*Jjp137 joined #nim
23:35:07FromDiscord<michaelb.eth> hmm, seems to be related to arc/orc vs. refc
23:35:46FromDiscord<michaelb.eth> with Nim devel, if I compile with `--mm:refc`, my code compiles as it did with Nim 1.6
23:36:41FromDiscord<graveflo> I dont know for sure but Ive heard that `seq` underlying implementation can be different depending on `mm` setting and version. `NimSeqV2` clearly has some differences that broke your code
23:36:57FromDiscord<graveflo> the err msg says it has something to do with generics and casting
23:37:32FromDiscord<graveflo> like `ptr seq`
23:38:27FromDiscord<graveflo> or actually that might `ptr NimSeqV2` might be a regular `seq`... I don't like that detail but w/e
23:38:57FromDiscord<graveflo> (edit) "might" => ""
23:40:39FromDiscord<graveflo> to be clear I think this is just an issue of `refc` vs `arc/orc` compatibility
23:41:45FromDiscord<michaelb.eth> but what to do 😄
23:41:58FromDiscord<graveflo> you didnt post enough info bud isk
23:42:03FromDiscord<graveflo> (edit) "isk" => "idk"
23:43:01FromDiscord<michaelb.eth> well I have a seq of object variant that involves generics, the approach works with refc, but if that's not possible with arc/orc then I'll have to change the way it works
23:43:13FromDiscord<michaelb.eth> maybe I needed a linked list instead of openArray / seq
23:43:18FromDiscord<michaelb.eth> (edit) "needed" => "need"
23:44:20FromDiscord<graveflo> what do you mean a seq object variant
23:44:59*jmdaemon joined #nim
23:47:18FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4yaX
23:48:00FromDiscord<graveflo> and the actual line that is crashing?
23:50:14FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4yaY
23:54:04FromDiscord<michaelb.eth> sent a code paste, see https://paste.rs/3Jcko
23:55:00FromDiscord<graveflo> yea thats probably what you are going to have to do
23:56:49FromDiscord<Invisible> Does Quit() in nimlang ignore try:except?
23:56:58FromDiscord<graveflo> the above works when you have the right enum. It just seems from your error that you are trying to cast / create (either implicitly or explicitly) a seq with a non-concrete type. There is a resolution problem. I've seen a rare bug in the resolution of generics like this but its prob a more obvious err
23:58:01FromDiscord<graveflo> In reply to @Invisible "Does Quit() in nimlang": except is only going to catch an exception. I am not sure if this proc raises a `CatchableError` but I doubt it
23:58:14FromDiscord<graveflo> try, finally on the other hand... maybe but you will just have to test it
23:58:14FromDiscord<Invisible> it says "quit with error"
23:58:34FromDiscord<graveflo> and error may be a return value. for example a program may exit with error code 1 to mean an error
23:59:00FromDiscord<graveflo> and error does not necessarily mean an exception and in nim not all exceptions are catchable even