<< 09-12-2024 >>

00:29:07FromDiscord<wug.s> In reply to @bostonboston "`getOrDefault()`": i think defaultdict is slihtly more complicated actually
00:30:10FromDiscord<wug.s> because it doesn't do just get operations, but allows you to directly do operations on the value
00:30:12FromDiscord<wug.s> for example
00:30:37FromDiscord<wug.s> sent a code paste, see https://play.nim-lang.org/#pasty=bdFCNieF
00:30:46FromDiscord<wug.s> (edit) "https://play.nim-lang.org/#pasty=NqaeFxzX" => "https://play.nim-lang.org/#pasty=myeLyeKz"
00:31:24FromDiscord<wug.s> (edit) "https://play.nim-lang.org/#pasty=OAunFlkc" => "https://play.nim-lang.org/#pasty=RgUkrzoJ"
00:31:30FromDiscord<Elegantbeef> So make `[]` add the value to the dictonary
00:31:48FromDiscord<Elegantbeef> This is an awful way of writing dictionaries as it has no indication you're accessing an invalidi key
00:32:06FromDiscord<wug.s> In reply to @Elegantbeef "This is an awful": weeeeeeeellllllllll idk its just one of the most useful things in python
00:32:22FromDiscord<wug.s> (edit) "In reply to @Elegantbeef "This is an awful": weeeeeeeellllllllll idk its just one of the most useful things in python ... " added "for alot of things"
00:32:57FromDiscord<wug.s> as far as hashtables are concerned, as long as the type signature matches its really not like you could have an invalid key since it would just create one if it is invalid
00:33:14FromDiscord<wug.s> and it can always hash if the type signature matches because if not why is your type hashable?
00:33:42FromDiscord<Elegantbeef> I mean invalid in the case of accidentally using a wrong value that you didn't want to use
00:34:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=tSeWzNwv
00:46:43FromDiscord<wug.s> In reply to @Elegantbeef "I mean invalid in": thats what regular dict is for i think
00:46:48FromDiscord<wug.s> and why python seperates the two
00:46:56FromDiscord<wug.s> although defaultdict is still in the standard library
00:47:12FromDiscord<wug.s> sent a code paste, see https://play.nim-lang.org/#pasty=pDtByYhZ
00:47:14FromDiscord<wug.s> for example
00:47:20FromDiscord<wug.s> (edit) "https://play.nim-lang.org/#pasty=jIBHTlkr" => "https://play.nim-lang.org/#pasty=DXBQKZSl"
00:47:37FromDiscord<wug.s> counting all the values in an array
00:47:43FromDiscord<Elegantbeef> That's just a `CountTable` in Nim
00:47:50FromDiscord<wug.s> yeah thats not the most cumbersome thing ever
00:47:54FromDiscord<Elegantbeef> No need for odd behaviour when it's a count table
00:47:57FromDiscord<wug.s> but another example
00:48:19FromDiscord<wug.s> sent a code paste, see https://play.nim-lang.org/#pasty=qsjqGtJe
00:48:25FromDiscord<wug.s> this is a sparse directed weighted graph
00:48:28FromDiscord<wug.s> for example
00:48:41FromDiscord<wug.s> which is a very nice thing to have
00:48:50FromDiscord<wug.s> and the "in" operation still works fine
00:48:56FromDiscord<wug.s> but once you start working with an edge
00:48:58FromDiscord<wug.s> (edit) "but once you start working with an edge ... " added "it appears"
00:49:10FromDiscord<wug.s> it removes alot of boilerplate code at least
00:49:53FromDiscord<wug.s> (edit) "it removes alot of boilerplate code ... at" added "related to graphs"
01:41:51*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
01:45:26*attah_ joined #nim
01:45:59*attah quit (Ping timeout: 260 seconds)
01:46:00*attah_ is now known as attah
02:07:16*tiorock joined #nim
02:07:16*rockcavera is now known as Guest892
02:07:16*Guest892 quit (Killed (copper.libera.chat (Nickname regained by services)))
02:07:16*tiorock is now known as rockcavera
02:09:22*tiorock joined #nim
02:09:22*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
02:09:22*tiorock is now known as rockcavera
02:36:24*attah quit (Ping timeout: 246 seconds)
02:37:26*attah joined #nim
03:17:02*tiorock joined #nim
03:17:02*rockcavera is now known as Guest8030
03:17:02*Guest8030 quit (Killed (erbium.libera.chat (Nickname regained by services)))
03:17:02*tiorock is now known as rockcavera
03:19:07*tiorock joined #nim
03:19:07*tiorock quit (Changing host)
03:19:07*tiorock joined #nim
03:19:07*rockcavera is now known as Guest3113
03:19:07*tiorock is now known as rockcavera
03:21:50*Guest3113 quit (Ping timeout: 260 seconds)
03:33:27*rockcavera quit (Remote host closed the connection)
03:38:59FromDiscord<4zv4l> is https://github.com/yglukhov/nimpy not active anymore ?↵I see the last commit is from 6months, its already an amazing lib, I was just wondering about the type `object` support
03:45:29FromDiscord<Elegantbeef> I swear to jeebuz, people will act like anything without a commit marked tomorrow is inactive
03:50:13FromDiscord<4zv4l> not quite sur to get what you mean, 6 months without any change in a project is pretty long
03:50:18FromDiscord<4zv4l> (edit) "sur" => "sure"
03:50:43FromDiscord<Elegantbeef> It's more important to look at the activity of the maintainer in regards to issues and pull requests
03:51:47FromDiscord<4zv4l> well 6 months means no pull request have been merged during that time and no issue got fixed by changing the code
03:52:15FromDiscord<Elegantbeef> Right, but are there important issues, and has the author made any comments on any issue/pull requests
03:52:50FromDiscord<Elegantbeef> It's free software if the author is somewhat active it's clearly active
03:53:40FromDiscord<4zv4l> In reply to @Elegantbeef "Right, but are there": not for a long time it seems
03:55:42FromDiscord<4zv4l> one pull request, but the issues not really
03:55:55FromDiscord<4zv4l> what I meant is that it clearly slowed down a lot
04:03:01*SchweinDeBurg joined #nim
04:03:29*attah quit (Ping timeout: 244 seconds)
04:05:17*attah joined #nim
10:06:36*xet7 quit (Remote host closed the connection)
10:22:22*modev joined #nim
10:35:36*modev quit (Quit: WeeChat 4.4.2)
11:28:43*modev joined #nim
11:41:48*beholders_eye joined #nim
13:15:48*nils` quit (Ping timeout: 244 seconds)
13:46:49FromDiscord<angelsdust> Been a hot minute since I played with Nim, why does this fail? `type mismatch: got 'None' for 'none' but expected 'Option[nimber.RouteHandler]'` I thought options can have none
13:47:14FromDiscord<angelsdust> Hmm, removing none seems to have fixed it lol
13:48:58Amun-RaNone looks like some(None)
13:50:08FromDiscord<k0ts> no code provided so we can only guess what you tried
13:50:14FromDiscord<k0ts> sent a code paste, see https://play.nim-lang.org/#pasty=YaGhEqhB
13:50:26FromDiscord<k0ts> needs to be none(int)
13:50:35FromDiscord<angelsdust> Ooh
13:50:48FromDiscord<angelsdust> I had `func(a: 12, b: 3, c: none)`
13:52:24Amun-Ra;)
14:11:05*nils` joined #nim
15:07:32*ntat joined #nim
15:34:16*nils` quit (Ping timeout: 244 seconds)
15:39:12*zgasma joined #nim
16:08:43*krux02 joined #nim
16:42:13*nils` joined #nim
17:03:33*nils` quit (Ping timeout: 265 seconds)
17:36:27*nils` joined #nim
17:51:55*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
18:08:07*modev quit (Quit: WeeChat 4.4.2)
18:14:40*ntat quit (Quit: Leaving)
18:21:49*ntat joined #nim
18:26:51FromDiscord<narimiran> sent a long message, see https://pasty.ee/JMARTQTN
18:48:39Amun-RaYour response has been recorded.
19:04:26*coldfeet joined #nim
19:40:47*coldfeet quit (Quit: Lost terminal)
20:35:40FromDiscord<kuxv> is there any method in std similar to findIf() ? i.e. finding an index of an element which matches the predicated passed in?
20:48:26FromDiscord<bostonboston> I don't believe so, but it's not too hard to get your own https://play.nim-lang.org/#pasty=MvAqCKSk
21:20:38FromDiscord<pmunch> In reply to @Amun-Ra "Your response has been": "Nim will remember that"
21:21:26FromDiscord<pmunch> In reply to @.tokyovigilante "<@392962235737047041> did you know": Finally appears to be back up!
21:33:26*rockcavera joined #nim
21:52:14*ntat quit (Quit: Leaving)
22:23:28*tiorock joined #nim
22:23:28*rockcavera is now known as Guest8321
22:23:28*Guest8321 quit (Killed (tantalum.libera.chat (Nickname regained by services)))
22:23:28*tiorock is now known as rockcavera
22:25:34*tiorock joined #nim
22:25:34*rockcavera is now known as Guest1002
22:25:34*Guest1002 quit (Killed (lead.libera.chat (Nickname regained by services)))
22:25:34*tiorock is now known as rockcavera
23:04:09FromDiscord<aintea> I finally can give my opinion on Nim in the survey
23:04:51FromDiscord<aintea> All that waiting only to ask for incremental compilation
23:05:39FromDiscord<aintea> Btw what do you all think about the size of the stdlib ? I'm way too biased by my low experience in programming so I would like to hear some opinions on it
23:37:35FromDiscord<Elegantbeef> All that waiting only to have to wait 10 more years 😄