01:04:03 | * | rockcavera quit (Read error: Connection reset by peer) |
01:04:40 | * | rockcavera joined #nim |
01:04:40 | * | rockcavera quit (Changing host) |
01:04:40 | * | rockcavera joined #nim |
01:06:29 | * | tiorock joined #nim |
01:06:29 | * | rockcavera is now known as Guest5203 |
01:06:29 | * | Guest5203 quit (Killed (molybdenum.libera.chat (Nickname regained by services))) |
01:06:29 | * | tiorock is now known as rockcavera |
01:15:50 | FromDiscord | <Weldify> how do i get a pointer to a string? im trying to use tigr-nim `loadImageMem` with embedfs |
01:16:04 | FromDiscord | <Elegantbeef> `myString[0].addr` |
01:16:19 | FromDiscord | <Weldify> and how would i get the size of the pointer too? |
01:16:29 | FromDiscord | <Elegantbeef> `myString.len`? |
01:16:36 | FromDiscord | <Weldify> let me try |
01:16:46 | FromDiscord | <Elegantbeef> A pointer is fixed with so i assume that you want the length of the string |
01:17:30 | FromDiscord | <Weldify> sent a code paste, see https://play.nim-lang.org/#ix=4tPh |
01:17:37 | FromDiscord | <Weldify> this is the implemenation of the proc im trying to use |
01:17:42 | FromDiscord | <Weldify> its a c binding |
01:17:47 | FromDiscord | <Elegantbeef> Yea what i said is right |
01:17:52 | FromDiscord | <Weldify> alright, trying it out |
01:24:08 | FromDiscord | <Weldify> weird, embedfs errors when building now |
01:24:13 | FromDiscord | <Weldify> built fine a couple times before |
01:40:56 | NimEventer | New thread by noah: Nim for quantum computing?, see https://forum.nim-lang.org/t/10114 |
02:15:23 | * | derpydoo joined #nim |
03:10:40 | * | arkurious quit (Quit: Leaving) |
04:05:40 | * | cm quit (Quit: Bye.) |
04:06:00 | * | cm joined #nim |
04:08:05 | * | derpydoo quit (Ping timeout: 240 seconds) |
04:39:57 | * | cm quit (Ping timeout: 255 seconds) |
04:40:52 | * | cm joined #nim |
04:50:18 | * | cm quit (Ping timeout: 255 seconds) |
04:52:40 | * | cm joined #nim |
05:35:43 | * | kenran joined #nim |
06:06:33 | * | rockcavera quit (Remote host closed the connection) |
06:45:52 | * | lumidify quit (Ping timeout: 248 seconds) |
06:46:49 | * | lumidify joined #nim |
06:57:19 | * | advesperacit joined #nim |
06:57:22 | * | PMunch joined #nim |
07:04:56 | * | derpydoo joined #nim |
07:12:43 | * | fredrikhr joined #nim |
07:19:15 | * | ltriant quit (Ping timeout: 255 seconds) |
07:24:06 | * | fredrikhr92 joined #nim |
07:24:12 | * | fredrikhr quit (Ping timeout: 255 seconds) |
07:25:06 | * | fredrik92 joined #nim |
07:28:17 | * | fredrikhr joined #nim |
07:29:00 | * | fredrikhr92 quit (Ping timeout: 260 seconds) |
07:29:58 | * | fredrik92 quit (Ping timeout: 276 seconds) |
08:33:28 | * | lucasta quit (Remote host closed the connection) |
09:00:54 | * | fredrikhr92 joined #nim |
09:02:26 | * | fredrik92 joined #nim |
09:03:30 | * | fredrikhr quit (Ping timeout: 260 seconds) |
09:06:10 | * | fredrikhr92 quit (Ping timeout: 276 seconds) |
09:09:44 | * | fredrikhr92 joined #nim |
09:14:00 | * | fredrik92 quit (Ping timeout: 260 seconds) |
09:33:22 | FromDiscord | <demotomohiro> Anyone know URL of devel Nim documents?↵I bookmarked it before but my SSD gone. |
09:34:05 | FromDiscord | <demotomohiro> I found it on readme.md in Nim |
09:34:07 | FromDiscord | <demotomohiro> https://nim-lang.github.io/Nim/ |
10:13:31 | * | ltriant joined #nim |
10:22:48 | FromDiscord | <Weldify> when line 18 of the task runs, it errors: https://media.discordapp.net/attachments/371759389889003532/1098554351145992302/image.png |
10:22:49 | FromDiscord | <Weldify> https://media.discordapp.net/attachments/371759389889003532/1098554356195938425/image.png |
10:22:56 | FromDiscord | <Weldify> but when i run it myself in the console, it works. how come? |
10:25:32 | * | fredrikhr92 is now known as fredrikhr |
10:27:10 | PMunch | @Weldify, possibly a paths issue |
10:28:24 | FromDiscord | <Weldify> how would i troubleshoot that? |
10:28:46 | PMunch | Try typing in full paths and see if that fixes anything |
10:30:07 | FromDiscord | <Weldify> did it, seems like it doesnt have access to the file |
10:30:11 | FromDiscord | <Weldify> since its in C:/ |
10:33:15 | * | derpydoo quit (Quit: derpydoo) |
11:00:34 | FromDiscord | <michaelb.eth> sent a long message, see http://ix.io/4tQI |
11:02:12 | FromDiscord | <michaelb.eth> you can do it for any valid version num, e.g. 1.2.18, 1.4.0, 1.6.8, etc. |
11:42:37 | FromDiscord | <demotomohiro> In reply to @michaelb.eth "you can swap version": Thank you! I didnt know that. |
12:40:46 | FromDiscord | <rchan> sent a long message, see http://ix.io/4tR3 |
12:47:18 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/system.html#copyMem%2Cpointer%2Cpointer%2CNatural |
12:50:25 | * | progranner joined #nim |
12:51:39 | * | progranner quit (Client Quit) |
12:53:11 | FromDiscord | <rchan> Thank you, that's is exactly what I wanted |
12:55:44 | * | progranner joined #nim |
13:29:50 | * | om3ga quit (Ping timeout: 250 seconds) |
13:39:08 | * | rockcavera joined #nim |
13:49:35 | FromDiscord | <Sentmoraap> Hello. I tried to create a forum account, did not notice the activation link until it expired, did not found how to send another one, deleted my account to re-create it, but when I sign up I get "Unknown error occurred". How can I fix this? |
13:49:59 | FromDiscord | <ringabout> In reply to @Sentmoraap "Hello. I tried to": What's your account name? |
13:50:48 | FromDiscord | <ringabout> Afaik, you cannot recreate an account with the same name. |
13:51:05 | FromDiscord | <ringabout> (edit) "name." => "name as the deleted account." |
13:51:14 | FromDiscord | <Sentmoraap> Is same e-mail OK? |
13:55:04 | FromDiscord | <ringabout> Perhaps. |
14:03:47 | * | kenran quit (Remote host closed the connection) |
14:06:23 | * | PMunch quit (Quit: Leaving) |
14:11:34 | * | om3ga joined #nim |
14:58:24 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:00:50 | * | progranner joined #nim |
15:01:12 | FromDiscord | <Sentmoraap> Ok thank you. My account is Sentmoraap. I will retry first with the same e-mail. |
15:15:08 | FromDiscord | <Gumbercules> `copyMem`? |
15:20:57 | NimEventer | New question by init 1: Per-iteration variable in Nim?, see https://stackoverflow.com/questions/76065750/per-iteration-variable-in-nim |
15:25:50 | FromDiscord | <cmc> Just gave the hellomello Nim-for-Android system a whirl. Got stuck on compiling the dali dalvik assembler- can you help?cd dali↵nim c jni\_hello.nim↵jni\_hello.nim(34, 19) Error\: missing type for paramakavel (Mateusz Czapliński) |
15:35:44 | * | rockcavera quit (Read error: Connection reset by peer) |
15:36:06 | * | rockcavera joined #nim |
15:36:06 | * | rockcavera quit (Changing host) |
15:36:06 | * | rockcavera joined #nim |
15:56:26 | * | arkurious joined #nim |
16:28:02 | * | Notxor joined #nim |
16:29:46 | * | pharonix71 quit (Remote host closed the connection) |
16:30:16 | * | pharonix71 joined #nim |
16:31:50 | * | advesperacit quit (Ping timeout: 246 seconds) |
16:32:28 | * | advesperacit joined #nim |
16:52:31 | * | PMunch joined #nim |
16:59:08 | * | lucasta joined #nim |
17:30:20 | * | azimut quit (Ping timeout: 255 seconds) |
17:59:29 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
18:00:41 | * | krux02 joined #nim |
18:34:39 | * | krux02 quit (Remote host closed the connection) |
18:35:23 | * | krux02 joined #nim |
18:40:42 | * | lucasta quit (Remote host closed the connection) |
19:03:51 | * | progranner joined #nim |
19:16:46 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:20:07 | * | progranner joined #nim |
19:42:48 | NimEventer | New thread by James1404: Defining type fields with a template, see https://forum.nim-lang.org/t/10115 |
19:43:25 | FromDiscord | <⃟⃟> are allegations that several nimers participated in jan 6 true? |
19:44:27 | FromDiscord | <Elegantbeef> Do you have anything else to do aside from shitposting? |
19:44:49 | NimEventer | New thread by alexeypetrushin: Workaround for "cannot be captured as it would violate memory safety", see https://forum.nim-lang.org/t/10116 |
19:54:41 | FromDiscord | <Yardanico> In reply to @⃟⃟ "are allegations that several": I'm warning you again, please stop with posting random stuff like that in #main, next time I will have to delete the message and mute you. |
19:55:40 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:56:42 | * | progranner joined #nim |
20:16:05 | FromDiscord | <Dimi> Hej all, any ideas, why ↵`echo find("404", current)`↵↵throwing the : Error: type mismatch: got <char, string> |
20:16:55 | FromDiscord | <Recruit_main707> too many warnings for plain low effort trolls |
20:16:56 | FromDiscord | <Dimi> I've tried to use contains proc from strutils, but things goy too much complex |
20:17:28 | FromDiscord | <Dimi> (edit) "goy" => "got" |
20:17:37 | FromDiscord | <Recruit_main707> isnt there anything else after that? |
20:17:51 | FromDiscord | <Recruit_main707> in the error msg? |
20:18:13 | FromDiscord | <Yardanico> In reply to @Dimi "Hej all, any ideas,": show the full error by the compiler please |
20:18:26 | FromDiscord | <Yardanico> In reply to @Dimi "I've tried to use": `contains` can be used via `in` very easily |
20:18:30 | FromDiscord | <Yardanico> `echo "404" in current` |
20:18:40 | FromDiscord | <Yardanico> that does `contains(current, "404")` |
20:18:44 | FromDiscord | <Dimi> sent a long message, see http://ix.io/4tSz |
20:18:59 | FromDiscord | <Yardanico> and what line does it error on? |
20:19:12 | FromDiscord | <Yardanico> In reply to @Dimi "Sorry, I'm not a": don't worry, recruit wasn't talking about you :) |
20:20:08 | FromDiscord | <Dimi> sent a long message, see http://ix.io/4tSB |
20:20:30 | FromDiscord | <Dimi> I've "bolded" the line which gives the error |
20:21:42 | FromDiscord | <Yardanico> In reply to @Dimi "Well, I'm trying to": that code should work, really weird that it doesn't |
20:21:47 | FromDiscord | <Yardanico> but also, it's a bit wrong |
20:21:55 | FromDiscord | <Yardanico> `find("404", current)` means check if 404 contains current |
20:22:03 | FromDiscord | <Yardanico> if you want to check the status code, there's a much easier way with httpclient |
20:22:18 | FromDiscord | <Yardanico> `response.code == Http404` |
20:22:32 | FromDiscord | <Dimi> I know, I get `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` |
20:22:45 | FromDiscord | <Dimi> When I enter wrong citr name |
20:22:51 | FromDiscord | <Dimi> (edit) "citr" => "city" |
20:22:59 | FromDiscord | <Dimi> trying to debug |
20:23:15 | FromDiscord | <Yardanico> can you just paste the whole code into ix.io or similar? censor the api key of course |
20:34:40 | FromDiscord | <Dimi> Thanks a lot for your reply : https://codeberg.org/demetera/OWMtest |
20:35:42 | FromDiscord | <Dimi> It will be personal discord bot to have multiple services for myself. Just a pet project |
20:36:11 | FromDiscord | <Yardanico> In reply to @Dimi "Thanks a lot for": thanks, will check |
20:36:19 | FromDiscord | <Dimi> Just started with the weather and got this situation |
20:36:31 | FromDiscord | <Elegantbeef> Why are you not just using the status code? |
20:37:01 | FromDiscord | <Elegantbeef> `response.code` |
20:37:29 | FromDiscord | <Yardanico> @beef yeah i mentioned this, i'm just curious about the error and then sigsegv |
20:37:30 | FromDiscord | <Dimi> Maybe because I was started from the other end 😄 |
20:37:52 | FromDiscord | <Yardanico> ah right @Dimi |
20:38:06 | FromDiscord | <Yardanico> the error for find is because you're using the generic system find |
20:38:14 | FromDiscord | <Yardanico> which is for searching in any container per-element |
20:38:31 | FromDiscord | <Yardanico> since you don't import strutils in weather |
20:39:03 | FromDiscord | <Dimi> I've discovered Nim in December, but some things in it quite hard to find solutions for |
20:39:13 | FromDiscord | <Yardanico> you can just ask here |
20:39:18 | FromDiscord | <Yardanico> or on the forum for bigger questions |
20:40:30 | * | PMunch quit (Quit: leaving) |
20:40:49 | FromDiscord | <Dimi> I've bad experience in asking on forum. there're cool guys, but there are some struggles sometimes |
20:41:16 | FromDiscord | <Elegantbeef> Yea fuck that beef guy all he does is ramble on the forums |
20:42:15 | FromDiscord | <Dimi> I don't also understand why guys offend Dr. Salewski |
20:42:36 | FromDiscord | <Dimi> In reply to @Yardanico "the error for find": This is very interesting one |
20:42:38 | FromDiscord | <Elegantbeef> Do not look at me |
20:42:45 | FromDiscord | <Elegantbeef> I |
20:42:58 | FromDiscord | <Elegantbeef> 'm still absolutely confused what is with the hate of stefan |
20:43:47 | FromDiscord | <Yardanico> ah well @Dimi segfault is weird, but it's because you're trying to convert a json that doesn't have those fields to your type |
20:43:55 | FromDiscord | <Yardanico> since it's 404 you need to handle it different and not return WeatherData |
20:44:00 | FromDiscord | <Yardanico> for example, use an option or a tuple |
20:45:16 | FromDiscord | <Yardanico> also generally if you don't need all that data from the respone, you don't need to use `to` |
20:45:21 | FromDiscord | <Dimi> This is curious, because I've tried to catch exception in proc getCurrent |
20:45:25 | FromDiscord | <Yardanico> so you won't have to actually make all the type definitions |
20:45:35 | FromDiscord | <Yardanico> In reply to @Dimi "This is curious, because": sigsegv can't be caught except with a special module, even then it's kinda broken |
20:45:40 | FromDiscord | <Elegantbeef> segfault is not an exception |
20:45:41 | FromDiscord | <Yardanico> this is a bug with `json.to` I agree |
20:45:58 | FromDiscord | <Elegantbeef> This is not C#/Python/... you cannot just `try` block everything |
20:46:36 | FromDiscord | <Dimi> So I have to catch exceptions in proc getCurrentJson then ? |
20:46:48 | FromDiscord | <Yardanico> In reply to @Dimi "So I have to": no, you can't catch segfaults, but this is a bug and unintented |
20:46:55 | FromDiscord | <Yardanico> anyway, you should rework your code to just return Option[Type] for example |
20:47:18 | FromDiscord | <Dimi> Of course. Sure. Thanks a lot for guidance! |
20:47:37 | FromDiscord | <Elegantbeef> If it's not an `Error` type you should not attempt to catch it |
20:47:46 | FromDiscord | <Elegantbeef> But that's slightly unrelated |
20:48:02 | FromDiscord | <Dimi> yep. got it. unfortunately it's |
20:48:14 | FromDiscord | <Dimi> thanks a lot for looking into that |
20:48:51 | FromDiscord | <Yardanico> In reply to @Dimi "thanks a lot for": for example: |
20:48:59 | FromDiscord | <Yardanico> <https://gist.github.com/Yardanico/9ca65422a06da6dea33f7d0f180494a3> |
20:49:50 | FromDiscord | <Dimi> Many thanks. I will check that one. A lot of appreciations |
20:49:50 | FromDiscord | <Yardanico> you'd still need try/except here ideally, since an http request can fail |
20:50:05 | FromDiscord | <Yardanico> or do it in your main command handling which would be a more easier solution |
20:50:07 | FromDiscord | <Elegantbeef> Also need to close the client |
20:50:10 | FromDiscord | <Yardanico> yeah |
20:50:22 | FromDiscord | <Dimi> I've just met this suspicious EM and went to you guys 😉 |
20:51:14 | FromDiscord | <Yardanico> but yeah I'll see if that json.to bug has been reported already |
20:51:16 | FromDiscord | <Yardanico> it shouldn't segfault |
20:52:01 | FromDiscord | <Dimi> I will take care of this later definitely! Thanks! |
20:53:38 | FromDiscord | <Dimi> But if you have the option to report it and handle in priority, community would appreciate I guess 🙂 |
20:56:12 | FromDiscord | <Dimi> Cos Araq and Dominik are engaged in version 2 in priority |
20:56:30 | FromDiscord | <Yardanico> uhh |
20:56:34 | FromDiscord | <Elegantbeef> Well that's not true 😄 |
20:56:51 | FromDiscord | <Yardanico> yeah it's just a bug in initFromJson similar to <https://github.com/nim-lang/Nim/issues/15835> |
20:57:40 | FromDiscord | <Yardanico> it's just missing a call to verifyJsonKind really |
20:58:48 | FromDiscord | <Dimi> Thanks a lot @Yardanico for your help! |
21:03:35 | FromDiscord | <Yardanico> <https://github.com/nim-lang/Nim/pull/21695> |
21:05:20 | NimEventer | New thread by Sentmoraap2: WasMoved and =destroy does not cancel each other out, see https://forum.nim-lang.org/t/10117 |
21:22:09 | * | Notxor quit (Remote host closed the connection) |
21:27:26 | * | Guest36 joined #nim |
21:27:29 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
21:29:30 | * | progranner joined #nim |
21:31:23 | Guest36 | hello all.. how do i prevent the error like in this playground ? https://play.nim-lang.org/#ix=4tSG |
21:31:44 | Guest36 | in python this kind of syntax works. |
21:32:11 | FromDiscord | <Elegantbeef> `if x.len > 1` |
21:32:35 | Guest36 | is there a way to do it without the "if" statement ? |
21:32:37 | * | advesperacit quit () |
21:33:07 | FromDiscord | <Elegantbeef> Write your own `[]` |
21:33:26 | FromDiscord | <Elegantbeef> use `substr` |
21:34:26 | Guest36 | thanks 'substr' would work for strings, but what if i want to access seqs in the same way? |
21:34:38 | FromDiscord | <Elegantbeef> Write your own |
21:35:13 | Guest36 | got it, thanks, not sure why i thought this type of indexing would be built in |
21:35:30 | Guest36 | i bet tons of python programmers coming to nim encounter this |
21:35:36 | FromDiscord | <Elegantbeef> No clue, to me it's just wrong, if i request 2 elements i want 2 elements 😄 |
21:36:41 | Guest36 | lol you're right, now that i really think about it .. |
21:36:49 | Guest36 | python broke my brain |
21:38:19 | FromDiscord | <Elegantbeef> It's just part of python's "fail gracefully", it's not sound logically |
21:39:01 | FromDiscord | <Elegantbeef> One can always do something like `myCol[DumbIndex(0)..DumbIndex(1)]` if they really wanted it |
21:39:11 | FromDiscord | <Elegantbeef> replace `DumbIndex` with an operator you prefer |
21:40:13 | Guest36 | great thanks |
21:43:12 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
21:44:51 | * | lucasta joined #nim |
21:46:59 | * | Guest36 quit (Quit: Client closed) |
21:49:02 | FromDiscord | <Bloss> In reply to @Elegantbeef "'m still absolutely confused": Old age man wars! 😆 |
21:50:00 | FromDiscord | <Elegantbeef> Perhaps maybe i'll understand in 20 years |
22:02:48 | arkanoid | whats the most idiomatic way to loop over each element of a list to run a function it such element, and remove it from the list? |
22:02:57 | arkanoid | s/it/on |
22:03:24 | FromDiscord | <Elegantbeef> Do you mean `filterIt`? |
22:03:28 | FromDiscord | <Elegantbeef> Or `filter`? |
22:03:55 | FromDiscord | <Elegantbeef> I guess an inline version makes more sense |
22:26:45 | arkanoid | Elegantbeef, I solved with setLen(0) |
22:26:48 | arkanoid | thanks |
22:27:05 | FromDiscord | <Yardanico> huh? |
22:27:28 | FromDiscord | <Yardanico> setLen just sets length to 0 while retaining the capacity, meaning that you can't access any old elements anymore |
22:27:33 | FromDiscord | <Yardanico> didn't you want to delete elements one by one? |
22:29:41 | * | krux02 quit (Remote host closed the connection) |
22:41:58 | FromDiscord | <Nilts> In reply to @not logged in "i call karax `.getInputText`": Anyone ever answer this? |
22:42:20 | FromDiscord | <Yardanico> maybe worth opening an issue in karax repo? |
22:42:22 | FromDiscord | <Yardanico> or ask in #webdev |
23:14:51 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4tSU |
23:17:11 | FromDiscord | <Elegantbeef> Seems it's a limitation, there is no logic to handle dotexprs |
23:19:02 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4tSW |
23:38:09 | FromDiscord | <voidwalker> You can't do variable declarations or variable assignments inside the conditional statement of a while loop ? |
23:39:02 | FromDiscord | <Yardanico> In reply to @voidwalker "You can't do variable": you can, you just have to use a statement list expression |
23:39:30 | FromDiscord | <voidwalker> ;o that worked thanks |
23:39:31 | FromDiscord | <Yardanico> hm actually i don't think it'll work the way you want it to work though |
23:39:38 | FromDiscord | <voidwalker> at least the assignment |
23:39:43 | FromDiscord | <Yardanico> yeah but |
23:39:48 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4tT1 |
23:39:50 | FromDiscord | <Yardanico> ah yeah this will work fine |
23:40:35 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4tT2 |
23:50:43 | FromDiscord | <Nilts> In reply to @Yardanico "or ask in <#764946138109050893>": 👍 |