00:04:27 | FromDiscord | <michaelb.eth> In reply to @whisperecean "Does cosmopolitan work nicely": you can look into: https://github.com/Yardanico/cosmonim↵↵it might work great with Nim but I haven’t seen much discussion of it in this discord nor in the forum so ymmv |
00:12:16 | FromDiscord | <jviega> Not sure why people seem to be so enthralled by cosmopolitan. Last I checked it requires a linux exe file type handler be added to Linux to run. You're in a better place if you ship a shell script that uudecodes the correct exe for your platform, and in an even better place if you ship a shell script that pulls down the right version for the architecture. |
00:25:39 | FromDiscord | <Elegantbeef> Yea it's an odd thing |
00:25:45 | FromDiscord | <Elegantbeef> It seems like a cool idea, but it does not work for any GUI programs and you might as well work on cross compiling better like Zig does |
00:27:14 | FromDiscord | <Elegantbeef> If clang adopted the Zig cross compilation stuffs, it'd be preferable to using something like cosmo |
01:41:14 | * | lucasta quit (Remote host closed the connection) |
01:47:28 | Amun-Ra | Elegantbeef: it turned out that cdecl procs are NIM_CONST |
01:47:40 | Amun-Ra | https://play.nim-lang.org/#ix=4MF4 |
01:47:53 | Amun-Ra | I mean let vars of cdecl proc type |
01:48:07 | Amun-Ra | https://dpaste.com/7VS4MYB24 |
01:48:21 | Amun-Ra | but that method works with nimcall ones |
01:51:37 | * | averymt_ joined #nim |
01:52:59 | * | krux02 quit (Remote host closed the connection) |
01:56:43 | FromDiscord | <Elegantbeef> time to get codegendecl out 😛 |
01:58:59 | Amun-Ra | :P |
02:00:16 | * | averymt_ quit (Quit: ZNC - https://znc.in) |
02:01:13 | * | averymt joined #nim |
02:10:32 | * | rockcavera joined #nim |
02:11:03 | FromDiscord | <lanky.lemur> Some days I feel really stupid |
02:11:40 | FromDiscord | <lanky.lemur> I'm getting a bunch of these errors in my code: https://media.discordapp.net/attachments/371759389889003532/1178880860016095242/Screen_Shot_2023-11-27_at_8.10.59_PM.png?ex=6577c15b&is=65654c5b&hm=63b199cbda3f27ae6ba94c4d56768b441c38ff37e46a73e2ef00c511f281fa03& |
02:12:15 | FromDiscord | <lanky.lemur> https://media.discordapp.net/attachments/371759389889003532/1178881008473481266/message.txt?ex=6577c17e&is=65654c7e&hm=5982a3722074928937acf744bdf04cf35de842b6dea64f9e3847a6ffe980e34e& |
02:12:47 | FromDiscord | <lanky.lemur> I just cannot figure out what is causing the issue 😦 |
02:15:05 | FromDiscord | <Elegantbeef> Looking at the code now but I'm 99% certain you have an unconstrained generic |
02:15:34 | FromDiscord | <Elegantbeef> `links` inside of `KanBantree` lacks a generic parameter |
02:15:46 | FromDiscord | <lanky.lemur> Ahhh okay |
02:15:54 | FromDiscord | <lanky.lemur> But I want it to be able to hold any kind of link |
02:16:05 | FromDiscord | <Elegantbeef> Nim generics are compile time only |
02:16:47 | FromDiscord | <lanky.lemur> Would I be better off using an enum as one of the fields instead of generics? |
02:16:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4MF9 |
02:17:10 | FromDiscord | <lanky.lemur> Oh, that works, too |
02:18:16 | FromDiscord | <Elegantbeef> You are likely better to use an object variant |
02:18:48 | FromDiscord | <lanky.lemur> Okay, making that change didn't break things further, but I'm still getting the same error |
02:19:17 | FromDiscord | <Elegantbeef> Your table should be `links: Table[string, LinkBase]` |
02:19:27 | FromDiscord | <lanky.lemur> Yep, I changed that |
02:19:35 | FromDiscord | <Elegantbeef> Everywhere you use `Link` should be that |
02:19:54 | * | averymt left #nim (Leaving) |
02:20:20 | FromDiscord | <lanky.lemur> The only other place that I use Link right now is in the Link constructor |
02:20:36 | FromDiscord | <Elegantbeef> It's in `Card` |
02:20:37 | FromDiscord | <lanky.lemur> sent a code paste, see https://play.nim-lang.org/#ix=4MFb |
02:20:57 | FromDiscord | <Elegantbeef> It's an awful error message but it is what it is 😄 |
02:21:08 | FromDiscord | <lanky.lemur> Good catch, but that didn't resolve it |
02:21:11 | FromDiscord | <Elegantbeef> That error message generally means "You have an incorrect generic type, or type annotation" |
02:23:25 | FromDiscord | <lanky.lemur> These are the errors that appear right now https://media.discordapp.net/attachments/371759389889003532/1178883813556895805/Screen_Shot_2023-11-27_at_8.23.09_PM.png?ex=6577c41b&is=65654f1b&hm=807af6cef187b04a9d4ff4f9c0fdd0a8f8235c1b377440bedf4284539d4133ee& |
02:24:32 | FromDiscord | <Elegantbeef> I do not see any other usages of Link, nor any uninstantiated generics |
02:24:33 | FromDiscord | <Elegantbeef> Assuming you got both the `Link` and `seq[Link]` changed |
02:24:33 | FromDiscord | <Elegantbeef> Want to throw your current code here https://play.nim-lang.org/? |
02:24:38 | FromDiscord | <Elegantbeef> What the compiler says is always more pertinent 😄 |
02:25:36 | FromDiscord | <lanky.lemur> https://play.nim-lang.org/#ix=4MFc |
02:27:22 | FromDiscord | <Elegantbeef> Oh you have a few `file = string` apparently |
02:27:30 | FromDiscord | <Elegantbeef> You should use inheritance to reduce redundant code |
02:27:48 | FromDiscord | <Elegantbeef> `file, name, description` can all be shared in a single object |
02:30:07 | FromDiscord | <Elegantbeef> You did find a bug "Defaulting a value to a type silently works" |
02:30:52 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1178885692219207720/image.png?ex=6577c5db&is=656550db&hm=f402885fa8c3f79dd917ae2acb8d7689c6ad1c5d605db195cc8678d46645bf33& |
02:30:52 | FromDiscord | <Elegantbeef> The fuck github |
02:32:00 | FromDiscord | <lanky.lemur> Okay, I added in a new type `KanbanObj`, which has `file`, `name`, `description`, and `loaded` as fields and all of my other objects inherit from this (I eliminated the `LinkObj` type and had `Link` inherit from it) |
02:34:04 | FromDiscord | <Elegantbeef> Nice now you should not have an error, and less redundant code |
02:34:18 | FromDiscord | <Elegantbeef> I will say that unless you have super wild `T` values for `Link` I'd suggest using an object variant |
02:36:06 | FromDiscord | <lanky.lemur> Can you explain what you mean by that? |
02:36:11 | FromDiscord | <Elegantbeef> Unrelated, but I feel like your name is a ubuntu version |
02:36:29 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
02:36:48 | FromDiscord | <Elegantbeef> Instead of using generics, you can use a tagged union of all your possible values |
02:36:49 | FromDiscord | <lanky.lemur> Okay, cool. So having an enum for the type of Link |
02:37:18 | FromDiscord | <lanky.lemur> Link will only ever contain one of my types or string |
02:37:49 | FromDiscord | <Elegantbeef> Then in that case a branch for every one of your types + string seems very sensible |
02:37:57 | FromDiscord | <Elegantbeef> This ensures that you handle ever case everywhere you use it |
02:38:15 | FromDiscord | <Elegantbeef> If you dispatch on it you do `case myLink.kind` and handle every branch, instead of using methods and silently not |
02:38:37 | FromDiscord | <Elegantbeef> Plus this is more strongly typed as you explicitly define type branches |
02:42:43 | FromDiscord | <Elegantbeef> Oh and amun-ra that issue is only really a problem on windows since `nimcall` is cdecl on linux 😄 |
02:47:39 | FromDiscord | <lanky.lemur> Okay, thank you so much for your help so far |
02:49:00 | FromDiscord | <lanky.lemur> I implemented object variants for Link and adjusted all the other code (including my deprecated way of adding items to a table), but I'm still getting an error about using `string` for `KanbanObj.file` |
02:49:32 | FromDiscord | <lanky.lemur> https://play.nim-lang.org/#ix=4MFh |
02:51:47 | FromDiscord | <Elegantbeef> You changed it to `file: string`? |
02:52:02 | FromDiscord | <lanky.lemur> Yep, line 5 |
02:52:18 | FromDiscord | <Elegantbeef> Yea you need to use `file: string` |
02:52:22 | FromDiscord | <lanky.lemur> ugh |
02:52:25 | FromDiscord | <lanky.lemur> so stupid |
02:53:56 | FromDiscord | <lanky.lemur> It compiles!!! |
02:53:57 | FromDiscord | <lanky.lemur> Thank you |
02:54:23 | FromDiscord | <lanky.lemur> It sucks when there's real issues mixed in with stupid issues, like using `=` instead of `:` |
02:56:35 | FromDiscord | <Elegantbeef> Yea on the plus side https://github.com/nim-lang/Nim/issues/22996 |
02:57:19 | FromDiscord | <lanky.lemur> Yeah! It's the compiler's fault, not mine! |
02:57:31 | FromDiscord | <Elegantbeef> It is if you remove `ref` it errors |
03:13:51 | * | rockcavera quit (Remote host closed the connection) |
03:25:07 | * | edr quit (Quit: Leaving) |
03:37:13 | * | derpydoo quit (Ping timeout: 260 seconds) |
03:39:11 | NimEventer | New thread by alireza: Creating nimstring using pre-allocated buffer to prevent copy, see https://forum.nim-lang.org/t/10694 |
04:59:06 | * | redj quit (Ping timeout: 256 seconds) |
04:59:35 | * | redj joined #nim |
06:03:43 | * | azimut quit (Ping timeout: 240 seconds) |
07:35:59 | * | kenran joined #nim |
07:36:25 | FromDiscord | <Phil> MSYS2 question because that confuses the hell out of me currently |
07:36:41 | * | PMunch joined #nim |
07:37:49 | FromDiscord | <Phil> sent a long message, see http://ix.io/4MG1 |
07:38:19 | FromDiscord | <Elegantbeef> Compiler does matter if you do not prepare for it, but it's likely for static libraries |
07:39:11 | FromDiscord | <Phil> So for static linking a lib from gcc is not interoperable with one for clang (as a linux analogy, no idea what ucrt is) |
07:39:14 | FromDiscord | <Phil> (edit) "is)" => "is)?" |
07:40:02 | * | advesperacit joined #nim |
07:40:18 | FromDiscord | <nnsee> ucrt is a c lib |
07:40:49 | FromDiscord | <nnsee> you will probably find this illuminating |
07:40:53 | FromDiscord | <nnsee> https://www.msys2.org/docs/environments/ |
07:41:03 | FromDiscord | <ElegantBeef> Answer was made in matrix, but bridge went kapoot |
07:41:15 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/1178963802612584458/image.png?ex=65780e9a&is=6565999a&hm=6063e2a115964bae988dab348527fd8d161cc553825a4712f0ada6f7915b2911& |
07:41:37 | FromDiscord | <ElegantBeef> Ah you jumped over there |
07:41:46 | FromDiscord | <ElegantBeef> Saving me wasting the precious resource of internet bandwidth |
07:41:47 | FromDiscord | <Phil> This does not apply to dynamically loaded libs I take it because I feel like that kind of complexity I'd have noticed |
07:41:56 | FromDiscord | <Elegantbeef> By prepare for it I mean properly expose things and not rely on compiler behaviour to expose symbols |
07:41:57 | FromDiscord | <Elegantbeef> Correct |
07:41:59 | FromDiscord | <Elegantbeef> Static libraries are practically funny object files, which are specific to the compiler |
07:42:16 | FromDiscord | <ElegantBeef> Partially right, actual dynamic libraries are fine as they have an exposed ABI |
07:42:40 | FromDiscord | <ElegantBeef> We generally agree on this using 'Ctypes' and 'C calling conventions' |
07:42:54 | FromDiscord | <ElegantBeef> Sorta standard ABI that should not explode in your face |
07:43:26 | FromDiscord | <ElegantBeef> For an ABI to be usable from any other compiler the fields have to have the same offsets, calling conventions have to be the same and more! |
07:44:29 | FromDiscord | <Phil> Okay, then next question, why recommend installing static libs to compile owlkettle on windows?↵That basically means you're making a static binary of every owlkettle project, right? Why not use DLLs same as on Linux? |
07:44:47 | FromDiscord | <Phil> (edit) "Okay, then next question, why recommend installing static libs to compile owlkettle ... on" added "projects" |
07:45:12 | FromDiscord | <ElegantBeef> Cause windows does not ship gtk |
07:45:14 | FromDiscord | <ElegantBeef> Linux ships gtk |
07:45:26 | FromDiscord | <ElegantBeef> Well "Ships it" is a silly statement for linux |
07:45:39 | FromDiscord | <ElegantBeef> But gtk is generally available on 99% of users setups running linux |
07:45:53 | FromDiscord | <ElegantBeef> GTK is a big project that's like 40+ mb on windows |
07:46:07 | FromDiscord | <ElegantBeef> Shipping what you do not use with every project quickly can add up |
07:46:20 | FromDiscord | <Phil> Yeah but isn't the general way of shipping applications providing an installation wizard that installs the application?↵As part of that you could just add said libs to the users DLL direcotires |
07:46:23 | FromDiscord | <ElegantBeef> But if you statically link and only include what you use it quickly gets down to a much more managable sub 10MB size |
07:46:29 | FromDiscord | <ElegantBeef> Right you can |
07:46:37 | FromDiscord | <Phil> Or has the world moved on and windows users are all on static binaries nowadays? |
07:46:40 | FromDiscord | <ElegantBeef> But some view that as ugly and a waste of time when static linking would've sufficed |
07:46:48 | FromDiscord | <ElegantBeef> I mean windows has always been static binaries in disguise |
07:46:55 | FromDiscord | <Phil> TIL |
07:46:57 | FromDiscord | <ElegantBeef> They always shit the dlls next to the exe |
07:47:01 | FromDiscord | <ElegantBeef> (edit) "shit" => "ship" |
07:47:08 | FromDiscord | <ElegantBeef> Like on windows there is 0 regard to DLL reuse |
07:48:20 | FromDiscord | <ElegantBeef> Of course it's still dynamic linking but given that you're tying the dlls to the program it's only difference is you can update the dlls or replace them with reimplmentations |
07:48:32 | FromDiscord | <ElegantBeef> It defeats the main purpose of size savings that dlls give you |
07:49:55 | FromDiscord | <Phil> Actually that's also an interesting questions:↵What are all the differences between e.g. a 100MB statically linked binary vs. 3x 33mb DLLs and a 1mb binary?↵I assume statically linked binaries are slightly faster since static compilation means you can link things together more... well statically. |
07:50:08 | FromDiscord | <Phil> (edit) "statically." => "statically and don't need to spend time loading anything." |
07:50:15 | FromDiscord | <ElegantBeef> The main difference is no opening dlls and smaller binaries |
07:50:24 | FromDiscord | <ElegantBeef> Statically linked binaries only include what's needed |
07:50:30 | FromDiscord | <ElegantBeef> If you do not use a procedure it's not there |
07:50:40 | FromDiscord | <ElegantBeef> Dynamic libraries ship the kitchen sink, so everything you might ever use is there |
07:51:28 | FromDiscord | <ElegantBeef> There should be no implicit overhead to a DLL with the exception that the logic is inlined when using a static library(due to the fact it can actually see the body at link time) |
07:52:02 | FromDiscord | <ElegantBeef> There is slight startup time when loading the dll, but barring that it's all just procedures |
07:53:17 | * | kenran quit (Remote host closed the connection) |
07:53:20 | FromDiscord | <ElegantBeef> Your example of 100mb vs 3 33mb is flawed of course due to the fact it'd only work that way if you used 100% of the dlls |
07:53:31 | FromDiscord | <ElegantBeef> Which is possible but is highly unlikely 😛 |
07:53:51 | FromDiscord | <Elegantbeef> Ping |
07:54:00 | FromDiscord | <Phil> Look beef, it's beef! |
07:54:07 | FromDiscord | <Elegantbeef> Shit get him boys! |
07:54:52 | FromDiscord | <Elegantbeef> Anywho any more questions?! |
07:55:25 | FromDiscord | <Phil> Not atm, mostly got curious about this because takemichi made a PR about MSYS2 docs to owlkettle |
07:55:40 | FromDiscord | <Phil> And the fact there were separate installation steps for GTK libs was confusing to me |
07:55:53 | FromDiscord | <Elegantbeef> I should've just forced you to benchmark the dll vs. static just to not take my word for it |
07:55:54 | FromDiscord | <Phil> (edit) "And the fact there were separate installation steps for GTK libs ... was" added "per toolchain" |
07:56:29 | * | kenran` joined #nim |
07:56:44 | FromDiscord | <Elegantbeef> I'm an uneducated swine, taking my word is a awful idea! |
07:57:30 | FromDiscord | <Phil> Wouldn't have happened either way, I'm about to start work |
07:57:55 | FromDiscord | <Elegantbeef> "Sorry I need to do very important life altering research" |
09:04:06 | PMunch | Hmm, interesting. I somehow managed to get a SIGSEGV from a `nimfr_` statement.. |
09:04:20 | PMunch | http://ix.io/4MGk |
09:17:34 | PMunch | Hmm, what is nimfr_ actually? |
09:31:17 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix= |
09:32:05 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4MGq |
09:37:03 | FromDiscord | <ravinder387> why it didn't write gcc -c |
09:37:12 | FromDiscord | <ravinder387> why it avoid gcc -c |
09:38:40 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4MGt |
09:38:54 | FromDiscord | <ravinder387> how to compile this then create object file so that i can link it |
09:41:30 | Amun-Ra | add --nomain and point --nimcache to local directory, than compile and link all .c files |
09:42:33 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix= |
09:43:54 | FromDiscord | <ravinder387> i did.. but I don't able to compile nim generated c and link it |
09:44:22 | FromDiscord | <ravinder387> "nim generated c" cache dir |
09:47:53 | Amun-Ra | why not? |
11:20:17 | FromDiscord | <Phil> PMunch out there doing his best to break the nim programming language at its core |
11:20:29 | FromDiscord | <Phil> Instantiating variables that blow up the stack willy nilly |
11:22:43 | FromDiscord | <odexine> More of a limitation of the platform they’re using |
11:29:31 | * | azimut joined #nim |
11:52:36 | PMunch | @Phil, yeah it turns out I was just blowing the stack by creating an 8Mb variable :P |
11:53:15 | FromDiscord | <Phil> I would like to question how you get a single variable the size of 8 MB |
11:54:20 | PMunch | `array[32, array[32, tuple[x, y: int, p: set[uint16]]]]` |
11:54:23 | PMunch | Not that hard :P |
11:54:47 | PMunch | The set is of course what eats memory there, 8Kb per set |
11:55:42 | Amun-Ra | Phil: var x: array[8_000_000, byte] |
12:44:51 | PMunch | Holy shit, intsets are su much faster than set[uint16] as well! |
12:45:24 | PMunch | Had to turn off memoization because they don't have a hash proc, but even without it it's considerably aster! |
12:45:42 | FromDiscord | <odexine> perhaps it is expensive to index an array the size of a few kb |
12:45:50 | * | PMunch quit (Quit: Leaving) |
12:46:04 | * | PMunch joined #nim |
13:19:30 | * | cnx quit (Ping timeout: 245 seconds) |
13:27:54 | FromDiscord | <pmunch> Probably |
13:28:01 | * | cnx joined #nim |
13:28:07 | FromDiscord | <pmunch> Doesn't help that I have a couple `for x in mySet` in there as well |
13:33:09 | * | xet7 joined #nim |
13:46:16 | * | edr joined #nim |
13:49:24 | * | kenran` quit (Remote host closed the connection) |
13:57:56 | * | derpydoo joined #nim |
14:26:00 | FromDiscord | <shourchats> does nim have an any type? |
14:26:39 | PMunch | Kinda |
14:27:11 | FromDiscord | <shourchats> hmm |
14:27:28 | PMunch | https://play.nim-lang.org/#ix=4MHr |
14:31:23 | FromDiscord | <shourchats> also wdym by kinda lol |
14:31:29 | FromDiscord | <ravinder387> In reply to @PMunch "https://play.nim-lang.org/#ix=4MHr": it works.. send me another link |
14:31:43 | PMunch | Huh? |
14:33:04 | FromDiscord | <shourchats> 💀 |
14:34:28 | FromDiscord | <odexine> In reply to @shourchats "also wdym by kinda": it probably doesnt work as you would expect |
14:34:56 | FromDiscord | <shourchats> hmm |
14:35:01 | FromDiscord | <shourchats> ok |
14:36:02 | FromDiscord | <shourchats> how is echo defined |
14:36:22 | FromDiscord | <shourchats> can i find it's source? |
14:36:37 | FromDiscord | <odexine> https://nim-lang.org/docs/system.html#echo%2Cvarargs%5Btyped%2C%5D |
14:37:25 | FromDiscord | <ravinder387> do u know any company who provide nim programming consulting? |
14:37:31 | * | ox is now known as oz |
14:37:38 | FromDiscord | <odexine> no |
14:39:56 | PMunch | ravinder387, depends on what you need |
14:40:27 | PMunch | Some people in the community probably does on a small scale, and the Nim project itself offers support and such |
14:40:49 | FromDiscord | <ravinder387> is that true. if language share same feature then iterop become easy. for ex:- nim <--> vlang becoz they both static compiled , gc. than nim <--> C |
14:41:23 | FromDiscord | <ravinder387> In reply to @PMunch "<@1014948291806511245>, depends on what": thanks... do u know any people |
14:41:51 | PMunch | shourchats, I mean kinda as in you can't have a `var x: any`. It's more of a automatic generic parameter thing than an actual type |
14:42:49 | PMunch | ravinder387, well yes and no. Both having a GC for example could cause some trouble if the GCs start fighting each other |
14:43:12 | PMunch | But mixing Nim and C is easier than mixing Nim and Haskell I'd imagine |
14:43:29 | PMunch | Because the languages share more similarities |
14:43:51 | PMunch | ravinder387, try asking in the #jobs channel :) |
14:44:05 | FromDiscord | <ravinder387> In reply to @PMunch "But mixing Nim and": haskell is very difficult alone to understand. I can't think to mix it |
14:44:28 | FromDiscord | <ravinder387> nim <--> c but easier |
14:44:53 | FromDiscord | <shourchats> In reply to @PMunch "<@910186395463725188>, I mean kinda": ah |
14:45:11 | * | xet7 quit (Remote host closed the connection) |
14:52:04 | PMunch | Well mixing Nim and C is always possible |
14:52:16 | PMunch | Whoops, wrong channel |
14:54:53 | FromDiscord | <nnsee> but yet still surprisingly relevant to the discussion |
14:55:59 | FromDiscord | <shourchats> ha |
15:00:32 | PMunch | True :P |
15:00:43 | * | kenran joined #nim |
15:08:30 | PMunch | Most cursed embedded stack: One of these chips: https://www.waveshare.com/luckfox-pico-min.htm running Alpine Linux with only Python installed :P |
15:09:12 | FromDiscord | <bostonboston> <:ex_breakbad:772529788631384124> |
15:10:09 | PMunch | Damn it.. That was also intended or the embedded channel :P |
15:17:58 | * | PMunch quit (Quit: Leaving) |
15:24:43 | FromDiscord | <mratsim> In reply to @ravinder387 "do u know any": @_araq provides consulting,↵↵There used to be a get support on the website but I don't remember where |
16:01:06 | FromDiscord | <Clonkk> https://nim-lang.org/donate.html↵(@mratsim) |
16:01:11 | FromDiscord | <Clonkk> "Commercial support" |
16:11:00 | * | jmdaemon quit (Ping timeout: 268 seconds) |
16:42:17 | * | kenran quit (Remote host closed the connection) |
17:54:02 | NimEventer | New post on r/nim by cacheson: Launching the 2023 Nim Community Survey, see https://reddit.com/r/nim/comments/18622rf/launching_the_2023_nim_community_survey/ |
18:03:19 | * | azimut quit (Ping timeout: 240 seconds) |
18:07:21 | * | azimut joined #nim |
18:12:57 | * | rockcavera joined #nim |
18:18:57 | om3ga | How csources were generated? |
18:58:14 | FromDiscord | <nnsee> using nim |
18:58:39 | om3ga | hmm |
18:59:18 | om3ga | Which came first, the chicken or the egg? |
18:59:56 | FromDiscord | <alxhr0> sent a code paste, see https://play.nim-lang.org/#ix=4MJb |
19:00:19 | om3ga | I mean, modifying these csources for new os is not the best experience |
19:00:40 | FromDiscord | <alxhr0> sent a code paste, see https://play.nim-lang.org/#ix=4MJd |
19:00:52 | FromDiscord | <alxhr0> (edit) "https://play.nim-lang.org/#ix=4MJd" => "https://play.nim-lang.org/#ix=4MJe" |
19:01:30 | Amun-Ra | om3ga: the egg |
19:02:49 | om3ga | Amun-Ra, probably I need to see first commits? or code looks there the same? |
19:16:14 | FromDiscord | <nervecenter> In reply to @NimEventer "New post on r/nim": Done. |
19:35:00 | FromDiscord | <Chronos [She/Her]> Ugh I need the energy for my projects |
19:35:30 | Amun-Ra | Chronos: have you ever tried Red Bull? ;) |
19:35:54 | * | xet7 joined #nim |
19:40:25 | FromDiscord | <Chronos [She/Her]> Nope, I've had Monster energy drinks though |
19:40:29 | FromDiscord | <Chronos [She/Her]> And they make me sleepy |
19:40:34 | FromDiscord | <Chronos [She/Her]> Sleepy/calm |
19:40:42 | FromDiscord | <Elegantbeef> Cocaine! |
19:40:46 | FromDiscord | <Chronos [She/Her]> Not energised or hyper, hyper is my natural state of being |
19:40:51 | FromDiscord | <Elegantbeef> You'll have a lot of energy, but probably worse health if you take my joke suggestion. |
19:41:01 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "Cocaine!": I mean some ADHD meds are basically diet meth- |
19:44:37 | Amun-Ra | ;P |
19:47:52 | FromDiscord | <saint.___.> Anyone going to be doing advent of code in nim? |
19:48:07 | FromDiscord | <saint.___.> In reply to @chronos.vitaqua "I mean some ADHD": Some ADHD meds are actual meth |
19:48:38 | FromDiscord | <saint.___.> desoxyn |
20:00:31 | FromDiscord | <JJ> In reply to @saint.___. "Anyone going to be": yeah, a bunch. there's a couple of leaderboards: https://nim-lang.org/blog/2021/11/26/advent-of-nim-2021.html |
20:10:01 | FromDiscord | <Chronos [She/Her]> In reply to @saint.___. "Anyone going to be": Perhaps, not sure |
20:12:15 | FromDiscord | <Chronos [She/Her]> In reply to @saint.___. "Some ADHD meds are": Not surprised oof |
20:20:38 | FromDiscord | <saint.___.> Awesome! |
20:21:00 | FromDiscord | <saint.___.> In reply to @omentic "yeah, a bunch. there's": Awesome |
20:21:01 | FromDiscord | <saint.___.> (edit) "Awesome" => "Awesome!" |
20:31:49 | FromDiscord | <saint.___.> In reply to @Amun-Ra "Chronos: have you ever": Redbull and monster are both great but I quit caffeine, almost a year |
20:31:51 | FromDiscord | <saint.___.> Can sleep a lot better |
20:32:16 | FromDiscord | <saint.___.> Was never super big into it but just thought I should take an effort to cut it out completely |
20:58:07 | FromDiscord | <bostonboston> Can object variants not have default values? |
21:07:48 | FromDiscord | <bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4MK2 |
21:07:58 | FromDiscord | <bostonboston> Wow that did not paste nicely |
21:09:50 | FromDiscord | <bostonboston> Anyways this errors with "the TimeBase type doesn't have a default value. The following fields must be initialized: timebaseBits." |
21:10:47 | FromDiscord | <Elegantbeef> I assume object variants do not work with strict defs, but idk |
21:11:49 | FromDiscord | <Elegantbeef> Unrelated but you do not need commas for enums |
21:11:59 | FromDiscord | <Elegantbeef> Enums are fine with newline seperated fields |
21:14:52 | * | end quit (Quit: end) |
21:16:35 | FromDiscord | <bostonboston> That's good to hear, I've been paranoid all this time |
21:19:29 | * | end joined #nim |
21:23:47 | * | bcksl quit (Quit: \) |
21:28:08 | * | bcksl joined #nim |
21:37:49 | * | rockcavera quit (Ping timeout: 255 seconds) |
21:41:34 | NimEventer | New thread by arnetheduck: Nlvm 1.6.16 - now with a REPL, see https://forum.nim-lang.org/t/10697 |
21:42:53 | * | rockcavera joined #nim |
21:45:10 | * | casaca quit (Read error: Connection reset by peer) |
21:45:36 | * | casaca joined #nim |
21:46:01 | * | henrytill quit (Read error: Connection reset by peer) |
21:46:01 | * | oddish quit (Read error: Connection reset by peer) |
21:46:01 | * | mronetwo quit (Read error: Connection reset by peer) |
21:46:01 | * | casaca quit (Read error: Connection reset by peer) |
21:46:01 | * | noeontheend quit (Read error: Connection reset by peer) |
21:46:02 | * | adigitoleo quit (Read error: Connection reset by peer) |
21:46:14 | * | adigitoleo joined #nim |
21:46:16 | * | oddish joined #nim |
21:46:17 | * | mronetwo joined #nim |
21:46:54 | * | henrytill joined #nim |
21:47:00 | * | noeontheend joined #nim |
21:47:00 | * | casaca joined #nim |
21:49:19 | * | azimut quit (Ping timeout: 240 seconds) |
21:50:04 | * | azimut joined #nim |
21:50:56 | * | azimut quit (Remote host closed the connection) |
21:51:26 | * | azimut joined #nim |
21:53:04 | * | advesperacit quit () |
21:54:19 | * | azimut quit (Remote host closed the connection) |
21:54:56 | * | azimut joined #nim |
21:55:53 | * | azimut quit (Remote host closed the connection) |
21:56:23 | * | azimut joined #nim |
22:03:25 | FromDiscord | <guttural666> quick question, how is this proc called if the docs look like this: https://media.discordapp.net/attachments/371759389889003532/1179180771253166224/image.png?ex=6578d8ab&is=656663ab&hm=aa376f37c8258b25340eaae365b6627cff7feba56cf559ab547a57b9ba10eced& |
22:04:21 | FromDiscord | <Elegantbeef> `myFut.callBack = proc(_: Future[T]) = discard` |
22:10:46 | FromDiscord | <guttural666> then I had the right idea, thanks |
22:25:59 | FromDiscord | <bostonboston> I love that syntax |
22:40:37 | FromDiscord | <guttural666> has the Nim plugin for Vscode stopped working for anybody? |
22:42:44 | FromDiscord | <bostonboston> Don't think so |
22:43:17 | FromDiscord | <guttural666> just stopped highlighting errores |
22:43:21 | FromDiscord | <guttural666> (edit) "errores" => "errors" |
22:44:07 | FromDiscord | <bostonboston> If you compile what happens |
22:44:48 | FromDiscord | <bostonboston> For me when I'm using templates and there's errors their expansion usually halts other errors from being shown |
22:45:08 | * | lucasta joined #nim |
22:46:45 | FromDiscord | <guttural666> https://media.discordapp.net/attachments/371759389889003532/1179191678033211472/image.png?ex=6578e2d4&is=65666dd4&hm=570161dc4008f6c348ea89a3239c26b51c2bf400b2dad5f81c609bae1158d2e0& |
22:47:47 | FromDiscord | <guttural666> I compile with -d:ssl |
22:49:21 | FromDiscord | <intellij_gamer> Have you made a HTTP client be a const? (Or tried to make a request in a static context?) |
22:51:39 | FromDiscord | <guttural666> I included it in a Scheduler object to not have to initialize a new one every time yeah |
22:54:32 | FromDiscord | <intellij_gamer> Ah thats a no can do↵Since it requires C stuff it can't run at compile time (think thats what libffi is for but I've never used it) |
22:55:25 | FromDiscord | <guttural666> hm, yeah just reverted that and now it complains again as it should |
22:55:27 | FromDiscord | <guttural666> thanks! |
23:30:34 | FromDiscord | <guttural666> can somebody explain why I had to add gcsafe here and what the implications are for fulfilling that on the call site? https://media.discordapp.net/attachments/371759389889003532/1179202704011182133/image.png?ex=6578ed19&is=65667819&hm=679da5b616fa4ca959903058bb2af9c1c7c67387a2235a1180a116c1ce4f7175& |
23:31:16 | FromDiscord | <guttural666> (edit) "on" => "at" |
23:31:56 | FromDiscord | <guttural666> maybe to do with threading? |
23:38:22 | FromDiscord | <Elegantbeef> Cause the callback needs to be gcsafe, yes it's in relation to threading, but `gcsafe` is apart of type matching |
23:38:23 | FromDiscord | <Elegantbeef> As such a proc without gcsafe is not the same as a proc with it |
23:45:46 | FromDiscord | <guttural666> what would make my callback gcsafe? no ref allocations? |
23:46:20 | FromDiscord | <guttural666> I just want to take the result, parse it and commit the parsed result to the database |
23:47:10 | * | jmdaemon joined #nim |
23:47:11 | FromDiscord | <guttural666> or: will the compiler complain if I pass a proc in that is not in fact gcsafe, so I can just wait and find out 😛 |
23:53:04 | NimEventer | New thread by icedquinn: Custom pragmas are not supported for enum fields, see https://forum.nim-lang.org/t/10698 |