<< 12-07-2022 >>

00:00:14*dtomato joined #nim
00:00:14*dtomato quit (Read error: Connection reset by peer)
00:00:30*dtomato joined #nim
00:00:30*dtomato quit (Remote host closed the connection)
00:00:46*dtomato joined #nim
00:00:46*dtomato quit (Read error: Connection reset by peer)
00:00:56FromDiscord<zhmtzhmt> It seems like this.
00:01:01*dtomato joined #nim
00:01:01*dtomato quit (Remote host closed the connection)
00:01:18*dtomato joined #nim
00:01:18*dtomato quit (Remote host closed the connection)
00:01:50*dtomato joined #nim
00:01:50*dtomato quit (Remote host closed the connection)
00:02:37*dtomato joined #nim
00:02:37*dtomato quit (Read error: Connection reset by peer)
00:02:45FromDiscord<zhmtzhmt> It is not that simple to write effient code.
00:02:53*dtomato joined #nim
00:02:53*dtomato quit (Remote host closed the connection)
00:03:09*dtomato joined #nim
00:03:09*dtomato quit (Remote host closed the connection)
00:03:26*dtomato joined #nim
00:03:26*dtomato quit (Remote host closed the connection)
00:03:42*dtomato joined #nim
00:03:42*dtomato quit (Read error: Connection reset by peer)
00:03:58*dtomato joined #nim
00:03:58*dtomato quit (Read error: Connection reset by peer)
00:04:14*dtomato joined #nim
00:04:14*dtomato quit (Remote host closed the connection)
00:04:47*dtomato joined #nim
00:04:47*dtomato quit (Read error: Connection reset by peer)
00:05:03*dtomato joined #nim
00:05:03*dtomato quit (Read error: Connection reset by peer)
00:05:20*dtomato joined #nim
00:05:20*dtomato quit (Read error: Connection reset by peer)
00:05:36*dtomato joined #nim
00:05:36*dtomato quit (Remote host closed the connection)
00:05:52*dtomato joined #nim
00:05:52*dtomato quit (Read error: Connection reset by peer)
00:06:24*dtomato joined #nim
00:06:24*dtomato quit (Remote host closed the connection)
00:06:57*dtomato joined #nim
00:06:57*dtomato quit (Remote host closed the connection)
00:07:13*dtomato joined #nim
00:07:13*dtomato quit (Remote host closed the connection)
00:07:29*dtomato joined #nim
00:07:29*dtomato quit (Remote host closed the connection)
00:07:45*dtomato joined #nim
00:07:45*dtomato quit (Remote host closed the connection)
00:08:01*dtomato joined #nim
00:08:01*dtomato quit (Read error: Connection reset by peer)
00:09:04*dtomato joined #nim
00:09:04*dtomato quit (Read error: Connection reset by peer)
00:09:19FromDiscord<treeform> In reply to @vestel "Are there any GUI": If you are on windows, visual studio works with nim.
00:09:20*dtomato joined #nim
00:09:20*dtomato quit (Read error: Connection reset by peer)
00:09:37*dtomato joined #nim
00:09:37*dtomato quit (Remote host closed the connection)
00:09:53*dtomato joined #nim
00:09:53*dtomato quit (Remote host closed the connection)
00:10:10*dtomato joined #nim
00:10:10*dtomato quit (Read error: Connection reset by peer)
00:10:26*dtomato joined #nim
00:10:26*dtomato quit (Read error: Connection reset by peer)
00:10:41*dtomato joined #nim
00:10:41*dtomato quit (Read error: Connection reset by peer)
00:11:29*dtomato joined #nim
00:11:29*dtomato quit (Remote host closed the connection)
00:11:46*dtomato joined #nim
00:11:46*dtomato quit (Remote host closed the connection)
00:12:02*dtomato joined #nim
00:12:02*dtomato quit (Read error: Connection reset by peer)
00:15:46FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=446R
00:18:35ad-absurdumHmmm. Problem solved; I just needed to put a symlink in my /usr/lib/ directory. It would be nice if Nim's sdl2 package would search both /usr/lib/ and /usr/local/lib/, since it is common for libraries to be installed in both locations.
00:36:49*krux02 quit (Remote host closed the connection)
01:15:27FromDiscord<voidwalker> Beef, you still around ? How would I define the myProcTable we discussed above, at the moment i define it as a var ?
01:15:32FromDiscord<voidwalker> If even possible
01:16:46FromDiscord<voidwalker> `var updProcs: OrderedTable[string, proc(tsv,key:string)] = { "title.basics.tsv.gz" : proc (tsv,key:string) = echo "test title basics proc" }`
01:16:55FromDiscord<voidwalker> (edit) "`var updProcs: OrderedTable[string, proc(tsv,key:string)] = { "title.basics.tsv.gz" : proc (tsv,key:string) = echo "test title basics proc" }`" => "sent a code paste, see https://play.nim-lang.org/#ix="
01:17:04FromDiscord<voidwalker> (edit) "https://play.nim-lang.org/#ix=" => "https://play.nim-lang.org/#ix=4470"
01:17:04FromDiscord<voidwalker> this is no good
01:19:42FromDiscord<Prestige> You need `proc (tsv, key: string) {.closure.} = echo "test title basics proc"`
01:20:06FromDiscord<Prestige> and after the `}` you should put `.toOrderedTable()`
01:20:15FromDiscord<voidwalker> ok, no idea what a `{.closure.} ` is
01:21:31FromDiscord<voidwalker> yep, that worked
01:21:42FromDiscord<Prestige> https://nim-lang.org/docs/manual.html#types-procedural-type for more info
01:23:48*arkurious quit (Quit: Leaving)
01:32:19bigbytwhy is ElegantBeef such a chad?
01:44:45FromDiscord<retkid> so this program has a memory hole
01:44:48FromDiscord<retkid> and i dontt wanna fix it
01:44:55FromDiscord<retkid> i have 2 ideas
01:45:45FromDiscord<retkid> 1. make a bash script which just reruns the program when it exists from filling all my memory↵2. load the base data into another program, type cast it, then operate upon it, so when the operations overload the memory I can just restart that program and keep on reading it
01:45:50FromDiscord<retkid> is 2. possible?
01:46:00FromDiscord<retkid> i was thinking from STDIN or something
01:47:00FromDiscord<acca> anyone online?
01:47:09FromDiscord<retkid> hello :D
01:47:32FromDiscord<acca> hi
01:47:46FromDiscord<acca> i want to change linux distro and it needs dual boot?
01:49:17FromDiscord<acca> hi↵(@retkid)
01:55:29*ad-absurdum quit (Quit: Leaving)
01:56:42FromDiscord<Prestige> acca: What's your question?
01:57:12FromDiscord<Prestige> @retkid I'd say fix the memory leak, but if you can't, restarting the program would probably be easier
01:59:41*CyberTailor quit (Remote host closed the connection)
02:00:55*CyberTailor joined #nim
02:03:57FromDiscord<huantian> In reply to @acca "i want to change": You would probably want to ask general Linux questions in #offtopic
02:07:33FromDiscord<tylerlinuxdev> [acca](https://matrix.to/#/@aka/:matrix.org)\: Would have to be more specific. It doesn't strictly need dual boot, you could have it single boot if that is desired. People often use dual boot to retain the ability to boot into Windows operating system.
02:08:09*CyberTailor quit (Remote host closed the connection)
02:08:57*CyberTailor joined #nim
02:35:52*derpydoo quit (Quit: derpydoo)
03:03:03FromDiscord<retkid> In reply to @Avahe "<@217459674700578816> I'd say fix": its just some strange behaviour in arraymancer
03:03:15FromDiscord<retkid> I've tried manual memory stuff but its unstable
03:03:23FromDiscord<retkid> so i just wrote a bash scrit
03:03:27FromDiscord<retkid> (edit) "scrit" => "scripr"
03:03:45FromDiscord<retkid> script
03:16:56*wallabra_ joined #nim
03:18:41*wallabra quit (Ping timeout: 272 seconds)
03:18:42*wallabra_ is now known as wallabra
03:59:56*Guest6277 quit (Quit: Client limit exceeded: 20000)
04:17:59*Lord_Nightmare quit (Ping timeout: 244 seconds)
04:21:21FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=447o
04:21:23*Guest3483 joined #nim
04:30:19FromDiscord<Rika> `proc PutMap[K,V](this: var StackWriteTransaction, data : Table[K,V] or OrderedTable[K,V]) =`
04:31:25FromDiscord<zhmtzhmt> awsome!!
04:32:18FromDiscord<Rika> im not sure why you want K or V
04:32:34FromDiscord<Rika> i think `proc PutMap[K,V](this: var StackWriteTransaction, data : Table or OrderedTable) =` is also equivalent
04:32:45FromDiscord<Rika> without the [K, V] sorry]
04:32:48FromDiscord<Rika> (edit) "sorry]" => "sorry"
04:35:10FromDiscord<zhmtzhmt> I don't need them actually.
04:36:21FromDiscord<zhmtzhmt> I removed them
04:36:44FromDiscord<zhmtzhmt> 😄
04:55:12*Lord_Nightmare joined #nim
06:10:02FromDiscord<fbpyr> on win10 nim1.6.6 in winim, I am trying to read dll metadata with GetFileVersionInfoW\: ↵https://github.com/khchen/winim/blob/bda7de3b63f4644183a2b70cb9163b61e2320f12/winim/inc/winver.nim#L113↵there I need the size information which I already got from GetFileVersionInfoSizeA, ↵but how would I construct lpData of type LPVOID ?
06:12:58FromDiscord<Elegantbeef> https://docs.microsoft.com/en-us/windows/win32/api/winver/nf-winver-getfileversioninfow
06:13:10FromDiscord<Elegantbeef> It's a "pointer to a buffer that recives the file version information"
06:13:22FromDiscord<Elegantbeef> So you can use a stack variable of the type it writes to
06:21:22FromDiscord<fbpyr> thank you, [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org) ! but how would I create that buffer and would know the type of it? I tried `var lpv = winim.LPVOID()` or passing in a an empty string, but that is apparently not how it works.
06:21:47FromDiscord<Elegantbeef> I'm uncertain what "version information" actually is
06:21:52*nyeaa4 joined #nim
06:22:11FromDiscord<fbpyr> in the end it is just text
06:22:28FromDiscord<fbpyr> at least the info I got from winapi32 in python
06:22:47FromDiscord<fbpyr> but I would like to find out how to do it in nim
06:23:05*wallabra_ joined #nim
06:23:07FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=447C
06:23:40FromDiscord<fbpyr> ahh - the address pointing to it. thank you so much. will try that. 🙂
06:24:04*nyeaa quit (Quit: Ping timeout (120 seconds))
06:24:04*cornfeedhobo quit (Remote host closed the connection)
06:24:05*wallabra quit (Remote host closed the connection)
06:24:42*wallabra_ is now known as wallabra
06:25:48FromDiscord<fbpyr> this worked - amazing!! 😀
06:26:30*NimEventer quit (Ping timeout: 264 seconds)
06:27:02*NimEventer joined #nim
06:27:05FromDiscord<Elegantbeef> Welcome to the basics of C-apis 😛
06:27:12FromDiscord<Elegantbeef> Odd that it doesnt return how much it read to
06:29:50FromDiscord<fbpyr> on the linux side I already had a bit of interfacing with C, ↵but this is first contact with winapi..
06:30:19FromDiscord<Elegantbeef> Yea i mean i agree this is a dumb api
06:30:37FromDiscord<Elegantbeef> the second parameter is ignored, it doesnt return length and expects you to calculate it
06:34:07*cornfeedhobo joined #nim
06:48:42FromDiscord<fbpyr> exactly! I much prefer the few linux c-apis I came across.
07:00:13*bigbyt quit (Remote host closed the connection)
07:21:50FromDiscord<fbpyr> uh oh, VerQueryValue is even worse.. 🙁
07:31:42Amun-Rait's something like proc (pblock: pointer, subblock: cstring, lpbuffer: pointer, ulen: ptr cuint): WinBool
07:32:11Amun-Rawinapi is pretty prepulsive
07:32:27FromDiscord<fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=447U
07:33:12Amun-Rathat's VerQueryValueW
07:34:37FromDiscord<fbpyr> yes. you mean I made a mistake earlier in GetFileVersionInfo ? ↵the content of lpv2 seemed ok to me.
07:35:07FromDiscord<fbpyr> but I fail at accessing what is (potentially) in lpv4..
07:36:20FromDiscord<fbpyr> I see.
07:36:31Amun-Raif you want to play with *W functions you have to use wide chars; see std/widestrs
07:37:28FromDiscord<fbpyr> I first tried newWideCString and failed with that, but apparently there are converters in winim/winstr 🤔
07:38:24Amun-Rayes, I have my own winapi wip module but it's pretty far from being complete
07:38:52Amun-Rait accepts and returns only native nim types
07:39:13*wallabra quit (Ping timeout: 260 seconds)
07:39:41*rockcavera quit (Remote host closed the connection)
07:39:53FromDiscord<fbpyr> nice! 🙂
07:41:41FromDiscord<fbpyr> sent a code paste, see https://play.nim-lang.org/#ix=447V
07:42:18Amun-Rayou only need a simple char array for A
07:43:28FromDiscord<fbpyr> for the subblock right? but what about lpbuffer?
07:43:44FromDiscord<fbpyr> maybe I constructed it incorrectly?
07:44:31Amun-Rayou have to declare var variable of type VS_FIXEDFILEINFO
07:44:40Amun-Rathen pass it as ptr to lpbuffer
07:45:18FromDiscord<fbpyr> ah ok, thank you! let me try..
07:45:20Amun-Ravar info: VS_FIXEDFILEINFO; VerQueryValueA(…, …, addr info, …)
07:46:21FromDiscord<fbpyr> that errors at me
07:46:38FromDiscord<fbpyr> `expression 'addr info' is of type: ptr VS_FIXEDFILEINFO`
07:47:03FromDiscord<fbpyr> and it seems to expect `lplpBuffer: ptr LPVOID`
07:47:06Amun-Rachange that type in VerQueryValueA to ptr VS_FIXEDFILEINFO
07:47:21Amun-Raor cast it to LPVOID; I'd choose the first method
07:47:54FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=447Z
07:48:48FromDiscord<zhmtzhmt> error C2440: “=”: can not convert from “void (cdecl )(void)” to “NIM_CHAR
07:48:52Amun-Racasting function pointer to pointer to char is forbidden in C
07:49:01FromDiscord<zhmtzhmt> ....
07:49:20FromDiscord<zhmtzhmt> how abount convert to void pointer?
07:49:29Amun-Rafunction pointers and pointer to objects should be treated as separate
07:50:26FromDiscord<zhmtzhmt> I need to pass list of function pointers to somewhere else.
07:51:38FromDiscord<Rika> In reply to @zhmtzhmt "how abount convert to": Nim void pointer is type “pointer”
07:52:08Amun-Razhmtzhmt: ptr ichar → pointer
07:52:45FromDiscord<zhmtzhmt> Thanks
07:53:21FromDiscord<zhmtzhmt> It works now. 😄
07:54:04Amun-Rathat's the fastest but not the best way of doing it ;>
07:54:24FromDiscord<zhmtzhmt> what is the best way?
07:55:39FromDiscord<zhmtzhmt> I am passing function pointers to c#
07:57:25FromDiscord<zhmtzhmt> I am writing a tool to wrap nim functions into c# automatically.
08:08:36FromDiscord<Prestige> I have a const table with strings as the keys, and want to create a function with a param that must take one of those keys. ↵Is there a way to assert this at compile time?
08:09:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4487
08:09:42FromDiscord<Prestige> Beautiful, thanks
08:37:37FromDiscord<ripluke> Is any nim code valid nimscript?
08:39:10*koltrast quit (Quit: ZNC - http://znc.in)
08:39:12FromDiscord<Rika> Valid as in compiles? No
08:39:22FromDiscord<Rika> It’s a subset of Nim so not all of it is allowed
08:40:58FromDiscord<Elegantbeef> most
08:41:03FromDiscord<Elegantbeef> Nimscript is a subscript of Nim
08:45:26FromDiscord<ripluke> So can I do stuff like functions or set variables
08:46:32FromDiscord<Rika> Yes
08:46:36FromDiscord<Rika> Most of it is fine
08:46:40FromDiscord<fineokay> Hello nim world
08:47:00FromDiscord<Rika> There’s a small amount that isn’t and it’s usually because of pointers or C interop
08:47:05FromDiscord<Elegantbeef> Hello
08:47:38FromDiscord<vestel> In reply to @Rika "There’s a small amount": Still quite hard to use for anything than configs
08:47:50FromDiscord<Rika> Why so?
08:48:00FromDiscord<ripluke> In reply to @vestel "Still quite hard to": I’m using it for a config lol so I should be good
08:48:25FromDiscord<vestel> In reply to @Rika "Why so?": Cause i used nimscipt as scripting provider in my project
08:48:46FromDiscord<ripluke> Would use nim but it’s a wm config and it’s a bit annoying recompiling the whole wm
08:48:50FromDiscord<vestel> Ofc with nimscripter, but still a lot of issues are unsolved
08:48:57FromDiscord<vestel> Easier to use nimpy
08:49:05FromDiscord<ripluke> In reply to @ripluke "Would use nim but": I mean xmonad does it
08:50:37FromDiscord<Elegantbeef> Just use wasm 😛
08:51:11FromDiscord<Rika> WASM deez nuts
08:51:16FromDiscord<ripluke> In reply to @Elegantbeef "Just use wasm 😛": As a config file?
08:51:39FromDiscord<ripluke> Well I think you mean as a website that you can use to configure the wm
08:51:48FromDiscord<Elegantbeef> No
08:51:58FromDiscord<ripluke> Oh lol then what
08:52:05FromDiscord<Elegantbeef> I mean for customisation if you want it scriptable
08:52:30FromDiscord<ripluke> Doesn’t wasm have to be compiled
08:52:35FromDiscord<Elegantbeef> WASM is embed-able just like a VM
08:52:46FromDiscord<Elegantbeef> Yes it has to be compiled
08:52:55FromDiscord<Elegantbeef> But you only compile your external module instead of the entire VM
08:52:59FromDiscord<Elegantbeef> It's a plugin system
08:53:06FromDiscord<ripluke> In reply to @Elegantbeef "But you only compile": That’s good
08:53:31FromDiscord<ripluke> Nim can compile to wasm?
08:53:32FromDiscord<vestel> Are incremental compilation is a no-no for production?
08:53:34FromDiscord<Elegantbeef> I very much like the offering of WASM for scripting native programs safely
08:53:44FromDiscord<Elegantbeef> Yea Nim can compile to wasm using NLVM or emscripten
08:53:57FromDiscord<Elegantbeef> IC is still not suggested to be usued
08:54:11FromDiscord<ripluke> Oh I’ll check out wasm
08:54:33FromDiscord<Elegantbeef> You will need to wrap a runtime since we dont have a pure Nim runtime
08:54:33FromDiscord<ripluke> Seems cool that you can use any lang that supports wasm
08:54:39FromDiscord<Elegantbeef> Or use my bindings to wasmedge
08:55:16FromDiscord<Elegantbeef> A pure Nim wasm runtime would be nifty though
08:55:22FromDiscord<vestel> In reply to @ripluke "Seems cool that you": Basically you can use any native language for customization
08:55:24FromDiscord<ripluke> In reply to @Elegantbeef "Or use my bindings": I’ll probably use those as it’s less work 😂
08:55:33FromDiscord<vestel> In reply to @vestel "Basically you can use": Just use DLL/so
08:55:47FromDiscord<Elegantbeef> The issue with system libraries is it isnt sandboxed
08:55:59FromDiscord<Elegantbeef> So the sharing of the modules is more tedious
08:56:07FromDiscord<Rika> And it’s still technically not cross platform xd
08:56:14FromDiscord<Elegantbeef> People share their scripts and configs
08:56:50FromDiscord<ripluke> In reply to @Rika "And it’s still technically": Well I don’t really need cross platform XD
08:57:01FromDiscord<Elegantbeef> Especially with compiled plugins you need/want to enable easily sharing things
08:57:09FromDiscord<vestel> I see
08:57:30FromDiscord<Elegantbeef> Like when i get to making my wayland compositor my layout engine is going to be fully plugged in using wasm
08:57:37FromDiscord<Elegantbeef> So layouts are 100% user defined code
08:57:46Amun-Razhmtzhmt: I wrote nim-c# bridge myself (c# part was based on Mono api)
08:57:58FromDiscord<Elegantbeef> If you want a new layout you just write a new wasm module then set that as your new layout in your config
08:58:00FromDiscord<vestel> But do nim VM sanboxed? Or sanboxing "offered" by not supporting ffi?
08:58:12FromDiscord<Rika> WASM is kinda disingenuous as a name no?
08:58:18FromDiscord<Elegantbeef> Nim's VM has sand boxing options
08:58:23FromDiscord<ripluke> In reply to @Rika "WASM is kinda disingenuous": Yea
08:58:36FromDiscord<Elegantbeef> I mean it runs webassembly code
08:58:57FromDiscord<Elegantbeef> It does make it seem more limited than it is
08:59:10FromDiscord<Elegantbeef> Personally i think wasm is the best way to script anything due to that agnosticism
08:59:48FromDiscord<vestel> In reply to @Elegantbeef "Personally i think wasm": Still best option for nim
09:00:13FromDiscord<Elegantbeef> I mean it's the best option for any scripted program
09:00:20FromDiscord<Elegantbeef> Regardless the language it's implemented in
09:00:20FromDiscord<vestel> Python doesn't have sanboxing and as for nimscript you have to embed the whole STD (lol)
09:00:29FromDiscord<Elegantbeef> You dont have to embed the whole std
09:00:33FromDiscord<Elegantbeef> So try again
09:00:56FromDiscord<Rika> I don’t know what the issue of embedding the whole standard library is anyway
09:00:59FromDiscord<Elegantbeef> You have to ship the amount of the stdlib you want to use on the user's PC aside from the system module
09:01:03FromDiscord<Rika> As if other languages don’t do that
09:01:04FromDiscord<vestel> Yes, for base functioning just the system module
09:01:05FromDiscord<Elegantbeef> 4MB is too big i guess
09:01:22FromDiscord<Elegantbeef> I mean i know exactly what's needed to be embedded
09:01:30FromDiscord<Rika> Wow in the world where people don’t mind shipping electron apps huh
09:01:30FromDiscord<Elegantbeef> You only need what you need
09:01:39FromDiscord<Elegantbeef> Yea idk rika
09:01:54FromDiscord<Rika> Highly compressible 4 megabytes as well no?
09:01:58FromDiscord<Elegantbeef> It's only an issue if you're attempting to run Nimscript on embedded shit and at that point who the fuck hurt you
09:02:01FromDiscord<Elegantbeef> Indeed
09:02:13FromDiscord<Rika> In reply to @Elegantbeef "It's only an issue": Hey WAIT DONT ATTACK ME
09:02:28FromDiscord<Elegantbeef> Lol
09:02:37FromDiscord<tylerlinuxdev> Yeah, 4 MB storage is the least of anyone's concern, I'd be more concern about wasting time trying to minify binary that make no noticable impact.
09:02:50FromDiscord<Rika> Totally didn’t have plans to run some VM on my embedded devices for plug-ability
09:03:04FromDiscord<Elegantbeef> Not NimVm though eh?
09:03:18FromDiscord<Elegantbeef> If it's not obvious my suggestion would be wasm
09:03:24FromDiscord<Rika> In reply to @Elegantbeef "Not NimVm though eh?": Yeah I was thinking Lua really
09:03:28FromDiscord<vestel> In reply to @tylerlinuxdev "Yeah, 4 MB storage": upx -9 goes brrrr
09:03:41FromDiscord<Rika> No, I don’t think I’d put WASM on an embedded device
09:03:51FromDiscord<Elegantbeef> Would be a lot cooler if you did 😛
09:03:57FromDiscord<ripluke> If I have a nim program how can I get it to support pipes
09:04:01FromDiscord<Rika> I’ll consider it
09:04:17FromDiscord<Elegantbeef> You mean shell pipes?
09:04:21FromDiscord<ripluke> Yes
09:04:28FromDiscord<Elegantbeef> Doesnt it just support it by default since it's the shell doing it not the program
09:04:38FromDiscord<ripluke> Maybe
09:04:48FromDiscord<Elegantbeef> Would your lua VM take lua bytecode or lua source code and run it?
09:05:02FromDiscord<Elegantbeef> Cause a minor benefit is that wasm is relatively compressed if the latter
09:05:21FromDiscord<Rika> Source, the thing I’m doing is highly idiotic
09:05:30FromDiscord<Elegantbeef> Lua scripted keyboard
09:05:42FromDiscord<Rika> 🙂
09:05:53FromDiscord<Elegantbeef> You see i listen
09:06:42FromDiscord<Rika> I’m still figuring out pico without CMake though
09:06:55FromDiscord<Rika> I really really don’t want to use CMake lmao
09:07:12FromDiscord<Elegantbeef> Me either but I did not want to figure out how to not use cmake
09:07:44FromDiscord<Rika> I don’t either but I’m also brain dead so I’m still trying either way
09:07:56FromDiscord<Rika> Perhaps indeed I am a masochist
09:08:04FromDiscord<ripluke> Hmm so would something like this work with a pipe https://play.nim-lang.org/#ix=448s
09:08:07FromDiscord<Elegantbeef> They have a shit load of cmake files so yea it's something
09:08:25CyberTailorwhat's wrong with cmake?
09:08:28FromDiscord<Rika> In reply to @Elegantbeef "They have a shit": I’ve seen
09:08:28FromDiscord<Elegantbeef> Doesnt pipe send info to the stdin
09:08:56FromDiscord<Elegantbeef> We're talking about the rpi pico and writing code using Nim just to output C to use their Cmake
09:08:57FromDiscord<Rika> In reply to @CyberTailor "what's wrong with cmake?": I just don’t understand it lol I don’t want to use tools I can’t hope to understand
09:08:57FromDiscord<ripluke> In reply to @Elegantbeef "Doesnt pipe send info": It does? I should probably read a bit more about shells 💀
09:09:00FromDiscord<Elegantbeef> So it's a whole ordeal
09:09:14FromDiscord<Elegantbeef> It makes sense that i'd be the stdin
09:09:19FromDiscord<Elegantbeef> Not parameters
09:09:37FromDiscord<Rika> You’d?
09:09:40FromDiscord<Rika> Hahaha
09:09:42FromDiscord<Elegantbeef> it'd\
09:10:05*koltrast joined #nim
09:13:31FromDiscord<ripluke> Yup you seem to be correct
09:13:46FromDiscord<ripluke> It is stdin
09:17:07*xet7 quit (Remote host closed the connection)
09:21:37FromDiscord<voidwalker> Guess who payed 68 EURs for Mastering Nim :\
09:21:49FromDiscord<Elegantbeef> Not me
09:22:08FromDiscord<voidwalker> I couldn't stand it anymore, I just had to have it :[
09:22:21FromDiscord<Elegantbeef> FOMO
09:22:22FromDiscord<tylerlinuxdev> @voidwalker\: Don't feel bad, I paid $4000 for various books like Engineering a Compiler, Vulkan book, and so forth
09:22:46FromDiscord<Elegantbeef> I really should get books but then remember i cannot read
09:22:47FromDiscord<voidwalker> wtf $4k books
09:23:05FromDiscord<tylerlinuxdev> Basically $4,000/yr budget for books for me
09:23:25FromDiscord<voidwalker> Nim in action is kinda too verbose. Says it's aimed at already programmers, but then goes to describe what a compiler interpreter is and so on.. boring
09:24:04FromDiscord<tylerlinuxdev> sent a long message, see http://ix.io/448D
09:24:59FromDiscord<voidwalker> Yeah only I am not making money out of programming. Don't want to, and I am probably very far from that skill point even if I did want
09:25:16FromDiscord<Elegantbeef> Saaaaame
09:25:18FromDiscord<tylerlinuxdev> Lol yeah, I switched career from programming
09:25:22FromDiscord<tylerlinuxdev> I am system engineer
09:25:26FromDiscord<tylerlinuxdev> but I do programming though
09:25:48FromDiscord<ripluke> Y’all read books?
09:25:51FromDiscord<voidwalker> @ElegantBeef NAh you could be a tutor at a minimum. Would be nice if we had some official nim tutors : D
09:25:53FromDiscord<Elegantbeef> Nopw
09:26:11FromDiscord<Prestige> You could definitely get paid for programming, beef
09:26:35FromDiscord<ripluke> In reply to @voidwalker "Yeah only I am": Same ig
09:26:37FromDiscord<Elegantbeef> No i couldnt that'd imply i'd actually write what i was supposed to and not go on a journey writing something i found more interesting
09:26:45FromDiscord<Prestige> Lol
09:26:46FromDiscord<voidwalker> I mean beef is 20% the reason I use/love nim
09:27:02FromDiscord<Elegantbeef> I now see why people say the Nim community sucks
09:27:47FromDiscord<Rika> Lol
09:28:31FromDiscord<tylerlinuxdev> It probably more profitable to write book and publish it yourself I reckon
09:28:47FromDiscord<tylerlinuxdev> You could call it a "Textbook" and charge $140
09:28:59FromDiscord<tylerlinuxdev> Looking at you, Amazon Textbook, Looking at you....
09:29:02FromDiscord<Rika> Lol
09:29:12FromDiscord<Rika> Books are difficult to get right
09:29:24FromDiscord<Elegantbeef> Writing a book for Nim would be fun, but i'd run out of jokes
09:29:35FromDiscord<tylerlinuxdev> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: Silly goose, the trick is to always steal jokes from everyone else
09:29:43FromDiscord<Elegantbeef> Ah the schumer techinque
09:30:16FromDiscord<Prestige> I hope araq's book comes out with a pdf version
09:30:18FromDiscord<Rika> She doesn’t even steal good jokes though
09:30:40FromDiscord<Elegantbeef> Rika have you seen my version of comedy it's as funny as a mass grave
09:30:44FromDiscord<voidwalker> @Prestige I plan on scanning and ocr-ing it..
09:30:49FromDiscord<Prestige> I've read a good chunk of the paper book but it's inconvenient
09:30:50FromDiscord<voidwalker> I was waiting for pdf but meh
09:30:54FromDiscord<Prestige> Good idea
09:31:14FromDiscord<Prestige> Just a bit tedious
09:31:15FromDiscord<Elegantbeef> I dont even know how people publish paper books it just feels so final
09:31:23FromDiscord<ripluke> Why did I just learn that nim had a book XD
09:31:35FromDiscord<Elegantbeef> Cause it just came out in the past month
09:31:50FromDiscord<ripluke> Ah good explanation
09:31:56FromDiscord<Prestige> https://forum.nim-lang.org/t/9259
09:32:09FromDiscord<ripluke> Bro why is someone mowing the grass at 5am
09:32:31FromDiscord<Rika> In reply to @Elegantbeef "Rika have you": Funnier than hers I’d say
09:32:53FromDiscord<Elegantbeef> I do wonder if there is any merit in someone like me to get the book
09:33:02FromDiscord<Elegantbeef> I guess the spec is expanded
09:33:09FromDiscord<Rika> In reply to @Elegantbeef "I do wonder if": You don’t know what you don’t know
09:33:33FromDiscord<ripluke> Element works on mobile too?
09:33:37FromDiscord<ripluke> That’s cool
09:33:37FromDiscord<Prestige> Yep
09:33:41FromDiscord<tylerlinuxdev> Yup
09:33:53FromDiscord<tylerlinuxdev> Could work in browser too
09:33:57FromDiscord<Elegantbeef> It does
09:34:14FromDiscord<enthus1ast> Imagine the time when people released game cardridges
09:34:17FromDiscord<aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=448G
09:34:26FromDiscord<Elegantbeef> Exactly my point
09:34:39FromDiscord<Elegantbeef> You remember et for atari, me either
09:35:09FromDiscord<Elegantbeef> compile flags?
09:35:24FromDiscord<Elegantbeef> I'm blind
09:35:27*CyberTailor quit (Remote host closed the connection)
09:35:36FromDiscord<aruZeta> just `nim c -r foo.nim`
09:35:46FromDiscord<Elegantbeef> does `-f` change anything?
09:35:56FromDiscord<Elegantbeef> Might have some bad json generated
09:36:23*CyberTailor joined #nim
09:36:32FromDiscord<aruZeta> maybe has something to do I used nim1.0.6 and now nim1.6.6
09:36:35FromDiscord<aruZeta> (edit) "nim1.6.6" => "nim1.6.6?"
09:36:41FromDiscord<Elegantbeef> Probably
09:36:50FromDiscord<Elegantbeef> `-f` should cause a force recompilation and replace the cache
09:36:58FromDiscord<Elegantbeef> i stress should
09:37:05FromDiscord<aruZeta> In reply to @Elegantbeef "does `-f` change anything?": fixed it
09:37:07FromDiscord<ripluke> How can I join the nim server on element? Is there like a link or something
09:37:19FromDiscord<aruZeta> thanks man
09:37:23FromDiscord<Elegantbeef> https://matrix.to/#/#nim:envs.net
09:38:21FromDiscord<ripluke> Hello
09:38:27FromDiscord<Elegantbeef> Welcome to the free software world
09:38:46FromDiscord<ripluke> Lol thx
09:39:01FromDiscord<ripluke> I need to set a Profile pic
09:39:48FromDiscord<Elegantbeef> To go back to my joke prestige, i wrote yet another interface implementation for no reason other than someone suggested it for traitor
09:40:33FromDiscord<Elegantbeef> I think it's just iface but slightly different
09:40:50FromDiscord<Prestige> oh?
09:41:10FromDiscord<Elegantbeef> It's nothing special really https://github.com/beef331/nimtrest/blob/master/goface.nim#L184-L204
09:41:24FromDiscord<ripluke> This is probably a dumb question but where are the other channels
09:41:40FromDiscord<Elegantbeef> You click the space and click all the rooms you want to join
09:41:46FromDiscord<Elegantbeef> Elements spaces UX is awful
09:42:07FromDiscord<Elegantbeef> You may need to enable beta spaces i dont recall
09:42:21FromDiscord<ripluke> So I individually join each channel?
09:42:30FromDiscord<Elegantbeef> Yes
09:42:40FromDiscord<Elegantbeef> They're called rooms and spaces
09:42:44FromDiscord<ripluke> How I love foss
09:42:51FromDiscord<ripluke> Yea
09:42:54FromDiscord<Elegantbeef> Spaces are "servers" and rooms are "channels"
09:43:00*soileh quit (Ping timeout: 260 seconds)
09:43:08FromDiscord<Elegantbeef> I actually prefer the selective rooms
09:43:16FromDiscord<Elegantbeef> The issue is that element doesnt have a join all for people that dont
09:43:26FromDiscord<Elegantbeef> and element also doesnt lay them out sanely
09:43:39FromDiscord<Elegantbeef> If you want a client with better rooms/spaces UX checkout cinny
09:43:50FromDiscord<ripluke> It works on mobile?
09:44:03FromDiscord<Elegantbeef> No clue
09:44:08FromDiscord<ripluke> I need something on the App Store LOL because iPhone kinda dum
09:44:15FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/996351273056092211/image.png
09:44:17FromDiscord<Elegantbeef> It's much saner though
09:44:34FromDiscord<ripluke> Woah
09:44:43FromDiscord<ripluke> That looks exactly like discord
09:45:00FromDiscord<Elegantbeef> Yep but it still has rooms so you can only join what you want
09:45:03FromDiscord<Elegantbeef> So it's fucking glorious
09:45:21FromDiscord<ripluke> Lol sounds nice
09:45:28FromDiscord<ripluke> Hope it’s on iphone
09:45:34FromDiscord<Elegantbeef> No clue
09:45:48FromDiscord<Elegantbeef> I couldnt care less about mobile so it's not a priority for any software
09:46:09FromDiscord<ripluke> Lol I need my chat app to be cross platform
09:46:20FromDiscord<Elegantbeef> I very much dont
09:46:49FromDiscord<ripluke> Yup cinny is not on the App Store
09:46:52FromDiscord<Elegantbeef> Oh and prestige it seems j-james has started on wrapping libwayland! 🙂
09:47:03FromDiscord<Prestige> Sick
09:47:08FromDiscord<Prestige> That's going to be a fun project
09:48:50FromDiscord<Elegantbeef> Only fun if we get something I like using in the end
09:49:47FromDiscord<Elegantbeef> Oh did you see the best part about wayland and making compositors?
09:49:56FromDiscord<Elegantbeef> You dont have to use xephyr or anything like it!
09:50:19FromDiscord<Elegantbeef> If you launch a compositor from inside a compositor it just gives you window that you can just open applications in
09:50:23FromDiscord<ripluke> Yea they can run nested
09:50:35FromDiscord<Prestige> huh, that's cool
09:50:46FromDiscord<TryAngle> I wonder, is there a RFC already or is this completely out of the window already to make Iterators a builtin type so variables can be assigned an iterator?
09:50:58FromDiscord<Elegantbeef> first class iterators exist
09:51:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=448S
09:51:55FromDiscord<ripluke> Cinny has a web client!
09:51:58FromDiscord<TryAngle> Ah lol
09:52:04FromDiscord<ripluke> So I can use it on mobile
09:52:12FromDiscord<Elegantbeef> Promises made promises kept↵(@TryAngle)
09:53:03FromDiscord<TryAngle> Thanks 😊
09:56:04FromDiscord<ripluke> Can someone send a link to off topic
09:56:10FromDiscord<ripluke> I can’t find it
09:56:43FromDiscord<ripluke> On matrix not discord
09:56:50FromDiscord<Elegantbeef> #offtopic
09:56:58FromDiscord<voidwalker> Can someone (beef especially) look at this code and suggest how I might make it better ? https://play.nim-lang.org/#ix=448T
09:57:04FromDiscord<Elegantbeef> and with that i'm outta here
09:57:27FromDiscord<voidwalker> dang : d
09:57:48FromDiscord<Rika> Pragmas should have an ending . too
09:57:57FromDiscord<Rika> So {.pragma.}
09:58:15FromDiscord<Rika> This is a lot to look at so it might take a while
09:58:31FromDiscord<TryAngle> Is there somewhere some text on how the custom pragmas work?
09:58:45FromDiscord<Rika> Does the CSV library not have an open that takes in a file name and return the parser?
09:59:07FromDiscord<Rika> God damn there’s a lot to change here
09:59:09FromDiscord<Rika> I’m on mobile
09:59:29FromDiscord<Rika> Line 17 should be a single var block instead of semicolon separated
10:00:06FromDiscord<Rika> For the end lines (close, commit) use try finally
10:00:31FromDiscord<Rika> So put the whole loop in the try and then finally the close and commit
10:01:03FromDiscord<Rika> These variable names aren’t very readable, maybe change them too
10:01:40FromDiscord<Rika> Your variable casing seems very inconsistent too yeah
10:02:17FromDiscord<Rika> Set u as 0 in the except block instead of setting it before
10:02:23FromDiscord<TryAngle> In reply to @TryAngle "Is there somewhere some": https://github.com/johnnovak/nim-glfw/blob/master/glfw/wrapper.nim↵Here for example, what does the glfw pragma do and how is it defined?
10:02:42FromDiscord<TryAngle> glfwImport pragma
10:03:01FromDiscord<Entikan> In reply to @voidwalker "Can someone (beef especially)": line 28 is insanely long
10:03:38FromDiscord<Rika> Yes please break your lines up
10:03:39FromDiscord<voidwalker> In reply to @Rika "Does the CSV library": I thought about that myself, If I can turn it into one line somehow, but don't see how to. parsecsv doesn't seem to have such a proc
10:05:34FromDiscord<Rika> Yeah please don’t use semicolon lines
10:05:39FromDiscord<Rika> Just never do it
10:06:22FromDiscord<voidwalker> 😦
10:06:37FromDiscord<voidwalker> But.. but.. it's too many lines otherwise. What do you mean by a var block anyway ?
10:07:04FromDiscord<voidwalker> oh you mean var, followed by the list of vars
10:08:19FromDiscord<Rika> These lines are long as hell so it’s either “too long of lines” or “too many lines” and one is easier to fix than the other if you have repetition
10:08:32FromDiscord<Rika> I guess both issues are fixed with functions though
10:08:39FromDiscord<Rika> Nonetheless it’s harder to read long lines
10:09:40FromDiscord<voidwalker> yeah I am just parsving tsv values, need that helper function wit try except, cause some values are invalid integers, and it would crash. not sure if i can force this ignor errors behaviour on the normal parseint procs
10:14:24*gshumway quit (Quit: .)
10:20:15*gshumway joined #nim
10:54:43FromDiscord<b1rdf00d> I think I know the answer to this already, but should Nim compile with `{.passC: "-std=c99".}` set? Or if that flag is set, should you as the dev / library consumer know which parts of the language will work? I ran into `asm` not compiling with gcc with this flag and with raise an issue / submit a PR, but want to check before I do so
10:55:09FromDiscord<b1rdf00d> (edit) "flag and with" => "flag. I'll"
11:15:17FromDiscord<fbpyr> this sounds awesome - is it a public repo by any chance?↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
11:22:26FromDiscord<zhmtzhmt> In reply to @Amun-Ra "<@691388442680229898>: I wrote nim-c#": Is your nim-c# bridge able to pass complex parameters? Mine is based on pinvoke and customized serialization on stack(like lua ), so complex parameter can be passed in bi-ways.
11:39:02FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=449d
11:39:45FromDiscord<zhmtzhmt> (edit) "https://play.nim-lang.org/#ix=449d" => "https://play.nim-lang.org/#ix=449e"
11:41:33FromDiscord<Rika> what do you mean?
11:41:36FromDiscord<Rika> in what way
11:42:10FromDiscord<zhmtzhmt> It is a dynamic library
11:43:10FromDiscord<zhmtzhmt> It should be exported as dll public functions
11:43:17FromDiscord<Yardanico> you need to add dynlib pragma as well
11:43:28FromDiscord<Yardanico> To export it if you compile to a dynamic library
11:43:30FromDiscord<zhmtzhmt> Let me try
11:45:42FromDiscord<zhmtzhmt> you right, it is exported now
11:45:50FromDiscord<zhmtzhmt> Thank you!
11:47:50FromDiscord<ripluke> Are proc and func the same thing?
11:48:28FromDiscord<enthus1ast> func's are not allowed to have side effects
11:50:21FromDiscord<enthus1ast> which means that only their inputs define their outputs
11:57:10FromDiscord<ripluke> Oh
12:01:02FromDiscord<TryAngle> is there a nim builder pattern macro library?
12:04:09FromDiscord<laker31> Is the `-g` option of the compiler something that does not exist anymore? I cannot find it in the compiler docs, but it is mentioned in a tutorial on how to set up CodeLLDB for Nim. 🤔
12:08:04FromDiscord<TryAngle> also is there a way to make procs only callabel by T.proc()
12:19:28*soileh joined #nim
12:20:48FromDiscord<Asbjørn F> Trying to compile from Windows to OSX, halp
12:23:36NimEventerNew question by huvdev4: Using Nim to Creating a vb6 dll that Returs String, see https://stackoverflow.com/questions/72952227/using-nim-to-creating-a-vb6-dll-that-returs-string
12:27:53FromDiscord<lantos> Is there a time library that can auto format time?
12:39:09FromDiscord<Prestige> https://nim-lang.org/docs/times.html maybe what you're looking for
12:46:09FromDiscord<Asbjørn F> I've tried compiling in a WSL2 Ubuntu instance with no luck
12:46:22FromDiscord<Asbjørn F> it uses stderrp instead of stderr
12:46:44FromDiscord<Yardanico> In reply to @Asbjørn F "I've tried compiling in": can you share more info, what are you compiling specifically?
12:46:55FromDiscord<aruZeta> Just finished reading the book by dom96 "Nim in Action" which used a old version of nim where `<` existed and was used in, for example, `for i in 0 .. <4`.↵I'm now using nim1.6.6, and `<` does not exist, I know of the existence of `..<`, which would make the previous code work, but what about `if i != <n` ? There is no `!=<`, so should I just do `if i != n - 1`?
12:47:16Amun-RaTryAngle: https://play.nim-lang.org/#ix=449r
12:47:25FromDiscord<Yardanico> In reply to @aruZeta "Just finished reading the": yes, just do that
12:47:45FromDiscord<Asbjørn F> just a simple nim script using ` nim -d:release --os:macosx --cpu:amd64 c my_script.nim` on Windows. Tried on Windows itself and in a WSL2 Ubuntu container
12:47:50FromDiscord<aruZeta> ok, thanks :)
12:47:56FromDiscord<Yardanico> In reply to @Asbjørn F "just a simple nim": and have you installed the development headers/tools in ubuntu?
12:47:59FromDiscord<Clonkk> How did you install Nim ?↵(@Asbjørn F)
12:48:00FromDiscord<Yardanico> ah, macosx
12:48:03FromDiscord<Yardanico> you can't cross-compile like that
12:48:09FromDiscord<Yardanico> you need a special toolchain to cross-compile for macs
12:48:21FromDiscord<Yardanico> something like https://github.com/tpoechtrager/osxcross
12:48:36FromDiscord<Yardanico> or zig cc might also work for console applications, but I'm not sure
12:48:39FromDiscord<Require Support> using -d:ssl is always forced to use openssl libs? feels weird to have to carry dlls and cacert.pem with a binary to make it run on windows, and other solutions dont support async. I guess statically linking is the only solution?
12:48:53FromDiscord<Clonkk> Ah yes, you target OSX okay makes more sense.↵(@Yardanico)
12:49:13FromDiscord<Clonkk> Cause I've compiled Nim in WSL2 without any issues several times
12:49:20FromDiscord<Yardanico> In reply to @Require Support "using -d:ssl is always": you can also use libressl or any library that has API openssl compatibility, but yes, statically linking is the only real option here
12:50:20FromDiscord<Yardanico> but it's not weird to carry dlls with your program on Windows at all
12:50:38FromDiscord<Yardanico> almost all Windows programs come with installers that install programs to their folders, and distributing dlls along with the programs is the usual thing on Windows
12:51:00FromDiscord<Yardanico> for example every program that uses Qt will ship with Qt dlls, so if you have 5 programs that use Qt you'll have 5 copies of Qt dlls for each of the program
12:51:45FromDiscord<Yardanico> and if you really really want to keep the single binary, you can use things like https://enigmaprotector.com/en/aboutvb.html that pack a whole folder into the binary, but they usually unpack the files to some temporary directory when running, and antiviruses don't like those packers
12:51:55FromDiscord<aruZeta> also, seems like `getGMTime()` doesn't exist anymore too (from `times`)
12:52:02FromDiscord<Yardanico> In reply to @aruZeta "also, seems like `getGMTime()`": there's an errata blog post for nim in action
12:52:09FromDiscord<Yardanico> https://deepakg.github.io/nim/2019/09/28/nim-in-action-errata.html
12:52:20FromDiscord<aruZeta> oh thanks
12:53:42FromDiscord<Asbjørn F> In reply to @Clonkk "How did you install": just followed the choosenim instructions for linux
12:54:32FromDiscord<Yardanico> did you see my messages about the macos toolchain?
12:55:40FromDiscord<Asbjørn F> Yes, I looked at it. Seems like a lot of work for a little script, so I might just use Python for this usecase :/
12:55:54FromDiscord<Asbjørn F> There's like two people here that use Mac
12:56:14FromDiscord<Asbjørn F> it's a small script so i dont mind writing it twice
13:00:27FromDiscord<enthus1ast> @Asbjørn F\: if you have an apple machine you could compile it on that
13:00:40FromDiscord<enthus1ast> pyinstaller also requires this
13:01:27FromDiscord<enthus1ast> they used to have a kinda "cross compiler" but imho the newest versions require you to run the os you're creating python executables for
13:05:10FromDiscord<Asbjørn F> In reply to @enthus1ast "<@956094950884392980>\: if you have": The only mac machines are in marketing and I don't wanna bother them to compile
13:05:43*qwr joined #nim
13:07:44FromDiscord<tylerlinuxdev> Maybe contact your supervisor into maybe purchasing Github subscription and then use their action for CI/CD to build your program on Mac OSX? That honestly what I would do in your situation.
13:12:02FromDiscord<tylerlinuxdev> Maybe contact your supervisor into purchasing Github subscription and then use their action for CI/CD to build your program in private repo on Mac OSX? That honestly what I would do in your situation.
13:13:16FromDiscord<tylerlinuxdev> Maybe contact your supervisor into purchasing Github subscription and then use their action for CI/CD to build your program in private repo for Mac OSX? That honestly what I would do in your situation.
13:16:03FromDiscord<tylerlinuxdev> Maybe contact your supervisor into purchasing Github subscription and then use Github actions for CI/CD to build your program in private repo for Mac OSX? That honestly what I would do in your situation.
13:18:58FromDiscord<Phil> Tyler is your internet okay?
13:19:27FromDiscord<tylerlinuxdev> Yeah, what up?
13:19:40FromDiscord<Yardanico> In reply to @Isofruit "Tyler is your internet": it's just the matrix bridge being bad
13:19:43FromDiscord<Yardanico> it can't do edits
13:19:45FromDiscord<Phil> You just sent the same comment 4 times
13:19:47FromDiscord<tylerlinuxdev> Oh
13:19:48FromDiscord<Phil> Ah, check
13:19:51FromDiscord<Yardanico> it's not the same comment
13:19:54FromDiscord<tylerlinuxdev> I uh...
13:19:54FromDiscord<tylerlinuxdev> My bad
13:20:02FromDiscord<tylerlinuxdev> I was editting comment to correct my writing
13:20:18FromDiscord<tylerlinuxdev> 😅
13:20:45FromDiscord<zhmtzhmt> Does NimMain should be invoked in every thread?
13:22:04FromDiscord<Yardanico> no, but can you be more specific?
13:22:09FromDiscord<Yardanico> your question is quite vague
13:23:11FromDiscord<zhmtzhmt> I am invoke nim funcions from c
13:24:02FromDiscord<zhmtzhmt> If I started multiple native thread, should I invoke NimMain when every thread started?
13:24:23FromDiscord<zhmtzhmt> (edit) "started" => "starte"
13:24:37FromDiscord<zhmtzhmt> (edit) "invoke" => "invoking"
13:25:28FromDiscord<zhmtzhmt> (edit) "thread," => "threads," | "when" => "in" | "thread started?" => "thread?"
13:27:17FromDiscord<tylerlinuxdev> Don't think you need to run NimMain for each new thread, just have to be aware of GC memories.
13:27:48FromDiscord<Yardanico> and you don't need to be aware of the GC stuff if you use ARC/ORC :)
13:27:58FromDiscord<zhmtzhmt> I am using orc
13:28:21NimEventerNew post on r/nim by momoPFL01: Plans for Nim bindings for Godot 4?, see https://reddit.com/r/nim/comments/vxb798/plans_for_nim_bindings_for_godot_4/
13:28:41FromDiscord<zhmtzhmt> The document said that , no need to initialize gc. But the program crashed.
13:29:01FromDiscord<Yardanico> can you make a minimal repro?
13:29:16FromDiscord<tylerlinuxdev> @Yardanico\: Pretty sure that in C, it doesn't know what to do with ORC/ARC, so you kind of have to fill in the blank for it.
13:29:39FromDiscord<Yardanico> again, with ARC/ORC you don't have to do anything in C to make the GC work
13:29:41FromDiscord<Yardanico> it's _made_ that way
13:29:49FromDiscord<tylerlinuxdev> Interesting
13:29:52FromDiscord<Yardanico> ARC/ORC are pure refcounting, destructors and other stuff are injected at compile-time
13:30:15FromDiscord<Yardanico> of course you need to care if you are passing native nim GC-d types to C code, but otherwise it just works (
13:30:32FromDiscord<Yardanico> and yes, with refc you do need to care because it uses stack scanning
13:30:42FromDiscord<lantos> In reply to @Avahe "https://nim-lang.org/docs/times.html maybe what you": am using this but you need to specify the time formatting.
13:30:48FromDiscord<tylerlinuxdev> Well that what I meant
13:31:02FromDiscord<zhmtzhmt> nim types are not passed.
13:31:57FromDiscord<zhmtzhmt> It is a void proc. It run without crashing, when NimMain invoking is added.
13:32:09FromDiscord<deech> How do I re-export a module without simply "include" ing it?
13:32:16FromDiscord<Yardanico> In reply to @zhmtzhmt "It is a void": maybe you have some global variables
13:32:17FromDiscord<aruZeta> In reply to @Yardanico "https://deepakg.github.io/nim/2019/09/28/nim-in-act": only thing missing was the fixes for the ident stuff in chapter 9 which is deprecated, but I fixed it by reading the changelog of the version which deprecated it and the compiler, thanks!
13:32:26FromDiscord<Yardanico> In reply to @deech "How do I re-export": if you want to export a module you imported, then just `export module`
13:32:47FromDiscord<zhmtzhmt> Yes , I have global variables.
13:32:53FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=449G
13:32:59FromDiscord<Yardanico> In reply to @zhmtzhmt "Yes , I have": yeah, then you need to invoke NimMain
13:33:11FromDiscord<tylerlinuxdev> @zhmtzhmt\: It looks like it might be necessary to run NimMain\:` NimMain() # initialize garbage collector memory, types and stack`
13:33:15FromDiscord<Yardanico> depends on how you use the Nim code though, if you load it as a DLL it should invoke NimMain by itself
13:33:29FromDiscord<Yardanico> In reply to @tylerlinuxdev "<@691388442680229898>\: It looks like": it's only needed for global variables and global code with arc/orc
13:33:33FromDiscord<tylerlinuxdev> Alright
13:33:35FromDiscord<zhmtzhmt> So , invokes NimMain in every native thread?
13:33:41FromDiscord<deech> On nice! Then why doesn't `prelude.nim` do that? The docs tell you to "include" it. https://github.com/nim-lang/Nim/blob/fb5fbf1e087563f0288b8ed684c8dcc1891730b0/lib/pure/prelude.nim#L14-L15
13:33:58FromDiscord<Yardanico> In reply to @deech "On nice! Then why": it does do that nowadays, it's just that some people prefer it that way :)
13:34:06FromDiscord<Yardanico> ah nvm it doesn't, weird
13:34:17FromDiscord<Yardanico> no clue honestly
13:34:32FromDiscord<tylerlinuxdev> @zhmtzhmt\: Looks like it
13:34:40FromDiscord<zhmtzhmt> Thanks
13:34:57FromDiscord<Yardanico> In reply to @zhmtzhmt "Thanks": there might be problems if you compile your Nim program as a single-threaded program and then use it in a multi-threaded application
13:35:09FromDiscord<Yardanico> how are you using Nim in your main C program?
13:35:50FromDiscord<zhmtzhmt> lib is compiled with --thread:on,
13:36:48FromDiscord<zhmtzhmt> c load it dynamically, find function entries, and invoke them.
13:40:26FromDiscord<zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=449M
13:40:28FromDiscord<zhmtzhmt> it is c#
13:40:46FromDiscord<zhmtzhmt> this is main thread
13:45:46FromDiscord<zhmtzhmt> I can started second thread to test.
13:45:53FromDiscord<zhmtzhmt> (edit) "started" => "starte"
13:46:00FromDiscord<zhmtzhmt> (edit) "starte" => "start"
13:52:13FromDiscord<zhmtzhmt> NimMain should be invoked in every thread. or program will be crashed.
13:52:30FromDiscord<zhmtzhmt> I have tested .
14:11:51*arkurious joined #nim
14:12:41*CyberTailor quit (Ping timeout: 268 seconds)
14:22:50*toluene quit (Ping timeout: 240 seconds)
14:25:23*toluene joined #nim
14:27:07FromDiscord<TryAngle> In reply to @Amun-Ra "<@147447489316913152>: https://play.nim-lang.org/#i": thanks
14:27:32FromDiscord<TryAngle> how do u use the map function?
14:28:39FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44ab
14:28:47FromDiscord<TryAngle> I don't understand how I get the x in map lol
14:34:20FromDiscord<Rika> https://play.nim-lang.org/#ix=44ag nim objects dont have map by default ofc
14:36:04FromDiscord<Phil> Map on normal objects is a thing?
14:36:07FromDiscord<Phil> Fascinating
14:36:32FromDiscord<TryAngle> In reply to @Rika "https://play.nim-lang.org/#ix=44ag nim objects dont": ye I was tlaking about Option type↵ok so to access it u write an "anonymous" proc ? ↵thanks 🥺
14:36:41FromDiscord<Rika> In reply to @Rika "https://play.nim-lang.org/#ix=44ag nim objects dont": more interesting with generics
14:36:42FromDiscord<Rika> https://play.nim-lang.org/#ix=44ai
14:37:01FromDiscord<Rika> In reply to @TryAngle "ye I was tlaking": same thing with rust `|x| do_something(x)` is an anonymous proc
14:37:15FromDiscord<Rika> In reply to @Isofruit "Map on normal objects": input monoid talk here
14:37:23FromDiscord<TryAngle> In reply to @Rika "same thing with rust": true actually, the rust syntax makes it look special though
14:37:33FromDiscord<Rika> `import sugar`
14:37:41FromDiscord<Rika> `(x) -> do_something(x)`
14:37:42FromDiscord<Phil> In reply to @Rika "input monoid talk here": Ah what now?... Guess I'll Google
14:38:07FromDiscord<Rika> In reply to @Rika "`(x) -> do_something(x)`": sorry, =>
14:38:23FromDiscord<TryAngle> In reply to @Rika "`(x) -> do_something(x)`": omg that is some sweet sugar indeed 😳
14:38:40FromDiscord<Phil> Yep, I have sugar imported almost everywhere
14:39:02FromDiscord<Phil> To the point I'm contemplating finding a way to have it maybe auto imported, undecided on that
14:39:14FromDiscord<TryAngle> if u put "zero cost abstractions" on nim page nim would be 10x the userbase in a week gg
14:39:29*xet7 joined #nim
14:39:34FromDiscord<Rika> lmao
14:39:51FromDiscord<Rika> In reply to @Isofruit "Ah what now?... Guess": good luck, i still dont understand them
14:40:14FromDiscord<Rika> insert haskell monoid memes here
14:40:36FromDiscord<Rika> sorry
14:40:39FromDiscord<Rika> monAd
14:40:52FromDiscord<Rika> thanks for making things so similarly named, mathematics
14:40:56*xet7 quit (Remote host closed the connection)
14:41:33FromDiscord<Rika> forgive me for i have just finished creating some UML stuff today and that's seared my brain
14:42:08FromDiscord<Phil> I started reading wiki monoid article, apparently it's a math construct
14:42:15FromDiscord<Rika> i got it wrong
14:42:16FromDiscord<Rika> i meant monad
14:42:20FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44al
14:42:23FromDiscord<Rika> ->
14:42:25FromDiscord<Rika> =>
14:42:25FromDiscord<Phil> I gave up, maybe I'll ask my sister
14:42:26FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=44am
14:42:30FromDiscord<Rika> made a mistake
14:42:33FromDiscord<TryAngle> oh ok I'm blind thanks xd
14:42:36FromDiscord<Rika> In reply to @Isofruit "I gave up, maybe": again, i meant monad
14:42:45FromDiscord<Rika> still doesnt mean i understood though
14:43:01FromDiscord<Rika> good luck understanding https://en.wikipedia.org/wiki/Monad_(functional_programming)
14:43:26FromDiscord<Phil> Weren't monads the strange thing where fp shoves all its side effecty code and calls it a day?
14:44:11FromDiscord<Rika> thats almost like saying "isnt a car something that consumes gasoline" its kinda missing the point
14:44:21FromDiscord<Rika> like sure thats right but thats not the thing
14:49:25FromDiscord<Phil> Fair, but my brain is too temperature dead to start wrapping my head around monads which I've always understood to be in the same league for brain melting as rxjs was for me back when I started
14:51:49*xet7 joined #nim
14:54:54FromDiscord<dain> http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html this is what made it click for me
14:56:48*CyberTailor joined #nim
14:58:30*CyberTailor quit (Remote host closed the connection)
14:59:22*CyberTailor joined #nim
15:22:09NimEventerNew question by testuser: NIM string to seq[string], see https://stackoverflow.com/questions/72954696/nim-string-to-seqstring
16:34:47*gsalazar quit (Ping timeout: 272 seconds)
16:43:34*gsalazar joined #nim
16:45:26NimEventerNew post on r/nim by NotNotOP: Here's how to implement an equivalent of the "@show" macro from Julia in Nim. Very convenient!, see https://reddit.com/r/nim/comments/vxfp8u/heres_how_to_implement_an_equivalent_of_the_show/
16:49:02FromDiscord<TryAngle> In reply to @Rika "good luck understanding https://en.wikipedia.org/wi": https://www.youtube.com/watch?v=-fKAh4PVKbU
16:49:12FromDiscord<TryAngle> @Phil
16:56:53FromDiscord<Phil> I appreciate you guys believing in me, but my head is swimming in the soup that is spain's sun
16:56:59FromDiscord<Phil> Or something like that
16:57:13FromDiscord<Phil> It's hot and I'm dying is what I'm saying
16:57:18FromDiscord<aruZeta> you are spanish?
16:57:26FromDiscord<Phil> Nope, vacation
16:57:35FromDiscord<aruZeta> ahh, pretty hot here right
16:57:59FromDiscord<Phil> My fav temp is 16°C and my last trip to Spain was back when "normal" hot temperatures were 30°C
16:58:16FromDiscord<Phil> It hadn't sunk in how brutal it is nowadays
16:58:32FromDiscord<Phil> The food is fantastic though
16:58:39FromDiscord<aruZeta> "hot" actually means like +40C
16:58:53*kenran joined #nim
16:58:57FromDiscord<Phil> I mean, currently it's like
16:59:08FromDiscord<aruZeta> In reply to @Isofruit "The food is fantastic": we got some good stuff yh
16:59:20FromDiscord<Phil> Huh, 30 some degrees, not 40
16:59:35FromDiscord<Phil> Still not well adapted to temps that high, so still dying
16:59:48*kenran quit (Client Quit)
16:59:56FromDiscord<aruZeta> it's like 34 here, i don't feel much hot but i'm sweating a lot
17:00:07FromDiscord<vindaar> I get to look forward to 42 tomorrow, yay
17:01:44FromDiscord<aruZeta> nice
17:01:48FromDiscord<aruZeta> (edit) "nice ... " added "lol"
17:03:20FromDiscord<Phil> Death, death everywher
17:04:52FromDiscord<TryAngle> In reply to @aruZeta ""hot" actually means like": for me hot means 25+ degrees 💀
17:05:06FromDiscord<aruZeta> you would not last a day here 💀
17:05:13FromDiscord<TryAngle> I know 💀
17:13:36FromDiscord<untoreh> does `pinnedSpawn` work from threadpool?
17:18:36NimEventerNew thread by Ro2: Heterogeneous strongly typed records, see https://forum.nim-lang.org/t/9300
17:22:09FromDiscord<blashyrk> Hi all, this RFC hasn't been implemented yet, right? https://github.com/nim-lang/RFCs/issues/368↵Are there any alternatives as of this moment?
17:22:54*vicecea quit (Remote host closed the connection)
17:23:25*vicecea joined #nim
17:23:27FromDiscord<blashyrk> (edit) "https://github.com/nim-lang/RFCs/issues/368↵Are" => "https://github.com/nim-lang/RFCs/issues/368 (it's the Multiple usages of the case discriminator for case objects RFC)↵Are"
17:26:22FromDiscord<mirandaniel> Hey, I'm compiling with `--threads:on` but VSC is still angry with `undeclared identifier: 'createThread'`, any way to fix this?
17:27:44FromDiscord<mirandaniel> fixed
17:42:30FromDiscord<krisppurg> Is there any good alternatives to asyncCheck?
17:48:00FromDiscord<Rika> What do you mean
17:48:20FromDiscord<aruZeta> whats wrong with asyncCheck
17:48:24FromDiscord<Rika> What would the alternative do
17:48:42FromDiscord<aruZeta> or maybe you need a different functionality
17:49:33FromDiscord<aruZeta> you have, `asyncCheck`, `await` and `waitFor` (don't remember more if there are, apart from `runForever` and `poll`)
18:34:50*krux02 joined #nim
19:00:32*xet7 quit (Ping timeout: 255 seconds)
19:12:31*rockcavera joined #nim
19:12:31*rockcavera quit (Changing host)
19:12:31*rockcavera joined #nim
19:13:35FromDiscord<jan0809> what does async check do?
19:16:21FromDiscord<jan0809> In reply to @Rika "What would the alternative": maybe something like `loopmon` in pyhon (which monitors the impact of blocking calls on asyncios eventloop)(?)
19:16:31FromDiscord<jan0809> <https://pypi.org/project/loopmon/>
19:17:27FromDiscord<jan0809> i remeber integrating that in a discord bot once
19:22:49FromDiscord<jan0809> https://media.discordapp.net/attachments/371759389889003532/996496872468394045/1657653756937.jpg
19:23:18FromDiscord<huantian> In reply to @jan0809 "what does async check": makes the future raise an exception on completion without blocking
19:29:22*noeontheend joined #nim
19:29:52FromDiscord<exelotl> sooo I can use xmltree.escape to convert a string with < and ' and stuff to &lt; and &apos; etc.
19:30:08FromDiscord<exelotl> is there a way to do the opposite?
19:56:18FromDiscord<dom96> In reply to @jan0809 "": Ooh. That’s cool
19:58:31*koltrast quit (Quit: ZNC - http://znc.in)
19:58:50*ehmry quit (Ping timeout: 244 seconds)
19:59:32*koltrast joined #nim
20:01:32*ehmry joined #nim
20:02:49FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=44bY
20:04:13FromDiscord<Elegantbeef> do you have a `[]` accessor for your type?
20:05:19FromDiscord<TryAngle> am I stupid or is there no proc to get a value for SharedTable?
20:05:47FromDiscord<Elegantbeef> I think shared table is a bad API that needs rewritten or changed
20:06:27FromDiscord<Elegantbeef> This isnt me saying my opinion this is parroting araq 😜
20:07:15FromDiscord<lantos> fk me worked it out↵↵fileB also needs to import tables
20:07:27FromDiscord<Elegantbeef> Or fileA can `export tables`
20:07:32FromDiscord<lantos> (edit) removed "fk me"
20:07:46FromDiscord<lantos> o, is that in docs somewhere?
20:08:04FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#modules-export-statement
20:08:23FromDiscord<Arathanis> Can you define static procs? Or type procs? Similar to how `int.low` works but for your own types?
20:08:41FromDiscord<Elegantbeef> `proc doThing(_: typedesc[MyType])`↵(@Arathanis)
20:08:49FromDiscord<Elegantbeef> Remember that "static" doesnt mean what you want to imply
20:08:58FromDiscord<Elegantbeef> You want type bound procedures
20:09:09FromDiscord<Elegantbeef> Well typedesc bound procedures
20:09:10FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=44c0
20:09:23FromDiscord<Arathanis> yeah i need to remember that nim uses the word static differently
20:09:24FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44c1
20:09:27FromDiscord<lantos> but thanks beed
20:09:30FromDiscord<lantos> (edit) "beed" => "beef"
20:10:28FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=44c1" => "https://play.nim-lang.org/#ix=44c2"
20:12:13FromDiscord<Arathanis> In reply to @Elegantbeef "`proc doThing(_: typedesc[MyType])` (<@136570191038": appreciate it, thank you.↵↵I am guessing using `_` as the variable name is the accepted style for this?
20:12:32FromDiscord<Arathanis> (edit) "In reply to @Elegantbeef "`proc doThing(_: typedesc[MyType])` (<@136570191038": appreciate it, thank you.↵↵I am guessing using `_` as the ... variable" added "typedesc"
20:14:14FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=44c3
20:14:45FromDiscord<Elegantbeef> Yea you dont need it↵(@Arathanis)
20:15:14FromDiscord<Arathanis> the binding based on type is the magic, don't ever need to reference it you already know what it is! unless you don't
20:15:15FromDiscord<Elegantbeef> `'typedesc[WindowEventKind]' for 'WindowEventKind'` tryangle
20:15:37FromDiscord<TryAngle> the error is the enum name was WindowEventKind.KeyInput↵and not WindowEventKind.KeyboardInput↵and KeyboardInput is also a type I use↵so a pure enum with a wrong variant name of another type produces this sussy error
20:15:51FromDiscord<Elegantbeef> No
20:16:00FromDiscord<Elegantbeef> That same error works for any type
20:16:18FromDiscord<Elegantbeef> `MyType.MyOtherType` is a conversion
20:16:33FromDiscord<Elegantbeef> remember it's converted to `MyOtherType(MyType)`
20:17:10FromDiscord<TryAngle> so pure enums are not pure but just converted to themselves?
20:17:34FromDiscord<Elegantbeef> Pure enums only allow values to be duplicated they dont do anything else
20:17:57FromDiscord<TryAngle> oh ok, how do I enforce T.variant for enums then?
20:18:03FromDiscord<Elegantbeef> You cannot
20:18:09FromDiscord<TryAngle> ok sad smiley face
20:18:35FromDiscord<TryAngle> so I should still put some random chars before each enum variant?
20:18:40FromDiscord<Arathanis> doesn't `{.pure.}` just mean you have to namespace qualify the enum?
20:18:47FromDiscord<Elegantbeef> Or just user overloadable enums
20:18:52FromDiscord<Elegantbeef> use\
20:18:57FromDiscord<Elegantbeef> Only in case of ambiguity↵(@Arathanis)
20:19:01FromDiscord<Elegantbeef> The definition has changed over the years
20:19:19FromDiscord<TryAngle> In reply to @Elegantbeef "Only in case of": ah I see, so it's safe to use this when I have types with same name?
20:19:33FromDiscord<TryAngle> (edit) "In reply to @Elegantbeef "Only in case of": ah I see, so it's ... safe" added "still"
20:19:36FromDiscord<Arathanis> ok so if you odn't use pure enums and try and use the same identifier more than once thats an error
20:19:40FromDiscord<Elegantbeef> I mean if you have a type the same name as an enum field it's just awful
20:19:47FromDiscord<Arathanis> but if they are pure then you just have to resolve the ambiguity with namespace qualification?
20:19:52FromDiscord<Elegantbeef> Yes
20:20:01FromDiscord<Elegantbeef> The experimental overloadable enums is a better solution
20:20:12FromDiscord<Elegantbeef> You can have duplicate enums and it's resolved using type information
20:20:19FromDiscord<Arathanis> is that in the normal experimental manual?
20:20:56FromDiscord<Elegantbeef> Should work
20:21:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=44c6
20:21:15FromDiscord<Elegantbeef> I actually dont think it's documented in either manual
20:21:29FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#types-overloadable-enum-field-names
20:21:29FromDiscord<Elegantbeef> Nevermind it is
20:21:45FromDiscord<Elegantbeef> It's just the "Nim way" of doing enums
20:22:00FromDiscord<TryAngle> https://github.com/nim-lang/RFCs/issues/373
20:22:12FromDiscord<TryAngle> so this is arelady in 1.6.6?
20:22:44FromDiscord<Elegantbeef> Click the manual i linked then hit your home key
20:23:26FromDiscord<TryAngle> ok this is a banger https://media.discordapp.net/attachments/371759389889003532/996512127219159100/unknown.png
20:24:16FromDiscord<TryAngle> In reply to @Elegantbeef "https://nim-lang.org/docs/manual.html#types-overloa": ah ok, looks pretty good, but I just like namespacing them I guess >. <
20:24:22FromDiscord<mirandaniel> So I'm playing around with websockets, copypasted the server code from <https://github.com/treeform/ws>, compiles fine but VSC is angry about `{.async, gcsafe.}` saying `template/generic instantiation of 'async' from here` 🧐
20:25:35FromDiscord<Elegantbeef> @TryAngle\: https://github.com/beef331/micros/blob/master/tests/test1.nim#L127-L149
20:26:35FromDiscord<Elegantbeef> did you `import std/asyncdispatch`?
20:26:54FromDiscord<mirandaniel> yup
20:27:21FromDiscord<Elegantbeef> Can i see the full code?
20:27:37FromDiscord<Elegantbeef> Oh wait vscode is angry the compiler isnt?
20:27:41FromDiscord<mirandaniel> yup
20:27:52FromDiscord<Elegantbeef> Restart the editor
20:27:53FromDiscord<Arathanis> the VSCode language servers dont support every feature of Nim
20:27:58FromDiscord<Elegantbeef> If it's still not happy which extension are you using
20:28:00FromDiscord<mirandaniel> In reply to @Elegantbeef "Restart the editor": Tried that
20:28:04FromDiscord<Elegantbeef> The fuck are you on about arathanis
20:28:12FromDiscord<Elegantbeef> Async is a macro the editor doesnt need to support anything
20:28:20FromDiscord<mirandaniel> In reply to @Elegantbeef "If it's still not": https://media.discordapp.net/attachments/371759389889003532/996513362055790622/unknown.png
20:28:30FromDiscord<Elegantbeef> Use the saem's extensiion
20:28:37FromDiscord<TryAngle> is there a way to block import access in nim libraries?
20:28:44FromDiscord<Elegantbeef> "the saem" glad he's not here to say that
20:28:47FromDiscord<Arathanis> In reply to @Elegantbeef "The fuck are you": I have found at least 2 things that saem's extension does not support unless they have added it in the last 2 months
20:28:52FromDiscord<Elegantbeef> "block import access"....
20:29:05FromDiscord<Elegantbeef> What are you talking about
20:29:07FromDiscord<Arathanis> it shows errors in otherwise usable code
20:29:14FromDiscord<Elegantbeef> That's not the extension
20:29:17FromDiscord<Elegantbeef> That's nimsuggest
20:29:38FromDiscord<Elegantbeef> It's not lacking support it's due to nimsuggest having a destructive bug
20:29:53FromDiscord<Arathanis> Oh? What is this bug?
20:29:58FromDiscord<Arathanis> That would make sense.
20:30:07FromDiscord<mirandaniel> In reply to @Elegantbeef "Use the saem's extensiion": That works, thanks a lot!
20:30:12FromDiscord<Elegantbeef> Something between 1.4.8 and 1.6.0 broke symbol comparisons so many things now falsely report bugs
20:30:29FromDiscord<Elegantbeef> I've looked into the bug but it's not overly clear how to solve it to me
20:30:31FromDiscord<Arathanis> The 2 things I have not been able to get working are:↵↵1. `.nims` files↵2. nimble local deps
20:30:39FromDiscord<Elegantbeef> I do have a bodge fix for it
20:30:52FromDiscord<TryAngle> In reply to @Elegantbeef "What are you talking": let's say we have a library with structcture:↵library/[test1/[test11, test12], test2]↵I want to be able to block the user being able to import test11 and test12
20:30:54FromDiscord<Elegantbeef> `.nims` will work with `#devel`'s nimsuggest
20:31:02FromDiscord<TryAngle> (edit) "In reply to @Elegantbeef "What are you talking": let's say we have a library with structcture:↵library/[test1/[test11, test12], test2]↵I want to be able to block the ... userof" added "library" | "libraryuser ... being" added "of"
20:31:12FromDiscord<Arathanis> `choosenim install devel`?
20:31:14FromDiscord<Elegantbeef> make a folder called `private` then problem solved↵(@TryAngle)
20:31:16*NimEventer quit (*.net *.split)
20:31:16*syl quit (*.net *.split)
20:31:16*sagax quit (*.net *.split)
20:31:19FromDiscord<Elegantbeef> Yea
20:31:23FromDiscord<Arathanis> sick
20:31:28FromDiscord<Elegantbeef> actually it's just `choosenim devel`
20:31:38FromDiscord<Arathanis> cool
20:32:17FromDiscord<Arathanis> getting good linting of `.nims` files goes a long way towards tool chain stuff
20:32:20FromDiscord<Arathanis> thats great news illd o that
20:32:23FromDiscord<Arathanis> (edit) "illd o" => "ill do"
20:32:28FromDiscord<Arathanis> just gotta wait on those local deps then
20:32:43FromDiscord<Elegantbeef> I mean doesnt nimble 0.14 support that
20:32:58FromDiscord<Elegantbeef> The shipped nimble right now is 0.13
20:33:02FromDiscord<Arathanis> local deps? let me update my stable install and see if it starts recognizing local imports
20:33:08FromDiscord<Arathanis> oh would that be in devel too?
20:33:16FromDiscord<Elegantbeef> You'd have to fetch it yourself
20:33:19FromDiscord<Arathanis> ah got it
20:33:36FromDiscord<Elegantbeef> there are issues that need resolved for 0.14 before it goes live
20:33:59FromDiscord<Elegantbeef> It went or was going live briefly but enough backlash from features it removed caused it to be delayed
20:34:34FromDiscord<Arathanis> ok so local dep support is coming soon ™️
20:35:03FromDiscord<Elegantbeef> Yea 0.14 has a mode that stores develop files in the directory you're working on, not that i find it that useful
20:35:05*NimEventer joined #nim
20:35:05*syl joined #nim
20:35:34FromDiscord<Arathanis> i like having specific version installed on a per-project basis to help with potential version conflicts
20:35:47FromDiscord<Arathanis> VSCode just doesn't see them and complains they are not importable
20:35:49FromDiscord<Elegantbeef> I mean a lockfile solves that
20:36:18FromDiscord<Elegantbeef> Also i'm fairly certain if you setup your nimble file it solves that asweel
20:36:20FromDiscord<Elegantbeef> aswell even
20:36:37FromDiscord<Arathanis> i thought i tried that, but I can try it again
20:36:51FromDiscord<Arathanis> by setup you mean to be sure you put the deps in the nimble file, right?
20:36:55FromDiscord<Elegantbeef> https://github.com/nim-lang/nimble#nimble-develop but yea if you want to read about it
20:37:09FromDiscord<Elegantbeef> Yes the proper `requires` with the version comparisons properly usued
20:37:29FromDiscord<Arathanis> `requires programmer better than me`
20:37:57FromDiscord<Elegantbeef> Eh i'm an idiot and i make things work so the bar isnt that high
20:38:11FromDiscord<Arathanis> that's our secret beef
20:38:14FromDiscord<Arathanis> we might be idiots
20:38:19FromDiscord<Arathanis> but we are persistent idiots
20:49:15*sagax joined #nim
21:01:40FromDiscord<krisppurg> In reply to @jan0809 "i remeber integrating that": nice graph
21:02:52FromDiscord<treeform> In reply to @ajusa "though it seems like": sorry pixie will probably never support js, i would use the JS canvas API
21:04:56FromDiscord<Elegantbeef> Repeating what i say treeform is a lot cooler without the time delay 😛
21:12:37*qwr quit (Ping timeout: 268 seconds)
21:12:55FromDiscord<ajusa> In reply to @treeform "sorry pixie will probably": That fair, wasn't sure if you had plans to "wrap" the canvas API under jspixie or something similar to that
21:22:03*wallabra joined #nim
21:27:29FromDiscord<bariali07> What are some ideas and ways to make money from home
21:28:39*noeontheend quit (Ping timeout: 272 seconds)
21:32:56*krux02 quit (Remote host closed the connection)
21:43:34FromDiscord<dom96> In reply to @Arathanis "ok so local dep": iirc local dep support has been in nimble for a while
21:44:47FromDiscord<dom96> yeah, the flag is in `--help`
21:45:40FromDiscord<dom96> In reply to @Elegantbeef "there are issues that": I gave zah write access to the Nimble repo. Let's hope this helps move faster :)
21:48:05FromDiscord<TryAngle> it's so hard to get into the mindset of using globals
21:48:26FromDiscord<TryAngle> it's like growing up
21:48:29FromDiscord<Elegantbeef> Just dont use them
21:48:34FromDiscord<TryAngle> having more freedom + responsibilities
21:50:24FromDiscord<TryAngle> In reply to @Elegantbeef "Just dont use them": hmm shared resources and unique ID are 100x easier with globals
21:50:34FromDiscord<TryAngle> (edit) "ID" => "Ids"
21:50:39FromDiscord<dom96> just use a `ref` :D
21:56:23*sagax quit (Read error: Connection reset by peer)
21:59:00FromDiscord<kaestral> is nimble.directory down rn?
22:03:17FromDiscord<kaestral> back up again :P
22:04:36FromDiscord<mirandaniel> Anyone here developing with websockets on a Mac? :P
22:08:44FromDiscord<Elegantbeef> Ah deleting messages that never are actually deleted 😛
22:09:08FromDiscord<Elegantbeef> Probably a slight security issue now that i think about it
22:16:25FromDiscord<jan0809> an earlier version of that command rendered images like that, found it a bit heavy tho https://media.discordapp.net/attachments/371759389889003532/996540563627192350/1657664128799.png
22:16:45*noeontheend joined #nim
22:18:08FromDiscord<jan0809> that spikes are blocking calls lol
22:44:21FromDiscord<Arathanis> In reply to @dom96 "iirc local dep support": sorry got distracted with work↵↵i meant vs code doesnt recognize locally installed libraries and you wont get suggestions when typing and it will think those libraries do not exist
22:45:44FromDiscord<Elegantbeef> sounds like a config issue if you ask me
22:46:30FromDiscord<Arathanis> maybe
22:46:35FromDiscord<Arathanis> i tried for a long time to get it to work
22:47:02FromDiscord<Arathanis> reached out to saem, he seemed to imply that a PR was necessary for the extension
23:19:14*qwr joined #nim
23:20:52qwri think i found bug in nim 1.6.2 - iterator reinitializes variable used in if branch after yield, if the variable is accessed before if, then its value won't get lost
23:21:17FromDiscord<Elegantbeef> Is that still present in 1.6.6 or devel?
23:21:26qwris this something known / already fixed?
23:21:42FromDiscord<Elegantbeef> WEll try a modern version to know if it's fixed
23:21:49FromDiscord<Elegantbeef> Look at the issues to see if it's known
23:22:09qwrhm, i'll have to then build nim from source to check it, will do it (currently was using debian package)
23:22:48FromDiscord<Elegantbeef> Get yourself choosenim if your arch supports it
23:30:02FromDiscord<jsomedon> hello folks, if I want to clean uninstall `choosenim` itself and everything installed by that, what should I do
23:30:06FromDiscord<treeform> In reply to @ajusa "That fair, wasn't sure": oh I did that long time ago, here: https://github.com/treeform/jsutils/blob/master/src/jsutils/canvas.nim
23:30:59FromDiscord<treeform> sorry, its a really old lib so the quality is quite low
23:31:12FromDiscord<treeform> but you could just copy that file in your repo and fix anything that you need
23:31:22FromDiscord<Elegantbeef> delete your `.choosenim` and`.nimble` folders↵(@jsomedon)
23:32:55qwrsame with devel branch, i think i'll open git issue then
23:34:06qwrhave to try to make minimal test case before :)
23:36:36qwroh, no need, its known issue - https://github.com/nim-lang/Nim/issues/19795
23:37:50qwror maybe not, example is way different, but it depends on ARC
23:38:01qwrmaybe i should just add my example to the issue
23:39:26*cyraxjoe quit (Ping timeout: 244 seconds)
23:39:49*cyraxjoe joined #nim