<< 15-02-2021 >>

00:18:02*Tanger quit (Remote host closed the connection)
00:19:58*asdflkj_ joined #nim
00:48:38*audiophile joined #nim
00:48:47audiophilehow do i create an array without specifying length in initialization
00:50:36audiophileoh nvm
00:53:17*Tanger joined #nim
01:13:03*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:13:25*njoseph joined #nim
01:15:05*abm quit (Quit: Leaving)
01:42:22audiophilehttps://bpa.st/BEBA what's wrong witht his
01:42:35audiophileError: unhandled exception: An attempt was made to access a socket in a way forbidden by its access permissions.
01:42:35audiophile [OSError]
01:58:50FromDiscord<Anonymous Poet> sent a code paste, see https://paste.rs/qpS
02:13:05FromDiscord<ElegantBeef> You cannot limit it that way, but you can limit it in a constructor
02:14:08FromDiscord<ElegantBeef> `proc initLambdaAbs: LambdaExp = LambdaExp(kind: Var, arg: initLambdaVar())`↵basically
02:14:36FromDiscord<Anonymous Poet> is there any way to force a constructor?
02:14:54FromDiscord<ElegantBeef> Dont expose the `LambdaExp` and use it in another module 😄
02:14:55FromDiscord<Anonymous Poet> like in c++ you can say `Obj::Obj() = delete`
02:15:06FromDiscord<ElegantBeef> There arent default constructors in Nim
02:15:43FromDiscord<ElegantBeef> https://github.com/beef331/googleapi/blob/master/src/googleapi/storage.nim#L16-L40
02:15:44FromDiscord<Anonymous Poet> Hmmmm ... for what I'm doing now exporting doesn't really matter, but this seems kind of frustrating :/
02:16:02FromDiscord<Anonymous Poet> (ie. not being able to add constructor checks)
02:16:04FromDiscord<ElegantBeef> That shows you how you can limit that behaviour
02:16:22FromDiscord<ElegantBeef> Well constructors only exist if the type is exported, so that's the way to do it
02:16:40FromDiscord<ElegantBeef> (edit) "exported," => "accessible,"
02:17:16FromDiscord<ElegantBeef> https://github.com/andreaferretti/patty might support what you want
02:17:20FromDiscord<Anonymous Poet> right, but i mean that i want the type to be accessible, but i also want to prevent certain invalid constructions for it
02:18:00FromDiscord<ElegantBeef> Do you need the type accessible or just the fields?
02:19:08FromDiscord<ElegantBeef> Like is it important to due `LambdaExp()` from another module 😄
02:19:08FromDiscord<ElegantBeef> (edit) "due" => "do"
02:19:08FromDiscord<Anonymous Poet> i may want to do case matching on it in another module
02:19:08FromDiscord<ElegantBeef> Yea but the type isnt required for that just the field
02:19:17FromDiscord<ElegantBeef> Actually nvm 😄
02:19:23FromDiscord<Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2PsJ
02:22:27*krux02 quit (Remote host closed the connection)
02:25:15FromDiscord<y_yu> I am trying to install nim on WSL2 ubuntu.↵When I install it with apt, it seems to install 1.0.6. But I want to use the latest version of nim. What is the best option to install the latest version of nim and still have proper version control of nim on ubuntu?
02:25:38FromDiscord<Anonymous Poet> choosenim
02:25:47FromDiscord<Anonymous Poet> https://github.com/dom96/choosenim
02:26:22FromDiscord<y_yu> In reply to @Anonymous Poet "choosenim": thank you.
02:45:19*audiophile quit (Quit: Default Quit Message)
02:56:36*asdflkj_ quit (Ping timeout: 272 seconds)
03:03:21*bozaloshtsh joined #nim
03:03:21*bozaloshtsh quit (Changing host)
03:03:21*bozaloshtsh joined #nim
03:52:12FromDiscord<ElegantBeef> @Anonymous Poet you've now got me wanting to take a shot at object variant construction using a macro 😄
03:52:23FromDiscord<Anonymous Poet> haha, please do
03:53:46*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
03:53:52*njoseph joined #nim
03:55:10FromDiscord<Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2Pt0
03:55:27FromDiscord<Anonymous Poet> (edit) "https://play.nim-lang.org/#ix=2Pt0" => "https://play.nim-lang.org/#ix=2ONj"
03:55:43FromDiscord<ElegantBeef> well it'd still use `initKind` but it'd automate all the constructors
03:55:54FromDiscord<Anonymous Poet> (edit) "https://play.nim-lang.org/#ix=2Pt2" => "https://play.nim-lang.org/#ix=2Pt1"
03:55:59FromDiscord<Anonymous Poet> that's fine, i like the case statement
03:56:11FromDiscord<Anonymous Poet> i just want to ensure that users dont footgun themselves
03:56:27FromDiscord<Anonymous Poet> in other words, i dont like that its possible to construct invalid objects
04:00:54FromDiscord<ElegantBeef> Well the idea results with your code looking like https://play.nim-lang.org/#ix=2Pt4, and it'll provide safety in the generated procedures `initApp` and `initAbs` will check if the passed in value is of kind `Var`
04:01:22FromDiscord<Anonymous Poet> link looks broken?
04:01:37FromDiscord<ElegantBeef> Works here?
04:01:57FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2Pt8
04:03:00FromDiscord<ElegantBeef> And that'd generate everything, constructors, enums, type
04:03:38FromDiscord<ElegantBeef> and for the `App` and `Abs` it'd error if you pass in a non-var for `arg` or `rand`
04:05:07FromDiscord<Anonymous Poet> you just wrote variant, right?
04:06:00FromDiscord<ElegantBeef> Hmm?
04:07:18FromDiscord<Anonymous Poet> in the snippet above
04:07:23FromDiscord<Anonymous Poet> is `variant` a builtin?
04:07:25FromDiscord<ElegantBeef> No
04:07:30FromDiscord<ElegantBeef> It's my desired syntax
04:08:01FromDiscord<Anonymous Poet> ahh, i thought you already wrote it up 😂
04:08:08FromDiscord<ElegantBeef> Nah i was just showing what it'd be like
04:09:12FromDiscord<Anonymous Poet> yeah, something like that was what i had in mind, though really the most important thing (imo) is the ability to force a constructor
04:09:18FromDiscord<Anonymous Poet> and that would be more generally useful too
04:09:53FromDiscord<Anonymous Poet> since this lambda parser is just for me, i was asking mostly for best practices
04:10:13FromDiscord<ElegantBeef> Well the enforcing a constructor sorta requires using selective imports/exports
04:10:47FromDiscord<Anonymous Poet> this leads to an interesting discussion; how are nim classes represented in c? just structs or ?
04:10:50FromDiscord<ElegantBeef> if the type isnt exported you cannot call the export, though you also cannot use things like your proc where you use case, since that type isnt accesible
04:10:59FromDiscord<ElegantBeef> Nim doesnt have classes, but our objects are just C structs 😛
04:11:42FromDiscord<Anonymous Poet> i'd honestly settle for a way to just ensure that a function i specify runs immediately after the struct is populated and before any other code (that uses that object) runs
04:12:24FromDiscord<Anonymous Poet> though youd lose overloading that way
04:12:27FromDiscord<ElegantBeef> I mean i'm making this regardless if you want it or not 😄
04:12:42FromDiscord<Anonymous Poet> ah, haha, then follow your dreams 😛 😄
04:12:45FromDiscord<ElegantBeef> Overriding isnt a thing without inheritance
04:13:06FromDiscord<Anonymous Poet> sorry, overloading
04:41:59*spiderstew_ joined #nim
04:44:47*spiderstew quit (Ping timeout: 272 seconds)
05:12:19*waleee-cl quit (Quit: Connection closed for inactivity)
05:23:50*vicfred quit (Quit: Leaving)
05:53:31*wasted_youth2 quit (Quit: Leaving)
05:59:26FromDiscord<Anonymous Poet> sent a code paste, see https://paste.rs/hUl
06:31:37FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2Ptt
06:32:48FromDiscord<Anonymous Poet> one observation is that result is a reserved variable name, im not sure if you're allowed to do `new result` like that
06:33:13FromDiscord<Anonymous Poet> i may be wrong though
06:33:26FromDiscord<ElegantBeef> The issue is that you're doing `result.startline()` which returns a value and you arent handling it
06:34:28FromDiscord<mattrb> Oh, that's interesting. I definitely did not understand that from that error message haha. Thanks!
06:34:49FromDiscord<ElegantBeef> Well it's what the error message says 😄
06:35:04FromDiscord<ElegantBeef> Got a `proc()` when you wanted `PPU`
06:35:28FromDiscord<mattrb> Gotcha, I wasn't understanding that it was complaining about the return value of newPPU
06:35:59FromDiscord<mattrb> Since `result` is of type `PPU`, I didn't realize that'd be a problem
06:36:27FromDiscord<ElegantBeef> In nim you have to handle any non `{.discardable.}` procs
06:36:56FromDiscord<mattrb> I'll keep an eye out for that in the future. Thank you
06:42:15FromDiscord<mattrb> Is there a better way to achieve this result in Nim? I'd like to make `PPU` a `var PPU` a closure in those last 3 procs, but then the compiler complains about capturing `var PPU` in a closure
06:42:23FromDiscord<mattrb> Not sure what the Nim approach would be here
07:46:40*PMunch joined #nim
07:54:37FromDiscord<treeform> In reply to @ElegantBeef "It's how all the": Actually jsony can also generate JsonNodes ... and you can manually walk them. Its just faster not too.
07:56:18FromDiscord<treeform> I think what makes my jsony to JsonNodes faster then stdlib json module is that I don't use StringStream, don't use substrings, and parse my numbers 2 digits at a time without intermediate allocations.
07:56:20FromDiscord<ElegantBeef> I mean that's not contrary to what i said, but i didnt know that so cool!
07:57:13FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2PtG
07:58:43FromDiscord<treeform> In reply to @mattrb "If I have an": I think using my `flatty/binny` lib that would be `ppu.vram.readUint16(row 240 + col)`
08:02:19FromDiscord<mattrb> Looking at your implementation, it seems like it does _effectively_ the same thing
08:03:19FromDiscord<mattrb> As a clarification as well, the offset I'm trying to access is measured in uint16s rather than uint8s, so I'd need to `2` the arg to your `readUint16` in order for it to work out
08:03:44FromDiscord<treeform> yeah that's right
08:04:10FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2PtJ
08:04:30FromDiscord<mattrb> I can just hide all of this away in some file that I'll never have to look at again, I'm just hoping there's some prettier syntax to do the same thing
08:04:48FromDiscord<treeform> yeah that's what I did, hid it in some file.
08:05:30FromDiscord<treeform> if you want JS support its actually different: https://github.com/treeform/flatty/blob/master/src/flatty/jsbinny.nim#L54
08:05:34FromDiscord<treeform> probably don't need js support.
08:06:00FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2PtK
08:06:19FromDiscord<mattrb> Ah right, the casting won't work in js
08:06:34FromDiscord<treeform> yeah you got to like rebuild the numbers its crazy
08:06:54FromDiscord<mattrb> At the end of the day, I'm hoping to target emscripten as well, so I'm hoping that won't be a problem since it'll go through c rather than js
08:07:10FromDiscord<treeform> yeah emscripten is basically a C target
08:08:12FromDiscord<mattrb> Okay I'll just bury this casting somewhere for now so that I don't have to look at it :p Thanks for the input
08:08:44FromDiscord<treeform> i am glad I could help
08:18:21saemOh damn, CI passed.
08:29:19Oddmongerwhat means « template / generic instantation from here » in the alaviss/nim plugin ? I don't have this warning when compiling
08:29:38Oddmongeri appears on a line which echoes an object:
08:29:46Oddmongerfor o in objs:
08:29:50Oddmonger echo o
08:37:18Oddmongerhello leorize[m] , i have found my problem with unmarshalling. I try to assign « null » to a ref member when restoring (because it hasn't been assigned yet), and it crash
08:37:41Oddmongerreading this: https://github.com/nim-lang/Nim/issues/15620 , i think i have to find a workaround…
08:40:23Oddmongerah … it has been fixed since, but i'm using 1.4.1 (one month before the fix)
08:42:27FromDiscord<Yardanico> Also by the way, marshal is kind of deprecated nowadays, json.to and a lot of third party serialisation libraries exist in nimble
08:43:16FromDiscord<mattrb> Any idea why perf doesn't record nim very nicely? Are there preferred profiling tools for nim? https://media.discordapp.net/attachments/371759389889003532/810793337904693248/unknown.png
08:43:38Oddmongernoted Yardanico , thanks
08:44:46FromDiscord<Yardanico> @mattrb it should work just fine, you might also want to compile with --debugger:native though
08:45:11FromDiscord<Yardanico> So that Nim source code lines show up when debugging/profiling
08:49:14FromDiscord<mattrb> Hmm that doesn't seem to make the source code information show up. Maybe I'm just missing something in Hotspot, but I've had it just come up inline before with other languages and it doesn't seem to be doing that here
08:55:57*Tanger quit (Remote host closed the connection)
09:01:52*krux02 joined #nim
09:01:53*krux02_ joined #nim
09:06:49ForumUpdaterBotNew thread by Izikeros: How to diagnose nimsuggest not working with vscode?, see https://forum.nim-lang.org/t/7507
09:09:35*krux02_ quit (Quit: Leaving)
09:18:25*Q-Master quit (Read error: Connection reset by peer)
09:18:33*Q-Master joined #nim
09:20:21*kaletaa quit (Quit: ZNC 1.8.1 - https://znc.in)
09:20:28*deepend quit (Remote host closed the connection)
09:20:58*ForumUpdaterBot quit (Remote host closed the connection)
09:21:04FromDiscord<mratsim> In reply to @mattrb "Any idea why perf": it does though, but SDL has no debug symbols
09:21:09*ForumUpdaterBot joined #nim
09:21:10*kaletaa joined #nim
09:22:02FromDiscord<mratsim> I use Apple Instruments on Mac and VTune on Windows / Linux or perf annotate on Linux
09:22:44FromDiscord<mattrb> I’ll take a look at vtune as well. Ty 👍
09:22:53*deepend joined #nim
09:24:29FromDiscord<mratsim> vtune is perf underneath
09:24:37FromDiscord<mratsim> unless you use Internel Kernel modules
09:25:05FromDiscord<mratsim> example https://media.discordapp.net/attachments/371759389889003532/810803861408579604/unknown.png
09:30:51FromDiscord<mattrb> I’m in bed right now, but I’ll totally check that out tomorrow. Seeing the source side-by-side with the asm seems super useful too
09:33:48*Tanger joined #nim
09:34:00saemI think linedir or some define like that is required for line info? I've been meaning to profile the compiler/nimsuggest a bunch but haven't gotten around to it.
09:39:03Oddmongerok so marshall module is deprecated, but what about serializing nim objects, then ?
09:41:19FromDiscord<ElegantBeef> I like treeforms flatty
09:42:09FromDiscord<mratsim> In reply to @saem "I think linedir or": yes linedir which is implied by --debugger:native is needed
09:50:39saemI can never keep those straight, I just spam ask the ones I can recall
10:07:57*Vladar joined #nim
10:13:36FromDiscord<Yardanico> @Oddmonger as I said, you can use json.to for a lot of cases, and for others there are a lot of nim serialization libs
10:14:08FromDiscord<Yardanico> https://github.com/treeform/flatty, https://github.com/disruptek/frosty, https://github.com/jangko/msgpack4nim and possibly more
10:14:13FromDiscord<Yardanico> flatty seems to be really good :)
10:14:33FromDiscord<Yardanico> you can also use https://github.com/guzba/supersnappy together with flatty to compress serialized data
10:17:27*tane joined #nim
10:21:29*shirtyx joined #nim
10:37:05FromGitter<Araq> seam: any idea? https://builds.sr.ht/~araq/job/426540
10:37:13FromGitter<Araq> otherwise my nkerror thing finally works
10:40:56Oddmongerthank you for the links Yardanico , i had searched a bit since and had only found msgpack4nim (which seemed ok for me)
10:42:35Oddmongeryes flatty seems nice
10:51:26*shirtyx quit (Quit: Going offline, see ya! (www.adiirc.com))
10:53:32Clonkk[m]I've used msgpack4nim before. It is very nice and works well. It's probably slower than flatty but is has the added advantage of being a well known protocol available in multiple programmming language. It makes communicating with a Python or Java process easy for example
10:54:36Clonkk[m]Which is sometimes needed / useful (just to offer some perspective)
10:56:31FromDiscord<Rika> Then combine that with super snappy then you got supreme compression too haha
10:58:40Clonkk[m]Compression is only relevant for large volume of data I'd say
11:02:09FromDiscord<Yardanico> it's also relevant for network transmission
11:02:18FromDiscord<Yardanico> or for limited disk size :)
11:06:42Clonkk[m]Low capacity just change what "large volume" means :)
11:15:44*shirtyx joined #nim
11:19:07*lritter joined #nim
12:12:58*abm joined #nim
12:45:02*wasted_youth2 joined #nim
12:45:59*krux02 quit (Remote host closed the connection)
12:46:46*krux02 joined #nim
12:47:01*krux02_ joined #nim
12:47:06*krux02_ quit (Remote host closed the connection)
13:04:07FromDiscord<Zrisckrdeluke> Does nake recompile the entire thing when any change happens or is it just the files that change like how make works?
13:09:17*sagax quit (Remote host closed the connection)
13:20:26planetis[m]afaik nake just calls the compiler
13:22:15*sagax joined #nim
13:48:44FromDiscord<konsumlamm> is there an easy way to get the absolute value of an int64 as uint64 (so that it also works for low(int64))?
13:49:45PMunchmyu64.abs.uint64
13:50:18FromDiscord<konsumlamm> the input is an int64 though
13:50:30PMunchYes?
13:50:42PMunch!eval (100'i64).abs.uint64
13:50:44NimBotCompile failed: /usercode/in.nim(1, 14) Error: expression 'uint64(100'i64)' is of type 'uint64' and has to be used (or discarded)
13:50:51PMunch!eval echo (100'i64).abs.uint64
13:50:54NimBot100
13:51:04PMunch!eval echo typeof((100'i64).abs.uint64)
13:51:07NimBotuint64
13:51:12FromDiscord<konsumlamm> !eval echo low(int64).abs.uint64
13:51:16NimBot/usercode/in.nim(1) in↵/playground/nim/lib/system/fatal.nim(49) sysFatal↵Error: unhandled exception: over- or underflow [OverflowDefect]
13:51:26FromDiscord<konsumlamm> that's the problem
13:51:44PMunchOoh, because low(int64).abs is higher than high(int64)..
13:51:46PMunchHmm
13:52:41FromDiscord<flywind> !eval echo low(int64).uint64
13:52:43NimBotCompile failed: /usercode/in.nim(1, 16) Error: cannot convert -9223372036854775808 to uint64
13:53:33PMunch!eval (proc (x: int64): uint64 = if x == low(int64): high(int64).uint64 + 1 else: abs(x).uint64)(100'i64)
13:53:35NimBotCompile failed: /usercode/in.nim(1, 28) Error: nestable statement requires indentation
13:53:35FromDiscord<konsumlamm> i could do some bit manipulation (invert if negative -> convert to uint64 -> add 1), but i was wondering if there is a nicer way
13:53:44PMunchDamn it :P
13:54:13FromDiscord<konsumlamm> hmm, ye, that's another possibility
13:54:15FromDiscord<flywind> like this
13:54:28FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2Pwr
13:54:49FromDiscord<konsumlamm> the first `uint64(x)` should be a cast though, right?
13:55:02PMunchhttps://play.nim-lang.org/#ix=2Pws
13:55:47PMunch@flywind, that won't work. uint64(low(int64)) fails because you can't convert a negative number to uint64
13:55:50FromDiscord<flywind> type conversion also works, no need for cast
13:56:26FromDiscord<konsumlamm> but if x is `low(int64)`, `uint64(x)` crashes
13:56:40FromDiscord<flywind> https://play.nim-lang.org/#ix=2Pwt
13:57:06FromDiscord<konsumlamm> huh
13:57:21FromDiscord<konsumlamm> !eval echo uint64(low(int64))
13:57:23NimBotCompile failed: /usercode/in.nim(1, 12) Error: cannot convert -9223372036854775808 to uint64
13:59:16PMunchHmm, I guess this is a static conversion issue
13:59:41PMunchuint64(low(int64)) converts to uint64(-9223372036854775808) on compile-time which fails
14:00:09FromDiscord<flywind> !eval var x = low(int64); echo int64(x)
14:00:13NimBot-9223372036854775808
14:00:20PMunchBut uint64 is apparently capable of converting the number -9223372036854775808 stored in a int64 variable into a uint64 just fine..
14:01:00FromDiscord<flywind> !eval var x = low(int64); echo uint64(x)
14:01:04NimBot9223372036854775808
14:02:53FromDiscord<flywind> I agree
14:03:20FromDiscord<flywind> !eval echo uint64(-1)
14:03:22NimBotCompile failed: /usercode/in.nim(1, 12) Error: -1 can't be converted to uint64
14:03:29FromDiscord<flywind> !eval let x = -1; echo uint64(x)
14:03:32NimBot18446744073709551615
14:03:50FromDiscord<konsumlamm> hmm, is that intentional behaviour?
14:04:18*audiophile joined #nim
14:05:12*audiophile quit (Remote host closed the connection)
14:07:13FromDiscord<Clyybber> PMunch: Yeah, I noticed it too
14:07:15FromDiscord<Clyybber> it's a bug
14:07:22FromDiscord<Clyybber> it shouldn't error in compiletime either
14:09:23*ddevault joined #nim
14:10:22FromDiscord<Clyybber> although the PR specifically mentions "runtime" https://github.com/nim-lang/Nim/pull/12688/files#diff-3bd14d078188074c410028847113ceae68865d0ad5b844a27183ef87fbe2fcc3R67
14:11:24FromDiscord<Clyybber> The manual also mentions it https://nim-lang.github.io/Nim/manual#statements-and-expressions-type-conversions
14:11:25FromDiscord<Yardanico> found some bug in trans.nim related that triggers with {.async.} and a for loop on iterator returning tuples 🤔
14:11:29FromDiscord<Yardanico> will try to minimize
14:11:33FromDiscord<Clyybber> nice!
14:11:40FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/810875978142056488/unknown.png
14:12:43FromDiscord<arnetheduck> status nim style guide live: https://status-im.github.io/nim-style-guide/
14:13:06PMunchI have an annoying bug with some async code as well. It works fine until I trigger a callback stored in a sequence. Then it pegs the program at high CPU usage until I restart it
14:13:14PMunchBut it's a pain to debug
14:14:28FromDiscord<konsumlamm> now, should i use `uint64(not x) + 1` or the if-else...
14:17:22PMunchAnd for the uint64 conversion bug this is a mixup between two intended features. Feature 1: low(int64) is done on compile-time, simply expands to a big negative number. Feature 2: you can't convert negative literals to unsigned integers. This is commonly used in C to generate the largest possible value e.g. `uint8_t x = -1;` to generate 255. But it is invalid in Nim in favour of high(uint8).
14:17:23FromDiscord<flywind> Since it is documented, I would use
14:17:30FromDiscord<Kiloneie> Finally after a long long time, here is another one of my videos:↵↵https://youtu.be/x76fT8GG0Pk
14:17:30FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2Pwy
14:17:54ForumUpdaterBotNew thread by Kiloneie: Nim SDL2 Game Development for Beginners (new video tutorial series), see https://forum.nim-lang.org/t/7508
14:18:04FromDiscord<Yardanico> the bug I' checking is really specific and only seems to occur when an iterator with `when nimvm` inside is involved
14:18:58FromDiscord<Yardanico> (edit) "I'" => "I'm"
14:19:04PMunch@Kiloneie, audio sounds much better than the last video I watched :D
14:19:51*vsantana joined #nim
14:20:37FromDiscord<Kiloneie> New mic 😛
14:21:21*Kiloneie joined #nim
14:21:30FromDiscord<no name fits> Speaking of vids, what do I call a stream where I just try to figure out Vulkan and Nim 👀
14:21:33PMunchIs this a voice-over, or have you tuned it so that you can't hear the keyboard?
14:21:51PMunchPeer programming stream? :P
14:22:23FromDiscord<no name fits> I guess I could call it Peer programming
14:22:24FromDiscord<Kiloneie> new mic attachable boom mic and i have -25dB sensitivity so my mouse and keyboard is now super quiet
14:22:41PMunchNice
14:22:52FromDiscord<Kiloneie> then a 30 dB gain over it
14:23:00PMunchAre those zoom effects manual?
14:24:59FromDiscord<Kiloneie> well kdenlive zoom
14:25:09FromDiscord<Kiloneie> you add keynotes keyframes ?
14:25:38Zoom[m]Kiloneie: nice sound indeed. A bit muddy to my taste
14:25:47FromDiscord<Kiloneie> so i set the start keyframe then the next one where i used my mouse to adjust the camera on the project view with 200% enlarge and voila
14:25:50FromDiscord<Kiloneie> it took a while though
14:25:59Zoom[m]It's nice to be summoned just in time for a sound discussion
14:26:19FromDiscord<no name fits> Why do I need a thumbnail 😅
14:27:12FromDiscord<Kiloneie> xD
14:27:21FromDiscord<Kiloneie> i was planning to release it today
14:27:38FromDiscord<Kiloneie> i uploadedd it yesterday with plans to add skip buttons, but apparently that's no longer a thing on youtube
14:27:43FromDiscord<Kiloneie> so D:
14:27:57FromDiscord<Kiloneie> still, don't upload at like 22.00 CET like i used to
14:28:09FromDiscord<Kiloneie> from my experience, everyone is asleep, don't get much views
14:28:21FromDiscord<Kiloneie> and most of the views come from here and the forum
14:28:53PMunchSkip buttons? You mean chapters?
14:29:21PMunchZoom[m], haha did I ping you on accident when I was asking about zooming?
14:29:57PMunchKiloneie, ah so it's done manually. I thought you might have some keyboard shortcut that zoomed OBS to the currently active window or something
14:29:58FromDiscord<Kiloneie> well chapters should appear...
14:30:04FromDiscord<Kiloneie> i did put timestamps in correctly
14:30:09FromDiscord<Kiloneie> but apparently it takes time...
14:30:12FromDiscord<Kiloneie> idk how much
14:30:15PMunchAh
14:30:18FromDiscord<Kiloneie> as i added them about an hour ago
14:30:20PMunchI don't see them now
14:30:46FromDiscord<Kiloneie> they are weird... i have them the same way on all my videos, yet half of the videos don't have chapters...
14:30:49Zoom[m]PMunch: Yep. Since 2020 I've suddenly become famous. Everyone seems to know me and mention me all the time. For the life of me, can't understand what happened :D
14:31:04FromDiscord<Kiloneie> someone commented on that on one of my videos and... it should work...
14:31:06PMunchHahaha :P
14:31:24PMunch@Kiloneie, it might just take a little while as you say
14:31:45FromDiscord<Kiloneie> yeh for new videos... idk about my older ones...
14:31:51Clonkk[m]<Zoom[m] "PMunch: Yep. Since 2020 I've sud"> Zoom becoming famous the year of the pandemic, sounds about right :D
14:31:59FromDiscord<Kiloneie> stuck with no chapters those sad bastards xD
14:33:11FromDiscord<Kiloneie> Okay yeez youtube calm down now, getting spammed by notifications lol
14:35:52FromDiscord<Kiloneie> also video is not 2K, or 1440p, idk i used what da vinci told me to do before, this one was made with kdenlive
14:38:26FromDiscord<Kiloneie> i hope i made the content well, there is just so much boilerplate code for SDL that i didn't know where to begin.
14:39:02*Kiloneie left #nim ("Leaving")
14:39:56ForumUpdaterBotNew thread by Serge: String "interning" attempt, see https://forum.nim-lang.org/t/7509
14:39:57FromDiscord<hamidb80> i have no idea how to write $ function for Email https://media.discordapp.net/attachments/371759389889003532/810883097015877632/Screenshot_at_2021-02-15_18-09-01.png
14:40:37FromDiscord<Yardanico> @hamidb80 string(e)
14:40:54FromDiscord<Yardanico> also don't forget to export the $ func
14:40:55FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2PwC
14:41:02FromDiscord<Yardanico> so you can stringify email from other modules
14:43:30FromDiscord<Yardanico> beautiful
14:43:40FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2PwD
14:44:52*asdflkj_ joined #nim
14:44:53FromDiscord<hamidb80> In reply to @Yardanico "```nim type Future =": how did you activate syntax highlighting for your code?
14:45:07FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/810884398106935306/unknown.png
14:45:20FromDiscord<Yardanico> that's how it's done in markdown
14:45:26FromDiscord<hamidb80> that's same as github
14:45:32FromDiscord<Yardanico> yes, because it also uses markdown :)
14:50:20*shirtyx quit (Quit: Going offline, see ya! (www.adiirc.com))
14:50:34FromDiscord<Yardanico> @Clyybber https://github.com/nim-lang/Nim/issues/17045
14:58:57FromGitter<YBR46084841_twitter> what does "defer" do after an if statement please
14:59:21PMunchdefer will execute the block given to it at the end of the current scope, or in the case of an exception
15:29:16*haxscramper joined #nim
15:29:46*PMunch quit (Quit: leaving)
15:29:57FromDiscord<Yardanico> btw, @Araq what do you think about enabling github discussions for the nim repo?
15:30:05FromDiscord<Yardanico> they are available to all github users nowadays
15:30:33FromDiscord<Yardanico> https://docs.github.com/en/discussions/quickstart
15:31:00FromDiscord<flywind> see https://discord.com/channels/371759389889003530/371759389889003532/793002886959202364
15:31:04FromDiscord<flywind> ^
15:31:15FromDiscord<Yardanico> oh okay
15:33:14*maier joined #nim
15:38:06FromDiscord<hamidb80> what happens when an exception occurs inside a thread?
15:38:49FromDiscord<hamidb80> they're just ignored?
15:39:09FromDiscord<hamidb80> i mean they're just ignored and the thread goes down
15:39:25FromDiscord<Yardanico> no, the whole application quits
15:40:38*vicfred joined #nim
15:40:42FromDiscord<hamidb80> In reply to @Yardanico "no, the whole application": the number isn't increasing https://media.discordapp.net/attachments/371759389889003532/810898383203336262/Screenshot_at_2021-02-15_19-09-50.png
15:40:51FromGitter<YBR46084841_twitter> can someone explain me what this part of code does : proc toString(chars: openArray[WCHAR]): string = ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=602a9603e634904e60a00540]
15:41:07FromDiscord<Yardanico> @hamidb80 wdym?
15:43:47FromDiscord<Rika> i dont see anything wrong in your code @hamidb80
15:45:18FromDiscord<hamidb80> In reply to @Rika "i dont see anything": yes that's my wrong
15:45:26FromDiscord<hamidb80> sorry
15:53:38*shirtyx joined #nim
15:56:05FromGitter<YBR46084841_twitter> proc toString(chars: openArray[WCHAR]): string = ⏎ result = "" ⏎ for c in chars: ⏎ if castchar == '\0': ⏎ break ... [https://gitter.im/nim-lang/Nim?at=602a99948621811d587b272e]
15:56:23FromGitter<YBR46084841_twitter> what does this procedure do please?
16:00:01*silvernode[m] quit (Quit: Idle for 30+ days)
16:02:24FromDiscord<konsumlamm> it converts an `openArray[WCHAR]` to a `string`?
16:05:02FromGitter<YBR46084841_twitter> the =='\0' is checking if its hexadecimal?
16:06:32FromDiscord<konsumlamm> no, that checks for the end of a string
16:06:55FromDiscord<konsumlamm> '\0' is the NIL character, it has nothing to do with '0'
16:07:24*NimBot joined #nim
16:07:37FromGitter<YBR46084841_twitter> ahhh thank you
16:09:45voidpi!seen disruptek
16:10:06voidpi:/
16:10:39Prestigehe's banned from the channel D: voidpi
16:12:11voidpiPrestige: thanks, not really a surprise
16:12:22Prestigenp
16:15:19*clyybber joined #nim
16:20:30haxscramperWhen I run test for pattern matching with testament it reports as `Failure: reNimcCrash` without outputting anything else. Compilting and running tests using the same commands does not report any compilation errors, though only passed `[Suite]` names are printed out (instead of `suite + test` names like when using unittest).
16:20:31haxscramper
16:20:31haxscramper
16:20:35haxscramperRunning testament using: `./bin/testament --nim:bin/nim r tests/stdlib/tmatching.nim` for a standalone testt
16:20:35haxscramper
16:20:38*clyybber quit (Quit: WeeChat 3.0.1)
16:20:39haxscramperTest using compiler: `./bin/nim r --hints:on -d:testing --nimblePath:tests/dep tests/stdlib/tmatching.nim`
16:20:39haxscramper
16:20:41haxscramper(taken from testament output)
16:23:46haxscramperI've added pattern matching library in the stdlib and running testament on already existing/working test suite, so most likely it I've just misused `testament` itself
16:26:42FromDiscord<Clyybber> @Araq ping
16:30:49*vsantana1 joined #nim
16:31:56*vsantana quit (Ping timeout: 240 seconds)
16:31:56*vsantana1 is now known as vsantana
16:36:12FromGitter<Araq> pong
16:39:05FromDiscord<haxscramper> In reply to @haxscramper "Or pushed for pattern": https://github.com/nim-lang/Nim/pull/17047 PRed it as-is, will see how it goes
16:53:29FromDiscord<haxscramper> Though CI seems to be getting green, my question is still relevant, so if anyone could tell me what I've done wrong I would much appreciate it
17:03:08FromDiscord<Clyybber> @Araq I think we need a loop DFA instruction
17:03:29FromGitter<Araq> ok
17:04:13FromDiscord<Clyybber> I'm not sure yet, if it's strictly needed, but it would also be nice since currently each loop potentially triples the dfa
17:04:37FromGitter<Araq> so far I'm underwhelmed with the DFA's results btw, if I were to redo it again, I would simply traverse the AST I think
17:05:07FromDiscord<Clyybber> Yeah, it's a nice interface to work with, but I think we may be able to "inline" it
17:06:11FromGitter<Araq> how is it "nice"? it was designed to avoid fixpoint computations and yet that's what we end up doing
17:07:05FromDiscord<Kiloneie> Hey @Araq did you get my DM ?
17:07:41FromGitter<Araq> no, what's a DM?
17:08:05FromDiscord<ache of head> direct message
17:08:11FromDiscord<Kiloneie> PM
17:08:25FromDiscord<Kiloneie> everyone keeps saying DM, when im used to PM, so i used that xD...
17:08:46FromGitter<Araq> I only know "PM"
17:08:47FromDiscord<Kiloneie> it used to be PM... why do people keep changing names of things D:
17:09:14FromDiscord<Kiloneie> xD, well i sent you one
17:09:55FromGitter<Araq> PM on gitter these days please
17:10:12FromDiscord<Kiloneie> idk what you guys use xD...
17:10:18FromDiscord<ache of head> i prefer direct message
17:10:24FromDiscord<ache of head> nothing is really private onnline
17:10:28FromDiscord<ache of head> (edit) "onnline" => "online"
17:10:38FromDiscord<treeform> only Araq uses gitter, rest use disocrd.
17:10:40FromDiscord<ache of head> but to each their own ¯\_(ツ)_/¯
17:13:58Clonkk[m]<FromDiscord "<treeform> only Araq uses gitter"> Matrix users are gonna get pissed, all 3 of us !
17:15:10FromDiscord<treeform> I never seen some one from Matrix speak!
17:15:23FromDiscord<gollark> I managed to get my dendrite instance to join the matrix room after several minutes of waiting.
17:15:39FromDiscord<gollark> But I have Discord open more so I'm not using that.
17:17:23*maier quit (Quit: Lost terminal)
17:18:22FromDiscord<gollark> I basically don't use Matrix at all because there aren't any interesting communities there (which I'm aware of) and joining things is sloooow.
17:18:48vindaar[m]<Clonkk[m] "Matrix users are gonna get pisse"> Hey, we're probably at least 5!
17:19:45Clonkk[m]<vindaar[m] "Hey, we're probably at least 5!"> I don't think the bots count
17:20:20FromDiscord<gollark> I was going to say something from there, but the client on my phone isn't showing this room.
17:27:28FromGitter<akavel> Hi! How do I set `-d:foo=bar` in .nimble file?
17:29:28Clonkk[m]switch("define","foo=bar") if I'm not mistaken
17:31:23FromGitter<akavel> @Clonkk[m]: nope, didn't work unfortunately; tried the same with "d" instead of "define" but still not working
17:33:12FromGitter<akavel> when I do it with `nim c -r -d:foo=bar`, it works; but `switch` doesn't seem to when doing `nimble run` :(
17:34:19FromDiscord<Solitude> im pretty sure you cant set compiler options from .nimble
17:35:17ForumUpdaterBotNew thread by Drkameleon: Non-js modules, see https://forum.nim-lang.org/t/7510
17:36:07FromDiscord<dom96> Araq: Discord is much better, you should really switch
17:37:55Clonkk[m]<FromGitter "<akavel> @Clonkk[m]: nope, didn'"> I do something like that from a config.nims file wasn't sure about nimble fild
17:40:32FromGitter<akavel> @Clonkk[m]: putting `switch(...)` in config.nims worked, thanks!!! <3 <3 <3
17:48:50*waleee-cl joined #nim
18:01:29*saem quit (Read error: Connection reset by peer)
18:01:49*saem joined #nim
18:04:05*shirtyx quit (Quit: Going offline, see ya! (www.adiirc.com))
18:17:23ForumUpdaterBotNew thread by Johnconway: Control Flow with Type Checking, see https://forum.nim-lang.org/t/7511
18:22:36FromDiscord<ache of head> bro john conway is in this??
18:24:09*shirtyx joined #nim
18:25:51*a_chou joined #nim
18:28:36FromDiscord<exelotl> you can't say "sliding into my PMs"
18:28:39FromDiscord<exelotl> it just doesn't work
18:33:10FromDiscord<mratsim> In reply to @ache of head "bro john conway is": Conway died last year
18:33:23*vsantana1 joined #nim
18:34:45*vsantana quit (Ping timeout: 240 seconds)
18:34:46*vsantana1 is now known as vsantana
18:34:52saemIt's that compiler talk that always gets me.
18:35:04saemBut don't send me bug reports there.
18:36:41FromDiscord<ache of head> > Conway died last year↵wait, for real?
18:36:48FromDiscord<ache of head> i didn't know that
18:36:59FromDiscord<ache of head> in that case i am sorry if my comment seemed out of place
18:39:55saemIt's cool, I have a lot of respect for his insight
18:40:14saemMy job is basically Conway's law manifest
18:40:22FromDiscord<ache of head> me too, that's what i mean 😕
18:40:41FromDiscord<ache of head> but from this perspective it looked a bit like i was making fun of him and i didn't mean to
18:41:11FromDiscord<ache of head> again i am sorry if anyone found this offensive
18:41:14FromDiscord<mratsim> I understood like you didn't know actually
18:41:21FromDiscord<ache of head> i need to stop making stupid jokes online 😩
18:41:50saemI took it as praise, but everyone interests things differently. Little exchange clarifies the tone and all that.
18:42:45saemStupid jokes online is half the reason I'm online
18:43:05FromDiscord<mratsim> and memes are the other half
18:43:25saemYeah, kinda like gi joe
18:43:30FromDiscord<dom96> hello all
18:43:34saemKnowing is half the battle.
18:43:55saemThe other half is red and blue lazers (that never got anything).
18:45:28FromDiscord<~355/113 Man> :pepesaber:
18:45:33saemHmm, maybe I should spend a couple hours releasing a new version of the extension, need to take a quick peek at nimsuggest process handling to see if I can track down the leak in non-process mode.
18:46:09saemNon-project mode, rather.
18:48:25saemBut I want to get back to sem fixes for great good (nkError and more). 😅
18:48:39FromDiscord<haxscramper> Pattern matching CI for stdlib is green
18:49:02saemOh damn!
18:49:41saemFor the food that are lazy/in the phone, can has link to the PR?
18:49:45FromGitter<Araq> can we please get "let as expressions" first
18:49:54FromGitter<Araq> and then use them for pattern matching?
18:50:06saem+1
18:52:09saemDestructuring, pinning, etc... All make pattern matching really shine. Guessing "let as expression" really opens that up?
18:54:13FromDiscord<haxscramper> Araq: will we get it before 1.6&
18:54:14FromDiscord<haxscramper> ?
18:54:44FromDiscord<haxscramper> And it looks nice, maybe, but that's all I can say about it really
18:55:27FromDiscord<haxscramper> Does it add anything else aside from writing `[all let capture]` vs `[all @capture]`?
18:56:05FromDiscord<Clyybber> isn't pattern matching already in fusion?
18:56:08FromDiscord<haxscramper> or whatever new round of syntax discussion (that does not add anything else) willb bring?
18:56:16FromDiscord<haxscramper> In reply to @Clyybber "isn't pattern matching already": Whis is now not bundled
18:56:29FromDiscord<haxscramper> == defeats the whole purpose of #245
18:56:56FromDiscord<haxscramper> Which was to bring pattern matching into default installation as a part of a language
18:59:58FromDiscord<haxscramper> And what "let expression" would look like exactly? It would have to behave like a prefix operator with precedence 10 to allow for replacing existing syntax, or I would need to rethink the whole DSL top-down, or at least noticeable portion of it
19:03:02FromGitter<Araq> well if you want it in the standard, it should look exactly as we want it
19:03:28FromDiscord<haxscramper> Well, how do you want it to look then?
19:03:33FromGitter<Araq> Fusion is the stagging area
19:04:04FromGitter<Araq> I have not much of an opinion how I want it to look, however
19:04:22FromDiscord<haxscramper> Just write random pattern-patching expressoins that you would like to work
19:04:39FromDiscord<haxscramper> I mean I don't ask for full-blown explanation'
19:04:51FromDiscord<haxscramper> Just general understanding of what you find more appropriate
19:05:02FromGitter<Araq> if the contruct declares an identifier, this must be visible without knowing the macro's implementation
19:05:13FromDiscord<haxscramper> `/sutable for pattern-patching-that-is-worthy-of-stdlib`
19:05:35FromGitter<Araq> so instead of `of CallExpr(x):` it should be like `of CallExpr(let x):`
19:06:53FromDiscord<konsumlamm> (it is `of CallExpr(@x)` currently)
19:06:54FromDiscord<haxscramper> And subsequently `[all @capture] -> [all let capture]` (or `[let all capture]`
19:07:21FromDiscord<dom96> What will it look like in Python? or rather what is it most likely to look like?
19:07:31FromGitter<Araq> https://www.python.org/dev/peps/pep-0622/
19:07:54FromDiscord<haxscramper> In reply to @dom96 "What will it look": `case ["drop", objects]:`
19:07:57FromDiscord<konsumlamm> actually, that was superseded by https://www.python.org/dev/peps/pep-0634/
19:08:07FromDiscord<haxscramper> https://www.python.org/dev/peps/pep-0636/#matching-multiple-patterns
19:08:51FromDiscord<haxscramper> In reply to @haxscramper "`case ["drop", *objects]:`": In our case this would be `["drop", all @objects]`
19:09:16FromDiscord<haxscramper> And with `let` it might look like `["drop", all let objects]`
19:10:51FromDiscord<haxscramper> Well, whatever, so now `fusion` is officially nim's boost for staging area
19:10:54FromDiscord<dom96> hm, we don't really have Python's `` concept
19:11:09FromDiscord<haxscramper> and packages from it would have to be re-RFC-ed, and re-implemented partially to make it into stdlib
19:11:14FromDiscord<haxscramper> Which is generally fine by me
19:11:34FromDiscord<dom96> so I'd be tempted to drop this feature, unless it's a common feature of all pattern matching
19:11:46FromDiscord<dom96> in which case it would be interesting to see how other languages handle this
19:12:16FromDiscord<haxscramper> In reply to @dom96 "so I'd be tempted": `nnkProcDef` arguments, extracing conditions/bodies from conditional statement or something like that
19:12:36FromDiscord<haxscramper> `CaseStmt[all OfBranch[@conditions, .._]]`
19:12:50FromDiscord<haxscramper> Capture all case-of branches into `conditions` variable
19:12:56FromDiscord<konsumlamm> In reply to @dom96 "in which case it": well, most other languages don't require a prefix (like `@` or `let`) before captured variables
19:14:03FromDiscord<konsumlamm> many languages don't have flexible seq patterns like fusion/matching currently does
19:14:06FromGitter<Araq> well we can also avoid it but then it has to be hard-coded into the language, nothing else would really work
19:14:07FromDiscord<haxscramper> In reply to @dom96 "in which case it": Almost no other language pattern-matching has support for sequences in a way that we do, with possible exception of python's ``, and list head/tail which is arguable
19:14:42FromDiscord<haxscramper> Well, if you disregard regex of course
19:14:42FromDiscord<mratsim> I like @ as an idiom for capture, would be useful for closures as well, but it's already taken :/
19:15:21FromDiscord<haxscramper> In reply to @mratsim "I like @ as": I really like the consistency of LET INTRODUCES NEW VARIABLE IN THE SCOPE that holds true for as many cases as possible
19:15:57FromDiscord<haxscramper> Though pattern matching should really have all captures as `lent`
19:16:14FromDiscord<haxscramper> Which is not done now because of view type's experimental status
19:16:25FromDiscord<konsumlamm> racket (which also implements pattern matching with macros) has the first identifier in a list (it's a lisp, so everything is a list there naturally) special cased, but captured variables are still not prefixed
19:17:14FromDiscord<haxscramper> > Well, whatever, so now fusion is (officially?) nim's boost for staging area↵Because #310 went nowhere, I think it is important that this decision should be highlited or confirmed or whatever?
19:17:17FromDiscord<mratsim> let foo: lent Foo = foo
19:17:32FromDiscord<haxscramper> Because nobody knows what the hell is going on in the fusion
19:17:50FromDiscord<konsumlamm> though the ship of not using a prefix at all has already sailed ig... (and it wouldn't work well with normal `case` expecting identifiers to be constants either)
19:18:17FromGitter<Araq> haxscramper: nim installation will offer the choice to download Fusion
19:18:32FromGitter<Araq> not much did change, but we should all freak out, of course
19:18:35FromDiscord<mratsim> what about parens for pattern matching?
19:19:31FromDiscord<konsumlamm> wdym?
19:19:57FromGitter<Araq> ideally a solution also would give us nicer `mapIt` but it's probably unrealistic
19:20:52FromDiscord<KnorrFG> hey, I feel a little stupid for asking this: but I want to allocate an array at runtime to store the contents of an image file. I could use a seq, but since the array length wont change after creation an array feels more appropriate. The thing is that array[type, size] only works if size is known at compile time, while I load the file at runtime. is there something like newArray?
19:21:04FromDiscord<mratsim> composable iterators would reduce the need for mapIt
19:21:23FromDiscord<haxscramper> @haxscramper: nim installation will offer the choice to download Fusion↵> not much did change, but we should all freak out, of course↵I'm really sorry for that much salt, but where is it written? Oh, I can see it in git diff, yeah, everyone certainly has all the time in the world to review changes that clearly say "unbundle nim from fusion" (instead of "make fusion installation optional")
19:21:23FromDiscord<Yardanico> @KnorrFG no, you can just use a seq with `let`
19:21:23FromDiscord<mratsim> In reply to @KnorrFG "hey, I feel a": use a sequence.
19:21:32FromDiscord<KnorrFG> ok 😄
19:23:10FromGitter<Araq> @mratsim how would composable iterators offer something as terse as `a.mapIt($it)`
19:23:12FromDiscord<haxscramper> Actually wait, it means that new user would have to know to do `nim fusion` to install it?
19:24:01FromDiscord<haxscramper> It is now that they are asked about this during default installation
19:24:44FromDiscord<konsumlamm> composable iterators would offer `a.map(it => $it)`, which is pretty close imo
19:25:11FromDiscord<mratsim> I prefer a.map(lambda it: $it)
19:25:26FromDiscord<mratsim> the => is poor when you need <= for filter.
19:25:34FromDiscord<mratsim> The "it" always felt like magic.
19:25:38FromDiscord<konsumlamm> parentheses my friend
19:25:49FromDiscord<haxscramper> Can't `mapIt` just became a syntax sugar for any if the syntaxes then?
19:25:51FromDiscord<mratsim> If I want terse I would use Haskell.
19:27:48FromDiscord<Zrisckrdeluke> If you wanted terse you would program directly for xorg.
19:27:52FromDiscord<Zrisckrdeluke> or win32
19:28:26FromDiscord<Yardanico> that's not terse :P
19:29:45FromDiscord<hamidb80> In reply to @mratsim "the => is poor": i don't think it's really an issue
19:30:11FromDiscord<hamidb80> b. filter( num => num <= 10 )
19:30:17FromDiscord<hamidb80> sounds funny
19:30:31FromDiscord<Zrisckrdeluke> In reply to @Yardanico "that's not terse :P": The x11 documentation is composed of roughly 10 or so books. It's very terse.
19:31:23FromDiscord<hamidb80> In reply to @hamidb80 "b. filter( num": or you can just write b.filterit ( ir <= 10 )
19:31:31FromDiscord<hamidb80> (edit) "ir" => "it"
19:32:43FromDiscord<Zrisckrdeluke> Is fusion a bad thing? I'm scrolling up and there seems to be some drama surrounding it.
19:32:47*shirtyx quit (Quit: Going offline, see ya! (www.adiirc.com))
19:32:53FromDiscord<haxscramper> no, it is just
19:33:07FromDiscord<haxscramper> well, it was an idea that didn't exactly work out
19:33:18FromDiscord<haxscramper> But this is just a package now
19:33:31FromDiscord<Zrisckrdeluke> How will fusion affect me?
19:33:57FromDiscord<haxscramper> There are quite a number of cool modules in it, maybe you could find something interesting
19:34:12FromDiscord<haxscramper> Pattern matching, karax-style DSL consturctors, smart pointers, some JS helpers etc.
19:34:20FromDiscord<haxscramper> Sorted tables
19:39:58FromDiscord<haxscramper> About fusion etc. - I think I've seen the notion of "I don't know what is going on with a fusion"/"what fusion is" too many times, so I guess it is appropriate to maybe give some conclusive statement on this topic and stick to it.
19:39:59FromDiscord<haxscramper> Unbunlding nim from fusion and making it into "somewhat more special" package (like that it has special command like `nim fusion` to install) is the least costly one (I suppose).
19:40:20FromGitter<deech> It would be nice from a usability standpoint if making an object public made it's fields public as well.
19:41:10FromDiscord<hamidb80> In reply to @deech "It would be nice": so then we don't have private keys
19:43:05FromGitter<deech> Could maybe do `type O* = object* a:int b:int` where the `object*` means all the fields are public? Dunno, just a thought?
19:43:30FromDiscord<konsumlamm> eh, most of the time you don't want all fields to be public
19:44:20FromGitter<deech> Happens enough for me.
19:44:50FromDiscord<haxscramper> I suppose you can write a macro for that one
19:45:12FromDiscord<haxscramper> `Object {.allPub.} = object`
19:45:15FromGitter<deech> Or maybe `type O** = object ...` where `**` means all fields are public, maybe less intrusive. Yeah, could write a macro.
19:47:09FromDiscord<~355/113 Man> In reply to @konsumlamm "eh, most of the": meh, I still do this anyways :LUL:
19:49:15FromDiscord<haxscramper> In reply to @haxscramper "About fusion etc. -": Especially considering that #310 basically went nowhere, but now we basically have it solved (at least in my opinion what we got now can be considered acceptable at least)
19:49:17FromDiscord<dom96> The reason fusion fails is because it’s not realistic to have someone making sure the code in it is high quality
19:50:19FromDiscord<haxscramper> But it is still better than random libraries
19:50:42FromDiscord<dom96> How so?
19:50:46FromDiscord<haxscramper> At least on some topic it is possible to concentrate community efforts on a single implemenation
19:51:05FromDiscord<haxscramper> For example @konsumlamm did a great job discussing some parts of the patern matching
19:51:22FromDiscord<konsumlamm> 😊
19:52:30FromDiscord<haxscramper> And there was a lot over overall feedback here and there
19:52:59FromGitter<deech> Is there a pattern matching proposal in the works?
19:53:16FromDiscord<dom96> Maybe there is some value there, but is it really significant enough over just searching nimble for other implementations and getting in touch with their owners?
19:53:17FromDiscord<haxscramper> https://nim-lang.github.io/fusion/src/fusion/matching.html
19:53:30FromGitter<deech> wow, thanks!
19:54:06FromDiscord<haxscramper> Also see https://github.com/nim-lang/fusion/pull/61 as there have been quite a number of fixes
19:56:07FromGitter<deech> It does `Option` matching, yay!
19:56:38FromDiscord<konsumlamm> In reply to @dom96 "Maybe there is some": imo, yes
19:57:21FromDiscord<konsumlamm> it's way more likely that people will contribute to something that's standard (or de facto standard) than some random nimble package
19:57:56FromDiscord<haxscramper> In reply to @dom96 "Maybe there is some": if owner has time and if they are interested in fixing things and so on. Fusion does have these problems too, but so does any other open-source project in the world. The difference is that fusion is not maintained by a single person (there are at least xflywind, juancarlospaco, and timotheecour that provide some reviews). Also this does not have that much attention because it has never
19:58:04FromDiscord<konsumlamm> especially since if something isn't standard, there will probably be multiple competing variants, so you first have to decide which one to use
20:03:53FromDiscord<konsumlamm> it would be nice if anyone has some time to review my PR: https://github.com/nim-lang/Nim/pull/16961
20:03:58FromDiscord<konsumlamm> it's already a week old
20:06:59FromDiscord<Clyybber> @haxscramper fusion will come with nim optionally; do you still want pattern matching to end up in the stdlib instead of fusion?
20:10:17FromDiscord<haxscramper> In reply to @Clyybber "<@!608382355454951435> fusion will come": I would like to try and push for pattern matching in stdlib still, because I really feel like this should be a built-in part of the language that does not require any additional installation/configuration. But I can agree that let expressions and view types are important enough to wait with current implementation
20:10:52FromDiscord<haxscramper> Current solution is a good compromise I think
20:11:05FromDiscord<haxscramper> For this moment at least
20:11:15FromDiscord<Clyybber> yeah
20:11:34FromDiscord<Clyybber> I think it's a better fit for fusion because there are many ways to do pattern matching
20:11:45FromDiscord<Clyybber> and an implementation will always have to be somewhat opinionated
20:11:46FromDiscord<haxscramper> yes, all of them
20:12:04FromDiscord<haxscramper> now try to recommend one to newcomer?
20:12:31FromDiscord<haxscramper> We have patty, gara, fusion/matching and couple others
20:12:44FromDiscord<haxscramper> Now we have fusion/matching but still
20:13:04FromDiscord<haxscramper> If this is official one, why not make a final step and just finalize it
20:13:23FromDiscord<Clyybber> because there's no end to pattern matching features I suppose
20:13:47FromDiscord<haxscramper> In reply to @Clyybber "because there's no end": Current set feels more than enough
20:14:03FromDiscord<haxscramper> If something is missing or feels unnecessary feel free to discuss
20:14:07FromDiscord<haxscramper> That is the point
20:14:09FromDiscord<Clyybber> yeah
20:14:26FromDiscord<konsumlamm> In reply to @konsumlamm "it would be nice": @Clyybber you maybe? :)
20:14:38FromDiscord<Clyybber> thats why I think it fits better into fusion, because it has more possiblity for change
20:14:47FromDiscord<Clyybber> In reply to @konsumlamm "<@!107882072974065664> you maybe? :)": sure :)
20:14:57*koltrast_ quit (Ping timeout: 265 seconds)
20:15:01FromDiscord<haxscramper> I can agree to multi-month syntax tweaks and all (basically what we got in #245), but the ultimate target is that nim would have built-in pattern matching, and it would be the best one
20:15:25FromDiscord<haxscramper> At least the best one we managed to come up with
20:15:47ForumUpdaterBotNew thread by Mikebelanger: Hotcodereloading and libfswatch, see https://forum.nim-lang.org/t/7512
20:15:51FromDiscord<haxscramper> And it would be stabilized, since I can't tweak things in fusion all that much anyway
20:15:59FromDiscord<Clyybber> yeah, but changing something in fusion is easier than in stdlib
20:16:04FromDiscord<haxscramper> how so?
20:16:05FromDiscord<Clyybber> should we discover a better way to do things
20:16:12FromDiscord<haxscramper> ah, you mean this
20:16:16FromGitter<deech> haxscamper, reading over your matching implementation and it looks nice! What does shortened kind fields mean? Does it just detect some common string prefix?
20:16:45FromDiscord<haxscramper> Yes, you can match `ForStmt()` instead of `nnkForStmt()`
20:16:53FromDiscord<haxscramper> If you mean this one
20:17:21*Vladar quit (Quit: Leaving)
20:17:41FromDiscord<haxscramper> In reply to @Clyybber "should we discover a": I think we certainly would discover a better way of doing things, but this might only lead to minor tweaks of breaking syntax change that would warrant new fusion module anyway
20:17:52FromGitter<deech> I was looking at this one as well: https://github.com/nim-lang/fusion/blob/master/tests/tmatching.nim#L1488
20:18:06FromDiscord<haxscramper> But breaking change is impossible in stdlib
20:18:11FromDiscord<Clyybber> exactly
20:18:16FromDiscord<haxscramper> And highly discouraged in fusion
20:18:28FromDiscord<Clyybber> yeah, but adding a new module to stdlib is also harder than to fusion
20:18:57FromDiscord<Clyybber> it's "less bad" if we end up with 3 matching impls in fusion, than if we end up with 3 matching impls in stdlib
20:19:17FromDiscord<Clyybber> because fusion makes less guarantees about maintenance
20:19:21FromDiscord<haxscramper> deech: it uses https://github.com/nim-lang/fusion/blob/ea18f8559c514b227b148300a2900b3e2a282b0d/tests/tmatching.nim#L1374 , and yes it allows to drop `cnt` prefix
20:19:30FromDiscord<Clyybber> @konsumlamm merged :)
20:19:33*Vladar joined #nim
20:19:37FromDiscord<konsumlamm> thx
20:19:43FromDiscord<Clyybber> thx for your PRs
20:19:55FromDiscord<konsumlamm> you're welcome xD
20:20:04FromDiscord<konsumlamm> there's still a lot to do
20:21:10FromGitter<deech> haxscamper, thanks for this. It makes an `Option` heavy API much nicer to use.
20:21:22FromDiscord<haxscramper> In reply to @Clyybber "it's "less bad" if": Maybe we could do something like this - advertise fusion anyway (as nim's boost (C++ boost)), and then reuse all feedback and user experience for making new RFC that uses all of that data. Basically that C++ does with boost
20:21:34*koltrast joined #nim
20:21:50FromDiscord<Clyybber> you mean letting matching stay in fusion and advertise fusion more?
20:21:50FromDiscord<haxscramper> 3-impl problem can be in any library
20:21:54FromDiscord<haxscramper> yes
20:21:56FromDiscord<haxscramper> exactly
20:21:58FromDiscord<Clyybber> sounds good
20:21:59FromDiscord<Clyybber> yeah
20:22:26FromDiscord<Clyybber> ironically making fusion optional will be kind of advertisement for fusion
20:22:36FromDiscord<Clyybber> because then people will actually know about it since they have to choose :P
20:22:42FromDiscord<haxscramper> I can write an overview article for next release about all modules in fusion, and we can just serve it as a brand-new thing (almost),
20:22:52FromDiscord<haxscramper> + my pattern matching article
20:22:56FromDiscord<haxscramper> For the next release
20:23:25FromDiscord<Clyybber> an article about fusion sounds like the exact right thing to do :D
20:23:38FromDiscord<Clyybber> but check back with Araq, maybe he's already writing one
20:24:58FromDiscord<konsumlamm> @Clyybber btw, do you happen to know why the CI fails here: https://github.com/nim-lang/Nim/pull/17036 ? it seems like CI is sometimes randomly failing due to SSL...
20:25:07FromDiscord<Clyybber> yeah, it's flaky
20:25:14FromDiscord<Clyybber> I think it's because of the recent SSL changes
20:25:36FromDiscord<konsumlamm> In reply to @Clyybber "an article about fusion": oh ye, an article about fusion sounds like a great idea
20:26:18FromDiscord<haxscramper> In reply to @Clyybber "you mean letting matching": And then going through full RFC process again for pattern matching, but armed with user feedback, discovered design and usability flaws and so on. We don't have an infinite amount of ways for implementing things, and some parts might really be unnecessary and require cutting out parts
20:27:20FromDiscord<haxscramper> #245 laid the foundation, now `fusion/matching` will provide real-world usage, and then we will see what's next
20:27:59FromDiscord<Clyybber> sounds like a plan
20:40:17FromDiscord<haxscramper> In reply to @konsumlamm "oh ye, an article": I want to do a general overview of all modules & push for the analogy of fusion being nim's boost but "more official".
20:47:13*abm quit (Quit: Leaving)
20:47:14*haxscramper quit (Remote host closed the connection)
20:47:38*haxscramper joined #nim
20:47:55*abm joined #nim
20:58:11*haxscramper quit (Remote host closed the connection)
21:07:17*liblq-devel joined #nim
21:08:03*giaco quit (Ping timeout: 256 seconds)
21:10:12*liblq-devel quit (Client Quit)
21:31:17*lritter quit (Ping timeout: 256 seconds)
22:23:57*anon_seren1ty joined #nim
22:24:50*anon_seren1ty quit (Remote host closed the connection)
22:47:02*a_chou quit (Quit: a_chou)
22:48:28saemoh joy, all sorts of VM crashes are now being surfaced. Time to go hunting.
22:59:16*vicfred quit (Quit: Leaving)
23:01:06*tane quit (Quit: Leaving)
23:02:22*WingardiumLevios joined #nim
23:07:24*CcxWrk quit (Ping timeout: 246 seconds)
23:09:32*WingardiumLevios left #nim ("WeeChat 1.9.1")
23:11:01*jess is now known as j
23:13:11*CcxWrk joined #nim
23:17:40*vsantana quit (Ping timeout: 272 seconds)
23:34:29FromDiscord<ElegantBeef> @haxscramper add a submission to this month with nim about your pattern matching and describe fusion in it 😛
23:36:50*Vladar quit (Quit: Leaving)
23:37:32*vicfred joined #nim