<< 03-09-2024 >>

00:01:48*TC__ quit (Ping timeout: 265 seconds)
00:18:45FromDiscord<pixelsymbols> how do i cast pointer of unchecked array to array if i know the size of the array (not at compile time) https://media.discordapp.net/attachments/371759389889003532/1280321045580222517/image.png?ex=66d7a764&is=66d655e4&hm=587a6ae1a8ccbfbd80c253ef7e50e8101439ca1198b17742b986f995ebfaa89b&
00:19:01FromDiscord<pixelsymbols> (edit) "(not at compile time)" => "(in runtime)"
00:19:16FromDiscord<pixelsymbols> https://media.discordapp.net/attachments/371759389889003532/1280321177579159743/image.png?ex=66d7a783&is=66d65603&hm=25e7f90815df6bdacdd13e9cafbe0ce1f5599d88ce247da59b6feaeafae5a407&
00:20:38FromDiscord<pixelsymbols> i tried all the ways it didnt worked
00:20:39FromDiscord<Elegantbeef> `cast[ptr T](myUnchekedArray)`
00:21:04FromDiscord<Elegantbeef> If you want a sequences you do not cast
00:21:14FromDiscord<Elegantbeef> you do `@myArr.toOpenArray(0, len)`
00:21:29FromDiscord<pixelsymbols> In reply to @Elegantbeef "If you want a": i dont know if i want a sequence or an array, it says "UncheckedArray". Should i cast into an array?
00:21:35FromDiscord<Elegantbeef> you do `@myArr.toOpenArray(0, len - 1)`
00:22:23FromDiscord<pixelsymbols> i dont understand 🙁
00:22:55FromDiscord<Elegantbeef> Arrays are static sized
00:23:02FromDiscord<Elegantbeef> So no you do not cast them unless you know the size statically
00:23:16FromDiscord<pixelsymbols> In reply to @Elegantbeef "`cast[ptr T](myUnchekedArray)`": wdym by `myUncheckedArray` and by `T`. What should i put there?
00:23:25FromDiscord<pixelsymbols> like
00:23:52FromDiscord<Elegantbeef> Why do you even need an array
00:24:17FromDiscord<pixelsymbols> In reply to @Elegantbeef "Why do you even": i want to get an access to every monitor with `GLFWMonitor`
00:24:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=dKZCWSRZ
00:24:35FromDiscord<Elegantbeef> `getMonitors` returns an array
00:24:39FromDiscord<Elegantbeef> So you can just iterate that
00:25:05FromDiscord<pixelsymbols> In reply to @Elegantbeef "`getMonitors` returns an array": no, it returns a pointer, and also its `glfwGetMonitors`
00:25:14FromDiscord<pixelsymbols> In reply to @pixelsymbols "": as said here
00:25:23FromDiscord<Elegantbeef> No it returns a `ptr UncheckedArray`
00:25:27FromDiscord<Elegantbeef> Which is indexable
00:25:27FromDiscord<pixelsymbols> In reply to @Elegantbeef "No it returns a": yes
00:25:38FromDiscord<Elegantbeef> Right so the above code works...
00:25:41FromDiscord<pixelsymbols> In reply to @Elegantbeef "Which is indexable": what. Why pointer is indexable?
00:25:49FromDiscord<Elegantbeef> Cause it's an array?
00:25:58FromDiscord<pixelsymbols> In reply to @Elegantbeef "Cause it's an array?": but its a pointer 🤔
00:26:04FromDiscord<pixelsymbols> isnt pointer just a number
00:26:05FromDiscord<Elegantbeef> No it's an array
00:26:06FromDiscord<pixelsymbols> of type int
00:26:16FromDiscord<pixelsymbols> that represent an address
00:26:34FromDiscord<Elegantbeef> It's a C array
00:26:44FromDiscord<pixelsymbols> In reply to @Elegantbeef "It's a C array": so, pointers are just C things?
00:26:46FromDiscord<Elegantbeef> Which means it's a pointer to a contiguous `count` of `T`
00:26:48FromDiscord<Elegantbeef> No
00:26:51FromDiscord<Elegantbeef> Pointers are pointers
00:27:06FromDiscord<Elegantbeef> In C it'd be `T` and you'd do the exact same thing as in Nim
00:27:10FromDiscord<pixelsymbols> hm, pointer is a number to the address, right?
00:27:20FromDiscord<Elegantbeef> Sure
00:27:47FromDiscord<pixelsymbols> sent a code paste, see https://play.nim-lang.org/#pasty=sMcWqrfm
00:27:56FromDiscord<pixelsymbols> (edit) "https://play.nim-lang.org/#pasty=bmcYWWlA" => "https://play.nim-lang.org/#pasty=DmRADCPW"
00:28:13FromDiscord<Elegantbeef> Cause Nim is a strongly typed language and `ptr UncheckedArray[T]` is known to be an array and indexable
00:28:25FromDiscord<Elegantbeef> Believe it or not in C you can index all pointers
00:28:28FromDiscord<pixelsymbols> In reply to @Elegantbeef "Cause Nim is a": so it converts from pointer to an array under the hood?
00:28:35FromDiscord<pixelsymbols> In reply to @Elegantbeef "Believe it or not": wow
00:28:46FromDiscord<pixelsymbols> thx
00:28:48FromDiscord<pixelsymbols> 💜
00:29:01FromDiscord<Elegantbeef> I have a feeling everything I said has fallen on deaf ears
00:29:26FromDiscord<frusadev> 😂
00:29:28FromDiscord<pixelsymbols> In reply to @Elegantbeef "Cause Nim is a": btw also, what does uncheckedarray means?↵Is it like unsafe, so it says unchecked cuz its not sure?
00:29:40FromDiscord<pixelsymbols> cuz its C
00:29:50FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#types-unchecked-arrays if only manuals existed
00:30:44FromDiscord<pixelsymbols> In reply to @Elegantbeef "https://nim-lang.org/docs/manual.html#types-uncheck": thx, i tried to google but [found only this](https://nim-lang.org/docs/system.html#UncheckedArray), and thought theres no description https://media.discordapp.net/attachments/371759389889003532/1280324061758754836/image.png?ex=66d7aa33&is=66d658b3&hm=e6701c2b3eaab741dd54df5249e84b12e3d17b9dccc5abf7ecb16200e091b32e&
00:33:29FromDiscord<frusadev> I think he meant this... https://media.discordapp.net/attachments/371759389889003532/1280324754733010994/Screenshot_from_2024-09-03_00-32-55.png?ex=66d7aad8&is=66d65958&hm=1408793b2fa4720351d18aa93ab0013ac3d49be109d558951a002340e55d52ea&
00:34:08FromDiscord<frusadev> https://nim-lang.org/docs/manual.html#types-unchecked-arrays
00:40:21FromDiscord<pixelsymbols> In reply to @frusadev "https://nim-lang.org/docs/manual.html#types-uncheck": ye i saw, i just linked the one i found before i asked
00:40:37FromDiscord<pixelsymbols> before writing here i also searched a lot of reddit posts and stackoverflow posts
00:42:01*tc424 joined #nim
00:42:56FromDiscord<frusadev> In reply to @pixelsymbols "before writing here i": I see... But on reddit and stackoverflow, it's much harder to get the help...
00:43:19FromDiscord<pixelsymbols> In reply to @frusadev "I see... But on": yep
00:44:10FromDiscord<frusadev> Unfortunately, nim isn't popular enough... But you can still use the docs or come here whenever you need help.
00:55:22FromDiscord<pixelsymbols> In reply to @frusadev "Unfortunately, nim isn't popular": > come here whenever you need help.↵you know the feeling when u want to ask a question but afraid ppl gonna be mad at you for asking a question, cuz question for them is simple, and i could've googled it myself and find an answer but "i didn't"?
00:55:53FromDiscord<pixelsymbols> or they gonna be mad that you don't understand what they say
01:18:58*beholders_eye quit (Ping timeout: 252 seconds)
02:10:32*krux02_ quit (Remote host closed the connection)
02:27:20FromDiscord<etra> I mean a rule of thumbs its to at least try to google it, I think it would be rude for you to expect other people to put effort where you didn't, at least that's my opinion
02:27:46FromDiscord<etra> it's perfectly find to try to search for something, don't find it and then ask away, or even ask for clarifications and further examples
02:27:51FromDiscord<etra> (edit) "find" => "fine"
02:28:13FromDiscord<k0ts> The manual contains a lot of useful information. Most people would probably find it beneficial to glance through it before asking things here.
02:28:53FromDiscord<Elegantbeef> Kots saying RTFM in the most timid way
02:29:05FromDiscord<k0ts> I'm trying to be nice here
02:29:12FromDiscord<nitely_> There's a way to pin messages in ds. Maybe a mod can pin a message with helpful links
02:30:29FromDiscord<Elegantbeef> I know you are kots, but I'm clearly just to cynical
03:05:20*rockcavera quit (Remote host closed the connection)
05:03:50FromDiscord<goerge_lsd> oh so `bufLen` has the size AFTER you do `recv` on the socket. Which is completely useless. I wanted to know before I do recv.. obviously
05:04:27FromDiscord<Elegantbeef> You cannot know before you know
05:04:40FromDiscord<Elegantbeef> Plus whilst you get amount of data you might get more data
05:04:53FromDiscord<Elegantbeef> Plus while you get that length you might get more length
05:05:56FromDiscord<goerge_lsd> So what other option do I have except recv(1) byte ?
05:15:24FromDiscord<Elegantbeef> Read chunks of data using timeout, use selectors ...
05:38:43*ntat joined #nim
06:15:01*coldfeet joined #nim
06:42:38*coldfeet quit (Remote host closed the connection)
06:46:04*ntat quit (Quit: Leaving)
07:11:20*ntat joined #nim
07:24:04*mfg joined #nim
07:27:59*mfg quit (Client Quit)
07:28:20*mfg joined #nim
07:50:54*mfg quit (Quit: leaving)
07:57:16*mfg joined #nim
07:58:51*mfg quit (Client Quit)
08:02:19*mfg joined #nim
08:02:31*mfg quit (Client Quit)
08:05:04*Deadm0th joined #nim
08:08:57*Deadm0th quit (Changing host)
08:08:57*Deadm0th joined #nim
08:10:16*om3ga quit (Read error: Connection reset by peer)
08:10:34*mfg joined #nim
08:12:22*om3ga joined #nim
08:30:29*ntat quit (Quit: Leaving)
08:59:24*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
08:59:47*SchweinDeBurg joined #nim
09:12:17*ryuukk quit (Remote host closed the connection)
09:35:44*nyeaa49284230101 joined #nim
09:46:11*beholders_eye joined #nim
10:13:24*beholders_eye quit (Read error: Connection reset by peer)
10:17:58*xet7 joined #nim
10:19:29*beholders_eye joined #nim
11:36:25*ryuukk joined #nim
11:36:50*alexdaguy joined #nim
11:38:22*beholders_eye quit (Read error: Connection reset by peer)
11:43:49*beholders_eye joined #nim
11:54:33*beholders_eye quit (Read error: Connection reset by peer)
12:00:08*beholders_eye joined #nim
12:00:56*beholders_eye quit (Read error: Connection reset by peer)
12:06:26*beholders_eye joined #nim
12:24:08*alexdaguy quit (Quit: WeeChat 4.4.1)
12:28:39*krux02 joined #nim
12:42:15*mfg quit (Quit: leaving)
12:42:18*xet7 quit (Quit: Leaving)
12:57:43FromDiscord<ch_dr_7> do any of you know how to initialize a neural network with nimtorch? I made a program in python a while back and am trying roughly transpile (and update) into nim, but the nimtorch documentation is so confusing and I can not figure out what functions I even can use. I usually use chatGPT to explain functions I've never seen, give syntax, and explain how stuff should work and it is NOT helping either
12:57:58FromDiscord<ch_dr_7> why does EVERYTHING I say get deleted??
12:58:10FromDiscord<ch_dr_7> test
13:01:16FromDiscord<ch_dr_7> Read chunks of data using timeout, use selectors ...
13:03:43*nyeaa49284230101 quit (Ping timeout: 245 seconds)
13:04:20FromDiscord<ch_dr_7> nim
13:04:44FromDiscord<ch_dr_7> I'm trying to have a conversation about nim
13:06:34FromDiscord<ch_dr_7> I love the nim coding language
13:06:42FromDiscord<ch_dr_7> nim is great
13:06:46FromDiscord<ch_dr_7> nim
13:08:58FromDiscord<ch_dr_7> <@&371760044473319454> why can't I speak /gq
13:09:12FromDiscord<ringabout> test
13:09:19FromDiscord<Phil> The heck?
13:09:31FromDiscord<ch_dr_7> it hasn't worked for me in any channel since I tried to join yesterday
13:09:49FromDiscord<ch_dr_7> thought it was overmodding because I said something bad about nim or something but then it deleted me quoting other people
13:09:53FromDiscord<Phil> @pmunch I think mjolnir is going overly agressive
13:10:21FromDiscord<pmunch> Oh?
13:10:40FromDiscord<ch_dr_7> I have no idea what's wrong with this
13:10:49FromDiscord<Phil> Check out the matrix logs, ringabout got a message deleted and @ch_dr_7 gets constantly targeted
13:10:49FromDiscord<ch_dr_7> but yesterday I joined, sent two messages, they got deleted
13:10:59FromDiscord<ch_dr_7> I sent two more and left
13:11:12FromDiscord<ch_dr_7> rejoined and they were never deleted (I deleted them manually tho)
13:11:35FromDiscord<ch_dr_7> nooooo it's ratelimited but it's coming
13:11:40FromDiscord<Phil> I'm right now mid-work so I don't have the brain capacity to take care of this for another hour or so
13:12:00FromDiscord<ch_dr_7> alright but while we're here if I'm asking for help with doing something that'd be here right
13:12:12*ntat joined #nim
13:12:13FromDiscord<ch_dr_7> like this channel
13:12:19FromDiscord<Phil> Absolutely
13:12:21FromDiscord<ringabout> What about other channels?
13:12:30FromDiscord<ringabout> Can you post on the offtopic?
13:12:34FromDiscord<Phil> Mjolnir should act on all channels so I doubt it'll help there
13:12:35FromDiscord<ch_dr_7> no
13:12:52FromDiscord<Phil> This is definitely mjolnir going hyper aggro for some reason
13:12:57FromDiscord<ch_dr_7> events of yesterday (same thing) were in appdev, main, and offtopic
13:13:03FromDiscord<Phil> https://media.discordapp.net/attachments/371759389889003532/1280515901082570752/image.png?ex=66d85cdd&is=66d70b5d&hm=844502aa90a0fa454943646719ee9eed2c87ed34c5db291b2e4f5e63fb9a1c6b&
13:13:16FromDiscord<ch_dr_7> changed display name?
13:13:31FromDiscord<Phil> Ignore that, that's simply the bridge transferring messages from discord to matrix
13:14:07FromDiscord<Phil> Which is kinda lika discord but more secure and you can wire it up to connect to discord servers
13:14:22FromDiscord<pmunch> I don't think it's Mjolnir
13:14:31FromDiscord<pmunch> It shouldn't touch Discord messages
13:15:11FromDiscord<Phil> In reply to @pmunch "It shouldn't touch Discord": But wouldn't it delete the matrix-copy and that gets transferred via the bridge?
13:15:20FromDiscord<ch_dr_7> ah, got you. Well since everything I say is doomed to get deleted this feels like a one time opportunity
13:15:21FromDiscord<Phil> Like, let's see what happens if I delete this message from the matrix side
13:15:26FromDiscord<ch_dr_7> REALITY IS AN ILLUSION
13:15:29FromDiscord<ch_dr_7> THE UNIVERSE IS A HOLOGRAM
13:15:31FromDiscord<ch_dr_7> BYE GOLD
13:15:34FromDiscord<ch_dr_7> BYEE!!
13:15:43FromDiscord<ch_dr_7> that did delete it btw
13:16:01FromDiscord<pmunch> Might be ircord messing something up
13:16:46FromDiscord<Phil> Yep, if I delete my discord message from matrix the bridge transfers it over.↵Thus discord messages getting deleted is:↵Discord message sent => Bridge transports to Matrix => Mjolnir deletes on matrix => Bridge syncs deletion to discord => discord message deleted
13:17:41FromDiscord<Phil> In reply to @pmunch "Might be ircord messing": I'll disable the screen command in an hour and see if the problem persists then
13:18:10FromDiscord<ch_dr_7> is mjolnir open or closed source
13:18:22FromDiscord<Phil> Mjolnir is open source
13:18:25FromDiscord<Phil> I think
13:18:44FromDiscord<ch_dr_7> I wouldn't mind looking for a few seconds but I doubt I'll find anything
13:19:59FromDiscord<ch_dr_7> luckily I have a message logger so I can see the whole convo still
13:20:07FromDiscord<ch_dr_7> I installed it for this specifically
13:20:25FromDiscord<ringabout> perhaps we can start a thread on the Discord to test whether it is the problem
13:21:13FromDiscord<Phil> Evil Discord Thread
13:22:19FromDiscord<Phil> Yeah pretty sure you're safe for now in discord threads as mjolnir shouldn't be able to see messages in there
13:22:33FromDiscord<ringabout> Yeah, It seems that mjolnir is to blame
13:22:49FromDiscord<ch_dr_7> cool
13:22:52FromDiscord<Phil> I mean, my messages haven't ever gotten removed so we only know once you or Chara write in there
13:22:52FromDiscord<ch_dr_7> I love Evil Discord Thread
13:24:10FromDiscord<ch_dr_7> there was another thread
13:24:20FromDiscord<ch_dr_7> it was called testing threads
13:24:23FromDiscord<ch_dr_7> we already did it
13:28:04*beholders_eye quit (Read error: Connection reset by peer)
13:30:46*fierszt joined #nim
13:33:45*beholders_eye joined #nim
13:34:51*fierszt_ joined #nim
13:35:47*fierszt quit (Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/)
13:43:43*ryuukk quit (Remote host closed the connection)
13:44:25*fierszt_ quit (Quit: Leaving)
13:44:49*fierszt joined #nim
13:44:53*ryuukk joined #nim
14:00:25FromDiscord<pmunch> Very strange..
14:00:26FromDiscord<pmunch> I don't see anything in the Mjolnir logs about it deleting messages
14:00:41FromDiscord<ch_dr_7> maybe check the discord audit log
14:11:37FromDiscord<melmass> Is anyone using webview? I'm wondering what would be the simplest way to bundle the frontend as part of the exe?
14:11:51FromDiscord<melmass> (edit) "exe?" => "binary?"
14:12:05*beholders_eye quit (Ping timeout: 248 seconds)
14:14:00FromDiscord<odexine> In reply to @pmunch "I don't see anything": Check the discord audit logs
14:14:03FromDiscord<melmass> Hmmm actually I guess it already does? Is this a build time "directive"? (currentSourcePath)↵https://github.com/webui-dev/nim-webui/blob/a97eff8a766bda7f0b7c21b9a1c061b28f7ae59c/examples/text_editor/src/text_editor.nim#L46
14:17:02*lucasta joined #nim
14:19:24*fierszt quit (Ping timeout: 276 seconds)
14:35:43*ryuukk quit (Remote host closed the connection)
14:37:59*ryuukk joined #nim
15:20:07FromDiscord<Phil> Alright, I'm disabling the irc thingy and then let's see if this still occurs
15:20:15*FromDiscord quit (Remote host closed the connection)
15:27:30*beholders_eye joined #nim
15:28:01*FromDiscord joined #nim
15:28:20FromDiscord<Phil> ircord is running again
15:28:24FromDiscord<@@prestosilver> yea, thats the big difference, zig comptime is alot more nuanced than nim bc its used for generics
15:28:28FromDiscord<@@prestosilver> and no macros
15:28:44FromDiscord<Phil> In reply to @prestosilver "yea, thats the big": I'm not entirely sure that's the reason, as nim's generics are also compile-time created
15:28:47FromDiscord<Phil> generics are just templates
15:28:51FromDiscord<Phil> (edit) "generics are just ... templates" added "fancy"
15:28:52FromDiscord<pmunch> In reply to @prestosilver "bc like when are": If that const is a strdefine for example
15:29:16FromDiscord<@@prestosilver> o thats true
15:29:22FromDiscord<@@prestosilver> yea dang forgot thats a thing
15:29:30FromDiscord<@@prestosilver> o complete tanged
15:29:33FromDiscord<@@prestosilver> (edit) "tanged" => "tangent"
15:30:00FromDiscord<@@prestosilver> zig merged decl literals yesterday, https://github.com/ziglang/zig/issues/9938
15:30:10FromDiscord<@@prestosilver> was curious about thoughts on readability'
15:30:49FromDiscord<@@prestosilver> basically if the type a method is attached to can be determined, you can flat out skip the structs name
15:31:03FromDiscord<@@prestosilver> the pr gives good examples, but its been super contreversial for qol
15:31:06FromDiscord<Phil> I'm not familiar with the concept
15:31:17FromDiscord<@@prestosilver> yea idk if ive ever seen this implemented before
15:31:51FromDiscord<ch_dr_7> @Phil @pmunch I've been spared
15:32:00FromDiscord<ch_dr_7> by the bot no longer being active
15:32:01FromDiscord<Phil> Yeh, because PMunch soft unbanned you 😛
15:32:03FromDiscord<@@prestosilver> its supposed to make methods look more like generic enums, but some people really hate it bc of struct init syntax
15:32:21FromDiscord<Phil> I'm.. struggling with imagining it tbh
15:32:22FromDiscord<@@prestosilver> i just like how you can do this now
15:32:36FromDiscord<Phil> What would the equivalent in nim look like?
15:32:47FromDiscord<Phil> Or any other major lang
15:32:59FromDiscord<Phil> (edit) "lang" => "lang, I'm somewhat familiar with most"
15:33:11FromDiscord<@@prestosilver> lemme write up a quick example, code makes it make alot more sense
15:33:52FromDiscord<@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=FwrjKbPi
15:33:53FromDiscord<Phil> Me not understanding zig really handicaps this discussion 😄
15:34:35FromDiscord<Phil> In reply to @prestosilver "Array list init went": In that case I'd find this a bit pointless, because I'm approaching this from the other side:↵`var list = std.ArrayList(u8).init(allocator)`
15:34:56FromDiscord<@@prestosilver> yea, thats a odd example, but its also available in object init
15:35:35FromDiscord<@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=NjnkZswN
15:35:38FromDiscord<@@prestosilver> (edit) "https://play.nim-lang.org/#pasty=STiBiLaQ" => "https://play.nim-lang.org/#pasty=XOfBmOyL"
15:35:41FromDiscord<Phil> I'd just argue it makes more sense to skip the type declaration than skipping defining where you call something from
15:35:41FromDiscord<@@prestosilver> is now possible
15:36:10FromDiscord<Phil> Ah, hmm
15:36:17FromDiscord<Phil> I'm not sure I'm a gigantic fan
15:36:21FromDiscord<@@prestosilver> yea, thats why people wanted it but also people really hate it
15:36:46FromDiscord<@@prestosilver> o also, its really hacky in the compiler atm bc 2 days agop
15:36:49FromDiscord<Phil> `Temp` is likely going to be in a separate file. So if I want to know what the heck just got created via `.init`I need to swap file, even though I'm creating that thing inline
15:37:06FromDiscord<@@prestosilver> yea
15:37:11FromDiscord<Phil> (edit) "swap file," => "change the file I'm reading,"
15:37:18*mfg joined #nim
15:37:28FromDiscord<@@prestosilver> rn the token type for .init is still a comptime_enum iirc
15:37:31FromDiscord<@@prestosilver> kinda funny
15:37:36FromDiscord<Phil> That seems to be not necessarily productive information elimination to me
15:37:51FromDiscord<@@prestosilver> yea thats what i was leaning towrds tbh
15:37:53FromDiscord<Phil> Like, we optimize code for reading, not for writing
15:38:10FromDiscord<Phil> So ideally you want to be able to read with the least amounts of interruptions possible
15:38:35FromDiscord<Phil> Or more likely, skim, I highly doubt anyone is fully reading through every line of code while searching for where they need to tinker with something
15:38:49FromDiscord<Phil> So optimize for easy skimming and recognizing shit at a glance
15:39:04FromDiscord<@@prestosilver> yea 100% what i was leaning twords
15:39:23FromDiscord<@@prestosilver> I think ill problaby just use the enum stuff idk if ill ever use it for function calling
15:39:37FromDiscord<@@prestosilver> might use it for like .default, thats something people really like
15:40:04FromDiscord<@@prestosilver> idk why people like it bc you can already do that but
15:40:30FromDiscord<@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=ERSqpNVa
15:40:45FromDiscord<@@prestosilver> imo its just cleaner to use defaults but some people like that more
15:40:56FromDiscord<@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=GBylQBSp
15:41:29FromDiscord<@@prestosilver> man, tbh I kinda want to write a zig clone with nim like syntax for giggles sometime
15:41:43FromDiscord<@@prestosilver> id never use it but itd be fun to mess with
15:43:27FromDiscord<@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=SSEPtZji
16:20:16*coldfeet joined #nim
16:31:36FromDiscord<pmunch> In reply to @isofruit "Yeh, because PMunch soft": Well, I disabled the bot entirely..
16:32:01FromDiscord<pmunch> I'll try turning it on again
16:46:19*mfg quit (Ping timeout: 260 seconds)
16:46:29*coldfeet quit (Remote host closed the connection)
16:47:02*lucasta quit (Remote host closed the connection)
17:07:47FromDiscord<pmunch> @ch_dr_7 can you post anything here now?
17:08:12FromDiscord<ch_dr_7> test
17:08:18FromDiscord<ch_dr_7> looks like it
17:08:52FromDiscord<pmunch> Nice
17:09:07FromDiscord<pmunch> So I guess you got soft-banned for saying a word on our naughty list
17:13:40FromDiscord<ch_dr_7> wait what was the word?
17:13:48FromDiscord<ch_dr_7> so I can know for the future
17:24:33FromDiscord<pmunch> Well since all your old messages have been deleted it's hard to tell 😛
17:25:24FromDiscord<Phil> I'm gonna write the following assuming that due to my position I'm immune to mjolnir shenanigans. I assume if any of it is too focused around pills, gummies, crypto or the like you're very likely to get insta-bombed
17:41:01FromDiscord<eyecon> In reply to @Elegantbeef "`countbits_impl.nim` does have `__builtin_popcount`": Can I import this file in my Nim program somehow?
17:46:34*mfg joined #nim
17:46:38FromDiscord<demotomohiro> Why don't you use bitops module?
17:47:40FromDiscord<eyecon> Because I didn't see the `countSetBits` function there for some reason, thanks
18:06:11FromDiscord<tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=PwYlNTZd
18:08:45*ntat quit (Quit: Leaving)
18:10:36FromDiscord<Phil> In reply to @tauruuuuuus "So, annoyed by the": nlvm?
18:11:28FromDiscord<tauruuuuuus> I kind of lost interest in trying it out after seeing that their Makefile downloads stuff from the internet, tbh
18:11:42FromDiscord<Phil> There's also inim, which is a far simpler approach:↵Mimics a repl but is in fact repeated call of `nim r X` that echo's out the result of the last line
18:15:19FromDiscord<tauruuuuuus> That sounds nicer
18:15:27FromDiscord<tauruuuuuus> I'll give it a look, thanks for the pointer
18:27:46FromDiscord<Robyn [She/Her]> Yeah but also stuff that uses time will have diff results each run
18:28:53FromDiscord<michaelb.eth> In reply to @tauruuuuuus "I kind of lost": nlvm's Makefile?
18:28:55FromDiscord<tauruuuuuus> Yeah I just want to mess around a bit, I imagine it has limitations but it's fine
18:29:35FromDiscord<tauruuuuuus> yup
18:30:26FromDiscord<michaelb.eth> looks like it just downloads Nim's csources_v2 to bootstrap the Nim compiler, but I may misunderstand
18:31:46FromDiscord<demotomohiro> `nim secret`
18:55:10FromDiscord<.bobbbob> wasnt there a secret repl in the compiler
18:55:16FromDiscord<.bobbbob> oh yeah ^
19:02:25FromDiscord<fabric.input_output> TIL
19:06:13FromDiscord<tauruuuuuus> wtf lol
19:07:34*coldfeet joined #nim
19:43:01FromDiscord<demotomohiro> Just run `nim secret` on your console if you didn't know that command.
19:44:59*coldfeet quit (Remote host closed the connection)
19:50:12*mfg quit (Ping timeout: 246 seconds)
20:14:42krux02`rlwrap nim secret` if you want to have a command history and line editing
20:41:37FromDiscord<pmunch> TIL rlwrap
20:41:53FromDiscord<pmunch> I always thought secret was a bit annoying to use
20:48:52FromDiscord<goerge_lsd> So I asked chat gpt and found out there's this on unix to get the bytes available to read from a socket `ioctl(sockfd, FIONREAD, &bytes_available)`
20:49:05FromDiscord<goerge_lsd> i searched nim git for "FIONREAD" and there's nothing
20:49:33FromDiscord<goerge_lsd> the only google result of FIONREAD is @pmunch 's https://gist.github.com/PMunch/4455921b1c35772f8a59d1e1711e43a5
20:50:09FromDiscord<Elegantbeef> It's just a constant value you can quite literally justimport it
20:51:10FromDiscord<pmunch> Wtf, I don't even remember creating that..
20:53:45FromDiscord<goerge_lsd> In reply to @Elegantbeef "It's just a constant": I'm thinking it shouldn't be too hard to implement, especially given PMunch's example there, but why on earth isn't this in the stdlib already?
20:55:23FromDiscord<Elegantbeef> Cause you do not ever really want this
20:55:40FromDiscord<Elegantbeef> It's a TOCTOU race condition
20:56:13FromDiscord<Elegantbeef> If you want to have synchronous socket API you use selectors
20:57:32FromDiscord<goerge_lsd> I want to have both, I thought multisync would suffice
20:58:05FromDiscord<Elegantbeef> I mean it does work fine, but it's blocking
20:58:32FromDiscord<Elegantbeef> Sync IO is inherently blocking and you need to use selectors or other method to wait until there is data to attempt to read
20:59:13FromDiscord<Elegantbeef> You likely want to just use unbuffered sockets
21:01:01FromDiscord<goerge_lsd> i am afraid of selectors
21:01:48FromDiscord<Elegantbeef> So just use unbuffered sockets
21:11:28FromDiscord<pmunch> Selectors are great
21:11:34FromDiscord<goerge_lsd> this is so uselessly complicated :\
21:11:44FromDiscord<goerge_lsd> I'm gonna be stuck at it for a week again, and then give up, I bet
21:12:09FromDiscord<goerge_lsd> why can't blocking recv be set to just return all the data available in the socket at that time
21:12:45FromDiscord<Elegantbeef> That's what unbuffered does
21:13:37FromDiscord<goerge_lsd> so I can keep calling it in a loop, with some timeout, hopefully be able to decode the stream in the meantime, and figure out from the decoded data when we're done, so the timeout part only engages on actual network timeout
21:15:45FromDiscord<goerge_lsd> is there any disadvantage to using unbuffered sokets? can i lose data in some circumstance?
21:18:50FromDiscord<@@prestosilver> Am I the only one who decides to refactor their whole codebase almost every other month, idk why but I think im starting to find It kinda meditative.
21:21:05FromDiscord<goerge_lsd> You find better ways to do things each month ? That's very cool, means you're learning and strive for perfection
21:21:48FromDiscord<@@prestosilver> at this point I cant tell clue if its good or bad, tbh I waste alot of time doing it rather than adding features that have been on my list for >7 months 🪦
21:22:13FromDiscord<@@prestosilver> thats a good way of thinking about it though
21:22:23FromDiscord<@@prestosilver> alot more postive than how I was initially
21:22:57FromDiscord<goerge_lsd> I'm not very skilled at this game, but still can appreciate the artistic value in well written, expressive, logical code
21:24:02FromDiscord<goerge_lsd> sometimes i dream about refactoring code actually
21:25:31FromDiscord<goerge_lsd> I see it as a "level up", enough experience gathered in the problem domain and the language, that you can rebuild it at another level. faster better stronger : P
21:26:26FromDiscord<goerge_lsd> I almost feel it as a duty, when it comes to public-facing code. To show your best.
21:28:28FromDiscord<goerge_lsd> do you refactor much @ElegantBeef or always get it perfect the first try ?
21:47:36FromDiscord<Elegantbeef> > I almost feel it as a duty, when it comes to public-facing code. To show your best.↵Web devs exist
21:49:55FromDiscord<@@prestosilver> true
21:50:54FromDiscord<@@prestosilver> https://github.com/edankwan/penis.js
21:50:57FromDiscord<solitudesf> In reply to @goerge_lsd "I almost feel it": then you corner yourself when your best is not enough. you should always pretend like you are not even trying.
21:51:09FromDiscord<@@prestosilver> clearly a satire repo, but amusing non the less
21:51:30FromDiscord<@@prestosilver> another great webdev one is "is-thirteen"
21:51:36FromDiscord<@@prestosilver> https://github.com/jezen/is-thirteen
21:51:43FromDiscord<Elegantbeef> Solitude that's when you just give up and go get a lathe and start making bowls
21:52:34FromDiscord<solitudesf> In reply to @Elegantbeef "Solitude that's when you": stop spying on me
21:52:54FromDiscord<Elegantbeef> Cannot tell if you actually have a wood lathe or just am making a joke
21:54:05FromDiscord<@@prestosilver> Is the bridge for IRC & discord, idk if I ever asked, I know discords one of them but whats the other platform
21:55:06FromDiscord<Elegantbeef> There is a discord \<-\> IRC and a Matrix \<-\> Discord
21:55:11FromDiscord<Elegantbeef> I'm on the latter
21:55:23FromDiscord<@@prestosilver> o theres multipl;e
21:55:25FromDiscord<@@prestosilver> neato
21:55:48FromDiscord<Elegantbeef> Was telegram at a point but those people didn't like the rampant messages
21:57:09FromDiscord<@@prestosilver> yea, I was just asking bc you never know, it could be like xitter or something idk 🤡
21:57:20*pmp-p joined #nim
21:57:50FromDiscord<@@prestosilver> no clue how that would work but I problaby would leave if you guys put that much effort into twitter support
21:58:21FromDiscord<@@prestosilver> "its just one really long thread"
22:05:32*rockcavera joined #nim
22:54:02*beholders_eye quit (Ping timeout: 252 seconds)
23:39:50*ehmry quit (Ping timeout: 244 seconds)