<< 11-02-2022 >>

00:12:37*jmdaemon quit (Ping timeout: 256 seconds)
00:13:06*jmdaemon joined #nim
00:35:53*vicfred quit (Quit: Leaving)
00:50:20*arkurious quit (Quit: Leaving)
00:55:06*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
01:29:21*jmdaemon quit (Ping timeout: 256 seconds)
02:04:22*krux02 quit (Remote host closed the connection)
02:09:17*neurocyte0917090 quit (Ping timeout: 240 seconds)
02:25:44*jmdaemon joined #nim
03:58:58FromDiscord<creikey> how do I add a compile error for not implemented yet if a function is used
03:59:02FromDiscord<creikey> is it {.stub}
04:00:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3PgX
04:01:13FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3Ph0
04:01:32FromDiscord<Elegantbeef> Yep
04:01:34FromDiscord<creikey> it looks like it doesn't like when I specify a return type
04:03:11FromDiscord<Elegantbeef> Works fien here
04:03:14FromDiscord<Elegantbeef> fine even
04:03:23FromDiscord<creikey> yeah I had a separate error it works fine
04:03:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ph2
04:03:33FromDiscord<creikey> lol https://media.discordapp.net/attachments/371759389889003532/941544963462791188/unknown.png
04:06:02*supakeen quit (Quit: WeeChat 3.4)
04:06:32*supakeen joined #nim
05:09:45*Gustavo6046 joined #nim
05:54:47*rockcavera quit (Remote host closed the connection)
06:01:44*Mister_Magister quit (Quit: bye)
06:25:41*Gustavo6046 quit (Remote host closed the connection)
06:26:22*Gustavo6046 joined #nim
06:27:11*Gustavo6046 quit (Remote host closed the connection)
06:27:39*Gustavo6046 joined #nim
06:28:30*Gustavo6046 quit (Max SendQ exceeded)
06:30:04NimEventerNew post on r/nim by Familiar_Ad_8919: what does -d:strip do?, see https://reddit.com/r/nim/comments/spshvg/what_does_dstrip_do/
06:52:52FromDiscord<fagci> sent a code paste, see https://play.nim-lang.org/#ix=3Phu
06:54:20FromDiscord<Rika> try finally block?
06:55:19FromDiscord<fagci> In reply to @Rika "try finally block?": But how can I get an exception here?
06:55:29FromDiscord<Rika> You don’t need to
06:56:42FromDiscord<fagci> Will `finally` block executed at return from function?
06:56:49FromDiscord<Elegantbeef> Why are you returning so much
06:58:17FromDiscord<fagci> In reply to @Elegantbeef "Why are you returning": That is the part of my initial message topic 🙂
07:02:14FromDiscord<Elegantbeef> Or does it raise an exception?
07:02:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Phz
07:03:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3PhA
07:06:03FromDiscord<Rika> Async doesn’t really have exceptions afaik
07:14:52FromDiscord<fagci> sent a code paste, see https://paste.rs/8cs
07:15:22FromDiscord<fagci> `asyncCheck` doesn't helps
07:15:57FromDiscord<Elegantbeef> That's an async issue i dont deal with those
07:16:01FromDiscord<Elegantbeef> Rika you're up!
07:16:59FromDiscord<fagci> https://github.com/fagci/nim-nr/blob/refactor/netrandom.nim
07:18:04FromDiscord<enthus1ast> you are supposed to await fut.withTimeout(CONN\_TIMEOUT),↵then check if the return value is true or false and act accordingly
07:21:23FromDiscord<fagci> But now we have an ladder of ifs 🙂↵Maybe not critical now...but I prefer to master that 🙂
07:21:30FromDiscord<fagci> (edit) "that 🙂" => "that."
07:21:54FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3PhD
07:22:37FromDiscord<fagci> sent a code paste, see https://play.nim-lang.org/#ix=3PhE
07:22:51FromDiscord<fagci> (edit) "https://play.nim-lang.org/#ix=3PhE" => "https://play.nim-lang.org/#ix=3PhF"
07:23:40FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/YKo
07:23:43FromDiscord<enthus1ast> i know its a little bloaty
07:24:30FromDiscord<enthus1ast> and the other question is what happens with the socket
07:24:36FromDiscord<Rika> In reply to @Elegantbeef "Rika you're up!": I was walking sorry
07:27:51FromDiscord<fagci> In reply to @enthus1ast "and the other question": Yes, socket can be closed by remote when `send` or `recv`, but for now I dont get an exceptions. With `if await ...`
07:28:20FromDiscord<fagci> (edit) "exceptions. With" => "exceptions with"
07:30:13FromDiscord<enthus1ast> what do you mean? Afaik the only reliable way to detect a closed socket is by reading from it
07:31:45FromDiscord<enthus1ast> i mean, if the remote hung up
07:35:06FromDiscord<fagci> In reply to @enthus1ast "what do you mean?": Earlier, when I use an another construction, there was an exceptions, such as `Connection reset by peer`, `Connection refused` when `read`. With sync socket there is `isDisconnectionError()` or `lastError` attribute.
07:35:37FromDiscord<fagci> In reply to @enthus1ast "i mean, if the": Agree
07:36:01FromDiscord<enthus1ast> try and catch around the connect should work in this case
07:36:56FromDiscord<enthus1ast> but in the withTimeout case im not sure honestly where to put the try catch
07:52:45*PMunch joined #nim
07:58:51*Gustavo6046 joined #nim
09:06:39*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
09:09:24*cyraxjoe joined #nim
09:21:31*jjido joined #nim
09:40:06NimEventerNew Nimble package! uap - Nim implementation of user-agent parser, see https://gitlab.com/artemklevtsov/nim-uap/-/blob/master/README.md
09:44:21arkanoidjust recompiled my project with 1.6.4: nim-1.6.4/lib/pure/asyncnet.nim(224) sendPendingSslDataIter SIGSEGV: Illegal storage access. (Attempt to read from nil?) Segmentation fault (core dumped)
09:45:55arkanoidit does not happen with 1.6.2
09:52:47arkanoidalso nim ssl socket are too slow to be usage
09:52:50arkanoid*usabe
09:52:55arkanoiddamn keyboard
09:54:19FromDiscord<Elegantbeef> general you are using a release build
10:02:47arkanoidyes I do
10:03:25FromDiscord<Rika> Async stack traces aren’t super helpful though, usually
10:27:18PMunchHaha! I managed to crack the code for getting the hash of a module without importing it :)
10:27:45FromDiscord<Elegantbeef> How?
10:29:31PMunchThis should give superlog the ability to store the hash of the sending module in a static generic field, so that way you could have a `LogMessage[module: static[ModuleSig](msg: string)` and then simply call `log Debug, "My message"` which would convert it into that, and then attach a logger to the generic version with a certain module
10:29:34FromDiscord<Rika> Get the file contents and hash that :OmegaLUL:
10:29:36FromDiscord<Rika> I’m joking
10:29:38PMunchHaha
10:30:02FromDiscord<Rika> What did you do
10:30:02PMunchNo I basically added some small pieces to a test compiler to see what it actually hashes for a module
10:30:33PMunchSo if you do `import some/folder/structure/mymodule` it hashes `mymodule.unknown.mymodule.unknown.`
10:30:34FromDiscord<Rika> Better compiler API when
10:30:44FromDiscord<Rika> Inb4 pinged about skull
10:31:11PMunchIf you do `import somemodule as mymodule` that hashes as the same thing
10:32:16PMunchSo I figured if I simply include an empty nim file in my project `nop.nim` then I can do `import nop as <whatever identifier the user passed>` and signatureHash that symbol I will get the same hash as a module of the same name would give me
10:32:35*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:33:53FromDiscord<Rika> What that sounds cursed
10:35:48PMunchI mean it sounds a bit broken
10:36:37PMunchIf module A imports module C, and module B imports module D as C then A will report module Cs hash as the same as B will report module Ds hash
10:36:43*Vladar joined #nim
10:37:03PMunchI don't think you're really supposed to hash module nodes :P
10:38:35*Gustavo6046 quit (Remote host closed the connection)
10:58:37*krux02 joined #nim
10:59:39*jjido joined #nim
11:05:25*Gustavo6046 joined #nim
11:23:57*jmdaemon quit (Ping timeout: 240 seconds)
11:32:04FromDiscord<Goel> `include` 🧠
11:32:20*rockcavera joined #nim
11:32:20*rockcavera quit (Changing host)
11:32:20*rockcavera joined #nim
11:35:14Amun-Rado I recall correctly you can't test import in try/except block in Nim?
11:35:41PMunchWhat do you mean?
11:36:15Amun-Raequivalent of python's try: import module except ImportError: pass
11:36:26PMunchYou could do `when compiles(import mymodule): import mymodule` I guess
11:36:45Amun-Raah, I keep forgetting 'compiles' is a thing
11:36:53PMunchThat would catch if there is anything in the file that doesn't compile though :P
11:36:58PMunchNot just that if the file exists
11:37:22Amun-RaI'm fine with that
11:38:02Amun-Rahttps://play.nim-lang.org/#ix=3Pii
11:39:04PMunchWhat are you trying to do though?
11:39:51Amun-RaI just wanted to have an alternative way of checking if my module compiles on given platform instead of using when
11:40:09Amun-RaI was just curious if it works
11:41:11Amun-RaI'm fine with when+elif
11:42:12Amun-Racompiles works with expressions, you can't test imports with it
11:45:05PMunchHmm, you're right
11:55:52PMunchHmm, what is an nnkConv?
11:57:09FromDiscord<Rika> Converter? I don’t know
11:57:29PMunchNah that seems to be an nnkConverterDef
11:57:50PMunchOh wait
11:57:53PMunchConversion maybe?
12:06:01*supakeen quit (Quit: WeeChat 3.4)
12:06:55*supakeen joined #nim
12:15:46arkanoidI'm getting kind of tired of weird nim behaviours. I'm not having failing AsyncHttpClient.requests in docker contaienr, but `curl` works on identical url on same docker container, but nim return status is 200 OK. What kind of headers is it putting by default?!
12:16:04arkanoids/not having/now having/
12:20:36FromDiscord<Rika> nim headers do not preserve case sensitivity. some servers do not follow http spec and use "canonical" header capitalisation
12:20:38FromDiscord<Rika> might be related
12:21:45supakeenthere's plenty in (async)httpclient sadly, i suggest taking a look with either httpmitm, ngrep, or tcpdump what it's actually sending
12:22:28supakeencookie headers are especially worrisome
12:23:51supakeenthis sadly went stale: https://github.com/nim-lang/Nim/pull/15478
12:24:08supakeenhttps://github.com/nim-lang/Nim/pull/15484 so did that
12:24:11supakeenbecause i got busy :(
12:28:16NimEventerNew Nimble package! watchout - ⚡️ Just... yellin' for changes! File System Monitor for devs, see https://github.com/openpeep/watchout
12:28:17NimEventerNew Nimble package! madam - Local webserver for Design Prototyping and Front-end Development, see https://github.com/openpeep/madam
12:29:05FromDiscord<Rika> damn a fuckin custom embed
12:30:32FromDiscord<ajusa> Wow these guys have a lot of stuff
12:31:02FromDiscord<ajusa> Template engine, web server, JSON validation
12:31:06FromDiscord<Rika> apparently its a single dude too
12:33:13PMunchI think they're a company
12:33:18PMunchTheir bio is: A talent-driven, creative agency, focused on developing Open Source, SaaS products, and other cool things. Based in South Eastern Europe — Bucharest, RO
12:36:20supakeenawesome
12:38:09PMunchHmm, comparing types is a pain
12:39:38PMunchMaybe I should abandon keeping a table of type -> callback and simply just store the type nodes and then generate log templates for each type when you import superlog
12:41:20PMunchAnd just let Nim type evaluation handle the dirty work of resolving aliases and generic types
13:26:14*arkurious joined #nim
13:44:52*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:55:12PMunchWhy is instantiationInfo so damn fickle..
13:58:25FromDiscord<enthus1ast> what is the prefered way to check if a string (a password) contains at least one of a set of chars (some special chars?)
13:58:48PMunchallIt from strutils?
13:59:00PMunchOh wait, at least one of
13:59:08FromDiscord<Rika> anyIt
13:59:09FromDiscord<Rika> lol
13:59:33PMunchProblem with that is that you have to loop through it once per rule
14:00:03FromDiscord<Rika> collect
14:00:13FromDiscord<Rika> well collect doesnt really work that way ig
14:00:42FromDiscord<enthus1ast> yes anyIt
14:00:42FromDiscord<Rika> collect + any(@[bool]) loooool naive solution moment
14:01:02FromDiscord<enthus1ast> thank you both (its from sequtils btw)
14:02:54PMunchI think I'd convert it to a set[char] and then check that the character you require are a subset of that set
14:04:14FromDiscord<Rika> didnt he say it was a set of chars already
14:04:33FromDiscord<enthus1ast> jeah technically no \:)
14:05:12PMunchHmm is there really no easy way to convert a string to a set[char]?
14:05:41PMunchI mean you can create a HashSet easily, but that's a bit heavy for this simple task..
14:07:25FromDiscord<enthus1ast> have done it differntly now
14:07:26FromDiscord<enthus1ast> the nice thing about this is, i compile it to js and c backend, so i check in the browser and in the backen with the same code \:)
14:07:26FromDiscord<enthus1ast> i'm always happy when i can do stuff like this
14:07:30FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Pj7
14:08:02FromDiscord<frankzig> is there a package in nim to facilitate writing read-eval loops?
14:08:12FromDiscord<Rika> not that i know of, no
14:17:49*dtomato quit (Ping timeout: 240 seconds)
14:18:57FromDiscord<enthus1ast> what does this mean?↵(@frankzig)
14:19:29FromDiscord<enthus1ast> or, what is your issue?
14:23:02FromDiscord<frankzig> I'm in the process of writing a tool for my research group
14:23:19*Gustavo6046 quit (Remote host closed the connection)
14:23:35FromDiscord<frankzig> this tool will take in commands and settings as text and execute/print-out-results
14:24:06FromDiscord<frankzig> at the moment I'm manually writing a while loop with conditions to run each function etc etc.
14:24:44FromDiscord<frankzig> Since for CLI tools there is the awesome CLIGEN which does miracles, i.e. it takes a function as input and it turns the function into a fully functional cli interface
14:25:00FromDiscord<frankzig> I was wondering if there is somthing like that for read-eval loops
14:25:08*dtomato joined #nim
14:25:10FromDiscord<haxscramper> what kind of dispatching you are looking for in the loop?
14:25:55FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Pjg
14:26:05FromDiscord<frankzig> that's exactly what i'm doing
14:26:09FromDiscord<haxscramper> https://nim-lang.github.io/fusion/src/fusion/matching.html
14:26:39FromDiscord<frankzig> a okay this sounds useful
14:27:02FromDiscord<haxscramper> or you can `case` on enum value, pattern matching is overkill most of the time
14:27:46FromDiscord<haxscramper> and I hate this `case` overload bs, so if you are looking for a tool that other people use your best bet would probably be to unparse input commands into variant object
14:27:52FromDiscord<haxscramper> other people can read
14:28:21FromDiscord<frankzig> sent a code paste, see https://play.nim-lang.org/#ix=3Pjh
14:28:24FromDiscord<frankzig> very primitive looking
14:28:50FromDiscord<enthus1ast> You can also use scanstr for this
14:28:59FromDiscord<enthus1ast> Pardon strscan
14:29:38FromDiscord<enthus1ast> https://nim-lang.org/docs/strscans.html
14:32:06FromDiscord<haxscramper> In reply to @frankzig "atm this is what": you are expecting to have a complicated CLI setup with lots of commands, or this is all?
14:32:51FromDiscord<haxscramper> if that's all there is to it, just leave it as it is, maybe you can get a little better with strscans, but I"m not sure
14:34:13FromDiscord<haxscramper> https://github.com/haxscramper/hmisc/blob/50d39c2d62fadbfcc89621ed6208263cf876fe31/src/hmisc/algo/tscanf.nim https://github.com/haxscramper/hmisc/blob/50d39c2d62fadbfcc89621ed6208263cf876fe31/tests/tScanf.nim I have old unused wrapper for scanf that injects types
14:34:17*Gustavo6046 joined #nim
14:34:38FromDiscord<haxscramper> so you can do `if cmd.tscanf("pop $i")` and it will inject integer on match
14:34:54FromDiscord<enthus1ast> there also is\: https://github.com/jangko/nim-noise↵but have not used it in years
14:35:55FromDiscord<haxscramper> In reply to @haxscramper "https://github.com/haxscramper/hmisc/blob/50d39c2d6": @frankzig if you want you can just copy the implementation to your code as is without importing my whole library
14:37:16FromDiscord<enthus1ast> @haxscramper\: btw the documentation for hnimast is down
14:40:34FromDiscord<haxscramper> Nim doc shat itself again
14:41:10FromDiscord<haxscramper> And I'm too tired of debugging this foe the nth time, so it is going to stay this way
14:41:30FromDiscord<haxscramper> Hcparse can't generate documentation for itself as well
14:41:33FromDiscord<haxscramper> And hnimast too
14:42:52FromDiscord<haxscramper> And I figured out a much better API for the AST superstructures and all that kind of thing, so I will deprecate this library at some point
14:44:24FromDiscord<haxscramper> Actually I think I never managed to make it work correctly
14:44:34FromDiscord<enthus1ast> i must admit every time i look into this lib, i'm a little overwhelmed
14:44:47FromDiscord<haxscramper> For example links on the readme were added only because index.html was 404 all the time
14:45:01FromDiscord<enthus1ast> so I've never used it
14:45:04FromDiscord<haxscramper> Because it is a garbage pile
14:45:39FromDiscord<haxscramper> The API is wrong and it sits on top of the legacy hacks, that in turn sit on top of the barely documented compiler API
14:46:04FromDiscord<enthus1ast> yes i understand
14:46:56FromDiscord<haxscramper> https://github.com/haxscramper/nimskull/blob/docgen3/compiler/tools/docgen_unparser.nim this is a lot more compact solution
14:52:36FromDiscord<Hel> Hello, i was just wondering which Nim version is more stable 1.2.16 or 1.6.4
14:53:06FromDiscord<Hel> i'm asking cause when compiling a project with 1.2.16 and arc on i got a compilation error in nim's C files
14:53:14FromDiscord<Hel> after updating to 1.6.4 arc worked fine
14:54:26FromDiscord<konsumlamm> stabe in the sense that it has less bugs? then always the latest version (currently 1.6.4)
14:54:32FromDiscord<konsumlamm> (edit) "stabe" => "stable"
14:55:44*jjido joined #nim
14:56:19FromDiscord<fwsgonzo> Hey guys. As usual, I have a strange question: How can I force a crash in Nim?
14:56:30FromDiscord<fwsgonzo> (edit) "Hey guys. As usual, I have a strange question: How can I force a crash in Nim? ... " added "That is, what's the simplest way"
14:56:33FromDiscord<konsumlamm> what kind of crash?
14:56:38FromDiscord<Hel> In reply to @konsumlamm "stable in the sense": yeah stable as in less bugs
14:56:53FromDiscord<konsumlamm> you mean like a segmentation fault? or just exit with some exit code? or throw an exception?
14:57:06FromDiscord<fwsgonzo> anything that causes a signal handler to be called, I guess, like a CPU exception
14:57:21FromDiscord<fwsgonzo> i just want to test the Nim backtrace functionality works
14:57:25FromDiscord<Hel> oh i just segfaulted with orc
14:57:28FromDiscord<fwsgonzo> (edit) "i just want to test the Nim backtrace functionality works ... " added "in a RISC-V program"
14:57:30FromDiscord<Hel> when using 1.2.16
14:57:35FromDiscord<Hel> arc just crashes at compile time tho
14:57:45FromDiscord<konsumlamm> In reply to @Hel "yeah stable as in": `devel` is arguably even more stable in that sense, but it also has a higher risk of having regressions (things that worked previously don't work anymore)
14:58:14FromDiscord<Hel> yeah but then why did 1.2 branch receive support for so long
14:58:26FromDiscord<xflywind> 1.6.x has better ARC/ORC support. They are many fixes which are not backported to 1.2.x
14:59:11FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Pjo
14:59:30FromDiscord<xflywind> In reply to @Hel "yeah but then why": Both of 1.6.x and 1.2.x have long term support.
14:59:52*jjido quit (Client Quit)
15:00:24FromDiscord<Hel> ok then thanks for clarifying
15:01:00FromDiscord<Hel> i just thought 1.2 would be more stable cause no features would be added and it'd receive bugfixes only
15:03:15FromDiscord<konsumlamm> some features/changes also make the language more stable
15:04:00FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=3PjB
15:04:08FromDiscord<Hel> In reply to @konsumlamm "some features/changes also make": true
15:07:20FromDiscord<sOkam!> How can I approach binding a whole C game-engine with futhark recursively?↵The example in their readme only mentions bindings for header files that can be listed, but the project is massive
15:08:11PMunchNot entirely sure what you mean?
15:08:26PMunchDo you simply not want to type out all the names of the imports?
15:08:58*neurocyte0917090 joined #nim
15:11:15*neurocyte0917090 quit (Read error: Connection reset by peer)
15:11:36FromDiscord<sOkam!> In reply to @PMunch "Do you simply not": There are hundreds of files. Thought that futhark might be able to handle everything inside a folder (aka the whole engine, with recursive resolution)
15:12:03*neurocyte0917090 joined #nim
15:14:23PMunchYes, that is a planned feature
15:14:32PMunchJust haven't gotten around to implementing that yet
15:15:26FromDiscord<sOkam!> In reply to @PMunch "Just haven't gotten around": I see, makes sense↵Any recommendation of what to do in the meantime?
15:15:52PMunch`find . -name "*.h"` and paste that into a futhark block?
15:16:07PMunchThat's the best you can do at the moment unfortunately
15:16:18PMunchOf course you might not actually need to load every single file
15:16:34FromDiscord<sOkam!> does futhark handle non `.h` files?↵its old code, and the whole header thing is missing for a lot of it
15:16:51PMunchWhat do you mean non .h files?
15:17:03FromDiscord<sOkam!> In reply to @PMunch "What do you mean": `.c` mainly
15:17:15PMunchIt handles anything that can go in an `#import "something.h"` block
15:18:13*neurocyte0917090 quit (Ping timeout: 240 seconds)
15:18:23PMunchTypically you import some kind of header file in your C project, try feeding that import to Futhark. If you're getting errors about a missing type, grep for it in the library and add the header file it shows up in as well
15:18:34PMunchI've gotta run
15:18:34*PMunch quit (Quit: Leaving)
15:24:26nrds<Prestige99> Is there an os independent way to send system level notifications? Like notify-send on Linux, it would be different on mac/bsd/windows
15:34:30madpropsafaik there's not
15:34:44madpropsemail maybe
15:36:22FromDiscord<sOkam!> im not the op, but os check and creating alternative commands for each option sounds a lot cleaner than email 🤔
15:38:11madpropsyeah that sounds easier
15:38:17madpropsand sane
15:38:38madpropsjust checked and i do have notify-send installed
15:40:01FromDiscord<sOkam!> there might be a library that already does that (even if for a different language). could be a matter of binding that to nim 🤷‍♂️
15:55:25FromDiscord<DevNugget> just out of curiosity, does Nim have dead code elimination?
15:58:46FromDiscord<pmunch> Yup
16:14:12FromDiscord<sOkam!> I'm actually going to go with -not- binding the engine. Didn't know this was a thing 🤔 ↵https://gist.github.com/KyrillosWalid/a923c9f980591b8c184368591cd9a9e8
16:42:13FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3PjW
16:42:41FromDiscord<Ayy Lmao> I need to pass a callback that is essentially varargs but it depends on some string passed into the function
17:22:41FromDiscord<Bloss> could a "top level only" label be added to the github? sometimes issues only happen in top level code but work fine when put inside a proc and I don't notice that sometimes
17:24:28FromDiscord<demotomohiro> Why does that happen?
17:25:16FromDiscord<Bloss> destructors get generated differently at top level vs in proc code I think is one case
17:35:25FromDiscord<demotomohiro> Maybe destructors for variables at top level are called after all procedure calls cause the problem?
17:42:13FromDiscord<eyecon> In reply to @nrds "<Prestige> Is there an": Your best bet is AFAIK https://github.com/caronc/apprise
17:43:34nrds<Prestige99> Thanks, I'll check it out
18:12:41*Mister_Magister joined #nim
18:50:35*jjido joined #nim
18:56:28FromDiscord<eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3Pkl
18:57:45FromDiscord<eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3Pkm
18:59:14FromDiscord<eyecon> With `include honeycomb, sugar, strutils` etc. obviously
18:59:23FromDiscord<eyecon> (edit) "`include" => "`import"
18:59:52*jmdaemon joined #nim
19:01:09*vicfred joined #nim
19:06:47FromDiscord<treeform> In reply to @Elegantbeef "<@180601887916163073>\: cause `timezone` ": @Phil You can also do a similar hook with jsony.
19:07:41FromDiscord<Phil> In reply to @treeform "<@!180601887916163073> You can also": My friend, that was almost 6 weeks ago, that was even before I made my accidental issue on your jsony project 😄
19:07:53FromDiscord<KatrinaKitten> In reply to @eyecon "<@!204718116020682753> this was what": Ahhhhh, I see. Yeah, I can add that. Throw up an issue or a PR and I'll get to it when I can 🙂
19:07:54FromDiscord<treeform> also if you use my timezone/calendar stuff it does not have that problem: https://github.com/treeform/chrono and are easy to serialize with nearly any method.
19:08:09FromDiscord<treeform> In reply to @Isofruit "My friend, that was": Sorry I just search for terms I like.
19:08:38*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
19:08:48FromDiscord<Phil> No worries, just know that I actually do use the given hooks to parse datetimes in the default format Django uses
19:14:35FromDiscord<eyecon> In reply to @KatrinaKitten "Ahhhhh, I see. Yeah,": Sure!
20:04:28*neurocyte0917090 joined #nim
20:17:04*Mister_Magister quit (Ping timeout: 250 seconds)
20:18:58*fvs left #nim (WeeChat 3.4)
21:13:21FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3PkS
21:13:27FromDiscord<enthus1ast> currently this prints @[]
21:21:52*jmdaemon quit (Ping timeout: 256 seconds)
21:30:31*vicfred_ joined #nim
21:33:10*vicfred quit (Ping timeout: 260 seconds)
21:33:55*Gustavo6046 quit (Remote host closed the connection)
21:34:30FromDiscord<enthus1ast> ok it must be let ss = {'a' .. 'z', 'A' .. 'Z'}.toSeq()
21:35:01*Gustavo6046 joined #nim
21:35:25*Gustavo6046 quit (Remote host closed the connection)
21:48:26*Vladar quit (Quit: Leaving)
21:49:59FromDiscord<rainbowasteroids> how do i remove the last character from a string?
21:51:27*Gustavo6046 joined #nim
22:00:11FromDiscord<treeform> In reply to @Isofruit "No worries, just know": Thanks! Sorry for confusion.
22:00:49FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3Pl6
22:21:24FromDiscord<Ayy Lmao> How would you type a variable on the JS backend that can have varargs of different types? Varargs doesn't seem to work since I am getting this from an external library.
22:22:29FromDiscord<rainbowasteroids> Thanks↵(@treeform)
22:29:45FromDiscord<treeform> In reply to @Ayy Lmao "How would you type": I don't know of JS varargs supported in nim... might be hard.
22:30:36*jjido joined #nim
22:31:53*jmdaemon joined #nim
22:36:02FromDiscord<Ayy Lmao> In reply to @treeform "I don't know of": Is there some sort of way I can tell the type system to not worry about a particular argument of a function? Like I need to pass a `proc` that can have any number of args of any type into a JS library function.
22:39:00*vicfred_ quit (Quit: Leaving)
22:40:19FromDiscord<eyecon> In reply to @KatrinaKitten "Ahhhhh, I see. Yeah,": I just did!
22:42:25FromDiscord<treeform> In reply to @Ayy Lmao "Is there some sort": Probably emit pragma
22:50:49FromDiscord<Ayy Lmao> In reply to @treeform "Probably emit pragma": Yeah the emit pragma is probably the way to go.
23:05:26anddam`12q34A5216``````````````````````````````
23:06:33anddama real case of cat on the keyboard
23:13:20FromDiscord<sOkam!> I've been trying this, but there is no header file output for some reason↵Is there something missing in the syntax? 🤔 https://media.discordapp.net/attachments/371759389889003532/941834317980655647/unknown.png
23:14:27FromDiscord<sOkam!> The lib.nim code is just this: https://media.discordapp.net/attachments/371759389889003532/941834598864793640/unknown.png
23:18:46FromDiscord<auxym> what's wrong?
23:19:41FromDiscord<sOkam!> In reply to @auxym "what's wrong?": there is no file https://media.discordapp.net/attachments/371759389889003532/941835915842707456/unknown.png
23:19:55FromDiscord<sOkam!> (edit) "In reply to @auxym "what's wrong?": there is no file ... https://media.discordapp.net/attachments/371759389889003532/941835915842707456/unknown.png" added "output"
23:20:54FromDiscord<auxym> hm possibly because noLinking? What are you trying to achieve?
23:21:11FromDiscord<sOkam!> converting that procedure into a `.h` file
23:22:56FromDiscord<sOkam!> In reply to @auxym "hm possibly because noLinking?": Following a tutorial, btw. This is what it says https://media.discordapp.net/attachments/371759389889003532/941836733153153034/unknown.png
23:24:00*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
23:24:02FromDiscord<auxym> as that text says, the compiler-generated files will be in your nimcache directory
23:24:19*jmdaemon joined #nim
23:24:20FromDiscord<sOkam!> oh im blind 🙈 damn sry
23:24:30FromDiscord<auxym> is that a tutorial to produce a library for static linking? sounds like it I think
23:24:46FromDiscord<sOkam!> i don't know what static linking is
23:25:02FromDiscord<sOkam!> I'm just trying to export headers to use/connect directly inside a C project
23:25:14FromDiscord<sOkam!> not binaries, just header files
23:25:46FromDiscord<sOkam!> The tut: https://gist.github.com/KyrillosWalid/a923c9f980591b8c184368591cd9a9e8
23:25:53FromDiscord<auxym> I'm not sure nim can produce a header-only library
23:26:03FromDiscord<auxym> have you considered using genny? https://github.com/treeform/genny
23:26:45FromDiscord<sOkam!> In reply to @auxym "have you considered using": isn't that app a binary generator?
23:26:52FromDiscord<auxym> yes
23:27:17FromDiscord<auxym> apparently according to that tutorial it's possible to generate header-only lib, wasn't aware
23:29:13FromDiscord<sOkam!> In reply to @auxym "have you considered using": the thing is. I don'
23:30:07FromDiscord<sOkam!> In reply to @auxym "have you considered using": The thing is. I don't know how to connect a library inside this engine↵BUT... I -do- know how to connect C headers. Hence why I considered this route
23:31:06FromDiscord<sOkam!> The problem with it is that this code is going to be converted to a custom bytecode by the engine↵And I have no clue how to link a library so that the bytecode compiler understands it
23:31:56FromDiscord<b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3Pln
23:31:57FromDiscord<b4mbus> Im confused by the case statement especially
23:32:26FromDiscord<b4mbus> where did the `isLeaf` come from
23:32:36FromDiscord<b4mbus> https://rosettacode.org/wiki/Flatten_a_list#Nim
23:32:44*jmdaemon quit (Ping timeout: 250 seconds)
23:33:34FromDiscord<b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3Plo
23:34:24FromDiscord<leorize> it declares a variant object
23:34:49FromDiscord<leorize> https://nim-lang.org/docs/manual.html#types-object-variants
23:34:50FromDiscord<b4mbus> oh makes sense
23:36:28*Gustavo6046 quit (Quit: Leaving)
23:39:01FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Plr
23:39:31FromDiscord<leorize> add \`--nimcache\:your/path/here\`
23:40:11*vicecea quit (Remote host closed the connection)
23:40:47*vicecea joined #nim
23:59:28FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3Plz
23:59:34FromDiscord<b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3PlA
23:59:44FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3Plz" => "https://play.nim-lang.org/#ix=3PlB"
23:59:52FromDiscord<b4mbus> (edit) "https://play.nim-lang.org/#ix=3PlA" => "https://play.nim-lang.org/#ix=3PlC"