<< 04-01-2023 >>

00:00:02*ltriant quit (Ping timeout: 272 seconds)
00:03:44FromDiscord<Bung> yes, that's one of problems, like nimscripter has `requires "nim >= 1.6.0"`, when `assume` use `taskRequires` , the minimal support will not work.
00:04:27*ltriant joined #nim
00:04:47FromDiscord<Bung> in the end user need install newer nimble themself and make it useable.
00:05:09FromDiscord<Elegantbeef> nim 2.0 isnt out yet so that's a non problem to me
00:05:29FromDiscord<Elegantbeef> When it's out i can bump the deps and ensure it compiles with it
00:07:40FromDiscord<Elegantbeef> Those that need to then can depend on `>= 1.0` and those with nim 2 can depend on `>= 1.1`
00:08:40FromDiscord<Elegantbeef> Dont know if that solves anything
00:09:44FromDiscord<Bung> I just feel sad, I was just trying install my old project...
00:10:21FromDiscord<Elegantbeef> And you pinned it to the version of nimscripter you were using?
00:10:35FromDiscord<Elegantbeef> Disruptek and I both tend to religiously semver
00:11:09FromDiscord<Bung> that doesn't matter whose lib
00:12:03FromDiscord<Bung> I should leave desk and crying minutes instead of writing text.
00:12:35FromDiscord<Elegantbeef> Sorry, I am trying to reason a solution that helps
00:12:42*ltriant quit (Ping timeout: 272 seconds)
00:16:13FromDiscord<hmmm> GhandiBeef ๐Ÿ™๐Ÿป
00:17:17FromDiscord<Bung> don't be, that's just a bad feeling happens in programming.
00:17:34*ltriant joined #nim
00:19:42FromDiscord<Bung> I think I'll create issue for nimble, nimble install nimble doesn't update the tool chain.
00:20:12FromDiscord<jos> this is stupid
00:20:13FromDiscord<jos> https://media.discordapp.net/attachments/371759389889003532/1059989591194620035/image.png
00:20:23FromDiscord<jos> if i remove the echo on line 10 there, wgpu complains about the cstring i'm passing in
00:20:26FromDiscord<jos> ๐Ÿค”
00:20:27FromDiscord<jos> am i stupid
00:21:17FromDiscord<Elegantbeef> What does it complain about?
00:21:23FromDiscord<Bung> complains about what?
00:21:34FromDiscord<Elegantbeef> Also does `contents` outlive the cstring
00:21:47FromDiscord<hmmm> I would complain about line numbers going down instead of up ๐Ÿง
00:21:48FromDiscord<Elegantbeef> Remember that `cstring(string)` doesnt do anything but get the address of the first character
00:22:09FromDiscord<jos> mm it might be going out of scope
00:22:10FromDiscord<Elegantbeef> Meh people like relative numbers instead of offsets
00:22:17FromDiscord<Elegantbeef> Especially for keyboard centric editing
00:22:23FromDiscord<jos> i'm not sure why it would be retained when it's echoed
00:22:28FromDiscord<jos> is echo async or something
00:22:30FromDiscord<jos> idk
00:22:35FromDiscord<jos> anyway, i think it's going out of scope.. good call
00:22:38FromDiscord<Elegantbeef> It locks it's not async
00:22:42FromDiscord<jos> yes i use vim bindings and relative line numbers are awesome ๐Ÿ™‚
00:22:48FromDiscord<jos> delete next 5 lines, move cursor 10 lines down, etc
00:22:54FromDiscord<Elegantbeef> It might just change the behaviour enough that the string doesnt get reused
00:22:56FromDiscord<Bung> so use refc
00:23:15FromDiscord<jos> im using orc right now
00:23:25FromDiscord<Elegantbeef> Nah the solution is likely to use `create(char, myString.len)` then copy to that pointer
00:23:34FromDiscord<jos> it's just because i'm using an unmanaged ffi
00:23:40FromDiscord<jos> i can just create the shader inside the func probably
00:23:44FromDiscord<jos> before its dropped
00:23:58FromDiscord<jos> ty for spotting that
00:33:12FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4ki7
00:34:09FromDiscord<hmmm> apparently my proc that returned bool was missing a return false line lol
00:42:34*ltriant quit (Ping timeout: 268 seconds)
00:48:44*wallabra quit (Ping timeout: 265 seconds)
00:49:13FromDiscord<Elegantbeef> Your macro/template returns a `seq[string]` but something expects bool
00:49:17FromDiscord<! Nilts> How would i thread a non-gcsafe proc?
00:50:16*wallabra joined #nim
00:54:06FromDiscord<Elegantbeef> If you authored the proc use the ugly `{.cast(gcSafe).}:`
00:56:10FromDiscord<! Nilts> In reply to @Elegantbeef "If you authored the": idk what that means
00:56:12FromDiscord<Elegantbeef> Otherwise do the same just with a proc that calls the other one
00:56:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kia
00:58:26FromDiscord<! Nilts> sent a code paste, see https://paste.rs/5sX
00:58:35FromDiscord<! Nilts> (edit) "https://play.nim-lang.org/#ix=4kic" => "https://play.nim-lang.org/#ix=4kib"
00:58:45FromDiscord<Elegantbeef> With thread analysis on `{.gcSafe.}` does not force a procedure to be thread safe
00:59:08*ltriant joined #nim
01:05:54*ltriant quit (Ping timeout: 272 seconds)
01:11:29*ltriant joined #nim
01:38:12*ltriant quit (Ping timeout: 272 seconds)
01:38:59*yolo joined #nim
01:39:09yolowhat is nimcheck and where is it
01:43:20FromDiscord<huantian> are you talking about the command line switch `nim check`?
01:43:37FromDiscord<huantian> see <https://nim-lang.org/docs/nimc.html> https://media.discordapp.net/attachments/371759389889003532/1060010580129349652/image.png
01:43:38yolonimble install nimlsp will download and compile then says "[email protected] already exists. Overwrite? [y/N]", why not check it before the lengthy build?
01:45:34yoloFromDiscord: thanks, yes vim call it nimcheck and it ended up calling 'nim check' indeed
01:48:30FromDiscord<Bung> it's cli tool check file
01:48:51*ltriant joined #nim
01:49:54termerWhat webservers are people using for ORC?
01:50:07termerHttpBeast and subsequently Jester have major issues on ORC
01:50:36termerso far AsyncHttpServer is the only one I've tested that handles the new memory management system properly
01:51:02termerI can scale it across threads without an issue (although it is a bit annoying), but it's said to not be meant for production
01:51:31termerOnce you start slamming HttpBeast with requests under ORC, it segfaults
01:55:28FromDiscord<willyboar> In reply to @termer "What webservers are people": https://github.com/guzba/mummy
01:56:25termerAw man but that one's not async
01:56:45termerI did forget about mummy
01:58:00termerIt does look pretty good for whipping something up quickly
01:58:03termer'
02:00:46FromDiscord<willyboar> And there is also guildestern
02:03:45termerFirst time hearing about i, looks decent
02:04:16termerOf course I'm not demanding people do anything, but it is a little surprising to see a distinct lack of mature ORC-compatible Nim webservers
02:08:27*wallabra quit (Ping timeout: 256 seconds)
02:12:54yoloafter first 'nimble install' i saw $HOME/.nimble/packages-global.json, does nimble has a global and local package management style like what npm does?
02:13:08yolohas-have
02:14:03FromDiscord<Elegantbeef> It's decentralised
02:14:08FromDiscord<Elegantbeef> It uses git or mercurial(i think) and uses urls
02:14:20FromDiscord<huantian> nimble only has global package installs
02:14:24FromDiscord<huantian> more like pip than npm
02:17:43yoloThanks. does nim have something like python's venv, or everything is global and all packages share the same global package space.
02:17:53yoloneed read more basic stuff, newbie here.
02:17:57FromDiscord<huantian> you might be looking for something like <https://github.com/disruptek/nimph>
02:18:09FromDiscord<huantian> though I haven't used it myself
02:35:48FromDiscord<pyolyokh> In reply to @yolo "Thanks. does nim have": nimble has a completely different mode if you want it, 'localdeps' mode. e.g., `nimble -l install illwill`
02:41:51FromDiscord<huantian> oh yeah I forgot about that
02:41:58FromDiscord<huantian> https://media.discordapp.net/attachments/371759389889003532/1060025265482387586/image.png
02:42:09FromDiscord<huantian> (edit) "" => "https://github.com/nim-lang/nimble#nimbles-folder-structure-and-packages"
02:55:15*yolo feels a need for 'nim|nimble the right way'
02:55:44yolosome overview about its paradigm bacially, that is different from those big ones like python and node's pkg management style
02:56:32yolonim is valuable to me only if it can produce c/c++/js(even pynim) faster
02:56:55yoloi mean the speed to code|debug|maintain in general
03:29:17*azimut quit (Ping timeout: 255 seconds)
03:30:55*TakinOver quit (Ping timeout: 268 seconds)
03:39:35*wallabra joined #nim
03:57:56*azimut joined #nim
04:08:33*wallabra quit (Ping timeout: 260 seconds)
04:09:05*wallabra joined #nim
04:10:55*derpydoo quit (Ping timeout: 252 seconds)
04:19:03*wallabra quit (Ping timeout: 260 seconds)
04:37:34*xet7 quit (Remote host closed the connection)
05:07:42*TakinOver joined #nim
05:35:42*TakinOver quit (Ping timeout: 272 seconds)
05:39:47*azimut quit (Ping timeout: 255 seconds)
05:51:44*arkurious quit (Quit: Leaving)
06:14:50*ltriant quit (Read error: Connection reset by peer)
06:15:11*ltriant joined #nim
06:52:58*ltriant quit (Ping timeout: 272 seconds)
06:53:13*ltriant joined #nim
06:54:19*rockcavera quit (Remote host closed the connection)
06:58:02*ltriant quit (Ping timeout: 272 seconds)
07:51:31*PMunch joined #nim
08:03:33FromDiscord<Require Support> `Warning: A package "[email protected]" with checksum "5dcbe466bf7289acc0c3d2fcb9a9aef55ef9a0bf" already exists the the cache.` how do i tell nimble to ignore cache
08:04:14*xet7 joined #nim
08:12:42*madprops quit (Quit: biourvgrt445)
08:13:28*madprops joined #nim
08:13:29*madprops quit (Changing host)
08:13:29*madprops joined #nim
08:30:05PMunch@Require_Support, delete your cache?
08:55:01FromDiscord<spooky> hi, how i can unzip a zip file that is protected by a password ?
08:58:07FromDiscord<voidwalker> @spooky https://github.com/nim-lang/zip/commit/c10c250b170316d5f831cfb054e5ecc75b009ee6 seems to be implemented here in this lib
08:58:46FromDiscord<spooky> alr thank for the anwser !
08:59:34FromDiscord<voidwalker> although not in the higher level "open" proc from what it seems :\
08:59:48FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4kj5
09:01:31FromDiscord<voidwalker> so you'll have to use the lower one
09:04:43*xet7 quit (Ping timeout: 248 seconds)
09:15:03*krux02_ joined #nim
09:17:48*xet7 joined #nim
09:31:03FromDiscord<Ailuros ๐Ÿ’–๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ’œ๐Ÿ–ค> In reply to @Ailuros ๐Ÿ’–๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ’œ๐Ÿ–ค "Hey all, have a": Anyone an idea? Not sure if there's maybe a way to do it with winim/clr or if I have to redirect stdout like I tried
09:47:25*ltriant joined #nim
09:52:29*ltriant_ joined #nim
09:54:06*ltriant quit (Ping timeout: 272 seconds)
10:17:58FromDiscord<sOkam!> In reply to @Ailuros ๐Ÿ’–๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ’œ๐Ÿ–ค "Hey all, have a": I personally don't use streams, since treeform/binny does the same but from a string instead. so it opens a lot more optionsโ†ตBut if your issue is getting the data into string format in the first place, then it might not be applicable
10:20:43FromDiscord<fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=4kjk
10:30:48PMunchAiluros, not sure how clr works, but do you have a file handle or something?
10:31:23PMunchIs it writing to your programs stdout and you want to capture your own stdout?
10:41:44FromDiscord<Ailuros ๐Ÿ’–๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ’œ๐Ÿ–ค> The way it is now it just comes out on the programs stdout. Not sure if I can change that by using clr differently (can't find many examples and difficult to find from sources for me)
10:47:19FromDiscord<fbpyr> sent a code paste, see https://paste.rs/5DB
10:50:00PMunchDo you need this to work cross platform?
10:57:44*azimut joined #nim
11:01:01FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4kjy
11:02:50FromDiscord<amadan> First one uses the split iterator (https://nim-lang.org/docs/strutils.html#split.i%2Cstring%2Cchar%2Cint) which only returns a stringโ†ตSecond one first makes a seq and then since you have the two variables it calls the pairs iterator (https://nim-lang.org/docs/iterators.html#pairs.i%2Cseq%5BT%5D)
11:03:16FromDiscord<amadan> (edit) "First one uses the split iterator (https://nim-lang.org/docs/strutils.html#split.i%2Cstring%2Cchar%2Cint) which only returns a stringโ†ตSecond one first makes a seq and then since you have the two variables ... it" added "in the loop"
11:03:17FromDiscord<hmmm> ๐Ÿค”
11:04:04FromDiscord<hmmm> first one doesn't make a seq like second one? ๐Ÿคจ
11:04:47FromDiscord<Rika> yes
11:05:00FromDiscord<Rika> because it is the iterator
11:05:10FromDiscord<Rika> there is no implicit .pairs since its already an iterator
11:05:26FromDiscord<Rika> use std/enumerate
11:06:16FromDiscord<hmmm> I see, well it's not really a problem to make a variable first. I just felt strange that making it a variable suddenly made the entire thingy work ๐Ÿค”
11:07:24FromDiscord<Rika> `if x.split(" ").len > 0:โ†ต for i,v in x.split(" "):` seems redundant btw
11:07:39FromDiscord<hmmm> yea? how can I make it one line
11:07:41FromDiscord<Rika> its gonna be pretty slow for a string that is long
11:07:50FromDiscord<Rika> In reply to @hmmm "yea? how can I": just dont do the if statement
11:08:49FromDiscord<hmmm> I think the body of the for crashes and burns if x.split(" ").len == 0. Or I just assumed it
11:08:57FromDiscord<hmmm> maybe it doesnt?
11:09:01FromDiscord<Rika> no?
11:09:17FromDiscord<Rika> a for loop doesnt run if there is no values to iterate with
11:09:58FromDiscord<hmmm> rika you need to make infinite copies of yourself and put them on GPT so I have you always with me
11:10:16FromDiscord<Rika> lol
11:10:29FromDiscord<Rika> just ask gpt really its prolly gonna do half the work for ya already
11:24:55FromDiscord<Ailuros ๐Ÿ’–๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ’œ๐Ÿ–ค> In reply to @PMunch "Do you need this": Was this aimed at me (was gone for lunch for a bit)? Windows only would be good (I think clr is windows only as well)
11:30:17PMunchHmm, don't know enough about windows to provide a platform specific solution there..
11:45:51FromDiscord<ShalokShalom> CLR itself is cross platform
11:47:31*krux02_ quit (Remote host closed the connection)
11:51:24*xet7 quit (Remote host closed the connection)
12:13:57FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kjM
12:15:47FromDiscord<Vindaar> In reply to @4zv4l "is it possible to": to give you inspiration: https://hookrace.net/blog/nim-binary-size/
12:18:16FromDiscord<4zv4l> when I try with `--os:standalone` I get thisโ†ต`/home/azz/.choosenim/toolchains/nim-1.6.10/lib/system/fatal.nim(18, 11) Error: cannot open file: /home/azz/Documents/git/code/nim/learn/only_syscall/panicoverride`
12:18:29FromDiscord<4zv4l> I need to create a file panicoverride ?
12:28:24FromDiscord<djazz> yes
12:29:14FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kjQ
12:39:40FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kjT
12:40:17*jmdaemon quit (Ping timeout: 246 seconds)
13:06:50FromDiscord<scruz> Is Nim 2.0 out? I can only see version 1.6 on the download main download page.
13:07:20FromDiscord<scruz> (edit) removed "download" | removed "download"
13:07:26FromDiscord<scruz> (edit) "1.6" => "1.6.10"
13:07:53FromDiscord<Rika> it is not out yet iirc
13:07:56FromDiscord<fbpyr> @scruz\: so far only 2.0rc afaik
13:08:44FromDiscord<scruz> Ah ok
13:44:51*derpydoo joined #nim
14:07:14FromDiscord<djazz> Hi, I'm wrapping a C lib called lwIP, and for its struct it uses some common fields defined using #define. This is to avoid writing in the same fields in all the structs that needs it. Can something be done in Nim while keeping the compatability with the C headers? the define https://github.com/lwip-tcpip/lwip/blob/master/src/include/lwip/ip.h#L76-L89 and its use https://github.com/lwip-tcpip/lwip/blob/master/src/include/lwip/tcp.h#L244
14:13:55FromDiscord<djazz> Probably with a macro... but I haven't learned macros yet
14:21:25FromDiscord<4zv4l> I don't get itโ†ตif add the param `--noMain` and `standalone` but yet it tells me it doesn't find `main` how come ?
14:21:29FromDiscord<4zv4l> https://media.discordapp.net/attachments/371759389889003532/1060201305156620378/image.png
14:24:38PMunch@djazz, haaaave you heard about Futhark?
14:26:14PMunch@4zv4l, it's easier to help you if you share code and not screenshots of code..
14:26:49FromDiscord<Bung> @ElegantBeef `\nimscripter\src\nimscripter\expose.nim(301, 27) Error: ':anonymous' is not GC-safe as it accesses 'objA' which is a global using GC'ed memory` am now trying run nimscripter test in nim 1.9.1
14:30:13FromDiscord<4zv4l> sent a code paste, see https://paste.rs/feF
14:30:46FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kki
14:31:21FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kkj
14:32:58FromDiscord<Gumbercules> In reply to @4zv4l "why `nim": Because you're compiling an executable without an entry point? Or am I missing context?
14:33:03*xaltsc quit (Ping timeout: 256 seconds)
14:33:36FromDiscord<4zv4l> the entry point is `_start`
14:34:26FromDiscord<Gumbercules> Oh I see...
14:34:29FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kkk
14:34:43FromDiscord<4zv4l> In reply to @4zv4l "for example that's the": to compile this โ†ตI just need to doโ†ต`cc hello.c -nostdlib -ffreestanding`
14:35:25FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kkl
14:35:26FromDiscord<Gumbercules> -Wl,-e_start maybe?
14:35:29PMunchHmm, I am able to compile if I add more of the flags used here: https://hookrace.net/blog/nim-binary-size/
14:35:37FromDiscord<4zv4l> In reply to @PMunch "Hmm, I am able": yes right
14:35:37PMunchBut it's way bigger than it's supposed to be
14:35:42FromDiscord<4zv4l> but why does it need more flag
14:36:35FromDiscord<Gumbercules> That blog post is also ancients
14:36:40FromDiscord<Gumbercules> (edit) "ancients" => "ancient"
14:36:46FromDiscord<4zv4l> yeah 8y old
14:36:52FromDiscord<4zv4l> the compiler must have changed a lot
14:36:58FromDiscord<Gumbercules> It has for sure
14:36:59PMunchI'm able to compile with this: https://hookrace.net/blog/nim-binary-size/
14:37:04PMunchWhoops
14:37:06PMunchnim --os:standalone -d:danger --passL:-nostdlib --noMain --gc:none c onlysyscall.nim
14:37:07PMunchThat
14:37:39FromDiscord<4zv4l> indeed !
14:37:46FromDiscord<ambient> In reply to @Gumbercules "That blog post is": It would be really nice to have an updated version
14:37:50FromDiscord<4zv4l> but why gc:none ? I thought `standalone` would disable the gc anyway
14:37:56PMunchBut it's still 14Kb in size..
14:38:08FromDiscord<4zv4l> > Next we remove all the nice dynamic memory, error handling and other OS dependent goodies with --os:standalone (this implies --gc:none).
14:38:09PMunchI think standalone uses ARC now maybe?
14:38:14PMunchBut that's just a wild guess
14:38:14FromDiscord<4zv4l> oooh
14:38:47FromDiscord<Gumbercules> In reply to @ambient "It would be really": I don't think Dennis is active in Nim anymore, so it's doubtful
14:38:57FromDiscord<Gumbercules> Someone else could write one though!
14:39:32FromDiscord<4zv4l> got the same number of syscalls now https://media.discordapp.net/attachments/371759389889003532/1060205847436861550/image.png
14:40:15FromDiscord<4zv4l> I am still wondering how zig achieve to get only the syscalls you ask for
14:40:18FromDiscord<4zv4l> https://media.discordapp.net/attachments/371759389889003532/1060206040332910662/image.png
14:40:20FromDiscord<4zv4l> and the binary
14:40:21FromDiscord<4zv4l> is really small
14:42:09PMunchThe Nim one? Or the Zig one?
14:42:19PMunchI guess some GCC defaults might've changed as well..
14:42:41FromDiscord<ambient> Ideally you could write the program in Nim and use some library/script that makes very small binaries
14:43:36FromDiscord<willyboar> In reply to @Gumbercules "I don't think Dennis": Does anyone know why? I didn't met them when I arrived but looks like a smart guy.
14:43:54FromDiscord<ambient> A fun read http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
14:43:57FromDiscord<4zv4l> In reply to @PMunch "The Nim one? Or": zig one is small and only does the syscall you ask for
14:44:39PMunchHow big is your Nim one? I can't get mine to be under 14K..
14:46:03FromDiscord<ambient> Also if somebody wants to write a compressing linker... https://github.com/runestubbe/Crinkler ๐Ÿ˜‰
14:46:38FromDiscord<djazz> In reply to @PMunch "<@81390960805675008>, haaaave you heard": yes, I have heard of it but haven't tried it. I am using c2nim at the moment
14:46:53PMunchWell there's your problem :P
14:47:15FromDiscord<djazz> ๐Ÿ˜›
14:47:38FromDiscord<fbpyr> am I doing something obvious wrong here?\: https://play.nim-lang.org/#ix=4kknโ†ตor is this a bug (on linux&win10) with `orc`? (works fine with `refc`)
14:50:59*rockcavera joined #nim
14:51:37FromDiscord<fbpyr> sounds a bit like https://github.com/nim-lang/Nim/issues/14901 ๐Ÿค”
14:51:41FromDiscord<ringabout> In reply to @fbpyr "am I doing something": What's the error?
14:52:47FromDiscord<fbpyr> on linux it is `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`
14:53:41FromDiscord<fbpyr> on win10 I crashes with `Error` ๐Ÿ˜ถ
14:54:13FromDiscord<enthus1ast> fbpyr\: you do not need threads for this btw, you can use spawn a process
14:54:19FromDiscord<fbpyr> or rather\: `Error: execution of an external program failed:`
14:54:25FromDiscord<enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1060209545965744149): fbpyr\: you do not need threads for this btw, you can just spawn a process
14:54:32FromDiscord<fbpyr> enthus1ast\: but that blocks the loop no?
14:54:37FromDiscord<enthus1ast> no
14:54:43FromDiscord<fbpyr> ah?
14:55:11FromDiscord<enthus1ast> https://nim-lang.org/docs/osproc.html#startProcess%2Cstring%2Cstring%2CopenArray%5Bstring%5D%2CStringTableRef%2Cset%5BProcessOption%5D
14:55:27FromDiscord<fbpyr> the only reason I used threadpool and spawn was to still have the repl loop still available.. ๐Ÿค”
14:55:39FromDiscord<fbpyr> enthus1ast\: thx for the link! ๐Ÿ™‚
14:55:51FromDiscord<enthus1ast> yeah, just use startProcess for this
14:56:37FromDiscord<fbpyr> ah, I see. - will try right away. ๐Ÿ™‚
14:59:13*derpydoo quit (Remote host closed the connection)
14:59:29FromDiscord<fbpyr> there we go - works like a charm โœจ ๐Ÿ˜Œโ†ตthank you enthus1ast !
15:16:12*PMunch quit (Quit: Leaving)
15:26:03*xaltsc joined #nim
15:27:07*arkurious joined #nim
15:27:12*ephaptic joined #nim
15:49:59*ephaptic quit (Quit: WeeChat 3.7.1)
15:50:12*mbomba joined #nim
15:50:43*mbomba quit (Client Quit)
15:55:56*ephaptic joined #nim
16:03:45*ephaptic quit (Quit: WeeChat 3.7.1)
16:07:47FromDiscord<Gumbercules> In reply to @willyboar "Does anyone know why?": I'm not sure... When I joined around 2015 I feel they were the most active they've been during the time I've been here. They stopped being very active not too long after I joined if I remember correctly. Definitely within a couple of years.
16:08:18FromDiscord<Gumbercules> A lot of people came and left around that time though....
16:09:12FromDiscord<Gumbercules> Also long time contributors like fowl as well disappeares
16:09:17FromDiscord<Gumbercules> (edit) "disappeares" => "disappeared"
16:11:25*DarrylTheFish joined #nim
16:12:56FromDiscord<Corazone> Hi all, i was watching some video from last year about remote procedure call in nim, i can post link if anyone is interested, anyway the guy in the video was using {.nexport.} and {.nimport.} pragmas, however they dont exist, are there any substitudes or other ways to make remote procedure calls?
16:22:57FromDiscord<4zv4l> In reply to @PMunch "How big is your": same here
16:23:31FromDiscord<4zv4l> lot of padding with 0 bytes
16:26:15FromDiscord<Piqueiras> https://media.discordapp.net/attachments/371759389889003532/1060232701879259166/image.png https://media.discordapp.net/attachments/371759389889003532/1060232702223188099/image.png
16:26:18FromDiscord<Piqueiras> lol
16:31:23FromDiscord<Gumbercules> In reply to @Corazone "Hi all, i was": It was probably a custom pragma defined via a macro in that library
16:31:52FromDiscord<Gumbercules> Just search GitHub or nimble.directory or whatever it's called for rpc packages
16:32:02FromDiscord<Gumbercules> In reply to @Piqueiras "": #offtopic
16:32:43FromDiscord<rakgew> @Corazone could you post the video link?
16:36:05FromDiscord<Gumbercules> https://github.com/al6x/nim/blob/main/nodem/nodem/nexportm.nim
16:36:30FromDiscord<Gumbercules> @Corazone ยฅ
16:36:43FromDiscord<Gumbercules> (edit) "ยฅ" => "^"
16:37:10FromDiscord<Gumbercules> https://forum.nim-lang.org/t/7873
16:37:40FromDiscord<Gumbercules> In reply to @rakgew "<@243409969351884802> could you post": Video is linked in ^ thread
16:40:34FromDiscord<rakgew> thank you!
16:40:48FromDiscord<Gumbercules> In reply to @rakgew "thank you!": yw
16:41:28FromDiscord<Gumbercules> Yo Nim finally has qt bindings
16:41:43FromDiscord<Gumbercules> Didn't think this would ever materialize
16:42:33FromDiscord<Gumbercules> The author deserves all the ๐Ÿป
16:44:25FromDiscord<Gumbercules> Should be able donations on that repo
16:44:33FromDiscord<Gumbercules> Enable even
16:48:46FromDiscord<everyon> Do you guys know any simple libraries for multithreading IO-bound tasks that support more than 256 threads?โ†ตSimilar to `Pool.map` from multiprocessing in Python.โ†ตAs far as I tested, `threadpool`, `weave` and `nim-taskpools` support up to 256 threads.โ†ตI know I could just use `createThread` and manage those threads manually, but it would be nice if there was an alternative.
16:54:56FromDiscord<Gumbercules> In reply to @everyon "Do you guys know": Python's `multiprocessing` does not use threads, but processes, no?
16:55:16FromDiscord<everyon> In reply to @Gumbercules "Python's `multiprocessing` does not": `multiprocessing.dummy` I meant
16:55:37FromDiscord<Gumbercules> gotcha
16:55:50FromDiscord<Gumbercules> TIL
16:58:23FromDiscord<Corazone> In reply to @Gumbercules "Video is linked in": Thank you man, appreciate it really
17:01:07FromDiscord<Corazone> In reply to @Gumbercules "Video is linked in": Can you maybe point to the right direction if someone wants to learn more about remote procedure calls in nim, i did not find a lot of resources
17:05:54FromDiscord<spooky> hey, im building a virus scanner on discord ! and i need to use zip lin for uncompressing zipfile with the password "infected" so its does not get flagged by discord to do my analistique on it
17:06:09FromDiscord<spooky> but when im uncompressing a file with a password
17:06:16FromDiscord<spooky> insted of getting a error i get an empty file
17:06:20FromDiscord<spooky> can anyone help ? thank
17:06:33FromDiscord<spooky> sent a code paste, see https://play.nim-lang.org/#ix=4kli
17:06:39FromDiscord<spooky> (edit)
17:06:48FromDiscord<spooky> (edit) "https://play.nim-lang.org/#ix=4kli" => "https://play.nim-lang.org/#ix=4klj"
17:10:32FromDiscord<pmp-p> here's a virus to test with ๐Ÿ™‚ `X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H`
17:10:58FromDiscord<spooky> In reply to @pmp-p "here's a virus to": i know but im talking about actual virus that is present in the wild
17:11:05FromDiscord<spooky> like virusq totral
17:13:39FromDiscord<pmp-p> sadly passworded files does not seem to be supported
17:18:26FromDiscord<pmp-p> maybe this one https://github.com/brentp/nim-minizip
17:52:16FromDiscord<jtv> I always hated how the CARO test string is considered a "virus".
17:57:27FromDiscord<Gumbercules> In reply to @Corazone "Can you maybe point": I don't think there is anything special about Nim when it comes to remote procedure calls - you can implement them in Nim like you do in any other language
18:00:11FromDiscord<Corazone> In reply to @Gumbercules "I don't think there": Got it thanks
18:00:38*pro joined #nim
18:01:59*pro left #nim (#nim)
18:02:08FromDiscord<Gumbercules> https://github.com/search?q=rpc+language%3ANim&type=Repositories @Corazone - any of these should get you well on your way
18:03:48FromDiscord<Gumbercules> well the first few anyway - I'd probably try status's json-rpc first if you don't need a slimmer protocol
18:04:40FromDiscord<Gumbercules> https://www.ibm.com/docs/en/aix/7.1?topic=concepts-remote-procedure-call - I haven't read through this but it looks like a pretty decent summary of the basic concepts involved in implementing a rpc library
18:07:41FromDiscord<Gumbercules> there are lots of open source implementations too - https://github.com/laruence/yar-c - for instance
18:22:53*mahlon quit (Ping timeout: 265 seconds)
18:52:25FromDiscord<jos> is there a way to create a c-compatible function that is also a closure
18:53:38FromDiscord<huantian> In reply to @spooky "insted of getting a": have you tried zippy?
18:56:30*mahlon joined #nim
19:07:40*jvinet joined #nim
19:16:29FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4klM
19:17:31FromDiscord<hmmm> according to GPT I'm doing all perfectly so we know for sure that something smells rotten in denmark ๐Ÿ˜ƒ
19:22:17*ephaptic joined #nim
19:23:23FromDiscord<hmmm> ah ok found it lol, GPT was right the error was fatfingering elsewhere, all hail GPT
19:54:02FromDiscord<deech> sent a code paste, see https://play.nim-lang.org/#ix=4klZ
19:57:23FromDiscord<pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4km1
19:58:19FromDiscord<deech> I'm aware of that. But I'd like it work with variants as well.
19:58:26FromDiscord<Corazone> In reply to @Gumbercules "well the first few": Thank you man
20:00:48FromDiscord<pyolyokh> sorry, I think variants might be the big reason that you need field names. Nim's missing some of Go's nice shorthands for arrays of similar data, but OTOH you can parse or convert some nicer representation at compile-time.
20:01:21FromDiscord<deech> Thanks!
20:04:33*jmdaemon joined #nim
20:30:34*ephaptic quit (Quit: WeeChat 3.7.1)
20:40:52FromDiscord<Require Support> is there holy grail documentation for threading? ex: creating and tracking threads while also sharing variables between threads, etc. Note: not using orc/arc coz segfaults and stacktrace confuses me more
20:43:51FromDiscord<mratsim> In reply to @Require Support "is there holy grail": use orc/arc because you wonat get confusing errors if you pass strings or seqs around.
20:45:12FromDiscord<mratsim> In reply to @Require Support "is there holy grail": I don't think there is, there are way too many considerations at play.โ†ตโ†ตFIrst and formost, should I even use threading (see: https://nim-lang.org/blog/2021/02/26/multithreading-flavors.html )
20:46:08FromDiscord<mratsim> creating and tracking thread, you use createThread and store their handle somewhere. But now, why would you create your own custom threadpool?
20:48:46FromDiscord<Require Support> sorry by tracking i mean just print out how many threads are running and their IDs maybe
20:49:13FromDiscord<mratsim> sent a long message, see http://ix.io/4kmb
20:50:56FromDiscord<mratsim> well when you create a thread in your code, you have to store it somewhere. So either you do your own tracking, or the library you are using does it:โ†ตhttps://github.com/status-im/nim-taskpools/blob/stable/taskpools/taskpools.nim#L104
20:54:40FromDiscord<mratsim> There are 2 thread IDs:โ†ตโ†ต- the ID within the application (thread 0, 1, 2, 3, ....) if you use a threadpool this is not exposed, it's internal and relying on that will likely lead to deadlocks. If you create your own threads, it's all in your handsโ†ต- there is the OS assigned pid. In that case POSIX or Windows should expose something to get the current PID from the kernel.
20:57:19FromDiscord<Require Support> True, looking for the OS one for my scenario
21:11:04*tiorock joined #nim
21:11:04*tiorock quit (Changing host)
21:11:04*tiorock joined #nim
21:11:04*rockcavera quit (Killed (platinum.libera.chat (Nickname regained by services)))
21:11:04*tiorock is now known as rockcavera
21:14:06FromDiscord<nixfreak> @archnim -- I understand your frustration with documentation. I write a ton of technical docs for non-technical people and and still think its hard to do. Everyone learns differently and writing good docs is really , really hard to do. What I advise is to write your own docs in how you learn. I am kind of doing that myself here - https://nixfreak.mataroa.blog/blog/learning-nim-programming-language/. The Devs try to create docs to a wide
21:16:12FromDiscord<nixfreak> sent a long message, see http://ix.io/4kmk
21:36:28FromDiscord<Gumbercules> Np prob
21:36:40FromDiscord<Gumbercules> (edit) "Np" => "No"
21:39:50FromDiscord<Elegantbeef> @Bung\: 1.0.17 is out now, thanks
21:40:48FromDiscord<Jakraes> Quick question, does Nim offer the possibility to create abstract methods?
21:42:11FromDiscord<Elegantbeef> Depends on the requirement
21:42:32FromDiscord<Elegantbeef> You can make generic interfaces that require the programmer to implement them to call a procedure, you also can make a base method that errors if called
21:42:49FromDiscord<Jakraes> Yeah an interface is what I'm looking for pretty much
21:42:54FromDiscord<Elegantbeef> But there is no real "This type needs to implement this and this will be checked at compile time" for methods
21:43:06FromDiscord<Elegantbeef> Notice i said generic interface
21:43:16FromDiscord<Elegantbeef> Mixins i guess is more accurate
21:43:20FromDiscord<Elegantbeef> Iface does exist
21:44:23FromDiscord<Jakraes> I'll check it out and see if the work is worth it
21:44:32FromDiscord<Jakraes> Perhaps I'm overcomplicating some things
21:55:02FromDiscord<Bung> @ElegantBeef what should be done when cast from pointer to proc in vm ?
21:55:31FromDiscord<Bung> am asking because of this https://github.com/nim-lang/Nim/pull/21224
22:11:54FromDiscord<Elegantbeef> I'd imagine an error
22:13:18*Guest5591 joined #nim
22:14:51FromDiscord<Bung> so that's as it is.
22:16:13FromDiscord<Elegantbeef> Though perhaps it should be allowed
22:22:35FromDiscord<Bung> I dont quite get the cast thing, in some language just make it sempass, if it allowed then what's next to do in compiler.
22:29:34FromDiscord<Elegantbeef> Yea i cannot say much i think we know the type of the procedure in the VM so it could be allowed but it doesnt make much sense in the VM i think
22:35:10FromDiscord<Bung> no idea, since I havn't learned much vm things
22:38:46FromDiscord<djazz> In reply to @PMunch "<@81390960805675008>, haaaave you heard": Alright, so I am trying out Futhark. How do I make it so cuchars are uint8 instead? can't find a way using rename, retype or renameCallback
22:45:01*jjido joined #nim
22:58:35FromDiscord<djazz> hmm, seems like it no longer warns me about cuchar, maybe cuz I call from another package
23:05:49*djanatyn quit (Ping timeout: 260 seconds)
23:19:20*Guest5591 quit (Quit: leaving)