| 00:01:24 | FromDiscord | <ynfle> In reply to @Elegantbeef "I seen the comment": I'm just lost. In my mind, a varargs should be checked recursively for its base type automatically. not sure why not |
| 00:01:42 | FromDiscord | <Elegantbeef> Well you can always try it first and if it fails try the next stage |
| 00:02:00 | FromDiscord | <ynfle> What do you mean next stage? |
| 00:02:34 | FromDiscord | <Elegantbeef> First check if the base fits otherwise do what it does now |
| 00:03:19 | FromDiscord | <ynfle> Base should be checked first? |
| 00:03:42 | FromDiscord | <Elegantbeef> Perhaps |
| 00:08:26 | FromDiscord | <ynfle> That's not how it does it for a non overloaded symbol |
| 00:10:35 | FromDiscord | <Elegantbeef> Sure but we're trying to fix stuff so trial and error is the best way to fixing issues |
| 00:20:00 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Nxk |
| 00:20:20 | FromDiscord | <Elegantbeef> A C gen error so something is going off |
| 00:21:07 | FromDiscord | <Elegantbeef> What's your `scan` procedure? |
| 00:21:24 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Nxm |
| 00:22:23 | FromDiscord | <Patitotective> In reply to @Elegantbeef "What's your `scan` procedure?": There are actually nine procedures starting with `scan`, there is no `scan` only procedure |
| 00:22:45 | FromDiscord | <Elegantbeef> `scanString` `scanNumber` `scanValue`? |
| 00:23:08 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Nxo |
| 00:23:21 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Nxp |
| 00:23:38 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Nxq |
| 00:25:04 | FromDiscord | <Elegantbeef> What's PScanner? |
| 00:25:28 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Nxr |
| 00:25:35 | FromDiscord | <Patitotective> `PTokenKind` is just an enum of all the valid token kinds |
| 00:25:48 | FromDiscord | <Patitotective> And `PrefsNode` an object variant |
| 00:25:57 | FromDiscord | <Elegantbeef> That cgen error is odd, i dont exactly see why it's happening |
| 00:26:16 | FromDiscord | <Patitotective> should i send you all the file? |
| 00:26:24 | FromDiscord | <Elegantbeef> is it on a repo |
| 00:26:30 | FromDiscord | <Patitotective> no 😕 |
| 00:26:34 | FromDiscord | <Patitotective> (edit) "no" => "not yet" |
| 00:26:59 | FromDiscord | <Patitotective> maybe i can upload it and then send the link to you (?) |
| 00:27:14 | FromDiscord | <Elegantbeef> Well if it's a single file throw it on the playground |
| 00:27:22 | FromDiscord | <Elegantbeef> If it's multiple files a git repo would be ideal |
| 00:27:38 | FromDiscord | <Patitotective> i gtg now but i will send you the repo link when im back |
| 00:28:30 | arkanoid | Elegantbeef, longest issue name ever https://github.com/nim-lang/Nim/issues/19453, not sure if you have any info in brain ram to add before reboot |
| 00:31:47 | FromDiscord | <Elegantbeef> ` for item in items[:openArray[byte]](): # Error: expected: ':', but got: ''` will not work |
| 00:31:57 | FromDiscord | <Elegantbeef> `[: T]` is for MCS only not normal procedure calls |
| 00:35:16 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3Nxw here is your actual issue |
| 00:44:36 | arkanoid | MCS? |
| 00:44:45 | FromDiscord | <Elegantbeef> Method call syntax |
| 00:47:17 | arkanoid | yes! that's the actual problem I see |
| 00:50:44 | arkanoid | thanks, I'm fixing the issue |
| 00:59:07 | FromDiscord | <Patitotective> @ElegantBeef https://github.com/Patitotective/NiPrefs/blob/main/src/niprefs/parser/scanner.nim |
| 00:59:10 | * | krux02 quit (Remote host closed the connection) |
| 01:33:40 | FromDiscord | <Patitotective> The error occurs in `scanValue` |
| 01:39:03 | FromDiscord | <ynfle> Beef, when does `f.n == nil`? |
| 01:56:15 | FromDiscord | <ynfle> Its a PNode for a PType |
| 02:20:57 | * | neurocyte0917090 quit (Ping timeout: 240 seconds) |
| 03:19:22 | FromDiscord | <Elegantbeef> @Patitotective\: how do i compile this? |
| 03:26:25 | rockcavera | is it possible to make an enum return a specific type? https://play.nim-lang.org/#ix=3NxU |
| 03:27:20 | FromDiscord | <Elegantbeef> What do you mean by "Return" |
| 03:27:23 | FromDiscord | <Rika> no, i believe its either int or string |
| 03:27:32 | FromDiscord | <Elegantbeef> You can do `cint(One)` if you need it |
| 03:27:34 | FromDiscord | <Rika> hold a value thats not int or string, beef |
| 03:27:59 | FromDiscord | <Elegantbeef> You can make an enum array if you need |
| 03:29:22 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3NxW for instance |
| 03:29:43 | rockcavera | actually I needed the generated C code to define the enum with `typedef cint` |
| 03:30:03 | FromDiscord | <Elegantbeef> Why? |
| 03:31:46 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3NxX |
| 03:32:02 | rockcavera | {.size: sizeof(cint).} makes the C definition of the enum an NI32, without it Nim defines the enum as a C type NU8 |
| 03:32:37 | FromDiscord | <Elegantbeef> I forgot that C didnt like that conversion |
| 03:33:00 | * | arkurious quit (Quit: Leaving) |
| 03:33:31 | rockcavera | a current solution is to create a `converter` |
| 03:33:54 | rockcavera | but I was expecting something more hergonomic, maybe a pragma in the declaration of type |
| 03:34:20 | FromDiscord | <Elegantbeef> I think you can use codegendecl to do it, but i could be wrong |
| 03:34:49 | rockcavera | I will test |
| 03:47:33 | rockcavera | codegendecl doesn't seem to work with type. I made an emit C code and imported it in type. |
| 03:58:38 | NimEventer | New post on r/nim by Ether-naut: Proc to modify a sequence's element "in place", see https://reddit.com/r/nim/comments/scwoty/proc_to_modify_a_sequences_element_in_place/ |
| 04:04:18 | NimEventer | New thread by Archnim: Sleep in Nimscript, see https://forum.nim-lang.org/t/8841 |
| 05:39:39 | * | al1ranger joined #nim |
| 06:06:46 | * | al1ranger quit (Ping timeout: 250 seconds) |
| 06:13:52 | * | rockcavera quit (Remote host closed the connection) |
| 06:17:12 | NimEventer | New post on r/nim by ShadowRylander: Use nim to generate binaries for Python using nimpy and nimporter, see https://reddit.com/r/nim/comments/scz6qq/use_nim_to_generate_binaries_for_python_using/ |
| 06:28:49 | FromDiscord | <malfong> sent a code paste, see https://play.nim-lang.org/#ix=3Nyp |
| 06:30:43 | NimEventer | New thread by Oyster: Convert HSlice to varargs?, see https://forum.nim-lang.org/t/8842 |
| 06:40:44 | NimEventer | New thread by Jdf: Choosing a specific version of SQLite, see https://forum.nim-lang.org/t/8843 |
| 07:06:35 | * | Gustavo6046 joined #nim |
| 07:26:59 | haakon | is there any way to require values for an object's fields when instantiating them? nim conjures up "empty values" which as a newbie i don't quite yet see the benefit of |
| 07:28:18 | FromDiscord | <Elegantbeef> It's a system language so 0 initalized memory is safer 😀 |
| 07:28:28 | FromDiscord | <Elegantbeef> What do you mean "requires values" though? |
| 07:29:12 | FromDiscord | <Elegantbeef> There is a `requiresInit` pragma you can attach to the object |
| 07:29:39 | haakon | Perhaps the object has no meaning when one of its fields is not passed a value during instantiation. A compilation error might be nice in that case |
| 07:29:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/zh1 |
| 07:30:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Nyy |
| 07:31:37 | FromDiscord | <Elegantbeef> The big benefit of 0 initing is if you have a `var a: ref int` attempting to dereference that will cause a nil error instead of silently work |
| 07:31:41 | haakon | Thanks, requiresInit seems to work as I hoped :-) |
| 07:33:48 | FromDiscord | <Elegantbeef> No problem |
| 07:55:24 | * | jjido joined #nim |
| 08:04:57 | NimEventer | New thread by Didlybom: Nim 2.0 and backwards compatibility, see https://forum.nim-lang.org/t/8844 |
| 08:05:46 | FromDiscord | <Rika> Oh boy |
| 08:06:45 | FromDiscord | <Elegantbeef> the non elaborate answer is the funny thing |
| 08:10:20 | Amun-Ra | I like academic discussions |
| 08:10:35 | FromDiscord | <Elegantbeef> Ah so then you dont like when i speak |
| 08:11:34 | FromDiscord | <demotomohiro> Probably, we have to add `when NimMajor >= 2:` branches to existing libraries. |
| 08:22:10 | * | l1x joined #nim |
| 08:33:58 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
| 08:38:10 | * | Lord_Nightmare joined #nim |
| 09:10:56 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 09:13:05 | NimEventer | New thread by Chaemon: Static proc argument doesn't recognize the type, see https://forum.nim-lang.org/t/8845 |
| 09:35:36 | FromDiscord | <Shiba> what https://media.discordapp.net/attachments/371759389889003532/935830322933805056/Capture.PNG |
| 09:35:46 | FromDiscord | <Shiba> i tried to compile to js |
| 09:37:52 | FromDiscord | <Elegantbeef> Works here what's the code? |
| 09:38:09 | FromDiscord | <Evrensel Kişilik> ummmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm |
| 09:38:13 | FromDiscord | <hmmm> beefy beefy can you go into the HSlice forum thread and answer this: "So is there a way to unpack an HSlice to be use as varargs?" I really want that functionality lol |
| 09:38:34 | FromDiscord | <Evrensel Kişilik> can i work with 1:1 scale on a 2K 27" monitor? |
| 09:38:57 | FromDiscord | <Rika> In reply to @Evrensel Kişilik "can i work with": What does that mean |
| 09:39:03 | FromDiscord | <Shiba> In reply to @Elegantbeef "Works here what's the": https://media.discordapp.net/attachments/371759389889003532/935831188550078534/Capture.PNG |
| 09:39:15 | FromDiscord | <Evrensel Kişilik> In reply to @Rika "What does that mean": i need a large workspace |
| 09:39:15 | FromDiscord | <hmmm> nu u will get blind and will only see a pink smudge in your avatar |
| 09:39:32 | FromDiscord | <Evrensel Kişilik> i mean is 27" too small for 2K 1:1 scale? |
| 09:39:37 | FromDiscord | <Elegantbeef> Nico no longer uses js for the web build |
| 09:40:16 | FromDiscord | <hmmm> hnm it might be too small but its 50/50 and you wont know unless u try |
| 09:40:17 | FromDiscord | <Elegantbeef> I mean my solution doesnt work in 1.6.2 |
| 09:43:05 | FromDiscord | <hmmm> beefy did you read that thread? 🙇♂️ |
| 09:44:04 | FromDiscord | <Elegantbeef> Yes |
| 09:44:32 | FromDiscord | <hmmm> lets lobby to add that functionality to nim 🙇♂️ |
| 09:45:06 | FromDiscord | <hmmm> lets conspire to make it happen 🕵️♀️ |
| 09:45:10 | FromDiscord | <enthus1ast> could prolly be done by a macro (tm) |
| 09:45:14 | FromDiscord | <Elegantbeef> The toseq works though |
| 09:45:28 | FromDiscord | <hmmm> nununu no workarounds |
| 09:45:34 | FromDiscord | <hmmm> we need exactly that |
| 09:47:00 | FromDiscord | <Elegantbeef> You cannot unpack values like that |
| 09:47:54 | FromDiscord | <hmmm> I know, you already told me but its soooo comfy to be able to do that, we must do the impossible to make it work |
| 09:48:01 | FromDiscord | <hmmm> 🙇♂️ |
| 09:48:53 | FromDiscord | <Elegantbeef> I mean make an overload that takes a `Slcie` |
| 09:49:23 | FromDiscord | <Elegantbeef> Well the issue is that it takes `varargs[typed]` as the person noted |
| 09:50:04 | FromDiscord | <Elegantbeef> It needs to be either comma seperated ints or an array literal due to that |
| 09:50:22 | FromDiscord | <Elegantbeef> we can always conver a slice to an array |
| 09:50:23 | FromDiscord | <Elegantbeef> That's easy |
| 09:51:33 | FromDiscord | <hmmm> hmm .... are you offering workarounds? 🤔 |
| 09:54:43 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NyY |
| 09:57:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NyZ |
| 09:59:05 | FromDiscord | <Elegantbeef> That still will not solve the bitops issue |
| 10:02:51 | FromDiscord | <hmmm> thats quite good, whats missing in respect with python star? |
| 10:03:08 | FromDiscord | <hmmm> does it work with seqs? |
| 10:03:25 | FromDiscord | <Elegantbeef> I dont know what python star is |
| 10:04:42 | FromDiscord | <Rika> Unpack array into arguments |
| 10:04:50 | FromDiscord | <Rika> Regardless of type |
| 10:04:53 | FromDiscord | <Elegantbeef> That cannot work with nim |
| 10:04:57 | FromDiscord | <Rika> Of course, since it is Python |
| 10:06:17 | FromDiscord | <hmmm> it feeds arrays / seqs as parameters to a func as far as I can tell |
| 10:06:23 | FromDiscord | <Elegantbeef> I mean hmm the example you seen before is cause Nim presently doesnt allow you to inject parameters from inside a call |
| 10:08:35 | FromDiscord | <hmmm> it wouldn work even if we restrict the seq and parameters to the same type? |
| 10:13:17 | FromDiscord | <Elegantbeef> `doThing(... a)` or similar needs compiler support |
| 10:13:43 | FromDiscord | <Elegantbeef> What are we talking about? |
| 10:13:49 | FromDiscord | <Elegantbeef> Unpacking inside a call? |
| 10:13:55 | FromDiscord | <hmmm> yes |
| 10:15:02 | FromDiscord | <Elegantbeef> Then yes it wouldnt work |
| 10:15:13 | FromDiscord | <hmmm> 😩 |
| 10:15:19 | FromDiscord | <Elegantbeef> The issue is the compiler does "Hey this is a call, let's look at the parameters" |
| 10:15:26 | FromDiscord | <Elegantbeef> The parameters presently have to be comma seperated expressions |
| 10:16:09 | FromDiscord | <Elegantbeef> There are hacks that'd be easy to enable unpacking like allowing `doThing((a; b; c;))` but it's clearly a hack |
| 10:16:37 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "i need a large": I invested in a 35", it's greate to have many vscode tabs side-by-side. |
| 10:17:18 | FromDiscord | <hmmm> so we need glue that looks at a seq and says you know what, I can consider 1,2,3, elements from the seq as first second and third parameter of xyzproc() |
| 10:17:31 | FromDiscord | <Evrensel Kişilik> In reply to @mratsim "I invested in a": soooooooo |
| 10:17:41 | FromDiscord | <Evrensel Kişilik> what do you think 2k 27" 1:1 scale? |
| 10:17:50 | FromDiscord | <Evrensel Kişilik> would it be too small? |
| 10:18:13 | FromDiscord | <hmmm> 144hz I presume? 🧐 |
| 10:18:22 | FromDiscord | <Evrensel Kişilik> In reply to @hmmm "144hz I presume? 🧐": yes it is also 144hz |
| 10:18:32 | FromDiscord | <Evrensel Kişilik> my notebook screen is also 144hz |
| 10:18:36 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "would it be too": I think so, eye fatigue is a bitch |
| 10:18:40 | FromDiscord | <hmmm> how much it costs |
| 10:18:54 | * | krux02 joined #nim |
| 10:18:57 | FromDiscord | <Evrensel Kişilik> i think i would still continue to play games on my notebook screen because i play games in my bed xD |
| 10:19:13 | FromDiscord | <Evrensel Kişilik> In reply to @hmmm "how much it costs": ummmm 3.6k TRY |
| 10:19:28 | FromDiscord | <Evrensel Kişilik> 266$ |
| 10:19:46 | FromDiscord | <hmmm> yea buy it and repent later |
| 10:19:57 | FromDiscord | <hmmm> you will be fine |
| 10:20:08 | FromDiscord | <Evrensel Kişilik> https://www.viewsonic.com/tr/products/lcd/VX2758-2KP-MHD |
| 10:20:22 | FromDiscord | <hmmm> if not you can alwasy zoom and become a zoomer 😃 |
| 10:20:33 | FromDiscord | <Evrensel Kişilik> In reply to @hmmm "if not you can": looooooooooooook |
| 10:20:44 | FromDiscord | <Evrensel Kişilik> i need to use it as 1:1 scale |
| 10:20:58 | FromDiscord | <hmmm> who doesnt 🤔 |
| 10:21:16 | FromDiscord | <Evrensel Kişilik> oh i found chepaer |
| 10:21:18 | FromDiscord | <Evrensel Kişilik> (edit) "chepaer" => "cheaper" |
| 10:21:29 | FromDiscord | <Evrensel Kişilik> 257$ |
| 10:21:29 | FromDiscord | <Evrensel Kişilik> lol |
| 10:21:32 | FromDiscord | <mratsim> oh it's 2560 x 1440 not 2k |
| 10:21:37 | FromDiscord | <mratsim> yes it's perfect |
| 10:21:43 | FromDiscord | <Evrensel Kişilik> sooooooooo |
| 10:21:47 | FromDiscord | <Evrensel Kişilik> what is it? |
| 10:21:50 | FromDiscord | <Evrensel Kişilik> 😱 |
| 10:21:59 | FromDiscord | <hmmm> 1440 is perfect |
| 10:22:00 | FromDiscord | <mratsim> I have been using 27" 1440p for 9 years now |
| 10:22:00 | FromDiscord | <Evrensel Kişilik> less than 2k? |
| 10:22:05 | FromDiscord | <hmmm> buy it now |
| 10:22:13 | FromDiscord | <Evrensel Kişilik> In reply to @mratsim "I have been using": in 1:1 scale? |
| 10:22:17 | FromDiscord | <mratsim> yup |
| 10:22:19 | FromDiscord | <hmmm> yea |
| 10:22:20 | FromDiscord | <Evrensel Kişilik> hmmmmmmmmmmm |
| 10:22:21 | FromDiscord | <Evrensel Kişilik> nice |
| 10:22:36 | FromDiscord | <Rika> In reply to @hmmm "144hz I presume? 🧐": Lol |
| 10:22:39 | FromDiscord | <mratsim> the DPI is about 104 or something |
| 10:22:43 | FromDiscord | <Evrensel Kişilik> what is the difference between 1440p and 2K? |
| 10:22:51 | FromDiscord | <mratsim> less pixels to display |
| 10:22:55 | FromDiscord | <Evrensel Kişilik> 😱 |
| 10:22:58 | FromDiscord | <Rika> I use 1440p too, but I have like 150% zoom because I’m becoming blind as fuck |
| 10:23:01 | FromDiscord | <Evrensel Kişilik> something between 1080p and 2K? |
| 10:23:11 | FromDiscord | <mratsim> 2K AFAIK doesn't exist. |
| 10:23:11 | FromDiscord | <Evrensel Kişilik> In reply to @Rika "I use 1440p too,": oh no |
| 10:23:13 | FromDiscord | <Rika> Isn’t 2k less than 1440p? |
| 10:23:17 | FromDiscord | <hmmm> more juice fore the card, things are bigger |
| 10:23:24 | FromDiscord | <Evrensel Kişilik> In reply to @Rika "I use 1440p too,": what is your screen's size? |
| 10:23:28 | FromDiscord | <Rika> 27 |
| 10:23:32 | FromDiscord | <Evrensel Kişilik> oh no |
| 10:23:33 | FromDiscord | <Evrensel Kişilik> 😱 |
| 10:23:44 | FromDiscord | <Rika> And I’m a foot or two from my monitor |
| 10:23:44 | FromDiscord | <Evrensel Kişilik> im doing so many things |
| 10:23:49 | FromDiscord | <hmmm> hey dont worry rika is a special case |
| 10:23:59 | FromDiscord | <Evrensel Kişilik> Unity, VSCode, Android Studio and more bullshits |
| 10:23:59 | FromDiscord | <Rika> Hey what the fuck don’t call me a special case |
| 10:24:07 | FromDiscord | <mratsim> I have a 27" in portrair mode, a 35" center (1440x1440) and my laptop screen 16". |
| 10:24:10 | FromDiscord | <enthus1ast> just get more screens then |
| 10:24:19 | FromDiscord | <Evrensel Kişilik> In reply to @hmmm "hey dont worry rika": oh its nice to hear |
| 10:24:19 | FromDiscord | <hmmm> l9opool no offense intended ofc 🙇♂️ |
| 10:24:24 | FromDiscord | <Evrensel Kişilik> soooooooooooooooooooooooo |
| 10:24:38 | FromDiscord | <mratsim> 27" portrait is for browser, center is for coding, and laptop screen is for the CLI. |
| 10:25:06 | FromDiscord | <Rika> MBN having money 😛 |
| 10:25:36 | FromDiscord | <Evrensel Kişilik> do you recommend curved screens? |
| 10:25:44 | FromDiscord | <Evrensel Kişilik> there are also curved things |
| 10:25:49 | FromDiscord | <mratsim> for 32+ yes a small curvature is OK |
| 10:25:51 | FromDiscord | <Evrensel Kişilik> i hate 1080p big monitors |
| 10:26:00 | FromDiscord | <mratsim> it depends also if you only code or also need design |
| 10:26:04 | FromDiscord | <hmmm> I hate curves 🧐 |
| 10:26:13 | FromDiscord | <Evrensel Kişilik> but i think a 4K and huge curved monitor could be good |
| 10:26:17 | FromDiscord | <Evrensel Kişilik> but it is sooooo expensive |
| 10:26:26 | FromDiscord | <Evrensel Kişilik> sooo |
| 10:26:28 | FromDiscord | <Evrensel Kişilik> this |
| 10:26:42 | FromDiscord | <Evrensel Kişilik> what does this 1440p mean exactly? |
| 10:26:56 | FromDiscord | <Evrensel Kişilik> is that two 1080p? |
| 10:27:12 | FromDiscord | <Evrensel Kişilik> how much space will i have? |
| 10:27:34 | FromDiscord | <hmmm> it just means you will need a 4k$ graphics card to power it and place it on the othe end of saturn or its too near |
| 10:27:56 | FromDiscord | <Evrensel Kişilik> In reply to @hmmm "it just means you": my GPU is RTX 2060 |
| 10:28:11 | FromDiscord | <Evrensel Kişilik> i think it is not good for playing games in 2K |
| 10:28:27 | FromDiscord | <Evrensel Kişilik> oh of course it is pretty good for competetive games |
| 10:28:51 | FromDiscord | <Evrensel Kişilik> but i already don't think that i will play games on that screen |
| 10:29:00 | FromDiscord | <Evrensel Kişilik> because i play games in my bed always xD |
| 10:29:40 | FromDiscord | <hmmm> hey we cant talk hardware in main go offtopic or a mod wil whack us with a medieval mace |
| 10:30:46 | FromDiscord | <Evrensel Kişilik> In reply to @hmmm "hey we cant talk": :BANNED: |
| 10:54:34 | PMunch | Anyone have a nice terminal graph library in Nim? |
| 10:55:55 | PMunch | Like give it a series of numbers within a range, then split the range into terminalWidth buckets and fill it with bars |
| 11:02:49 | FromDiscord | <hethir> can I create a `DateTime` from a `Time` or a unix timestamp? |
| 11:03:20 | FromDiscord | <federico3> @narimiran\: would it be possible to fix https://github.com/nim-lang/Nim/issues/14424#issuecomment-927309165 in the next release please? |
| 11:05:04 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "i think it is": It's good enough. |
| 11:06:07 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "but i think a": https://www.rtings.com/monitor/reviews/samsung/odyssey-neo-g9 |
| 11:15:01 | FromDiscord | <narimiran> In reply to @federico3 "<@719992187890434069>\: would it be": probably for 1.6.6, because 1.6.4 is about the FFI regression and we want it out ASAP |
| 11:15:11 | FromDiscord | <Evrensel Kişilik> In reply to @mratsim "It's good enough.": ok thank you |
| 11:15:22 | FromDiscord | <Evrensel Kişilik> In reply to @mratsim "https://www.rtings.com/monitor/reviews/samsung/odys": oh no 😱 |
| 11:45:43 | * | Gustavo6046 quit (Quit: Leaving) |
| 11:48:58 | * | mjsir911 quit (Quit: Goodbye, World!) |
| 11:49:13 | * | mjsir911 joined #nim |
| 11:55:54 | * | jjido joined #nim |
| 11:59:41 | NimEventer | New thread by Jasonfi: HttpClient error message, see https://forum.nim-lang.org/t/8846 |
| 12:28:29 | * | jmdaemon quit (Ping timeout: 256 seconds) |
| 13:16:00 | * | rockcavera joined #nim |
| 13:16:00 | * | rockcavera quit (Changing host) |
| 13:16:00 | * | rockcavera joined #nim |
| 13:41:40 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 14:13:17 | * | jjido joined #nim |
| 14:25:00 | * | arkurious joined #nim |
| 14:35:17 | FromDiscord | <hethir> In reply to @hethir "can I create a": does anyone know if this is possible? |
| 14:47:10 | FromDiscord | <Patitotective> In reply to @Elegantbeef "<@762008715162419261>\: how do i": clone the repo and run the script (?) |
| 14:47:31 | FromDiscord | <Patitotective> `src/niprefs/parser/scanner.nim` |
| 14:52:25 | FromDiscord | <IsaacPaul> In reply to @hethir "does anyone know if": varTime.utc() |
| 14:56:42 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 15:07:59 | FromDiscord | <Patitotective> @ElegantBeef If on `scanValue` you comment every procedure or line that calls `addToken`, it works↵S |
| 15:08:00 | FromDiscord | <Patitotective> (edit) "works↵S" => "works" |
| 15:13:41 | FromDiscord | <Patitotective> If an `object` `init`'s procedure does not have any default-parameters, is that procedure worth? Or should I just instance the `object` directly, without any procedure? |
| 15:13:49 | FromDiscord | <Patitotective> (edit) "`object` `init`'s" => "`object`'s `init`" |
| 15:22:22 | FromDiscord | <Kerosen> It's possible to have a Nim compiler on android? |
| 15:24:34 | FromDiscord | <Kerosen> Like, compiling the Nim compiler for android |
| 15:24:39 | FromDiscord | <Rika> through termux i think is the name |
| 15:27:45 | FromDiscord | <IsaacPaul> yea on termux |
| 15:27:59 | FromDiscord | <IsaacPaul> over adb it might be a bit more tricky |
| 15:43:06 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
| 15:44:21 | * | cyraxjoe joined #nim |
| 15:45:40 | NimEventer | New post on r/nim by mavavilj: Is there some idiomatic way to get the sign of a value?, see https://reddit.com/r/nim/comments/sd8why/is_there_some_idiomatic_way_to_get_the_sign_of_a/ |
| 15:50:08 | FromDiscord | <tandy> hmm, im adding query parameters into a string like `"/user/%userId/filter/%filterId"`, using `replace`, but in some cases, the query parameters need to be added on the end like `uri.?`, is there a clever way to make params get "eaten" if they get replaced so it doesnt add them on twice? |
| 15:50:25 | FromDiscord | <tandy> code looks like this |
| 15:50:26 | FromDiscord | <tandy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/935924579325591624): hmm, im adding query parameters into a string like `"/user/%userId/filter/%filterId"`, using `replace`, but in some cases, the query parameters need to be added on the end like `uri.?`?↵is there a clever way to make params get "eaten" if they get replaced so it doesnt add them on twice? |
| 15:50:28 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3NAM |
| 15:50:37 | FromDiscord | <tandy> `https://newcircuit.io/_matrix/client/r0/user/%40dylhack%3Anewcircuit.io/filter/1?userId=%40dylhack%3Anewcircuit.io&filterId=1` |
| 15:50:47 | FromDiscord | <tandy> causes results like this, which cause excess query parameters to be added to the end where they are just replaces |
| 15:56:19 | FromDiscord | <haolian9 (高浩亮)> sent a code paste, see https://play.nim-lang.org/#ix=3NAO |
| 15:56:30 | FromDiscord | <tandy> i think i just need to use https://nim-lang.github.io/Nim/strutils.html#%25%2Cstring%2CopenArray%5Bstring%5D |
| 15:58:37 | FromDiscord | <haolian9 (高浩亮)> i did checked [the manual](https://nim-lang.org/docs/tut1.html#control-flow-statements-case-statement), but could not found such use case |
| 15:59:05 | FromDiscord | <Patitotective> How am I supposed to use _nepg_ to tokenize? 🧐 |
| 15:59:10 | FromDiscord | <Patitotective> (edit) "_nepg_" => "_npeg_" |
| 15:59:28 | FromDiscord | <Patitotective> Or defining the rules is already tokenize? |
| 16:05:30 | FromDiscord | <mratsim> In reply to @Patitotective "How am I supposed": You write your own lexer. Like all dragons did. |
| 16:07:09 | FromDiscord | <IsaacPaul> In reply to @haolian9 (高浩亮) "i wrote a snippet": um.. you do realize that your code is hardly readable. |
| 16:07:22 | FromDiscord | <Patitotective> In reply to @mratsim "You write your own": Is this a lexer? https://craftinginterpreters.com/scanning.html |
| 16:08:00 | FromDiscord | <Patitotective> Should I use https://github.com/loloicci/nimly ? or write my own? |
| 16:12:59 | FromDiscord | <ark> has anyone written out DLL's or SO's with NIM? I'm in a pretty fun intro to malware analysis course and NIM was used as an example |
| 16:13:40 | FromDiscord | <haolian9 (高浩亮)> eh, i did not know how to reply you on this ...↵(@IsaacPaul) |
| 16:24:31 | FromDiscord | <IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3NAW |
| 16:24:47 | FromDiscord | <IsaacPaul> you want `break` not continue |
| 16:25:45 | FromDiscord | <IsaacPaul> oh you're right yea idk |
| 16:26:12 | FromDiscord | <IsaacPaul> I would expect continue to skip the rest of the current loop too |
| 16:28:17 | Zevv | Patitotective: https://github.com/zevv/npeg/blob/master/tests/lexparse.nim |
| 16:29:35 | Zevv | that's a tiny example with two stages: the lexer first takes your input and splits it into a seq of tokens - just a flat list without any hierarchy. The second stage takes this list of tokens and constructs an AST of `Node` types |
| 16:30:41 | FromDiscord | <Patitotective> Thanks |
| 16:30:42 | FromDiscord | <Patitotective> 🙃 |
| 16:30:52 | Zevv | the `$`(Node) proc is used to represent the AST tree as a string, which is in the last statement used to verify that the AST tree has the right layour |
| 16:30:55 | Zevv | layout |
| 16:33:20 | FromDiscord | <Patitotective> What is the difference between `State.tokens` and `State.stack`? |
| 16:36:01 | FromDiscord | <System64 ~ Flandre Scarlet> I have a question↵Does Nim have an image manipulation tool like Python's Pillow? |
| 16:40:58 | * | noeontheend joined #nim |
| 16:46:39 | FromDiscord | <haolian9 (高浩亮)> finally, i realized that `of aeiou` branch should follow with a `continue` too, if i want make this snippet work as expected.↵as you said, this snippet is a bit complicated, i just want to see how `continue` works with `case`↵thanks for your time! |
| 16:49:28 | FromDiscord | <Evrensel Kişilik> 😱 https://programming-language-benchmarks.vercel.app/nim-vs-go 😱 |
| 16:49:43 | * | noeontheend quit (Ping timeout: 256 seconds) |
| 16:50:02 | * | arkurious quit (Ping timeout: 240 seconds) |
| 16:50:44 | FromDiscord | <IsaacPaul> isnt go automatically threaded? |
| 16:51:08 | FromDiscord | <Evrensel Kişilik> In reply to @IsaacPaul "isnt go automatically threaded?": wdym? |
| 16:52:56 | FromDiscord | <IsaacPaul> concurrency is built into the language so things run.. concurrently instead of serially which results in a performance boost? |
| 16:53:13 | FromDiscord | <ajusa> Nim beats go at some of these benchmarks, and I one example using methods which can be slow |
| 16:57:54 | FromDiscord | <IsaacPaul> also for fasta go is threaded and nim is single threaded |
| 16:58:48 | * | noeontheend joined #nim |
| 17:01:24 | FromDiscord | <demotomohiro> It looks like go uses mutiple threads while Nim uses only 1 threads. |
| 17:02:52 | * | arkurious joined #nim |
| 17:06:57 | FromDiscord | <demotomohiro> People spent few time to learn about Nim and write a benchmark program to compare with other well optimized program. |
| 17:07:51 | * | noeontheend quit (Ping timeout: 256 seconds) |
| 17:15:02 | FromDiscord | <Bung> how to get list of nimble packages ? |
| 17:18:48 | * | cyraxjoe quit (Ping timeout: 268 seconds) |
| 17:19:31 | * | cyraxjoe joined #nim |
| 17:19:44 | FromDiscord | <demotomohiro> @System64 ~ Flandre Scarlet https://github.com/xflywind/awesome-nim#image |
| 17:20:54 | FromDiscord | <demotomohiro> `nimble refresh`/ |
| 17:23:51 | FromDiscord | <Bung> I mean programaticly |
| 17:42:07 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "😱 https://programming-language-benchmarks.vercel": I can probably slaughter everyone on secp256k1 bench https://programming-language-benchmarks.vercel.app/problem/secp256k1 |
| 17:43:11 | * | vicfred joined #nim |
| 17:44:06 | FromDiscord | <Evrensel Kişilik> as we see V8 is the best xD |
| 17:44:57 | FromDiscord | <Evrensel Kişilik> what is secp256k1? |
| 17:47:16 | FromDiscord | <mratsim> In reply to @Patitotective "Is this a lexer?": lexing and scanning are synonymous. |
| 17:47:17 | FromDiscord | <mratsim> why is what I write red? |
| 17:47:25 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "what is secp256k1?": The elliptic curve used for Bitcoin |
| 17:51:16 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "as we see V8": also coro-prime-sieve there is a post on how to accelerate it by xx% on the Nim forum |
| 17:51:39 | FromDiscord | <Evrensel Kişilik> In reply to @mratsim "The elliptic curve used": 😱 I DON'T BELIEVE BLOCKCHAIN 😱 |
| 17:52:23 | FromDiscord | <Evrensel Kişilik> we can't avoid race conditions in blockchain |
| 17:54:06 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "we can't avoid race": you have a consensus algorithm to deal with them. |
| 17:54:21 | FromDiscord | <mratsim> In reply to @Evrensel Kişilik "😱 I DON'T BELIEVE": Nim has been sponsored by a blockchain company for 3 years now |
| 17:54:44 | FromDiscord | <mratsim> https://nim-lang.org/sponsors.html https://media.discordapp.net/attachments/371759389889003532/935955933249536070/unknown.png |
| 17:55:03 | FromDiscord | <mratsim> which happened to be who I work for 😉 |
| 17:56:56 | * | PMunch quit (Quit: leaving) |
| 17:57:10 | FromDiscord | <Evrensel Kişilik> In reply to @mratsim "Nim has been sponsored": why don't you be a sponsor to me? |
| 17:57:44 | FromDiscord | <mratsim> we do bounties to fix stuff, like we hire people to fix dev tooling |
| 17:58:38 | FromDiscord | <mratsim> https://github.com/nim-lang/RFCs/issues/300 |
| 17:58:58 | haakon | is there a `contains` proc that takes a predicate? so far I'm using `count` and checking for > 0 |
| 18:03:02 | haakon | mratsim: have you implemented secp256k1 in nim? Or wrapping libsecp256k1? |
| 18:31:26 | FromDiscord | <IsaacPaul> damn I must be miss understanding something about block chains. I didn't think they could make that much money. |
| 18:40:29 | * | neceve joined #nim |
| 18:56:11 | * | jjido joined #nim |
| 19:20:35 | NimEventer | New post on r/nim by Ready_Photograph_279: chvancooten/NimPackt-v1: Nim-based assembly packer and shellcode loader for opsec &amp; profit, see https://reddit.com/r/nim/comments/sddxa0/chvancootennimpacktv1_nimbased_assembly_packer/ |
| 19:32:01 | arkanoid | can I do something like "for atype in [int16,int32,int64]" without convoluted macro? |
| 19:35:45 | FromDiscord | <haxscramper> you might try to do it with `(int16, int32, int64)` maybe |
| 19:35:55 | FromDiscord | <haxscramper> certainly not with array, it must have the same type for each element |
| 19:36:11 | FromDiscord | <haxscramper> `std/typetraits` might have some tuple iterators that you might find useful |
| 19:38:00 | FromDiscord | <haxscramper> hmm, there is 1k USD bounty for interfaces in nim now https://github.com/nim-lang/RFCs/issues/39#issuecomment-1018706344 |
| 19:38:06 | FromDiscord | <haxscramper> (edit) "hmm," => "nice," |
| 19:40:10 | arkanoid | maybe: https://nim-lang.org/docs/typetraits.html#get.t%2Ctypedesc%5B%5D%2Cstaticint |
| 19:41:35 | FromDiscord | <eyecon> I scanned it but didn't immediately see what an interface as described does better than a concept, does anyone know? |
| 19:41:36 | arkanoid | interfaces in nim? Interesting, but what kind of interfaces? OOP like, or FP like? |
| 19:52:04 | FromDiscord | <haxscramper> I think specific details can be discussed along the way, but probably more OOP/go etc.? |
| 19:56:34 | FromDiscord | <Phil> I'm currently making a tiny package out of my minimal db connection pool thingy↵... Do I just compile libraries with nim c to see if it runs and make it so that compiling also runs the test suite? |
| 19:57:28 | FromDiscord | <Phil> (edit) "nim" => "`nim" | "`nimc ... to" added "src/tinypool.nim`" |
| 20:26:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 20:41:03 | * | jjido joined #nim |
| 20:43:31 | * | happycorsair[m] quit (Quit: Client limit exceeded: 20000) |
| 20:57:41 | FromDiscord | <lakmatiol> which vscode should I use, the one written in nim or the one written in JS? |
| 20:57:46 | FromDiscord | <lakmatiol> (edit) "which vscode ... should" added "extension" |
| 20:57:55 | * | happycorsair[m] joined #nim |
| 21:00:32 | * | neceve quit (Ping timeout: 240 seconds) |
| 21:02:17 | FromDiscord | <konsumlamm> the one written by saem |
| 21:03:08 | FromDiscord | <lakmatiol> ok |
| 21:03:10 | FromDiscord | <lakmatiol> (edit) "ok" => "ok, ty" |
| 21:04:21 | FromDiscord | <konsumlamm> how exactly does one use `--expandArc`? in particular, where is the output supposed to be? |
| 21:07:09 | FromDiscord | <leorize> it will expand a proc and show you all the copy/destructors calls |
| 21:07:37 | FromDiscord | <konsumlamm> yeah, but where? |
| 21:07:53 | FromDiscord | <konsumlamm> does it print it to stdout? because i don't see anything |
| 21:16:13 | FromDiscord | <leorize> yea, stdout |
| 21:18:11 | FromDiscord | <Vindaar> In reply to @konsumlamm "how exactly does one": but you have to tell it the proc you want expanded. So `--expeandArc:foo` |
| 21:19:03 | FromDiscord | <konsumlamm> i did that |
| 21:19:59 | FromDiscord | <konsumlamm> or does that mean that there's no destructor calls etc? |
| 21:22:03 | FromDiscord | <Vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3NCy |
| 21:22:10 | FromDiscord | <Vindaar> In reply to @konsumlamm "or does that mean": not sure, if that could explain it |
| 21:22:30 | FromDiscord | <Vindaar> ah |
| 21:22:33 | FromDiscord | <Vindaar> apparently |
| 21:24:04 | FromDiscord | <konsumlamm> huh, i think it's only when it gets used |
| 21:24:14 | FromDiscord | <konsumlamm> because otherwise it probably gets dead code eliminated? |
| 21:33:20 | FromDiscord | <Vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3NCG |
| 21:34:51 | FromDiscord | <konsumlamm> it works for me, perhaps you forgot to add `--gc:arc` |
| 21:35:42 | FromDiscord | <Elegantbeef> I mean `"bla"` isnt gc'd |
| 21:36:01 | FromDiscord | <Elegantbeef> It's a constant array `['b', 'l', 'a']` in C |
| 21:37:17 | FromDiscord | <Elegantbeef> Although i guess it does get converted to a Nim string to echo |
| 21:38:16 | FromDiscord | <Vindaar> In reply to @konsumlamm "it works for me,": indeed. I first tried the above example without arc and it shows there. but not for the `blub` case. with arc it shows it |
| 21:38:35 | FromDiscord | <Vindaar> there being the `Foo` using code |
| 21:40:33 | FromDiscord | <Elegantbeef> If you make the `echo` print a constant foo it also doesnt have destructors |
| 21:41:27 | * | k0mpjut0r joined #nim |
| 21:41:59 | FromDiscord | <Michal Maršálek> In reply to @haakon "is there a `contains`": any from sequtils |
| 21:42:54 | FromDiscord | <Elegantbeef> also `anyit` |
| 21:43:37 | FromDiscord | <Phil> can you... catch a defect at compile time to throw a better, more descriptive defect? |
| 21:43:59 | FromDiscord | <Elegantbeef> No defects are not to be caught |
| 21:44:22 | FromDiscord | <Elegantbeef> And you cant inject code into other libraries |
| 21:45:04 | FromDiscord | <konsumlamm> i created an issue: https://github.com/nim-lang/Nim/issues/19459 |
| 21:49:15 | FromDiscord | <Phil> In reply to @Elegantbeef "No defects are not": ... So the answer is to check for what will raise the defect and raise your own defect before they can raise theirs, for their error message is non-descriptive and I need a more specific one for my own usecase |
| 21:50:46 | FromDiscord | <Elegantbeef> Pretty much |
| 21:51:32 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 21:52:33 | FromDiscord | <Phil> Can you... test for defects? |
| 21:52:56 | FromDiscord | <Phil> I know `expect`exists... well, might as well try it whether that can "catch" a defect |
| 21:53:16 | FromDiscord | <Elegantbeef> It can in certain dialects |
| 21:53:18 | FromDiscord | <Elegantbeef> In tests you can |
| 21:53:25 | FromDiscord | <Elegantbeef> You should never rely on catching defects in actual code |
| 21:53:43 | FromDiscord | <Elegantbeef> defects are logical issues that can be fixed, not exceptional |
| 21:53:58 | FromDiscord | <Phil> I never intend to catch defects in actual code |
| 21:54:01 | FromDiscord | <Phil> This is more a testing issue |
| 21:54:08 | FromDiscord | <Phil> I'm turning my database connection thing into a package |
| 21:54:25 | FromDiscord | <Phil> And I want to have it explode into somebody's face if they forget to initialize the pool and try to use it anyway |
| 21:54:32 | FromDiscord | <Phil> But I'd also like to test that that happens when I do it |
| 21:54:43 | FromDiscord | <Phil> (edit) "I do" => "somebody does" |
| 21:55:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NCN |
| 21:55:35 | FromDiscord | <Elegantbeef> Ah then yes feel free to catch a defect and raise your own |
| 21:58:21 | FromDiscord | <that_dude> In reply to @Elegantbeef "And you cant inject": >:) |
| 21:59:25 | FromDiscord | <Elegantbeef> Get outta here you nerd |
| 21:59:35 | FromDiscord | <that_dude> >:D |
| 22:00:51 | FromDiscord | <that_dude> I think that could count as 2 people now lol |
| 22:01:03 | FromDiscord | <that_dude> ish |
| 22:01:27 | FromDiscord | <Elegantbeef> Not really |
| 22:02:04 | FromDiscord | <that_dude> yeah :( |
| 22:02:12 | FromDiscord | <that_dude> You're right |
| 22:02:29 | FromDiscord | <Elegantbeef> Most people are sane and dont want to inject code into libraries 😛 |
| 22:03:19 | FromDiscord | <that_dude> I just want to make more things possible. Including being able to split up my libs |
| 22:03:41 | FromDiscord | <that_dude> Any way lol |
| 22:04:10 | FromDiscord | <Elegantbeef> Perhaps design the code that way |
| 22:04:40 | FromDiscord | <that_dude> I was actually wondering, it's cool that there is a vm to do compile time calculations, but why not just run the more powerfully main compiler twice instead? |
| 22:05:24 | FromDiscord | <Elegantbeef> Cause that makes no sense the VM is apart of the compiler |
| 22:06:12 | FromDiscord | <that_dude> I thought that you can just use the vm on it's own. I also thought that it's used to do it's compile time evaluations for const and stuff like that |
| 22:06:17 | FromDiscord | <Elegantbeef> The VM does application of logic, the Compiler just mutates AST |
| 22:06:35 | FromDiscord | <that_dude> Oh so all logic goes into the vm then? |
| 22:06:57 | FromDiscord | <Elegantbeef> Well the compiler semantically checks the constant expressions then passes them to the VM to evaluate |
| 22:07:06 | FromDiscord | <Elegantbeef> You can use the VM on it's own |
| 22:07:13 | FromDiscord | <Elegantbeef> But the compiler also ships with it for CTE |
| 22:08:28 | FromDiscord | <that_dude> ok |
| 22:08:29 | FromDiscord | <Elegantbeef> Macros and static scopes require evaluation, running the compiler twice doesnt give you evaluation without a computational unit |
| 22:09:37 | FromDiscord | <that_dude> I think I'm tired rn lol |
| 22:09:45 | FromDiscord | <that_dude> It's mid day and I'm losing it |
| 22:34:03 | FromDiscord | <Phil> ... I do not comprehend why I'm not getting shown my defect error message |
| 22:34:20 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3NCW |
| 22:34:46 | FromDiscord | <Phil> Much, much simplified. I intentionally want to forget to call "initConnectionPool", which means the attributes of the global var "Pool" never get set |
| 22:35:06 | FromDiscord | <Phil> And then, if you call the template it's supposed to explode with the PoolDefect error message shown in borrowConnection |
| 22:35:32 | FromDiscord | <Phil> Instead if just shows you the file and the line where the error occurs, which is correct, but where's my error message |
| 22:36:25 | FromDiscord | <Elegantbeef> What does the actually compiler show? |
| 22:36:36 | FromDiscord | <Elegantbeef> well an actual binary\ |
| 22:36:54 | FromDiscord | <Phil> Errr that is a very good question, I've only imported it in inim |
| 22:37:04 | FromDiscord | <Phil> I do have a binary from compiling it |
| 22:37:50 | FromDiscord | <Phil> a `pool` binary from the `pool.nim` module (the only module) in the `tinypool`package.↵I've also got a `tinypool.out` |
| 22:38:13 | FromDiscord | <Elegantbeef> Well compile it and run it outside inim |
| 22:38:21 | FromDiscord | <Elegantbeef> It might not be playing nice with the output |
| 22:49:54 | FromDiscord | <Phil> ... yeh, inim wasn't playing nice, in my tests I got it to print out correctly |
| 22:50:47 | FromDiscord | <Elegantbeef> `nvim /tmp/test.nim` goes brr 😜 |
| 22:58:10 | FromDiscord | <Phil> Alright, got the basics down, strictly speaking I should still throw in a couple more unit tests but |
| 22:58:10 | FromDiscord | <Phil> eh |
| 22:59:13 | FromDiscord | <Phil> That's for tomorrow |
| 22:59:43 | FromDiscord | <Phil> Now to figure out how to actually publish sth to nimble |
| 22:59:43 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/packages |
| 22:59:44 | FromDiscord | <Phil> Huh, thanks! |
| 23:01:50 | FromDiscord | <Phil> sent a long message, see http://ix.io/3ND4 |
| 23:03:21 | FromDiscord | <Elegantbeef> You dont need to post on nimble, it doesnt mean much aside people can do `nimble install` |
| 23:03:30 | FromDiscord | <Elegantbeef> Nimble supports packages on git |
| 23:06:23 | * | k0mpjut0r quit (Ping timeout: 250 seconds) |
| 23:19:03 | FromDiscord | <congusbongus> maybe tiny means things like leftpad |
| 23:20:41 | FromDiscord | <congusbongus> or anything made by jonschlinkert |
| 23:26:30 | FromDiscord | <pruno> Hello, i'm having an issue with a little project. What i want to do is the following :↵After some calculation, i get a memory address in a variable. At that memory address, the following value is present : A008, is there any way to get the value at that memory address ? (Something like, myvariable.value) |
| 23:27:01 | FromDiscord | <Elegantbeef> `cast[ptr YourType](yourPointer)[].value`? |
| 23:29:59 | FromDiscord | <pruno> What do you mean by "YourType" for the cast ? |
| 23:30:25 | FromDiscord | <Elegantbeef> Well your object that has the `value` field |
| 23:30:51 | FromDiscord | <Elegantbeef> If you just want to get the value of a specific type from a pointer you'd just do `cast[ptr T](yourPointer)[]` |
| 23:34:26 | * | jmdaemon joined #nim |
| 23:42:43 | FromDiscord | <mratsim> In reply to @haakon "<@570268431522201601>: have you implemented": https://github.com/mratsim/constantine/blob/50717d8de6715647320fb69935bf8926b5769f95/constantine/config/curves_declaration.nim#L174 |
| 23:43:50 | FromDiscord | <pruno> sent a code paste, see https://paste.rs/twc |
| 23:45:55 | FromDiscord | <Elegantbeef> You have a pointer you want to offset by 9 bytes? |
| 23:46:12 | FromDiscord | <Elegantbeef> and then you want to get the data there was a 64bit int? |
| 23:49:22 | FromDiscord | <pruno> I just want to be able to print the A008 at the memory location 0x1e5bbdf6a09 (not sure i understood your questions) |
| 23:49:56 | FromDiscord | <leorize> a 9 bytes offset is suspicious is what he meant |
| 23:49:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NDa |
| 23:51:53 | FromDiscord | <leorize> it really depends on how your debugger interprets that data |
| 23:52:03 | FromDiscord | <pruno> Oh, it's just the calculation, p_reloc is at specific point and i need the data 9 bytes after that |
| 23:52:18 | FromDiscord | <Elegantbeef> Well then my code gives you that |
| 23:52:35 | FromDiscord | <Elegantbeef> you get the address of 9 bytes after the first byte of `pReloc` |
| 23:52:58 | FromDiscord | <Elegantbeef> So in theory the second byte of an int coming after pReloc |
| 23:54:10 | FromDiscord | <leorize> fwiw, A008 is 40968, Nim prints number in decimal |
| 23:54:13 | FromDiscord | <pruno> Mmh, i still get 2208 and not A008, weird |
| 23:54:42 | FromDiscord | <leorize> 2208 is 0x8A0 |
| 23:55:18 | FromDiscord | <pruno> Oh, yeah, makes sense lol |
| 23:55:47 | FromDiscord | <Elegantbeef> Yea you're not going to get hex output |
| 23:55:47 | FromDiscord | <Elegantbeef> echo prints decimal as leorize pointed out |
| 23:55:47 | FromDiscord | <Elegantbeef> You're looking at BE and getting LE |
| 23:55:51 | FromDiscord | <Elegantbeef> I think that's BE... i've been known to being wrong |
| 23:56:02 | FromDiscord | <leorize> it's the opposite of whatever they are using \:p |
| 23:56:08 | FromDiscord | <Elegantbeef> Indeed |
| 23:56:40 | FromDiscord | <leorize> seems like it's just endian so it's an easy fix |
| 23:56:46 | FromDiscord | <pruno> Yes indeed |
| 23:57:18 | FromDiscord | <leorize> this is why you should always add `0x` to hex numbers so you don't mess them up in your head \:p |
| 23:58:21 | FromDiscord | <pruno> Good tip :) |