<< 28-01-2021 >>

00:03:18*kwilczynski quit ()
00:22:37*sagax quit (Ping timeout: 256 seconds)
00:27:01*j-james[m] joined #nim
00:27:01*William[m]1 joined #nim
00:27:02*jaens[m] joined #nim
00:27:02*lytedev[m] joined #nim
00:27:02*leorize[m] joined #nim
00:27:02*matthias[m] joined #nim
00:27:02*unclechu joined #nim
00:27:03*planetis[m] joined #nim
00:27:03*MTRNord joined #nim
00:27:03*Avahe[m] joined #nim
00:27:03*lnxw37d4 joined #nim
00:27:03*VijayMarupudi[m] joined #nim
00:27:03*stisa[m] joined #nim
00:27:03*Avatarfighter[m] joined #nim
00:27:03*reversem3 joined #nim
00:27:03*GitterIntegratio joined #nim
00:27:07*vindaar[m] joined #nim
00:27:07*Zoom[m] joined #nim
00:27:08*Kurre[m] joined #nim
00:27:08*himup[m] joined #nim
00:27:08*BauxnaMatrix[m] joined #nim
00:27:08*Juno[m] joined #nim
00:27:08*awici[m] joined #nim
00:27:08*Clonkk[m] joined #nim
00:27:08*silvernode[m] joined #nim
00:27:08*codic joined #nim
00:27:09*k0mpjut0r joined #nim
00:27:09*ee7[m] joined #nim
00:27:09*cadmium[m] joined #nim
00:27:10*dilawar_uchiha[m joined #nim
00:27:11*cmc[m] joined #nim
00:45:05*Guest62103 joined #nim
00:48:03*asdflkj joined #nim
00:51:36asdflkjthe instructions link at the bottom of https://nim-lang.org/blog/2021/01/26/this-month-with-nim.html was a tiny bit confusing for a couple seconds bc I had to scroll down to see what it was referring to on my screen. That could be fixed if it could be switched to https://github.com/beef331/website#adding-your-project-to-month-with-nim (from just https://github.com/beef331/website)
00:53:40*Tanger joined #nim
00:55:39FromDiscord<VVX7> what's the best way to identify/manage circular imports? inb4 don't write shitty code
00:56:12*audiophile quit (Quit: Default Quit Message)
00:56:13FromDiscord<VVX7> is there something like nimpretty that will identify import issues
00:58:08FromDiscord<ElegantBeef> Ah mybad asdf
00:58:10FromDiscord<ElegantBeef> (edit) "mybad" => "my bad"
00:58:25Clonkk[m]You can forward declare your type/proc to remove circular import
01:09:05*krux02 quit (Remote host closed the connection)
01:15:30*def-- joined #nim
01:16:01*wasted_youth quit (Remote host closed the connection)
01:16:02*def- quit (Write error: Broken pipe)
01:16:04*def-- is now known as def-
01:22:01*wasted_youth joined #nim
01:41:12*abm quit (Quit: Leaving)
01:44:57*Guest62103 quit (Quit: Guest62103)
01:45:30*Guest62103 joined #nim
01:52:32*fputs joined #nim
01:54:58*evbo quit (Ping timeout: 260 seconds)
02:21:20*kinkinkijkin_ joined #nim
02:21:41*kinkinkijkin quit (Ping timeout: 256 seconds)
02:21:45*kinkinkijkin_ is now known as kinkinkijkin
02:26:11*Tanger quit (Read error: Connection reset by peer)
02:28:11*asdflkj quit (Ping timeout: 246 seconds)
02:33:18*Tanger joined #nim
02:43:58*NimBot joined #nim
02:56:34*disruptek is now known as keisterfish
03:04:57*muffindrake quit (Ping timeout: 260 seconds)
03:06:45*muffindrake joined #nim
03:45:18*Guest62103 quit (Quit: Guest62103)
03:45:33*Guest62103 joined #nim
04:03:17*muffindrake quit (Ping timeout: 260 seconds)
04:04:58*muffindrake joined #nim
04:06:21*spiderstew joined #nim
04:06:53*spiderstew_ quit (Ping timeout: 246 seconds)
04:45:22*Guest62103 quit (Quit: Guest62103)
04:45:38*Guest62103 joined #nim
05:06:16*rockcavera quit (Remote host closed the connection)
05:14:48*letto quit (Quit: Konversation terminated!)
05:15:29*wasted_youth quit (Read error: Connection reset by peer)
05:16:53*letto joined #nim
05:45:27*Guest62103 quit (Quit: Guest62103)
05:45:41*Guest62103 joined #nim
05:47:17saemd'oh... looks like github is having issues?
05:47:41saemouch, yup... https://www.githubstatus.com/
06:28:19FromDiscord<miscdev> is there anyway to convert a string to bytes?
06:31:45FromDiscord<ElegantBeef> The simplest (unsafe if you use any ffi with it) is to do `cast[seq[byte](yourString)` or if you want a non duplicating view into the string https://nim-lang.org/docs/system.html#toOpenArrayByte%2Cstring%2Cint%2Cint
06:32:20FromDiscord<miscdev> thanks
06:33:22FromDiscord<ElegantBeef> Use case of the view https://play.nim-lang.org/#ix=2Nxb
06:34:03FromDiscord<ElegantBeef> Without `{.experimental: "views".}` it cannot be stored into a variable
06:36:02saemhmm, anyway to retrigger CI in the compiler without futzing with commits? Guess might need someone with more access?
06:36:54*waleee-cl quit (Quit: Connection closed for inactivity)
06:38:13FromDiscord<flywind> I think author should be able to restart CI
06:38:32FromDiscord<flywind> It depends https://nim-lang.github.io/Nim/contributing.html#the-git-stuff-debugging-ci-failures-flaky-tests-etc
06:38:47saemok, I gotta poke around maybe I'm just being silly and not seeing how.
06:45:27*Guest62103 quit (Quit: Guest62103)
06:45:50*Guest62103 joined #nim
06:47:32*Tlangir joined #nim
06:49:12*euantorano_ joined #nim
06:49:29*euantorano quit (Ping timeout: 256 seconds)
06:49:30*euantorano_ is now known as euantorano
06:50:05*Tanger quit (Read error: Connection reset by peer)
06:59:53*muffindrake quit (Ping timeout: 272 seconds)
07:00:54*krux02 joined #nim
07:12:15*narimiran joined #nim
07:18:57saemYay, it dun passed
07:41:15*grobe0ba quit (Ping timeout: 260 seconds)
07:45:40*Guest62103 quit (Quit: Guest62103)
07:59:27*PMunch joined #nim
08:30:41*muffindrake joined #nim
08:34:34FromDiscord<mratsim> casting string to byte is OK even with FFI actually, the extra \0 at the end is not a problem because FFI on raw bytes should always use ptr + len
08:34:51FromDiscord<mratsim> it's byte to string that has FFI issue because seq[byte] doesn't terminate with \0
08:42:38*Tlangir quit (Remote host closed the connection)
08:46:04*Guest62103 joined #nim
08:46:45*vicfred_ joined #nim
08:49:01*vicfred quit (Ping timeout: 244 seconds)
08:52:34*zidsal joined #nim
08:53:13zidsalI've started writing my first unit test using unittest and check. Looking at the docs there doesn't seem to be a way to add a custom message to a check statement is there a way around this?
09:12:34*Vladar joined #nim
09:32:13*Tanger joined #nim
09:38:55FromGitter<Araq> you can start a new 'suite' for that iirc
09:39:16FromGitter<Araq> saem: yesterday we figured out why macros don't work well
09:41:12FromGitter<Araq> https://github.com/nim-lang/Nim/pull/16840/files#diff-43e428ef9f574e1c6c74da514b5f337286e4402916c094bac1c8e21ed6aca36b
09:41:13disbotbasic stability improvements; refs nimsuggest
09:45:49*Guest62103 quit (Quit: Guest62103)
09:46:06*Guest62103 joined #nim
09:46:14*natrys joined #nim
10:19:56*grobe0ba joined #nim
10:38:36PMunchAnyone else tend to come up with a perfect short and descriptive variable name only to realise it's not in english and would make your code look super wonky?
10:40:37*oddp joined #nim
10:52:47PMunch"Error: 'myProc' can have side effects", all well and good, but which side effects?!
10:53:49Zevvit might demons flying out of your nose
10:54:04Zevv+cause
10:55:20PMunchOooh, don't want that!
10:55:50Zevvfix your func then
10:55:55Zevvyou should call it myFunc
10:55:55Zevvthat helps
10:56:22*abm joined #nim
10:58:02FromDiscord<Recruit_main707> just found about this lol↵https://sfconservancy.org/news/2020/jun/23/gitbranchname/
11:01:14*zidsal quit (Ping timeout: 264 seconds)
11:08:31*zidsal joined #nim
11:11:20FromDiscord<lqdev> mm yes vocal minorities
11:18:19PMunchIs there an easy way to turn something like 16:35 into the next Unix timestamp at which that will occur?
11:27:48FromDiscord<Rika> Get today, if time has passed then increment one, set the time to that, convert to unix time stamp
11:27:58FromDiscord<Rika> Increment one to days, I mean
11:30:56PMunchThat works great
11:31:05PMunchBut `hour=` is deprecated..
11:31:59FromDiscord<Rika> It is?
11:34:27FromDiscord<dom96> @Recruit_main707 if people want to do it and it helps even just one person feel more included then it's worth doing.
11:34:59FromDiscord<lqdev> inclusivity isn't bad but thinking "master" is offensive is absurd
11:35:36FromDiscord<dom96> I disagree, but please take this discussion into #offtopic
11:36:10FromDiscord<Rika> Why would it be deprecated
11:36:54FromDiscord<Rika> https://github.com/nim-lang/Nim/commit/48e7775ad14bc33f5b60225157fb0725d0384675
11:37:16FromDiscord<Rika> Why would someone deprecate setting the fields? That’s odd
11:37:30PMunchI have no idea why it's deprecated..
11:38:04PMunchMaybe the procedures are removed but the fields are exposed
11:38:29PMunchBut Nim prefers to call the hour= procedure over `=` on the hour field and that triggers the deprecation warning?
11:39:26*sagax joined #nim
11:41:09FromDiscord<Rika> No the commit directly says making the fields private
11:41:35FromDiscord<Rika> The fields are private now, and set procs are added which were deprecated from the start
11:45:55*Guest62103 quit (Quit: Guest62103)
11:46:14*Guest62103 joined #nim
11:48:31PMunchThat is a very odd thing to do..
11:48:37PMunchWho made that commit?
11:48:52FromDiscord<Rika> I sent the link to it
11:51:15PMunchHmm, can't really see why they are deprecated though..
11:55:29FromDiscord<InventorMatt> is it supposed to be a feature or a bug that you can't use underscores to discard values outside of a var statement an example is here https://play.nim-lang.org/#ix=2Nyd
11:56:41FromDiscord<mratsim> All features start as unimplemented
11:56:56FromDiscord<mratsim> -- The law of programming
11:57:34FromDiscord<InventorMatt> fair enough. I'm just not sure if I should report it as an issue or not
11:58:03*krux02 quit (Remote host closed the connection)
12:08:47FromDiscord<mratsim> report as "feature", and that would avoid people asking themselves the same question one yar from now.
12:11:31FromDiscord<konsumlamm> i feel like my PR to add tests for sugar (https://github.com/nim-lang/Nim/pull/16820) was forgotten
12:11:32disbotSugar tests
12:11:49FromDiscord<konsumlamm> to add more tests
12:15:34*Vladar quit (Quit: Leaving)
12:45:41FromGitter<Araq> > if people want to do it and it helps even just one person feel more included then it's worth doing. ⏎ ⏎ It makes me feel excluded as I have no sympathy for insanity...
12:45:58*Guest62103 quit (Quit: Guest62103)
12:46:05FromGitter<Araq> you never get this "just one person more included", you can never please everybody
12:46:31*Guest62103 joined #nim
12:49:28PMunchPersonally I'm a sub and take grave offence than the word master is being vilified and scrubbed from everywhere. It used to be I could go to GitHub for a light arousal, but more and more that's not the case :(
12:49:39*Tanger quit (Remote host closed the connection)
12:51:01FromDiscord<mratsim> lmao
12:51:08FromDiscord<mratsim> but offtopic please
12:52:16*waleee-cl joined #nim
12:58:02FromDiscord<lqdev> vilify, don't even try
13:11:42*wasted_youth joined #nim
13:12:47FromDiscord<Clyybber> leorize: Fixed your issue with the first write optimization in #16849
13:12:48disbothttps://github.com/nim-lang/Nim/pull/16849 -- 3ARC Analysis in one pass
13:14:38*root joined #nim
13:15:02*root is now known as Guest41757
13:28:04*ryanhowe joined #nim
13:28:58*abm quit (Quit: Leaving)
13:43:46*vicfred__ joined #nim
13:43:57*spiderstew quit (Ping timeout: 272 seconds)
13:45:45*grobe0ba_ joined #nim
13:45:55*vicfred_ quit (Read error: Connection reset by peer)
13:45:55*grobe0ba quit (Ping timeout: 256 seconds)
13:45:55*oddp quit (Remote host closed the connection)
13:46:02*rockcavera joined #nim
13:46:05*PMunch quit (Ping timeout: 256 seconds)
13:46:14*grobe0ba_ is now known as grobe0ba
13:46:15*Guest62103 quit (Quit: Guest62103)
13:46:30*PMunch joined #nim
13:46:32*Guest62103 joined #nim
13:46:58PMunchHmm, is there an issue with the times module and 32-bit systems?
13:47:28PMunchhttp://ix.io/2NyN
13:48:03PMunchIs there a way to make Nim default `int` to `int64`?
13:48:10PMunchPerformance isn't terribly important here
13:48:17FromDiscord<Rika> i think it is in devel
13:48:56PMunchYou think what is in devel?
13:49:51FromDiscord<Rika> int is int64 always
13:49:58PMunchOh really?
13:49:58FromDiscord<Rika> idk, i only heard
13:50:54*oddp joined #nim
13:51:23PMunchThe worst part is that the code seems to take 32-bit into account: https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/times.nim#L1244
13:51:56FromGitter<gogolxdong> What to do when a node sent all content but its peer got EOF while reading and appending to a file? Resend all content , or something else.
13:52:46narimiran@Rika that's for floats
13:53:34FromGitter<gogolxdong> How to get the rest in the stream?
13:53:38FromDiscord<Rika> i heard someone say it was also done for ints recently, i mean
13:53:44FromDiscord<Rika> i know floats are always 64
13:53:53FromDiscord<Rika> thats been like that for a long time
13:57:50FromDiscord<CodeHz> sent a code paste, see https://play.nim-lang.org/#ix=2NyQ
14:00:03FromDiscord<CodeHz> the [issue](https://github.com/nim-lang/Nim/issues/16847) has updated since I found the minimal PoC
14:00:15disbotARC/nimSeqsV2 breaks seq at compile-time (macro) ; snippet at 12https://play.nim-lang.org/#ix=2NyS
14:00:23FromGitter<gogolxdong> It's certain that peer will get read EOF as long as the file is big enough, but write finishes writing faster, and haven't got EOF by far.
14:01:34*fputs quit (Quit: Leaving)
14:05:45*vicfred__ quit (Quit: Leaving)
14:06:40*rockcavera quit (Remote host closed the connection)
14:09:48FromDiscord<CodeHz> (edit) the [issue](https://github.com/nim-lang/Nim/issues/16847) has updated since I found the minimal PoC
14:09:51disbotARC/nimSeqsV2 breaks seq at compile-time (macro) ; snippet at 12https://play.nim-lang.org/#ix=2NyS
14:10:10FromDiscord<arnetheduck> sent a code paste, see https://play.nim-lang.org/#ix=2NyX
14:14:41FromDiscord<lqdev> !eval echo [0, 1, 2, 3][0.5 .. 1.6]
14:14:43NimBot@[0, 1]
14:14:48FromDiscord<lqdev> lol
14:18:04PMunchWait what :P
14:23:15FromDiscord<haxscramper> !eval echo typeof(0.5 .. 1.6)
14:23:17NimBotCompile failed: /playground/nim/lib/system/iterators_1.nim(85, 12) Error: type mismatch: got <float64>
14:24:21*zidsal quit (Quit: Connection closed)
14:25:57*abm joined #nim
14:27:12FromDiscord<Rika> LOL what
14:27:17FromDiscord<Rika> that sounds super broken
14:32:16FromDiscord<flywind> !eval let x = "123456"; echo x[0.1 .. 1.6]
14:32:19NimBot12
14:38:27FromDiscord<lqdev> !eval import math; echo "abc"[Pi]
14:38:29NimBotCompile failed: /usercode/in.nim(1, 24) Error: type mismatch: got <string, float64>
14:38:42FromDiscord<lqdev> sounds like a bug
14:47:15*Vladar joined #nim
15:10:24*PMunch quit (Quit: leaving)
15:15:54FromDiscord<exelotl> that's wild lol
15:17:39FromDiscord<flywind> I think Nim doesn't have generics constraints at that time maybe.
15:18:21FromDiscord<flywind> The root cause is `proc `[]`[T, U](s: string, x: HSlice[T, U]): string {.inline.}` and `(when i is BackwardsIndex: s.len - int(i) else: int(i))`
15:21:40FromDiscord<Rika> lol
15:28:27FromDiscord<mratsim> it did
15:28:57FromDiscord<mratsim> `[T, U: SomeInteger]` was already possible at the time
15:29:11FromDiscord<mratsim> BackwardsIndex broke a lot of things at the time
15:29:18FromDiscord<mratsim> it broke Arraymancer
15:29:58FromDiscord<mratsim> well technically it broke the workaround I had for the previous situation where ^foo was magic
15:31:35FromDiscord<flywind> I made a PR to see whether it breaks something https://github.com/nim-lang/Nim/pull/16853/files
15:31:36disbotsee whether it breaks
15:32:06FromDiscord<konsumlamm> i want stable concepts ;-;
15:32:49FromDiscord<mratsim> I want stable generics :p
15:33:06FromDiscord<konsumlamm> @haxscramper btw, i commented on the pattern matching RFC
15:33:18FromDiscord<konsumlamm> i want stable Nim
15:33:32FromDiscord<mratsim> I want stable C
15:33:36FromDiscord<konsumlamm> i don't
15:33:37FromDiscord<haxscramper> @konsumlammi don't have time for proper response/in-depth analysis for your response yes, but your suggestions have been noted. `Some(<pattern>)` will be added
15:33:43FromDiscord<haxscramper> At least
15:34:44FromDiscord<konsumlamm> i assume "yes" is supposed to be "yet"?
15:35:04FromDiscord<haxscramper> yes
15:35:25FromDiscord<haxscramper> But I don't quite understand what you meant by inconsistency in matching of sequences vs objects
15:36:23FromDiscord<haxscramper> Object is constructed using `(fld: val)` and matched using `(fld: @patt)`. Sequence/array is constructed using `[val]` and matched using `[@pattern]`
15:38:49FromDiscord<haxscramper> there are some shortcuts for this though, mainly to allow for things like
15:39:09FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2Nzi
15:39:19FromDiscord<haxscramper> E.g `ProcDef[` vs `ProcDef([`
15:39:25FromDiscord<konsumlamm> `@pat` is no arbitrary pattern though
15:40:09*Guest62103 quit (Quit: Guest62103)
15:40:26*Guest62103 joined #nim
15:40:39FromDiscord<haxscramper> Oh, you mean it is necessary to use `(field: is Supattern())` for nested matches, but for sequences it is just `[Subpatter()]`? If not can you elaborate please
15:40:49FromDiscord<konsumlamm> ye, exactly
15:43:23FromDiscord<konsumlamm> i would expect the syntax to be just `(field: <pattern>)`, where `<pattern>` is an arbitrary pattern (a capture `@a`, or a sequence pattern, or a nested pattern)
15:45:50saemAraq: nice! My next thing was basically a decent starting from the top of the sem pass and basically either document or making minor tweaks to the code to clarify various pre/post conditions until I could just find whatever the issue is. Still likely worth it, but practical gains are still awesome.
15:45:52FromDiscord<haxscramper> Yes, this can be addressed, though `(field: @a)` already works - see `multitest "Variable binding"`
15:46:43FromDiscord<haxscramper> But AFAIC there is no reason not to allow `(field: Pattern())`
15:47:49FromDiscord<konsumlamm> hmm, the point of `is` is to capture a nested pattern by name, right? if so, that's exactly what the as-patterns i mentioned in my comment are
15:50:26FromDiscord<haxscramper> yes. You can also use `of` for pattern-match ref objects
15:51:48FromDiscord<konsumlamm> ye, i saw that
15:52:23FromDiscord<konsumlamm> though it looks kinda weird if you write `of of ...:`
15:54:13FromDiscord<konsumlamm> what's the reason for not using the normal object patterns for ref objects?
15:57:19FromDiscord<haxscramper> implementation details
15:58:11FromDiscord<haxscramper> 1. pattern matching does not have access to typed AST and instead operates on `untyped`↵2. `ref` + `variant` objects are possible
15:59:03FromDiscord<haxscramper> And because of `2.` and the fact OOP is rarely used I decided to edge-case it. And `of` operator behaves identically in regular code so
15:59:16FromDiscord<konsumlamm> but don't object/variant patterns just translate to field accesses?
15:59:40FromDiscord<konsumlamm> so shouldn't they also work with ref object? or do they already?
16:00:27FromDiscord<haxscramper> You need to do casting for ref objects to allow matching on fields
16:00:30*keisterfish is now known as disruptek
16:01:03FromDiscord<haxscramper> Otherwise, you just have supertype which of course has no fields that could be matched on
16:02:44FromDiscord<haxscramper> Variant match is translated to `hasKind(obj, Kind)`, and field access is translated to `obj of Derived() and obj.Derived().filed == ...`
16:04:13FromDiscord<haxscramper> sorry, not field access
16:04:42FromDiscord<haxscramper> derived object match is translated to `obj of Derived()`
16:05:01*MyMind quit (Read error: Connection reset by peer)
16:05:13FromDiscord<konsumlamm> is there a situtation where you can put something in thoseparentheses?
16:06:15FromDiscord<haxscramper> For `Derived()`?
16:06:32FromDiscord<haxscramper> (edit) "`Derived()`?" => "`of Derived()`?"
16:09:57FromDiscord<konsumlamm> ye
16:10:14FromDiscord<haxscramper> `multitest "Ref object field matching"`
16:12:37FromDiscord<Clyybber> @flywind you can do U, V: Ordinal btw
16:16:39FromDiscord<Rika> TIL orc doesnt like me repr'ing asynchttpserver.Request
16:17:03*MatN joined #nim
16:18:12FromDiscord<Rika> oh god no...
16:18:12FromDiscord<Cloufish> sent a code paste, see https://play.nim-lang.org/#ix=2Nzw
16:18:20FromDiscord<Cloufish> (edit) "sent a code paste, see https://play.nim-lang.org/#ix=2Nzw" => "can someone tell me how faster is nimscript compared to bash?"
16:18:29FromDiscord<Cloufish> haha, so is it bad question?
16:18:30FromDiscord<mratsim> faster to develop, slower to crash
16:18:32MatNhello everyone
16:18:49FromDiscord<mratsim> printing speed depends on your terminal, you might want to make it GPU accelerated 😉
16:19:05FromDiscord<Cloufish> okay pls I don't get those jokes
16:19:06FromDiscord<Cloufish> xD
16:19:29FromDiscord<mratsim> If you care about speed, don't use bash or nimscript, use a compiled language.
16:19:47FromDiscord<mratsim> scripts are to optimize prototyping or deployment.
16:20:48FromDiscord<Rika> hello MatN
16:20:52FromDiscord<Cloufish> Okay... so to tell it simpler - use nimscript if you want to change and create directories, but when doing the actual stuff use nim yes?
16:21:00*Guest62103 quit (Quit: Guest62103)
16:21:08FromDiscord<mratsim> no, it uses the OS/kernel API
16:21:12FromDiscord<mratsim> just like bash
16:21:48FromDiscord<mratsim> and since you're doing IO and IO is the slowest thing you can do on a computer, it doesn't matter whether you use bash or nimscript only what OS and filesystem you have.
16:22:31FromDiscord<Cloufish> okay so if I wanted to execute a unix command, is it safe to use nim?
16:23:01FromDiscord<Cloufish> these questions are probably neglecting each other, but please answer xd
16:23:26FromDiscord<Rika> it is but its not gonna be much faster than normal
16:24:26FromDiscord<Cloufish> I wanted to switch from bash to nim because of multithreading
16:25:08FromDiscord<konsumlamm> if all you're going to do is call unix utilities, that won't make a difference
16:25:09FromDiscord<Cloufish> but I guess if that's still be operating in the Linux system, then switching isn't gonna help, yes? :/
16:25:14FromDiscord<Cloufish> yee
16:25:21FromDiscord<mratsim> multithreading won't help for IO
16:25:32FromDiscord<mratsim> and you can start multiple process in bash
16:25:38FromDiscord<Rika> `parallel` i think
16:25:44FromDiscord<mratsim> for reference: https://media.discordapp.net/attachments/371759389889003532/804386738700681226/8LIwV4C.png
16:26:01FromDiscord<Rika> nice pic
16:26:24FromDiscord<mratsim> you want to do roational disk IO, scale 1-12 month (1-12ms)
16:26:39FromDiscord<Rika> ah yes, we all relate to how long it takes for bill gates to earn two thousand dollars
16:27:13FromDiscord<mratsim> bash is at watching a movie, and Nim at Bill gates 😉
16:27:26FromDiscord<mratsim> but that's nothing compared to disk operations
16:27:32MatNI'm puzzled. How do I define an array type of a prior defined integer type?
16:27:43FromDiscord<mratsim> another one: https://media.discordapp.net/attachments/371759389889003532/804387238774439956/BYcR292IEAEVz0G.png
16:27:45FromDiscord<Rika> array[N, thetype]
16:27:45FromDiscord<Rika> ?
16:27:51FromDiscord<Rika> whats the issue?
16:28:04FromDiscord<Rika> > 5m for reboot
16:28:08FromDiscord<Rika> man thats an old document
16:28:41MatNRika: Type mismatch. The compiler expected HSlice[system.int, system.int]
16:28:54FromDiscord<Rika> what are you putting in the N argument?
16:29:41MatNtype tRimCell = int64
16:29:54FromDiscord<Rika> i mean in the N argument, not thetype
16:30:06FromDiscord<Rika> array[aNumber, yourType]
16:30:13narimiranmy bet: not known at compile time
16:30:29FromDiscord<Rika> i believe it would be a different error if that was so
16:30:33FromDiscord<Rika> wouldnt it?
16:30:39MatN0..cRimMaxMemCode where crimMaxMemCode is a constant
16:31:27narimiran0 is an int, your constant isn't?
16:31:42MatNem, no
16:31:58narimiranem, int vs int64
16:32:05FromDiscord<konsumlamm> it would be easier if you just showed us the relevant code
16:32:56MatNconst
16:32:56MatN cRimMaxMemCode = 0xFFFF # limit for static allocated code segment
16:33:31MatNlater.. type tRimMemCode = array [0..cRimMaxMemCode, tRimCell]
16:33:51narimiranremove a space between array and [
16:34:14MatNthat was it! Thanks
16:35:00MatNmay I notice that the error message was not really helpful?
16:35:07narimiranyou may
16:37:04*r4vi quit (Ping timeout: 240 seconds)
16:37:24FromDiscord<Rika> it really is
16:37:42*r4vi joined #nim
16:40:10MatNby the way, I found the micro editor very useful for programming in Nim.
16:41:19FromDiscord<Rika> micro?
16:41:24FromDiscord<Rika> is it similar to nano...
16:41:47FromDiscord<lqdev> it's better than nano
16:43:15FromDiscord<Rika> whats the diff
16:43:22Guest41757it uses CUA bindings like Control C to copy, Control S to save, etc
16:44:00FromDiscord<lqdev> @Rika mainly that it doesn't use emacs keybindings, so it's easier to wrap your head around it
16:45:56FromDiscord<Rika> oh wow that was the main gripe i had with nano lmao
16:46:01*evbo joined #nim
16:46:17Guest41757IMO emacs keybindings aren’t inherently harder (eg. C-s to search makes as much sense as C-f to find), but of course they’re not what most people are used to
16:46:17FromDiscord<Rika> though im not too fussed about it now that im fairly proficient with vi
16:47:14FromDiscord<konsumlamm> is it possible that i'm dumb and this already works? i tried it with nested objects and it seems to work
16:47:26FromDiscord<arun> Several bug fixes last couple of days. Wrote an indentation level transformer to spit out correctly indented code, instead of relying on code formatters (clang-format and friends) for nim.↵↵Still looking for collaborators and feedback on which language features to prioritize to make this more useful for nim people. It's very early in the game.
16:48:25FromDiscord<arun> https://github.com/adsharma/py2many/blob/main/common/nesting_transformer.py
16:49:21Guest41757arun: not using py2nim, what heresy‽! (jk :))
16:49:33FromDiscord<Rika> wow using an interrobang
16:49:35FromDiscord<Rika> fancy
16:50:06FromDiscord<arun> Not following my religion eh? 🙂
16:51:01FromDiscord<arun> I called it py2many now that it supports cpp, rust, julia, kotlin and nim
16:51:07FromDiscord<Rika> reminder that replies dont show on irc
16:51:39Guest41757👁 ♥ × Ⅺ ☺
16:52:48FromDiscord<arun> Automated tests cover these cases:↵↵https://github.com/adsharma/py2many/tree/main/tests/expected
16:53:32FromDiscord<arun> I'm guessing the nim path is the most direct/easiest for statically typed py3 to native code, given the similarities in language design.
16:55:58*Guest41757 is now known as asdflkj
17:05:10FromDiscord<zetashift> Transpiling Python to Nim... which gets you Python transpiled to JS or C or C++ based on the chosen backend. Beautiful yet horrifying at the same time.
17:05:12*muffindrake quit (Quit: muffindrake)
17:07:02*ryanhowe quit (Ping timeout: 256 seconds)
17:07:02*sacredfr- joined #nim
17:07:03*MatN quit (Read error: Connection reset by peer)
17:07:39*Mat7 joined #nim
17:07:50*Vladar quit (Ping timeout: 256 seconds)
17:07:50*abm quit (Ping timeout: 256 seconds)
17:08:14*Vladar joined #nim
17:08:28*abm joined #nim
17:09:33FromDiscord<shadow.> oh lord
17:17:41Mat7Riko: Micro also features syntax checking at save time so error messages will be indicated without invoking the Nim compiler
17:18:02Mat7(directly)
17:19:50Mat7ciao
17:19:55*Mat7 quit (Quit: Leaving)
17:41:54*krux02 joined #nim
17:44:22*Jesin quit (Quit: Leaving)
17:50:50*Jesin joined #nim
18:05:29FromDiscord<Deorder> What is the current status of concepts in Nim? I remember 4 years ago that it worked, but it was a bit slow.
18:05:48FromDiscord<Deorder> My old code still works
18:06:07FromDiscord<Deorder> (edit) "it" => "compilation"
18:18:44FromDiscord<konsumlamm> there is an RFC for a concepts redesign: https://github.com/nim-lang/RFCs/issues/168
18:18:47disbotConcepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8
18:19:30FromDiscord<konsumlamm> also a WIP PR: https://github.com/nim-lang/Nim/pull/15251
18:19:30disbotnew-style concepts implementation, WIP
18:19:57FromDiscord<konsumlamm> but afaik, concepts aren't really used much (at least not in the stdlib)
18:21:05FromDiscord<Deorder> Thanks. I used them like 4 years ago. It still works out of the box, but I am looking for ways to improve it according to improvements in Nim
18:21:06FromDiscord<Deorder> https://gist.github.com/komerdoor/742936aba931750724055f86b424ca69
18:21:08PrestigeI'm eagerly awaiting the rework
18:22:26FromDiscord<Deorder> I also hope to see an official "itertools" like this:↵https://gist.github.com/komerdoor/70d9c25820952624cf797890a18f9cd5↵↵Just found an project that seems to be really well implemented.
18:22:37FromDiscord<Deorder> (edit) "an" => "a"
18:22:50FromDiscord<Deorder> For lazy processing etc.
18:23:21FromDiscord<Deorder> This project: https://github.com/narimiran/itertools
18:23:38FromDiscord<konsumlamm> there is zero-functional, which does pretty much what you want
18:23:41FromDiscord<Deorder> Reading it now. Sounds good
18:24:29FromDiscord<Deorder> Thanks. That one also looks really good
18:24:44FromDiscord<konsumlamm> note that the combinators from `itertools` (such as `takeWhile`) operate on `openArray`s, not on iterators
18:25:33*waleee-cl quit (Quit: Connection closed for inactivity)
18:26:17FromDiscord<konsumlamm> there are `iterutils` and `lazy` though, which don't use macros, but they don't seem to be maintained anymore either
18:26:19FromDiscord<Deorder> sent a code paste, see https://play.nim-lang.org/#ix=2NA2
18:26:50FromDiscord<konsumlamm> why don't you just use the built-in for loop?
18:27:21FromDiscord<Deorder> I have no idea why I did it like that 5 years ago
18:27:33FromDiscord<Deorder> Can I chain them as functions?
18:27:41FromDiscord<konsumlamm> also, that's filter, not take_hile
18:27:52FromDiscord<konsumlamm> how is that relevant here?
18:28:37FromDiscord<Deorder> No that is not filter as it stops when a specified test is false
18:29:14FromDiscord<konsumlamm> oh, right, it returns, nvm
18:29:19FromDiscord<Deorder> 😉
18:29:34FromDiscord<konsumlamm> you could have just used `while f(x): yield x`, that would be more clear
18:29:44FromDiscord<konsumlamm> no
18:29:55FromDiscord<konsumlamm> hmm, there is no `.next`, is there?
18:30:16FromDiscord<Deorder> I have no idea. I just returned back to Nim again and trying to get up to speed again 😄
18:31:06FromDiscord<Deorder> You can see here at the bottom how I used it back then:↵<https://gist.github.com/komerdoor/70d9c25820952624cf797890a18f9cd5>
18:32:10FromDiscord<Deorder> Nice thing with Nim is that you get both point free and chaining support out of the box
18:32:30FromDiscord<konsumlamm> i know what you mean, but that has nothing to do with using the builtin for loop vs your foreach thing
18:32:56ForumUpdaterBotNew post on r/nim by iSuperAwesome: host is a simple, static web server for LAN, useable by the command line, and written in Nim., see https://github.com/RainbowAsteroids/host
18:33:37FromDiscord<Deorder> I remember I did that because of a limitation with iterators back then. May be this limitation is not there anymore
18:33:50FromDiscord<konsumlamm> hmm, maybe
18:34:34FromDiscord<Deorder> btw thanks for the link to the new concept documents. Looks good.
18:36:00FromDiscord<konsumlamm> it's not implemented yet though, afaik
18:37:18disruptekit's implemented, it just doesn't work. at all.
18:50:02FromDiscord<haxscramper> @konsumlamm it is only mentioned in old merged PR, but there is an article if you are interested - https://github.com/nim-lang/website/pull/252/files?short_path=f1ac026#diff-f1ac026200e564bfc779ae73d3dd0a6454002eff235a3a033ebba052b6f6e4ed
18:50:03disbotAdd pattern matching article
18:50:52FromDiscord<haxscramper> Not published yet, but I'm planning on finally getting to it sometime in the future, but feel free to comment/review it
18:53:05FromDiscord<konsumlamm> i also added some comments on your PR
18:53:14FromDiscord<haxscramper> yes, I saw those
18:53:18*smitop joined #nim
18:53:19FromDiscord<konsumlamm> but looks like i need to adjust my comment on the RFC a bit xd
18:58:32FromDiscord<konsumlamm> @haxscramper what is the difference between `(field: <pattern>)` and `(field: is <pattern>)` then?
19:00:01FromDiscord<haxscramper> There must be no differences, if any found this is a bug
19:00:16FromDiscord<haxscramper> i guess
19:00:57FromDiscord<konsumlamm> then why is the second version in there? this a special case, right, not the standard is operator
19:01:06FromDiscord<haxscramper> sorry, I just can't recall exact implementation right now, but when I will come to fixing it (on the weekends hopefully) I will address it
19:01:44FromDiscord<haxscramper> and then make sure difference is clear (if any), or they are equivalent
19:02:16FromDiscord<ag> Hello everyone, I'm curious about WebAssembly support in Nim. Is it possible to compile Nim to wasm? Is the stdlib and ARC available? Any tutorials/documentation?
19:04:58FromDiscord<haxscramper> Yes you can compile to wasm, there is not a lot of tutorials, but I player around with it at some point - https://gist.github.com/haxscramper/0aef37a22c17cdf830fbe85f87de6188
19:05:29FromDiscord<haxscramper> most of the stdlib should be available, and I suppose ARC is the recommended GC for wasm
19:05:55FromDiscord<haxscramper> But don't quote me on ARC recommendations, this is just a guess
19:06:04FromDiscord<konsumlamm> is there an easy way to see what a macro expands to?
19:06:15FromDiscord<haxscramper> `import std./macros` and `expandMacros`
19:07:50FromDiscord<ag> thanks!
19:15:09*kwilczynski joined #nim
19:16:17FromDiscord<VVX7> Is there a post somewhere on Nim code smells and anti-patterns?
19:16:33disruptek~disrupstyle
19:16:34disbotdisrupstyle: 11tips for writing code that won't provoke 😠 rants 🤬 on irc: https://gist.github.com/disruptek/6d0cd6774d05adaa894db4deb646fc1d -- disruptek
19:17:09FromDiscord<VVX7> oh nice! thanks 🙂
19:18:49FromDiscord<Daniel> what is the integer for infinite?
19:18:56FromDiscord<ElegantBeef> There isnt one
19:18:59disrupteki'm still working on it.
19:19:13FromDiscord<Daniel> There should be.
19:19:15FromDiscord<ElegantBeef> 2^64 is the largest number an int can represent
19:19:22FromDiscord<Rika> -1
19:19:34FromDiscord<Rika> dont forget -1
19:19:55FromDiscord<ElegantBeef> Sure if you like having 2^63 as your largest number 😄
19:20:01FromDiscord<Rika> what?
19:20:23FromDiscord<Rika> i mean 2^64 - 1
19:21:21FromDiscord<ElegantBeef> Uhh
19:21:27FromDiscord<konsumlamm> @haxscramper i guess it's a bug that i can access all kinds of internal variables (for example `aWasSet`)
19:21:31FromDiscord<konsumlamm> (edit) "`aWasSet`)" => "`aWasSet`)?"
19:21:36FromDiscord<ElegantBeef> (2^63) - 1 is the high for a signed int
19:21:47FromDiscord<Rika> well you put 64, i just copied that
19:21:55FromDiscord<Rika> still works for unsigned
19:21:56FromDiscord<ElegantBeef> 2^64 is high for a unsigned
19:22:09FromDiscord<ElegantBeef> well - 1 but meh
19:22:13FromDiscord<Rika> lol
19:22:18FromDiscord<Rika> nice try there lol
19:22:24FromDiscord<ElegantBeef> huh
19:22:38FromDiscord<ElegantBeef> Ah i see now
19:22:49FromDiscord<ElegantBeef> I thought you were implying using `-1` for inf
19:23:06FromDiscord<Rika> bruh
19:24:31FromDiscord<haxscramper> I don't see any issues with that and it would require additional bookkeeping mechanism to manage gensymed symbols
19:24:34*spiderstew joined #nim
19:24:41FromDiscord<ElegantBeef> Clearly rika my reading comprehension isnt great
19:25:37FromDiscord<haxscramper> So unless there is any problems with that one I will leave it as it is now
19:26:06FromDiscord<konsumlamm> perhaps `aWasSet` is unlikely to cause problems, but what about `expr` and `pos`?
19:26:25FromDiscord<konsumlamm> those seem common enough names that it might cause issues
19:27:14FromDiscord<lqdev> @ElegantBeef u drunk?
19:27:16FromDiscord<lqdev> > 2^64 is high for a unsigned
19:27:38FromDiscord<ElegantBeef> Nope just dumb
19:27:41FromDiscord<lqdev> !eval echo uint64.high
19:27:44NimBot18446744073709551615
19:27:44*evbo quit (Read error: Connection reset by peer)
19:28:04FromDiscord<lqdev> that doesn't end with an even number, i wonder why 🤔 🤔 🤔
19:28:04FromDiscord<haxscramper> `pos` should be gensymed, `expr` - I thought that someone might need to acces value of the expression, but probably this is not the case usually, so I should gensym it as well
19:28:09FromDiscord<ElegantBeef> 1
19:28:19FromDiscord<ElegantBeef> all bits means it's an odd number
19:28:32FromDiscord<konsumlamm> should as in "it currently isn't, but should be"?
19:28:43FromDiscord<ElegantBeef> Although i assume you're being insincere
19:29:34*evbo joined #nim
19:29:37FromDiscord<lqdev> @ElegantBeef i was being sarcastic, it's hard to convey that through text.
19:29:43FromDiscord<lqdev> thought the three thinking emojis would help.
19:29:50FromDiscord<haxscramper> "I thought it is gensymed"
19:29:53FromDiscord<ElegantBeef> Yea i got that
19:29:59FromDiscord<ElegantBeef> But i had to prove i wasnt overly dumb
19:30:01FromDiscord<konsumlamm> ah, k
19:39:28*muffindrake joined #nim
19:46:02FromDiscord<Daniel> Besides infinity, what about other infinite numbers like e, Pi, c...do they exist in nim?
19:48:38FromDiscord<konsumlamm> infinity is not a number (in the mathematical sense) :P
19:49:09FromDiscord<konsumlamm> e and pi aren't "infinite" numebrs, they're irrational numbers and yes, they exist in nims stdlib, in the `math` module
19:49:38FromDiscord<konsumlamm> c (assuming you meen the speed of light) is not in the stdlib, since it's too special
19:51:09FromDiscord<ElegantBeef> Math also has the superior Tau 😄
19:51:45FromDiscord<ElegantBeef> Pretty much any commonly needed const should be in Nim, but it's really simple to add your own so it's not a problem
20:03:24*PMunch joined #nim
20:03:53*blackbeard420 quit (Quit: ZNC 1.8.0 - https://znc.in)
20:03:54*hpyc9 quit (Quit: 420)
20:04:47*hpyc9 joined #nim
20:05:26*blackbeard420 joined #nim
20:05:33PMunchUgh, this times module issue is really making this stuff annoying..
20:05:49PMunchhttps://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/times.nim#L1244 this line keeps giving me out of range errors..
20:07:12PrestigeThis is what you get for time traveling so much
20:07:40PMunchI mean I solved my first issue with parse("2020 " & x, "yyyy HH:mm")
20:07:50PMunchAnd just discarding the 2020 part
20:07:57PMunchBut now I'm having issues with `now()`
20:08:29PMunchhttp://ix.io/2NAv
20:08:49PMunchError: unhandled exception: value out of range: -515396082720 notin -2147483648 .. 2147483647
20:12:26PrestigeDoes it need to be translated to a string format or something?
20:12:37PMunchNah
20:12:50PMunchI have times like 19:00 and 21:00
20:13:09FromDiscord<ElegantBeef> I see alot of int64 and very little int32 in that code
20:13:10PMunchAnd I used the parse function to parse those into DateTime
20:13:12*waleee-cl joined #nim
20:13:27PMunch@Elegant, yeah except for that one line where it keeps failing..
20:13:28FromDiscord<ElegantBeef> I mean in the issue function
20:14:34PMunchYeah but on the line it fails it converts it to int
20:14:39PMunchWhich is what fails
20:15:03PMunchNot that I quite see how the value can get that low..
20:15:35FromDiscord<ElegantBeef> Well you can always echo a and b
20:15:45FromDiscord<ElegantBeef> Although i assume the issue is just an `abs` issue, but idk
20:16:21FromDiscord<ElegantBeef> I have 0 clue how the time works
20:16:28PMunchWell that procedure is intended to get the offset of the local timezone and daylight saving it seems
20:16:52PMunchAnd I have yet to heard about somewhere in the UTC-16kyears timezone..
20:17:17PMunchSo something's fishy
20:17:40FromDiscord<ElegantBeef> ~~considering the US politics, i think it's a US timezone~~
20:17:51PMunchAy-oh!
20:21:05PMunchEh, I'll fight more with this tomorrow..
20:21:06*PMunch quit (Quit: leaving)
20:22:46FromDiscord<ElegantBeef> Hey "eh" is my word 😄
20:23:48FromDiscord<lqdev> eh
20:26:11Zevv"eh" is dutch
20:26:23*Jesin quit (Quit: Leaving)
20:27:54FromDiscord<ElegantBeef> But the Canadian stereotype
20:30:43*hmmm joined #nim
20:30:59hmmmmuh bois
20:31:05hmmmwhat is the argparse of nim
20:32:04FromDiscord<ElegantBeef> !repo cligen
20:32:04disbothttps://github.com/c-blake/cligen -- 9cligen: 11Nim library to infer/generate command-line-interfaces / option / argument parsing; Docs At 15 250⭐ 17🍴 7& 1 more...
20:32:15hmmm:o
20:32:25hmmmI've found parseopt, it's any good?
20:32:52FromDiscord<ElegantBeef> Cligen is meant for making for a fully usable/documented CLI
20:33:00hmmmhmm
20:33:02hmmminteresting
20:33:12hmmmI'll look into it beefy
20:33:14hmmm<3
20:33:32FromDiscord<konsumlamm> parseopt is too low level imo
20:33:43FromDiscord<ElegantBeef> All you have to do with cligen is make a proc then add it to the dispatcher
20:33:49FromDiscord<ElegantBeef> Everything is automagically handled for you
20:33:53hmmm:O
20:34:05hmmminterestingness intensifies
20:36:24hmmmjesus this thing is like magic
20:36:34FromDiscord<ElegantBeef> Welcome to Nim
20:37:05FromDiscord<konsumlamm> there is also an `argparse` lib for nim (<https://github.com/iffy/nim-argparse>) which looks pretty neat
20:41:09hmmmwoa cligen is up in the top trending packages on nim
20:41:24FromDiscord<ElegantBeef> It's a good package
20:41:27hmmmbetter grab this hot stuff before they take it down for hotness overflow
20:41:40hmmmwhat was it nimble install cligen?
20:41:46FromDiscord<ElegantBeef> yep
20:41:50hmmm<3
20:41:55FromDiscord<lqdev> parseopt rocks tho
20:42:00FromDiscord<ElegantBeef> and `requires "cligen==version"`
20:42:03FromDiscord<ElegantBeef> Yea but it's manual labour
20:42:20FromDiscord<lqdev> a for loop and some case statements is negligible
20:42:46FromDiscord<ElegantBeef> I use nim for magic, so... sure, but that's still tedium
20:48:07FromDiscord<konsumlamm> you don't need to `nimble install` anything if you wanna use it in a project though, do you?
20:49:36hmmmO.o
20:49:44hmmmI'm confus'd
20:50:09hmmmI just nimble installed it
20:50:33FromDiscord<ElegantBeef> `nimble install cligen` fetches the package and adds it to your nimble directory
20:50:39FromDiscord<ElegantBeef> That way you can use it in any project
20:50:48hmmmgood enough for me
20:50:55FromDiscord<konsumlamm> without adding it as dependency explicitly??
20:50:58FromDiscord<ElegantBeef> the `requires` i mentioned is for your nimble file in your project, which allows you to later just `nimble install`
20:50:58FromDiscord<konsumlamm> (edit) "explicitly??" => "explicitly?"
20:51:12hmmmoh
20:51:16FromDiscord<ElegantBeef> If you dont make a nimble package you dont need dependancies
20:52:02FromDiscord<ElegantBeef> `nimble install` adds it to your import path so you can use it wherever you want without explicitly stating you're using it, though it makes it very hard to make it a portable repo
20:52:13FromDiscord<ElegantBeef> Since you'd have to manually fetch all the deps with no clue other than your compiler
20:52:36hmmmI see
20:55:49*spiderstew quit (Ping timeout: 264 seconds)
20:57:20*spiderstew joined #nim
21:00:29*a_b_m joined #nim
21:01:33saemMan I hope I finish work early, really wanna try out the change 4raq pointed me towards.
21:02:44*smitop quit (Quit: Connection closed for inactivity)
21:03:37*abm quit (Ping timeout: 256 seconds)
21:06:15*a_b_m quit (Quit: Leaving)
21:06:49FromDiscord<mratsim> @saem, while you're here, i switched to your extension
21:07:08*tane joined #nim
21:07:14saemYay!
21:07:14FromDiscord<mratsim> it suffers from the same parsing/highlighting bug as the original https://media.discordapp.net/attachments/371759389889003532/804457576200405002/unknown.png
21:07:16*narimiran quit (Ping timeout: 240 seconds)
21:07:26saemAlso yay!
21:07:52saemAt least I can poke at the grammar at some point to see if that's a simple logic bug
21:08:03FromDiscord<zetashift> I switched over too, thank you for all the hard work, luckily I have no parsing errors (yet) tho
21:08:05FromDiscord<mratsim> I've isolated some test cases here: https://github.com/pragmagic/vscode-nim/issues/164
21:08:08disbotHighlighting bugs ; snippet at 12https://play.nim-lang.org/#ix=2Nzt
21:08:15saemI suspect the textmate rules are just a bit hokey
21:08:27FromDiscord<mratsim> I think it's "shl" in array bracket [ ] that are broken
21:09:10saemzetashift thanks! It was mostly so I could learn Nim and make the tool accessible to those who wanted to improve it but typescript was an impediment.
21:11:03saemmratsim: I've not looked at text mate grammars... like ever. But I'll see if I can figure something out. Narrowing it to `shl` and bracket interaction hopefully means I don't have to understand all the things all at once.
21:11:34*abm joined #nim
21:13:06FromDiscord<mratsim> wasn't there some Nim parser in the stdlib?
21:13:40FromDiscord<mratsim> or we could load that part of the compiler via import compiler/something
21:15:51saemYeah, I was thinking about the latter case. Might need a few shenanigans to trick or to using nodejs based APIs
21:16:39saemI think it's too early to bring nodejs into fully supported status or even significant endeavors in that direction.
21:18:37saem"trick or into" ... I'm typing in the phone and being extra sloppy.
21:19:54ForumUpdaterBotNew thread by Tubbs: Inser new line at line number 64, see https://forum.nim-lang.org/t/7442
21:27:38*sirn quit (Ping timeout: 264 seconds)
21:30:14*sirn joined #nim
21:38:59*rockcavera joined #nim
21:58:23FromDiscord<arun> I'll take that as an "interesting direction". One of the things I'm hoping to do is convince the python community that things like pattern matching, GADT, sealed classes etc can't be done in a python specific way, making interop with other languages more difficult.
21:59:40FromDiscord<arun> The generated rect.nim actually compiles ok with the nim compiler now 🙂
22:04:53FromDiscord<konsumlamm> is your goal to convert them to scala?
22:05:50*hmmm quit (Quit: WeeChat 3.0)
22:08:13FromDiscord<zetashift> Yes! It was not meant to diminish your work, it's a pretty creative way to get more performance out of python.
22:09:01FromDiscord<arun> Without using JVM, yeah
22:09:26FromDiscord<konsumlamm> so scala native?
22:09:37FromDiscord<konsumlamm> also, do you know that python is adding pattern mtaching?
22:13:53FromDiscord<zetashift> Anybody know how I add a key, initiated to 1 to a `CountTable` ?
22:14:15FromDiscord<zetashift> nvm got it
22:19:55*natrys quit (Ping timeout: 246 seconds)
22:20:21*natrys joined #nim
22:22:15*natrys quit (Client Quit)
22:22:57FromDiscord<arun> https://adsharma.github.io/python-622/
22:24:11FromDiscord<konsumlamm> eh, the first sentence is already kinda wrong, it only seeks to add pattern matching
22:24:25FromDiscord<arun> Yes - things like scala native, kotlin native etc. I'm not so much a language design guy, but python has 20+ years of stdlib that fits in my cache (guessing many other people as well).
22:24:40FromDiscord<arun> https://www.python.org/dev/peps/pep-0622/#sealed-classes-as-algebraic-data-types
22:24:58FromDiscord<arun> You need to scroll down a bit to read it 🙂
22:25:32FromDiscord<konsumlamm> i mean, yeah, but dataclasses are already in python
22:25:48FromDiscord<konsumlamm> thats why i said "kinda"
22:25:57FromDiscord<arun> Ofcourse - I just added support for dataclasses in py2many yesterday. It spits out a nim object now.
22:27:36FromDiscord<konsumlamm> wanna give me the gist of what the "unconventional opinions" of Zed A Shaw and David Beazely are?
22:28:23FromDiscord<arun> https://en.wikipedia.org/wiki/Zed_Shaw#Opposition_to_Python_3
22:28:55FromDiscord<arun> David Beazlely has an active twitter account where he talks about types, his take on asyncio etc.
22:32:39FromDiscord<konsumlamm> honestly, i don't see a single point against pep 622 (which btw has been superseeded by pep 634 in the meantime)
22:33:28FromDiscord<konsumlamm> > "There is a high probability that Python 3 is such a failure it will kill Python." - Zed Shaw↵well, obviously he was wrong
22:34:56FromDiscord<arun> Thanks for the pointer! ↵↵The main argument is that match is a statement and not an expression, which makes it less useful and harder to interop with other statically compiled languages.
22:36:26FromDiscord<konsumlamm> hmm, that may be a valid concern from the pov of writing a transpiler for python, but why should the python developers care about that?
22:37:21FromDiscord<arun> python developers clearly have a different worldview, sometimes different from people using python.
22:38:30FromDiscord<konsumlamm> i've never seen anyone using a python transpiler before, tbh
22:45:07*tane quit (Quit: Leaving)
23:03:10*krux02 quit (Remote host closed the connection)
23:12:25*rockcavera quit (Read error: Connection reset by peer)
23:12:26*tiorock joined #nim
23:12:26*tiorock quit (Changing host)
23:12:26*tiorock joined #nim
23:12:26*tiorock is now known as rockcavera
23:13:21*blueberrypie quit (Quit: Ping timeout (120 seconds))
23:13:45*blueberrypie joined #nim
23:17:23FromDiscord<alehander42> @Zachary Carter @clybber @prussianboy thanks
23:18:10FromDiscord<Zachary Carter> For what?
23:19:28FromDiscord<Zachary Carter> Well regardless, you're welcome 😀
23:31:09*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
23:31:26*kitech1 joined #nim
23:37:25*sagax quit (Remote host closed the connection)
23:40:04*Vladar quit (Quit: Leaving)
23:42:03*j-james joined #nim
23:48:47*j-james quit (Quit: WeeChat 3.0)
23:50:21leorize[m]disruptek: any updates on cps return value support?
23:50:49disrupteki will work on cps when it has support from nim-lang.
23:51:27Prestigewhat about csp?
23:51:31leorize[m]have you file any bugs regarding what cps need?
23:51:35disruptekyes.
23:53:12*Gustavo6046 quit (Ping timeout: 265 seconds)
23:54:10leorize[m]this will take awhile then
23:58:34*Gustavo6046 joined #nim
23:58:47disruptekseems so.