<< 20-04-2023 >>

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