00:00:02 | * | ltriant quit (Ping timeout: 272 seconds) |
00:03:44 | FromDiscord | <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:47 | FromDiscord | <Bung> in the end user need install newer nimble themself and make it useable. |
00:05:09 | FromDiscord | <Elegantbeef> nim 2.0 isnt out yet so that's a non problem to me |
00:05:29 | FromDiscord | <Elegantbeef> When it's out i can bump the deps and ensure it compiles with it |
00:07:40 | FromDiscord | <Elegantbeef> Those that need to then can depend on `>= 1.0` and those with nim 2 can depend on `>= 1.1` |
00:08:40 | FromDiscord | <Elegantbeef> Dont know if that solves anything |
00:09:44 | FromDiscord | <Bung> I just feel sad, I was just trying install my old project... |
00:10:21 | FromDiscord | <Elegantbeef> And you pinned it to the version of nimscripter you were using? |
00:10:35 | FromDiscord | <Elegantbeef> Disruptek and I both tend to religiously semver |
00:11:09 | FromDiscord | <Bung> that doesn't matter whose lib |
00:12:03 | FromDiscord | <Bung> I should leave desk and crying minutes instead of writing text. |
00:12:35 | FromDiscord | <Elegantbeef> Sorry, I am trying to reason a solution that helps |
00:12:42 | * | ltriant quit (Ping timeout: 272 seconds) |
00:16:13 | FromDiscord | <hmmm> GhandiBeef ๐๐ป |
00:17:17 | FromDiscord | <Bung> don't be, that's just a bad feeling happens in programming. |
00:17:34 | * | ltriant joined #nim |
00:19:42 | FromDiscord | <Bung> I think I'll create issue for nimble, nimble install nimble doesn't update the tool chain. |
00:20:12 | FromDiscord | <jos> this is stupid |
00:20:13 | FromDiscord | <jos> https://media.discordapp.net/attachments/371759389889003532/1059989591194620035/image.png |
00:20:23 | FromDiscord | <jos> if i remove the echo on line 10 there, wgpu complains about the cstring i'm passing in |
00:20:26 | FromDiscord | <jos> ๐ค |
00:20:27 | FromDiscord | <jos> am i stupid |
00:21:17 | FromDiscord | <Elegantbeef> What does it complain about? |
00:21:23 | FromDiscord | <Bung> complains about what? |
00:21:34 | FromDiscord | <Elegantbeef> Also does `contents` outlive the cstring |
00:21:47 | FromDiscord | <hmmm> I would complain about line numbers going down instead of up ๐ง |
00:21:48 | FromDiscord | <Elegantbeef> Remember that `cstring(string)` doesnt do anything but get the address of the first character |
00:22:09 | FromDiscord | <jos> mm it might be going out of scope |
00:22:10 | FromDiscord | <Elegantbeef> Meh people like relative numbers instead of offsets |
00:22:17 | FromDiscord | <Elegantbeef> Especially for keyboard centric editing |
00:22:23 | FromDiscord | <jos> i'm not sure why it would be retained when it's echoed |
00:22:28 | FromDiscord | <jos> is echo async or something |
00:22:30 | FromDiscord | <jos> idk |
00:22:35 | FromDiscord | <jos> anyway, i think it's going out of scope.. good call |
00:22:38 | FromDiscord | <Elegantbeef> It locks it's not async |
00:22:42 | FromDiscord | <jos> yes i use vim bindings and relative line numbers are awesome ๐ |
00:22:48 | FromDiscord | <jos> delete next 5 lines, move cursor 10 lines down, etc |
00:22:54 | FromDiscord | <Elegantbeef> It might just change the behaviour enough that the string doesnt get reused |
00:22:56 | FromDiscord | <Bung> so use refc |
00:23:15 | FromDiscord | <jos> im using orc right now |
00:23:25 | FromDiscord | <Elegantbeef> Nah the solution is likely to use `create(char, myString.len)` then copy to that pointer |
00:23:34 | FromDiscord | <jos> it's just because i'm using an unmanaged ffi |
00:23:40 | FromDiscord | <jos> i can just create the shader inside the func probably |
00:23:44 | FromDiscord | <jos> before its dropped |
00:23:58 | FromDiscord | <jos> ty for spotting that |
00:33:12 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4ki7 |
00:34:09 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> Your macro/template returns a `seq[string]` but something expects bool |
00:49:17 | FromDiscord | <! Nilts> How would i thread a non-gcsafe proc? |
00:50:16 | * | wallabra joined #nim |
00:54:06 | FromDiscord | <Elegantbeef> If you authored the proc use the ugly `{.cast(gcSafe).}:` |
00:56:10 | FromDiscord | <! Nilts> In reply to @Elegantbeef "If you authored the": idk what that means |
00:56:12 | FromDiscord | <Elegantbeef> Otherwise do the same just with a proc that calls the other one |
00:56:48 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kia |
00:58:26 | FromDiscord | <! Nilts> sent a code paste, see https://paste.rs/5sX |
00:58:35 | FromDiscord | <! Nilts> (edit) "https://play.nim-lang.org/#ix=4kic" => "https://play.nim-lang.org/#ix=4kib" |
00:58:45 | FromDiscord | <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:09 | yolo | what is nimcheck and where is it |
01:43:20 | FromDiscord | <huantian> are you talking about the command line switch `nim check`? |
01:43:37 | FromDiscord | <huantian> see <https://nim-lang.org/docs/nimc.html> https://media.discordapp.net/attachments/371759389889003532/1060010580129349652/image.png |
01:43:38 | yolo | nimble 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:34 | yolo | FromDiscord: thanks, yes vim call it nimcheck and it ended up calling 'nim check' indeed |
01:48:30 | FromDiscord | <Bung> it's cli tool check file |
01:48:51 | * | ltriant joined #nim |
01:49:54 | termer | What webservers are people using for ORC? |
01:50:07 | termer | HttpBeast and subsequently Jester have major issues on ORC |
01:50:36 | termer | so far AsyncHttpServer is the only one I've tested that handles the new memory management system properly |
01:51:02 | termer | I 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:31 | termer | Once you start slamming HttpBeast with requests under ORC, it segfaults |
01:55:28 | FromDiscord | <willyboar> In reply to @termer "What webservers are people": https://github.com/guzba/mummy |
01:56:25 | termer | Aw man but that one's not async |
01:56:45 | termer | I did forget about mummy |
01:58:00 | termer | It does look pretty good for whipping something up quickly |
01:58:03 | termer | ' |
02:00:46 | FromDiscord | <willyboar> And there is also guildestern |
02:03:45 | termer | First time hearing about i, looks decent |
02:04:16 | termer | Of 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:54 | yolo | after 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:08 | yolo | has-have |
02:14:03 | FromDiscord | <Elegantbeef> It's decentralised |
02:14:08 | FromDiscord | <Elegantbeef> It uses git or mercurial(i think) and uses urls |
02:14:20 | FromDiscord | <huantian> nimble only has global package installs |
02:14:24 | FromDiscord | <huantian> more like pip than npm |
02:17:43 | yolo | Thanks. does nim have something like python's venv, or everything is global and all packages share the same global package space. |
02:17:53 | yolo | need read more basic stuff, newbie here. |
02:17:57 | FromDiscord | <huantian> you might be looking for something like <https://github.com/disruptek/nimph> |
02:18:09 | FromDiscord | <huantian> though I haven't used it myself |
02:35:48 | FromDiscord | <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:51 | FromDiscord | <huantian> oh yeah I forgot about that |
02:41:58 | FromDiscord | <huantian> https://media.discordapp.net/attachments/371759389889003532/1060025265482387586/image.png |
02:42:09 | FromDiscord | <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:44 | yolo | some overview about its paradigm bacially, that is different from those big ones like python and node's pkg management style |
02:56:32 | yolo | nim is valuable to me only if it can produce c/c++/js(even pynim) faster |
02:56:55 | yolo | i 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:33 | FromDiscord | <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:05 | PMunch | @Require_Support, delete your cache? |
08:55:01 | FromDiscord | <spooky> hi, how i can unzip a zip file that is protected by a password ? |
08:58:07 | FromDiscord | <voidwalker> @spooky https://github.com/nim-lang/zip/commit/c10c250b170316d5f831cfb054e5ecc75b009ee6 seems to be implemented here in this lib |
08:58:46 | FromDiscord | <spooky> alr thank for the anwser ! |
08:59:34 | FromDiscord | <voidwalker> although not in the higher level "open" proc from what it seems :\ |
08:59:48 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4kj5 |
09:01:31 | FromDiscord | <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:03 | FromDiscord | <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:58 | FromDiscord | <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:43 | FromDiscord | <fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=4kjk |
10:30:48 | PMunch | Ailuros, not sure how clr works, but do you have a file handle or something? |
10:31:23 | PMunch | Is it writing to your programs stdout and you want to capture your own stdout? |
10:41:44 | FromDiscord | <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:19 | FromDiscord | <fbpyr> sent a code paste, see https://paste.rs/5DB |
10:50:00 | PMunch | Do you need this to work cross platform? |
10:57:44 | * | azimut joined #nim |
11:01:01 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4kjy |
11:02:50 | FromDiscord | <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:16 | FromDiscord | <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:17 | FromDiscord | <hmmm> ๐ค |
11:04:04 | FromDiscord | <hmmm> first one doesn't make a seq like second one? ๐คจ |
11:04:47 | FromDiscord | <Rika> yes |
11:05:00 | FromDiscord | <Rika> because it is the iterator |
11:05:10 | FromDiscord | <Rika> there is no implicit .pairs since its already an iterator |
11:05:26 | FromDiscord | <Rika> use std/enumerate |
11:06:16 | FromDiscord | <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:24 | FromDiscord | <Rika> `if x.split(" ").len > 0:โต for i,v in x.split(" "):` seems redundant btw |
11:07:39 | FromDiscord | <hmmm> yea? how can I make it one line |
11:07:41 | FromDiscord | <Rika> its gonna be pretty slow for a string that is long |
11:07:50 | FromDiscord | <Rika> In reply to @hmmm "yea? how can I": just dont do the if statement |
11:08:49 | FromDiscord | <hmmm> I think the body of the for crashes and burns if x.split(" ").len == 0. Or I just assumed it |
11:08:57 | FromDiscord | <hmmm> maybe it doesnt? |
11:09:01 | FromDiscord | <Rika> no? |
11:09:17 | FromDiscord | <Rika> a for loop doesnt run if there is no values to iterate with |
11:09:58 | FromDiscord | <hmmm> rika you need to make infinite copies of yourself and put them on GPT so I have you always with me |
11:10:16 | FromDiscord | <Rika> lol |
11:10:29 | FromDiscord | <Rika> just ask gpt really its prolly gonna do half the work for ya already |
11:24:55 | FromDiscord | <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:17 | PMunch | Hmm, don't know enough about windows to provide a platform specific solution there.. |
11:45:51 | FromDiscord | <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:57 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kjM |
12:15:47 | FromDiscord | <Vindaar> In reply to @4zv4l "is it possible to": to give you inspiration: https://hookrace.net/blog/nim-binary-size/ |
12:18:16 | FromDiscord | <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:29 | FromDiscord | <4zv4l> I need to create a file panicoverride ? |
12:28:24 | FromDiscord | <djazz> yes |
12:29:14 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kjQ |
12:39:40 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kjT |
12:40:17 | * | jmdaemon quit (Ping timeout: 246 seconds) |
13:06:50 | FromDiscord | <scruz> Is Nim 2.0 out? I can only see version 1.6 on the download main download page. |
13:07:20 | FromDiscord | <scruz> (edit) removed "download" | removed "download" |
13:07:26 | FromDiscord | <scruz> (edit) "1.6" => "1.6.10" |
13:07:53 | FromDiscord | <Rika> it is not out yet iirc |
13:07:56 | FromDiscord | <fbpyr> @scruz\: so far only 2.0rc afaik |
13:08:44 | FromDiscord | <scruz> Ah ok |
13:44:51 | * | derpydoo joined #nim |
14:07:14 | FromDiscord | <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:55 | FromDiscord | <djazz> Probably with a macro... but I haven't learned macros yet |
14:21:25 | FromDiscord | <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:29 | FromDiscord | <4zv4l> https://media.discordapp.net/attachments/371759389889003532/1060201305156620378/image.png |
14:24:38 | PMunch | @djazz, haaaave you heard about Futhark? |
14:26:14 | PMunch | @4zv4l, it's easier to help you if you share code and not screenshots of code.. |
14:26:49 | FromDiscord | <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:13 | FromDiscord | <4zv4l> sent a code paste, see https://paste.rs/feF |
14:30:46 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kki |
14:31:21 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kkj |
14:32:58 | FromDiscord | <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:36 | FromDiscord | <4zv4l> the entry point is `_start` |
14:34:26 | FromDiscord | <Gumbercules> Oh I see... |
14:34:29 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kkk |
14:34:43 | FromDiscord | <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:25 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kkl |
14:35:26 | FromDiscord | <Gumbercules> -Wl,-e_start maybe? |
14:35:29 | PMunch | Hmm, I am able to compile if I add more of the flags used here: https://hookrace.net/blog/nim-binary-size/ |
14:35:37 | FromDiscord | <4zv4l> In reply to @PMunch "Hmm, I am able": yes right |
14:35:37 | PMunch | But it's way bigger than it's supposed to be |
14:35:42 | FromDiscord | <4zv4l> but why does it need more flag |
14:36:35 | FromDiscord | <Gumbercules> That blog post is also ancients |
14:36:40 | FromDiscord | <Gumbercules> (edit) "ancients" => "ancient" |
14:36:46 | FromDiscord | <4zv4l> yeah 8y old |
14:36:52 | FromDiscord | <4zv4l> the compiler must have changed a lot |
14:36:58 | FromDiscord | <Gumbercules> It has for sure |
14:36:59 | PMunch | I'm able to compile with this: https://hookrace.net/blog/nim-binary-size/ |
14:37:04 | PMunch | Whoops |
14:37:06 | PMunch | nim --os:standalone -d:danger --passL:-nostdlib --noMain --gc:none c onlysyscall.nim |
14:37:07 | PMunch | That |
14:37:39 | FromDiscord | <4zv4l> indeed ! |
14:37:46 | FromDiscord | <ambient> In reply to @Gumbercules "That blog post is": It would be really nice to have an updated version |
14:37:50 | FromDiscord | <4zv4l> but why gc:none ? I thought `standalone` would disable the gc anyway |
14:37:56 | PMunch | But it's still 14Kb in size.. |
14:38:08 | FromDiscord | <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:09 | PMunch | I think standalone uses ARC now maybe? |
14:38:14 | PMunch | But that's just a wild guess |
14:38:14 | FromDiscord | <4zv4l> oooh |
14:38:47 | FromDiscord | <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:57 | FromDiscord | <Gumbercules> Someone else could write one though! |
14:39:32 | FromDiscord | <4zv4l> got the same number of syscalls now https://media.discordapp.net/attachments/371759389889003532/1060205847436861550/image.png |
14:40:15 | FromDiscord | <4zv4l> I am still wondering how zig achieve to get only the syscalls you ask for |
14:40:18 | FromDiscord | <4zv4l> https://media.discordapp.net/attachments/371759389889003532/1060206040332910662/image.png |
14:40:20 | FromDiscord | <4zv4l> and the binary |
14:40:21 | FromDiscord | <4zv4l> is really small |
14:42:09 | PMunch | The Nim one? Or the Zig one? |
14:42:19 | PMunch | I guess some GCC defaults might've changed as well.. |
14:42:41 | FromDiscord | <ambient> Ideally you could write the program in Nim and use some library/script that makes very small binaries |
14:43:36 | FromDiscord | <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:54 | FromDiscord | <ambient> A fun read http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html |
14:43:57 | FromDiscord | <4zv4l> In reply to @PMunch "The Nim one? Or": zig one is small and only does the syscall you ask for |
14:44:39 | PMunch | How big is your Nim one? I can't get mine to be under 14K.. |
14:46:03 | FromDiscord | <ambient> Also if somebody wants to write a compressing linker... https://github.com/runestubbe/Crinkler ๐ |
14:46:38 | FromDiscord | <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:53 | PMunch | Well there's your problem :P |
14:47:15 | FromDiscord | <djazz> ๐ |
14:47:38 | FromDiscord | <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:37 | FromDiscord | <fbpyr> sounds a bit like https://github.com/nim-lang/Nim/issues/14901 ๐ค |
14:51:41 | FromDiscord | <ringabout> In reply to @fbpyr "am I doing something": What's the error? |
14:52:47 | FromDiscord | <fbpyr> on linux it is `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` |
14:53:41 | FromDiscord | <fbpyr> on win10 I crashes with `Error` ๐ถ |
14:54:13 | FromDiscord | <enthus1ast> fbpyr\: you do not need threads for this btw, you can use spawn a process |
14:54:19 | FromDiscord | <fbpyr> or rather\: `Error: execution of an external program failed:` |
14:54:25 | FromDiscord | <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:32 | FromDiscord | <fbpyr> enthus1ast\: but that blocks the loop no? |
14:54:37 | FromDiscord | <enthus1ast> no |
14:54:43 | FromDiscord | <fbpyr> ah? |
14:55:11 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/osproc.html#startProcess%2Cstring%2Cstring%2CopenArray%5Bstring%5D%2CStringTableRef%2Cset%5BProcessOption%5D |
14:55:27 | FromDiscord | <fbpyr> the only reason I used threadpool and spawn was to still have the repl loop still available.. ๐ค |
14:55:39 | FromDiscord | <fbpyr> enthus1ast\: thx for the link! ๐ |
14:55:51 | FromDiscord | <enthus1ast> yeah, just use startProcess for this |
14:56:37 | FromDiscord | <fbpyr> ah, I see. - will try right away. ๐ |
14:59:13 | * | derpydoo quit (Remote host closed the connection) |
14:59:29 | FromDiscord | <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:47 | FromDiscord | <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:18 | FromDiscord | <Gumbercules> A lot of people came and left around that time though.... |
16:09:12 | FromDiscord | <Gumbercules> Also long time contributors like fowl as well disappeares |
16:09:17 | FromDiscord | <Gumbercules> (edit) "disappeares" => "disappeared" |
16:11:25 | * | DarrylTheFish joined #nim |
16:12:56 | FromDiscord | <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:57 | FromDiscord | <4zv4l> In reply to @PMunch "How big is your": same here |
16:23:31 | FromDiscord | <4zv4l> lot of padding with 0 bytes |
16:26:15 | FromDiscord | <Piqueiras> https://media.discordapp.net/attachments/371759389889003532/1060232701879259166/image.png https://media.discordapp.net/attachments/371759389889003532/1060232702223188099/image.png |
16:26:18 | FromDiscord | <Piqueiras> lol |
16:31:23 | FromDiscord | <Gumbercules> In reply to @Corazone "Hi all, i was": It was probably a custom pragma defined via a macro in that library |
16:31:52 | FromDiscord | <Gumbercules> Just search GitHub or nimble.directory or whatever it's called for rpc packages |
16:32:02 | FromDiscord | <Gumbercules> In reply to @Piqueiras "": #offtopic |
16:32:43 | FromDiscord | <rakgew> @Corazone could you post the video link? |
16:36:05 | FromDiscord | <Gumbercules> https://github.com/al6x/nim/blob/main/nodem/nodem/nexportm.nim |
16:36:30 | FromDiscord | <Gumbercules> @Corazone ยฅ |
16:36:43 | FromDiscord | <Gumbercules> (edit) "ยฅ" => "^" |
16:37:10 | FromDiscord | <Gumbercules> https://forum.nim-lang.org/t/7873 |
16:37:40 | FromDiscord | <Gumbercules> In reply to @rakgew "<@243409969351884802> could you post": Video is linked in ^ thread |
16:40:34 | FromDiscord | <rakgew> thank you! |
16:40:48 | FromDiscord | <Gumbercules> In reply to @rakgew "thank you!": yw |
16:41:28 | FromDiscord | <Gumbercules> Yo Nim finally has qt bindings |
16:41:43 | FromDiscord | <Gumbercules> Didn't think this would ever materialize |
16:42:33 | FromDiscord | <Gumbercules> The author deserves all the ๐ป |
16:44:25 | FromDiscord | <Gumbercules> Should be able donations on that repo |
16:44:33 | FromDiscord | <Gumbercules> Enable even |
16:48:46 | FromDiscord | <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:56 | FromDiscord | <Gumbercules> In reply to @everyon "Do you guys know": Python's `multiprocessing` does not use threads, but processes, no? |
16:55:16 | FromDiscord | <everyon> In reply to @Gumbercules "Python's `multiprocessing` does not": `multiprocessing.dummy` I meant |
16:55:37 | FromDiscord | <Gumbercules> gotcha |
16:55:50 | FromDiscord | <Gumbercules> TIL |
16:58:23 | FromDiscord | <Corazone> In reply to @Gumbercules "Video is linked in": Thank you man, appreciate it really |
17:01:07 | FromDiscord | <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:54 | FromDiscord | <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:09 | FromDiscord | <spooky> but when im uncompressing a file with a password |
17:06:16 | FromDiscord | <spooky> insted of getting a error i get an empty file |
17:06:20 | FromDiscord | <spooky> can anyone help ? thank |
17:06:33 | FromDiscord | <spooky> sent a code paste, see https://play.nim-lang.org/#ix=4kli |
17:06:39 | FromDiscord | <spooky> (edit) |
17:06:48 | FromDiscord | <spooky> (edit) "https://play.nim-lang.org/#ix=4kli" => "https://play.nim-lang.org/#ix=4klj" |
17:10:32 | FromDiscord | <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:58 | FromDiscord | <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:05 | FromDiscord | <spooky> like virusq totral |
17:13:39 | FromDiscord | <pmp-p> sadly passworded files does not seem to be supported |
17:18:26 | FromDiscord | <pmp-p> maybe this one https://github.com/brentp/nim-minizip |
17:52:16 | FromDiscord | <jtv> I always hated how the CARO test string is considered a "virus". |
17:57:27 | FromDiscord | <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:11 | FromDiscord | <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:08 | FromDiscord | <Gumbercules> https://github.com/search?q=rpc+language%3ANim&type=Repositories @Corazone - any of these should get you well on your way |
18:03:48 | FromDiscord | <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:40 | FromDiscord | <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:41 | FromDiscord | <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:25 | FromDiscord | <jos> is there a way to create a c-compatible function that is also a closure |
18:53:38 | FromDiscord | <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:29 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4klM |
19:17:31 | FromDiscord | <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:23 | FromDiscord | <hmmm> ah ok found it lol, GPT was right the error was fatfingering elsewhere, all hail GPT |
19:54:02 | FromDiscord | <deech> sent a code paste, see https://play.nim-lang.org/#ix=4klZ |
19:57:23 | FromDiscord | <pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4km1 |
19:58:19 | FromDiscord | <deech> I'm aware of that. But I'd like it work with variants as well. |
19:58:26 | FromDiscord | <Corazone> In reply to @Gumbercules "well the first few": Thank you man |
20:00:48 | FromDiscord | <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:21 | FromDiscord | <deech> Thanks! |
20:04:33 | * | jmdaemon joined #nim |
20:30:34 | * | ephaptic quit (Quit: WeeChat 3.7.1) |
20:40:52 | FromDiscord | <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:51 | FromDiscord | <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:12 | FromDiscord | <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:08 | FromDiscord | <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:46 | FromDiscord | <Require Support> sorry by tracking i mean just print out how many threads are running and their IDs maybe |
20:49:13 | FromDiscord | <mratsim> sent a long message, see http://ix.io/4kmb |
20:50:56 | FromDiscord | <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:40 | FromDiscord | <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:19 | FromDiscord | <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:06 | FromDiscord | <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:12 | FromDiscord | <nixfreak> sent a long message, see http://ix.io/4kmk |
21:36:28 | FromDiscord | <Gumbercules> Np prob |
21:36:40 | FromDiscord | <Gumbercules> (edit) "Np" => "No" |
21:39:50 | FromDiscord | <Elegantbeef> @Bung\: 1.0.17 is out now, thanks |
21:40:48 | FromDiscord | <Jakraes> Quick question, does Nim offer the possibility to create abstract methods? |
21:42:11 | FromDiscord | <Elegantbeef> Depends on the requirement |
21:42:32 | FromDiscord | <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:49 | FromDiscord | <Jakraes> Yeah an interface is what I'm looking for pretty much |
21:42:54 | FromDiscord | <Elegantbeef> But there is no real "This type needs to implement this and this will be checked at compile time" for methods |
21:43:06 | FromDiscord | <Elegantbeef> Notice i said generic interface |
21:43:16 | FromDiscord | <Elegantbeef> Mixins i guess is more accurate |
21:43:20 | FromDiscord | <Elegantbeef> Iface does exist |
21:44:23 | FromDiscord | <Jakraes> I'll check it out and see if the work is worth it |
21:44:32 | FromDiscord | <Jakraes> Perhaps I'm overcomplicating some things |
21:55:02 | FromDiscord | <Bung> @ElegantBeef what should be done when cast from pointer to proc in vm ? |
21:55:31 | FromDiscord | <Bung> am asking because of this https://github.com/nim-lang/Nim/pull/21224 |
22:11:54 | FromDiscord | <Elegantbeef> I'd imagine an error |
22:13:18 | * | Guest5591 joined #nim |
22:14:51 | FromDiscord | <Bung> so that's as it is. |
22:16:13 | FromDiscord | <Elegantbeef> Though perhaps it should be allowed |
22:22:35 | FromDiscord | <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:34 | FromDiscord | <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:10 | FromDiscord | <Bung> no idea, since I havn't learned much vm things |
22:38:46 | FromDiscord | <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:35 | FromDiscord | <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) |