00:03:41 | * | auxym_ quit (Ping timeout: 252 seconds) |
00:37:14 | FromDiscord | <fae> So many features in Nim lol. Was trying to get way too fancy with the macrocache module, and now I have just figured out there’s a compileTime pragma lol |
00:40:07 | FromDiscord | <Elegantbeef> Well depending on what you're doing, but macrocache will be better as it will work with the IC |
00:46:14 | FromDiscord | <fae> Good to know |
00:47:04 | FromDiscord | <fae> Does it persist to some db or something |
00:48:28 | FromDiscord | <Elegantbeef> I think it's just easier to handle serialization for the cache as such is what is prefered |
00:48:42 | FromDiscord | <Elegantbeef> Since it stores AST instead of arbitrary types |
00:49:56 | FromDiscord | <Elegantbeef> But yes it's stored in/with the rod files(name of the IC files) |
01:04:13 | * | bkay joined #nim |
01:04:44 | * | beshr quit (Ping timeout: 252 seconds) |
01:12:24 | * | neurocyte8 joined #nim |
01:12:24 | * | neurocyte8 quit (Changing host) |
01:12:24 | * | neurocyte8 joined #nim |
01:13:50 | * | audiophile_ joined #nim |
01:16:17 | * | neurocyte quit (Ping timeout: 252 seconds) |
01:16:17 | * | neurocyte8 is now known as neurocyte |
01:25:53 | * | Gustavo6046 quit (Remote host closed the connection) |
01:34:19 | * | Gustavo6046 joined #nim |
01:58:07 | * | audiophile_ quit (Quit: Default Quit Message) |
02:20:23 | * | flynn quit (Read error: Connection reset by peer) |
02:21:29 | * | flynn joined #nim |
02:45:01 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
02:47:31 | * | arkurious quit (Quit: Leaving) |
02:53:38 | * | bkay quit (Ping timeout: 252 seconds) |
02:57:12 | * | Gustavo6046 joined #nim |
03:02:26 | * | audiophile_ joined #nim |
03:05:19 | * | audiophile joined #nim |
03:08:29 | * | audiophile_ quit (Ping timeout: 252 seconds) |
03:08:30 | * | audiophile is now known as audiophile_ |
03:17:40 | * | Gustavo6046 quit (Ping timeout: 240 seconds) |
03:32:37 | * | audiophile_ quit (Quit: Default Quit Message) |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:30 | * | supakeen joined #nim |
04:10:52 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3xXW |
04:11:05 | FromDiscord | <Elegantbeef> You can with macros 😛 |
04:11:13 | FromDiscord | <impbox [ftsf]> >_> |
04:11:49 | FromDiscord | <Elegantbeef> No you cannot easily do it though |
04:13:17 | FromDiscord | <Elegantbeef> https://github.com/beef331/constructor/blob/master/tests/timplements.nim example of what new concepts + a macro can do |
04:13:57 | FromDiscord | <Elegantbeef> Dont recall how that works presently |
04:13:58 | FromDiscord | <impbox [ftsf]> nice |
04:47:12 | * | flynn quit (Ping timeout: 256 seconds) |
04:48:31 | * | flynn joined #nim |
06:43:30 | * | jjido joined #nim |
06:50:04 | NimEventer | New thread by Stefan_Salewski: JSON serialization of objects containing tuples, see https://forum.nim-lang.org/t/8399 |
07:20:43 | * | beshr joined #nim |
07:55:27 | * | max22- joined #nim |
08:40:27 | * | supakeen quit (Remote host closed the connection) |
08:40:52 | * | supakeen joined #nim |
09:06:34 | * | flynn quit (Read error: Connection reset by peer) |
09:07:44 | * | flynn joined #nim |
09:27:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:11:08 | * | flynn quit (Read error: Connection reset by peer) |
10:12:15 | * | flynn joined #nim |
10:17:10 | * | audiophile_ joined #nim |
10:18:41 | * | audiophile_ quit (Client Quit) |
10:27:05 | FromDiscord | <ynfle (ynfle)> Is there a way to not have `json` escape strings? |
10:28:05 | FromDiscord | <ynfle (ynfle)> With out rewriting `toUgly` or `pretty` |
10:28:15 | FromDiscord | <enthus1ast> then its not valid json; what do you want to archive? |
10:31:47 | FromDiscord | <ynfle (ynfle)> Not archive anything. Using it as a communication tool |
10:32:59 | FromDiscord | <enthus1ast> sorry, the proper english word is\: achieve |
10:33:02 | FromDiscord | <enthus1ast> \:) |
10:33:28 | * | auxym_ joined #nim |
10:34:30 | FromDiscord | <ynfle (ynfle)> OH haha |
10:34:49 | FromDiscord | <ynfle (ynfle)> Communicate with service that doesn't want escaped json for proper display |
10:36:06 | FromDiscord | <haxscramper> so it expects `{field: value}` instead of `{"field": "value"}`? |
10:39:21 | FromDiscord | <ynfle (ynfle)> No. Just no espacing newlines for wehere I want a new line displayed |
10:39:34 | FromDiscord | <ynfle (ynfle)> meaning the semantice difference between `\n` & `\\n` |
10:39:41 | FromDiscord | <enthus1ast> json must encode \\n |
10:39:48 | FromDiscord | <ynfle (ynfle)> y? |
10:39:53 | FromDiscord | <enthus1ast> yeah |
10:39:59 | FromDiscord | <ynfle (ynfle)> ? |
10:40:09 | * | jjido joined #nim |
10:40:17 | FromDiscord | <enthus1ast> inside a json string the newline must be encoded |
10:40:28 | FromDiscord | <ynfle (ynfle)> Y? |
10:40:36 | FromDiscord | <ynfle (ynfle)> Is that the spec? |
10:44:31 | FromDiscord | <enthus1ast> https://datatracker.ietf.org/doc/html/rfc7159#section-7 "...except for the characters that must be escaped\:↵ quotation mark, reverse solidus, and the control characters (U+0000↵ through U+001F)...." |
10:44:44 | FromDiscord | <enthus1ast> "U+000A" |
10:45:06 | FromDiscord | <enthus1ast> but INSIDE a json string |
10:45:32 | * | auxym_ quit (Read error: No route to host) |
10:45:52 | * | auxym_ joined #nim |
10:46:25 | FromDiscord | <enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/884026255530409995): "U+000A" == \<End of Line\> (EOL, LF, NL) |
10:48:07 | FromDiscord | <enthus1ast> ? |
10:48:10 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3xYR |
10:48:50 | FromDiscord | <enthus1ast> if yes then it's a strange service \:D |
10:49:03 | FromDiscord | <ynfle (ynfle)> No |
10:49:31 | FromDiscord | <ynfle (ynfle)> `{"foo": "baa\nzaa\ngaa"}` |
10:49:41 | FromDiscord | <ynfle (ynfle)> So I guess yes |
10:50:00 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:50:48 | FromDiscord | <enthus1ast> no this would be correct |
10:51:54 | FromDiscord | <ynfle (ynfle)> Which? |
10:51:57 | FromDiscord | <ynfle (ynfle)> I'm confused |
10:52:04 | * | auxym_ quit (Ping timeout: 252 seconds) |
10:52:06 | FromDiscord | <enthus1ast> this one is correct sjon |
10:53:38 | * | xet7 quit (Quit: Leaving) |
10:56:17 | FromDiscord | <Rika> What are you seeing that is unexpected then? |
11:05:25 | * | auxym_ joined #nim |
11:06:08 | FromDiscord | <ynfle (ynfle)> So I'm confused |
11:06:22 | * | max22- quit (Ping timeout: 245 seconds) |
11:14:58 | FromDiscord | <cabboose> yo am i to understand the selector module kind of gives a threadsafe Qt signal like architecture? |
11:15:02 | FromDiscord | <cabboose> not like signals |
11:15:04 | * | auxym_ quit (Read error: No route to host) |
11:15:04 | FromDiscord | <cabboose> but at the same time |
11:15:07 | FromDiscord | <cabboose> like signals |
11:15:26 | * | auxym_ joined #nim |
11:15:28 | FromDiscord | <cabboose> 👀 |
11:16:57 | FromDiscord | <cabboose> I mean I was going to use channels to pass around jobs but if selectors has a api for that kind of thing then great |
11:23:58 | * | auxym_ quit (Ping timeout: 252 seconds) |
11:30:10 | * | auxym_ joined #nim |
11:38:33 | * | PMunch joined #nim |
12:02:41 | * | jjido joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2.1) |
12:06:31 | * | supakeen joined #nim |
12:09:40 | * | auxym_ quit (Ping timeout: 250 seconds) |
12:10:55 | * | auxym_ joined #nim |
12:18:07 | FromDiscord | <ynfle (ynfle)> I thought you said that `\n` has to be escaped? |
12:18:56 | FromDiscord | <enthus1ast> no, the literal newline must be converted to "\\n" when in json string |
12:23:32 | FromDiscord | <enthus1ast> this means that a literal newline is not allowed in json string |
12:24:24 | FromDiscord | <enthus1ast> can you describe your issue? Maybe it's something else completely |
12:24:24 | * | auxym_ quit (Ping timeout: 250 seconds) |
12:27:32 | * | auxym_ joined #nim |
12:35:24 | FromDiscord | <fae> is compiling to cpp generally fine if you are intending to use the src on ios/android? or is generated c code much easier to use on those platforms |
12:38:24 | FromDiscord | <fae> And that may be more of an XY problem question. Basically I'm trying to static link https://github.com/facebook/yoga in, but since it's a c++ lib I need to compile with `nim cpp`, and just wondering if that will create portability problems down the line. It seems like `nim c` is generally favored. |
12:38:27 | nrds | <R2D299> itHub: 7"Yoga is a cross-platform layout engine which implements Flexbox. Follow https://twitter.com/yogalayout for updates." |
12:45:02 | * | arkurious joined #nim |
12:46:58 | * | flynn quit (Read error: Connection reset by peer) |
12:48:05 | * | flynn joined #nim |
12:52:15 | FromDiscord | <dom96> on iOS you may need to compile to Obj C |
12:52:22 | FromDiscord | <dom96> something to keep in mind |
12:52:26 | FromDiscord | <dom96> for android C++ should be fine |
12:55:00 | FromDiscord | <fae> I suppose that also means if I try to turn it into a nimble package that any project relying on it would need to be compiled as cpp |
12:56:27 | FromDiscord | <dom96> yep |
13:12:56 | FromDiscord | <cabboose> I am struggling to make even a simple example of chronos callbacks work |
13:13:07 | FromDiscord | <cabboose> I thought I would be able to easily access the futures data within the callback |
13:13:25 | FromDiscord | <cabboose> but if it's outside the scope of the cb it complains about accessing GC data |
13:14:03 | FromDiscord | <cabboose> using the udata thing seems tedious to have to cast the pointer to the correct data type especially if it's nested |
13:14:14 | FromDiscord | <cabboose> is there any examples out there in the wild to hazard a look at? |
13:20:59 | NimEventer | New post on r/nim by iapetus-11: First 100,000 numbers in Recaman's sequence graphed, with colors (in Nim)!, see https://reddit.com/r/nim/comments/picyn5/first_100000_numbers_in_recamans_sequence_graphed/ |
13:29:03 | * | max22- joined #nim |
13:49:08 | * | Amun-Ra quit (Quit: Gdyby mi się chciało tak jak mi się nie chce...) |
13:49:47 | * | Amun-Ra joined #nim |
13:59:35 | FromDiscord | <kodkuce> does nim have a debuger like c# where i can see values live and move true code |
14:00:43 | PMunch | You can use GDB |
14:02:31 | FromDiscord | <kodkuce> hmm i think it just shoot me to brain its compiled to C or C++ so hmm yep, but guessing then it will move true generated C code not my nim files right |
14:02:56 | Zevv | no it does debugging at the nim source level |
14:03:35 | Zevv | for even more fun use the `nim-gdb` wrapper |
14:03:57 | Zevv | that has some additional improvements for demangingling and the like, iirc |
14:15:53 | FromDiscord | <kodkuce> nice i tough i am doomed to looking at C gen stuff |
14:32:00 | * | auxym_ quit (Quit: Konversation terminated!) |
14:32:12 | * | auxym_ joined #nim |
14:38:07 | * | beshr quit (Ping timeout: 252 seconds) |
14:50:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
14:54:46 | * | auxym_ quit (Ping timeout: 250 seconds) |
15:16:37 | * | auxym_ joined #nim |
15:26:13 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
15:44:40 | * | auxym_ quit (Ping timeout: 240 seconds) |
15:52:41 | * | Vladar joined #nim |
16:09:11 | * | beshr joined #nim |
16:14:46 | * | Gustavo6046 joined #nim |
17:53:08 | * | jjido joined #nim |
18:09:45 | * | auxym_ joined #nim |
18:24:54 | * | max22- quit (Ping timeout: 256 seconds) |
18:28:50 | * | PMunch quit (Quit: leaving) |
18:31:53 | * | Vladar quit (Read error: Connection reset by peer) |
18:54:26 | * | max22- joined #nim |
19:09:55 | * | max22- quit (Quit: Leaving) |
19:10:13 | FromDiscord | <chicken mcnuggets> hey im trying to use the stew/endian2 module |
19:10:33 | FromDiscord | <chicken mcnuggets> when i try to convert a uint16 to a SomeEndianInt it always just outputs as a uin16 |
19:11:10 | * | auxym_ quit (Ping timeout: 240 seconds) |
19:11:21 | FromDiscord | <chicken mcnuggets> sent a code paste, see https://play.nim-lang.org/#ix=3y1p |
19:17:19 | Zevv | excellent question |
19:24:45 | FromDiscord | <chicken mcnuggets> any ideas? |
19:25:56 | FromDiscord | <kamy> Im trying to make a seq of a type, when I do type(object) it returns wStaticBitmap correctly, but seq[wStaticBitmap] fails when I try to .add(object) to it. |
19:26:48 | FromDiscord | <kamy> says type mismatch: got <seq[wStaticBitmap], wStaticBitmap> |
19:30:20 | FromDiscord | <kamy> sent a code paste, see https://play.nim-lang.org/#ix=3y1r |
19:31:58 | FromDiscord | <kamy> (edit) "https://play.nim-lang.org/#ix=3y1r" => "https://play.nim-lang.org/#ix=3y1t" |
19:31:59 | FromDiscord | <haxscramper> You can't add type |
19:32:12 | FromDiscord | <haxscramper> Type does not exist at runtime |
19:32:33 | FromDiscord | <haxscramper> You can only have sequence of type instances/objects |
19:32:40 | FromDiscord | <haxscramper> And this is almost always an XY problem |
19:32:44 | FromDiscord | <haxscramper> What are you trying to do? |
19:33:46 | FromDiscord | <kamy> I need a way of storing a bunch of wStaticBitmap because I need to hold them to change later. The amount is variable. |
19:34:36 | FromDiscord | <haxscramper> What is `wStaticBitmap`? Can you show the whole error, I don't think your description matches the code you provided. `sBM` is an object, you are not trying to add type |
19:34:52 | FromDiscord | <haxscramper> ah |
19:34:53 | FromDiscord | <haxscramper> ofc |
19:34:57 | FromDiscord | <haxscramper> `let imgSeq` |
19:34:59 | FromDiscord | <haxscramper> it is immutable |
19:35:09 | FromDiscord | <haxscramper> `var imgSeq` |
19:35:24 | FromDiscord | <kamy> omg what a stupid mistake |
19:35:58 | FromDiscord | <kamy> its working. thanks so much |
19:36:00 | * | Gustavo6046 quit (Ping timeout: 250 seconds) |
19:37:10 | * | Gustavo6046 joined #nim |
19:40:33 | FromDiscord | <chicken mcnuggets> anyone able to help me with my issue? |
19:41:23 | Zevv | it's a typeclass |
19:41:28 | Zevv | and I never understood these |
19:41:39 | Zevv | I'd expect your code to fail or to fit your const into any of the underlying uint types |
19:41:53 | Zevv | I'm probably just not smart enough to understand the docs |
19:53:33 | * | max22- joined #nim |
20:02:30 | * | auxym_ joined #nim |
20:12:59 | FromDiscord | <x0tic> These are real bots? |
20:14:28 | FromDiscord | <InventorMatt> bots have achieved sentience |
20:28:35 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=3y3u |
20:30:42 | FromDiscord | <tandy> can you have an async `block`? |
20:34:17 | * | flynn quit (Read error: Connection reset by peer) |
20:34:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3y3x |
20:35:09 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
20:35:23 | * | flynn joined #nim |
20:35:40 | FromDiscord | <Elegantbeef> Otherwise you'd want a macro |
20:37:16 | FromDiscord | <auxym> Possibly, thanks. good option for a 1-liner. But my original solution allows setting multiple fields with a single template call, which is also important for my use case. I might actually define both. |
20:38:00 | FromDiscord | <Elegantbeef> have you considered the `with` macro? |
20:38:13 | FromDiscord | <auxym> Might look into a macro, but I have to admit I haven't entirely wrapped my head around them yet. Probably unecessary just to have the convenience of a 1 liner, too. |
20:38:29 | FromDiscord | <auxym> Did not know `with`, I'll have a look |
20:38:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3y3y |
20:40:21 | FromDiscord | <Elegantbeef> Think there is a more usable version on nimble but idk i've never usued either |
20:43:10 | * | auxym_ quit (Ping timeout: 256 seconds) |
20:45:50 | * | neurocyte quit (Quit: The Lounge - https://thelounge.chat) |
20:50:53 | * | jjido joined #nim |
20:51:11 | * | neurocyte joined #nim |
20:51:11 | * | neurocyte quit (Changing host) |
20:51:11 | * | neurocyte joined #nim |
20:55:05 | * | jjido quit (Client Quit) |
21:40:03 | * | auxym_ joined #nim |
21:50:25 | * | auxym_ quit (Ping timeout: 252 seconds) |
21:59:32 | * | max22- quit (Quit: Leaving) |
22:43:50 | * | auxym_ joined #nim |
23:15:11 | FromDiscord | <aleclarson> how do i `import` just one thing? |
23:15:58 | FromDiscord | <aleclarson> oh nvm i found it |
23:16:42 | FromDiscord | <Elegantbeef> `from X import Y` for any lurkers 😀 |
23:20:10 | FromDiscord | <techno3d> sent a code paste, see https://play.nim-lang.org/#ix=3y3Z |
23:20:41 | FromDiscord | <Elegantbeef> It's not overly idiomatic but nim doesnt care if you do or not |
23:20:46 | FromDiscord | <Elegantbeef> it's useful for things like |
23:20:55 | FromDiscord | <Elegantbeef> !eval var a = 100; echo a |
23:20:57 | NimBot | 100 |
23:29:57 | * | flynn quit (Remote host closed the connection) |
23:31:05 | * | flynn joined #nim |
23:34:28 | FromDiscord | <techno3d> Oh nice↵↵I don't have to give up semicolans |
23:47:44 | FromDiscord | <Yardanico> but bear in mind that having semicolons in usual nim code is a pretty strong code smell :) |
23:47:56 | FromDiscord | <Yardanico> quite a lot of "modern" languages don't require semicolons anymore |
23:52:23 | FromDiscord | <Elegantbeef> Indeed semicolon insertion is lovely |
23:54:19 | FromDiscord | <Iapetus11> sent a code paste, see https://play.nim-lang.org/#ix=3y43 |
23:54:52 | FromDiscord | <Iapetus11> (edit) "https://play.nim-lang.org/#ix=3y43" => "https://play.nim-lang.org/#ix=3y44" |
23:54:55 | FromDiscord | <Elegantbeef> Well if this is a library certainly no, secondly it should be `std/random` |
23:55:32 | FromDiscord | <Iapetus11> (edit) "https://play.nim-lang.org/#ix=3y44" => "https://play.nim-lang.org/#ix=3y45" |
23:55:43 | FromDiscord | <Iapetus11> 👍 |
23:55:45 | FromDiscord | <aleclarson> what could be the cause of `template/generic instantiation of "some" from here` when using `some` from `options`? |
23:55:55 | FromDiscord | <Yardanico> In reply to @aleclarson "what could be the": that's not the full error message |
23:55:59 | FromDiscord | <Yardanico> show the full error message that the compiler shows |
23:56:14 | FromDiscord | <Elegantbeef> The issue with using `randomize` there is you've now overwritten the state so if someone had seeded it you've fucked them over |
23:56:27 | FromDiscord | <aleclarson> In reply to @Yardanico "that's not the full": it's the full message that VS Code shows, unless there's somewhere else i can look |
23:56:27 | FromDiscord | <Yardanico> yeah it only makes sense to call randomize() in apps |
23:56:33 | FromDiscord | <Yardanico> In reply to @aleclarson "it's the full message": check the compiler output as I said |
23:56:40 | FromDiscord | <Yardanico> compile the nim file and show the compiler output |
23:56:50 | FromDiscord | <Elegantbeef> The compiler is the best way to see issues |
23:57:08 | FromDiscord | <Yardanico> in libraries you don't want to call randomize() as that should be left for the application that's using the library |
23:57:14 | FromDiscord | <Yardanico> at most you can have a local random state |
23:57:21 | FromDiscord | <auxym> @ElegantBeef Is it a new recommendation to prefix stdlib imports with `std/`? I've been seeing it recently but I don't recall hearing about it before |
23:57:32 | FromDiscord | <Yardanico> In reply to @auxym "<@!145405730571288577> Is it a": yes, it is |
23:57:37 | FromDiscord | <aleclarson> In reply to @Yardanico "check the compiler output": oh very nice |
23:57:42 | FromDiscord | <Yardanico> new modules are only created in std/ prefix |
23:57:53 | FromDiscord | <aleclarson> > Cannot prove that 'result' is initialized. This will become a compile time error in the future. |
23:57:55 | FromDiscord | <Yardanico> so it's much better to import all stdlib modules with the std/ prefix |
23:58:01 | FromDiscord | <Elegantbeef> You also may want to expose procs that take a `Rand` object |
23:58:19 | FromDiscord | <auxym> I see. Any further reading? A blog post or changelog or something? |
23:58:19 | FromDiscord | <Yardanico> if you want to import multiple, it's possible the same way as before on a single line - `import std/[strutils, strscans, strformat]` |
23:58:33 | FromDiscord | <Yardanico> In reply to @auxym "I see. Any further": can't think of anything like that, it's not like this change requires some deep reading |
23:58:38 | FromDiscord | <Elegantbeef> The 1.6 docs go so far to put `std/modulename` in the title |
23:58:41 | FromDiscord | <aleclarson> In reply to @aleclarson "> Cannot prove that": so using a `not nil` variable with `options` is discouraged, i guess |
23:58:45 | FromDiscord | <Yardanico> In reply to @Elegantbeef "The 1.6 docs": yeah, that too |
23:59:00 | FromDiscord | <Yardanico> std prefix is there so that user modules (or modules from nimble) don't clash with stdlib ones |
23:59:10 | FromDiscord | <Yardanico> btw, for nimble packages you can use the `pkg` import prefix |
23:59:22 | FromDiscord | <auxym> Well, yeah, just wondering why everyone started doing that |
23:59:25 | FromDiscord | <Yardanico> `import pkg/[regex, mathexpr]` |
23:59:34 | FromDiscord | <Elegantbeef> Makes it harder to clash with modules accidently |
23:59:35 | FromDiscord | <Yardanico> In reply to @auxym "Well, yeah, just wondering": as I said, so that it doesn't clash with user modules |
23:59:44 | FromDiscord | <Elegantbeef> unless you're daft enough to make a folder named `std` \:P |
23:59:44 | FromDiscord | <auxym> I see. |
23:59:53 | FromDiscord | <auxym> try me 😉 |