00:07:51 | FromDiscord | <Gumbercules> In reply to @Anton i guess "What's the state of": What's the state of VR in any PL? |
00:11:12 | * | TakinOver quit (Ping timeout: 248 seconds) |
00:15:15 | * | Batzy_ joined #nim |
00:16:32 | * | Batzy_ quit (Client Quit) |
00:17:51 | * | Batzy_ joined #nim |
00:18:32 | * | Batzy quit (Ping timeout: 252 seconds) |
00:44:48 | * | TakinOver joined #nim |
03:35:46 | * | TakinOver quit (Ping timeout: 276 seconds) |
03:51:03 | * | arkurious quit (Quit: Leaving) |
04:23:23 | FromDiscord | <Anton i guess> Does the Nim Godot binding support VR? |
04:31:17 | * | ltriant_ joined #nim |
04:32:11 | * | TakinOver joined #nim |
04:32:43 | * | ltriant quit (Ping timeout: 250 seconds) |
04:55:16 | FromDiscord | <huantian> not sure, though you probably would wanna use godot 4 for vr, which the bindings aren't complete for that yet |
04:59:45 | FromDiscord | <Anton i guess> that's a shame |
05:06:43 | FromDiscord | <huantian> do note that I don't use godot nor develop for vr |
05:06:55 | FromDiscord | <huantian> so take my words with like a jar of salt |
05:15:40 | * | junaid_ joined #nim |
05:32:22 | NimEventer | New Nimble package! results - Friendly value-or-error type, see https://github.com/arnetheduck/nim-results |
05:34:35 | FromDiscord | <Yardanico> yes nimeventer does have this smol bug :) |
05:34:44 | FromDiscord | <Yardanico> it thinks that a package rename is a new package, but it's not a big deal |
05:44:41 | FromDiscord | <ShalokShalom> In reply to @Anton i guess "What's the state of": Nim should work with Godot 3 for VR as well |
05:45:11 | FromDiscord | <ShalokShalom> In reply to @huantian "not sure, though you": Is there one in development at all? |
05:46:34 | * | tinystoat quit (Remote host closed the connection) |
05:46:42 | * | tinystoat joined #nim |
05:49:21 | * | junaid_ quit (Remote host closed the connection) |
05:50:56 | * | tiorock joined #nim |
05:50:56 | * | tiorock quit (Changing host) |
05:50:56 | * | tiorock joined #nim |
05:50:56 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
05:50:56 | * | tiorock is now known as rockcavera |
06:05:55 | * | advesperacit joined #nim |
06:28:49 | FromDiscord | <Chronos [She/Her]> How would I use <https://nim-lang.org/docs/lexbase.html>? |
06:29:35 | FromDiscord | <Chronos [She/Her]> I don't really understand how I'm supposed to use it, honestly |
06:29:53 | FromDiscord | <Yardanico> by creating your own lexer object which will inherit from BaseLexer, it literally says that |
06:30:41 | FromDiscord | <Yardanico> see e.g. <https://github.com/nim-lang/Nim/blob/devel/lib/pure/parsesql.nim> |
06:30:48 | FromDiscord | <Yardanico> all `parse` Nim stdlib modules use lexbase |
06:31:00 | FromDiscord | <Yardanico> i mean the ones that parse different formats |
06:31:24 | FromDiscord | <Yardanico> it's just a lexer, so you write the tokenizer yourself anyway |
06:31:38 | FromDiscord | <Yardanico> and then the AST parser |
06:31:51 | FromDiscord | <Chronos [She/Her]> Ah, I understand now that I read through the example, thanks ^^ |
06:32:46 | FromDiscord | <Yardanico> and for future, you can just do `language:nim import libraryname` to find examples of using some stdlib module |
06:32:58 | FromDiscord | <Elegantbeef> Reading docs is a hell of a drug |
06:33:06 | FromDiscord | <Yardanico> on github search I mean |
06:35:09 | FromDiscord | <Phil> In reply to @Elegantbeef "Reading docs is a": We have chatbots for that now beef, get with the times old man |
06:35:16 | FromDiscord | <Elegantbeef> Right |
06:35:30 | FromDiscord | <Elegantbeef> Sorry I do not like LLMs since they think they're smart |
06:35:35 | FromDiscord | <Elegantbeef> I know i'm not smart and say such |
06:42:35 | * | krydos quit (Quit: Ping timeout (120 seconds)) |
06:42:47 | * | krydos joined #nim |
06:52:15 | FromDiscord | <huantian> In reply to @ShalokShalom "Is there one in": I thought there was |
06:53:57 | FromDiscord | <ShalokShalom> there used to be |
06:54:00 | FromDiscord | <ShalokShalom> halted, stopped |
06:54:20 | FromDiscord | <huantian> ah ok |
06:55:03 | FromDiscord | <huantian> I do wonder how much work it would be |
06:55:35 | FromDiscord | <huantian> if they did it for rust it can't be that hard 😛 ↵though the rust gdextension is still also very in def |
06:55:38 | FromDiscord | <huantian> (edit) "def" => "dev" |
06:55:56 | FromDiscord | <Elegantbeef> Make C bindings for the 600loc then use a macro to parse the json and emit Nim code, how hard could it be 😛 |
06:57:32 | FromDiscord | <huantian> yeah exactly |
06:57:34 | FromDiscord | <huantian> sounds easy |
06:57:43 | FromDiscord | <huantian> beef could probably code it in his sleep |
06:59:54 | FromDiscord | <Rika> Could? He already did |
07:01:17 | FromDiscord | <huantian> man beef is so cracked |
07:06:15 | FromDiscord | <Elegantbeef> Jokes aside it's a pretty tame json file, though there are some shitty things like `value": "Color(0.541176, 0.168627, 0.886275, 1` |
07:21:33 | NimEventer | New thread by LP: How to read integers from keyboard, see https://forum.nim-lang.org/t/10132 |
07:28:31 | * | jmcantrell left #nim (#nim) |
07:34:56 | FromDiscord | <Z3NTL3> @Yardanico can let or const variables cause gcsafe problems? |
07:34:57 | FromDiscord | <Z3NTL3> nope right |
07:34:58 | FromDiscord | <Z3NTL3> ? |
07:35:03 | FromDiscord | <Yardanico> why do you ping me |
07:35:09 | FromDiscord | <Z3NTL3> bcs your the main contributor |
07:35:18 | FromDiscord | <Yardanico> no i am not |
07:35:24 | FromDiscord | <Z3NTL3> k srry but can u answer |
07:35:43 | FromDiscord | <Yardanico> and even then, pinging someone specifically in projects is considered quite rude unless your question directly applies to something I did personally, like a repo or a PR |
07:35:59 | FromDiscord | <Yardanico> let variables of course can cause gcsafe problems, but you didn't describe what your problem is |
07:36:10 | * | rockcavera quit (Remote host closed the connection) |
07:38:50 | FromDiscord | <Z3NTL3> sent a long message, see http://ix.io/4uir |
07:39:04 | * | Notxor joined #nim |
07:39:22 | FromDiscord | <Z3NTL3> can i send u in dm me code and then maybe u can understand better what i mean |
07:39:35 | FromDiscord | <Elegantbeef> so `{.cast(gcSafe.}: unsafe code here` problem solved |
07:39:42 | FromDiscord | <Yardanico> sorry, i'm busy now, but you can post a simplified version of your code here or on the forum and someone else might help. also, if your dir path is always the same, why not make it a const? |
07:39:55 | FromDiscord | <Z3NTL3> it didnt allow me to make a const |
07:40:16 | FromDiscord | <Z3NTL3> nvm it does |
07:40:25 | FromDiscord | <Elegantbeef> lol |
07:41:17 | FromDiscord | <Z3NTL3> In reply to @Yardanico "sorry, i'm busy now,": https://media.discordapp.net/attachments/371759389889003532/1100688034204233819/bot.nim |
07:41:36 | FromDiscord | <Yardanico> why are you even using threads for this? |
07:41:41 | FromDiscord | <Yardanico> async is much better suited for IO-heavy stuff |
07:41:52 | * | xet7 joined #nim |
07:42:11 | FromDiscord | <Z3NTL3> async io runs one thread? |
07:42:28 | FromDiscord | <Z3NTL3> and i will allow them to provide a list.txt with multiple imdb serie/movie ids |
07:42:39 | FromDiscord | <Elegantbeef> `addr(proxyUrl).isNil` interesting that'll never be nill |
07:42:42 | FromDiscord | <Z3NTL3> i want the app to complete fast and in parallel |
07:43:03 | FromDiscord | <Elegantbeef> What an elaborate way to write `proxUrl` |
07:43:15 | FromDiscord | <Yardanico> In reply to @Z3NTL3 "i want the app": if you don't do CPU-heavy stuff it will work very fast |
07:43:29 | FromDiscord | <Yardanico> and no one stops you from launching 16 processes, with each of them doing async scraping |
07:43:32 | FromDiscord | <Elegantbeef> Multi threading it does not make it any faster |
07:43:36 | FromDiscord | <Elegantbeef> It's IO blocking |
07:43:53 | FromDiscord | <Elegantbeef> A vast majority of your time is sitting there waiting for buffers to fill |
07:43:56 | FromDiscord | <Yardanico> that's how I did it when i was scraping a website, I just used async and scraped different ID ranges, wrote results to a MariaDB database |
07:43:58 | FromDiscord | <Z3NTL3> In reply to @Yardanico "and no one stops": k will change it ty |
07:43:59 | FromDiscord | <Elegantbeef> Not doing anything on the CPU |
07:44:04 | FromDiscord | <Yardanico> and launched 16 processes with different ID ranges so they don't overlap |
07:44:25 | FromDiscord | <Z3NTL3> In reply to @Elegantbeef "What an elaborate way": 😂 |
07:44:26 | FromDiscord | <Yardanico> not sqlite because sqlite can't do concurrent writes, but any "big" DB can |
07:45:44 | FromDiscord | <Elegantbeef> Also Nim is not Cobol there is no reason to capitalise variables |
07:48:37 | FromDiscord | <Phil> Screaming case for global constants, fite me |
07:48:40 | FromDiscord | <Z3NTL3> i like my capslock to much |
07:48:51 | FromDiscord | <Elegantbeef> There is no reason for that phil |
07:48:56 | FromDiscord | <Elegantbeef> Those are literally the least important part of code |
07:49:17 | FromDiscord | <Yardanico> i PascalCase for normal constants |
07:49:18 | FromDiscord | <Elegantbeef> Ostensibly screaming is to indicate importance |
07:49:20 | FromDiscord | <Phil> There is, i want them differentiated from normal variables and type definitions |
07:49:23 | FromDiscord | <Elegantbeef> A constant is by definition not important |
07:49:38 | FromDiscord | <Elegantbeef> There is no reason to want to differentiate |
07:49:41 | FromDiscord | <Elegantbeef> Atleast imo |
07:50:15 | FromDiscord | <Elegantbeef> You cannot mutate them so there is no reason to be scared of mistaking them for variables |
07:50:24 | FromDiscord | <Elegantbeef> They're values so they cannot go in the place of types |
07:50:26 | FromDiscord | <Phil> I want to see the implication whether I need to think about a variable or not.↵If it's constant I can stop thinking about it, that's why I want to be able to distinguish them at a glance |
07:51:08 | FromDiscord | <Elegantbeef> Yea I do not see the point |
07:51:12 | FromDiscord | <Phil> And screaming case is the default way ingrained to me from multiple languages now |
07:51:16 | FromDiscord | <Elegantbeef> It's needless holding of a key for no reason |
07:51:56 | FromDiscord | <Phil> It optimizes code reading at a glance |
07:52:13 | FromDiscord | <Elegantbeef> I vastly disagree and we'll never meet |
07:52:26 | FromDiscord | <Z3NTL3> i dont see any proc in asyncdispath to create an event loop with multiple future tasks added into that event and then to wait for the whole eventloop to finish |
07:52:50 | FromDiscord | <Elegantbeef> `waitFor all(myFutures)` |
07:52:50 | FromDiscord | <Yardanico> In reply to @Z3NTL3 "i dont see any": you don't need anything specific for that, you just create call async procs and save them into a sequence then await it |
07:52:58 | FromDiscord | <Yardanico> check e.g. <https://github.com/Yardanico/adbscan/blob/master/src/adbscan.nim> |
07:53:02 | FromDiscord | <Z3NTL3> k |
07:53:13 | FromDiscord | <Yardanico> does async network stuff, limits amount of "workers" at the same time |
07:55:30 | FromDiscord | <Rika> In reply to @Yardanico "not sqlite because sqlite": It can now can’t it |
07:55:35 | FromDiscord | <Yardanico> huh? |
07:55:44 | FromDiscord | <Yardanico> it can do concurrent reads, but are you sure about writes? |
07:55:47 | FromDiscord | <Yardanico> afaik it never could |
07:55:57 | FromDiscord | <Z3NTL3> guys nim is faster than node right? |
07:56:36 | FromDiscord | <Yardanico> yes if your code is written in a way that is not slower than the node alternative |
07:56:43 | FromDiscord | <Yardanico> and if you measure with your app compiled with `-d:release` |
07:57:26 | FromDiscord | <Z3NTL3> one more question:↵↵What if i use threadpool with spawnX and then have this procedure ran and inside this procedure async call to me other async proc https://media.discordapp.net/attachments/371759389889003532/1100692096375062548/image.png |
07:57:34 | FromDiscord | <Z3NTL3> is that a good to go thing |
07:57:40 | FromDiscord | <Yardanico> threads with async are a complicated thing |
07:57:47 | FromDiscord | <Yardanico> you should stick to just either right now, not to both |
07:58:24 | FromDiscord | <Z3NTL3> but in theory it should work right and make it as fast as possible |
07:58:56 | FromDiscord | <Yardanico> if you want to, of course you can write it that way, but you should expect to spend more time on doing that |
07:59:03 | FromDiscord | <Yardanico> it's not a common thing to do in Nim |
07:59:04 | FromDiscord | <Z3NTL3> btw im new into nim but these concepts do not change per language, i wish nim has a high level concurrency like in Go |
07:59:08 | FromDiscord | <Z3NTL3> goroutines are so good |
07:59:23 | FromDiscord | <Z3NTL3> (edit) "has" => "had" |
07:59:47 | FromDiscord | <Z3NTL3> but its just in the stable release can we see a parallel concept in the future like in go the goroutines |
07:59:54 | FromDiscord | <Z3NTL3> its different from normal threads |
07:59:59 | FromDiscord | <Z3NTL3> and quite lightweight and yet powerful |
08:00:14 | FromDiscord | <Z3NTL3> In reply to @Yardanico "it's not a common": oke but ur saying only async is already going to be fast? |
08:01:03 | FromDiscord | <ShalokShalom> In reply to @Isofruit "Screaming case for global": First letter is enough |
08:01:49 | FromDiscord | <huantian> In reply to @Yardanico "check e.g. <https://github.com/Yardanico/adbscan/bl": Ooh another example of limiting async? How did you do it, I did some janky stuff with callbacks myself |
08:02:16 | FromDiscord | <ShalokShalom> If you give them different meanings, you see what that is. ↵↵Variables have different meanings |
08:02:28 | FromDiscord | <huantian> I might swap to a semaphore-y thing if I care enough |
08:02:36 | FromDiscord | <Yardanico> In reply to @huantian "Ooh another example of": i mean the code is pretty naive |
08:02:39 | FromDiscord | <Yardanico> just global variables ;) |
08:02:48 | FromDiscord | <Yardanico> increase count when starting a "worker", decrease when it's done |
08:02:52 | FromDiscord | <Yardanico> and limit by that |
08:03:04 | FromDiscord | <Yardanico> since async is single-threaded it works fine |
08:03:12 | FromDiscord | <huantian> Mmm makes sense |
08:03:34 | FromDiscord | <huantian> So each future loops until the worker count is below the max? |
08:03:41 | FromDiscord | <Z3NTL3> .async.pragma turns the proc implicitly to a future i guess? right |
08:04:25 | FromDiscord | <Yardanico> In reply to @huantian "So each future loops": no, the main while loop that walks over IPs just waits when all "workers" are busy |
08:04:25 | FromDiscord | <DestyNova> sent a long message, see http://ix.io/4uiI |
08:04:40 | FromDiscord | <Rika> I thought they had figured out a new system to allow for concurrent write |
08:04:53 | FromDiscord | <Yardanico> <https://github.com/Yardanico/adbscan/blob/master/src/adbscan.nim#L90-L94> and <https://github.com/Yardanico/adbscan/blob/master/src/adbscan.nim#L166-L181> |
08:04:54 | FromDiscord | <huantian> In reply to @Yardanico "no, the main while": Ahh that’s actually a lot more simple than my solution |
08:05:21 | FromDiscord | <huantian> Maybe I’ll swap to yours lmao and get rid of my recursive callback nonsense |
08:05:32 | FromDiscord | <Yardanico> my tool wasn't supposed for scanning hundrends of thousands of IPs anyway since masscan does all the starting heavy lifting to find IPs that actually respond to port 5555 |
08:05:46 | FromDiscord | <Yardanico> so it only needs to scan at most a few thousands of IPs |
08:05:56 | FromDiscord | <huantian> Yeah I’m doing this to download like at most a few thousand files |
08:06:00 | FromDiscord | <huantian> So it should be fine |
08:06:25 | FromDiscord | <huantian> Lemme just send this message with a keyword so I can find this convo later “async wack” |
08:06:32 | FromDiscord | <DestyNova> In reply to @Rika "I thought they had": Well the blurb I copied from was last updated a year ago so maybe they have something new coming out. That would be sweet |
08:07:23 | FromDiscord | <DestyNova> Actually 4 months ago |
08:08:42 | FromDiscord | <Yardanico> In reply to @Z3NTL3 ".async.pragma turns the proc": it does a lot more |
08:09:11 | FromDiscord | <Yardanico> just compile with `-d:nimDumpAsync` and the compiler will show you the transformed versions of your async procs |
08:09:20 | FromDiscord | <Yardanico> <https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncmacro.nim#L287> |
08:17:10 | FromDiscord | <Z3NTL3> https://media.discordapp.net/attachments/371759389889003532/1100697061483085895/test.nim |
08:17:13 | FromDiscord | <Z3NTL3> im dumb i guess |
08:17:26 | FromDiscord | <Z3NTL3> that spawnX at the very bottom is not allowed |
08:17:50 | FromDiscord | <Z3NTL3> but in the docs didnt it tell about async macro which can contain awaitable futures in the body scope, casting it to a thread cannot be done to |
08:21:17 | FromDiscord | <Yardanico> you're mixing up different things, just stick to async |
08:21:35 | FromDiscord | <Yardanico> then you just create a seq of futures, add all of your calls (if you want ALL of them to be done at the same time), and just await all(myseq) |
08:21:50 | FromDiscord | <Yardanico> asyncdispatch exports asyncfutures https://nim-lang.org/docs/asyncfutures.html#all%2Cvarargs%5BFuture%5BT%5D%5D |
08:26:15 | FromDiscord | <Z3NTL3> k done |
08:36:23 | FromDiscord | <Z3NTL3> the first resultin works but at the second loop i get SIGSEGV: Illegal storage access. (Attempt to read from nil?)↵↵but nothing is nil here https://media.discordapp.net/attachments/371759389889003532/1100701899616952340/test.nim |
08:43:11 | FromDiscord | <Z3NTL3> oh i know why |
10:40:10 | * | lucasta quit (Remote host closed the connection) |
11:02:16 | FromDiscord | <ratapenado> hello, is there a clear and simple tutorial explainig how to wrap a C++ library somewhere ? I would like to create a small and simple tool based on exiv2, (C++ library to read/write pictures metadata). I know a bit C but not at all C++, it's not ideal but I know I would try to give it a shot anyway |
11:03:30 | FromDiscord | <Yardanico> In reply to @ratapenado "hello, is there a": "clear and simple" honestly I don't think so :( |
11:03:38 | FromDiscord | <Yardanico> but if the library has a simple enough interface, it shouldn't be too hard |
11:08:06 | FromDiscord | <arnetheduck> In reply to @ratapenado "hello, is there a": we're writing one: https://github.com/status-im/nim-style-guide/pull/13 - it might not be "clear and simple" at this stage though |
11:22:58 | * | junaid_ joined #nim |
11:26:29 | FromDiscord | <ratapenado> Ok thanks, and if I just ask for a clear one 😅 |
11:32:40 | * | junaid_ quit (Remote host closed the connection) |
11:33:11 | FromDiscord | <ratapenado> In reply to @arnetheduck "we're writing one: https://github.com/status-im/nim": Hmm the recommended way is thus to write a C wrapper first. That's too much for me I guess |
11:34:40 | FromDiscord | <jmgomez> sent a long message, see http://ix.io/4ujW |
11:36:04 | FromDiscord | <jmgomez> (edit) "http://ix.io/4ujW" => "http://ix.io/4ujY" |
11:55:50 | FromDiscord | <Z3NTL3> So basically i got an var with xml tree and an iterator extracting the required data and adding it into an sequence but after this iteration is completed that var can be freed. However i cannot find online any solution about how to delete it from the heap |
11:56:30 | FromDiscord | <Z3NTL3> (edit) "an" => "another var which is a" | "another var which is asequence but after this iteration is completed that var ... can" added "for xmltree" |
12:19:56 | FromDiscord | <demotomohiro> In reply to @ratapenado "hello, is there a": https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma↵Or open nim manual page and ctrl + f "importcpp".↵There are explanation and example code to wrap C++ with Nim. |
12:22:01 | FromDiscord | <demotomohiro> https://github.com/Clonkk/nim-cppstl↵Nim Bindings for C++ STL stuff.↵It might helps you. |
12:31:55 | FromDiscord | <ratapenado> thanks |
12:52:40 | NimEventer | New thread by drkameleon: Checking whether we are in .compileTime, see https://forum.nim-lang.org/t/10133 |
13:31:26 | * | Notxor quit (Quit: Leaving) |
13:49:51 | * | advesperacit quit (Ping timeout: 255 seconds) |
13:50:06 | * | advesperacit joined #nim |
13:57:38 | * | rockcavera joined #nim |
13:58:03 | * | xet7 quit (Ping timeout: 260 seconds) |
14:04:19 | * | progranner joined #nim |
14:15:29 | * | TakinOver quit (Ping timeout: 246 seconds) |
14:22:12 | FromDiscord | <Z3NTL3> Does it mean when creating a new async dispatcher it means a new thread responsble for n amount of Futures |
14:36:05 | FromDiscord | <Phil> In reply to @ShalokShalom "First letter is enough": Thats for type declarations don't mix them with constant amings |
14:36:16 | FromDiscord | <Phil> (edit) "amings" => "namings" |
14:42:08 | FromDiscord | <arnetheduck> sent a long message, see http://ix.io/4ukP |
14:42:11 | * | Notxor joined #nim |
14:43:09 | * | TakinOver joined #nim |
14:48:15 | FromDiscord | <arnetheduck> sent a long message, see http://ix.io/4ukQ |
15:00:15 | FromDiscord | <jmgomez> In reply to @arnetheduck "ah nice - thanks": I think runtime reflection system + Nim macros are a great combination to make bindings quickly . I think it should be possible to have something similar with other platforms (i.e .NET) to have more variety of libraries available from Nim |
15:09:53 | FromDiscord | <Chronos [She/Her]> In reply to @jmgomez "I think runtime reflection": .NET uses a runtime though so you'd likely have a performance decrease, wouldn't you? |
15:10:08 | FromDiscord | <Chronos [She/Her]> Of course, if a C# backend existed then that's not an issue if you're doing C# interop |
15:11:28 | FromDiscord | <jmgomez> Better than having to do everything from scratch though. For things IO related work it doesnt even matter (i.e. a library for talking to a database) |
15:12:05 | FromDiscord | <Chronos [She/Her]> Why wouldn't it matter? |
15:12:34 | FromDiscord | <Chronos [She/Her]> Also, Rust exists... I wonder if automating binding generation from that is an idea :p |
15:12:41 | FromDiscord | <jmgomez> Becasue the perf delta is not the bottleneck |
15:12:46 | FromDiscord | <Chronos [She/Her]> Ah fair |
15:13:18 | FromDiscord | <jmgomez> In reply to @Hourglass, When the Hour Strikes "Also, Rust exists... I": I dont think there is a general way to do so though |
15:13:47 | FromDiscord | <Chronos [She/Her]> Tbf Rust uses LLVM, could probably use LLVM APIs? |
15:13:50 | FromDiscord | <ratapenado> In reply to @arnetheduck "I'm not sure about": I guess the API is stable. At least it's well documented. I will see what I can do but I’m not holding my breath |
15:15:01 | FromDiscord | <jmgomez> In reply to @Hourglass, When the Hour Strikes "Tbf Rust uses LLVM,": how so? You go from Rust to LLVM no the other way around |
15:16:02 | FromDiscord | <Chronos [She/Her]> Doesn't Futhark use llvm APIs for generating C bindings? |
15:16:05 | FromDiscord | <jmgomez> The point of relaying on a reflection system API is that you know upfront the API. You "only" need to map the primitive types and make the interop work |
15:16:13 | FromDiscord | <jmgomez> No, it uses clang |
15:16:22 | FromDiscord | <Chronos [She/Her]> I'm sure Rust has some APIs exposed for that? |
15:16:25 | FromDiscord | <Chronos [She/Her]> Ah okay then |
15:16:42 | FromDiscord | <Chronos [She/Her]> In reply to @jmgomez "The point of relaying": Fair enough |
15:26:07 | * | Notxor quit (Remote host closed the connection) |
15:53:23 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:53:52 | * | progranner joined #nim |
15:58:34 | * | Notxor joined #nim |
16:09:37 | * | arkurious joined #nim |
16:15:09 | FromDiscord | <arnetheduck> see also https://github.com/arnetheduck/nbindgen/ |
16:19:23 | * | xet7 joined #nim |
17:00:31 | FromDiscord | <sOkam!> sent a code paste, see https://paste.rs/YKY |
17:02:45 | FromDiscord | <0ffh> Although it wouldn't make sense anyway, this function silently fails for all numbers that are not 2^n. |
17:03:55 | FromDiscord | <0ffh> Maybe extend the assertion accordingly. |
17:06:58 | FromDiscord | <Chronos [She/Her]> In reply to @arnetheduck "see also https://github.com/arnetheduck/nbindgen/": Oh neat! |
17:14:09 | * | TakinOver quit (Remote host closed the connection) |
17:21:46 | * | TakinOver joined #nim |
17:26:11 | * | lucasta joined #nim |
17:32:23 | * | Notxor quit (Remote host closed the connection) |
17:34:59 | FromDiscord | <Elegantbeef> @sOkam! why not `T: SomeInteger` instead of a runtime assert? |
17:36:06 | FromDiscord | <sOkam!> In reply to @Elegantbeef "<@186489007247589376> why not `T:": tru |
17:38:44 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4ulB |
17:39:26 | FromDiscord | <sOkam!> Thats why I was wondering if Nim already has something like this |
17:40:31 | FromDiscord | <0ffh> sent a code paste, see https://play.nim-lang.org/#ix=4ulC |
17:41:51 | FromDiscord | <sOkam!> how is that different than `to % 2`? |
17:42:36 | FromDiscord | <0ffh> In reply to @sOkam! "how is that different": You should check that to is 2^n, otherwise the function will silently fail for e.g. to == 6. |
17:42:57 | FromDiscord | <0ffh> See my comment above. |
17:43:15 | FromDiscord | <sOkam!> ah true |
17:43:34 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:49:03 | * | progranner joined #nim |
17:54:48 | * | lucasta quit (Remote host closed the connection) |
18:17:33 | NimEventer | New thread by demetera: Optimise async request / code [For Beginners] , see https://forum.nim-lang.org/t/10134 |
18:21:37 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
18:23:17 | * | progranner joined #nim |
18:29:39 | * | Notxor joined #nim |
19:15:53 | NimEventer | New thread by awr1: Semcheck a NimNode tree?, see https://forum.nim-lang.org/t/10135 |
19:19:08 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:21:28 | * | progranner joined #nim |
19:32:30 | * | krux02 joined #nim |
19:45:20 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:55:58 | FromDiscord | <⚶ Zeno> hello world, is there nim equivalent of python's itsdangerous module ? |
19:56:14 | FromDiscord | <⚶ Zeno> quick google doesn't show me anything, unless i suck at googling |
19:57:33 | * | progranner joined #nim |
20:26:09 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
20:29:08 | * | progranner joined #nim |
20:47:27 | * | rockcavera quit (Ping timeout: 255 seconds) |
21:04:57 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
21:05:40 | NimEventer | New thread by vsajip: After upgrading to Nim 1.6.12, my tests generate a lot of warnings - how to address?, see https://forum.nim-lang.org/t/10136 |
21:28:46 | NimEventer | New thread by JohnAD: Any known means of sorting UTF8 strings?, see https://forum.nim-lang.org/t/10137 |
21:55:27 | FromDiscord | <Nlits (Ping on reply)> Again, is there any good way to compile and template nim code run time? |
22:14:37 | * | Notxor quit (Remote host closed the connection) |
22:20:47 | FromDiscord | <0ffh> wdym? |
22:21:02 | FromDiscord | <0ffh> Usually compile time is strictly before runtime. |
22:21:51 | FromDiscord | <0ffh> Unless you call out to Nim to compile a library and load it dynamically. |
22:22:17 | FromDiscord | <0ffh> @Nlits (Ping on reply) |
22:23:40 | FromDiscord | <Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4um9 |
22:24:48 | FromDiscord | <0ffh> Yeah, so you call out to Nim, or alternatively you import the compiler into your program. |
22:25:07 | FromDiscord | <0ffh> So you know how to do that already. |
22:26:03 | FromDiscord | <0ffh> What do you need then, are you asking how to dynamically load a library? |
22:28:41 | FromDiscord | <Nlits (Ping on reply)> In reply to @0ffh "Yeah, so you call": Ik i can import the compiler but I have no ideas what functions to call |
22:32:00 | FromDiscord | <qb> sent a code paste, see https://play.nim-lang.org/#ix=4umb |
22:50:21 | FromDiscord | <qb> nvm got it |
23:03:14 | * | rockcavera joined #nim |
23:05:31 | * | advesperacit quit () |
23:10:28 | FromDiscord | <0ffh> sent a long message, see http://ix.io/4umi |
23:13:20 | * | TakinOver quit (Ping timeout: 250 seconds) |
23:27:21 | * | lucasta joined #nim |
23:40:25 | * | xet7 quit (Ping timeout: 240 seconds) |