00:15:59 | FromDiscord | <devlop_gaming> In reply to @demotomohiro "Maybe the files you": I took the .lib files from the vc zip file as I was told to do |
00:27:41 | FromDiscord | <demotomohiro> In reply to @devlop_gaming "I took the .lib": Are you sure these .lib files are static link libraries, not import libraries?↵On windows, both static link libraries and import libraries have the same extension.↵If you link import libraries, your executable needs dlls. |
00:33:55 | FromDiscord | <devlop_gaming> In reply to @demotomohiro "Are you sure these": So what am I rlly supposed to do with the .lib files?? |
00:35:01 | FromDiscord | <demotomohiro> DLLs and static link libraries are used for long times by C/C++ programs and there are many resources on the internets that explains about them.↵SDL is a library written in C and Nim can use C libraries.↵Nim uses C compiler and linker to link C libraries and produces an executable.↵Learning about DLL/static link libraries and how to use them with C compilers would helps you. |
00:35:50 | FromDiscord | <devlop_gaming> I can't today so this is all I can do for now |
00:41:52 | FromDiscord | <demotomohiro> If you really need static link libraries, you need to somehow find the static link libraries on the internet built by someone.↵But those static link libraries might be built with C compilers different from the one you use and might not work for you.↵Another way is build static link libraries from source yourself. Most of open source project have readme or some documentations explains how to build from source. |
00:44:55 | FromDiscord | <devlop_gaming> Ik how to build from source(only for linux) |
01:10:07 | * | derpydoo joined #nim |
03:40:54 | * | n|Phreak quit (Ping timeout: 276 seconds) |
04:30:08 | FromDiscord | <amadALTuzia> sent a code paste, see https://play.nim-lang.org/#pasty=zgWOyYCo |
04:30:56 | FromDiscord | <amadALTuzia> im pretty unconfident about Tags being a ref (but its better than a distinct of for now) but does this look not terrible? |
04:31:39 | FromDiscord | <Elegantbeef> It looks ok, why do you need `ref`? |
04:32:04 | FromDiscord | <Elegantbeef> If you don't mind sentinel values `@[]` and `""` can be used instead of `Option` of course |
04:32:19 | FromDiscord | <amadALTuzia> tbh, doesn't look like i need ref in particular |
04:32:38 | FromDiscord | <amadALTuzia> it wouldn't be optimal to use a `distinct of seq[string]` either |
04:32:52 | FromDiscord | <amadALTuzia> though it may be? idk |
04:33:41 | FromDiscord | <Elegantbeef> What semantics are you trying to get? |
04:35:17 | FromDiscord | <amadALTuzia> i'm mostly just trying to make it as easy on myself as possible so i don't have to go insane bringing back functions i need |
04:35:41 | FromDiscord | <Elegantbeef> So then just use `seq[string]` |
04:36:03 | FromDiscord | <amadALTuzia> fairs, cheers \:) |
04:36:30 | FromDiscord | <amadALTuzia> i might need to make command an enum? since theres a few irc commands i would really need |
04:36:38 | FromDiscord | <Elegantbeef> I'm just amazed you're actually making an irc API and not just some matrix spam with the just appearing with a link |
04:36:46 | FromDiscord | <Elegantbeef> Yes enums are preferable |
04:37:07 | FromDiscord | <amadALTuzia> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1362647957316436232): i might need to make command an enum? since theres a few irc commands i would really need to implement into the parser |
04:37:10 | FromDiscord | <amadALTuzia> gotcha, what i thought |
04:37:12 | FromDiscord | <amadALTuzia> cheers \:) |
04:37:33 | FromDiscord | <Elegantbeef> You can use `case` with enums and force everything to be handled so it's the best to do |
04:38:18 | FromDiscord | <amadALTuzia> im making a bot to provide an automod/slowdown for a discord irc bridge |
04:38:30 | FromDiscord | <amadALTuzia> not here btw, its some linux discord server |
04:38:43 | FromDiscord | <Elegantbeef> Damn one way to say "Beef talks too much" |
04:38:56 | FromDiscord | <amadALTuzia> reason being is that discord has an automod and slowmode implemented into the daemon |
04:38:59 | FromDiscord | <amadALTuzia> which is really bad |
04:39:46 | FromDiscord | <amadALTuzia> https://github.com/allthingslinux/atlchat |
04:40:14 | FromDiscord | <amadALTuzia> not even kidding, they wrote it directly into ergo (and now i have slowmode in direct messages!!!) |
04:56:46 | FromDiscord | <amadALTuzia> wait, interesting |
04:56:54 | FromDiscord | <amadALTuzia> i didn't know you can't delete messages in irc |
04:57:35 | FromDiscord | <Elegantbeef> It's just a stream of messages afterall |
04:57:54 | FromDiscord | <Elegantbeef> You only get what you're there for unless you have a bouncer |
04:58:36 | FromDiscord | <amadALTuzia> that is true, it would be out of scope for the bot to handle that stuff so it doesn't seem feasible |
04:59:12 | FromDiscord | <amadALTuzia> that is true, it would be out of scope for the bot to handle blocking messages daemonside so it doesn't seem feasible |
04:59:18 | FromDiscord | <amadALTuzia> that is true, it would be out of scope for the bot to handle blocking messages daemonside |
05:00:56 | FromDiscord | <amadALTuzia> aghhhhhhh whatever, i could make a point system |
05:32:43 | * | amadaluzia quit (Ping timeout: 252 seconds) |
06:02:29 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
06:02:56 | * | SchweinDeBurg joined #nim |
06:05:54 | * | amadaluzia joined #nim |
06:14:37 | * | coldfeet joined #nim |
06:48:22 | * | ntat joined #nim |
07:00:06 | * | zgasma quit (Ping timeout: 244 seconds) |
07:14:57 | * | n|Phreak joined #nim |
09:05:44 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=oLQstRpC |
09:06:23 | FromDiscord | <heysokam> but not `toOct` (typo) |
09:07:33 | FromDiscord | <heysokam> same for `toBin`, if you don't pass in the correct length the result is not what you'd expect compared with toHex |
09:07:38 | FromDiscord | <leorize> because there's a [shortcut](https://nim-lang.org/docs/strutils.html#toHex%2CT) for `toHex` and none for `toOct` |
09:08:26 | FromDiscord | <heysokam> oh, kk |
09:14:25 | * | jinn6 quit (Ping timeout: 272 seconds) |
09:22:16 | * | jinn6 joined #nim |
11:43:08 | * | derpydoo quit (Quit: derpydoo) |
11:50:41 | * | amadaluzia quit (Ping timeout: 265 seconds) |
11:51:09 | * | amadaluzia joined #nim |
12:47:10 | * | beholders_eye joined #nim |
13:13:21 | * | ntat_ joined #nim |
13:20:18 | * | coldfeet quit (Quit: Lost terminal) |
13:20:27 | * | amadaluzia quit (Remote host closed the connection) |
13:46:31 | * | ntat_ quit (Quit: leaving) |
13:49:04 | * | amadaluzia joined #nim |
13:55:41 | * | xtr00 quit (Read error: Connection reset by peer) |
13:59:52 | * | xtr00 joined #nim |
14:08:49 | FromDiscord | <dawidek.2137> what's the difference between malloc and the default allocator? |
14:09:17 | * | n|Phreak is now known as Guest2085 |
14:09:17 | * | Guest2085 quit (Killed (copper.libera.chat (Nickname regained by services))) |
14:09:25 | * | Guest2085 joined #nim |
14:33:23 | * | ntat quit (Quit: leaving) |
14:53:52 | * | ntat joined #nim |
15:38:18 | * | amadaluzia_ joined #nim |
15:39:08 | * | xtr00 quit (Read error: Connection reset by peer) |
15:41:27 | * | tiorock joined #nim |
15:41:28 | * | tiorock quit (Changing host) |
15:41:28 | * | tiorock joined #nim |
15:41:28 | * | rockcavera is now known as Guest4520 |
15:41:28 | * | Guest4520 quit (Killed (calcium.libera.chat (Nickname regained by services))) |
15:41:28 | * | tiorock is now known as rockcavera |
15:43:31 | * | tiorock joined #nim |
15:43:31 | * | tiorock quit (Changing host) |
15:43:31 | * | tiorock joined #nim |
15:43:31 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
15:43:31 | * | tiorock is now known as rockcavera |
15:44:06 | * | xtr00 joined #nim |
15:52:31 | * | xtr00 quit (Read error: Connection reset by peer) |
15:58:23 | * | xtr00 joined #nim |
16:38:54 | * | rockcavera quit (Remote host closed the connection) |
17:53:02 | * | xet7 joined #nim |
17:53:53 | * | xet7 quit (Remote host closed the connection) |
17:55:37 | * | xet7 joined #nim |
17:57:46 | FromDiscord | <.bobbbob> I think I've asked this before, but is there no way to do some kind of parse tree or recursive descent parsing in npeg? |
18:05:22 | * | xet7 quit (Remote host closed the connection) |
18:09:47 | FromDiscord | <leorize> there's an example of building json out of npeg |
18:10:00 | FromDiscord | <leorize> that's what you'd do to build a parse tree out of it too |
18:11:32 | FromDiscord | <.bobbbob> that example doesnt show any captures, all the examples only show capturing into a table or seq, sorry but i'm not understanding how to capturing things into some kind of recursive structure |
18:12:50 | FromDiscord | <.bobbbob> (edit) "capturing" => "capture" |
18:17:07 | FromDiscord | <summarity> npeg isn't good at this (another problem is the firing of blocks whether matches occur or not). I did wrangle it a while ago into giving me a clean parse tree, but it's definitely not something I'd use again for this. Great for one-shot validation though. |
18:17:27 | FromDiscord | <summarity> If you just want recursive descent, the builtin parse utils are fine (take a look at the SQL parser for example) |
18:18:14 | FromDiscord | <leorize> https://github.com/zevv/npeg/blob/master/misc/rod.nim \<- that's basically how you do it↵(@.bobbbob) |
18:18:20 | FromDiscord | <leorize> but yea I agree that npeg isn't really made for this |
18:23:10 | FromDiscord | <Mason Wheeler> sent a code paste, see https://play.nim-lang.org/#pasty=dKyHiolO |
18:25:42 | FromDiscord | <.bobbbob> ic thanks |
18:35:39 | FromDiscord | <amadaluzia> I have further progressed.https://bpa.st/GNQQ |
18:36:45 | FromDiscord | <lainlaylie> In reply to @stormhunter__ "Anyone have any idea": maybe state creation fails and returns nil, that gets caught and an exception is raised, then that nil is passed to the deferred destroy call? |
18:38:40 | FromDiscord | <Mason Wheeler> In reply to @lainlaylie "maybe state creation fails": I'm new to Nim. How would I go about debugging something like that? |
18:39:13 | FromDiscord | <leorize> move the `defer` line to after `if ...isNil` |
18:41:53 | FromDiscord | <lainlaylie> sent a code paste, see https://play.nim-lang.org/#pasty=wwQtOGVo |
18:42:33 | FromDiscord | <leorize> it's equally likely that their version of the brotli C library is broken |
18:43:05 | FromDiscord | <Mason Wheeler> In reply to @leorize "it's equally likely that": Any way to verify that? |
18:43:59 | FromDiscord | <leorize> if you can write C, you can write the same program and see if it SIGSEGV |
18:44:50 | FromDiscord | <leorize> oh wait, that brotli package comes with brotli included |
18:44:59 | FromDiscord | <leorize> are you using the included one or your own library? |
18:47:03 | FromDiscord | <Mason Wheeler> I'm using the package |
18:47:18 | FromDiscord | <leorize> if you're using the included one, then your best bet is to build a `--debugger:native` build, then use a debugger to step and see what went wrong |
18:47:19 | FromDiscord | <Mason Wheeler> And everything builds without any problems |
18:51:56 | FromDiscord | <lainlaylie> BrotliDefaultFreeFunc doesn't seem to nil the freed pointer, so could it be some kind of double free? the other raises in that proc are preceded by an additional call to BrotliDecoderDestroyInstance |
18:58:09 | FromDiscord | <Mason Wheeler> In reply to @leorize "if you're using the": And where do I get a debugger? I try opening this in VS Code and it doesn't understand the Nimble build system or how to run and debug a native build. All the debugging options appear to be JS-related. |
19:05:42 | FromDiscord | <leorize> I'm not familiar with VSCode unfortunately |
19:06:04 | FromDiscord | <leorize> but usually you'd use `gdb` to run the executable |
19:06:39 | FromDiscord | <Mason Wheeler> I tried building it like that, putting in a readline() call, and using that to stop the program so I can attach the normal Visual Studio debugger. It debugs the readline call OK, but it gets lost coming back to my code. |
19:08:46 | FromDiscord | <leorize> assuming that you're using gcc, I'm not sure if VS debugger can follow the code |
19:09:15 | FromDiscord | <Mason Wheeler> GDB? Are people still using that? Like Obi-Wan Kenobi, "that's a name I have not heard in a long time." Like, since the 1990s. |
19:09:19 | FromDiscord | <leorize> but note that stepping within a nim program produces various jumps to helper functions before you enter a function |
19:09:56 | FromDiscord | <leorize> gdb and lldb is still the main debugger on all non-Windows platform |
19:10:06 | FromDiscord | <Mason Wheeler> That's horrifying! |
19:10:39 | FromDiscord | <leorize> if anything, using VS debugger is considered behind the times \:p |
19:11:35 | FromDiscord | <Mason Wheeler> if ever there was any class of developer tool where you'd expect it was simply inconceivable for anyone to use as a command-line-only process, it would be a debugger. |
19:13:23 | FromDiscord | <leorize> lldb/gdb have various GUI integrations (either via their own protocol or Microsoft's DAP), so it's usually integrated with your editor |
19:19:58 | FromDiscord | <summarity> In reply to @stormhunter__ "And where do I": You can get basic debugging with CodeLLDB and the VS Code integration, You'll need the python script from the nim dist to format some of the built-in data types though. |
19:20:32 | FromDiscord | <Mason Wheeler> Thanks, I'll try that |
19:22:10 | FromDiscord | <summarity> Here are some snippets I often use when setting this up in VSC: https://gist.github.com/turbo/1ff608f7488556357f7b07d8f13c1bd4 |
19:31:49 | FromDiscord | <Mason Wheeler> It's erroring because the `preLaunchTask` is undefined |
19:38:14 | FromDiscord | <threefour> I'm getting murdered lately trying to make generic vtables work. I submitted that compiler bug I had before @leorize, and apparently the workaround is to use an object as the vtable instead of a tuple. But now I'm running into this: https://play.nim-lang.org/#pasty=FwHNUPnc |
19:40:06 | FromDiscord | <Elegantbeef> Gotta be atraitor |
19:40:42 | FromDiscord | <leorize> welcome to nim |
19:40:48 | FromDiscord | <threefour> I'd like to make it work manually before I use an abstraction |
19:41:11 | FromDiscord | <Elegantbeef> `--expandMacro:implTrait` wam bam thank you maam |
19:42:01 | FromDiscord | <Mason Wheeler> In reply to @lainlaylie "BrotliDefaultFreeFunc doesn't seem to": Looks like that's exactly what's going on. Now that I can debug into this, I see that I'm hitting the case on line 187, which is freeing the state, and then hitting the defer call. |
19:42:48 | FromDiscord | <threefour> No way. Reordering the declarations made it compile lol |
19:43:02 | FromDiscord | <Elegantbeef> So what traitor does is it boxes the data inside of the object with the Vtable |
19:44:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=EkzaHpdh |
19:45:16 | FromDiscord | <Elegantbeef> Though it actually does this with more boxing |
19:45:38 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=UIQuqdsb |
19:46:00 | FromDiscord | <Elegantbeef> `typeId` is for serializatio |
19:47:07 | FromDiscord | <Elegantbeef> Then you convert your types to `Traitor[T]` after construction as `TypedTraitor` |
19:47:55 | FromDiscord | <threefour> > `# This does not work cause Nim generics really hate fun.`↵I'll say. |
19:50:06 | FromDiscord | <leorize> you haven't used nim if you didn't invoke a compiler bug or two |
19:50:06 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=PvrfUymk |
19:50:21 | FromDiscord | <leorize> you haven't used nim if you hadn't invoke a compiler bug or two |
19:50:45 | FromDiscord | <Elegantbeef> The important thing is `toTrait` which does the boxxing |
19:51:10 | FromDiscord | <Elegantbeef> `emitPointerProc` emits an array of the procs required for the vtable |
19:51:26 | FromDiscord | <Elegantbeef> Which in the above is just `[doStuff]` |
19:52:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ORZAbnbh |
19:52:57 | FromDiscord | <threefour> Gonna need about a week to unpack all this |
19:53:09 | FromDiscord | <Elegantbeef> No there is a `unpackIt` template |
19:53:12 | FromDiscord | <Elegantbeef> 😛 |
19:53:16 | FromDiscord | <threefour> Ha |
19:53:39 | FromDiscord | <Elegantbeef> I could make a small example if you have `Img` and `Graphic` defs laying about |
19:55:19 | FromDiscord | <Elegantbeef> Or I of course could just make my own protect interfaces |
19:55:27 | FromDiscord | <Robyn [She/Her]> what are you talking about Beef |
19:55:37 | FromDiscord | <Elegantbeef> Huh? |
19:55:48 | FromDiscord | <Robyn [She/Her]> I'm curious, haven't followed the convo |
19:55:54 | FromDiscord | <Robyn [She/Her]> Just saw traitor mentioned |
19:55:56 | FromDiscord | <Elegantbeef> Traits |
19:56:07 | FromDiscord | <threefour> You mean functions? In this case, just a straightforward testing impl: https://play.nim-lang.org/#pasty=NeSHFEcc |
19:56:11 | FromDiscord | <Elegantbeef> They're doing it from scratch so I thought I'd pass along my grand wisdom |
19:56:19 | FromDiscord | <threefour> If I can implement this, that'll help me extrapolate to the larger codebase. |
19:56:30 | FromDiscord | <Elegantbeef> Oh you're just doing some silly wrappings |
19:56:56 | FromDiscord | <threefour> Well it gets more complex in the main codebase, but I really just need to get the fundamentals. |
19:58:19 | FromDiscord | <Elegantbeef> Ah you also have a silly behaviour here |
19:58:22 | FromDiscord | <Elegantbeef> Will fix |
19:58:34 | FromDiscord | <threefour> I'm trying to port a project I wrote in Go to improve performance. But I do want to keep the use of interfaces from the original project. |
19:59:27 | FromDiscord | <leorize> so you have chosen pain I see |
19:59:33 | FromDiscord | <threefour> Indeed |
20:03:46 | FromDiscord | <Robyn [She/Her]> ah |
20:03:53 | FromDiscord | <threefour> Perhaps it'd be better to avoid trying to take a core function of Go and recreate it in Nim (interfaces). Is there any straightforward way to port something from using interfaces to some other more Nim-idiomatic approach that I'm not aware of? |
20:04:19 | FromDiscord | <Robyn [She/Her]> Concepts exist but those are compile time↵(@threefour) |
20:04:38 | FromDiscord | <Robyn [She/Her]> You could do type-based dispatch at runtime via methods tho |
20:04:49 | FromDiscord | <Robyn [She/Her]> Iirc ref objects only tho (bc otherwise you'd lose data) |
20:05:27 | FromDiscord | <Robyn [She/Her]> Tho Traitor looks pretty slick, no reason not to use it \:p |
20:08:26 | FromDiscord | <amadaluzia> sent a code paste, see https://play.nim-lang.org/#pasty=LUccHJBJ |
20:08:30 | FromDiscord | <amadaluzia> turns out writing an irc thing is a bit hard |
20:08:38 | FromDiscord | <amadaluzia> turns out writing an irc parser is a bit hard |
20:09:05 | FromDiscord | <amadaluzia> it would have been a bit easier if tags didn't exists, since now i have to deal with another thing using " \:" |
20:09:53 | FromDiscord | <amadaluzia> sent a code paste, see https://play.nim-lang.org/#pasty=VDjfsJLW |
20:17:13 | FromDiscord | <Elegantbeef> Heh @threefour you have mad me make a compiler crash! |
20:17:14 | FromDiscord | <Elegantbeef> made\ |
20:20:40 | * | ntat quit (Quit: leaving) |
20:28:44 | FromDiscord | <threefour> Yeah I seem to have that effect lately |
20:29:42 | FromDiscord | <Elegantbeef> God damn my issue seemed to have been that new grand binding for generics |
20:29:46 | FromDiscord | <threefour> In reply to @Robyn "Concepts exist but those": Has someone written a comprehensive demonstration of concepts? It's not the best term for search engines lol. I only know of https://nim-lang.org/docs/manual_experimental.html#concepts |
20:29:51 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#pasty=jrbFsndN |
20:30:25 | FromDiscord | <Elegantbeef> https://www.jasonbeetham.ca/writeups/codereuse.html it's mentioned here briefly |
20:30:33 | FromDiscord | <Elegantbeef> But you want runtime polymorphism which they don't do |
20:31:01 | FromDiscord | <threefour> Right, but it's something I've been interested in learning more about as an aside, but only found minimal docs. |
20:31:22 | FromDiscord | <Elegantbeef> Anyway the playground link is what traitor does automatically |
20:32:54 | FromDiscord | <Elegantbeef> Notice how we have value types now and use `var T` so we don't force the user to use `ref`s |
20:35:27 | * | syl quit (Ping timeout: 252 seconds) |
20:36:47 | FromDiscord | <threefour> This is great. I'll read up and play around with it. Much appreciated. |
20:37:54 | FromDiscord | <Elegantbeef> No problem, do still atleast suggest trying traitor since it solves these issue and helps in some places like serialization |
20:38:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=UIKafyRp |
20:39:55 | FromDiscord | <Elegantbeef> Try doing that with Nim's OOP and you'll pull your hair out 😄 |
20:40:24 | FromDiscord | <threefour> I probably will end up using Traitor, I just wanted to understand what was going on under the hood before I sell my soul to a library lol |
20:40:44 | FromDiscord | <Elegantbeef> Well that's what `expandMacros` is for |
20:41:25 | FromDiscord | <Elegantbeef> Also how dare you call traitor the devil, it even has passable error messages |
20:42:25 | FromDiscord | <threefour> Well okay, I meant to understand the fundamentals of what's going on under the hood, not the direct code gen. I find it easier to see where pitfalls are by attempting your own implementation first. |
20:42:56 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=WeBSpzwX |
20:43:10 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ILQgtRwU |
20:44:18 | FromDiscord | <Elegantbeef> I also don't recall how far it works but there is also a `traitorNiceNames` for debugging purposes |
20:44:53 | FromDiscord | <Elegantbeef> So instead of `:anonymous` you get like `Trait_ProcName_AtomType` or similar |
20:45:03 | FromDiscord | <Elegantbeef> Not really top support by me to hide that away but it also doesn't work 100% |
20:45:12 | FromDiscord | <threefour> Good to know |
21:05:26 | * | przmk quit (Remote host closed the connection) |
21:06:01 | * | przmk joined #nim |
21:36:38 | * | amadaluzia quit (Remote host closed the connection) |
22:11:45 | * | disso-peach joined #nim |
22:13:13 | * | disso-peach quit (Client Quit) |
22:40:17 | * | beholders_eye quit (Ping timeout: 248 seconds) |
22:40:31 | FromDiscord | <seyfeddine43010> "A group of dwarf cats wearing construction helmets and builder outfits, working together to build a small house using red bricks and cement. The scene is cartoon-style but realistic, with cats holding tools like trowels and shovels. Background includes construction materials, scaffolding, and some trees. Fun and detailed atmosphere." |
22:43:14 | * | xet7 joined #nim |
22:56:18 | FromDiscord | <aintea> Imagine if Nim had a new kind of macros (Rust like macros) where we can do absolutely whatever we want with the syntax whether the syntax is Nim valid or not |
22:56:39 | FromDiscord | <aintea> It would be a niche usecase but just imagine the possibilities |
23:00:24 | FromDiscord | <.bobbbob> In reply to @aintea "Imagine if Nim had": I've been thinking about something like that, it would basically be a string input into a function that you parse and do whatever you want with, but have sugar to not have to put the quotes |
23:00:48 | FromDiscord | <aintea> I have no idea how they do it in Rust |
23:01:03 | FromDiscord | <aintea> But that would mean we could have incredible everything |
23:01:46 | FromDiscord | <aintea> Writing raw SQL, HTML, CSS, extending Nim to have proper pattern matching (we will have it soon, there is a RFC), or even writing Malbolge |
23:17:42 | FromDiscord | <demotomohiro> In reply to @aintea "Imagine if Nim had": You can create such a macro if you put your custom programming language in string literal or const strings like `mymacro"my language"`.↵That macro parse input string and generates `NimNode`. |
23:20:35 | FromDiscord | <aintea> I mean without having quotes |
23:20:42 | FromDiscord | <aintea> Because that's ugly |
23:20:57 | FromDiscord | <aintea> But yeah that would work and I would only need to parse the string |
23:25:20 | FromDiscord | <demotomohiro> In reply to @aintea "I mean without having": I think if you put non-Nim language inside Nim code, you probably need to enclose these code so that Nim compiler and source code reader don't get confused. |
23:26:56 | FromDiscord | <demotomohiro> You can use triple quoted string to put multiple line text and I don't think it is ugly. |
23:27:19 | * | derpydoo joined #nim |
23:32:54 | * | Jjp137 quit (Quit: Leaving) |
23:34:24 | * | Jjp137 joined #nim |
23:45:33 | * | amadaluzia joined #nim |
23:49:48 | * | amadaluzia quit (Ping timeout: 252 seconds) |
23:50:07 | * | amadaluzia joined #nim |