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