00:22:47 | FromDiscord | <michaelb.eth> there are thousands of nimbus-eth2 instances running for a couple of years now, playing an integral part in securing Ethereum’s mainnet↵https://github.com/status-im/nimbus-eth2 |
00:23:17 | FromDiscord | <odexine> “Does it compile into runtime code” versus “does it compile into compile time code” though the latter is wrong in a sense |
00:23:34 | FromDiscord | <michaelb.eth> In reply to @redmechanics "any software that actually": there are thousands of nimbus-eth2 instances running for a couple of years now, playing an integral part in securing Ethereum’s mainnet |
00:23:59 | FromDiscord | <ElegantBeef> To quote the bridge↵> Arkanoid you can look at compiles as "Does this work on the current backend" and compiles(static(...)) as "does it work for the VM" |
00:24:01 | FromDiscord | <Chronos [She/Her]> "Does it execute at compiletime" vs "does it execute at runtime" is prolly better phrasing? |
00:24:07 | FromDiscord | <Elegantbeef> Arkanoid you can look at `compiles` as "Does this work on the current backend" and `compiles(static(...))` as "does it work for the VM" |
00:24:11 | FromDiscord | <ElegantBeef> Ah there we go |
00:24:15 | FromDiscord | <ElegantBeef> Fucking slowpoke |
00:24:16 | FromDiscord | <Chronos [She/Her]> Lol |
00:24:48 | FromDiscord | <Elegantbeef> Ping |
00:25:01 | FromDiscord | <Chronos [She/Her]> If there was a Matrix bot SDK for Nim I'd probably work on a bridge tbh |
00:25:06 | FromDiscord | <Elegantbeef> If `compile` was always the VM aware it'd make it a more useless API |
00:25:09 | FromDiscord | <Chronos [She/Her]> Because this is... Less than ideal :P |
00:25:30 | FromDiscord | <Elegantbeef> Someone just needs to finish the rest api wrapping |
00:25:46 | FromDiscord | <Elegantbeef> https://github.com/tandy-1000/matrix-nim-sdk |
00:26:20 | FromDiscord | <Elegantbeef> I did make a macro that I thought would make it easier, but I've got a feeling it's less than ideal https://github.com/tandy-1000/matrix-nim-sdk/blob/v1.3/src/matrix/clientserver/clientauth/login.nim |
00:26:51 | FromDiscord | <Elegantbeef> It makes more sense as a proc macro probably |
00:27:38 | FromDiscord | <Elegantbeef> `proc logout(): bool {.request: endpoints.logout.} = response.code.is2xx()` for probably makes a whole of a lot more sense than what is presently done |
00:27:57 | FromDiscord | <Chronos [She/Her]> Fair |
00:28:16 | FromDiscord | <Elegantbeef> But yea it's all just wrapping the rest api at this point |
00:28:23 | FromDiscord | <Elegantbeef> Especially since this is a public forum so there is no need for e2e |
00:28:37 | FromDiscord | <Elegantbeef> It's a worthwhile venture for someone that often changes projects |
00:28:45 | FromDiscord | <Elegantbeef> Excuse me whilst I hop to another project |
02:08:16 | * | krux02 quit (Remote host closed the connection) |
02:31:22 | * | mal``` joined #nim |
02:31:25 | * | mal`` quit (Ping timeout: 245 seconds) |
02:42:33 | arkanoid | thanks for the explanations. It's quite clear the intention, but it's quite confusing the compiles(static(thing)). Like if the static comes before the compilation |
02:42:58 | arkanoid | does VM run rely on compilation, or is completely indepentent from it? |
02:57:24 | FromDiscord | <Elegantbeef> It's a different backend so code that does not work at runtime can work there and vice versa(atleast in theory) |
03:22:10 | * | fallback joined #nim |
03:55:01 | FromDiscord | <jviega> Interesting, the marshal library doesn't unmarshal refs properly; there's a table that caches where IDs were allocated to, and when the second ref to the same object occurs, the value in the table is wrong. It seems like `getpointer()`for the `Any` type (in typeinfo.nim), does an extra dereference, and indeed taking it away works. Is it old code, and refs were previously pointers to pointers? |
03:55:33 | FromDiscord | <Elegantbeef> I'd just say don't use marshal |
03:56:29 | FromDiscord | <jviega> Well, I knew it crashed on refs, but I was about to sit down and write my own because I need the basic functionality and would prefer a binary stream anyway, but in reality that'd take longer. |
03:56:42 | FromDiscord | <Elegantbeef> disruptek/frosty |
03:59:02 | FromDiscord | <jviega> I don't like unnecessary dependencies, and it'd be better off if the std lib was less buggy 🙂 |
03:59:28 | FromDiscord | <jviega> I'd write my own before I used one not in the stdlib, it's not too big a project |
03:59:31 | FromDiscord | <Elegantbeef> I don't disagree but marshal is a glorified json serialiser |
03:59:46 | FromDiscord | <Elegantbeef> Atleast frosty is like serde and can be reused easily |
04:02:53 | FromDiscord | <jviega> Yeah that's what I'm saying. And frosty doesn't work w/ refc, but orc still is way too buggy |
04:04:33 | FromDiscord | <Elegantbeef> Welcome to your new life of writing generic overloads 😄 |
04:05:21 | FromDiscord | <jviega> The marshal code is certainly written quite obtusely. But it's what's in the stdlib, and removing a single reference makes it at least usable 🙂 Not sure I want to figure out the onerous process to submit a 2 character patch tho |
04:08:03 | FromDiscord | <jviega> Are the instructions / guidelines anywhere? |
04:08:08 | FromDiscord | <Elegantbeef> Well if you do write your own serialiser remember to handle `enum` `distinct` and `range` 😄 |
04:08:37 | FromDiscord | <jviega> Yeah, odd those aren't done, not like it's super tough |
04:08:43 | FromDiscord | <jviega> But I don't need them either 🙂 |
04:08:52 | FromDiscord | <Elegantbeef> In my experience it's just make the change with a test, PR it and be merry |
04:09:01 | FromDiscord | <Elegantbeef> Follow NEP1 of course |
04:10:17 | FromDiscord | <jviega> For std library patches, tests in runnableExample blocks?? |
04:11:01 | FromDiscord | <Elegantbeef> Runnable examples for code to showcase how things work |
04:11:11 | FromDiscord | <Elegantbeef> `tests/stdlib/....` for tests |
04:11:25 | FromDiscord | <jviega> Ah, have never looked at the test harness |
04:11:52 | FromDiscord | <jviega> Too much work for 2 characters, I'll just auto-patch for the forseeable future 🙂 |
04:12:05 | FromDiscord | <Elegantbeef> It uses testament which is a hit or miss depending on your views |
04:12:30 | FromDiscord | <jviega> Yeah haven't spent any time w/ it so no opinion |
04:12:47 | FromDiscord | <Elegantbeef> Balls/unitest is plenty for me |
05:41:42 | FromDiscord | <.bobbbob> sent a code paste, see https://play.nim-lang.org/#ix=4Mj5 |
05:49:55 | * | rockcavera quit (Remote host closed the connection) |
06:20:57 | FromDiscord | <.bobbbob> might be making progress, the first 8 bytes of a png file have to have 0D 0A, which is a Dos style newline CR LF, in the nim output code it's missing the 0D. Does loading the file as a nim string somehow get rid of the 0D? |
06:29:14 | * | advesperacit joined #nim |
06:58:53 | * | kenran joined #nim |
07:07:39 | NimEventer | New thread by thedistantforest: Calling the generics parent function, see https://forum.nim-lang.org/t/10677 |
07:27:06 | * | PMunch joined #nim |
07:43:33 | * | kenran` joined #nim |
07:45:22 | * | kenran quit (Ping timeout: 268 seconds) |
07:52:15 | * | kenran`` joined #nim |
07:53:50 | * | kenran` quit (Ping timeout: 252 seconds) |
07:57:51 | * | kenran``` joined #nim |
07:59:47 | * | kenran`` quit (Ping timeout: 256 seconds) |
08:42:43 | * | arkanoid quit (Ping timeout: 268 seconds) |
08:44:16 | * | arkanoid joined #nim |
08:59:47 | * | beholders_eye joined #nim |
09:35:09 | Amun-Ra | .bobbbob: no |
09:36:37 | Amun-Ra | I'd vote execmdex does that if anything |
09:44:41 | Amun-Ra | this or something on shell side, which I doubt |
10:19:50 | * | jmdaemon quit (Ping timeout: 260 seconds) |
10:26:05 | FromDiscord | <ebahie> sent a code paste, see https://play.nim-lang.org/#ix=4MjW |
10:26:52 | FromDiscord | <ebahie> is this useless as a concept? should i just copy and paste the proc? |
10:27:36 | PMunch | Well typically you'd want to split the common parts into a helper function |
10:27:56 | PMunch | You say the endpoint is the same, so I assume it differentiates by the body of the request |
10:29:31 | PMunch | So you create one procedure called loginRequest which takes the body to send, and then one getMe which takes a token and one getMe which takes an email/password combo. Then in those two you construct the body you need to send and call the loginRequest procedure |
10:29:36 | FromDiscord | <ebahie> In reply to @PMunch "You say the endpoint": it actually doesn't, the request and response is the exact same but i dont really like the fact that the proc for logging in using your email is just emailLogin() while to login with your token its getMe() |
10:30:05 | PMunch | Wait, the request and response is exactly the same? |
10:30:16 | FromDiscord | <ebahie> yes everything within the proc is the same |
10:30:23 | PMunch | Then what's the difference between logging in with email/password and token? |
10:30:27 | PMunch | That doesn't make any sense.. |
10:30:44 | PMunch | In that case I'd just have a template made for one of them which calls the other |
10:32:04 | FromDiscord | <ebahie> In reply to @PMunch "Then what's the difference": to login using your email is providing your email and password as the procs args while logging in with your token requires only the token but one thing i forgot to mention is that in the email method after logging in you eventually get your token which is asigned to an already existing variable named token |
10:32:24 | FromDiscord | <ebahie> so tokenLogin() would not have = token at the end for token: string |
10:32:39 | PMunch | Something like this: https://play.nim-lang.org/#ix=4MjX |
10:34:23 | FromDiscord | <ebahie> thank you its what im looking for, sorry im a beginner so i dont know how to put it into words |
10:34:47 | PMunch | No worries, doesn't make it easier that english appears to be your second language either :) |
10:35:00 | FromDiscord | <ebahie> that too lol |
10:35:08 | PMunch | (Just judging from the echo statements in your code, your english is actually really good) |
10:35:41 | FromDiscord | <ebahie> sent a long message, see http://ix.io/4MjZ |
10:36:12 | PMunch | Hmm, that `token = token` might cause an issue |
10:36:28 | FromDiscord | <ebahie> how so? |
10:36:32 | PMunch | I think you want to rename your input token parameter to something else |
10:36:48 | PMunch | Well, templates are a bit aggressive with replacing the arguments |
10:37:41 | PMunch | So I think `tokenLogin(client, myToken)` would get turned into `myToken = myToken; getMe(client, myToken)` instead of `token = myToken; getMe(client, myToken)` which is what I suspect you're trying to do |
10:38:52 | FromDiscord | <ebahie> wait ill send you approxmatively what im trying to do |
10:38:53 | FromDiscord | <ebahie> https://play.nim-lang.org/#ix=4Mk1 |
10:39:08 | FromDiscord | <ebahie> the code is wrong but it does show about what im trying to do |
10:39:24 | PMunch | By the way, I think I would restructure that code to: https://play.nim-lang.org/#ix=4Mk2. Not really anything Nim specific, but in the case you get an error you might not have the JSON object you expect in the body |
10:39:36 | FromDiscord | <ebahie> because typing your token all the time gets annoying |
10:40:15 | PMunch | I think I would just store it in the DiscordClient object |
10:40:56 | FromDiscord | <ebahie> would it be modifiable? |
10:41:18 | PMunch | If you do `self: var DiscordClient` you can modify it |
10:41:39 | FromDiscord | <ebahie> hm alright ill try it |
10:42:01 | FromDiscord | <ebahie> sent a code paste, see https://play.nim-lang.org/#ix=4Mk4 |
10:42:31 | FromDiscord | <ebahie> sent a code paste, see https://play.nim-lang.org/#ix=4Mk5 |
10:42:42 | PMunch | Otherwise you'd probably have to do either something like this: https://play.nim-lang.org/#ix=4Mk3, or like this: https://play.nim-lang.org/#ix=4Mk6 |
10:44:21 | PMunch | If you instead allow this: https://play.nim-lang.org/#ix=4Mk7 |
10:44:41 | PMunch | Oh, and remove that `token` on line 6 of course |
10:45:36 | FromDiscord | <ebahie> In reply to @PMunch "If you instead allow": oh this is great, i think ill add token to the object |
10:49:19 | FromDiscord | <ebahie> thank you it works |
10:54:50 | FromDiscord | <ebahie> actually now that ive done this tokenLogin() is actually useless |
10:55:58 | FromDiscord | <ebahie> so now getMe can be used for both methods, nice |
11:00:19 | FromDiscord | <shourchats> How does nim modules works, nim doesn't need a main function, kinda like python so if a code is outside a function and i import that as a module what happens? Sorry, don't know much about this topic if it was a silly question |
11:00:55 | Amun-Ra | shourchats: simply? nothing |
11:01:26 | * | kenran``` quit (Remote host closed the connection) |
11:01:36 | Amun-Ra | everything on module level is already initialized |
11:01:45 | Amun-Ra | unlike in python |
11:03:57 | FromDiscord | <shourchats> hmm |
11:04:29 | FromDiscord | <shourchats> Like in python the code outside gets executed, when imported |
11:04:48 | FromDiscord | <shourchats> What happens here if i have a echo outside, nothing happens? |
11:04:55 | Amun-Ra | the code on module level is executed once on first import |
11:05:19 | FromDiscord | <shourchats> ok, so the echo will work |
11:06:30 | Amun-Ra | let me make an example |
11:06:37 | FromDiscord | <shourchats> sure |
11:07:28 | Amun-Ra | https://play.nim-lang.org/#ix=4Mka |
11:08:16 | Amun-Ra | everything on module level (var, let) is initialized on runtime on start |
11:09:04 | Amun-Ra | …so it's already "ready to use" on import |
11:10:41 | Amun-Ra | I mean import in python is evaluated runtime, whatever you imported in nim was already compiled in before the run |
11:33:34 | NimEventer | New thread by giaco: Suggested `config.nim[s]` switches for debug/release with C or C++ backend, see https://forum.nim-lang.org/t/10679 |
12:21:16 | PMunch | shourchats, if you want to have something not evaluated on import you can put it in a `when isMainModule:` block |
12:21:30 | PMunch | That makes it only execute if that module is the main module of your program |
12:54:23 | * | kenran joined #nim |
13:03:16 | * | PMunch_ joined #nim |
13:03:41 | * | PMunch quit (Quit: Leaving) |
13:03:52 | * | PMunch_ is now known as PMunch |
13:23:02 | PMunch | Okay, fun little algorithm challenge for anyone who's up for it: https://uploads.peterme.net/circles.png |
13:23:20 | PMunch | The goal is to draw these shapes given the inputs 1, 2, 3, 4, 5, etc. |
13:24:36 | PMunch | Bonus points if you can distinguish between pixels orthogonally next to the edge |
13:47:00 | * | kenran quit (Ping timeout: 245 seconds) |
13:50:32 | PMunch | Here's my best attempt so far: http://ix.io/4MkL |
13:52:26 | * | PMunch quit (Quit: Leaving) |
13:56:59 | * | kenran joined #nim |
13:57:39 | * | PMunch joined #nim |
14:08:50 | * | rockcavera joined #nim |
14:59:02 | FromDiscord | <marko9583> I'm trying to use tabby with a header that where column names contain spaces. Like `var header: seq[string] = @["user full name"]` but that gives parse errors: `Error: unhandled exception: Failed to parse, separator expected, got: f. At line: 1 column: 10 [TabbyError]` |
14:59:23 | FromDiscord | <demotomohiro> @pmunch↵Here's my attempt:↵https://play.nim-lang.org/#ix=4Ml3↵It might different from the shape you expect. |
14:59:33 | FromDiscord | <4zv4l> Is there a library to make dynamic web form ?↵↵Like for example allowing to add a name and age but can press for a “+” button and the form will generate a new entry to add one more person information |
15:00:05 | FromDiscord | <marko9583> (edit) removed "that" |
15:03:58 | PMunch | demotomohiro, hmm it's close |
15:04:03 | PMunch | But it's repeating shapes |
15:04:46 | PMunch | 1 through 4 for example draws the same shape |
15:28:39 | * | PMunch quit (Quit: Leaving) |
15:32:33 | FromDiscord | <demotomohiro> @pmunch↵I fixed code so that it doesn't repeat same shape:↵https://play.nim-lang.org/#ix=4Mld |
15:48:57 | FromDiscord | <xtrayambak> guys |
16:15:44 | FromDiscord | <Phil> In reply to @4zv4l "Is there a library": I don't have a lib for it, but I've written that kind of mechanism multiple times by now |
16:15:54 | FromDiscord | <Phil> If you want some basis for copy pasting I'm happy to link you one |
16:17:33 | FromDiscord | <Phil> Oh wait, you mean with JS, for that I haven't written one in particular but the same principle applies:↵You just need to write a function that translates an object into an HTML form and for that you can write some stuff based on the code I wrote - or come up with your own |
16:23:26 | * | kenran quit (Quit: ERC 5.6-git (IRC client for GNU Emacs 30.0.50)) |
16:23:44 | * | kenran joined #nim |
16:24:41 | * | kenran quit (Remote host closed the connection) |
16:25:22 | * | kenran joined #nim |
16:26:25 | * | kenran quit (Remote host closed the connection) |
16:27:00 | * | kenran joined #nim |
16:28:14 | FromDiscord | <redmechanics> why do i keep getting this error running the template of owlkettle ? (i guess i don't have pkg-config so how can i install it?) https://media.discordapp.net/attachments/371759389889003532/1177646868239503503/message.txt?ex=6573441d&is=6560cf1d&hm=3f4ad0acd59613b5e00dfd002bbef9bb95e8382a40e704a7f4d5415daef360fd& |
16:30:09 | FromDiscord | <Phil> err.... what's the command you're running?↵"Template of owlkettle" doesn't ring a bell for me |
16:30:15 | FromDiscord | <Phil> Also you're on windows I assume? |
16:32:39 | FromDiscord | <redmechanics> In reply to @isofruit "Also you're on windows": yes |
16:32:50 | FromDiscord | <Phil> @redmechanics ↵Also did you check out https://github.com/can-lehmann/owlkettle/discussions/53 ?↵(I can't really troubleshoot myself as I don't use windows for various reasons) |
16:33:07 | FromDiscord | <redmechanics> In reply to @isofruit "err.... what's the command": it's the code that is in the documentation of owlkettle on github |
16:33:35 | FromDiscord | <Phil> There's a ton of code in there and multiple dozens of examples, you'll need to be more specific ^^ |
16:33:59 | FromDiscord | <Phil> You mean the first example in the README.md? |
16:36:39 | FromDiscord | <Phil> One second.... @takemichihanagaki3129 are you RickBaretto? |
16:37:32 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "One second.... <@890300313729400832> are": Yes, it's me. Lol |
16:37:47 | FromDiscord | <takemichihanagaki3129> I forgot to change my nickname.↵But how did you know? |
16:37:49 | FromDiscord | <Phil> Man that took a while to connect |
16:38:12 | FromDiscord | <Phil> You literally linked to a discord thread in your windows explainer for owlkettle that mentioned me and I was so confused xD |
16:39:13 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "You literally linked to": Makes sense |
16:39:22 | FromDiscord | <Phil> Given that this means you're on windows and have used owlkettle before!... Does DevNitrates error message look familiar to you? |
16:39:52 | FromDiscord | <Phil> Some command is getting wrongly parsed but I honestly feel like there's too much of the stacktrace missing to see where and how exactly |
16:40:47 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Given that this means": DevNitrates? I've never heard about this before. |
16:41:00 | FromDiscord | <Phil> In reply to @redmechanics "why do i keep": Scrolling up my guys, this one here |
16:41:28 | FromDiscord | <takemichihanagaki3129> In reply to @takemichihanagaki3129 "DevNitrates? I've never heard": Ohhh! Got it. ↵Let me see. |
16:42:30 | * | xet7 joined #nim |
16:42:40 | FromDiscord | <takemichihanagaki3129> In reply to @redmechanics "why do i keep": Interesting question. ↵I'll open my pc in some minutes to read this error message.↵But, are you using MSYS? |
16:43:29 | FromDiscord | <takemichihanagaki3129> To compile owkettle, you need the pkg-config, or the pkg-config's argument for GTK4. |
16:43:55 | FromDiscord | <takemichihanagaki3129> I'm with a new pc, so I have to install gtk-4 yet to help you. |
16:45:56 | FromDiscord | <takemichihanagaki3129> sent a code paste, see https://play.nim-lang.org/#ix=4Mlu |
16:46:04 | FromDiscord | <takemichihanagaki3129> I think |
16:47:02 | FromDiscord | <Phil> Is the way to install gtk-4 on windows so complex that it might make sense for us to keep our own "how to install gtk-4" page in owlkettle?↵Or is whatever instructions the gtk docs provide already sufficient? |
16:47:05 | * | kenran quit (Remote host closed the connection) |
16:47:47 | FromDiscord | <Phil> Because this is a consistent problem and I was under the impression that GTK themselves provided usable installation instructions |
16:55:47 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Is the way to": Nope, this is simple to be honest. Just find the package.↵Msys works with pacman and have their own repository of packages. |
16:57:11 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Is the way to": For using, yes.↵For installing on msys, they don't provide anything if I'm not wrong.↵↵But for what I've used, they install in a similar way that is on linux, so you won't get any issues using it. |
16:58:25 | FromDiscord | <Phil> In reply to @takemichihanagaki3129 "For using, yes. For": So assume you're a noob to msys. Where would you get the information to call the correct pacman install command? |
16:59:00 | FromDiscord | <Phil> Wait, nevermind, we actually provide the command in the README |
17:00:04 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "So assume you're a": The official repository: https://packages.msys2.org/package/ |
17:00:52 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Wait, nevermind, we actually": I think I wrote about that.↵But I probably forgot about the installation of pkgconfig... |
17:01:37 | FromDiscord | <takemichihanagaki3129> When I installed the MSYS on my new machine, I noticed pkg-config is not installed by default. |
17:01:52 | FromDiscord | <Phil> Wait, so there's more than just `pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita` ? |
17:02:28 | FromDiscord | <Phil> I mean, I'm already making a prettification PR for the README to turn those install commands into a list.↵If you want to hand me any additions I can just include them |
17:03:54 | FromDiscord | <redmechanics> In reply to @takemichihanagaki3129 "When I installed the": yes me too even tho i installed msys2 and gtk 4 |
17:05:29 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Wait, so there's more": I think it just misses the pkg-config...↵I'll have a look soon.↵↵But when I tried to compile my first time, yes, I just installed these two. |
17:05:58 | FromDiscord | <takemichihanagaki3129> In reply to @redmechanics "yes me too even": Well, I think it's the pkg-config. |
17:06:16 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "I mean, I'm already": Alright |
17:06:47 | FromDiscord | <Phil> I have no idea what exactly said pkg-config is... is it another package? |
17:08:25 | FromDiscord | <rakgew> yes |
17:08:35 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "I have no idea": Yes |
17:10:08 | FromDiscord | <takemichihanagaki3129> I'm trying to find what is the name of the package.↵I had to install it due to Arturo. |
17:10:46 | FromDiscord | <Phil> All good, I'll just update the PR once you can throw me whatever CLI command should be added to the install instructions |
17:10:52 | FromDiscord | <Phil> No need to be hasty |
17:12:01 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "All good, I'll just": Sure, I'll try to compile it today.↵And I give the feedback, @Phil and @redmechanics. |
17:12:41 | FromDiscord | <Phil> Thanks a ton!↵You're basically my go-to person atm for figuring out windows-specific owlkettle issues so I highly appreciate the help! |
17:15:03 | FromDiscord | <redmechanics> In reply to @takemichihanagaki3129 "Sure, I'll try to": i think pkg-config is installed using the command that is provided here: https://packages.msys2.org/package/mingw-w64-x86_64-pkg-config which i did but pkg-config is still not recognized as a commmand on my pc |
17:16:23 | FromDiscord | <takemichihanagaki3129> In reply to @redmechanics "i think pkg-config is": Can you try `which pkg-config`? |
17:16:29 | FromDiscord | <takemichihanagaki3129> On cmd |
17:16:47 | FromDiscord | <takemichihanagaki3129> You must make sure that your mingw is at you PATH too. |
17:17:12 | FromDiscord | <takemichihanagaki3129> I put my mingw/bin and then I put my usr/bin folder... |
17:17:33 | FromDiscord | <takemichihanagaki3129> And also, you must put the bin, the include and lib folders at your path. |
17:18:23 | FromDiscord | <redmechanics> In reply to @takemichihanagaki3129 "Can you try `which": which is not recognized as a commabnd |
17:18:28 | FromDiscord | <redmechanics> (edit) "commabnd" => "command" |
17:18:58 | FromDiscord | <takemichihanagaki3129> In reply to @redmechanics "which is not recognized": 🤔, try `where` so. |
17:18:59 | FromDiscord | <Phil> That... sounds like a fundamentally broken shell |
17:19:35 | FromDiscord | <redmechanics> In reply to @takemichihanagaki3129 "🤔, try `where` so.": better here is the result of the command: where pkg-config↵INFO: Could not find files for the given pattern(s). |
17:19:35 | FromDiscord | <takemichihanagaki3129> Where returns a Windows-ish path, while which a unix-ish path. |
17:20:16 | FromDiscord | <takemichihanagaki3129> In reply to @redmechanics "better here is the": Are you running from msys? |
17:20:46 | FromDiscord | <takemichihanagaki3129> (edit) "msys?" => "the msys terminal?" |
17:23:24 | FromDiscord | <redmechanics> In reply to @takemichihanagaki3129 "Are you running from": no i wasn't so retried the which command and the result is: /usr/bin/pkg-config |
17:24:36 | FromDiscord | <takemichihanagaki3129> In reply to @redmechanics "no i wasn't so": Can you try to compile your project from the msys' terminal?↵If this is recognizing the gtk and the pkg-config, this should work. |
17:24:48 | FromDiscord | <takemichihanagaki3129> Probably, this is a path issue. |
17:29:14 | FromDiscord | <treeform> In reply to @PMunch "Okay, fun little algorithm": Use pixie, remove alpha != 255 and upscale? |
17:29:54 | FromDiscord | <redmechanics> In reply to @takemichihanagaki3129 "Can you try to": nim command isn't recognized in the msys2 terminal |
17:31:24 | FromDiscord | <michaelb.eth> probably isn't in PATH in the msys2 terminal, if you Nim previously for use in cmd.exe |
17:32:15 | FromDiscord | <michaelb.eth> I like to use choosenim in msys2 to install Nim for use in that context |
17:38:00 | FromDiscord | <takemichihanagaki3129> sent a long message, see http://ix.io/4MlM |
17:50:37 | FromDiscord | <redmechanics> In reply to @takemichihanagaki3129 "In this case we": i added the directory of where the pkg-config command is in my Path env variable but i still cant run it |
17:54:47 | * | beholders_eye quit (Ping timeout: 256 seconds) |
18:36:58 | FromDiscord | <TӨMΛ ☠> sent a long message, see http://ix.io/4Mm2 |
18:38:19 | FromDiscord | <TӨMΛ ☠> (edit) "http://ix.io/4Mm2" => "http://ix.io/4Mm5" |
18:38:38 | FromDiscord | <TӨMΛ ☠> (edit) "http://ix.io/4Mm5" => "https://paste.rs/sOD9A" |
18:41:16 | FromDiscord | <TӨMΛ ☠> sent a code paste, see https://play.nim-lang.org/#ix=4Mm7 |
18:46:28 | FromDiscord | <spotlightkid> Error messages? |
18:47:56 | FromDiscord | <starkiller1493> How can I turn an object into it |
18:48:04 | FromDiscord | <starkiller1493> (edit) "it" => "it's child?" |
18:48:33 | FromDiscord | <starkiller1493> (edit) "it's child?" => "a one that's inheriting from it?" |
18:48:58 | FromDiscord | <TӨMΛ ☠> In reply to @toma400 "Okay, so basically I": I just realised, somehow in this error message the directory has weirdly twisted directory name (niesamowicie ważne (...)). But why would this be a thing with like specific function being used, but not something happening everytime? And why would it even do something like that? |
18:50:51 | FromDiscord | <TӨMΛ ☠> (edit) "In reply to @toma400 "Okay, so basically I": I just realised, somehow in this error message the directory ... has" added "for output" |
18:55:21 | FromDiscord | <spotlightkid> The error message does not display here in the Matrix chat. Somehow the discord bridge does not handle it correctly. |
18:56:54 | * | krux02 joined #nim |
18:57:12 | FromDiscord | <TӨMΛ ☠> In reply to @spotlightkid "The error message does": It tells that cannot open output file, and it tells path to desired .exe location with distored Polish `ż`, saying there's no such file or directory↵collect2.exe tells that `ld returned 1 exit status`↵And then error goes `execution of an external program failed 'gcc.exe @skinv2_linkerArgs.txt` |
18:57:25 | FromDiscord | <Phil> In reply to @takemichihanagaki3129 "In this case we": As someone who currently has their brain shut off, for instructions does that mean we need to provide specific instructions how to install msys or sth? |
18:57:55 | FromDiscord | <TӨMΛ ☠> I have update on that issue, since seeing this distorted `ż`, I tried to ask my friend to run this code elsewhere and it apparently works :o↵No idea why it does have that very selective issue |
19:47:47 | FromDiscord | <booomintunes> In reply to @boom_bang "i had to redownload": I got a new acc |
19:47:57 | FromDiscord | <booomintunes> and for whatever reason it doesn't stop |
19:48:17 | FromDiscord | <booomintunes> Even when I redownload the Nim compiler and get a new C compiler |
19:50:02 | FromDiscord | <booomintunes> Compiler gives off this weird string |
20:09:22 | FromDiscord | <fabric.input_output> does the push pragma cause the pragma you push to be applied to every node between itself and the pop pragma? |
20:10:18 | FromDiscord | <fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4Mmp |
20:14:00 | * | beholders_eye joined #nim |
20:14:37 | FromDiscord | <michaelb.eth> In reply to @booomintunes "Compiler gives off this": what's the weird string? |
20:19:00 | FromDiscord | <booomintunes> In reply to @michaelb.eth "what's the weird string?": https://media.discordapp.net/attachments/371759389889003532/1177704945462550609/message.txt?ex=65737a33&is=65610533&hm=3aee3c6723f2f95092cb4b1393d47e6509d8d246f2e1c21560ad9e3606758f8e& |
20:19:12 | FromDiscord | <booomintunes> very incomprehensible |
20:19:21 | FromDiscord | <booomintunes> can tell something went wrong |
20:19:27 | FromDiscord | <booomintunes> can't tell what though |
20:21:05 | FromDiscord | <michaelb.eth> are you running in Windows Terminal or cmd.exe or what exactly? Have you enabled utf-8 at OS-level for Windows? |
20:21:34 | FromDiscord | <booomintunes> Windows |
20:21:42 | FromDiscord | <booomintunes> I don't know if I enabled utf8 |
20:22:03 | FromDiscord | <michaelb.eth> In reply to @booomintunes "Windows": meaning the Windows Terminal program specifically? |
20:22:12 | FromDiscord | <booomintunes> I'm using VSCode |
20:22:37 | FromDiscord | <booomintunes> It says I'm using powershell also |
20:22:51 | FromDiscord | <michaelb.eth> In reply to @booomintunes "I don't know if": Language settings -> Administrative language settings -> Change system locale -> Beta: Use Unicode UTF-8 for worldwide language support |
20:24:41 | FromDiscord | <booomintunes> Yes |
20:37:18 | om3ga | guts what is minimal version of clang supported by nim 2.0.0? |
20:39:28 | FromDiscord | <michaelb.eth> In reply to @booomintunes "Yes": maybe try running the nim compiler commands directly, in Windows Terminal (i.e. apart from VSCode) and check if you get same garbled output |
20:41:02 | FromDiscord | <booomintunes> In reply to @michaelb.eth "maybe try running the": Yep, same output |
20:42:35 | FromDiscord | <michaelb.eth> can you try an MSYS2 + choosenim setup and then run the commands in a mintty/Bash session? |
20:43:00 | FromDiscord | <michaelb.eth> and/or see what happens with a WSL2 setup |
21:08:38 | * | xet7 quit (Remote host closed the connection) |
21:15:53 | FromDiscord | <takemichihanagaki3129> sent a code paste, see https://play.nim-lang.org/#ix=4MmI |
21:16:36 | FromDiscord | <takemichihanagaki3129> In reply to @takemichihanagaki3129 "<@180601887916163073> <@927619710672060488>, yes, t": I would recommend install the toolchain itself. |
21:21:19 | om3ga | /root/nim/lib/pure/times.nim:511: undefined reference to `__mulodi4' |
21:21:32 | rockcavera | Nim automatically changes the console output in Windows to UTF8 and when you close the program it returns to the adopted page |
21:21:36 | om3ga | this is in Alpine |
21:22:12 | rockcavera | om3ga, alpine uses musl, this part of the libc may not be implemented |
21:22:13 | om3ga | I almost reached latest version, which looks like not supports cpu on this i586 machiene |
21:22:26 | om3ga | rockcavera: hmm |
21:22:43 | om3ga | but I use clang |
21:22:56 | rockcavera | are you using clang? what version? clang -v |
21:23:07 | om3ga | this function definitely is in compiler-rt |
21:23:32 | rockcavera | What target is used by default in your clang? |
21:23:51 | rockcavera | clang version 17.0.5 |
21:23:51 | rockcavera | Target: x86_64-pc-windows-msvc |
21:23:51 | rockcavera | Thread model: posix |
21:23:51 | rockcavera | InstalledDir: e:\compilers\llvm64\bin |
21:23:54 | rockcavera | On windows |
21:24:05 | FromDiscord | <Phil> In reply to @takemichihanagaki3129 "<@180601887916163073> <@927619710672060488>, yes, t": So basically turn↵`pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita`↵Into↵`pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita mingw-w64-x86_64-toolchain` ? |
21:24:17 | om3ga | one moment... |
21:24:24 | * | PMunch joined #nim |
21:25:17 | FromDiscord | <Phil> Actually, might as well continue this discussion in the PR |
21:25:32 | om3ga | Alpine clang version 13.0.1 |
21:25:38 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "So basically turn `pacman": I commented in your PR |
21:25:58 | rockcavera | om3ga and the target? |
21:26:04 | rockcavera | Target: x86_64-pc-windows-msvc |
21:26:07 | FromDiscord | <Phil> In reply to @takemichihanagaki3129 "I commented in your": I was about to repeat my question from here into there 😛↵I'm mostly struggling translating your suggestions into a sentence to write in the markdown ^^ |
21:26:16 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "So basically turn `pacman": In the end of the day the user will be using the toolchain anyway, because he needs the gcc and binutils for compile any nim project. |
21:26:22 | om3ga | i don't see anything like this |
21:26:32 | om3ga | selected multilib @m32 |
21:26:41 | om3ga | ah, here is target |
21:26:45 | rockcavera | just type: clang -v |
21:26:51 | om3ga | i586-alpine-linux-musl |
21:26:55 | rockcavera | musl |
21:26:56 | rockcavera | =) |
21:26:58 | om3ga | damn |
21:27:01 | FromDiscord | <takemichihanagaki3129> @redmechanics my account's PATH if you need some help. https://media.discordapp.net/attachments/371759389889003532/1177722062937260172/image.png?ex=65738a24&is=65611524&hm=ee278aa664595b7de9873f72f052f7bcb0b6a95ff7f8da8883ffa1ab30f29c0d& |
21:27:03 | om3ga | and what to do? |
21:27:18 | FromDiscord | <takemichihanagaki3129> (edit) "@redmechanics my account's PATH if you need some help. ... https://media.discordapp.net/attachments/371759389889003532/1177722062937260172/image.png?ex=65738a24&is=65611524&hm=ee278aa664595b7de9873f72f052f7bcb0b6a95ff7f8da8883ffa1ab30f29c0d&" added "I'm able to use it from anywhere." |
21:27:51 | rockcavera | try --passC:"-target i586-alpine-linux-gnu" |
21:28:30 | om3ga | ok |
21:28:40 | om3ga | I will reply in 20 minutes :D |
21:29:29 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "As someone who currently": I don't think this is necessary because the MSYS's documentation is enough to understand the process.↵And if they update their documentation, you'll need too. |
21:29:37 | rockcavera | on my alpine VM I use gcc |
21:30:11 | FromDiscord | <Phil> In reply to @takemichihanagaki3129 "I don't think this": So more of a "Make sure to have Msys installed and on your path <link to docs>" situation ? |
21:31:17 | FromDiscord | <Phil> Waaait a minute, shouldn't the toolchain package show up like... somewhere in their getting started page at least?↵ - msys64/mingw64/bin |
21:31:30 | FromDiscord | <Phil> (edit) "least?↵ - msys64/mingw64/bin" => "least?↵https://www.msys2.org/" |
21:32:17 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "So more of a": Yes! I think a "how to set MSYS" would be great, but into a discussion or smt else. I can write it if you want to. And then you point it on that readme. |
21:32:28 | FromDiscord | <michaelb.eth> sent a long message, see http://ix.io/4MmM |
21:32:39 | FromDiscord | <Phil> In reply to @takemichihanagaki3129 "Yes! I think a": That would be highly appreciated |
21:32:42 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Waaait a minute, shouldn't": When I installed my first time there was. Strange... |
21:33:00 | FromDiscord | <Phil> I mean I'm just looking for the word "toolchain" and it shows up nowhere |
21:33:04 | FromDiscord | <Phil> Was it maybe moved into the installer? |
21:33:09 | FromDiscord | <takemichihanagaki3129> (edit) "there was." => "was there." |
21:33:18 | FromDiscord | <Phil> Like that just does shit and voila, toolchain package installed |
21:33:21 | FromDiscord | <Phil> (edit) "installed" => "installed?" |
21:33:53 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Was it maybe moved": Nope, they didn't because I had to install everything again manually. |
21:34:03 | FromDiscord | <Phil> That... wow that sucks |
21:34:34 | FromDiscord | <takemichihanagaki3129> The first time I installed it was like 1 year ago, they provided the toolchain in their documentation if I'm not wrong. |
21:35:19 | FromDiscord | <Phil> I mean the word gets mentioned in "Documentation > Environments" |
21:35:21 | FromDiscord | <takemichihanagaki3129> This last week I tried and nope, they did not come with the installer, I had to install everything again. |
21:35:30 | FromDiscord | <Phil> Where they mention the various toolchains available |
21:35:43 | FromDiscord | <Phil> Not how to install them though |
21:37:31 | FromDiscord | <michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4MmN |
21:38:25 | FromDiscord | <michaelb.eth> (edit) "https://play.nim-lang.org/#ix=4MmN" => "https://play.nim-lang.org/#ix=4MmO" |
21:38:40 | FromDiscord | <michaelb.eth> (edit) "https://play.nim-lang.org/#ix=4MmO" => "https://play.nim-lang.org/#ix=4MmP" |
21:38:48 | FromDiscord | <Phil> Check. So in terms of planning: @takemichihanagaki3129 you write the show-and-tell discussion topic to link to in the PR, I add to the PR comments what we just chatted about and I add the link to the PR once it exists? |
21:38:58 | rockcavera | om3ga see this https://github.com/dslm4515/BMLFS/issues/12#issuecomment-766904651 |
21:39:10 | FromDiscord | <Phil> (edit) "So" => "Shoooouuuuuld be useful for Takemichi I think maybe↵So" |
21:40:10 | * | xet7 joined #nim |
21:41:01 | om3ga | rockcavera: I tried -rtlib=compiler-rt previously |
21:41:02 | FromDiscord | <takemichihanagaki3129> In reply to @isofruit "Check. Shoooouuuuuld be useful": Yes. I'm writing right now the show&tell. |
21:41:17 | om3ga | rockcavera: not works, Illegal instruction |
21:41:43 | om3ga | but strange thing is that the same code works well with musl in 64bit linux |
21:42:16 | om3ga | nah, changing target not helps |
21:42:35 | om3ga | I thought it is compiler bug |
21:42:46 | om3ga | but seems not |
21:43:22 | om3ga | I will try to upgrade on next release, meybe clang 15 will help |
21:43:46 | FromDiscord | <michaelb.eth> In reply to @takemichihanagaki3129 "Yes. I'm writing right": one small thing for your writeup, be sure to consistently refer MSYS2. It’s a completely separate project from MSYS, i.e. it’s not MSYS version 2. |
21:44:08 | FromDiscord | <michaelb.eth> (edit) "In reply to @takemichihanagaki3129 "Yes. I'm writing right": one small thing for your writeup, be sure to consistently refer ... MSYS2." added "to" |
21:45:09 | rockcavera | om3ga -rtlib=compiler-rt must be passed by --passL:-rtlib=compiler-rt |
21:45:57 | rockcavera | also try --passC:-D__WORDSIZE=32 |
21:46:29 | om3ga | I tried this |
21:46:40 | om3ga | Illegal Instruction |
21:46:55 | rockcavera | ;\ |
21:47:18 | om3ga | yeah, looks like something wrong in Alpine |
21:47:28 | om3ga | or maybe not for 32 bit |
21:47:52 | om3ga | but.. how it compiles with mingw for windows then |
21:48:04 | om3ga | strange |
21:49:52 | om3ga | ah, maybe because mingw generates machine code for i686 |
21:50:48 | om3ga | in theory it should be possible to replace this overflow detection with own function |
21:50:58 | om3ga | let's see |
21:51:09 | om3ga | this computer is so damn slow... |
21:52:58 | rockcavera | `__mulodi4` appears to be some overflow checking thing. Try compiling with -d:danger |
21:55:17 | rockcavera | try nim c -d:nimEmulateOverflowChecks ... |
21:57:31 | om3ga | rockavera, already tried |
21:57:50 | om3ga | this code jad -d:danger in the beginning, and -Ofast |
21:57:56 | om3ga | *had |
21:58:23 | om3ga | no, seems something broken, or probably not supported by i586 |
21:58:44 | om3ga | I will ask on llvm channel probably |
21:58:45 | rockcavera | can't you install gcc? |
21:59:06 | om3ga | with gcc it throws exception about int overflow |
21:59:17 | om3ga | which shou;dn't be there |
21:59:53 | rockcavera | strange |
22:00:07 | om3ga | the code works well in 64 bit os |
22:00:24 | om3ga | very precisely tested |
22:00:47 | PMunch | Fun.. I get an error from the regex module |
22:00:53 | PMunch | Only problem is, I don't import that module |
22:01:02 | om3ga | magic :) |
22:01:07 | PMunch | And the error doesn't tell me where the error is coming from |
22:01:08 | om3ga | today is mystic friday |
22:01:13 | rockcavera | om3ga in your alpine uname -a returns what? |
22:03:08 | om3ga | rockavera Linux box 5.15.138-0-lts #1-Alpine SMP Thu, 09 Nov 2023 09:12:25 +0000 i586 Linux |
22:03:34 | om3ga | now I started another upgrade to 3.17 |
22:05:14 | rockcavera | in fact it is the same version as my alpine, but i586 architecture |
22:05:57 | rockcavera | there must be a 64-bit integer emulation problem that is not present in the musl |
22:07:14 | rockcavera | in clang msvc there is an instruction for 128-bit division that also causes reference problems, but using clang gnu it no longer works |
22:07:15 | om3ga | yeah, probably this is the issues |
22:08:00 | om3ga | what I found in google, this issue starts back from 2015 |
22:25:03 | FromDiscord | <takemichihanagaki3129> In reply to @michaelb.eth "one small thing for": Thanks for the advise!↵If you want to review my discussion and give me some feedback I would be glad! https://github.com/can-lehmann/owlkettle/discussions/144 |
22:31:57 | FromDiscord | <michaelb.eth> I’d be happy to provide some feedback, but won’t have an opportunity until late tonight (I’m in us central tz) or probably tomorrow |
22:39:26 | * | jmdaemon joined #nim |
22:41:47 | FromDiscord | <Phil> In reply to @takemichihanagaki3129 "Thanks for the advise!": Updated the Readme accordingly |
22:44:58 | FromDiscord | <takemichihanagaki3129> In reply to @michaelb.eth "I’d be happy to": No prob! |
22:48:05 | * | advesperacit quit () |
22:58:37 | * | beholders_eye quit (Ping timeout: 276 seconds) |
23:04:34 | FromDiscord | <bootymonster69> the current procedure is exited when it raises an exception, correct? |
23:04:54 | FromDiscord | <Elegantbeef> If there is no handler inside the procedure, yes |
23:05:05 | FromDiscord | <Elegantbeef> It walks up the stack until it is handled |
23:16:24 | * | beholders_eye joined #nim |
23:26:36 | * | dtomato quit (Read error: Connection reset by peer) |
23:51:47 | * | beholders_eye quit (Ping timeout: 256 seconds) |