00:00:41 | FromDiscord | <Elegantbeef> Well i noticed you're yielding `ptr T` |
00:10:02 | FromDiscord | <aHaquer> Nim research stream https://www.twitch.tv/mttaggart |
00:16:26 | FromDiscord | <lenis> In reply to @Elegantbeef "Well i noticed you're": I don't remember if dereferencing makes a copy or not |
00:17:30 | FromDiscord | <Elegantbeef> It creates a L-value but yes if `var a = b[]` it'll copy |
00:20:48 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3D0b |
00:23:40 | FromDiscord | <lenis> that makes sense |
00:23:54 | FromDiscord | <lenis> still dont know which is better |
00:24:03 | FromDiscord | <lenis> sent a code paste, see https://play.nim-lang.org/#ix=3D0d |
00:24:43 | FromDiscord | <Elegantbeef> Well the second is more composable |
00:24:56 | FromDiscord | <Elegantbeef> you can do `nativeArray(p, count).doOtherThing` |
00:25:53 | FromDiscord | <lenis> except `var myVar = batuveArray(p, count)` lol |
00:25:57 | FromDiscord | <Elegantbeef> You can pass the result from `nativeArray` to any proc that takes `openArray[T]` |
00:26:00 | FromDiscord | <lenis> but yeah, I get what you mean |
00:26:20 | FromDiscord | <Elegantbeef> Sure but you can do `import std/sequtils; var myVar = nativeArray(p, count).toSeq` |
00:26:48 | FromDiscord | <lenis> that would make a copy though |
00:26:52 | FromDiscord | <lenis> but fair enough |
00:27:26 | FromDiscord | <Elegantbeef> Well if you dont want a copy just cast the pointer to a UncheckedArray |
00:27:30 | FromDiscord | <lenis> actually toOpenArray probably makea a copy too |
00:27:37 | FromDiscord | <Elegantbeef> Nope |
00:27:49 | FromDiscord | <Elegantbeef> toOpenArray takes a ptr to the first element and a start/end index |
00:28:25 | FromDiscord | <lenis> and it just iterates until it reaches the last element then? |
00:28:58 | FromDiscord | <lenis> I see what you mean |
00:29:17 | FromDiscord | <Elegantbeef> Well openArray is just a conversion to a type that internally holds I guess it doesnt take a start/end just a number of elements |
00:29:43 | FromDiscord | <Elegantbeef> pointer to start of your slice and amount of values after it |
00:29:59 | FromDiscord | <lenis> yeah, I see |
00:30:08 | FromDiscord | <lenis> thanks for the insight again haha |
00:31:05 | FromDiscord | <Elegantbeef> With view types you'd be able hold onto that open array afaik, but views is experimental |
01:09:23 | * | Egeon quit (Ping timeout: 264 seconds) |
01:10:42 | * | Egeon joined #nim |
01:16:32 | * | neurocyte0132889 quit (Ping timeout: 260 seconds) |
01:46:53 | * | tiorock joined #nim |
01:46:54 | * | tiorock quit (Changing host) |
01:46:54 | * | tiorock joined #nim |
01:46:54 | * | rockcavera is now known as Guest4264 |
01:46:54 | * | tiorock is now known as rockcavera |
01:50:07 | * | Guest4264 quit (Ping timeout: 260 seconds) |
02:24:01 | * | vicfred quit (Quit: Leaving) |
03:15:29 | NimEventer | New thread by Dabod: How to prevent return value from been`=copy`ed?, see https://forum.nim-lang.org/t/8549 |
03:33:21 | * | rockcavera quit (Remote host closed the connection) |
03:49:22 | * | Aherin quit (Remote host closed the connection) |
03:49:44 | * | Aherin joined #nim |
03:54:10 | FromDiscord | <ruki> Hi every one, I have made xmake to support nimble packages now on dev branch. we can use xmake to build nim project with nimble packages and native/c++ packages from vcpkg/conan/xmake-repo https://github.com/xmake-io/xmake/issues/1756#issuecomment-952513334 |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:39:52 | FromDiscord | <NullCode1337> so like |
04:39:59 | FromDiscord | <NullCode1337> i wanna port some of my nim programs to android |
04:40:08 | FromDiscord | <NullCode1337> but i have never done that before |
04:40:19 | FromDiscord | <NullCode1337> do i need to use the Android NDK for this? |
04:41:12 | FromDiscord | <NullCode1337> https://stackoverflow.com/questions/35942746/porting-c-application-to-android-using-ndk |
04:42:02 | FromDiscord | <Yardanico> In reply to @NullCode1337 "i wanna port some": depends on what you mean by that |
04:42:22 | FromDiscord | <Yardanico> if you just want to run them on android without any kind of UI then they'll probably compile out of the box with Termux |
04:45:15 | FromDiscord | <NullCode1337> In reply to @Yardanico "if you just want": yeah i want to do just that |
04:45:20 | FromDiscord | <Yardanico> then just use termux |
04:45:23 | FromDiscord | <NullCode1337> but termux 💀 |
04:45:25 | FromDiscord | <Yardanico> what? |
04:45:29 | FromDiscord | <NullCode1337> can i not do it on pc |
04:45:34 | FromDiscord | <Yardanico> ??? |
04:45:39 | FromDiscord | <Yardanico> you want to run your nim apps on android |
04:45:42 | FromDiscord | <NullCode1337> In reply to @Yardanico "what?": simply put, i hate it |
04:45:44 | FromDiscord | <Yardanico> and if you don't want UI then you'll have to use termux |
04:45:56 | FromDiscord | <Yardanico> why hate though? it's a really good linux environment and has a lot of packages in the repos |
04:46:17 | FromDiscord | <NullCode1337> In reply to @Yardanico "and if you don't": i want to be able to run it with other terminal emulators too |
04:46:23 | FromDiscord | <NullCode1337> you know the ones that actually take 2mb |
04:46:27 | FromDiscord | <NullCode1337> and not 420++mb |
04:46:32 | FromDiscord | <Yardanico> meh, termux isn't that big |
04:46:42 | FromDiscord | <NullCode1337> it was that big for me |
04:46:46 | FromDiscord | <NullCode1337> lmao |
04:46:48 | FromDiscord | <Yardanico> but ok, if you want that, then make a statically linked binary for armv7 and aarch64 |
04:46:56 | FromDiscord | <Yardanico> you don't need ndk for that |
04:47:03 | FromDiscord | <NullCode1337> i see |
04:47:32 | FromDiscord | <Yardanico> but of course if your app uses openssl or something else except the standard C library you'll have to spend a bit more effort |
04:47:40 | FromDiscord | <Yardanico> to statically link openssl (or libressl) and other stuff you might be using |
04:47:50 | FromDiscord | <Yardanico> for easy cross compilation you can even use something like zig-cc which can make it really easy to statically link with musl for a lot of architectures |
05:33:40 | * | xet7 quit (Remote host closed the connection) |
05:34:26 | * | xet7 joined #nim |
06:22:35 | FromDiscord | <Imperatorn> Nim async/await = eternal happiness? Or is there something I should be aware of.↵Especially coming from C# |
06:23:05 | FromDiscord | <impbox [ftsf]> you might be awaiting eternal happiness |
06:23:13 | nrds | <Prestige99> Hah |
06:23:38 | FromDiscord | <Imperatorn> Hehe |
06:23:41 | FromDiscord | <impbox [ftsf]> async/await is pretty cool though |
06:23:59 | FromDiscord | <impbox [ftsf]> i rarely use it, and when i do i'm usually confused =p |
06:25:08 | FromDiscord | <Imperatorn> Also if I have a sync proc and want to go to async one = pain? |
06:25:12 | FromDiscord | <Rika> no |
06:25:24 | FromDiscord | <Rika> waitFor will make async proc into sync |
06:25:28 | FromDiscord | <Imperatorn> no for happiness or pain |
06:25:40 | FromDiscord | <Rika> not very painful |
06:26:12 | FromDiscord | <impbox [ftsf]> i think of `await` and `waitFor` to be synonyms so that's probably why i find it confusing |
06:26:26 | FromDiscord | <Rika> they are synonyms for different environments |
06:26:36 | FromDiscord | <Rika> you use await in {.async.} procs |
06:26:42 | FromDiscord | <Rika> you use waitFor for sync procs |
06:26:50 | FromDiscord | <Rika> you get async with await |
06:26:55 | FromDiscord | <Rika> you dont with waitFor |
06:27:00 | FromDiscord | <Rika> the end |
06:28:14 | FromDiscord | <impbox [ftsf]> thanks for explaining |
06:28:24 | FromDiscord | <impbox [ftsf]> hopefully i remember next time i use that stuff =) |
06:28:47 | madprops | what's the point of nimskull? |
06:29:22 | FromDiscord | <Elegantbeef> My understanding is it's all in macro so stack traces can be iffy |
06:29:22 | FromDiscord | <Elegantbeef> I havent used it much though |
06:30:14 | FromDiscord | <Elegantbeef> How is everyone stumbling on nimskull? |
06:30:40 | madprops | i follow you on github and you forked it |
06:31:25 | FromDiscord | <Elegantbeef> It's a compiler fork that's it |
06:34:36 | FromDiscord | <Rika> what is it supposed to be |
06:35:42 | FromDiscord | <Rika> oh cool |
06:36:00 | FromDiscord | <Elegantbeef> A fork that doesnt care about the past, allowing syntax/language changes |
06:36:39 | FromDiscord | <Rika> wow |
06:36:42 | FromDiscord | <Rika> wow |
06:36:45 | FromDiscord | <Rika> i like it |
06:37:30 | FromDiscord | <Rika> the name fits you too beef |
06:37:39 | FromDiscord | <Elegantbeef> It's not mine though 😀 |
06:37:47 | FromDiscord | <Rika> darn |
06:37:52 | FromDiscord | <Rika> would have been cool |
06:38:25 | FromDiscord | <Rika> do you think you can make a language that can easily intertwine Result[S,F] with exceptions i do wonder |
06:40:22 | FromDiscord | <haxscramper> Well, the description is not entirely correct, it is more about embracing dialog in language evolution design, not being held down by status or ossified codebase that is decade old, having proper specs |
06:41:36 | FromDiscord | <Rika> hax are you part of this |
06:41:40 | FromDiscord | <Rika> would be amazing |
06:42:33 | FromDiscord | <haxscramper> More or less |
06:43:08 | FromDiscord | <haxscramper> And also axing tons of ancient hacks like nimsuggest, replacing it with LSP, because LSP simply won |
06:43:50 | FromDiscord | <Rika> nice, how does that work? |
06:44:11 | FromDiscord | <Rika> does it still have semantic highlighting? |
06:44:25 | FromDiscord | <Rika> rather is it planned |
06:45:47 | FromDiscord | <haxscramper> We haven't discussed exact details yet, and at this point it is mostly about figuring out where to aim and what are our priorities |
06:46:03 | FromDiscord | <haxscramper> You know, exact thing we can't hear from nim core devs |
06:46:20 | FromDiscord | <haxscramper> Yes, salt overload |
06:46:21 | FromDiscord | <Rika> do you have a chat room for this, irc matrix whichever |
06:47:14 | FromDiscord | <haxscramper> Mhm no, at the moment not really |
06:49:38 | FromDiscord | <haxscramper> We will most likely make a matrix space for it later on |
07:01:10 | FromDiscord | <xflywind> it seems that krux02 is implementing a Nim-like language https://github.com/krux02/golem/blob/master/demo.golem |
07:02:21 | FromDiscord | <haxscramper> There is also a design document - recommend to read it https://github.com/krux02/golem/blob/master/ideas.org |
07:02:48 | FromDiscord | <xflywind> the ideas look interesting; I read it before. |
07:03:47 | FromDiscord | <xflywind> I really like a small core powered by macros |
07:05:30 | FromDiscord | <Rika> `Don’t unify :: and .` hmm |
07:05:45 | FromDiscord | <Rika> so packages/namespaces use :: which sounds like a good thing |
07:06:11 | FromDiscord | <Rika> i think the matrix room should be made soon, so we dont clobber here |
07:06:44 | FromDiscord | <xflywind> An ideal language for me is like Rust-- + ORC with Nim style |
07:07:03 | FromDiscord | <impbox [ftsf]> or create a #treason channel =p |
07:07:54 | FromDiscord | <Imperatorn> What does Nim offer in terms of metaprogramming and/or compile time features?↵↵For example in D I use static if to differentiate between paths at compile time and mixin to compile strings and mix them in |
07:08:08 | FromDiscord | <Rika> In reply to @Imperatorn "What does Nim offer": same stuff's here |
07:08:10 | FromDiscord | <Imperatorn> Macros? |
07:08:12 | FromDiscord | <Rika> yes |
07:08:14 | FromDiscord | <Rika> AST ones even |
07:09:55 | FromDiscord | <Elegantbeef> Nim has an VM which means you can do quite a lot at compile time |
07:10:13 | FromDiscord | <impbox [ftsf]> it's pretty cool ( '')b |
07:10:20 | FromDiscord | <Elegantbeef> There are things like Zippy which let you archive directories/files at compile time and store them in the binary/next to |
07:10:20 | FromDiscord | <Rika> beef about to shill his package again |
07:10:34 | FromDiscord | <Elegantbeef> Nah they didnt ask about runtime scripting |
07:10:48 | FromDiscord | <Imperatorn> Taking a quick look through the docs, I see static:, is that like do this at compile time in general? |
07:10:54 | FromDiscord | <Elegantbeef> Yes |
07:11:05 | FromDiscord | <impbox [ftsf]> generics are very good |
07:11:10 | FromDiscord | <Imperatorn> So a static echo would be like a pragma msg? |
07:11:13 | FromDiscord | <Imperatorn> I see |
07:11:17 | FromDiscord | <Elegantbeef> a static type is a generic type that is static, a static block is run at compile time |
07:11:17 | FromDiscord | <impbox [ftsf]> i love generics <3 |
07:11:47 | FromDiscord | <Rika> generics make so many things nicer |
07:12:07 | FromDiscord | <Elegantbeef> so you can do `type Thing[static int] = object` and do `assert Thing[300]() isnot Thing[400]()` |
07:12:23 | FromDiscord | <Imperatorn> What are the restrictions on what I can evaluate at compile time? |
07:12:35 | FromDiscord | <Elegantbeef> Pure nim that doesnt rely on importc |
07:12:40 | FromDiscord | <Imperatorn> In D we call it ctfe, what is the similar term I should use in Nim? |
07:12:52 | FromDiscord | <Elegantbeef> compile time evaluation is generally what i call it or CTE |
07:12:58 | FromDiscord | <Imperatorn> (Compile-Time Function Evaluation) |
07:13:00 | FromDiscord | <impbox [ftsf]> no casting? or am i rememberong? |
07:13:09 | FromDiscord | <Elegantbeef> It can cast just not all low level casts |
07:13:15 | FromDiscord | <haxscramper> Limited casting |
07:13:29 | FromDiscord | <Elegantbeef> You can cast ordinals just not bitwise cast an object or pointer |
07:13:33 | FromDiscord | <haxscramper> Also there are some limitations with inheritance IIRC |
07:13:33 | FromDiscord | <Imperatorn> Ok, so just as a silly example |
07:13:59 | FromDiscord | <Imperatorn> Let's say I want at compile time to do exponentiation. I already have a function doing that at runtime |
07:14:04 | FromDiscord | <Rika> yes |
07:14:11 | FromDiscord | <Imperatorn> What magic do I have to do in Nim to enable that |
07:14:13 | FromDiscord | <Rika> most likely possible |
07:14:16 | FromDiscord | <Rika> nothing, just call it |
07:14:20 | FromDiscord | <Elegantbeef> you just call it |
07:14:26 | FromDiscord | <Elegantbeef> `const youConst = yourProc()` |
07:14:30 | FromDiscord | <Elegantbeef> You've done CTE! |
07:14:31 | FromDiscord | <impbox [ftsf]> unless it's using libm to do it |
07:14:33 | FromDiscord | <Imperatorn> const is the magic then right? |
07:14:41 | FromDiscord | <Imperatorn> The qualifier |
07:14:47 | FromDiscord | <Rika> const just means compile time "variable" |
07:14:47 | FromDiscord | <Elegantbeef> Well not "magic" it just says "it has to run at compile time" |
07:14:54 | FromDiscord | <Imperatorn> Yes |
07:14:56 | FromDiscord | <Rika> const let var |
07:14:59 | FromDiscord | <Rika> the triad |
07:15:03 | FromDiscord | <Elegantbeef> You can also do `var a = static(yourProc())` iirc |
07:15:05 | FromDiscord | <Imperatorn> Holy |
07:15:35 | FromDiscord | <Imperatorn> Nice, so in general I can do const somthing = runtimeFunction() and evaluate it at CT? |
07:15:50 | FromDiscord | <Rika> "runtimefunction" doesnt really make sense |
07:16:02 | FromDiscord | <impbox [ftsf]> but yes, you don't need to create a separate compile time version |
07:16:07 | FromDiscord | <Imperatorn> It's an example ofc from languages like C |
07:16:14 | FromDiscord | <Elegantbeef> A proc is a proc, if it doesnt derive from static it works in both places |
07:16:23 | FromDiscord | <Imperatorn> I see |
07:16:24 | FromDiscord | <Elegantbeef> does derive from statc\ |
07:16:36 | FromDiscord | <Rika> if a proc doesnt rely on anything from the actual runtime environment then you can use it in cte |
07:16:37 | FromDiscord | <Elegantbeef> So if it doesnt use importc or use runtime values it can be used in both places |
07:16:48 | FromDiscord | <Elegantbeef> Nim's got an entire VM |
07:17:01 | FromDiscord | <Rika> nim compiler compiled by the vm when |
07:17:12 | * | pch quit (Remote host closed the connection) |
07:17:36 | FromDiscord | <impbox [ftsf]> running on a VM |
07:17:37 | FromDiscord | <Imperatorn> importc? lol that's what we call our ANSI C11 compiler in D 🙂 |
07:18:15 | FromDiscord | <Elegantbeef> Now to shill my library rika, see it's a proper VM it even can be used for scripting 😛 https://streamable.com/9zr8w4 |
07:18:16 | FromDiscord | <Imperatorn> Wait, can Nim compilation be deferred? I thought it was always compiled to native |
07:18:22 | FromDiscord | <Rika> fuck you beef |
07:18:22 | FromDiscord | <Imperatorn> (Nim noob here) |
07:18:23 | FromDiscord | <Rika> lmfao |
07:18:23 | * | pch joined #nim |
07:18:35 | FromDiscord | <Rika> In reply to @Imperatorn "Wait, can Nim compilation": i mean |
07:18:48 | FromDiscord | <Rika> deferred like how? |
07:18:59 | FromDiscord | <Rika> JIT? no theres nothing implementing that yet afail |
07:19:00 | FromDiscord | <Rika> (edit) "afail" => "afaik" |
07:19:03 | FromDiscord | <Imperatorn> JIT |
07:19:03 | FromDiscord | <Elegantbeef> It has a C/C++/Js backend/VM so you can use it as a compiled language or a scripting language |
07:19:04 | FromDiscord | <Imperatorn> Ok |
07:19:08 | FromDiscord | <Rika> but i assume it can be implemented |
07:19:15 | FromDiscord | <Rika> just not with the C backend |
07:19:18 | FromDiscord | <Imperatorn> Not something I need, just curious |
07:19:26 | FromDiscord | <Elegantbeef> Not ever really going to get a JIT probably |
07:19:31 | FromDiscord | <Rika> maybe if someone makes a JVM backend lmfao |
07:19:44 | FromDiscord | <Imperatorn> Speaking of backends |
07:19:46 | FromDiscord | <Elegantbeef> Lol |
07:19:46 | FromDiscord | <Rika> oh no i just said something cursed now someones gonna make one |
07:19:49 | FromDiscord | <Imperatorn> Which does Nim support? LLVM? |
07:19:53 | FromDiscord | <Rika> C |
07:19:54 | FromDiscord | <Rika> lol |
07:19:58 | FromDiscord | <Elegantbeef> I just listed them |
07:19:59 | FromDiscord | <Imperatorn> C done |
07:20:02 | FromDiscord | <Rika> C[++] js |
07:20:03 | FromDiscord | <Elegantbeef> It outputs C/C++/Js |
07:20:11 | FromDiscord | <Rika> there is a third party LLVM backend |
07:20:32 | FromDiscord | <Rika> but the c backend is already a huge plus for a lot of people |
07:20:52 | FromDiscord | <Imperatorn> Ok, remember I'm Nim noob. Been programming for about 9000 years but not Nim. It sure does look nice tho |
07:21:00 | * | pro joined #nim |
07:21:05 | FromDiscord | <Rika> damn man's 9020 years old |
07:21:20 | FromDiscord | <Imperatorn> I guess that means Nim can be used on embedded as well then |
07:21:24 | FromDiscord | <Rika> yes |
07:21:29 | FromDiscord | <Rika> im planning to actually, and many have alreadu |
07:21:30 | FromDiscord | <Imperatorn> I'm 9035 years old |
07:21:32 | FromDiscord | <Rika> (edit) "alreadu" => "already" |
07:21:37 | FromDiscord | <Rika> damn even older |
07:21:39 | FromDiscord | <Imperatorn> Ok, sweet |
07:21:49 | FromDiscord | <Imperatorn> It's just a number bro |
07:22:03 | FromDiscord | <Rika> police |
07:22:31 | FromDiscord | <Rika> anyway what other questions do you have lol |
07:22:46 | FromDiscord | <Imperatorn> Thousands |
07:22:47 | FromDiscord | <Imperatorn> But |
07:22:57 | FromDiscord | <Rika> lets hear em |
07:22:59 | FromDiscord | <Imperatorn> Duty calls! 🦸♂️ |
07:23:09 | FromDiscord | <Rika> damn |
07:23:25 | FromDiscord | <Imperatorn> Well, I guess I have time for one more |
07:23:31 | FromDiscord | <Imperatorn> Will Nim save my life? |
07:23:48 | FromDiscord | <Imperatorn> silence intensifies |
07:24:20 | FromDiscord | <Rika> oh no |
07:24:25 | FromDiscord | <Imperatorn> Ok, guess not. Anyway ttyl guys :nim1: |
07:24:26 | FromDiscord | <Rika> i dont know |
07:24:28 | FromDiscord | <Rika> see you |
07:28:35 | * | pro quit (Quit: WeeChat 3.3) |
07:29:05 | FromDiscord | <impbox [ftsf]> one day when nim is running life support systems |
07:32:08 | Amun-Ra | hmm, I'm surprised js backend defines "gcc" |
07:37:20 | * | pch quit (Remote host closed the connection) |
07:38:13 | * | pch_ joined #nim |
08:01:09 | PMunch | Lots of good questions from that @Imperatorn person |
08:01:17 | PMunch | Hopefully they stick around |
08:01:36 | PMunch | Amun-Ra, uhm, it shouldn't |
08:07:36 | * | casionaut joined #nim |
08:10:21 | Amun-Ra | PMunch: I tried to use endians module (which shouldn't work anyway bc copyMem) and it reported an error in line when useBuiltinSwap is true |
08:11:44 | Amun-Ra | https://play.nim-lang.org/#ix=3D2p |
08:14:32 | PMunch | Huh, interesting |
08:14:35 | PMunch | That's odd |
08:14:56 | PMunch | Definitely seems like a bug |
08:15:20 | Amun-Ra | I'll check if there something related in open ones |
09:00:06 | FromDiscord | <fishcakenine> I am trying to use wgpu-native with nim via c2nim. There are a bunch of struct forward declaration in webgpu.h that are only returned from function but their field are never directly accessed ( I think) how would I write bindings for that? For example https://github.com/webgpu-native/webgpu-headers/blob/4b4dbc3253ba03a1a7b7c42e18cead9dfc1142b8/webgpu.h#L64 returns undeclared identifier\: 'WGPUAdapterImpl' when using c2nim and complin |
09:01:20 | Amun-Ra | type WGPUAdapterImpl = object; type WGPUAdapter = ptr WGPUAdapterImpl; |
09:07:25 | Amun-Ra | I'd add pure and incompleteStruct pragmas to first def |
09:13:12 | * | pch_ quit (Remote host closed the connection) |
09:14:20 | * | pch joined #nim |
09:17:56 | NimEventer | New post on r/nim by lexiq_baeb: Nim vs Python: json serialization performance, see https://reddit.com/r/nim/comments/qgsknw/nim_vs_python_json_serialization_performance/ |
09:24:54 | FromDiscord | <Rika> oh man |
09:24:56 | FromDiscord | <Rika> not this again |
09:25:06 | supakeen | AGAIN |
09:25:36 | FromDiscord | <Elegantbeef> This time it wasnt a `-d:release` so it's kool |
09:30:06 | * | PMunch quit (Ping timeout: 260 seconds) |
09:37:48 | * | xet7 quit (Read error: Connection reset by peer) |
09:42:07 | * | PMunch joined #nim |
09:50:38 | * | PMunch quit (Ping timeout: 260 seconds) |
09:55:03 | * | xet7 joined #nim |
10:05:26 | NimEventer | New thread by Archnim: AI in Nim , see https://forum.nim-lang.org/t/8550 |
10:15:47 | * | casionaut quit (Remote host closed the connection) |
10:17:38 | FromDiscord | <r2> are older (1.4) docs available in html somewhere? |
10:20:04 | FromDiscord | <Yardanico> In reply to @r2 "are older (1.4) docs": https://nim-lang.org/1.4.8/strutils.html for example |
10:20:37 | FromDiscord | <Yardanico> Or you can always build them locally from the 1.4 branch |
10:21:55 | * | PMunch joined #nim |
10:29:57 | FromDiscord | <r2> @Yardanico Thanks! |
10:33:11 | PMunch | Hmm, 1.6 bug? Error: unhandled exception: liftdestructors.nim(550, 14) `t.destructor != nil` [AssertionDefect] |
10:41:30 | NimEventer | New thread by Serge: How to pass a "plain type" to a proc that expects a "ref type" in Nim ?, see https://forum.nim-lang.org/t/8551 |
10:41:42 | PMunch | Nope, error still exists in 1.4.8 |
10:42:24 | FromDiscord | <Yardanico> Looks like it, compiler crash |
10:42:35 | FromDiscord | <Yardanico> A regression is not fun |
10:44:46 | PMunch | Any idea what the error might mean? |
10:45:59 | * | Egeon quit (Ping timeout: 264 seconds) |
10:46:06 | * | PSEP1 joined #nim |
10:46:27 | FromDiscord | <shirleyquirk> In reply to @Elegantbeef "Now to shill my": This looks so perfect for the project i'm working on; would you be willing to share access? |
10:47:23 | FromDiscord | <Rika> In reply to @shirleyquirk "This looks so perfect": Why not just fork and PR? |
10:47:31 | FromDiscord | <Yardanico> @PMunch a bug in the compiler related to destructors/ARC |
10:47:42 | FromDiscord | <shirleyquirk> the repo seems invisible; i thought maybe it was private |
10:47:54 | PMunch | @Yardanico, yeah I was able to gather as much from the error message |
10:48:12 | FromDiscord | <haxscramper> There are more people being confused about nim 'ref' vs cxx 'ref'↵(<@709044657232936960_=4eim=45venter=5b=49=52=43=5d>) |
10:48:19 | FromDiscord | <shirleyquirk> beef331/nicoscript? |
10:48:22 | FromDiscord | <haxscramper> At least it is the third one in a couples ot days |
10:48:46 | FromDiscord | <Rika> Isn’t it just https://github.com/beef331/nimscripter |
10:48:47 | PMunch | It's this isn't it? https://github.com/beef331/nimscripter |
10:49:08 | * | Vladar joined #nim |
10:49:25 | PMunch | Damn @Rika, same time :P |
10:49:33 | FromDiscord | <Rika> Lol |
10:50:05 | FromDiscord | <shirleyquirk> aha. cheers guys |
10:51:14 | FromDiscord | <shirleyquirk> that `import nicoscript` threw me |
11:12:10 | * | arkurious joined #nim |
11:12:18 | * | Aherin quit (*.net *.split) |
11:12:19 | * | elph quit (*.net *.split) |
11:12:19 | * | FromDiscord quit (*.net *.split) |
11:12:19 | * | madprops quit (*.net *.split) |
11:12:19 | * | jkl quit (*.net *.split) |
11:12:20 | * | notchris quit (*.net *.split) |
11:14:20 | * | PSEP1 quit (Ping timeout: 260 seconds) |
11:14:34 | * | Egeon joined #nim |
11:15:31 | * | Aherin joined #nim |
11:15:31 | * | elph joined #nim |
11:15:31 | * | FromDiscord joined #nim |
11:15:31 | * | madprops joined #nim |
11:15:31 | * | jkl joined #nim |
11:15:31 | * | notchris joined #nim |
11:28:34 | FromDiscord | <impbox [ftsf]> Nicoscript is an experiment using nimscripter in nico |
11:28:43 | FromDiscord | <impbox [ftsf]> Works very nicely! |
11:44:03 | * | PSEP1 joined #nim |
11:45:12 | * | def-- joined #nim |
11:45:38 | * | Mister_Magister_ joined #nim |
11:45:55 | * | Lord_Nightmare2 joined #nim |
11:46:36 | * | oprypin_ joined #nim |
11:46:37 | * | MightyJoe joined #nim |
11:50:37 | FromDiscord | <shirleyquirk> it looks lush, having an example to start with is always great. but it seems like I should've grabbed it last year when @ElegantBeef had it public. |
11:52:27 | * | Egeon quit (*.net *.split) |
11:52:27 | * | xet7 quit (*.net *.split) |
11:52:27 | * | cyraxjoe quit (*.net *.split) |
11:52:27 | * | oprypin quit (*.net *.split) |
11:52:28 | * | Mister_Magister quit (*.net *.split) |
11:52:28 | * | Lord_Nightmare quit (*.net *.split) |
11:52:28 | * | def- quit (*.net *.split) |
11:52:28 | * | arkanoid quit (*.net *.split) |
11:52:28 | * | Mister_Magister_ is now known as Mister_Magister |
11:52:28 | * | def-- is now known as def- |
11:52:29 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
11:53:06 | * | arkanoid joined #nim |
11:59:37 | * | xet7 joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:39:57 | PMunch | Hmm, this is annoying.. |
12:40:22 | PMunch | That compiler bug prevents me from building with --gc:arc -d:useMalloc so I can't Valgrind my code :( |
12:44:19 | * | rockcavera joined #nim |
12:44:19 | * | rockcavera quit (Changing host) |
12:44:19 | * | rockcavera joined #nim |
12:51:22 | PMunch | Huh, I'm just unable to build with --gc:arc.. |
13:23:19 | FromDiscord | <IsaacPaul> In reply to @NullCode1337 "do i need to": Yea I believe so, you can avoid termux and run the program via shell. https://stackoverflow.com/questions/9868309/how-to-compile-c-into-an-executable-binary-file-and-run-it-in-android-from-andro |
13:58:41 | * | casionaut joined #nim |
14:02:56 | * | PMunch quit (Quit: Leaving) |
14:40:40 | NimEventer | New thread by Kiloneie: Nim for Beginners video series discussion thread, see https://forum.nim-lang.org/t/8552 |
14:53:03 | FromDiscord | <Imperatorn> How does Nim enforce memory safety? Do I need to care? Are there any attributes like unsafe or such? Does it use GC (no problem for me)? |
14:54:34 | FromDiscord | <dom96> unsafe is any use of `ptr`, `addr`, `unsafeAddr` (+ a few other things) |
14:54:58 | FromDiscord | <dom96> yes, there is a GC |
14:57:14 | casionaut | dom, do you have any plans to publish a 2nd edition of NIA? |
14:58:40 | FromDiscord | <reilly> sent a code paste, see https://play.nim-lang.org/#ix=3D4H |
14:59:13 | FromDiscord | <reilly> NimGL `igCombo()` expects a `cstring` as input. |
15:00:21 | FromDiscord | <dom96> casionaut: for now nope |
15:01:16 | FromDiscord | <dom96> In reply to @reilly "What would be the": `let items = [cstring("AAAA"),...]` I guess |
15:03:48 | FromDiscord | <superpyrin> hi, how can I install Nim on CentOS 7? Cannot update choosenim due to error: /tmp/choosenim-0.8.2_linux_amd64: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /tmp/choosenim-0.8.2_linux_amd64) |
15:06:16 | casionaut | you could just download the pre-built binary and add it to your path, just like any other lang |
15:07:01 | FromDiscord | <reilly> In reply to @dom96 "`let items = [cstring("AAAA"),...]`": I mean that the whole `items` array must be passed in as a single `cstring` type. Not as an `array[cstring]`. |
15:07:07 | FromDiscord | <superpyrin> there seems to be no prebuilt binary of Nim for Centos 7, and choosenim binary was linked to incompatible version of glibc. |
15:07:46 | FromDiscord | <dom96> In reply to @superpyrin "hi, how can I": You can grab an older choosenim which supports older glibc |
15:08:20 | FromDiscord | <dom96> I'll try to build on an older glibc system for the next release |
15:08:33 | FromDiscord | <dom96> (although Ubuntu 18.04 already seems quite old to me :)) |
15:09:14 | FromDiscord | <enthus1ast> Build it statically with musl maybe↵(@dom96) |
15:09:23 | FromDiscord | <dom96> that's what we did before |
15:09:27 | FromDiscord | <dom96> it caused mysterious crashes 🙂 |
15:10:18 | FromDiscord | <superpyrin> I had one, but could not compile Nim because of "stdlib_system.nim.c:(.text+0xa199): undefined reference to `builtin_smulll_overflow'", now I don't know how to go back to previous version of choosenim. Assuming I can get choosenim working, how do I build latest Nim with it? Is there a way to pass it extra gcc parameters to get rid of the builtin_smulll_overflow error? |
15:18:19 | FromDiscord | <superpyrin> ok, I downloaded choosenim 0.7.5 and it installed Nim 1.6.0 succesfully without error messages (probably used precompiled binary of Nim?). |
15:18:59 | FromDiscord | <dom96> yep |
15:30:17 | NimEventer | New Nimble package! scinim - The core types and functions of the SciNim ecosystem, see https://github.com/SciNim/scinim |
15:34:53 | FromDiscord | <IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3D4X |
15:35:53 | FromDiscord | <haxscramper> `{.error: "COmpile-time error".}` |
15:36:01 | FromDiscord | <IsaacPaul> ah thanks |
15:38:38 | FromDiscord | <reilly> Any idea why `igCombo()` doesn't let me open it unless I give it a label? |
15:42:18 | NimEventer | New Nimble package! frida - Frida wrapper, see https://github.com/ba0f3/frida.nim |
15:46:34 | * | casionaut quit (Quit: Leaving) |
16:40:44 | * | vicfred joined #nim |
16:47:37 | * | casionaut joined #nim |
16:48:34 | FromDiscord | <exelotl> In reply to @reilly "What would be the": The strings in the original array aren't separated by zeroes either. Or if they are that's just a fluke / implementation detail |
16:52:13 | FromDiscord | <reilly> In reply to @exelotl "The strings in the": So, through trying things out I found out that by "zero," it means the null character `'\0`. The reason why the array works is because (afaik) the null byte is what separates each item in memory. |
16:53:01 | FromDiscord | <reilly> To pass in a set of items, you can just do `cstring("option 1\0option2\0option3\0")`. It requires a terminating null at the end. |
16:53:37 | FromDiscord | <reilly> sent a code paste, see https://play.nim-lang.org/#ix=3D5l |
16:55:06 | FromDiscord | <reilly> In reply to @reilly "Any idea why `igCombo()`": The `NBSPACE` const (non-breaking space character, `"\u00A0"`) is used to work around the fact that, for some reason, the combo does not open unless I have a label due to the fact that it is invisible. |
16:55:40 | FromDiscord | <reilly> (edit) "have" => "give it" | "label due to the fact that" => "label. I use `NBSPACE` because" |
16:56:17 | FromDiscord | <reilly> (edit) "invisible." => "an invisible character, and a standard space does not work because I assume it's `strip()`ped." |
16:57:00 | FromDiscord | <IsaacPaul> In reply to @reilly "Any idea why `igCombo()`": Interesting api choice.. I wonder if its common to accept lists of strings this way in c |
16:57:15 | FromDiscord | <IsaacPaul> Interesting api choice.. I wonder if its common to accept lists of strings this way in c |
16:57:57 | FromDiscord | <IsaacPaul> kinda forces the data to be contiguous |
16:58:51 | FromDiscord | <exelotl> In reply to @reilly "So, through trying things": oh yeah I get what you mean by this, but I mean that the C++ array `{"foo", "bar", "baz"}` is an array of 3 pointers into the program's string table, but there's nothing that guarantees those 3 strings will be next to each other in memory and separated by nulls, as far as I'm aware. |
16:59:20 | FromDiscord | <reilly> Well, I don't know, but that's code from their own example 🤷 |
16:59:37 | FromDiscord | <reilly> In any case, I figured out how to do it in Nim, so I'm happy. |
17:00:20 | FromDiscord | <exelotl> yeah your nim solution seems good |
17:14:24 | FromDiscord | <reilly> Aaaaaand I just found out elements require unique labels to function properly, but it turns out you can just prefix the label with "##" to make it hidden... No non-breaking space required. |
18:15:39 | * | vicfred quit (Quit: Leaving) |
18:20:36 | FromDiscord | <IsaacPaul> sent a code paste, see https://paste.rs/Hv8 |
18:20:44 | FromDiscord | <IsaacPaul> extract |
18:21:36 | * | vicfred joined #nim |
19:03:57 | NimEventer | New thread by Templatedperson: Unclear error message or bug?, see https://forum.nim-lang.org/t/8553 |
19:07:58 | NimEventer | New thread by Neodim: HTTP header for cgi script under Apache, see https://forum.nim-lang.org/t/8554 |
19:15:01 | FromDiscord | <deeuu> In reply to @flywind "An ideal language for": Hey, how would that differ from Nim? |
19:34:49 | FromDiscord | <Imperatorn> silence |
20:00:04 | FromDiscord | <Recruit_main707> thats the answer, nothing :P |
20:00:21 | FromDiscord | <haxscramper> `{}` |
20:04:39 | FromDiscord | <deeuu> Makes sense |
20:07:14 | FromDiscord | <Goel> `void != nil` Kaboom |
20:09:03 | FromDiscord | <haxscramper> `type Q = distinct void` |
20:09:05 | FromDiscord | <haxscramper> KABOOM |
20:09:07 | FromDiscord | <lenis> Java Executive Committee: GC... it's complicated↵Andreas Rumpf: Hold my orc |
20:09:10 | FromDiscord | <haxscramper> `raise (ref Defect)()` |
20:12:44 | * | casionaut quit (Quit: o7) |
20:17:26 | FromDiscord | <impbox [ftsf]> In reply to @reilly "Any idea why `igCombo()`": A lot of imgui stuff needs labels to work, you can use invisible ones though |
20:35:58 | FromDiscord | <ynfle (ynfle)> Is there a way to display a result of modifying an image with arraymancer like in matlab other than saving it |
20:37:15 | FromDiscord | <deech> I have an `object` with a single field, eg. `type O = object; val: pointer` that I would like to export to C but instead of `struct O { void val }` I would like to generate `typedef void O`, is there a pragma that let's me do that? |
20:37:49 | FromDiscord | <deech> For reasons of inheritance it needs to be an `object`. |
20:37:51 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma might do the trick |
20:38:13 | FromDiscord | <deech> Tried, that doesn't work in a type declaration. |
20:39:07 | FromDiscord | <Elegantbeef> Hmm can one do `noDecl` then `emit` after...? |
20:39:29 | FromDiscord | <Recruit_main707> i guess |
21:03:03 | * | Vladar quit (Quit: Leaving) |
21:03:36 | FromDiscord | <reilly> In reply to @impbox "A lot of imgui": https://discord.com/channels/371759389889003530/371759389889003532/902968489009086484 :) |
21:05:38 | FromDiscord | <impbox [ftsf]> Ahh cool i missed that one |
21:22:14 | FromDiscord | <Imperatorn> sent a long message, see http://ix.io/3D6o |
21:25:23 | FromDiscord | <reilly> In reply to @Imperatorn "Is there any shorthand": https://nim-lang.org/docs/sugar.html |
21:26:57 | FromDiscord | <Imperatorn> I'm so used to it from other languages 😔 |
21:27:03 | FromDiscord | <haxscramper> `import std/sugar` and then literally the code you just wrote |
21:27:12 | FromDiscord | <haxscramper> `x => x.len < 6` |
21:28:21 | FromDiscord | <Imperatorn> Nim rox |
21:40:08 | FromDiscord | <Imperatorn> sent a code paste, see https://play.nim-lang.org/#ix=3D6r |
21:42:33 | FromDiscord | <Imperatorn> Wait... The terminology here for Nim is arrays are compile time entities, right? |
21:42:36 | FromDiscord | <Imperatorn> nvm |
21:42:43 | FromDiscord | <impbox [ftsf]> Arrays are fixed size at compile time |
21:42:45 | FromDiscord | <Imperatorn> I understand now |
21:42:57 | FromDiscord | <impbox [ftsf]> Sequences are variable size |
21:43:19 | FromDiscord | <impbox [ftsf]> Converting from array to seq is doable but not the other way around since the size of the seq isn't know |
21:43:43 | FromDiscord | <impbox [ftsf]> You can fill an array with the contents of a seq |
21:44:46 | FromDiscord | <Imperatorn> Yeah, I saw there are open array also, but as I understand it those are only bound to parameters |
21:44:57 | FromDiscord | <etan> There is also `filterIt` in `sequtils` , e.g., `nums.filterIt(it < 3)` |
21:45:11 | FromDiscord | <impbox [ftsf]> Yeah, it's basically a generic which takes either seq or array |
21:45:44 | FromDiscord | <impbox [ftsf]> openarray is when you want your proc to work with either seqs or arrays and don't care |
21:46:35 | FromDiscord | <impbox [ftsf]> And keepItIf you want in place filtering |
21:47:05 | FromDiscord | <Imperatorn> Oh, ok.. In general I try to stay immutable as long as possible, but good to know |
21:48:30 | FromDiscord | <etan> Immutable / Mutable is not related to `array` vs `seq` . You can use a `static:` block to force compile-time execution of an expression, or assign it to a `const` .↵`array` is for fixed-size / `seq` is for dynamic-size. As the `filter` result depends on the predicate, it returns a `seq` . |
21:48:32 | FromDiscord | <Imperatorn> I only asked about the conversion at first because when I echo a list I get that @ in the front |
21:48:48 | FromDiscord | <Imperatorn> In reply to @etan "Immutable / Mutable is": "keepItIf you want in place filtering" |
21:49:55 | FromDiscord | <impbox [ftsf]> Depends on if you want to alloc or not |
21:50:08 | FromDiscord | <Imperatorn> Oh wait, Nim has templates |
21:50:19 | FromDiscord | <impbox [ftsf]> Yep, they're handy |
21:50:59 | FromDiscord | <etan> BTW: When we are already at arrays – I recently got a PR into Nim that fixes the conversion from `static[seq[T]]` (a compile-time seq constant) to `openArray` .↵Is there a timeline somewhere to roughly see upcoming Nim release dates? Especially interested in a new 1.2 release. |
21:51:29 | FromDiscord | <impbox [ftsf]> Maybe ask in internal |
21:51:37 | FromDiscord | <etan> Thanks! |
21:52:42 | FromDiscord | <Imperatorn> In reply to @etan "BTW: When we are": When you say 1.2 what do you refer to then? |
21:53:34 | FromDiscord | <etan> Nim has several versions, i.e., 1.2 / 1.4 / 1.6. I'm on a codebase that's still on Nim 1.2. |
21:53:54 | FromDiscord | <Imperatorn> Oh, I understand |
21:55:36 | FromDiscord | <Imperatorn> Yeah would ne nice to have something similar to this, but ofc that depends on how frequent releases are https://media.discordapp.net/attachments/371759389889003532/903039252118532178/unknown.png |
21:56:23 | FromDiscord | <Elegantbeef> Well iirc 1.6 is going to be the new LTS so if you arent on it now you should be 😛 |
21:57:03 | FromDiscord | <Elegantbeef> Backporting requires work so doubt they want to support stable of 3 versions |
21:57:17 | FromDiscord | <Imperatorn> Probably not |
21:57:21 | FromDiscord | <aura> whats up |
21:57:28 | FromDiscord | <Imperatorn> !down |
21:57:41 | FromDiscord | <aura> ive always been too lazy to learn c and c++ but this seems to be easier tbh |
21:57:51 | FromDiscord | <aura> and compiles to them and rust |
21:57:55 | FromDiscord | <aura> i like the syntax |
21:58:13 | FromDiscord | <Elegantbeef> Nim doesnt compile to rust 😀 |
21:58:17 | FromDiscord | <Imperatorn> Well, yeah. Since I know C/C++ I can tell you it is |
21:58:23 | FromDiscord | <Imperatorn> In reply to @Elegantbeef "Nim doesnt compile to": Thank god |
21:59:56 | FromDiscord | <Imperatorn> Btw are core contribs in here or is it the forum one should look |
22:00:34 | FromDiscord | <Elegantbeef> They hang out in internals |
22:00:34 | FromDiscord | <Elegantbeef> Some non core contributors hang out here like this joe schmoe named beef |
22:00:34 | FromDiscord | <haxscramper> Depends on what you need to talk about though |
22:01:05 | FromDiscord | <Imperatorn> Cool, just curious 🙂 |
22:01:06 | FromDiscord | <aura> ohh okay |
22:01:10 | FromDiscord | <aura> still very cool |
22:02:27 | FromDiscord | <aura> why do you dislike rust? |
22:02:32 | FromDiscord | <Imperatorn> I haven't absorbed enough yet after 4 hours of Nim to have questions on that level. But good to know |
22:02:37 | FromDiscord | <Imperatorn> In reply to @aura "why do you dislike": Syntax from hell |
22:02:47 | FromDiscord | <aura> its not bad |
22:02:55 | FromDiscord | <Gumber> you need to defend why you like rust here |
22:03:03 | FromDiscord | <Gumber> no one here needs to explain why they dislike rust |
22:03:08 | FromDiscord | <Gumber> to us you're the weirdo 🙂 |
22:03:33 | FromDiscord | <Gumber> I'm kidding of course 😉 but seriously I doubt many folks in here are huge rust fans, otherwise they'd probably be using Rust |
22:03:38 | FromDiscord | <ynfle (ynfle)> What's the syntax for changing lineinfo with a pragma? |
22:03:52 | FromDiscord | <aura> fanboyish server |
22:04:06 | FromDiscord | <Imperatorn> In reply to @aura "its not bad": Bad is subjective of cource. It's just verbose |
22:04:07 | FromDiscord | <Gumber> rust discord? yeah |
22:04:16 | FromDiscord | <Gumber> it is definitely a fanboyish server |
22:04:19 | FromDiscord | <aura> this is |
22:04:22 | FromDiscord | <Gumber> heh |
22:04:24 | FromDiscord | <aura> a lot worse |
22:04:35 | FromDiscord | <Gumber> are you here to talk about Nim or talk about Rust? |
22:04:46 | FromDiscord | <Gumber> because we like to focus on Nim here |
22:04:50 | FromDiscord | <impbox [ftsf]> There's plenty of detractors too, not just fans |
22:04:54 | FromDiscord | <aura> Anything I feel like that doesn't break rules |
22:05:10 | FromDiscord | <Gumber> okay well please keep the talk in #main focused on Nim |
22:05:11 | FromDiscord | <aura> We're talking about both |
22:05:13 | FromDiscord | <impbox [ftsf]> But the topic here is nim not other language, they have their own servers |
22:05:18 | FromDiscord | <Imperatorn> Having the borrow checker forced upon you makes it so that you have to type more on average to do simple things |
22:05:28 | FromDiscord | <Gumber> if you want to talk about Rust there are other channels / servers to do that in |
22:05:42 | FromDiscord | <aura> mmmm |
22:05:51 | FromDiscord | <aura> sounds like |
22:05:55 | FromDiscord | <aura> I don't care |
22:06:04 | FromDiscord | <hips> what's wrong with being a fanboy :O |
22:06:06 | FromDiscord | <Gumber> don't care about what? |
22:06:17 | FromDiscord | <aura> I'm talking about nim |
22:06:24 | FromDiscord | <aura> so it's suitable here |
22:06:28 | FromDiscord | <haxscramper> Can you maybe stop this back and forth shit throwing? |
22:06:31 | FromDiscord | <ynfle (ynfle)> > What's the syntax for changing lineinfo with a pragma?↵Anyone? I remember seeing code like this in the past month or two |
22:06:53 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#pragmas-line-pragma |
22:07:00 | FromDiscord | <Gumber> yeah - I'll entertain this for about one more second but keep the topic focused on Nim please or find somewhere else to be |
22:07:18 | FromDiscord | <aura> Hmmmmmmmmmmmmmmmmmmmmm |
22:07:22 | FromDiscord | <aura> okay nimrod |
22:07:31 | FromDiscord | <Gumber> bye |
22:09:12 | FromDiscord | <jоshuа> In reply to @Imperatorn "Syntax from hell": https://media.discordapp.net/attachments/371759389889003532/903042675391987732/unknown.png |
22:09:31 | FromDiscord | <ynfle (ynfle)> @beef, you da man once again. Using you identify as male... |
22:10:13 | FromDiscord | <Elegantbeef> Yea joshua that's a casestatement 😀 |
22:10:24 | FromDiscord | <Elegantbeef> How dare you ynfle i'm "the beef" 😛 |
22:10:48 | FromDiscord | <impbox [ftsf]> Graduated Bovine University |
22:10:53 | FromDiscord | <ynfle (ynfle)> Is it mutually exclusive? |
22:11:27 | FromDiscord | <Elegantbeef> Top of my class in grass feeding! |
22:11:47 | FromDiscord | <Elegantbeef> To finish this joke for ynfle Grade A alberta Beef |
22:14:33 | FromDiscord | <ynfle (ynfle)> I prefer Argentinian imported meat |
22:23:59 | FromDiscord | <Imperatorn> Well done |
22:24:15 | FromDiscord | <Imperatorn> Anyway ttyl guys, thanks for helping out |
22:25:52 | FromDiscord | <Imperatorn> Seems to have an upward trend?↵https://tjpalmer.github.io/languish/#y=mean&names=nim |
22:25:55 | FromDiscord | <Imperatorn> gn |
22:41:11 | * | Pyautogui joined #nim |
22:41:31 | * | Pyautogui quit (Client Quit) |
22:52:12 | FromDiscord | <IsaacPaul> sent a long message, see http://ix.io/3D6J |
22:53:56 | FromDiscord | <IsaacPaul> Yea that's all I was able to come up with 😛 lol |
22:54:00 | FromDiscord | <IsaacPaul> (edit) "😛" => ": p" |
22:54:07 | FromDiscord | <IsaacPaul> (edit) removed "lol" |
22:56:20 | FromDiscord | <geekrelief> Any advice on how I can get this iterator to work? Nim says I need a return type. https://play.nim-lang.org/#ix=3D6K |
22:56:59 | FromDiscord | <geekrelief> I'm using the `ptr_math` package so `p += 1` will work in my code, but I just want to get past this error. |
23:01:11 | FromDiscord | <ynfle (ynfle)> Weird message |
23:01:41 | FromDiscord | <geekrelief> In reply to @ynfle (ynfle) "Weird message": yeah, in theory it should work right? |
23:03:09 | FromDiscord | <geekrelief> hmmm if I change the return type from `ptr T` and `yield 1` it still errors the same |
23:03:32 | FromDiscord | <ynfle (ynfle)> Well one isn't type of ptr T |
23:04:10 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3D6P |
23:04:24 | FromDiscord | <Elegantbeef> I dont get why you're iterating this way do you know the count? |
23:04:37 | FromDiscord | <Elegantbeef> Or do you just have start/end? |
23:04:38 | FromDiscord | <geekrelief> `p != ending` is the check |
23:05:21 | FromDiscord | <geekrelief> I don't know the count I just have a start and end `ptr T` |
23:06:13 | FromDiscord | <Elegantbeef> Ok |
23:06:21 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3D6Q |
23:06:45 | FromDiscord | <ynfle (ynfle)> https://play.nim-lang.org/#ix=3D6R |
23:06:52 | FromDiscord | <ynfle (ynfle)> @geekrelief try this |
23:07:27 | FromDiscord | <geekrelief> k, can we make pointer -> `ptr T` I actually need to return ptr T |
23:07:37 | FromDiscord | <Elegantbeef> Yea yea i'm on it! |
23:11:15 | FromDiscord | <impbox [ftsf]> beef you should set up a tip jar for nim help |
23:11:32 | FromDiscord | <geekrelief> oh man |
23:11:40 | FromDiscord | <geekrelief> silly me |
23:11:45 | FromDiscord | <geekrelief> the `` is in the wrong place! |
23:12:15 | FromDiscord | <Elegantbeef> Even so what you're doiing is wrong |
23:12:21 | FromDiscord | <geekrelief> not `items[T]` -> `items[T]` . I've made this mistake twice! |
23:12:23 | FromDiscord | <Elegantbeef> You're incrementing a pointer which isnt valid nim |
23:12:36 | FromDiscord | <geekrelief> yeah I'm using `ptr_math` |
23:12:40 | FromDiscord | <Elegantbeef> Ah |
23:12:41 | FromDiscord | <geekrelief> https://github.com/kaushalmodi/ptr_math/blob/main/src/ptr_math.nim |
23:12:45 | FromDiscord | <Elegantbeef> Well then fuck you 😛 |
23:12:57 | FromDiscord | <geekrelief> lol |
23:13:03 | FromDiscord | <geekrelief> sorry 😄 |
23:13:13 | FromDiscord | <Elegantbeef> I'm kidding of course! |
23:13:22 | FromDiscord | <geekrelief> I love Nim error messages! |
23:13:35 | FromDiscord | <Elegantbeef> procs/types give the proper error |
23:14:12 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3D6S |
23:14:55 | FromDiscord | <ynfle (ynfle)> bug report... |
23:14:58 | FromDiscord | <geekrelief> yeah |
23:15:11 | FromDiscord | <geekrelief> I'll create an issue |
23:15:26 | FromDiscord | <Elegantbeef> Impbox if i made a tipjar for help i'd have to quit being an asshole |
23:15:32 | FromDiscord | <Elegantbeef> Or maybe that's what the tip buys you |
23:15:54 | FromDiscord | <Elegantbeef> For each dollar spent i restrain from calling you a name atleast once |
23:16:28 | FromDiscord | <ynfle (ynfle)> @geek does it work? Because I get a different error message |
23:16:54 | FromDiscord | <Elegantbeef> They've got ptrmath so they can do ptr += 1 like an animal |
23:17:11 | FromDiscord | <ynfle (ynfle)> No, the error message is the lent has to be object type |
23:17:20 | FromDiscord | <Elegantbeef> Ah the lent does make no sense |
23:17:20 | FromDiscord | <geekrelief> 1 sec let me try it in my real codebase |
23:17:31 | FromDiscord | <Elegantbeef> a lent pointer is pointless |
23:18:06 | FromDiscord | <geekrelief> Yeah I see your point. It's my first time using a custom iterator 🙂 |
23:18:23 | FromDiscord | <Elegantbeef> Ah make sense just looked at one of the lent iterators and copied it |
23:18:33 | FromDiscord | <geekrelief> yah |
23:18:58 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3D6U |
23:19:08 | FromDiscord | <Elegantbeef> No point in putting `inline` |
23:19:12 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3D6V |
23:19:12 | FromDiscord | <ynfle (ynfle)> iterators are inline |
23:19:24 | FromDiscord | <geekrelief> ok I guess the manual needs updating? |
23:19:31 | FromDiscord | <Elegantbeef> posssibly |
23:19:40 | FromDiscord | <Elegantbeef> `inline` is the default iterator calling convention |
23:19:54 | FromDiscord | <geekrelief> https://nim-lang.github.io/Nim/manual.html#iterators-and-the-for-statement |
23:21:45 | FromDiscord | <ynfle (ynfle)> sent a code paste, see https://play.nim-lang.org/#ix=3D6X |
23:33:35 | FromDiscord | <geekrelief> In reply to @ynfle (ynfle) "@geek minimal example if": Thanks. I just posted my sample code. https://github.com/nim-lang/Nim/issues/19063 |
23:35:27 | FromDiscord | <ynfle (ynfle)> @geek the manual you are looking at is on devel |
23:35:27 | FromDiscord | <Elegantbeef> I mean 1.6 is out so why go to devel? |
23:35:31 | FromDiscord | <ynfle (ynfle)> They just happened to link to devel |
23:35:58 | FromDiscord | <geekrelief> In reply to @Elegantbeef "I mean 1.6 is": why not devel? I'm on devel |
23:36:02 | FromDiscord | <Elegantbeef> Well it doesnt matter presently |
23:36:10 | FromDiscord | <Elegantbeef> Devel is pretty much 1.6 with minor changes |
23:36:17 | FromDiscord | <ynfle (ynfle)> @geek also, use minimal example in issue, the specific use case isn't relevant |
23:36:37 | FromDiscord | <geekrelief> k I'll edit it |