00:01:48 | * | TC__ quit (Ping timeout: 265 seconds) |
00:18:45 | FromDiscord | <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:01 | FromDiscord | <pixelsymbols> (edit) "(not at compile time)" => "(in runtime)" |
00:19:16 | FromDiscord | <pixelsymbols> https://media.discordapp.net/attachments/371759389889003532/1280321177579159743/image.png?ex=66d7a783&is=66d65603&hm=25e7f90815df6bdacdd13e9cafbe0ce1f5599d88ce247da59b6feaeafae5a407& |
00:20:38 | FromDiscord | <pixelsymbols> i tried all the ways it didnt worked |
00:20:39 | FromDiscord | <Elegantbeef> `cast[ptr T](myUnchekedArray)` |
00:21:04 | FromDiscord | <Elegantbeef> If you want a sequences you do not cast |
00:21:14 | FromDiscord | <Elegantbeef> you do `@myArr.toOpenArray(0, len)` |
00:21:29 | FromDiscord | <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:35 | FromDiscord | <Elegantbeef> you do `@myArr.toOpenArray(0, len - 1)` |
00:22:23 | FromDiscord | <pixelsymbols> i dont understand 🙁 |
00:22:55 | FromDiscord | <Elegantbeef> Arrays are static sized |
00:23:02 | FromDiscord | <Elegantbeef> So no you do not cast them unless you know the size statically |
00:23:16 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "`cast[ptr T](myUnchekedArray)`": wdym by `myUncheckedArray` and by `T`. What should i put there? |
00:23:25 | FromDiscord | <pixelsymbols> like |
00:23:52 | FromDiscord | <Elegantbeef> Why do you even need an array |
00:24:17 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "Why do you even": i want to get an access to every monitor with `GLFWMonitor` |
00:24:24 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=dKZCWSRZ |
00:24:35 | FromDiscord | <Elegantbeef> `getMonitors` returns an array |
00:24:39 | FromDiscord | <Elegantbeef> So you can just iterate that |
00:25:05 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "`getMonitors` returns an array": no, it returns a pointer, and also its `glfwGetMonitors` |
00:25:14 | FromDiscord | <pixelsymbols> In reply to @pixelsymbols "": as said here |
00:25:23 | FromDiscord | <Elegantbeef> No it returns a `ptr UncheckedArray` |
00:25:27 | FromDiscord | <Elegantbeef> Which is indexable |
00:25:27 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "No it returns a": yes |
00:25:38 | FromDiscord | <Elegantbeef> Right so the above code works... |
00:25:41 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "Which is indexable": what. Why pointer is indexable? |
00:25:49 | FromDiscord | <Elegantbeef> Cause it's an array? |
00:25:58 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "Cause it's an array?": but its a pointer 🤔 |
00:26:04 | FromDiscord | <pixelsymbols> isnt pointer just a number |
00:26:05 | FromDiscord | <Elegantbeef> No it's an array |
00:26:06 | FromDiscord | <pixelsymbols> of type int |
00:26:16 | FromDiscord | <pixelsymbols> that represent an address |
00:26:34 | FromDiscord | <Elegantbeef> It's a C array |
00:26:44 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "It's a C array": so, pointers are just C things? |
00:26:46 | FromDiscord | <Elegantbeef> Which means it's a pointer to a contiguous `count` of `T` |
00:26:48 | FromDiscord | <Elegantbeef> No |
00:26:51 | FromDiscord | <Elegantbeef> Pointers are pointers |
00:27:06 | FromDiscord | <Elegantbeef> In C it'd be `T` and you'd do the exact same thing as in Nim |
00:27:10 | FromDiscord | <pixelsymbols> hm, pointer is a number to the address, right? |
00:27:20 | FromDiscord | <Elegantbeef> Sure |
00:27:47 | FromDiscord | <pixelsymbols> sent a code paste, see https://play.nim-lang.org/#pasty=sMcWqrfm |
00:27:56 | FromDiscord | <pixelsymbols> (edit) "https://play.nim-lang.org/#pasty=bmcYWWlA" => "https://play.nim-lang.org/#pasty=DmRADCPW" |
00:28:13 | FromDiscord | <Elegantbeef> Cause Nim is a strongly typed language and `ptr UncheckedArray[T]` is known to be an array and indexable |
00:28:25 | FromDiscord | <Elegantbeef> Believe it or not in C you can index all pointers |
00:28:28 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "Cause Nim is a": so it converts from pointer to an array under the hood? |
00:28:35 | FromDiscord | <pixelsymbols> In reply to @Elegantbeef "Believe it or not": wow |
00:28:46 | FromDiscord | <pixelsymbols> thx |
00:28:48 | FromDiscord | <pixelsymbols> 💜 |
00:29:01 | FromDiscord | <Elegantbeef> I have a feeling everything I said has fallen on deaf ears |
00:29:26 | FromDiscord | <frusadev> 😂 |
00:29:28 | FromDiscord | <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:40 | FromDiscord | <pixelsymbols> cuz its C |
00:29:50 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#types-unchecked-arrays if only manuals existed |
00:30:44 | FromDiscord | <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:29 | FromDiscord | <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:08 | FromDiscord | <frusadev> https://nim-lang.org/docs/manual.html#types-unchecked-arrays |
00:40:21 | FromDiscord | <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:37 | FromDiscord | <pixelsymbols> before writing here i also searched a lot of reddit posts and stackoverflow posts |
00:42:01 | * | tc424 joined #nim |
00:42:56 | FromDiscord | <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:19 | FromDiscord | <pixelsymbols> In reply to @frusadev "I see... But on": yep |
00:44:10 | FromDiscord | <frusadev> Unfortunately, nim isn't popular enough... But you can still use the docs or come here whenever you need help. |
00:55:22 | FromDiscord | <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:53 | FromDiscord | <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:20 | FromDiscord | <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:46 | FromDiscord | <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:51 | FromDiscord | <etra> (edit) "find" => "fine" |
02:28:13 | FromDiscord | <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:53 | FromDiscord | <Elegantbeef> Kots saying RTFM in the most timid way |
02:29:05 | FromDiscord | <k0ts> I'm trying to be nice here |
02:29:12 | FromDiscord | <nitely_> There's a way to pin messages in ds. Maybe a mod can pin a message with helpful links |
02:30:29 | FromDiscord | <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:50 | FromDiscord | <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:27 | FromDiscord | <Elegantbeef> You cannot know before you know |
05:04:40 | FromDiscord | <Elegantbeef> Plus whilst you get amount of data you might get more data |
05:04:53 | FromDiscord | <Elegantbeef> Plus while you get that length you might get more length |
05:05:56 | FromDiscord | <goerge_lsd> So what other option do I have except recv(1) byte ? |
05:15:24 | FromDiscord | <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:43 | FromDiscord | <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:58 | FromDiscord | <ch_dr_7> why does EVERYTHING I say get deleted?? |
12:58:10 | FromDiscord | <ch_dr_7> test |
13:01:16 | FromDiscord | <ch_dr_7> Read chunks of data using timeout, use selectors ... |
13:03:43 | * | nyeaa49284230101 quit (Ping timeout: 245 seconds) |
13:04:20 | FromDiscord | <ch_dr_7> nim |
13:04:44 | FromDiscord | <ch_dr_7> I'm trying to have a conversation about nim |
13:06:34 | FromDiscord | <ch_dr_7> I love the nim coding language |
13:06:42 | FromDiscord | <ch_dr_7> nim is great |
13:06:46 | FromDiscord | <ch_dr_7> nim |
13:08:58 | FromDiscord | <ch_dr_7> <@&371760044473319454> why can't I speak /gq |
13:09:12 | FromDiscord | <ringabout> test |
13:09:19 | FromDiscord | <Phil> The heck? |
13:09:31 | FromDiscord | <ch_dr_7> it hasn't worked for me in any channel since I tried to join yesterday |
13:09:49 | FromDiscord | <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:53 | FromDiscord | <Phil> @pmunch I think mjolnir is going overly agressive |
13:10:21 | FromDiscord | <pmunch> Oh? |
13:10:40 | FromDiscord | <ch_dr_7> I have no idea what's wrong with this |
13:10:49 | FromDiscord | <Phil> Check out the matrix logs, ringabout got a message deleted and @ch_dr_7 gets constantly targeted |
13:10:49 | FromDiscord | <ch_dr_7> but yesterday I joined, sent two messages, they got deleted |
13:10:59 | FromDiscord | <ch_dr_7> I sent two more and left |
13:11:12 | FromDiscord | <ch_dr_7> rejoined and they were never deleted (I deleted them manually tho) |
13:11:35 | FromDiscord | <ch_dr_7> nooooo it's ratelimited but it's coming |
13:11:40 | FromDiscord | <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:00 | FromDiscord | <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:13 | FromDiscord | <ch_dr_7> like this channel |
13:12:19 | FromDiscord | <Phil> Absolutely |
13:12:21 | FromDiscord | <ringabout> What about other channels? |
13:12:30 | FromDiscord | <ringabout> Can you post on the offtopic? |
13:12:34 | FromDiscord | <Phil> Mjolnir should act on all channels so I doubt it'll help there |
13:12:35 | FromDiscord | <ch_dr_7> no |
13:12:52 | FromDiscord | <Phil> This is definitely mjolnir going hyper aggro for some reason |
13:12:57 | FromDiscord | <ch_dr_7> events of yesterday (same thing) were in appdev, main, and offtopic |
13:13:03 | FromDiscord | <Phil> https://media.discordapp.net/attachments/371759389889003532/1280515901082570752/image.png?ex=66d85cdd&is=66d70b5d&hm=844502aa90a0fa454943646719ee9eed2c87ed34c5db291b2e4f5e63fb9a1c6b& |
13:13:16 | FromDiscord | <ch_dr_7> changed display name? |
13:13:31 | FromDiscord | <Phil> Ignore that, that's simply the bridge transferring messages from discord to matrix |
13:14:07 | FromDiscord | <Phil> Which is kinda lika discord but more secure and you can wire it up to connect to discord servers |
13:14:22 | FromDiscord | <pmunch> I don't think it's Mjolnir |
13:14:31 | FromDiscord | <pmunch> It shouldn't touch Discord messages |
13:15:11 | FromDiscord | <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:20 | FromDiscord | <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:21 | FromDiscord | <Phil> Like, let's see what happens if I delete this message from the matrix side |
13:15:26 | FromDiscord | <ch_dr_7> REALITY IS AN ILLUSION |
13:15:29 | FromDiscord | <ch_dr_7> THE UNIVERSE IS A HOLOGRAM |
13:15:31 | FromDiscord | <ch_dr_7> BYE GOLD |
13:15:34 | FromDiscord | <ch_dr_7> BYEE!! |
13:15:43 | FromDiscord | <ch_dr_7> that did delete it btw |
13:16:01 | FromDiscord | <pmunch> Might be ircord messing something up |
13:16:46 | FromDiscord | <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:41 | FromDiscord | <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:10 | FromDiscord | <ch_dr_7> is mjolnir open or closed source |
13:18:22 | FromDiscord | <Phil> Mjolnir is open source |
13:18:25 | FromDiscord | <Phil> I think |
13:18:44 | FromDiscord | <ch_dr_7> I wouldn't mind looking for a few seconds but I doubt I'll find anything |
13:19:59 | FromDiscord | <ch_dr_7> luckily I have a message logger so I can see the whole convo still |
13:20:07 | FromDiscord | <ch_dr_7> I installed it for this specifically |
13:20:25 | FromDiscord | <ringabout> perhaps we can start a thread on the Discord to test whether it is the problem |
13:21:13 | FromDiscord | <Phil> Evil Discord Thread |
13:22:19 | FromDiscord | <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:33 | FromDiscord | <ringabout> Yeah, It seems that mjolnir is to blame |
13:22:49 | FromDiscord | <ch_dr_7> cool |
13:22:52 | FromDiscord | <Phil> I mean, my messages haven't ever gotten removed so we only know once you or Chara write in there |
13:22:52 | FromDiscord | <ch_dr_7> I love Evil Discord Thread |
13:24:10 | FromDiscord | <ch_dr_7> there was another thread |
13:24:20 | FromDiscord | <ch_dr_7> it was called testing threads |
13:24:23 | FromDiscord | <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:25 | FromDiscord | <pmunch> Very strange.. |
14:00:26 | FromDiscord | <pmunch> I don't see anything in the Mjolnir logs about it deleting messages |
14:00:41 | FromDiscord | <ch_dr_7> maybe check the discord audit log |
14:11:37 | FromDiscord | <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:51 | FromDiscord | <melmass> (edit) "exe?" => "binary?" |
14:12:05 | * | beholders_eye quit (Ping timeout: 248 seconds) |
14:14:00 | FromDiscord | <odexine> In reply to @pmunch "I don't see anything": Check the discord audit logs |
14:14:03 | FromDiscord | <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:07 | FromDiscord | <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:20 | FromDiscord | <Phil> ircord is running again |
15:28:24 | FromDiscord | <@@prestosilver> yea, thats the big difference, zig comptime is alot more nuanced than nim bc its used for generics |
15:28:28 | FromDiscord | <@@prestosilver> and no macros |
15:28:44 | FromDiscord | <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:47 | FromDiscord | <Phil> generics are just templates |
15:28:51 | FromDiscord | <Phil> (edit) "generics are just ... templates" added "fancy" |
15:28:52 | FromDiscord | <pmunch> In reply to @prestosilver "bc like when are": If that const is a strdefine for example |
15:29:16 | FromDiscord | <@@prestosilver> o thats true |
15:29:22 | FromDiscord | <@@prestosilver> yea dang forgot thats a thing |
15:29:30 | FromDiscord | <@@prestosilver> o complete tanged |
15:29:33 | FromDiscord | <@@prestosilver> (edit) "tanged" => "tangent" |
15:30:00 | FromDiscord | <@@prestosilver> zig merged decl literals yesterday, https://github.com/ziglang/zig/issues/9938 |
15:30:10 | FromDiscord | <@@prestosilver> was curious about thoughts on readability' |
15:30:49 | FromDiscord | <@@prestosilver> basically if the type a method is attached to can be determined, you can flat out skip the structs name |
15:31:03 | FromDiscord | <@@prestosilver> the pr gives good examples, but its been super contreversial for qol |
15:31:06 | FromDiscord | <Phil> I'm not familiar with the concept |
15:31:17 | FromDiscord | <@@prestosilver> yea idk if ive ever seen this implemented before |
15:31:51 | FromDiscord | <ch_dr_7> @Phil @pmunch I've been spared |
15:32:00 | FromDiscord | <ch_dr_7> by the bot no longer being active |
15:32:01 | FromDiscord | <Phil> Yeh, because PMunch soft unbanned you 😛 |
15:32:03 | FromDiscord | <@@prestosilver> its supposed to make methods look more like generic enums, but some people really hate it bc of struct init syntax |
15:32:21 | FromDiscord | <Phil> I'm.. struggling with imagining it tbh |
15:32:22 | FromDiscord | <@@prestosilver> i just like how you can do this now |
15:32:36 | FromDiscord | <Phil> What would the equivalent in nim look like? |
15:32:47 | FromDiscord | <Phil> Or any other major lang |
15:32:59 | FromDiscord | <Phil> (edit) "lang" => "lang, I'm somewhat familiar with most" |
15:33:11 | FromDiscord | <@@prestosilver> lemme write up a quick example, code makes it make alot more sense |
15:33:52 | FromDiscord | <@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=FwrjKbPi |
15:33:53 | FromDiscord | <Phil> Me not understanding zig really handicaps this discussion 😄 |
15:34:35 | FromDiscord | <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:56 | FromDiscord | <@@prestosilver> yea, thats a odd example, but its also available in object init |
15:35:35 | FromDiscord | <@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=NjnkZswN |
15:35:38 | FromDiscord | <@@prestosilver> (edit) "https://play.nim-lang.org/#pasty=STiBiLaQ" => "https://play.nim-lang.org/#pasty=XOfBmOyL" |
15:35:41 | FromDiscord | <Phil> I'd just argue it makes more sense to skip the type declaration than skipping defining where you call something from |
15:35:41 | FromDiscord | <@@prestosilver> is now possible |
15:36:10 | FromDiscord | <Phil> Ah, hmm |
15:36:17 | FromDiscord | <Phil> I'm not sure I'm a gigantic fan |
15:36:21 | FromDiscord | <@@prestosilver> yea, thats why people wanted it but also people really hate it |
15:36:46 | FromDiscord | <@@prestosilver> o also, its really hacky in the compiler atm bc 2 days agop |
15:36:49 | FromDiscord | <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:06 | FromDiscord | <@@prestosilver> yea |
15:37:11 | FromDiscord | <Phil> (edit) "swap file," => "change the file I'm reading," |
15:37:18 | * | mfg joined #nim |
15:37:28 | FromDiscord | <@@prestosilver> rn the token type for .init is still a comptime_enum iirc |
15:37:31 | FromDiscord | <@@prestosilver> kinda funny |
15:37:36 | FromDiscord | <Phil> That seems to be not necessarily productive information elimination to me |
15:37:51 | FromDiscord | <@@prestosilver> yea thats what i was leaning towrds tbh |
15:37:53 | FromDiscord | <Phil> Like, we optimize code for reading, not for writing |
15:38:10 | FromDiscord | <Phil> So ideally you want to be able to read with the least amounts of interruptions possible |
15:38:35 | FromDiscord | <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:49 | FromDiscord | <Phil> So optimize for easy skimming and recognizing shit at a glance |
15:39:04 | FromDiscord | <@@prestosilver> yea 100% what i was leaning twords |
15:39:23 | FromDiscord | <@@prestosilver> I think ill problaby just use the enum stuff idk if ill ever use it for function calling |
15:39:37 | FromDiscord | <@@prestosilver> might use it for like .default, thats something people really like |
15:40:04 | FromDiscord | <@@prestosilver> idk why people like it bc you can already do that but |
15:40:30 | FromDiscord | <@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=ERSqpNVa |
15:40:45 | FromDiscord | <@@prestosilver> imo its just cleaner to use defaults but some people like that more |
15:40:56 | FromDiscord | <@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=GBylQBSp |
15:41:29 | FromDiscord | <@@prestosilver> man, tbh I kinda want to write a zig clone with nim like syntax for giggles sometime |
15:41:43 | FromDiscord | <@@prestosilver> id never use it but itd be fun to mess with |
15:43:27 | FromDiscord | <@@prestosilver> sent a code paste, see https://play.nim-lang.org/#pasty=SSEPtZji |
16:20:16 | * | coldfeet joined #nim |
16:31:36 | FromDiscord | <pmunch> In reply to @isofruit "Yeh, because PMunch soft": Well, I disabled the bot entirely.. |
16:32:01 | FromDiscord | <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:47 | FromDiscord | <pmunch> @ch_dr_7 can you post anything here now? |
17:08:12 | FromDiscord | <ch_dr_7> test |
17:08:18 | FromDiscord | <ch_dr_7> looks like it |
17:08:52 | FromDiscord | <pmunch> Nice |
17:09:07 | FromDiscord | <pmunch> So I guess you got soft-banned for saying a word on our naughty list |
17:13:40 | FromDiscord | <ch_dr_7> wait what was the word? |
17:13:48 | FromDiscord | <ch_dr_7> so I can know for the future |
17:24:33 | FromDiscord | <pmunch> Well since all your old messages have been deleted it's hard to tell 😛 |
17:25:24 | FromDiscord | <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:01 | FromDiscord | <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:38 | FromDiscord | <demotomohiro> Why don't you use bitops module? |
17:47:40 | FromDiscord | <eyecon> Because I didn't see the `countSetBits` function there for some reason, thanks |
18:06:11 | FromDiscord | <tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=PwYlNTZd |
18:08:45 | * | ntat quit (Quit: Leaving) |
18:10:36 | FromDiscord | <Phil> In reply to @tauruuuuuus "So, annoyed by the": nlvm? |
18:11:28 | FromDiscord | <tauruuuuuus> I kind of lost interest in trying it out after seeing that their Makefile downloads stuff from the internet, tbh |
18:11:42 | FromDiscord | <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:19 | FromDiscord | <tauruuuuuus> That sounds nicer |
18:15:27 | FromDiscord | <tauruuuuuus> I'll give it a look, thanks for the pointer |
18:27:46 | FromDiscord | <Robyn [She/Her]> Yeah but also stuff that uses time will have diff results each run |
18:28:53 | FromDiscord | <michaelb.eth> In reply to @tauruuuuuus "I kind of lost": nlvm's Makefile? |
18:28:55 | FromDiscord | <tauruuuuuus> Yeah I just want to mess around a bit, I imagine it has limitations but it's fine |
18:29:35 | FromDiscord | <tauruuuuuus> yup |
18:30:26 | FromDiscord | <michaelb.eth> looks like it just downloads Nim's csources_v2 to bootstrap the Nim compiler, but I may misunderstand |
18:31:46 | FromDiscord | <demotomohiro> `nim secret` |
18:55:10 | FromDiscord | <.bobbbob> wasnt there a secret repl in the compiler |
18:55:16 | FromDiscord | <.bobbbob> oh yeah ^ |
19:02:25 | FromDiscord | <fabric.input_output> TIL |
19:06:13 | FromDiscord | <tauruuuuuus> wtf lol |
19:07:34 | * | coldfeet joined #nim |
19:43:01 | FromDiscord | <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:42 | krux02 | `rlwrap nim secret` if you want to have a command history and line editing |
20:41:37 | FromDiscord | <pmunch> TIL rlwrap |
20:41:53 | FromDiscord | <pmunch> I always thought secret was a bit annoying to use |
20:48:52 | FromDiscord | <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:05 | FromDiscord | <goerge_lsd> i searched nim git for "FIONREAD" and there's nothing |
20:49:33 | FromDiscord | <goerge_lsd> the only google result of FIONREAD is @pmunch 's https://gist.github.com/PMunch/4455921b1c35772f8a59d1e1711e43a5 |
20:50:09 | FromDiscord | <Elegantbeef> It's just a constant value you can quite literally justimport it |
20:51:10 | FromDiscord | <pmunch> Wtf, I don't even remember creating that.. |
20:53:45 | FromDiscord | <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:23 | FromDiscord | <Elegantbeef> Cause you do not ever really want this |
20:55:40 | FromDiscord | <Elegantbeef> It's a TOCTOU race condition |
20:56:13 | FromDiscord | <Elegantbeef> If you want to have synchronous socket API you use selectors |
20:57:32 | FromDiscord | <goerge_lsd> I want to have both, I thought multisync would suffice |
20:58:05 | FromDiscord | <Elegantbeef> I mean it does work fine, but it's blocking |
20:58:32 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> You likely want to just use unbuffered sockets |
21:01:01 | FromDiscord | <goerge_lsd> i am afraid of selectors |
21:01:48 | FromDiscord | <Elegantbeef> So just use unbuffered sockets |
21:11:28 | FromDiscord | <pmunch> Selectors are great |
21:11:34 | FromDiscord | <goerge_lsd> this is so uselessly complicated :\ |
21:11:44 | FromDiscord | <goerge_lsd> I'm gonna be stuck at it for a week again, and then give up, I bet |
21:12:09 | FromDiscord | <goerge_lsd> why can't blocking recv be set to just return all the data available in the socket at that time |
21:12:45 | FromDiscord | <Elegantbeef> That's what unbuffered does |
21:13:37 | FromDiscord | <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:45 | FromDiscord | <goerge_lsd> is there any disadvantage to using unbuffered sokets? can i lose data in some circumstance? |
21:18:50 | FromDiscord | <@@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:05 | FromDiscord | <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:48 | FromDiscord | <@@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:13 | FromDiscord | <@@prestosilver> thats a good way of thinking about it though |
21:22:23 | FromDiscord | <@@prestosilver> alot more postive than how I was initially |
21:22:57 | FromDiscord | <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:02 | FromDiscord | <goerge_lsd> sometimes i dream about refactoring code actually |
21:25:31 | FromDiscord | <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:26 | FromDiscord | <goerge_lsd> I almost feel it as a duty, when it comes to public-facing code. To show your best. |
21:28:28 | FromDiscord | <goerge_lsd> do you refactor much @ElegantBeef or always get it perfect the first try ? |
21:47:36 | FromDiscord | <Elegantbeef> > I almost feel it as a duty, when it comes to public-facing code. To show your best.↵Web devs exist |
21:49:55 | FromDiscord | <@@prestosilver> true |
21:50:54 | FromDiscord | <@@prestosilver> https://github.com/edankwan/penis.js |
21:50:57 | FromDiscord | <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:09 | FromDiscord | <@@prestosilver> clearly a satire repo, but amusing non the less |
21:51:30 | FromDiscord | <@@prestosilver> another great webdev one is "is-thirteen" |
21:51:36 | FromDiscord | <@@prestosilver> https://github.com/jezen/is-thirteen |
21:51:43 | FromDiscord | <Elegantbeef> Solitude that's when you just give up and go get a lathe and start making bowls |
21:52:34 | FromDiscord | <solitudesf> In reply to @Elegantbeef "Solitude that's when you": stop spying on me |
21:52:54 | FromDiscord | <Elegantbeef> Cannot tell if you actually have a wood lathe or just am making a joke |
21:54:05 | FromDiscord | <@@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:06 | FromDiscord | <Elegantbeef> There is a discord \<-\> IRC and a Matrix \<-\> Discord |
21:55:11 | FromDiscord | <Elegantbeef> I'm on the latter |
21:55:23 | FromDiscord | <@@prestosilver> o theres multipl;e |
21:55:25 | FromDiscord | <@@prestosilver> neato |
21:55:48 | FromDiscord | <Elegantbeef> Was telegram at a point but those people didn't like the rampant messages |
21:57:09 | FromDiscord | <@@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:50 | FromDiscord | <@@prestosilver> no clue how that would work but I problaby would leave if you guys put that much effort into twitter support |
21:58:21 | FromDiscord | <@@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) |