00:06:01 | NimEventer | New post on r/nim by thprogramador: Lua extended by Nim or vice-versa, see https://reddit.com/r/nim/comments/p5sh3n/lua_extended_by_nim_or_viceversa/ |
00:17:17 | * | justsomeguy joined #nim |
00:30:13 | FromDiscord | <System64 ~ Flandre Scarlet> I have a question, can a 64-bits Nim program interop with a 32-bits C lib please? I know Java doesn't and C# can. No idea for C and C++ |
00:30:18 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "for" => "about" |
00:40:36 | madprops | how can I avoid this imprecision? https://play.nim-lang.org/#ix=3wdW |
00:41:49 | FromDiscord | <Elegantbeef> I believe devel has better round triped string'd floats |
00:47:35 | madprops | nvm I'll just cut the decimals to 2 or less characters |
00:49:57 | madprops | wait no this is bad. 2 gets turned into 1999999999 |
00:50:18 | madprops | oh i'll just round |
00:53:04 | madprops | not sure that works |
00:53:15 | madprops | seems it's expected I use string format for this |
00:53:27 | madprops | but i get 1.1999999 instead of 1.2 |
00:53:28 | FromDiscord | <Elegantbeef> Well like i said devel has better round trip float stringification |
00:53:39 | madprops | what do you mean by devel? |
00:54:07 | FromDiscord | <Elegantbeef> the development branch on the github |
00:54:33 | FromDiscord | <Elegantbeef> Actually i code be wrong about it, still might be an umerged PR |
00:54:34 | FromDiscord | <Elegantbeef> Actually i could be wrong about it, still might be an umerged PR |
01:02:30 | madprops | or, is there a way to get decimals without resorting to strings? |
01:02:35 | madprops | like get 2 in 1.2 |
01:03:13 | madprops | oh there's `splitDecimal` |
01:03:22 | madprops | "Breaks x into an integer and a fractional part." |
01:05:11 | justsomeguy | Doesn't Nim have rational or fixed point numbers that you can use? |
01:05:52 | madprops | does it? |
01:05:59 | madprops | splitdecimal is not working well |
01:06:08 | madprops | 0.2 turns into 1.9999999 |
01:06:12 | madprops | when i echo it |
01:06:22 | madprops | (after multiplying it) |
01:06:44 | FromDiscord | <Elegantbeef> I mean that's to be expected, floats are floats afterall |
01:07:29 | madprops | yeah a round fixes it |
01:08:09 | FromDiscord | <Elegantbeef> I've never really needed this round trip accuracy, so i'm just here going "Yep" đ |
01:10:25 | madprops | heh |
01:12:09 | * | arkurious quit (Quit: Leaving) |
01:48:06 | * | _KurtGodel_ joined #nim |
01:51:10 | * | _KurtGodel quit (Ping timeout: 240 seconds) |
01:52:33 | madprops | ended up making this function https://play.nim-lang.org/#ix=3we9 |
01:54:07 | * | justsomeguy quit (Quit: WeeChat 3.2) |
02:05:20 | madprops | to this library https://github.com/madprops/numberstring |
02:59:22 | * | pch_ is now known as pch |
03:16:08 | FromDiscord | <gogolxdong (liuxiaodong)> Is there any up-to-date GMP library |
03:35:10 | * | rockcavera quit (Remote host closed the connection) |
03:51:23 | madprops | how can I make the index appear here: for i, c in 'a'..'z': |
03:51:34 | madprops | using pair doesn't seem to work |
03:53:35 | FromDiscord | <Yardanico> use enumerate |
03:55:23 | FromDiscord | <Yardanico> https://nim-lang.org/docs/enumerate.html |
03:55:36 | FromDiscord | <Yardanico> it basically creates the loop index itself and increments it |
03:56:02 | FromDiscord | <Yardanico> it's the same as doing var i = 0 and incrementing it in a loop just nicer |
03:56:07 | madprops | the question is |
03:56:11 | madprops | how do I import it?! |
03:56:16 | madprops | i think i've been through this before |
03:56:20 | madprops | it had some weird import method |
03:57:30 | FromDiscord | <Yardanico> not weird, just the more modern way |
03:57:40 | FromDiscord | <Yardanico> it's preferable you import all std modules this way :) |
03:57:41 | FromDiscord | <Yardanico> import std/enumerate |
03:57:46 | FromDiscord | <Yardanico> import std/strutils |
03:58:00 | madprops | there we go |
03:58:00 | FromDiscord | <Yardanico> or for multiple modules at the same time - import std/[strutils, enumerate] |
03:58:19 | madprops | std modules are 99% of what i import |
03:58:23 | madprops | so it's gonna be full of std/ |
03:58:45 | madprops | but namespacing is good |
04:01:29 | FromDiscord | <Yardanico> you can also span this import over multiple lines |
04:01:35 | FromDiscord | <Yardanico> also, you can import packages from nimble via import pkg/package |
04:01:40 | FromDiscord | <Yardanico> or import pkg/[package1, package2] |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:31 | * | supakeen joined #nim |
04:20:58 | madprops | i see |
04:21:44 | madprops | and local modules without a keyword right? |
04:23:37 | madprops | hmm weird |
04:23:44 | madprops | running an integration test is getting cached |
04:23:54 | madprops | i modify the file and the changes are not reflected |
04:27:20 | madprops | I had to add --forceBuild:on |
04:29:38 | madprops | dangerous stuff, if it makes me think the tests pass when they don't |
04:33:55 | FromDiscord | <PsychoClay> what does it mean if file.writeLine throws an IndexDefect? |
04:35:58 | FromDiscord | <Yardanico> In reply to @madprops "dangerous stuff, if it": that's really weird |
04:36:42 | FromDiscord | <Yardanico> In reply to @PsychoClay "what does it mean": can you show a bit more code? |
04:37:01 | FromDiscord | <PsychoClay> i forgot to add fmWrite |
07:12:09 | NimEventer | New thread by Jasonfi: A look at Dart's null safety syntax, see https://forum.nim-lang.org/t/8333 |
08:09:49 | * | flynn quit (Remote host closed the connection) |
08:10:56 | * | flynn joined #nim |
08:16:22 | * | max22- joined #nim |
08:35:08 | * | max22- quit (Remote host closed the connection) |
08:35:35 | * | max22- joined #nim |
09:07:02 | FromDiscord | <Chiggy> How can I check if a number is between 2 numbers? I tried `50 <= num <= 70` but this doesnt work. And neither does `num in 50..70`. Why didnt the 50..70 fail? |
09:07:06 | FromDiscord | <Chiggy> (edit) "didnt" => "did" |
09:07:39 | FromDiscord | <Chiggy> ofc I can do `5- <= 50 and num <= 70` but I wanted to know if there was another way |
09:07:52 | FromDiscord | <Chiggy> (edit) "`5-" => "`50" | "50" => "num" |
09:09:07 | FromDiscord | <Elegantbeef> !eval 10 in 5..15 |
09:09:08 | NimBot | Compile failed: /usercode/in.nim(1, 4) Error: expression 'contains(5 .. 15, 10)' is of type 'bool' and has to be used (or discarded) |
09:09:16 | FromDiscord | <Elegantbeef> !eval echo 10 in 5..15 |
09:09:18 | NimBot | true |
09:10:07 | FromDiscord | <Elegantbeef> The issue is your num isnt the same type as the range |
09:10:37 | FromDiscord | <Elegantbeef> ie if it's a int8 you need to do `yourVar in 50i8..70i8` |
09:10:52 | FromDiscord | <Chiggy> sent a code paste, see https://play.nim-lang.org/#ix=3wfl |
09:10:53 | FromDiscord | <Chiggy> um |
09:11:34 | FromDiscord | <Elegantbeef> That works |
09:11:46 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3wfm |
09:12:22 | * | PMunch joined #nim |
09:14:29 | FromDiscord | <Chiggy> then something must be wrong in my code |
09:15:08 | FromDiscord | <Chiggy> this is my codeâ”` if ( now_timestamp - player_last_seen in SECONDS-10..SECONDS+10 ) and (player_server == server) and (parseInt(nv) >= SECONDS):` |
09:15:16 | FromDiscord | <Chiggy> now_timestamp is epochTime() |
09:15:25 | FromDiscord | <Chiggy> and player_last_seen is a float |
09:15:35 | FromDiscord | <Chiggy> wait could that be the issue |
09:16:03 | FromDiscord | <Elegantbeef> Well the error message should say the issue |
09:16:20 | FromDiscord | <Chiggy> https://media.discordapp.net/attachments/371759389889003532/877118634823135252/unknown.png |
09:17:59 | FromDiscord | <Elegantbeef> yea right there "but expression is of type int" |
09:18:28 | FromDiscord | <Chiggy> how do I convert my player_last_seen which is something like 100.1234 to just 100 |
09:19:07 | FromDiscord | <Elegantbeef> You can just do `int(val)` or checkout https://nim-lang.org/docs/lenientops.html |
09:19:21 | FromDiscord | <Elegantbeef> The latter will make more operations work float + int without question, which might be handy for what seems to be a game |
09:19:55 | FromDiscord | <Chiggy> nah its not a game |
09:20:02 | FromDiscord | <Chiggy> but thanks forr the docs link |
09:20:27 | FromDiscord | <Elegantbeef> float -\> int conversion truncates the decimal so `-1.9.int == -1` and `int(1.9) == 1` |
09:52:59 | FromDiscord | <Chiggy> is there a way I can shorten this : `table[server]["Players"][nk] = $(parseInt(table[server]["Players"][nk]) + SECONDS)`â”`table[server]["Players"][nk]` is a integer in string format. Just need to add to it and convert it to string again. Is there a concise / faster method? |
09:53:32 | * | Guest3138 joined #nim |
09:54:50 | * | Vladar joined #nim |
09:55:02 | PMunch | Hmm, can't think of anything of the top of my head |
09:55:56 | PMunch | I mean you could maybe do `template nk: untyped = table[server]["Players"][nk]; nk = $(nk.parseInt + SECONDS)` but I'm not sure if that'll work |
09:56:49 | FromDiscord | <Chiggy> hmm ok |
09:57:16 | FromDiscord | <haxscramper> this is a single encounter of this, or you have multiple conversions like this? |
09:57:47 | FromDiscord | <Chiggy> just one more encounter |
09:57:49 | FromDiscord | <haxscramper> you can do `mgetOrPut` and move `parseInt(...) + SECONDS` part into proc |
09:57:57 | FromDiscord | <Chiggy> https://media.discordapp.net/attachments/371759389889003532/877129111657676820/unknown.png |
09:58:04 | FromDiscord | <haxscramper> if it is one instance then I would not bother |
10:04:02 | PMunch | Could you try to put that template thing outside that if statement and see if it works? You would reduce all that by quite a bit if it did, but mostly I'm just curious :P |
10:04:33 | FromDiscord | <Chiggy> yeah sure |
10:05:20 | PMunch | By the way, Nim typically uses 2 spaces instead of 4 for indentation. It works with 4 as well, but if you want to write code following the convention you should switch to 2 |
10:05:31 | FromDiscord | <Chiggy> oh |
10:05:33 | FromDiscord | <Chiggy> didnt know that |
10:05:41 | FromDiscord | <Chiggy> btw nk is already a string |
10:05:42 | PMunch | It looks a bit odd at first, but once you get used to it 4 spaces looks like a massive waste :P |
10:05:47 | FromDiscord | <Chiggy> should I change template name? |
10:05:52 | PMunch | Ah, yes |
10:06:09 | PMunch | I just wasn't sure what to call that thing |
10:06:14 | FromDiscord | <Chiggy> https://media.discordapp.net/attachments/371759389889003532/877131193345273866/unknown.png |
10:06:33 | FromDiscord | <Chiggy> like so? |
10:06:37 | PMunch | The untyped is supposed to be on the same line, it's the return type of the template |
10:06:46 | FromDiscord | <Chiggy> oh |
10:06:57 | PMunch | It's really `template nkt(): untyped = <body>` |
10:07:18 | FromDiscord | <Chiggy> like so? https://media.discordapp.net/attachments/371759389889003532/877131464095961098/unknown.png |
10:07:20 | PMunch | Similar to a proc, but a template instead. And you can omit the parenthesis |
10:07:53 | PMunch | The ; was just to split it into a newline |
10:07:58 | FromDiscord | <Chiggy> ok |
10:08:52 | PMunch | http://ix.io/3wfy/nim |
10:08:54 | PMunch | Like that |
10:09:11 | FromDiscord | <Chiggy> yeah it seems to work |
10:09:43 | PMunch | Nice, wasn't sure if it would work to assign to it through a template |
10:10:01 | FromDiscord | <Chiggy> https://media.discordapp.net/attachments/371759389889003532/877132144886054922/unknown.png |
10:10:56 | PMunch | Oh woops, that paste didn't go right |
10:11:08 | FromDiscord | <Chiggy> yeah the code works |
10:11:20 | FromDiscord | <Chiggy> In reply to @PMunch "Oh woops, that paste": huh? |
10:11:47 | PMunch | My ix.io paste was intended to be a longer snippet |
10:11:57 | FromDiscord | <Chiggy> oh lol |
10:12:17 | PMunch | Ah, that wasn't quite what I was thinking |
10:12:22 | FromDiscord | <Chiggy> anyways your template code seems to work |
10:12:51 | PMunch | If you just do the template, then `nkt = $(nkt.parseInt + SECONDS)` in your if/else statement |
10:13:29 | PMunch | If you share the same stuff from your image as text (for example via play.nim-lang.org) then I can show you what I mean |
10:14:13 | FromDiscord | <Chiggy> btw, I am currently using `nim c -r file.nim` to compile. I assume its compiling in debug mode rn? and if I compile for release, should I expect any speed boost? |
10:14:27 | FromDiscord | <Yardanico> yes |
10:14:45 | FromDiscord | <Yardanico> but it depends on what you do - if it's number crunching or some calculations, then it'll be much faster, if it's IO - don't expect a big boost |
10:14:46 | PMunch | Yes, that is debug mode by default, and yes adding `-d:release` will very likely give you a speed boost |
10:14:54 | FromDiscord | <Yardanico> -d:release if a safe release mode (with runtime checks enabled) |
10:15:10 | FromDiscord | <Yardanico> -d:danger is d:release + all runtime checks disabled, use it when you don't care about runtime errors or stuff |
10:15:27 | FromDiscord | <Yardanico> or when you just want to run some program one time and not host it on a server to run 24/7 :P |
10:18:10 | * | xet7 joined #nim |
10:19:28 | * | beshr quit (Ping timeout: 256 seconds) |
10:20:47 | NimEventer | New thread by Ingo: Server Sent Events?, see https://forum.nim-lang.org/t/8334 |
10:21:36 | FromDiscord | <Chiggy> In reply to @Yardanico "or when you just": Lol |
10:21:49 | FromDiscord | <Yardanico> so yeah, -d:release is fine for must stuff |
10:21:52 | FromDiscord | <Yardanico> (edit) "must" => "most" |
10:21:54 | PMunch | Maybe something like this should be put in sugar? https://play.nim-lang.org/#ix=3wfA |
10:22:34 | FromDiscord | <Chiggy> In reply to @Yardanico "but it depends on": My program is actually pretty simple.â”fetch json from api - roughly 4-6 secondsâ”then shit ton of playing around with tables.â”total time on debug mode is around 10 to 12 seconds |
10:22:44 | FromDiscord | <Yardanico> then go ahead with -d:danger |
10:22:45 | FromDiscord | <Chiggy> (edit) "tables.â”total" => "tables. (10-12 - 4-6)â”total" |
10:22:50 | FromDiscord | <Yardanico> (edit) "then go ahead ... with" added "and try it" |
10:22:55 | FromDiscord | <Chiggy> (edit) "4-6)â”total" => "4-6 = 6 seconds) â”total" |
10:23:00 | FromDiscord | <Chiggy> um ok |
10:23:39 | FromDiscord | <Chiggy> whoa |
10:23:49 | FromDiscord | <Chiggy> total time reduces to 6 seconds |
10:23:53 | FromDiscord | <Yardanico> yeah |
10:23:57 | FromDiscord | <Chiggy> out of which 5 seconds was to fetch |
10:24:05 | FromDiscord | <Chiggy> https://media.discordapp.net/attachments/371759389889003532/877135689450405958/unknown.png |
10:24:07 | FromDiscord | <Yardanico> the biggest "optimization" that -d:release or -d:danger do is opt:speed |
10:24:14 | FromDiscord | <Yardanico> that argument just passes -O3 to the C compiler |
10:24:33 | FromDiscord | <Yardanico> whereas the default debug mode compiles without C compiler optimizations, for a faster compilation time |
10:25:01 | FromDiscord | <Yardanico> also you might want to try -d:danger --gc:orc to see if ORC is faster for you |
10:25:09 | FromDiscord | <Chiggy> whats orc |
10:25:11 | FromDiscord | <Yardanico> (it's a newer GC, the default is refc but it's being phased out) |
10:25:43 | FromDiscord | <Yardanico> if you want to know more, you can readâ”https://nim-lang.org/blog/2020/12/08/introducing-orc.htmlâ”https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html |
10:26:25 | FromDiscord | <Chiggy> also, one more qurstion. I am currently devving on my laptop (windows). I want to be able to run this code on a vps (ubuntu most likely), so I will have to install nim on it, then compile my code on it? |
10:26:30 | FromDiscord | <Chiggy> (edit) "qurstion." => "question." |
10:27:12 | PMunch | Nah you can cross-compile |
10:27:16 | FromDiscord | <Yardanico> if you have win10, then you can compile in wsl |
10:27:18 | FromDiscord | <Chiggy> In reply to @Yardanico "also you might want": took 6.4 seconds |
10:27:27 | FromDiscord | <Chiggy> In reply to @Chiggy "": this took 6.3 |
10:27:34 | FromDiscord | <Chiggy> (edit) "In reply to @Chiggy "": this took 6.3 ... " added "(d:danger only)" |
10:27:37 | FromDiscord | <Yardanico> well you can't compare time just from a single line :P |
10:27:41 | FromDiscord | <Chiggy> true |
10:27:43 | FromDiscord | <Yardanico> since network speed isn't constant |
10:27:53 | FromDiscord | <Chiggy> yeah this time fetch did take more time |
10:27:54 | FromDiscord | <Yardanico> but yeah, you can just continue using just -d:danger |
10:28:02 | FromDiscord | <Yardanico> but --gc:orc will become the default in the future |
10:28:08 | PMunch | You could also cache your JSON response :P |
10:29:40 | FromDiscord | <Chiggy> In reply to @PMunch "You could also cache": Its different everytime so |
10:29:51 | FromDiscord | <Chiggy> My code will be running once every minute |
10:30:21 | PMunch | Ah I see |
10:32:02 | FromDiscord | <Chiggy> Does anyone know if I can create JSONs using jsony |
10:32:23 | FromDiscord | <Yardanico> nah |
10:32:30 | FromDiscord | <Yardanico> well, yes |
10:32:31 | FromDiscord | <Yardanico> you can :P |
10:32:42 | FromDiscord | <Chiggy> huh? |
10:32:49 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/877137884212260904/unknown.png |
10:33:10 | FromDiscord | <Chiggy> hmm |
10:33:23 | FromDiscord | <dom96> If it's just to create JSON strings then why not just use the stdlib? |
10:33:52 | FromDiscord | <Chiggy> yeah that was the plan was just curious to know if jsony has something for it |
10:49:42 | FromDiscord | <haxscramper> jsony is faster |
10:50:07 | FromDiscord | <haxscramper> and it does not have do two allocations for `T -> JsonNode -> string` |
10:50:48 | FromDiscord | <haxscramper> So for serialization I think it makes sense to use it instead of the stdlib |
11:00:56 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
11:04:16 | FromDiscord | <Chiggy> sent a code paste, see https://play.nim-lang.org/#ix=3wfF |
11:05:58 | FromDiscord | <haxscramper> You can have either `"Table"` or `"Server"` fields in json? |
11:06:24 | FromDiscord | <Yardanico> In reply to @Chiggy "ok I am almost": well, if you want to use jsony, you'll need to createa custom type I think |
11:06:30 | FromDiscord | <Yardanico> (edit) "createa" => "create a" |
11:06:38 | FromDiscord | <haxscramper> You can just add `table: Option[string]` and `serve: Option[string]` |
11:06:51 | FromDiscord | <haxscramper> There is no `"Table"` in your json examples |
11:07:04 | FromDiscord | <Chiggy> by Table I meant just the `{}` part |
11:07:17 | FromDiscord | <Chiggy> In reply to @Yardanico "well, if you want": yes I am trying to do this with jsony |
11:07:33 | FromDiscord | <Yardanico> but apart from that it's pretty easy to do |
11:07:45 | FromDiscord | <Yardanico> loop over your tables, populate your objects and then serialize them |
11:07:48 | * | Lord_Nightmare joined #nim |
11:09:23 | FromDiscord | <haxscramper> In reply to @Chiggy "by Table I meant": So value can be either just server name or full table with multiple fields? |
11:09:46 | FromDiscord | <Chiggy> huh? I didnt get your question |
11:09:53 | FromDiscord | <Chiggy> also which table are we talking about. 1 or 2 |
11:14:07 | FromDiscord | <Chiggy> I think I got it |
11:14:30 | * | tdc joined #nim |
11:15:09 | FromDiscord | <Chiggy> yeah I got it working |
11:15:36 | FromDiscord | <Chiggy> just that field names are wrong lol. I suppose I will have to write a hook? https://media.discordapp.net/attachments/371759389889003532/877148651082895370/unknown.png |
11:16:21 | FromDiscord | <Yardanico> well you can change the field names in the object definition itself I think |
11:16:31 | FromDiscord | <Yardanico> since nim itself doesn't care about camelCase vs snake_case |
11:16:38 | FromDiscord | <Chiggy> How can I define `Last Seen tho` |
11:16:41 | FromDiscord | <Chiggy> (edit) "Seen tho`" => "Seen` tho" |
11:16:46 | FromDiscord | <Yardanico> ah, like that |
11:16:54 | FromDiscord | <Yardanico> hmm |
11:17:06 | FromDiscord | <Chiggy> I suppose since toJson returns a string, I can just do a replace |
11:17:15 | FromDiscord | <Chiggy> on the whole string |
11:17:19 | FromDiscord | <Yardanico> that won't be the best for performance :P |
11:17:20 | FromDiscord | <Yardanico> you can try https://github.com/treeform/jsony#proc-renamehook-can-be-used-to-rename-fields-at-run-time |
11:18:20 | * | arkurious joined #nim |
11:19:02 | FromDiscord | <Chiggy> Ok I lemme see |
11:20:07 | FromDiscord | <Yardanico> just make a renameHook proc with a simple case statement inside |
11:32:57 | NimEventer | New thread by Haxscramper: Change error message position using `{.line.}` pragma , see https://forum.nim-lang.org/t/8335 |
11:34:56 | FromDiscord | <Chiggy> In reply to @Yardanico "you can try https://github.com/treeform/jsony#proc-": turns out I was already using a rename hook |
11:35:15 | FromDiscord | <Chiggy> that was affecting my names |
11:37:32 | * | max22- quit (Ping timeout: 245 seconds) |
11:38:58 | FromDiscord | <Chiggy> ok I am doing something wrong |
11:39:10 | FromDiscord | <Chiggy> https://media.discordapp.net/attachments/371759389889003532/877154585175814144/unknown.png |
11:39:22 | FromDiscord | <Chiggy> the upper `of`s are for when I parse a json |
11:39:36 | FromDiscord | <Chiggy> the below ones are supposed to be when I am writing |
11:39:50 | FromDiscord | <Chiggy> and this is how I write https://media.discordapp.net/attachments/371759389889003532/877154752494968912/unknown.png |
11:40:01 | FromDiscord | <Chiggy> where https://media.discordapp.net/attachments/371759389889003532/877154798149963796/unknown.png |
11:40:10 | FromDiscord | <Chiggy> ÂŻ\_(ă)_/ÂŻ |
11:40:30 | * | PMunch quit (Read error: Connection reset by peer) |
11:41:06 | * | PMunch joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:29 | * | audiophile_ joined #nim |
12:06:54 | * | supakeen joined #nim |
12:16:17 | * | rockcavera joined #nim |
12:16:17 | * | rockcavera quit (Changing host) |
12:16:17 | * | rockcavera joined #nim |
12:17:54 | FromDiscord | <Chiggy> looks like jsony doesnt use the rename hook on toJson ? https://media.discordapp.net/attachments/371759389889003532/877164329810673700/unknown.png |
12:18:13 | * | max22- joined #nim |
12:20:20 | audiophile_ | anything cool in nim in the last 6 months? |
12:25:54 | FromDiscord | <Rika> u |
12:33:17 | audiophile_ | aww |
12:51:32 | * | pro joined #nim |
12:53:00 | * | pro quit (Client Quit) |
12:55:09 | PMunch | Last 6 months? Well NimConf 2021 happened :) |
13:04:38 | FromDiscord | <tandy> can you do list comprehensions in nim? |
13:05:04 | FromDiscord | <Clonkk> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#List-Comprehensions |
13:05:22 | FromDiscord | <tandy> ty |
13:05:28 | PMunch | Damn, did you have that already in your clipboard or something? |
13:05:58 | FromDiscord | <Clonkk> I have the Nim wiki in the favorite bar in Firefox \:D |
13:06:20 | PMunch | Aha :P |
13:06:22 | FromDiscord | <Clonkk> Bookmark I think it's called |
13:21:16 | audiophile_ | PMunch you were working on a nim interpreter iirc? |
13:26:07 | PMunch | I was? |
13:31:44 | FromDiscord | <KJ> is there a clean way to reverse a sequence? |
13:32:05 | FromDiscord | <Clonkk> https://nim-lang.org/docs/algorithm.html#reverse%2CopenArray%5BT%5D%2CNatural%2CNatural |
13:33:28 | FromDiscord | <KJ> thank you, looks like exactly what I am looking for |
13:35:23 | PMunch | Hmm, my server appears to be completely borked.. |
13:35:25 | PMunch | That's fun |
13:41:11 | FromDiscord | <Rika> Nice |
13:41:23 | FromDiscord | <Rika> Did you perhaps forget to pay |
13:52:54 | PMunch | I have it for free at the university, so I have never paid for it :P |
13:58:54 | * | PMunch quit (Quit: Leaving) |
13:59:19 | NimEventer | New thread by Samsamros: Simple connection GET using httpclient does not work when compiled to js, see https://forum.nim-lang.org/t/8336 |
15:10:06 | * | audiophile joined #nim |
15:12:08 | FromDiscord | <Chiggy> What can I do so its `{}` instead of `{:}` ? https://media.discordapp.net/attachments/371759389889003532/877208175240151070/unknown.png |
15:13:10 | * | audiophile_ quit (Ping timeout: 240 seconds) |
15:13:17 | * | audiophile is now known as audiophile_ |
15:13:24 | FromDiscord | <haxscramper> nothing. `$` shows `:` for empty table |
15:13:39 | FromDiscord | <haxscramper> You can reimplement own string conversion function if you want |
15:13:55 | FromDiscord | <Chiggy> hmm ok |
15:16:54 | * | audiophile_ quit (Quit: Default Quit Message) |
15:21:53 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
15:51:05 | * | beshr joined #nim |
15:54:07 | * | Guest3138 quit (Quit: Konversation terminated!) |
15:58:05 | FromDiscord | <konsumlamm> `{}` already is the empty set, so the empty table is `{:}` instead |
16:15:40 | NimEventer | New thread by Kalbhairab: Puzzle questions and solutions, see https://forum.nim-lang.org/t/8338 |
16:31:01 | FromDiscord | <Chiggy> How do I compile for ubuntu 18.04 (I am on windows 10) |
16:32:41 | FromDiscord | <PsychoClay> wsl maybe |
16:32:43 | FromDiscord | <Clonkk> You can just work in WSL Ubuntu 18.04 |
16:32:49 | FromDiscord | <Clonkk> It's probably the simplest way |
16:33:16 | FromDiscord | <Chiggy> Lol I don't remember me manually installing nim on wsl ubuntu https://media.discordapp.net/attachments/371759389889003532/877228597323128832/unknown.png |
16:33:53 | FromDiscord | <Ayy Lmao> How would you go about converting a tuple to an array, and raising an exception when the tuple doesn't have all the same data types? For some reason I'm struggling on this. |
16:34:56 | FromDiscord | <undersquire> u can convert a tupe to an array but idk how to account for inconsistent data types |
16:35:09 | FromDiscord | <undersquire> (edit) "u can convert a tupe to an array ... but" added "using ptr" |
16:37:06 | FromDiscord | <Ayy Lmao> In reply to @undersquire "u can convert a": How would you write a function that converts a tuple to an array with the type of the first field of the tuple? |
16:37:56 | FromDiscord | <undersquire> let me attempt at an example one sec |
16:39:34 | * | audiophile_ joined #nim |
16:39:53 | * | audiophile_ quit (Client Quit) |
16:40:42 | * | audiophile_ joined #nim |
16:44:32 | FromDiscord | <Clonkk> sent a code paste, see https://play.nim-lang.org/#ix=3wh4 |
16:45:02 | FromDiscord | <undersquire> nvm clonkk's solution is better than mine XD |
16:45:39 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3wh5 |
16:45:59 | FromDiscord | <Ayy Lmao> Not sure if it's completely sound but seems to work in the cases I've tried. Maybe it can be better |
16:47:35 | FromDiscord | <Clonkk> Depends what's your goal for non-homogenuous tuple. Like do oyu want to automatically convert element to your first element is a float ? DO you want a run time error ? |
16:48:10 | FromDiscord | <Clonkk> My solution will simply not compile if your tuple is not homogenuous |
16:50:54 | FromDiscord | <Ayy Lmao> In reply to @Clonkk "Depends what's your goal": Actually converting to the first element sounds pretty good. Not compiling seems better than a runtime error. |
16:51:02 | madprops | is there a shortcut for: & " " & ? |
16:51:09 | madprops | or is using strformat the only option |
16:52:20 | arkanoid | what's the best way to delete all xml elements with particular tag? |
16:53:12 | arkanoid | xmltree module provides only https://nim-lang.org/docs/xmltree.html#delete%2CXmlNode%2CNatural that deletes given parent and index |
16:53:29 | arkanoid | that forces to do weird loop to delete them all |
16:54:51 | FromDiscord | <Rika> Loop backwards |
16:55:21 | FromDiscord | <Rika> That way deleting a node doesnât change index |
16:55:30 | arkanoid | but is it possible to iterate an iterator backwards? |
16:55:39 | arkanoid | I mean XmlNode items |
16:56:10 | FromDiscord | <Rika> Get child count and get child with the index? |
16:57:54 | arkanoid | I really like overengineering things! Your solution is too simple |
16:57:56 | arkanoid | :D |
16:57:58 | arkanoid | .. thanks |
16:58:44 | FromDiscord | <Rika> If you really want the reverse iterator just make it with the index thing I said I donât know |
16:58:55 | FromDiscord | <Rika> (edit) "said" => "said," |
17:00:50 | FromDiscord | <leorize> there aren't any way |
17:00:51 | FromDiscord | <leorize> you can just do a `for idx in countdown(node.len - 1, 0)` though |
17:04:13 | arkanoid | yeah I've already implemented the recursive countdown thing |
17:25:06 | * | Onionhammer joined #nim |
17:37:28 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3wht |
17:48:45 | * | Onionhammer quit (Ping timeout: 258 seconds) |
18:19:59 | FromDiscord | <tandy> how do you escape a " in a string in nim? |
18:21:26 | FromDiscord | <haxscramper> `\"` |
18:21:41 | FromDiscord | <haxscramper> Or `r"raw string lit""eral"` |
18:21:54 | * | max22- quit (Ping timeout: 272 seconds) |
18:22:40 | FromDiscord | <haxscramper> or `"""raw string lit"eral"""` |
18:23:34 | FromDiscord | <tandy> i did this but when i echo the string it shows up |
18:23:59 | FromDiscord | <tandy> trying this now |
18:25:39 | FromDiscord | <haxscramper> !eval echo "raw string lit"eral" |
18:25:41 | NimBot | Compile failed: /usercode/in.nim(1, 26) Error: closing " expected |
18:25:53 | FromDiscord | <haxscramper> !eval echo "raw string lit"eral" |
18:25:55 | NimBot | Compile failed: /usercode/in.nim(1, 26) Error: closing " expected |
18:25:58 | FromDiscord | <haxscramper> wtf |
18:26:17 | FromDiscord | <tandy> !eval echo """ test " wow """ |
18:26:19 | NimBot | test " wow |
18:26:33 | FromDiscord | <haxscramper> yes, matrix is being extra smart with `\"` |
18:26:53 | FromDiscord | <tandy> reee |
18:27:06 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/9P8 |
18:27:41 | FromDiscord | <tandy> hm |
18:29:49 | madprops | is there way to check if a char is a number? |
18:30:19 | FromDiscord | <haxscramper> \`ch in '0' .. '9' |
18:30:29 | madprops | ah nice |
18:40:29 | * | xet7 quit (Remote host closed the connection) |
18:41:29 | * | xet7 joined #nim |
18:59:38 | * | max22- joined #nim |
19:03:58 | * | stkrdknmibalz joined #nim |
19:14:30 | FromDiscord | <PsychoClay> for some reason orc keeps killing my threads đŠ no exceptions or anything |
19:15:13 | FromDiscord | <Yardanico> In reply to @PsychoClay "for some reason orc": orc can't "kill threads" :P |
19:15:38 | FromDiscord | <PsychoClay> well when i use the default gc they dont die |
19:25:31 | madprops | is it not possible to have very big ints? int64(10000000000000000000) |
19:27:16 | FromDiscord | <Yardanico> it is possible |
19:28:07 | FromDiscord | <Yardanico> ah wait |
19:28:14 | FromDiscord | <Yardanico> your number is out of int64 range, it's not possible obviously :) |
19:28:27 | madprops | saw some int128 but it's for compiler use only |
19:28:30 | FromDiscord | <Yardanico> nim doesn't support arbitrary precision integers by default, and "int64" is clearly a 64-bit integer |
19:28:38 | FromDiscord | <Yardanico> In reply to @madprops "saw some int128 but": there are libs like https://github.com/status-im/nim-stint |
19:40:15 | NimEventer | New thread by Cnerd: Wrapping cpp code, see https://forum.nim-lang.org/t/8339 |
19:40:19 | * | xet7 quit (Remote host closed the connection) |
19:42:37 | * | xet7 joined #nim |
19:47:11 | * | _KurtGodel_ quit (Read error: Connection reset by peer) |
19:47:33 | * | _KurtGodel_ joined #nim |
19:49:04 | * | xet7 quit (Quit: Leaving) |
19:56:18 | FromDiscord | <RattleyCooper> is it possible to get the string result of `execShellCmd`? It doesn't appear to write results to `stdout` or anything like that. `osproc` procs only work on binaries like exes and whatnot (`dir` throws an error saying command is not found on windows when using `osproc`). |
19:57:01 | FromDiscord | <RattleyCooper> `execCmdEx` works on binaries but not commands like `dir` |
19:58:14 | FromDiscord | <RattleyCooper> (edit) "`execCmdEx` works on binaries but not ... commands" added "system" |
19:58:34 | FromDiscord | <demotomohiro> I think you can call command like `dir` with `osproc` procs by using `poEvalCommand`. |
19:58:48 | FromDiscord | <RattleyCooper> You would think that would be the case but it's not |
19:59:18 | madprops | not sure how im using strformat wrong here https://play.nim-lang.org/#ix=3wim |
19:59:54 | FromDiscord | <RattleyCooper> In reply to @demotomohiro "I think you can": even with `poEvalCommand` I get the error: `"Requested command not found: \'dir\'. OS error:` |
20:00:23 | madprops | the first one doesn't work, the second one does |
20:01:57 | FromDiscord | <RattleyCooper> `strformat` has syntax like `fmt"{var1}, {var2}, {var3}"` |
20:03:30 | FromDiscord | <Yardanico> In reply to @RattleyCooper "even with `poEvalCommand` I": can you show the code you're using to use execShellCmd? |
20:03:42 | FromDiscord | <Yardanico> I think I know why it's failing |
20:04:30 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3wip |
20:04:34 | FromDiscord | <Yardanico> yeah, exactly, maybe he missed poUsePath |
20:04:42 | FromDiscord | <Yardanico> also no need for cmd /c :P |
20:05:26 | FromDiscord | <Yardanico> ah wait, maybe it's different on windows |
20:05:34 | FromDiscord | <Yardanico> on linux it's an actual binary, seems like it's not on windows? |
20:05:50 | FromDiscord | <Yardanico> also @RattleyCooper if you just need to know the current directory, you don't need to use osproc |
20:05:56 | FromDiscord | <RattleyCooper> Well `execShellCmd` doesn't take any `po` options |
20:05:58 | FromDiscord | <enthus1ast> does one know how to catch a compile time exception? |
20:06:00 | FromDiscord | <Yardanico> https://nim-lang.org/docs/os.html#getCurrentDir |
20:06:30 | FromDiscord | <RattleyCooper> No, not looking for cwd, I actually need to issue system commands |
20:06:37 | FromDiscord | <RattleyCooper> And get the result |
20:07:09 | FromDiscord | <RattleyCooper> I am testing with @demotomohiro's example really quick |
20:07:28 | FromDiscord | <haxscramper> Inside of a macro you can just use `try/catch` |
20:07:29 | FromDiscord | <haxscramper> Outside of a macro or inside? |
20:07:31 | FromDiscord | <RattleyCooper> My original command was `var procRes = execCmdEx(theCommand, options={poEvalCommand, poUsePath})` |
20:07:39 | FromDiscord | <haxscramper> But when macro is expanded there is no way |
20:07:51 | FromDiscord | <enthus1ast> i want to use doAssertRaises in a test |
20:07:57 | FromDiscord | <enthus1ast> outside a macro |
20:08:21 | FromDiscord | <haxscramper> you want to check whether macro actually gives and error on invalid input? |
20:08:27 | FromDiscord | <enthus1ast> yes |
20:08:39 | FromDiscord | <haxscramper> no, there is no way to test it using only code |
20:08:43 | FromDiscord | <haxscramper> you might use `testament` for this, and check for compilation output |
20:08:50 | FromDiscord | <enthus1ast> i could mybe testament |
20:08:51 | FromDiscord | <enthus1ast> yes |
20:08:52 | FromDiscord | <enthus1ast> \:) |
20:09:19 | FromDiscord | <haxscramper> https://nim-lang.org/docs/testament.html I thin `nimout:` is what you need |
20:09:33 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wiq |
20:09:45 | FromDiscord | <haxscramper> or errmgs |
20:12:21 | FromDiscord | <enthus1ast> i'm thinking, if macro exceptions are not catchable it might be a bad idea to throw them at all |
20:13:08 | FromDiscord | <enthus1ast> on the other side, it is a non recoverable error |
20:14:31 | FromDiscord | <haxscramper> I do throw exceptions in macros, because it allows for more natural code in the macro implementation |
20:14:32 | FromDiscord | <haxscramper> just raise things |
20:14:40 | FromDiscord | <enthus1ast> yes |
20:14:57 | FromDiscord | <haxscramper> I've also added helper tools for exceptions that allow me to actually produce adequate error messages |
20:15:06 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wit |
20:15:23 | FromDiscord | <RattleyCooper> @demotomohiro , @Yardanico, thanks for the tips! Got it working. It needed the `cmd /c` prefixed to the command. That was the piece I was missing. |
20:15:42 | FromDiscord | <haxscramper> I get stacktrace and actually error that shows what the fuck is wrong in the code, and no just "\<line\>\:\<column\> \<someone messed up something here\>" |
20:15:51 | FromDiscord | <enthus1ast> oh nice [haxscramper](https://matrix.to/#/@haxscramper:matrix.org) |
20:15:51 | FromDiscord | <haxscramper> And `error` had some troubles with that |
20:16:33 | * | tdc quit (Ping timeout: 248 seconds) |
20:18:34 | madprops | so apparently what goes inside vars in &"{...}" is not evaluated with the currernt imports, but from the strformat namespace, if that's make sense. so i have to calculate some stuff beforehand |
20:27:12 | FromDiscord | <Yardanico> that's not exactly true, strformat's macro expands in your current invocation site |
20:27:14 | FromDiscord | <Yardanico> afaik |
20:27:59 | madprops | i had to precalculate some variables though, or else it failed "no parseInt" it would say |
20:28:18 | madprops | so Im guessing it had no access to strutils ? |
20:29:06 | madprops | i'll run a quick test |
20:29:48 | madprops | ah weird it works in the playground |
20:32:55 | madprops | oh i forgot one little detail |
20:32:59 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wiy |
20:33:14 | madprops | it only wouldn't work in the integration test |
20:33:28 | FromDiscord | <enthus1ast> strange my (matrix) element always renders nim code blocks super strange |
20:34:16 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3wiz |
20:35:53 | * | Vladar quit (Quit: Leaving) |
20:35:53 | FromDiscord | <enthus1ast> it is the\: `errormsg` and the `file` |
20:38:15 | FromDiscord | <haxscramper> In reply to @Yardanico "that's not exactly true,": it cannot bind symbols from the surrounding scope |
20:38:48 | FromDiscord | <haxscramper> or rather, it injects idents, while symbol might be a gensym so they are considered different |
20:41:03 | madprops | if I run the integration test, it fails here: `return &"{numberwords(parseInt(split[0]))} point {numberwords(parseInt(split[1]))}"` |
20:41:11 | madprops | but if I run it inside the file itself it works fine |
20:43:37 | madprops | it's this known, or should I make a forum thread? |
20:44:51 | FromDiscord | <haxscramper> it fails how exactly? |
20:45:06 | madprops | it complains parseInt doesn't exist |
20:45:17 | FromDiscord | <haxscramper> You can make a multifile example in https://wandbox.org/ |
20:45:26 | FromDiscord | <haxscramper> try importing parseutils? |
20:45:26 | madprops | ok |
20:45:55 | madprops | oh i thought it would use strutils for that |
20:45:56 | FromDiscord | <haxscramper> it might have something to do with binding rules ... do you have strformat in genric/template/macro-expanded-code? |
20:46:16 | FromDiscord | <haxscramper> it is from strutils ... anyway, I meant to just import module with parseInt |
20:46:46 | madprops | strutils has parseint |
20:46:59 | madprops | importing parseutils doesn't change it |
20:47:12 | madprops | i'll try making the files example |
21:10:04 | * | xet7 joined #nim |
21:18:30 | FromDiscord | <chicken mcnuggets> hi there im a nubie at nim and was wondering when to use a ref object and when to use a pointer object |
21:18:39 | FromDiscord | <chicken mcnuggets> (edit) "use" => "create" |
21:18:44 | FromDiscord | <chicken mcnuggets> (edit) "use" => "create" |
21:20:18 | FromDiscord | <Yardanico> In reply to @chicken mcnuggets "hi there im a": wdym "pointer object"? |
21:20:38 | FromDiscord | <chicken mcnuggets> something like this |
21:20:44 | FromDiscord | <chicken mcnuggets> sent a code paste, see https://paste.rs/YUc |
21:20:47 | FromDiscord | <Yardanico> this is a stack (value) object, not a pointer one |
21:21:00 | FromDiscord | <chicken mcnuggets> ohoh could u elaborate |
21:21:27 | FromDiscord | <enthus1ast> `` is nim's export marker |
21:21:30 | FromDiscord | <zidsal> @enthus1ast I am late too the party it is possible to test for macro throwing exceptions I do it |
21:21:43 | * | max22- quit (Remote host closed the connection) |
21:21:54 | FromDiscord | <Yardanico> In reply to @enthus1ast "`*` is nim's export": ah, forgot that some people might mistake it for this |
21:22:02 | FromDiscord | <Yardanico> yeah, in nim is not a pointer marker, it's an export marker |
21:22:06 | FromDiscord | <chicken mcnuggets> Ohhh |
21:22:06 | FromDiscord | <tandy> is there sugar for \`& " " &\` when combining strings like in python with \`, \`? |
21:22:09 | FromDiscord | <chicken mcnuggets> i see |
21:22:12 | FromDiscord | <Elegantbeef> It works like `public` in other languages |
21:22:22 | FromDiscord | <zidsal> never mind you've already worked it out |
21:22:28 | FromDiscord | <Yardanico> and usually you use a value object unless you need shared ownership or a recursive object |
21:22:37 | FromDiscord | <Yardanico> also see https://forum.nim-lang.org/t/3869 |
21:23:21 | FromDiscord | <chicken mcnuggets> can you explain what an export marker is lol |
21:23:31 | FromDiscord | <chicken mcnuggets> like it can be exported? |
21:23:32 | FromDiscord | <chicken mcnuggets> LOL |
21:23:32 | FromDiscord | <Yardanico> as elegant beef said |
21:23:36 | FromDiscord | <Yardanico> public in other languages |
21:23:37 | FromDiscord | <chicken mcnuggets> ohh |
21:23:39 | FromDiscord | <chicken mcnuggets> gotcha |
21:23:46 | FromDiscord | <Yardanico> have you read first two nim tutorials? |
21:23:57 | FromDiscord | <Yardanico> also https://narimiran.github.io/nim-basics/ is useful |
21:24:03 | FromDiscord | <chicken mcnuggets> ty |
21:25:05 | FromDiscord | <haxscramper> In reply to @zidsal "<@!551349731532603393> I am late": do you have an example? |
21:25:15 | FromDiscord | <haxscramper> I would much rather prefer to know how to do this |
21:25:18 | FromDiscord | <zidsal> yup so I've only got it to work with testament |
21:25:32 | FromDiscord | <zidsal> is my test |
21:25:34 | FromDiscord | <zidsal> sent a code paste, see https://play.nim-lang.org/#ix=3wiT |
21:25:50 | FromDiscord | <haxscramper> oh, well, I thought it is something built-in |
21:26:00 | FromDiscord | <zidsal> sent a code paste, see https://play.nim-lang.org/#ix=3wiU |
21:26:16 | * | max22- joined #nim |
21:26:20 | FromDiscord | <zidsal> na it would be hard to build it in, if it errors at compile time! I'm just glad there is a way to do it |
21:26:56 | FromDiscord | <zidsal> (edit) "na it would be hard to build it in, if it errors at compile time! ... I'm" added "(how can you compile the test to run it if the macro errors at compliation)" |
21:28:39 | FromDiscord | <zidsal> I should prob make a pr to update the testament doc's as that wasn't document anywhere I had to dig through the testament code to find it as I was convinced there must be a way this is tested for the compiler project |
21:30:23 | FromDiscord | <haxscramper> Well, technically it is in the documentation, but considering they literally go like "the doc is not full, go dig in the source code, good luck" |
21:36:35 | NimEventer | New thread by Lecale: Nim for UI Automation, see https://forum.nim-lang.org/t/8340 |
21:53:07 | * | Pyautogui joined #nim |
21:58:50 | * | Pyautogui quit (Quit: Connection closed) |
22:07:42 | * | max22- quit (Quit: Leaving) |
22:17:20 | FromDiscord | <enthus1ast> also for async code, usually my "class" object in async code is a ref, since var cannot be capturedâ”(@Yardanico) |
22:37:32 | * | audiophile_ quit (Ping timeout: 245 seconds) |
22:42:21 | * | Gustavo6046 joined #nim |
22:42:31 | Gustavo6046 | Good evening! :) |
22:42:46 | Gustavo6046 | I've been interested in Nim lately, seeing how it compares to Rust and yet also how simple it also is. |
22:43:10 | Gustavo6046 | https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers I'd like to point out that Python _does_ have fixed-size types, in its *ctypes* standard module. Though they're more often used for C bindings, which is fair. |
22:55:27 | * | flynn quit (Read error: Connection reset by peer) |
22:56:34 | * | flynn joined #nim |
23:04:35 | * | Onionhammer joined #nim |
23:12:55 | FromDiscord | <Yardanico> you can modify this wiki, it's not an official resource but rather user-contributed |
23:51:58 | madprops | what is the common equivalent of comparing datetimes in js like Date.now () - somedate in nim? Should I instantiate Time objects and compare those? |
23:52:28 | madprops | also is the standard to use milliseconds or other? |
23:57:40 | FromDiscord | <dom96> use the times module |
23:57:43 | * | systemds1cks is now known as systemdsucks |
23:59:07 | madprops | I'm trying: int64(getTime().seconds) - seconds |