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:36 | asdflkj | the 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:39 | FromDiscord | <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:13 | FromDiscord | <VVX7> is there something like nimpretty that will identify import issues |
00:58:08 | FromDiscord | <ElegantBeef> Ah mybad asdf |
00:58:10 | FromDiscord | <ElegantBeef> (edit) "mybad" => "my bad" |
00:58:25 | Clonkk[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:17 | saem | d'oh... looks like github is having issues? |
05:47:41 | saem | ouch, yup... https://www.githubstatus.com/ |
06:28:19 | FromDiscord | <miscdev> is there anyway to convert a string to bytes? |
06:31:45 | FromDiscord | <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:20 | FromDiscord | <miscdev> thanks |
06:33:22 | FromDiscord | <ElegantBeef> Use case of the view https://play.nim-lang.org/#ix=2Nxb |
06:34:03 | FromDiscord | <ElegantBeef> Without `{.experimental: "views".}` it cannot be stored into a variable |
06:36:02 | saem | hmm, 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:13 | FromDiscord | <flywind> I think author should be able to restart CI |
06:38:32 | FromDiscord | <flywind> It depends https://nim-lang.github.io/Nim/contributing.html#the-git-stuff-debugging-ci-failures-flaky-tests-etc |
06:38:47 | saem | ok, 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:57 | saem | Yay, 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:34 | FromDiscord | <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:51 | FromDiscord | <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:13 | zidsal | I'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:55 | FromGitter | <Araq> you can start a new 'suite' for that iirc |
09:39:16 | FromGitter | <Araq> saem: yesterday we figured out why macros don't work well |
09:41:12 | FromGitter | <Araq> https://github.com/nim-lang/Nim/pull/16840/files#diff-43e428ef9f574e1c6c74da514b5f337286e4402916c094bac1c8e21ed6aca36b |
09:41:13 | disbot | ➥ basic 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:36 | PMunch | Anyone 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:47 | PMunch | "Error: 'myProc' can have side effects", all well and good, but which side effects?! |
10:53:49 | Zevv | it might demons flying out of your nose |
10:54:04 | Zevv | +cause |
10:55:20 | PMunch | Oooh, don't want that! |
10:55:50 | Zevv | fix your func then |
10:55:55 | Zevv | you should call it myFunc |
10:55:55 | Zevv | that helps |
10:56:22 | * | abm joined #nim |
10:58:02 | FromDiscord | <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:20 | FromDiscord | <lqdev> mm yes vocal minorities |
11:18:19 | PMunch | Is there an easy way to turn something like 16:35 into the next Unix timestamp at which that will occur? |
11:27:48 | FromDiscord | <Rika> Get today, if time has passed then increment one, set the time to that, convert to unix time stamp |
11:27:58 | FromDiscord | <Rika> Increment one to days, I mean |
11:30:56 | PMunch | That works great |
11:31:05 | PMunch | But `hour=` is deprecated.. |
11:31:59 | FromDiscord | <Rika> It is? |
11:34:27 | FromDiscord | <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:59 | FromDiscord | <lqdev> inclusivity isn't bad but thinking "master" is offensive is absurd |
11:35:36 | FromDiscord | <dom96> I disagree, but please take this discussion into #offtopic |
11:36:10 | FromDiscord | <Rika> Why would it be deprecated |
11:36:54 | FromDiscord | <Rika> https://github.com/nim-lang/Nim/commit/48e7775ad14bc33f5b60225157fb0725d0384675 |
11:37:16 | FromDiscord | <Rika> Why would someone deprecate setting the fields? That’s odd |
11:37:30 | PMunch | I have no idea why it's deprecated.. |
11:38:04 | PMunch | Maybe the procedures are removed but the fields are exposed |
11:38:29 | PMunch | But 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:09 | FromDiscord | <Rika> No the commit directly says making the fields private |
11:41:35 | FromDiscord | <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:31 | PMunch | That is a very odd thing to do.. |
11:48:37 | PMunch | Who made that commit? |
11:48:52 | FromDiscord | <Rika> I sent the link to it |
11:51:15 | PMunch | Hmm, can't really see why they are deprecated though.. |
11:55:29 | FromDiscord | <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:41 | FromDiscord | <mratsim> All features start as unimplemented |
11:56:56 | FromDiscord | <mratsim> -- The law of programming |
11:57:34 | FromDiscord | <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:47 | FromDiscord | <mratsim> report as "feature", and that would avoid people asking themselves the same question one yar from now. |
12:11:31 | FromDiscord | <konsumlamm> i feel like my PR to add tests for sugar (https://github.com/nim-lang/Nim/pull/16820) was forgotten |
12:11:32 | disbot | ➥ Sugar tests |
12:11:49 | FromDiscord | <konsumlamm> to add more tests |
12:15:34 | * | Vladar quit (Quit: Leaving) |
12:45:41 | FromGitter | <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:05 | FromGitter | <Araq> you never get this "just one person more included", you can never please everybody |
12:46:31 | * | Guest62103 joined #nim |
12:49:28 | PMunch | Personally 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:01 | FromDiscord | <mratsim> lmao |
12:51:08 | FromDiscord | <mratsim> but offtopic please |
12:52:16 | * | waleee-cl joined #nim |
12:58:02 | FromDiscord | <lqdev> vilify, don't even try |
13:11:42 | * | wasted_youth joined #nim |
13:12:47 | FromDiscord | <Clyybber> leorize: Fixed your issue with the first write optimization in #16849 |
13:12:48 | disbot | https://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:58 | PMunch | Hmm, is there an issue with the times module and 32-bit systems? |
13:47:28 | PMunch | http://ix.io/2NyN |
13:48:03 | PMunch | Is there a way to make Nim default `int` to `int64`? |
13:48:10 | PMunch | Performance isn't terribly important here |
13:48:17 | FromDiscord | <Rika> i think it is in devel |
13:48:56 | PMunch | You think what is in devel? |
13:49:51 | FromDiscord | <Rika> int is int64 always |
13:49:58 | PMunch | Oh really? |
13:49:58 | FromDiscord | <Rika> idk, i only heard |
13:50:54 | * | oddp joined #nim |
13:51:23 | PMunch | The 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:56 | FromGitter | <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:46 | narimiran | @Rika that's for floats |
13:53:34 | FromGitter | <gogolxdong> How to get the rest in the stream? |
13:53:38 | FromDiscord | <Rika> i heard someone say it was also done for ints recently, i mean |
13:53:44 | FromDiscord | <Rika> i know floats are always 64 |
13:53:53 | FromDiscord | <Rika> thats been like that for a long time |
13:57:50 | FromDiscord | <CodeHz> sent a code paste, see https://play.nim-lang.org/#ix=2NyQ |
14:00:03 | FromDiscord | <CodeHz> the [issue](https://github.com/nim-lang/Nim/issues/16847) has updated since I found the minimal PoC |
14:00:15 | disbot | ➥ ARC/nimSeqsV2 breaks seq at compile-time (macro) ; snippet at 12https://play.nim-lang.org/#ix=2NyS |
14:00:23 | FromGitter | <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:48 | FromDiscord | <CodeHz> (edit) the [issue](https://github.com/nim-lang/Nim/issues/16847) has updated since I found the minimal PoC |
14:09:51 | disbot | ➥ ARC/nimSeqsV2 breaks seq at compile-time (macro) ; snippet at 12https://play.nim-lang.org/#ix=2NyS |
14:10:10 | FromDiscord | <arnetheduck> sent a code paste, see https://play.nim-lang.org/#ix=2NyX |
14:14:41 | FromDiscord | <lqdev> !eval echo [0, 1, 2, 3][0.5 .. 1.6] |
14:14:43 | NimBot | @[0, 1] |
14:14:48 | FromDiscord | <lqdev> lol |
14:18:04 | PMunch | Wait what :P |
14:23:15 | FromDiscord | <haxscramper> !eval echo typeof(0.5 .. 1.6) |
14:23:17 | NimBot | Compile 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:12 | FromDiscord | <Rika> LOL what |
14:27:17 | FromDiscord | <Rika> that sounds super broken |
14:32:16 | FromDiscord | <flywind> !eval let x = "123456"; echo x[0.1 .. 1.6] |
14:32:19 | NimBot | 12 |
14:38:27 | FromDiscord | <lqdev> !eval import math; echo "abc"[Pi] |
14:38:29 | NimBot | Compile failed: /usercode/in.nim(1, 24) Error: type mismatch: got <string, float64> |
14:38:42 | FromDiscord | <lqdev> sounds like a bug |
14:47:15 | * | Vladar joined #nim |
15:10:24 | * | PMunch quit (Quit: leaving) |
15:15:54 | FromDiscord | <exelotl> that's wild lol |
15:17:39 | FromDiscord | <flywind> I think Nim doesn't have generics constraints at that time maybe. |
15:18:21 | FromDiscord | <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:40 | FromDiscord | <Rika> lol |
15:28:27 | FromDiscord | <mratsim> it did |
15:28:57 | FromDiscord | <mratsim> `[T, U: SomeInteger]` was already possible at the time |
15:29:11 | FromDiscord | <mratsim> BackwardsIndex broke a lot of things at the time |
15:29:18 | FromDiscord | <mratsim> it broke Arraymancer |
15:29:58 | FromDiscord | <mratsim> well technically it broke the workaround I had for the previous situation where ^foo was magic |
15:31:35 | FromDiscord | <flywind> I made a PR to see whether it breaks something https://github.com/nim-lang/Nim/pull/16853/files |
15:31:36 | disbot | ➥ see whether it breaks |
15:32:06 | FromDiscord | <konsumlamm> i want stable concepts ;-; |
15:32:49 | FromDiscord | <mratsim> I want stable generics :p |
15:33:06 | FromDiscord | <konsumlamm> @haxscramper btw, i commented on the pattern matching RFC |
15:33:18 | FromDiscord | <konsumlamm> i want stable Nim |
15:33:32 | FromDiscord | <mratsim> I want stable C |
15:33:36 | FromDiscord | <konsumlamm> i don't |
15:33:37 | FromDiscord | <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:43 | FromDiscord | <haxscramper> At least |
15:34:44 | FromDiscord | <konsumlamm> i assume "yes" is supposed to be "yet"? |
15:35:04 | FromDiscord | <haxscramper> yes |
15:35:25 | FromDiscord | <haxscramper> But I don't quite understand what you meant by inconsistency in matching of sequences vs objects |
15:36:23 | FromDiscord | <haxscramper> Object is constructed using `(fld: val)` and matched using `(fld: @patt)`. Sequence/array is constructed using `[val]` and matched using `[@pattern]` |
15:38:49 | FromDiscord | <haxscramper> there are some shortcuts for this though, mainly to allow for things like |
15:39:09 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2Nzi |
15:39:19 | FromDiscord | <haxscramper> E.g `ProcDef[` vs `ProcDef([` |
15:39:25 | FromDiscord | <konsumlamm> `@pat` is no arbitrary pattern though |
15:40:09 | * | Guest62103 quit (Quit: Guest62103) |
15:40:26 | * | Guest62103 joined #nim |
15:40:39 | FromDiscord | <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:49 | FromDiscord | <konsumlamm> ye, exactly |
15:43:23 | FromDiscord | <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:50 | saem | Araq: 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:52 | FromDiscord | <haxscramper> Yes, this can be addressed, though `(field: @a)` already works - see `multitest "Variable binding"` |
15:46:43 | FromDiscord | <haxscramper> But AFAIC there is no reason not to allow `(field: Pattern())` |
15:47:49 | FromDiscord | <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:26 | FromDiscord | <haxscramper> yes. You can also use `of` for pattern-match ref objects |
15:51:48 | FromDiscord | <konsumlamm> ye, i saw that |
15:52:23 | FromDiscord | <konsumlamm> though it looks kinda weird if you write `of of ...:` |
15:54:13 | FromDiscord | <konsumlamm> what's the reason for not using the normal object patterns for ref objects? |
15:57:19 | FromDiscord | <haxscramper> implementation details |
15:58:11 | FromDiscord | <haxscramper> 1. pattern matching does not have access to typed AST and instead operates on `untyped`↵2. `ref` + `variant` objects are possible |
15:59:03 | FromDiscord | <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:16 | FromDiscord | <konsumlamm> but don't object/variant patterns just translate to field accesses? |
15:59:40 | FromDiscord | <konsumlamm> so shouldn't they also work with ref object? or do they already? |
16:00:27 | FromDiscord | <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:03 | FromDiscord | <haxscramper> Otherwise, you just have supertype which of course has no fields that could be matched on |
16:02:44 | FromDiscord | <haxscramper> Variant match is translated to `hasKind(obj, Kind)`, and field access is translated to `obj of Derived() and obj.Derived().filed == ...` |
16:04:13 | FromDiscord | <haxscramper> sorry, not field access |
16:04:42 | FromDiscord | <haxscramper> derived object match is translated to `obj of Derived()` |
16:05:01 | * | MyMind quit (Read error: Connection reset by peer) |
16:05:13 | FromDiscord | <konsumlamm> is there a situtation where you can put something in thoseparentheses? |
16:06:15 | FromDiscord | <haxscramper> For `Derived()`? |
16:06:32 | FromDiscord | <haxscramper> (edit) "`Derived()`?" => "`of Derived()`?" |
16:09:57 | FromDiscord | <konsumlamm> ye |
16:10:14 | FromDiscord | <haxscramper> `multitest "Ref object field matching"` |
16:12:37 | FromDiscord | <Clyybber> @flywind you can do U, V: Ordinal btw |
16:16:39 | FromDiscord | <Rika> TIL orc doesnt like me repr'ing asynchttpserver.Request |
16:17:03 | * | MatN joined #nim |
16:18:12 | FromDiscord | <Rika> oh god no... |
16:18:12 | FromDiscord | <Cloufish> sent a code paste, see https://play.nim-lang.org/#ix=2Nzw |
16:18:20 | FromDiscord | <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:29 | FromDiscord | <Cloufish> haha, so is it bad question? |
16:18:30 | FromDiscord | <mratsim> faster to develop, slower to crash |
16:18:32 | MatN | hello everyone |
16:18:49 | FromDiscord | <mratsim> printing speed depends on your terminal, you might want to make it GPU accelerated 😉 |
16:19:05 | FromDiscord | <Cloufish> okay pls I don't get those jokes |
16:19:06 | FromDiscord | <Cloufish> xD |
16:19:29 | FromDiscord | <mratsim> If you care about speed, don't use bash or nimscript, use a compiled language. |
16:19:47 | FromDiscord | <mratsim> scripts are to optimize prototyping or deployment. |
16:20:48 | FromDiscord | <Rika> hello MatN |
16:20:52 | FromDiscord | <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:08 | FromDiscord | <mratsim> no, it uses the OS/kernel API |
16:21:12 | FromDiscord | <mratsim> just like bash |
16:21:48 | FromDiscord | <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:31 | FromDiscord | <Cloufish> okay so if I wanted to execute a unix command, is it safe to use nim? |
16:23:01 | FromDiscord | <Cloufish> these questions are probably neglecting each other, but please answer xd |
16:23:26 | FromDiscord | <Rika> it is but its not gonna be much faster than normal |
16:24:26 | FromDiscord | <Cloufish> I wanted to switch from bash to nim because of multithreading |
16:25:08 | FromDiscord | <konsumlamm> if all you're going to do is call unix utilities, that won't make a difference |
16:25:09 | FromDiscord | <Cloufish> but I guess if that's still be operating in the Linux system, then switching isn't gonna help, yes? :/ |
16:25:14 | FromDiscord | <Cloufish> yee |
16:25:21 | FromDiscord | <mratsim> multithreading won't help for IO |
16:25:32 | FromDiscord | <mratsim> and you can start multiple process in bash |
16:25:38 | FromDiscord | <Rika> `parallel` i think |
16:25:44 | FromDiscord | <mratsim> for reference: https://media.discordapp.net/attachments/371759389889003532/804386738700681226/8LIwV4C.png |
16:26:01 | FromDiscord | <Rika> nice pic |
16:26:24 | FromDiscord | <mratsim> you want to do roational disk IO, scale 1-12 month (1-12ms) |
16:26:39 | FromDiscord | <Rika> ah yes, we all relate to how long it takes for bill gates to earn two thousand dollars |
16:27:13 | FromDiscord | <mratsim> bash is at watching a movie, and Nim at Bill gates 😉 |
16:27:26 | FromDiscord | <mratsim> but that's nothing compared to disk operations |
16:27:32 | MatN | I'm puzzled. How do I define an array type of a prior defined integer type? |
16:27:43 | FromDiscord | <mratsim> another one: https://media.discordapp.net/attachments/371759389889003532/804387238774439956/BYcR292IEAEVz0G.png |
16:27:45 | FromDiscord | <Rika> array[N, thetype] |
16:27:45 | FromDiscord | <Rika> ? |
16:27:51 | FromDiscord | <Rika> whats the issue? |
16:28:04 | FromDiscord | <Rika> > 5m for reboot |
16:28:08 | FromDiscord | <Rika> man thats an old document |
16:28:41 | MatN | Rika: Type mismatch. The compiler expected HSlice[system.int, system.int] |
16:28:54 | FromDiscord | <Rika> what are you putting in the N argument? |
16:29:41 | MatN | type tRimCell = int64 |
16:29:54 | FromDiscord | <Rika> i mean in the N argument, not thetype |
16:30:06 | FromDiscord | <Rika> array[aNumber, yourType] |
16:30:13 | narimiran | my bet: not known at compile time |
16:30:29 | FromDiscord | <Rika> i believe it would be a different error if that was so |
16:30:33 | FromDiscord | <Rika> wouldnt it? |
16:30:39 | MatN | 0..cRimMaxMemCode where crimMaxMemCode is a constant |
16:31:27 | narimiran | 0 is an int, your constant isn't? |
16:31:42 | MatN | em, no |
16:31:58 | narimiran | em, int vs int64 |
16:32:05 | FromDiscord | <konsumlamm> it would be easier if you just showed us the relevant code |
16:32:56 | MatN | const |
16:32:56 | MatN | cRimMaxMemCode = 0xFFFF # limit for static allocated code segment |
16:33:31 | MatN | later.. type tRimMemCode = array [0..cRimMaxMemCode, tRimCell] |
16:33:51 | narimiran | remove a space between array and [ |
16:34:14 | MatN | that was it! Thanks |
16:35:00 | MatN | may I notice that the error message was not really helpful? |
16:35:07 | narimiran | you may |
16:37:04 | * | r4vi quit (Ping timeout: 240 seconds) |
16:37:24 | FromDiscord | <Rika> it really is |
16:37:42 | * | r4vi joined #nim |
16:40:10 | MatN | by the way, I found the micro editor very useful for programming in Nim. |
16:41:19 | FromDiscord | <Rika> micro? |
16:41:24 | FromDiscord | <Rika> is it similar to nano... |
16:41:47 | FromDiscord | <lqdev> it's better than nano |
16:43:15 | FromDiscord | <Rika> whats the diff |
16:43:22 | Guest41757 | it uses CUA bindings like Control C to copy, Control S to save, etc |
16:44:00 | FromDiscord | <lqdev> @Rika mainly that it doesn't use emacs keybindings, so it's easier to wrap your head around it |
16:45:56 | FromDiscord | <Rika> oh wow that was the main gripe i had with nano lmao |
16:46:01 | * | evbo joined #nim |
16:46:17 | Guest41757 | IMO 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:17 | FromDiscord | <Rika> though im not too fussed about it now that im fairly proficient with vi |
16:47:14 | FromDiscord | <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:26 | FromDiscord | <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:25 | FromDiscord | <arun> https://github.com/adsharma/py2many/blob/main/common/nesting_transformer.py |
16:49:21 | Guest41757 | arun: not using py2nim, what heresy‽! (jk :)) |
16:49:33 | FromDiscord | <Rika> wow using an interrobang |
16:49:35 | FromDiscord | <Rika> fancy |
16:50:06 | FromDiscord | <arun> Not following my religion eh? 🙂 |
16:51:01 | FromDiscord | <arun> I called it py2many now that it supports cpp, rust, julia, kotlin and nim |
16:51:07 | FromDiscord | <Rika> reminder that replies dont show on irc |
16:51:39 | Guest41757 | 👁 ♥ × Ⅺ ☺ |
16:52:48 | FromDiscord | <arun> Automated tests cover these cases:↵↵https://github.com/adsharma/py2many/tree/main/tests/expected |
16:53:32 | FromDiscord | <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:10 | FromDiscord | <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:33 | FromDiscord | <shadow.> oh lord |
17:17:41 | Mat7 | Riko: Micro also features syntax checking at save time so error messages will be indicated without invoking the Nim compiler |
17:18:02 | Mat7 | (directly) |
17:19:50 | Mat7 | ciao |
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:29 | FromDiscord | <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:48 | FromDiscord | <Deorder> My old code still works |
18:06:07 | FromDiscord | <Deorder> (edit) "it" => "compilation" |
18:18:44 | FromDiscord | <konsumlamm> there is an RFC for a concepts redesign: https://github.com/nim-lang/RFCs/issues/168 |
18:18:47 | disbot | ➥ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8 |
18:19:30 | FromDiscord | <konsumlamm> also a WIP PR: https://github.com/nim-lang/Nim/pull/15251 |
18:19:30 | disbot | ➥ new-style concepts implementation, WIP |
18:19:57 | FromDiscord | <konsumlamm> but afaik, concepts aren't really used much (at least not in the stdlib) |
18:21:05 | FromDiscord | <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:06 | FromDiscord | <Deorder> https://gist.github.com/komerdoor/742936aba931750724055f86b424ca69 |
18:21:08 | Prestige | I'm eagerly awaiting the rework |
18:22:26 | FromDiscord | <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:37 | FromDiscord | <Deorder> (edit) "an" => "a" |
18:22:50 | FromDiscord | <Deorder> For lazy processing etc. |
18:23:21 | FromDiscord | <Deorder> This project: https://github.com/narimiran/itertools |
18:23:38 | FromDiscord | <konsumlamm> there is zero-functional, which does pretty much what you want |
18:23:41 | FromDiscord | <Deorder> Reading it now. Sounds good |
18:24:29 | FromDiscord | <Deorder> Thanks. That one also looks really good |
18:24:44 | FromDiscord | <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:17 | FromDiscord | <konsumlamm> there are `iterutils` and `lazy` though, which don't use macros, but they don't seem to be maintained anymore either |
18:26:19 | FromDiscord | <Deorder> sent a code paste, see https://play.nim-lang.org/#ix=2NA2 |
18:26:50 | FromDiscord | <konsumlamm> why don't you just use the built-in for loop? |
18:27:21 | FromDiscord | <Deorder> I have no idea why I did it like that 5 years ago |
18:27:33 | FromDiscord | <Deorder> Can I chain them as functions? |
18:27:41 | FromDiscord | <konsumlamm> also, that's filter, not take_hile |
18:27:52 | FromDiscord | <konsumlamm> how is that relevant here? |
18:28:37 | FromDiscord | <Deorder> No that is not filter as it stops when a specified test is false |
18:29:14 | FromDiscord | <konsumlamm> oh, right, it returns, nvm |
18:29:19 | FromDiscord | <Deorder> 😉 |
18:29:34 | FromDiscord | <konsumlamm> you could have just used `while f(x): yield x`, that would be more clear |
18:29:44 | FromDiscord | <konsumlamm> no |
18:29:55 | FromDiscord | <konsumlamm> hmm, there is no `.next`, is there? |
18:30:16 | FromDiscord | <Deorder> I have no idea. I just returned back to Nim again and trying to get up to speed again 😄 |
18:31:06 | FromDiscord | <Deorder> You can see here at the bottom how I used it back then:↵<https://gist.github.com/komerdoor/70d9c25820952624cf797890a18f9cd5> |
18:32:10 | FromDiscord | <Deorder> Nice thing with Nim is that you get both point free and chaining support out of the box |
18:32:30 | FromDiscord | <konsumlamm> i know what you mean, but that has nothing to do with using the builtin for loop vs your foreach thing |
18:32:56 | ForumUpdaterBot | New 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:37 | FromDiscord | <Deorder> I remember I did that because of a limitation with iterators back then. May be this limitation is not there anymore |
18:33:50 | FromDiscord | <konsumlamm> hmm, maybe |
18:34:34 | FromDiscord | <Deorder> btw thanks for the link to the new concept documents. Looks good. |
18:36:00 | FromDiscord | <konsumlamm> it's not implemented yet though, afaik |
18:37:18 | disruptek | it's implemented, it just doesn't work. at all. |
18:50:02 | FromDiscord | <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:03 | disbot | ➥ Add pattern matching article |
18:50:52 | FromDiscord | <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:05 | FromDiscord | <konsumlamm> i also added some comments on your PR |
18:53:14 | FromDiscord | <haxscramper> yes, I saw those |
18:53:18 | * | smitop joined #nim |
18:53:19 | FromDiscord | <konsumlamm> but looks like i need to adjust my comment on the RFC a bit xd |
18:58:32 | FromDiscord | <konsumlamm> @haxscramper what is the difference between `(field: <pattern>)` and `(field: is <pattern>)` then? |
19:00:01 | FromDiscord | <haxscramper> There must be no differences, if any found this is a bug |
19:00:16 | FromDiscord | <haxscramper> i guess |
19:00:57 | FromDiscord | <konsumlamm> then why is the second version in there? this a special case, right, not the standard is operator |
19:01:06 | FromDiscord | <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:44 | FromDiscord | <haxscramper> and then make sure difference is clear (if any), or they are equivalent |
19:02:16 | FromDiscord | <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:58 | FromDiscord | <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:29 | FromDiscord | <haxscramper> most of the stdlib should be available, and I suppose ARC is the recommended GC for wasm |
19:05:55 | FromDiscord | <haxscramper> But don't quote me on ARC recommendations, this is just a guess |
19:06:04 | FromDiscord | <konsumlamm> is there an easy way to see what a macro expands to? |
19:06:15 | FromDiscord | <haxscramper> `import std./macros` and `expandMacros` |
19:07:50 | FromDiscord | <ag> thanks! |
19:15:09 | * | kwilczynski joined #nim |
19:16:17 | FromDiscord | <VVX7> Is there a post somewhere on Nim code smells and anti-patterns? |
19:16:33 | disruptek | ~disrupstyle |
19:16:34 | disbot | disrupstyle: 11tips for writing code that won't provoke 😠 rants 🤬 on irc: https://gist.github.com/disruptek/6d0cd6774d05adaa894db4deb646fc1d -- disruptek |
19:17:09 | FromDiscord | <VVX7> oh nice! thanks 🙂 |
19:18:49 | FromDiscord | <Daniel> what is the integer for infinite? |
19:18:56 | FromDiscord | <ElegantBeef> There isnt one |
19:18:59 | disruptek | i'm still working on it. |
19:19:13 | FromDiscord | <Daniel> There should be. |
19:19:15 | FromDiscord | <ElegantBeef> 2^64 is the largest number an int can represent |
19:19:22 | FromDiscord | <Rika> -1 |
19:19:34 | FromDiscord | <Rika> dont forget -1 |
19:19:55 | FromDiscord | <ElegantBeef> Sure if you like having 2^63 as your largest number 😄 |
19:20:01 | FromDiscord | <Rika> what? |
19:20:23 | FromDiscord | <Rika> i mean 2^64 - 1 |
19:21:21 | FromDiscord | <ElegantBeef> Uhh |
19:21:27 | FromDiscord | <konsumlamm> @haxscramper i guess it's a bug that i can access all kinds of internal variables (for example `aWasSet`) |
19:21:31 | FromDiscord | <konsumlamm> (edit) "`aWasSet`)" => "`aWasSet`)?" |
19:21:36 | FromDiscord | <ElegantBeef> (2^63) - 1 is the high for a signed int |
19:21:47 | FromDiscord | <Rika> well you put 64, i just copied that |
19:21:55 | FromDiscord | <Rika> still works for unsigned |
19:21:56 | FromDiscord | <ElegantBeef> 2^64 is high for a unsigned |
19:22:09 | FromDiscord | <ElegantBeef> well - 1 but meh |
19:22:13 | FromDiscord | <Rika> lol |
19:22:18 | FromDiscord | <Rika> nice try there lol |
19:22:24 | FromDiscord | <ElegantBeef> huh |
19:22:38 | FromDiscord | <ElegantBeef> Ah i see now |
19:22:49 | FromDiscord | <ElegantBeef> I thought you were implying using `-1` for inf |
19:23:06 | FromDiscord | <Rika> bruh |
19:24:31 | FromDiscord | <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:41 | FromDiscord | <ElegantBeef> Clearly rika my reading comprehension isnt great |
19:25:37 | FromDiscord | <haxscramper> So unless there is any problems with that one I will leave it as it is now |
19:26:06 | FromDiscord | <konsumlamm> perhaps `aWasSet` is unlikely to cause problems, but what about `expr` and `pos`? |
19:26:25 | FromDiscord | <konsumlamm> those seem common enough names that it might cause issues |
19:27:14 | FromDiscord | <lqdev> @ElegantBeef u drunk? |
19:27:16 | FromDiscord | <lqdev> > 2^64 is high for a unsigned |
19:27:38 | FromDiscord | <ElegantBeef> Nope just dumb |
19:27:41 | FromDiscord | <lqdev> !eval echo uint64.high |
19:27:44 | NimBot | 18446744073709551615 |
19:27:44 | * | evbo quit (Read error: Connection reset by peer) |
19:28:04 | FromDiscord | <lqdev> that doesn't end with an even number, i wonder why 🤔 🤔 🤔 |
19:28:04 | FromDiscord | <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:09 | FromDiscord | <ElegantBeef> 1 |
19:28:19 | FromDiscord | <ElegantBeef> all bits means it's an odd number |
19:28:32 | FromDiscord | <konsumlamm> should as in "it currently isn't, but should be"? |
19:28:43 | FromDiscord | <ElegantBeef> Although i assume you're being insincere |
19:29:34 | * | evbo joined #nim |
19:29:37 | FromDiscord | <lqdev> @ElegantBeef i was being sarcastic, it's hard to convey that through text. |
19:29:43 | FromDiscord | <lqdev> thought the three thinking emojis would help. |
19:29:50 | FromDiscord | <haxscramper> "I thought it is gensymed" |
19:29:53 | FromDiscord | <ElegantBeef> Yea i got that |
19:29:59 | FromDiscord | <ElegantBeef> But i had to prove i wasnt overly dumb |
19:30:01 | FromDiscord | <konsumlamm> ah, k |
19:39:28 | * | muffindrake joined #nim |
19:46:02 | FromDiscord | <Daniel> Besides infinity, what about other infinite numbers like e, Pi, c...do they exist in nim? |
19:48:38 | FromDiscord | <konsumlamm> infinity is not a number (in the mathematical sense) :P |
19:49:09 | FromDiscord | <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:38 | FromDiscord | <konsumlamm> c (assuming you meen the speed of light) is not in the stdlib, since it's too special |
19:51:09 | FromDiscord | <ElegantBeef> Math also has the superior Tau 😄 |
19:51:45 | FromDiscord | <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:33 | PMunch | Ugh, this times module issue is really making this stuff annoying.. |
20:05:49 | PMunch | https://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:12 | Prestige | This is what you get for time traveling so much |
20:07:40 | PMunch | I mean I solved my first issue with parse("2020 " & x, "yyyy HH:mm") |
20:07:50 | PMunch | And just discarding the 2020 part |
20:07:57 | PMunch | But now I'm having issues with `now()` |
20:08:29 | PMunch | http://ix.io/2NAv |
20:08:49 | PMunch | Error: unhandled exception: value out of range: -515396082720 notin -2147483648 .. 2147483647 |
20:12:26 | Prestige | Does it need to be translated to a string format or something? |
20:12:37 | PMunch | Nah |
20:12:50 | PMunch | I have times like 19:00 and 21:00 |
20:13:09 | FromDiscord | <ElegantBeef> I see alot of int64 and very little int32 in that code |
20:13:10 | PMunch | And I used the parse function to parse those into DateTime |
20:13:12 | * | waleee-cl joined #nim |
20:13:27 | PMunch | @Elegant, yeah except for that one line where it keeps failing.. |
20:13:28 | FromDiscord | <ElegantBeef> I mean in the issue function |
20:14:34 | PMunch | Yeah but on the line it fails it converts it to int |
20:14:39 | PMunch | Which is what fails |
20:15:03 | PMunch | Not that I quite see how the value can get that low.. |
20:15:35 | FromDiscord | <ElegantBeef> Well you can always echo a and b |
20:15:45 | FromDiscord | <ElegantBeef> Although i assume the issue is just an `abs` issue, but idk |
20:16:21 | FromDiscord | <ElegantBeef> I have 0 clue how the time works |
20:16:28 | PMunch | Well that procedure is intended to get the offset of the local timezone and daylight saving it seems |
20:16:52 | PMunch | And I have yet to heard about somewhere in the UTC-16kyears timezone.. |
20:17:17 | PMunch | So something's fishy |
20:17:40 | FromDiscord | <ElegantBeef> ~~considering the US politics, i think it's a US timezone~~ |
20:17:51 | PMunch | Ay-oh! |
20:21:05 | PMunch | Eh, I'll fight more with this tomorrow.. |
20:21:06 | * | PMunch quit (Quit: leaving) |
20:22:46 | FromDiscord | <ElegantBeef> Hey "eh" is my word 😄 |
20:23:48 | FromDiscord | <lqdev> eh |
20:26:11 | Zevv | "eh" is dutch |
20:26:23 | * | Jesin quit (Quit: Leaving) |
20:27:54 | FromDiscord | <ElegantBeef> But the Canadian stereotype |
20:30:43 | * | hmmm joined #nim |
20:30:59 | hmmm | muh bois |
20:31:05 | hmmm | what is the argparse of nim |
20:32:04 | FromDiscord | <ElegantBeef> !repo cligen |
20:32:04 | disbot | https://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:15 | hmmm | :o |
20:32:25 | hmmm | I've found parseopt, it's any good? |
20:32:52 | FromDiscord | <ElegantBeef> Cligen is meant for making for a fully usable/documented CLI |
20:33:00 | hmmm | hmm |
20:33:02 | hmmm | interesting |
20:33:12 | hmmm | I'll look into it beefy |
20:33:14 | hmmm | <3 |
20:33:32 | FromDiscord | <konsumlamm> parseopt is too low level imo |
20:33:43 | FromDiscord | <ElegantBeef> All you have to do with cligen is make a proc then add it to the dispatcher |
20:33:49 | FromDiscord | <ElegantBeef> Everything is automagically handled for you |
20:33:53 | hmmm | :O |
20:34:05 | hmmm | interestingness intensifies |
20:36:24 | hmmm | jesus this thing is like magic |
20:36:34 | FromDiscord | <ElegantBeef> Welcome to Nim |
20:37:05 | FromDiscord | <konsumlamm> there is also an `argparse` lib for nim (<https://github.com/iffy/nim-argparse>) which looks pretty neat |
20:41:09 | hmmm | woa cligen is up in the top trending packages on nim |
20:41:24 | FromDiscord | <ElegantBeef> It's a good package |
20:41:27 | hmmm | better grab this hot stuff before they take it down for hotness overflow |
20:41:40 | hmmm | what was it nimble install cligen? |
20:41:46 | FromDiscord | <ElegantBeef> yep |
20:41:50 | hmmm | <3 |
20:41:55 | FromDiscord | <lqdev> parseopt rocks tho |
20:42:00 | FromDiscord | <ElegantBeef> and `requires "cligen==version"` |
20:42:03 | FromDiscord | <ElegantBeef> Yea but it's manual labour |
20:42:20 | FromDiscord | <lqdev> a for loop and some case statements is negligible |
20:42:46 | FromDiscord | <ElegantBeef> I use nim for magic, so... sure, but that's still tedium |
20:48:07 | FromDiscord | <konsumlamm> you don't need to `nimble install` anything if you wanna use it in a project though, do you? |
20:49:36 | hmmm | O.o |
20:49:44 | hmmm | I'm confus'd |
20:50:09 | hmmm | I just nimble installed it |
20:50:33 | FromDiscord | <ElegantBeef> `nimble install cligen` fetches the package and adds it to your nimble directory |
20:50:39 | FromDiscord | <ElegantBeef> That way you can use it in any project |
20:50:48 | hmmm | good enough for me |
20:50:55 | FromDiscord | <konsumlamm> without adding it as dependency explicitly?? |
20:50:58 | FromDiscord | <ElegantBeef> the `requires` i mentioned is for your nimble file in your project, which allows you to later just `nimble install` |
20:50:58 | FromDiscord | <konsumlamm> (edit) "explicitly??" => "explicitly?" |
20:51:12 | hmmm | oh |
20:51:16 | FromDiscord | <ElegantBeef> If you dont make a nimble package you dont need dependancies |
20:52:02 | FromDiscord | <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:13 | FromDiscord | <ElegantBeef> Since you'd have to manually fetch all the deps with no clue other than your compiler |
20:52:36 | hmmm | I 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:33 | saem | Man 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:49 | FromDiscord | <mratsim> @saem, while you're here, i switched to your extension |
21:07:08 | * | tane joined #nim |
21:07:14 | saem | Yay! |
21:07:14 | FromDiscord | <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:26 | saem | Also yay! |
21:07:52 | saem | At least I can poke at the grammar at some point to see if that's a simple logic bug |
21:08:03 | FromDiscord | <zetashift> I switched over too, thank you for all the hard work, luckily I have no parsing errors (yet) tho |
21:08:05 | FromDiscord | <mratsim> I've isolated some test cases here: https://github.com/pragmagic/vscode-nim/issues/164 |
21:08:08 | disbot | ➥ Highlighting bugs ; snippet at 12https://play.nim-lang.org/#ix=2Nzt |
21:08:15 | saem | I suspect the textmate rules are just a bit hokey |
21:08:27 | FromDiscord | <mratsim> I think it's "shl" in array bracket [ ] that are broken |
21:09:10 | saem | zetashift 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:03 | saem | mratsim: 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:06 | FromDiscord | <mratsim> wasn't there some Nim parser in the stdlib? |
21:13:40 | FromDiscord | <mratsim> or we could load that part of the compiler via import compiler/something |
21:15:51 | saem | Yeah, I was thinking about the latter case. Might need a few shenanigans to trick or to using nodejs based APIs |
21:16:39 | saem | I think it's too early to bring nodejs into fully supported status or even significant endeavors in that direction. |
21:18:37 | saem | "trick or into" ... I'm typing in the phone and being extra sloppy. |
21:19:54 | ForumUpdaterBot | New 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:23 | FromDiscord | <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:40 | FromDiscord | <arun> The generated rect.nim actually compiles ok with the nim compiler now 🙂 |
22:04:53 | FromDiscord | <konsumlamm> is your goal to convert them to scala? |
22:05:50 | * | hmmm quit (Quit: WeeChat 3.0) |
22:08:13 | FromDiscord | <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:01 | FromDiscord | <arun> Without using JVM, yeah |
22:09:26 | FromDiscord | <konsumlamm> so scala native? |
22:09:37 | FromDiscord | <konsumlamm> also, do you know that python is adding pattern mtaching? |
22:13:53 | FromDiscord | <zetashift> Anybody know how I add a key, initiated to 1 to a `CountTable` ? |
22:14:15 | FromDiscord | <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:57 | FromDiscord | <arun> https://adsharma.github.io/python-622/ |
22:24:11 | FromDiscord | <konsumlamm> eh, the first sentence is already kinda wrong, it only seeks to add pattern matching |
22:24:25 | FromDiscord | <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:40 | FromDiscord | <arun> https://www.python.org/dev/peps/pep-0622/#sealed-classes-as-algebraic-data-types |
22:24:58 | FromDiscord | <arun> You need to scroll down a bit to read it 🙂 |
22:25:32 | FromDiscord | <konsumlamm> i mean, yeah, but dataclasses are already in python |
22:25:48 | FromDiscord | <konsumlamm> thats why i said "kinda" |
22:25:57 | FromDiscord | <arun> Ofcourse - I just added support for dataclasses in py2many yesterday. It spits out a nim object now. |
22:27:36 | FromDiscord | <konsumlamm> wanna give me the gist of what the "unconventional opinions" of Zed A Shaw and David Beazely are? |
22:28:23 | FromDiscord | <arun> https://en.wikipedia.org/wiki/Zed_Shaw#Opposition_to_Python_3 |
22:28:55 | FromDiscord | <arun> David Beazlely has an active twitter account where he talks about types, his take on asyncio etc. |
22:32:39 | FromDiscord | <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:28 | FromDiscord | <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:56 | FromDiscord | <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:26 | FromDiscord | <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:21 | FromDiscord | <arun> python developers clearly have a different worldview, sometimes different from people using python. |
22:38:30 | FromDiscord | <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:23 | FromDiscord | <alehander42> @Zachary Carter @clybber @prussianboy thanks |
23:18:10 | FromDiscord | <Zachary Carter> For what? |
23:19:28 | FromDiscord | <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:21 | leorize[m] | disruptek: any updates on cps return value support? |
23:50:49 | disruptek | i will work on cps when it has support from nim-lang. |
23:51:27 | Prestige | what about csp? |
23:51:31 | leorize[m] | have you file any bugs regarding what cps need? |
23:51:35 | disruptek | yes. |
23:53:12 | * | Gustavo6046 quit (Ping timeout: 265 seconds) |
23:54:10 | leorize[m] | this will take awhile then |
23:58:34 | * | Gustavo6046 joined #nim |
23:58:47 | disruptek | seems so. |