00:00:21 | * | evan1 joined #nim |
00:00:29 | * | evan1 quit (Client Quit) |
00:00:56 | * | fputs joined #nim |
00:02:16 | * | noeontheend quit (Ping timeout: 260 seconds) |
00:06:41 | * | fputs quit (Quit: WeeChat 3.1) |
00:09:46 | * | NimBot joined #nim |
00:32:15 | * | noeontheend joined #nim |
00:54:26 | * | nphg1 joined #nim |
00:57:11 | * | nphg quit (Ping timeout: 240 seconds) |
01:22:10 | * | arkurious quit (Quit: Leaving) |
02:05:26 | * | noeontheend quit (Ping timeout: 240 seconds) |
02:11:03 | termer | Is there a way to specify the calling convention for a callback? |
02:11:45 | termer | I'm trying to create a callback to feed to a function that interfaces with a C library, and even though I'm adding {.closure.} to the callback, the compiler is saying that it's not compatible because it's has the calling convention: <cdecl> |
02:12:15 | termer | /usr/lib/nim/core/macros.nim(559, 3) Error: illegal capture 'onClose' because 'connect_for_signal_cdecl_destroy1' has the calling convention: <cdecl> |
02:14:40 | termer | Apparently it needed to be nimcall |
02:15:19 | leorize[m] | it might be that your code is buggy :P |
02:15:55 | leorize[m] | or you might found a compiler bug. If you managed to produce a small sample, please report it to the issue tracker :) |
02:18:27 | termer | I think it was just my code |
02:18:50 | termer | The compiler reporting cdecl didn't make sense though |
02:19:39 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
02:19:39 | termer | A lot of problems that I've encountered have been my own, but the compiler error messages have been mostly cryptic, especially when it comes to syntax errors |
02:20:27 | * | Gustavo6046 joined #nim |
02:32:23 | FromGitter | <bung87> I think the error message is telling you where the problem is , I've seen such a message, your closure body capture a variable out of that scope |
02:32:39 | FromDiscord | <demotomohiro> C functions cannot takes closure proc. They can take only cdecl proc. |
02:34:19 | FromGitter | <bung87> when you wrap a c function like this make sure your variable pass through function paramerters, not capture any one out of that scope. |
02:45:00 | * | motersen quit (Remote host closed the connection) |
02:45:13 | * | motersen joined #nim |
02:45:51 | * | motersen quit (Remote host closed the connection) |
02:46:04 | * | motersen joined #nim |
03:27:50 | * | spiderstew joined #nim |
03:30:11 | * | spiderstew_ quit (Ping timeout: 240 seconds) |
03:35:39 | FromDiscord | <reilly> I'm curious if anyone's fiddled with using the C++ backend to use Nim with Unreal Engine. |
03:36:03 | FromDiscord | <ElegantBeef> Pragmagic did before moving towards godot |
03:36:28 | FromDiscord | <ElegantBeef> Zachary has used Nim with the machinery which is probably more sensible to do |
03:36:49 | FromDiscord | <Hi02Hi> pragmagic: https://github.com/pragmagic/nimue4 |
03:39:41 | FromDiscord | <reilly> Oh, that reminds me, I think I asked this but the conversation moved to something else (probably my machine exploding) |
03:39:51 | FromDiscord | <reilly> Does using GDNative have performance benefits over GDScript? |
03:40:09 | FromDiscord | <ElegantBeef> Yes, gdscript is interpreted |
03:40:16 | FromDiscord | <reilly> I thought as much. |
03:40:26 | FromDiscord | <ElegantBeef> It's faster than python or normal lua, but compared to compiled code it really doesnt |
03:40:47 | FromDiscord | <reilly> As soon as someone makes Godot-Nim interop actually usable, please let me know, because that would be killer. |
03:41:02 | FromDiscord | <ElegantBeef> Did gdnim not tickle your fancy? |
03:41:36 | FromDiscord | <reilly> GDNim looks like it's heading in the right direction, but it's a little rough around the edges. |
03:42:14 | FromDiscord | <reilly> Namely, it creates its own nim.cfg in order for autocomplete to work (iirc), which overrides my own nim.cfg and creates hundreds of Nimsuggest instances. |
03:43:04 | FromDiscord | <reilly> I "fixed" it temporarily last night, but GDNim remade the cfg when I made a new component... I bet you can guess what happened next. |
03:43:13 | FromDiscord | <reilly> (edit) "component..." => "component this morning..." |
03:43:26 | FromDiscord | <ElegantBeef> Ah well did you make an issue on the repo or just leaving that be |
03:43:52 | FromDiscord | <reilly> I can prevent it from making a new cfg, but then I don't have autocomplete, and I like having that. |
03:43:56 | FromDiscord | <ElegantBeef> You can hit up zach to see if he'll give you the machinery bindings if you want to toy with that, but publishing license is announced yet |
03:44:05 | FromDiscord | <ElegantBeef> (edit) "is" => "isnt" |
03:44:20 | FromDiscord | <reilly> In reply to @ElegantBeef "You can hit up": This? https://ourmachinery.com/ |
03:44:23 | FromDiscord | <ElegantBeef> Yea |
03:45:33 | FromDiscord | <reilly> I'll take a peek, but I'm a bit skeptical seeing as I've never heard of it before. |
03:45:46 | FromDiscord | <ElegantBeef> Well then why are you interested in Nim π |
03:46:43 | FromDiscord | <reilly> You know what, that's a really good point. |
03:47:52 | FromDiscord | <reilly> Is it not open-source? I can't find anything that would indicate so. |
03:50:09 | FromDiscord | <reilly> I'll take a mental note of it, but no publishing license and no source code make me want to look elsewhere for now. |
03:50:31 | Prestige | what, gdnim? |
03:50:54 | FromDiscord | <reilly> No, see the link above. |
03:51:04 | Prestige | Oh I see |
03:51:36 | FromDiscord | <Hi02Hi> i think its closed source with an open issue tracker:https://github.com/OurMachinery/themachinery-public |
03:52:03 | Prestige | yep https://github.com/OurMachinery/themachinery is private |
03:52:36 | FromDiscord | <reilly> It does look interesting, but I don't think I want to invest time into something with a questionable future. |
03:52:54 | Prestige | yeah, I'm sticking with godot |
03:56:17 | FromDiscord | <reilly> I'm in an awkward place where I really want to use Nim for game development, but Nim engines seem too immature, Godot-Nim interop has poor usability or is unstable, and trying to create my own solution is far outside of what I can understand. |
03:56:43 | FromDiscord | <ElegantBeef> Time to use nico and make 2D games π |
03:57:38 | FromDiscord | <reilly> Vektor 2089 is really cool... |
03:57:50 | FromDiscord | <ElegantBeef> ~~So is linerino~~ |
03:58:19 | FromDiscord | <reilly> I don't know that one, it's not listed on Nico's readme. |
03:58:25 | FromDiscord | <reilly> Maybe you should bug them about that π |
03:58:45 | FromDiscord | <ElegantBeef> Eh it's here https://itch.io/c/1064082/games-made-with-nico |
04:00:02 | FromDiscord | <reilly> Clever. |
04:01:53 | FromDiscord | <ElegantBeef> Thanks, it was fun to make so now i want another small puzzle mechanic π |
04:03:42 | FromDiscord | <reilly> Here's one for free: turn https://www.youtube.com/watch?v=R6a4OE83mKU into a standalone title. |
04:03:50 | FromDiscord | <reilly> You'll need more than just Nico for that! |
04:04:50 | FromDiscord | <ElegantBeef> Too big of a mechanic π |
04:05:49 | FromDiscord | <reilly> I can't even imagine how to implement something like that, let alone how to make half-decent puzzles out of it, but I don't think anyone's done it before... |
04:06:06 | FromDiscord | <reilly> Anyway, that's more #gamedev talk than Nim talk, so I digress. |
04:09:01 | * | Jesin quit (Ping timeout: 260 seconds) |
04:10:09 | FromDiscord | <reilly> I don't want to learn C# and I don't like Unity's licensing. I prefer Unreal's licensing, but C++ is arguably worse to use, and Nim interop is a little... antiquated. Godot-nim is poorly documented but has proven itself to be usable, and GDNim makes my computer catch fire. |
04:11:02 | FromDiscord | <reilly> Honestly, I think if Godot-nim just explained how to use it better, it'd be perfectly usable. |
04:13:11 | FromDiscord | <fenrave> could always just go the route of not using a game engine, way more difficult but couldn't be worse than GDNim |
04:13:58 | FromDiscord | <reilly> I've looked into it, but for the most part it just goes over my head and I don't think the effort would be worth it. |
04:14:41 | FromDiscord | <reilly> I think, if I were to do it, I would use liquidev/aglet, since that looks like "better OpenGL" pretty much. |
04:16:37 | FromDiscord | <reilly> I mean, looking at the ttextures test, I guess it kind of makes sense... But it's so much work to do something so simple. |
04:17:32 | FromDiscord | <reilly> Why should I have to write GLSL code just to draw a brick texture to the screen? And you can forget about displaying and shading 3D models... |
04:17:44 | FromDiscord | <reilly> But I digress. |
04:20:27 | FromDiscord | <reilly> On a completely unrelated note, I'd love to be able to create VST plugins in Nim. DISTRHO/DPF is just C/C++, so it's probably possible to make a Nim wrapper for it... I'd do it if I knew how, but I'm underqualified for that. |
04:21:14 | FromDiscord | <reilly> Maybe someone here shares my yearning for DSP and actually knows what they're doing π |
04:23:55 | FromDiscord | <reilly> Enough rambling for tonight, I've already destroyed the chat enough. |
04:26:50 | * | fantis quit (Remote host closed the connection) |
04:27:11 | * | fantis joined #nim |
04:45:15 | * | rockcavera quit (Remote host closed the connection) |
05:12:18 | * | narimiran joined #nim |
05:39:59 | * | Vladar joined #nim |
05:46:38 | * | ronny left #nim ("User left") |
06:00:06 | * | hyiltiz quit (Ping timeout: 240 seconds) |
06:04:20 | * | hyiltiz joined #nim |
06:04:20 | * | hyiltiz quit (Changing host) |
06:04:20 | * | hyiltiz joined #nim |
06:08:08 | * | Jesin joined #nim |
06:50:34 | * | hendursaga quit (Remote host closed the connection) |
06:51:02 | * | hendursaga joined #nim |
06:54:03 | * | hendursaga quit (Remote host closed the connection) |
06:54:27 | * | hendursaga joined #nim |
07:00:13 | * | PMunch joined #nim |
07:19:30 | * | sagax joined #nim |
07:35:43 | Clonkk[m] | <FromDiscord "<reilly> On a completely unrelat"> I mean if you don't try, you're not gonna learn how to do it |
07:35:57 | Clonkk[m] | Wrappinc C and C++ in Nim isn't that hard, it's mechanical really |
07:41:43 | PMunch | Too bad the tools to perform this mechanical mapping is a bit lackluster.. |
07:54:28 | * | solitudesf joined #nim |
07:56:04 | * | solitudesf quit (Client Quit) |
08:08:15 | Clonkk[m] | <PMunch "Too bad the tools to perform thi"> Yeah it's true but at the same times there are so many edge case and weird tihngs with C and C++ that I'm not too surprised |
08:08:30 | Clonkk[m] | The simple factthat you can use Macro to rename functions for instance makes parsing a living hell |
08:08:41 | PMunch | I wonder how Zig doe it with libclang.. |
08:09:09 | * | hendursaga quit (Ping timeout: 240 seconds) |
08:09:12 | Clonkk[m] | Do they parse C or work on the IR code ? |
08:09:20 | PMunch | Not sure |
08:10:19 | * | oculux joined #nim |
08:13:28 | * | hendursaga joined #nim |
08:23:21 | * | Guest007[m]1 joined #nim |
08:28:10 | * | Tlangir quit (Remote host closed the connection) |
08:52:17 | * | tane joined #nim |
09:00:16 | * | m33[m] quit (Quit: Idle for 30+ days) |
09:09:53 | * | oculuxe joined #nim |
09:10:26 | * | oculux quit (Ping timeout: 240 seconds) |
09:12:18 | ForumUpdaterBot | New thread by Miran: Release candidates for 1.4.8 and 1.2.14, see https://forum.nim-lang.org/t/8008 |
09:21:44 | FromDiscord | <Ieve> https://media.discordapp.net/attachments/371759389889003532/845229861442027560/unknown.png |
09:21:56 | FromDiscord | <Ieve> which should i select for nim to use with import httpclient? |
09:24:04 | FromDiscord | <clyybber> @reilly have you tried raylib? (https://github.com/greenfork/nimraylib_now) It's pretty nice to use, although afaik doesnt come with a 3d physics engine |
09:29:02 | * | Arrrrrrrr joined #nim |
09:35:47 | Arrrrrrrr | So are views pre-2.0 release? |
09:37:33 | Arrrrrrrr | Also, I'm with treeform in that c backend IC would be more necessary. Just my two cents. |
09:41:14 | * | fantis quit (Remote host closed the connection) |
09:41:38 | * | fantis joined #nim |
10:06:29 | * | oculuxe quit (Ping timeout: 246 seconds) |
10:09:15 | FromDiscord | <Zachary Carter> In reply to @reilly "It does look interesting,": @reilly @Hi02Hi Prestige: The Machinery is not open source. The authors have stated several times they plan on making an affordable full source license available for customers. I don't know what's "questionable" about the projects future. I think it has a less questionable future than Godot, but I don't know what you consider "questionable" about it in the first place. |
10:11:08 | FromDiscord | <Zachary Carter> In reply to @reilly "Why should I have": Because this is how GPUs work π It's still happening whether you do it yourself or rely on some library / engine to do it for you. |
10:12:26 | FromDiscord | <Zachary Carter> There's cognitive overhead and time that needs to be invested in learning how to use a game engine - so that's one way to think about it. |
10:19:43 | * | oculux joined #nim |
10:21:07 | FromDiscord | <Zachary Carter> Also if you're using GDScript you have to learn some stupid scripting language you'll never be able to use anywhere else π |
10:21:49 | FromDiscord | <Zachary Carter> But I guess GDScript is simple enough to learn that this isn't a huge barrier to entry |
10:38:10 | * | oculuxe joined #nim |
10:39:33 | * | oculux quit (Ping timeout: 260 seconds) |
11:04:45 | * | sysadmin quit (Ping timeout: 260 seconds) |
11:15:57 | * | jkiesian joined #nim |
11:17:49 | * | a_chou joined #nim |
11:21:09 | * | a_chou quit (Client Quit) |
11:37:15 | * | gemath[m] joined #nim |
12:00:17 | * | Arrrrrrrr quit (Quit: Arrrrrrrr) |
12:02:06 | * | narimiran quit (Ping timeout: 260 seconds) |
12:11:46 | * | PMunch quit (Ping timeout: 240 seconds) |
12:24:08 | * | PMunch joined #nim |
12:24:59 | * | oculux joined #nim |
12:25:36 | FromDiscord | <Valor> Why isnβt there a nim game engine yet? That shit would be so digging useful |
12:26:01 | * | oculuxe quit (Ping timeout: 260 seconds) |
12:28:23 | * | arkurious joined #nim |
12:33:04 | PMunch | What do you mean? There are multiple :P |
12:34:56 | FromDiscord | <Rika> `Error: 'all' doesn't have a concrete type, due to unspecified generic parameters.` damn |
12:35:41 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3nsq |
12:37:14 | * | noeontheend joined #nim |
12:37:21 | FromDiscord | <Recruit_main707> PMunch: I guess he means a unreal engine/unity kind of engine |
12:41:08 | PMunch | Ooh like the whole UI thingy? No thanks.. |
12:45:53 | FromDiscord | <Recruit_main707> I'd like one too tbh, but those things are very complicated |
12:47:23 | * | oculuxe joined #nim |
12:48:46 | * | oculux quit (Ping timeout: 260 seconds) |
12:49:27 | FromDiscord | <Recruit_main707> Very hard that a project like that could be maintained by a single person and maybe some contributors could maintain it, specially at a decent level of quality |
12:50:08 | FromDiscord | <Recruit_main707> This what happens when you type something, have to stop, come back and keep typing xd |
12:50:35 | FromDiscord | <Recruit_main707> (edit) "contributors could maintain it," => "contributors," |
12:52:48 | FromDiscord | <ajusa> Anyone used nimterop before? I'm trying to use it to wrap libctru, which is a library for the 3DS but not sure how I'm even supposed to do that... |
12:53:14 | FromDiscord | <ajusa> How do I use it to generate bindings? |
12:54:51 | FromDiscord | <Recruit_main707> They have a gitter room, try asking there, they are very helpful |
12:59:05 | Clonkk[m] | The nimterop gitter room is kinda dead though |
13:00:41 | FromDiscord | <ajusa> yeah there have been like four messages in the last year |
13:01:03 | * | johnnynitwits quit (Read error: Connection reset by peer) |
13:01:16 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3nsz |
13:01:33 | * | johnnynitwits joined #nim |
13:02:38 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3nsA |
13:03:19 | FromDiscord | <Rika> is it me or is `await (await client.get(url)).body` slow running? it takes like 5 seconds until it switches away to process the next fut |
13:10:19 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3nsB |
13:20:05 | * | hyiltiz quit (Ping timeout: 265 seconds) |
13:22:14 | * | rockcavera joined #nim |
13:23:32 | * | hyiltiz joined #nim |
13:23:33 | * | hyiltiz quit (Changing host) |
13:23:33 | * | hyiltiz joined #nim |
13:28:01 | * | hyiltiz quit (Ping timeout: 260 seconds) |
13:28:18 | * | PMunch quit (Ping timeout: 265 seconds) |
13:30:30 | FromDiscord | <Zachary Carter> `Error: unhandled exception: Connection was closed before full request has been made [ProtocolError]` when trying to update stable branch of Nim w/ choosenim |
13:32:09 | FromDiscord | <Zachary Carter> Same if I try to update choosenim itself... Ugh |
13:33:30 | * | hyiltiz joined #nim |
13:40:55 | FromDiscord | <exelotl> In reply to @ajusa "Nevermind, starting to think": I tried this once and had no luck. Probably best to just copy all the headers and rework them until they can successfully go through `c2nim` |
13:41:06 | * | PMunch joined #nim |
13:41:21 | * | GaveUp left #nim (#nim) |
13:43:32 | FromDiscord | <exelotl> I'd guess there's little chance of the bindings bitrotting nowadays, but it would be worth noting down exactly which commit/release of ctrulib was used in case you do need to update them later |
13:49:50 | FromDiscord | <ajusa> In reply to @exelotl "I'd guess there's little": Good point, I'll do that. Also thanks for your GBA config.nims, was very useful for 3DS stuff! |
13:57:32 | FromDiscord | <exelotl> np! I used to just rely on the makefiles, it didn't occur to me that I could do without them until I saw @hcorion's nake setup a couple of years ago |
14:01:28 | * | fifth quit (Quit: WeeChat 3.1) |
14:06:42 | * | fputs joined #nim |
14:06:55 | * | fputs quit (Client Quit) |
14:11:48 | * | ee7[m] joined #nim |
14:38:51 | FromDiscord | <Zachary Carter> also @reilly you may have not heard of the machinery, but you might have heard of the previous engine they built: bitsquid (which turned into autodesk stingray) |
14:39:19 | FromDiscord | <Zachary Carter> they have an engineering blog which is definitely worth reading if you're interested in game engine architecture |
14:39:42 | FromDiscord | <Zachary Carter> the engine is in beta though so not all features are there yet and of course there are bugs |
14:40:44 | FromDiscord | <Zachary Carter> does not sound like something that would suit your requirements |
14:55:58 | * | hendursaga left #nim (#nim) |
15:03:31 | * | jkiesian quit (Ping timeout: 260 seconds) |
15:03:44 | FromDiscord | <reilly> Maybe I'm being too picky. |
15:20:35 | FromDiscord | <reilly> Ideally I'd be able to pick one engine or library and be able to use that for all my needs forever, but that's looking more and more like a pipe dream. |
15:33:34 | FromDiscord | <Zachary Carter> ugh now nimble isn't working for me |
15:33:36 | FromDiscord | <Zachary Carter> wtf... |
15:39:19 | FromDiscord | <Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=3ntz |
15:39:25 | FromDiscord | <Zachary Carter> I'll move this to the #nimble channel |
15:43:04 | FromDiscord | <reilly> If the documentation for pragmagic/godot-nim were to be improved (and the tooling decent w/o creating hundreds of Nimsuggest instances) then I'd be golden. The only reason I'm looking at other options is because it doesn't explain how to use itself. |
15:43:20 | * | MarderIII joined #nim |
15:46:14 | FromDiscord | <Zachary Carter> The creator of pragmagic/godot-nim is now experimenting with the machinery tmk. It's open source though so you're welcome to contribute to improving the documentation I think. Nim suggest is not related to godot-nim. If you want something that "just works" your best bet would probably be using Unity or Unreal or Godot with GDScript / C# etc... |
15:46:42 | FromDiscord | <Zachary Carter> If you're working on 2d games you could always use nico or sdl2 or csfml or whatever |
15:49:18 | FromDiscord | <reilly> I'm concerned with future-proofing my time investment. Ideally, I'd be able to learn one tool, engine, or library, and use it to create any kind of game, be it 2D or 3D, with any kind of visual style, and use that one thing for the foreseeable future. |
15:50:52 | * | jkiesian joined #nim |
15:51:47 | FromDiscord | <Zachary Carter> So like I said use one of those engines I listed above |
15:52:02 | FromDiscord | <Zachary Carter> they're not going anywhere anytime soon |
15:54:03 | FromDiscord | <reilly> You're the one that made bindings for the Machinery, right? |
15:54:31 | FromDiscord | <Zachary Carter> I generated some a while ago using nimterop |
15:55:01 | FromDiscord | <Zachary Carter> For what it's worth - I'm not using the machinery (yet). |
15:55:27 | FromDiscord | <Zachary Carter> Well I'm not doing much of anything at the moment, since nimble isn't working for me. |
15:55:47 | FromDiscord | <Zachary Carter> I'm going to restart my machine and see if that solves anything |
15:57:01 | FromDiscord | <reilly> Good luck. |
16:00:22 | FromDiscord | <Zachary Carter> for anyone that was hanging on at the edge of their seat - it didn't solve anything |
16:07:58 | * | jkiesian quit (Remote host closed the connection) |
16:09:23 | * | narimiran joined #nim |
16:24:18 | FromDiscord | <treeform> What would you like to see in a Pixie presentation? https://media.discordapp.net/attachments/371759389889003532/845336204844597358/unknown.png |
16:24:47 | FromDiscord | <treeform> (for upcoming online nim conf 2021) |
16:26:28 | FromDiscord | <ajusa> What can it be used for, examples of it running, how portable is it π, how fast is itβ΅Why'd you make it? Is it related to Fidget 2? Does it work on the JS backend? What's left to implement? |
16:26:48 | FromDiscord | <treeform> ^ those are good points |
16:26:59 | FromDiscord | <treeform> (does not work on the JS backend) |
16:27:39 | FromDiscord | <ajusa> Why does it say (mostly) in Nim? What C code is left? (I think it is for JPEG loading actually) |
16:27:59 | FromDiscord | <ajusa> stb image or something |
16:28:02 | FromDiscord | <treeform> Yeah only jpeg loading is left. Jpeg is a very complex format. We have like 50% of it done though. |
16:28:15 | FromDiscord | <treeform> We will probably finish it some day |
16:36:27 | * | mjsir911 quit (Quit: Goodbye, World!) |
16:36:49 | * | mjsir911 joined #nim |
16:37:05 | * | Gustavo6046 quit (Ping timeout: 250 seconds) |
16:37:27 | * | Gustavo6046 joined #nim |
16:46:14 | * | superbia joined #nim |
16:54:09 | ForumUpdaterBot | New thread by Leorize: Querying on support to CPS development by compiler devs, see https://forum.nim-lang.org/t/8009 |
16:56:24 | * | mjsir911 quit (Quit: Goodbye, World!) |
17:04:15 | * | mjsir911 joined #nim |
17:18:14 | * | willyboar joined #nim |
17:21:30 | FromDiscord | <Goat> What is a good way to extract a random value from a sequence without having duplicate values? |
17:22:54 | FromDiscord | <Goat> For instance if I want to draw random 3 cards from the seq Deck in a way that removes them form the deck |
17:24:05 | * | superbia quit (Quit: WeeChat 3.1) |
17:24:33 | nphg1 | shuffle(Deck); cards = Deck[^3..^1]; setLen(Deck, Deck.len-3) |
17:24:34 | Prestige | maybe get a random int within the range of the seq, then call delete? |
17:28:49 | Prestige | @Goat https://nim-lang.org/docs/random.html and https://nim-lang.org/docs/system.html#delete%2Cseq%5BT%5D%2CNatural |
17:29:33 | Prestige | could use del maybe better |
17:30:36 | FromDiscord | <0ffh> Shuffling the whole deck looks like overkill.β΅Sample one random card, and remove it. Repeat. Repeat. |
17:32:18 | FromDiscord | <0ffh> You could remove by copying the last card into the position and reduce length by one. |
17:34:17 | * | PMunch quit (Quit: leaving) |
17:35:27 | Prestige | That's a good solution if you don't want to remove anything from the seq ^ |
17:35:28 | * | PMunch joined #nim |
17:49:17 | FromDiscord | <reilly> sent a long message, see http://ix.io/3nuh |
17:49:20 | * | blueberrypie quit (Quit: leaving) |
17:51:10 | * | blueberrypie joined #nim |
17:53:10 | FromDiscord | <haxscramper> You can iterate over an UTF8 string via `std/unicode.runes` iterator and skip necessary parts |
17:54:51 | FromDiscord | <haxscramper> `std/json` uses nim string which is a sequence of bytes, so`[]` returns a `char`. If you are just indexing in the string it would not work |
17:58:17 | * | noeontheend quit (Ping timeout: 246 seconds) |
17:58:45 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=3nuk |
18:03:57 | FromDiscord | <Goat> In reply to @nphg1 "shuffle(Deck); cards = Deck[^3..^1];": @0ffh thanks both of these work for my purposes |
18:04:41 | FromDiscord | <treeform> In reply to @reilly "I'm dealing with json": Are you reading terminal formatting commands? Some thing "like" what is the exact string if you repr it? |
18:06:38 | * | willyboar quit (Quit: Konversation terminated!) |
18:11:47 | FromDiscord | <reilly> sent a code paste, see https://play.nim-lang.org/#ix=3nuq |
18:12:50 | FromDiscord | <reilly> If someone wants to make this more optimal, be my guest. |
18:19:36 | * | pietroppeter joined #nim |
18:40:43 | * | willyboar joined #nim |
18:47:19 | FromDiscord | <Ashwin> does nim echo support something like this ? https://docs.python.org/3/library/string.html#format-string-syntax |
18:47:51 | narimiran | @Ashwin https://nim-lang.github.io/Nim/strformat.html |
18:49:16 | FromDiscord | <Ashwin> ty! |
19:10:39 | * | Gustavo6046 quit (Ping timeout: 258 seconds) |
19:10:51 | FromDiscord | <Zachary Carter> Streaming gamedev stuff: https://www.twitch.tv/hahahaitsfunny |
19:24:56 | * | Jesin quit (Quit: Leaving) |
19:48:38 | * | AntonioArtigas[m joined #nim |
19:50:03 | * | Jesin joined #nim |
19:57:58 | * | Vladar quit (Quit: Leaving) |
19:59:01 | * | narimiran quit (Quit: leaving) |
20:00:15 | * | AntonioArtigas[m left #nim ("User left") |
20:00:19 | * | MarderIII quit (Ping timeout: 250 seconds) |
20:01:59 | * | noeontheend joined #nim |
20:04:39 | * | Guest94576 joined #nim |
20:05:12 | * | Guest94576 quit (Client Quit) |
20:12:15 | * | blueberrypie left #nim ("leaving") |
20:13:10 | * | zuckerberg[m] joined #nim |
20:27:04 | * | Gustavo6046 joined #nim |
20:30:19 | * | Jesin quit (Quit: Leaving) |
20:34:33 | * | Jesin joined #nim |
20:47:52 | * | Gustavo6046 quit (Changing host) |
20:47:52 | * | Gustavo6046 joined #nim |
20:48:17 | * | tane quit (Quit: Leaving) |
20:48:19 | * | Gustavo6046 quit (Changing host) |
20:48:19 | * | Gustavo6046 joined #nim |
20:48:34 | * | Gustavo6046 quit (Changing host) |
20:48:34 | * | Gustavo6046 joined #nim |
20:56:15 | FromDiscord | <inv> Is it possible to convert untyped to string in template?β΅https://play.nim-lang.org/#ix=3nv7 |
21:03:22 | FromDiscord | <ElegantBeef> Yep using `astToStr` |
21:03:33 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3nvg |
21:07:34 | FromDiscord | <inv> In reply to @ElegantBeef "https://play.nim-lang.org/#ix=3nvg": Thx. I solved with inject and astToStr, but looks like inject is not necessary π |
21:15:39 | * | sagax quit (Excess Flood) |
21:30:41 | FromDiscord | <inv> https://media.discordapp.net/attachments/371759389889003532/845413310484447272/unknown.png |
21:30:48 | * | willyboar quit (Remote host closed the connection) |
21:31:27 | FromDiscord | <ElegantBeef> Now use TCC π |
21:32:09 | FromDiscord | <inv> (edit) "" => "Nim compilation speed" |
21:32:45 | FromDiscord | <inv> In reply to @ElegantBeef "Now use TCC π": I will, as soon as I use not just for test π |
21:35:01 | FromDiscord | <inv> Trying to find someone with modern M1 or AMD π |
21:36:17 | FromDiscord | <ElegantBeef> Some forum posts about m1, could fish there |
21:36:45 | FromDiscord | <inv> Interesting that WSL2 is very close to native linux |
21:39:53 | FromDiscord | <inv> @ElegantBeef I measured M1 I rented on scaleway, but results are very strange - slower than old macbook on intel |
21:40:20 | * | Jesin quit (Ping timeout: 264 seconds) |
21:40:21 | * | sagax joined #nim |
21:40:23 | FromDiscord | <ElegantBeef> native compiler or emulated x86? |
21:41:00 | FromDiscord | <inv> @ElegantBeef I do not know how to check. + I found that it can just from arm to x86 and back on every binary |
21:41:08 | FromDiscord | <inv> (edit) "just" => "jump" |
21:53:17 | * | raboof quit (Read error: Connection reset by peer) |
21:53:34 | * | pietroppeter quit (Ping timeout: 258 seconds) |
21:55:33 | * | notchris quit (Read error: Connection reset by peer) |
21:59:56 | * | pietroppeter joined #nim |
22:00:11 | * | notchris joined #nim |
22:04:50 | * | raboof joined #nim |
22:05:27 | FromDiscord | <Izuku Midoriya]|[π»β> Finally figured out the project i wanna do- |
22:05:38 | FromDiscord | <Izuku Midoriya]|[π»β> (I'm Technisha/Charlotte, just changed name) |
22:05:52 | FromDiscord | <Izuku Midoriya]|[π»β> I'ma make an interpreter for a JSON-based programming language lmaooo |
22:12:10 | FromDiscord | <Izuku Midoriya]|[π»β> What json parser would be the most suitable to this? |
22:12:11 | FromDiscord | <Izuku Midoriya]|[π»β> Preferably later on I'd wanna turn it into a compiler for shits and giggles |
22:12:45 | FromDiscord | <IDF(ardek66)> https://github.com/disruptek/jason |
22:15:45 | FromDiscord | <IDF(ardek66)> make a json2ini transpiler, it would be quite funny |
22:16:16 | FromDiscord | <Izuku Midoriya]|[π»β> Omg |
22:16:16 | FromDiscord | <ElegantBeef> json-based programming language? Encoding the op codes into json nodes for no reason but suffering? |
22:16:29 | FromDiscord | <Izuku Midoriya]|[π»β> In reply to @ElegantBeef "json-based programming language? Encoding": Yup! |
22:17:01 | FromDiscord | <ElegantBeef> Your ideas never cease to cause pain |
22:18:43 | FromDiscord | <Izuku Midoriya]|[π»β> In reply to @ClassyIDF "https://github.com/disruptek/jason": Thanks! |
22:18:55 | FromDiscord | <Izuku Midoriya]|[π»β> In reply to @ElegantBeef "Your ideas never cease": Well, that's basically my whole personality isn't it?- |
22:19:06 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
22:19:24 | FromDiscord | <ElegantBeef> I think it's the phone programming that causes it, once you learn to use a computer it'll be fine |
22:19:46 | * | NimBot joined #nim |
22:19:56 | FromDiscord | <Izuku Midoriya]|[π»β> Welp, night! |
22:20:10 | FromDiscord | <Izuku Midoriya]|[π»β> In reply to @ElegantBeef "I think it's the": Btw, i have a PC but prefer programming on my phone :) |
22:20:14 | FromDiscord | <Izuku Midoriya]|[π»β> I'll see y'all tomorrow lol |
22:23:30 | ForumUpdaterBot | New thread by Grishkin: Creating a wrapper for an already built C/C++ Library using nimterop, see https://forum.nim-lang.org/t/8010 |
22:43:22 | * | PMunch quit (Quit: leaving) |
22:52:15 | Hasnep[m] | Hey guys, Nim newbie. What am I doing wrong here? I'm trying to make a seq containing multiple types: https://play.nim-lang.org/#ix=3nvB |
22:55:47 | FromDiscord | <InventorMatt> https://play.nim-lang.org/#ix=3nvC this should fix your problem |
22:56:25 | FromDiscord | <InventorMatt> you needed to make the animal types ref objects and you needed to define a $ proc for them as well |
22:56:47 | FromDiscord | <InventorMatt> Hasnep |
22:56:51 | Hasnep[m] | Perfect, thanks |
22:57:20 | Hasnep[m] | My googling was focused on the seq, not the type definitions |
23:37:37 | ForumUpdaterBot | New Nimble package! plnim - Language Handler for executing Nim inside postgres as a procedural language, see https://github.com/luisacosta828/plnim |
23:40:38 | * | Jesin joined #nim |