<< 25-06-2022 >>

00:12:00FromDiscord<eyecon> In reply to @ripluke "Does Nim have an": Therapist: https://maxgrenderjones.bitbucket.io/therapist/latest/therapist.html
00:13:07FromDiscord<eyecon> I'm very happy with it
00:19:14*ltriant quit (Ping timeout: 246 seconds)
00:19:23FromDiscord<m4ul3r> Therapist looks good. I'll have to try it out too
00:20:41FromDiscord<ripluke> In reply to @eyecon "Therapist: https://maxgrenderjones.bitbucket.io/the": Woah
00:30:34noeontheendWow, I've always been very happy with nim-argparse, but that looks nifty
00:33:15*\u is now known as meowray
00:33:36*meowray quit (Changing host)
00:33:36*meowray joined #nim
00:38:07FromDiscord<retkid> so
00:38:32FromDiscord<retkid> in prologue im trying to statically share a file
00:38:33FromDiscord<retkid> (edit) "file" => "folder"
00:38:35FromDiscord<retkid> im doing it
00:38:44FromDiscord<retkid> however when i try and connect everything 404s
00:39:22FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=40PU
00:39:28FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/990053580172062720/unknown.png
00:39:40FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/990053630281412628/unknown.png
00:39:41FromDiscord<Not Saucx> can someone join general? i wanna ask questions about NIM
00:40:07FromDiscord<Not Saucx> (edit) "NIM" => "No,"
00:40:10FromDiscord<Not Saucx> (edit) "No," => "Nim"
00:42:07FromDiscord<retkid> ah
00:42:14FromDiscord<retkid> they're being hosted /public/
00:42:15FromDiscord<retkid> (edit) "/public/" => "/public/"
00:42:20FromDiscord<retkid> but thats kinda stupid as shit
00:43:46FromDiscord<huantian> I mean that's normal
00:43:59FromDiscord<huantian> iirc django hosts static files at /static/ or something
00:44:25FromDiscord<retkid> but now i need to figure out what middleware i write so I can make it so all GET requests for non routed pages get redirected
00:44:25FromDiscord<huantian> you should probably use something else for your static files anyways
00:53:39*TakinOver quit (Ping timeout: 268 seconds)
01:00:02FromDiscord<retkid> i just
01:00:18FromDiscord<retkid> need to add redirects for every single file in /public
01:00:20FromDiscord<retkid> (edit) "/public" => "/public/\"
01:00:21FromDiscord<retkid> (edit) "/public/\" => "/public/"
01:12:22*TakinOver joined #nim
01:13:54*lnxw37 joined #nim
01:13:59*lnxw37 quit (Read error: Connection reset by peer)
01:14:22*lnxw37 joined #nim
01:16:38*TakinOver quit (Ping timeout: 246 seconds)
01:21:05FromDiscord<Not Saucx> sent a code paste, see https://play.nim-lang.org/#ix=40Q2
01:21:10FromDiscord<Not Saucx> https://media.discordapp.net/attachments/371759389889003532/990064070097006612/unknown.png
01:21:16FromDiscord<Not Saucx> each file is supposed to have a .csv ending
01:23:13*noeontheend quit (Ping timeout: 256 seconds)
01:24:36FromDiscord<Rika> You’re writing a line with the content of the string you gave it?
01:24:52FromDiscord<Not Saucx> In reply to @Rika "You’re writing a line": yeah
01:25:00FromDiscord<Not Saucx> it basically reads a file i input
01:25:09FromDiscord<Rika> I mean the file content is the one with the CSV
01:25:14FromDiscord<Rika> CSV thing I mean
01:25:23FromDiscord<Not Saucx> oh no its a txt
01:25:26FromDiscord<Not Saucx> i input a txt
01:25:27FromDiscord<Rika> Open it
01:25:30FromDiscord<Not Saucx> and it just comes out as file
01:25:43FromDiscord<Not Saucx> https://media.discordapp.net/attachments/371759389889003532/990065215695622154/unknown.png
01:25:51FromDiscord<Rika> The files you made I mean
01:26:05FromDiscord<Not Saucx> In reply to @Rika "The files you made": https://media.discordapp.net/attachments/371759389889003532/990065310323326996/unknown.png
01:26:11FromDiscord<Rika> Open them
01:26:20FromDiscord<Not Saucx> ahh i see
01:26:20FromDiscord<Not Saucx> https://media.discordapp.net/attachments/371759389889003532/990065373867044944/unknown.png
01:26:34FromDiscord<Rika> That’s the thing you have “csv” added onto
01:27:03FromDiscord<Rika> I assume you meant to put it on the first argument, not the second argument
01:28:21FromDiscord<Not Saucx> In reply to @Rika "I assume you meant": https://media.discordapp.net/attachments/371759389889003532/990065881998577714/unknown.png
01:29:48FromDiscord<huantian> well if you wanna change the name of the file you're writing to you have to do that when you open the file
01:33:41FromDiscord<Rika> Oh so you’re not using the procs that open a file then write something in it okay
01:33:47FromDiscord<Rika> You do it when you open the file yes
01:41:21FromDiscord<!Patitotective> In reply to @eyecon "Therapist: https://maxgrenderjones.bitbucket.io/the": it looks really really cool↵hope the owner pulishes it on nimble
02:17:10NimEventerNew Nimble package! openurl - Open Any Url/File in the default App / WebBrowser., see https://github.com/foxoman/openurl
02:17:12*ltriant joined #nim
02:22:05*ltriant quit (Ping timeout: 246 seconds)
02:23:49FromDiscord<!Patitotective> In reply to @NimEventer "New Nimble package! openurl": @ElegantBeef they published it first lol
02:32:41*tiorock joined #nim
02:32:41*tiorock quit (Changing host)
02:32:41*tiorock joined #nim
02:32:41*rockcavera is now known as Guest9015
02:32:41*tiorock is now known as rockcavera
02:33:12*noeontheend joined #nim
02:35:27FromDiscord<Rika> That embed though
02:36:38*Guest9015 quit (Ping timeout: 268 seconds)
02:39:33FromDiscord<!Patitotective> In reply to @Rika "That embed though": yeah.. lol
02:47:14FromDiscord<Not Saucx> In reply to @Isofruit "*blinks* ... I don't": hey phil
02:47:15FromDiscord<Not Saucx> so
02:47:51FromDiscord<Not Saucx> i fixed my problem however nonw im trying to figure out how to keep the first line of the original file, and add them to all the new files
02:47:59FromDiscord<Not Saucx> (edit) "i fixed my problem however nonw im trying to figure out how to keep the first line of the original file, and add them to all the new files ... " added "(as the new file)"
02:48:06FromDiscord<Not Saucx> (edit) "(as" => "(in"
03:02:24*arkurious quit (Quit: Leaving)
03:03:07*ltriant joined #nim
03:10:08*ltriant quit (Ping timeout: 255 seconds)
03:13:11FromDiscord<!Patitotective> see https://nim-lang.org/docs/io.html#open%2Cstring%2CFileMode%2Cint↵`FileMode.fmAppend`
03:33:14*ltriant joined #nim
03:40:48*rockcavera quit (Remote host closed the connection)
03:41:16*Figworm joined #nim
03:43:00*Figworm quit (Client Quit)
05:09:23*noeontheend quit (Ping timeout: 255 seconds)
05:19:03FromDiscord<untoreh> sent a code paste, see https://play.nim-lang.org/#ix=40Qt
05:20:26FromDiscord<Rika> What did you do?
05:20:30FromDiscord<Rika> What’s your code
05:21:25FromDiscord<untoreh> It pops up after a while when I run my server
05:21:31FromDiscord<untoreh> it spams a lot
05:23:08FromDiscord<Elegantbeef> somehow it's getting `-1` for `pkey.ident`
05:35:21FromDiscord<ripluke> How can I see if a url exists?
05:35:41FromDiscord<ripluke> Like if I returns 404 or not
05:35:43FromDiscord<Elegantbeef> Send a request and if you get a response it exists
05:36:09FromDiscord<ripluke> In reply to @Elegantbeef "Send a request and": What library can I use for that
05:37:54FromDiscord<Elegantbeef> std/httpclient
05:38:00FromDiscord<ripluke> Oh ok
05:39:31FromDiscord<untoreh> In reply to @Elegantbeef "somehow it's getting `-1`": maybe has to do with resource limits on file descriptors
05:41:08FromDiscord<Elegantbeef> @Prestige\: https://github.com/nim-lang/Nim/pull/19925 dont know if you seen this
05:53:05FromDiscord<Prestige> oh I haven't, sweet
06:03:51FromDiscord<ripluke> sent a code paste, see https://play.nim-lang.org/#ix=40Qy
06:04:18FromDiscord<Prestige> Do they not have a rest api?
06:04:32FromDiscord<ripluke> i have no idea lol
06:05:28FromDiscord<ripluke> i usually only write and push PKGBUILD so i dont know too much about the aur
06:05:31FromDiscord<Prestige> Wow it looks like they don't
06:05:38FromDiscord<ripluke> oh rip
06:12:26FromDiscord<Prestige> https://gitlab.archlinux.org/archlinux/aurweb/-/blob/master/doc/rpc.txt
06:12:32FromDiscord<Elegantbeef> You need a `defer: file.close` in there
06:12:38FromDiscord<Elegantbeef> sorry `client.close`
06:20:02FromDiscord<huantian> You might wanna do a HEAD instead of a GET
06:41:25FromDiscord<ripluke> In reply to @huantian "You might wanna do": Oh lol
06:43:35FromDiscord<ripluke> I hate when I accidentally reference a function as a variable
06:43:41FromDiscord<ripluke> The my code has errors
06:43:48FromDiscord<ripluke> (edit) "The" => "Then"
06:44:07FromDiscord<ripluke> I try rewiting the whole thing
06:44:15FromDiscord<ripluke> (edit)
06:47:45FromDiscord<ambient> should i be using testament or nimble for testing?
06:48:16FromDiscord<Elegantbeef> `nimble test` just compiles and runs all files that start with `t` in `tests/`
06:48:28FromDiscord<ambient> oh ok
06:50:01FromDiscord<ambient> apparently there's also "testes" and "balls" testing frameworks
06:50:30FromDiscord<Elegantbeef> balls is testes
06:50:44FromDiscord<ambient> oh, so it is
06:52:51FromDiscord<ripluke> In reply to @ambient "apparently there's also "testes"": Nice name tho
07:01:26FromDiscord<ambient> it's surprisingly easy to quickly read Nim projects and understand what's going on.
07:01:39FromDiscord<ambient> or maybe I just haven't looked at any super large projects
07:01:54FromDiscord<huantian> Balls is a pretty nice testing framework, can recommend
07:02:06FromDiscord<huantian> I think to some extent it will depend on the project as always
07:03:08FromDiscord<Elegantbeef> Depends on the author of course but there is some overlap with good code and using Nim 😄
07:03:43FromDiscord<xflywind> testament is gold for intergrated tests. There is also a fork of unittest => https://github.com/status-im/nim-unittest2
07:03:43FromDiscord<ambient> my code is horrible but I seem to be able to express what I want with minimal extraneous gunk
07:08:58FromDiscord<Phil> In reply to @Not Saucx "i fixed my": Yo, responding when Rika and Patito offer to help might lead to you not having to wait until I'm awake for a response 😉↵Generally it's recommended to post your current version of the code if it's shortish (which it likely is still, right? like 20-30 lines of code?)↵You can post it on https://play.nim-lang.org/ , press "share to ix" and post the link here
07:10:00FromDiscord<Phil> In reply to @flywind "testament is gold for": Does testament have the ability to spin up a docker container as part of a test? Would've loved to actually write tests for tinypool for mysql without having to spin up a local mysql instance and figure out with which credentials to connect to it
07:10:42FromDiscord<Elegantbeef> If i understand the problem just read/write the first line then write all the lines from the other file
07:12:19FromDiscord<Phil> In reply to @Elegantbeef "If i understand the": Yeh, should overall be easy, though I've got 2 approaches in my head that I'm not sure on if they'd work.↵Does nim have something like "zip" where you iterate over 2 seqs at the same time? This is purely about the syntax, I know I could achieve the same by iterating over a range of indices and accessing both seqs in that loop
07:12:37FromDiscord<huantian> Sequtils should have zip
07:12:45FromDiscord<Elegantbeef> No it doesnt have what you'd want
07:12:55FromDiscord<Elegantbeef> Why do you need zip?
07:13:03FromDiscord<Phil> It does? one sec, I must've missed that then on my last read
07:13:25FromDiscord<Phil> Huh, yeah, at the very end
07:13:35FromDiscord<huantian> In reply to @Elegantbeef "Why do you need": He needs to make more extra copies of sequences!
07:13:39FromDiscord<Phil> I need to skim over sequtils more thoroughly
07:13:39FromDiscord<Elegantbeef> I mean i'd never suggest using it if you're iterating
07:14:15FromDiscord<Phil> I like the syntax is mostly my response there
07:14:28FromDiscord<Elegantbeef> https://github.com/beef331/slicerator/blob/master/src/slicerator.nim#L287-L290
07:16:32FromDiscord<Phil> Neat!↵Might go over my bits where I use sequtils in ~30 files and replace them with slicerator equivalents
07:16:53FromDiscord<Elegantbeef> There is also zerofunctional and itertools
07:17:06FromDiscord<Phil> 90% of my usecases are map and filter eitherway
07:17:24FromDiscord<Phil> make that 90% using "map" and the other 10% using filter
07:17:49FromDiscord<Elegantbeef> https://github.com/beef331/slicerator/blob/master/src/chainimpl.nim#L88-L95 if you have chained functional operations
07:18:10FromDiscord<Elegantbeef> It's not much cleaner than the manual loop method but i still like it
07:20:38*ltriant quit (Ping timeout: 246 seconds)
07:22:11FromDiscord<Elegantbeef> I dont know if it's my small procedural mind but i think in Nim the best way to handle FP related things is to use for loop macros and iterators
07:23:54FromDiscord<Phil> I tend to not think too much about it since in my usecase the size of seqs I'm dealing with measures mostly at 1-20 and rarely goes above that. I have a couple rare cases that go up to 500 but that is a campaign having 500 different characters of note, we cracked the 200 mark after around 3 years or so.
07:24:10FromDiscord<Phil> So my performance constraints won't ever be sequences and their manipulations but how well I can reduce the amount of DB queries I do
07:24:39FromDiscord<Phil> (edit) "characters" => "dungeons and dragons-characters"
07:24:54FromDiscord<Phil> (edit) "note," => "note (as in NPCs),"
07:25:18FromDiscord<Elegantbeef> Yea but it's all about being performant without effort! 😛
07:25:44FromDiscord<Phil> Very fair! It's basically free ~~real estate~~ performance
07:26:07FromDiscord<ambient> so what i gather here is that iterating with zip does a copy?
07:26:12FromDiscord<ambient> that's a little disappointing
07:26:31FromDiscord<Phil> I think everything in sequtils copies like no tomorrow is what I gathered the last couple times I talked about it
07:26:36FromDiscord<Elegantbeef> Yes
07:27:00FromDiscord<Elegantbeef> It has to since Nim doesnt have iterator -\> closure in the stdlib
07:27:26FromDiscord<Elegantbeef> My `asClosure` is the bestest tool that should be in Nim 😄
07:27:43FromDiscord<ambient> oh man, time to revisit all my foldl parts 🥲
07:28:08FromDiscord<ambient> i hope it's inplace
07:28:09FromDiscord<Elegantbeef> I mean if you're iterating foldls you're allocating new collections then iterating them 😄
07:28:41FromDiscord<Elegantbeef> Actually i dont know what foldl does
07:29:13FromDiscord<Elegantbeef> Oh it's a accumulator applied ontop of a collection
07:29:25FromDiscord<Elegantbeef> Yea that's going to copy ever single time 😄
07:29:54FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40QN
07:30:42FromDiscord<Elegantbeef> It really should be↵`concatenation = foldl(words, a.add b)`
07:30:51FromDiscord<Phil> Hmm if I wanted to submit tinypool for any "this month in nim" stuff, who do I bother?
07:31:00FromDiscord<Elegantbeef> Technically me
07:31:12FromDiscord<Elegantbeef> https://github.com/beef331/website/issues/new?assignees=beef331&labels=&template=this-month-with-nim.md&title=
07:31:16FromDiscord<Prestige> tinypool?
07:31:48FromDiscord<Elegantbeef> Hmm i think github now has proper forums, who wants to PR that for me 😛
07:31:52FromDiscord<Elegantbeef> forms\ rather
07:31:57FromDiscord<Phil> In reply to @Avahe "tinypool?": I mini package. Basically a global variable seq with a lock for thread safe access that stores db connections from db_sqlite/db_postgres/db_mysql
07:32:02FromDiscord<Phil> (edit) "I" => "A"
07:32:22FromDiscord<Elegantbeef> Is it a generic type?
07:32:36FromDiscord<Phil> Nope, couldn't quite figure that one out
07:32:50FromDiscord<Elegantbeef> Tuples
07:33:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40QO
07:33:45FromDiscord<Phil> I basically made a core package that handles 90% of it generically, then made explicit variations for each of the connection types for explicitly typed public procs
07:34:09FromDiscord<Elegantbeef> Guess it doesnt need `active` since the `O(1)` deletion method can be used
07:34:15FromDiscord<Elegantbeef> And i forgot the lock that guards those variables
07:35:17FromDiscord<Phil> sent a long message, see http://ix.io/40QP
07:36:03FromDiscord<Elegantbeef> Why can those procedures not be built ontop of a pool type?
07:36:37FromDiscord<Phil> IIRC the main reason I ran into with a generic pool was an issue with templates that I could not be bothered to figure out
07:36:45FromDiscord<Phil> Let me scrounge it up again
07:36:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40QQ
07:37:02FromDiscord<Elegantbeef> I mean you'll of course need to build ontop of this primitive
07:38:02FromDiscord<Elegantbeef> But this is a primitive type afaict it just needs to have accessors to `pop` entries and destroy entries
07:38:16FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=40QR
07:38:18FromDiscord<Elegantbeef> I guess it should be `T: ref or ptr`
07:38:43FromDiscord<Elegantbeef> Why doesnt your `Connection` type close it inside the `=destroy`?
07:38:47FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=40QS
07:39:27FromDiscord<Elegantbeef> Idk the way i see it a threadsafe pool like this is a primitive that you'd build ontop of with specialization
07:40:09FromDiscord<Elegantbeef> If you want to have all your connections in a single pool you'd use object variants or OOP afaict
07:40:47FromDiscord<Elegantbeef> Also your generic parameter doesnt do what you want it to do
07:41:01FromDiscord<Elegantbeef> `[Connection]` does not force it to be only `Connection` it's a generic parameter name
07:41:10FromDiscord<Elegantbeef> It'd be like `T: Connection`
07:41:21FromDiscord<Elegantbeef> It's just confusing to use the type like that
07:41:23FromDiscord<Phil> It does since:↵`type Connection = db_sqlite.DbConn | db_postgres.DbConn | db_mysql.DbConn`
07:41:32FromDiscord<Elegantbeef> No it doesnt
07:41:38FromDiscord<Elegantbeef> It makes a generic parameter named `Connection`
07:42:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40QT
07:47:25FromDiscord<Phil> Welp, screw that then >_>
07:50:33FromDiscord<Phil> Huh, not running into that issue since the final pools that you interact with require the DbConn type
07:51:02FromDiscord<Phil> literally can't initialize a postgres pool with a "createConnection" proc that does not return db_postgres.DbConn
07:51:19FromDiscord<ambient> is there a way for a macro to find out which variables are read and which are written in a piece of code? like insert a hook into the compiler, where it does assignment into a variable, or reads from variable
07:51:55*ehmry quit (Ping timeout: 256 seconds)
07:51:57FromDiscord<ambient> probably some kind of AST library
07:52:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40QV
07:52:36FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=40QU
07:52:46FromDiscord<Elegantbeef> Phil compile that with orc/arc
07:53:05FromDiscord<Elegantbeef> That should show how not to depend on the dbconn inside your pool
07:53:28FromDiscord<Elegantbeef> Though using `ptr` might not work with it
07:57:17FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=40QX
08:02:54FromDiscord<Phil> What I'm confused by is the guard pragma as I can't find that anywhere
08:03:44FromDiscord<Phil> Argh, another experimental feature
08:11:51FromDiscord<xflywind> In reply to @Isofruit "Argh, another experimental feature": I recommend to read the latest devel docs https://nim-lang.github.io/Nim/manual.html#guards-and-locks It is expermental anymore on devel. Though lock levels are scheduled to be removed.
08:12:21FromDiscord<xflywind> (edit) "In reply to @Isofruit "Argh, another experimental feature": I recommend to read the latest devel docs https://nim-lang.github.io/Nim/manual.html#guards-and-locks It is ... expermental" added "not"
08:12:26FromDiscord<xflywind> (edit) "expermental" => "experimental"
08:21:52FromDiscord<ezquerra> I am a bit surprised to learn that sequtils does so much copying internally. Can’t it be improved in a backwards compatible way?
08:29:10FromDiscord<demotomohiro> @ezquerra Maybe some of copies are removed or replaced with move by Nim's optimizer.
08:39:47*crem quit (Quit: WeeChat 3.5)
08:46:32FromDiscord<Elegantbeef> Closure iterators can reduce the copying↵(@ezquerra)
08:46:43FromDiscord<Elegantbeef> Nim's iterator implementation is mostly the problem
08:49:22FromDiscord<Elegantbeef> Say you have `for x in [10, 20 30].filter(it > 30).map(it 20): ...` you cannot write an iterator that works with that
09:10:44FromDiscord<aMOPel> sent a code paste, see https://play.nim-lang.org/#ix=40Rl
09:10:56FromDiscord<Elegantbeef> You cannot
09:12:09FromDiscord<aMOPel> damn. what work around could I use, if I can't change the proc, since it's from a lib
09:12:27FromDiscord<Elegantbeef> You pass each arg
09:12:51FromDiscord<aMOPel> but what if I don't know beforehand how many args I'm gonna pass?
09:12:52FromDiscord<Elegantbeef> I mean you can use a template/macro to wrap it if you want
09:13:09FromDiscord<Elegantbeef> Nim is statically typed
09:13:17FromDiscord<Elegantbeef> also `varargs` accepts seq
09:13:43FromDiscord<Elegantbeef> What is the exact use case here
09:26:39*ltriant joined #nim
09:29:24FromDiscord<aMOPel> So I'm using this function: https://norm.nim.town/apidocs/norm/sqlite.html#select%2C%2CT%2Cstring%2Cvarargs%5BDbValue%2CdbValue%5D↵There is no overload with an Openarray instead of the varargs.↵↵The values, that I wanna pass to my query into `params`, are based on conditions. And how many I wanna pass is also based on conditions. So I don't know beforehand how many and what values I want to pass, thus I thought filling a sequence would be
09:29:44FromDiscord<Elegantbeef> varargs accepts openarray
09:30:13FromDiscord<aMOPel> And unpacks it?
09:30:30FromDiscord<Elegantbeef> There is no unpacking
09:30:33FromDiscord<Elegantbeef> Varargs is taken as an array
09:30:45FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=40Rr
09:31:05FromDiscord<Elegantbeef> Varargs is just a syntax over array construction with an optional converter call
09:32:17FromDiscord<aMOPel> Hm, guess I confused myself. Thank you 👍
09:36:34FromDiscord<aMOPel> Oh, I was also thinking about how to do an interface the right way in Nim. ↵With interface I mean a description of procs which can then sort of be instantiated in different ways.↵What I came up with was writing a file with a bunch of forward declarations only and then including it into the instance of the interface. How would you approach this?
09:38:11FromDiscord<aMOPel> (edit) "including" => "`include`ing"
09:38:21FromDiscord<Yardanico> https://github.com/yglukhov/iface https://github.com/beef331/traitor
09:38:31FromDiscord<Yardanico> or just make a object with procs yourself, like std/streams does it
09:42:13FromDiscord<aMOPel> Very nice, thank you
09:56:20FromDiscord<ezquerra> In reply to @Elegantbeef "Say you have `for": Why not? And how does slicerator library help in these cases then?
11:16:31*rockcavera joined #nim
11:16:31*rockcavera quit (Changing host)
11:16:31*rockcavera joined #nim
11:16:36FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=40RR
11:40:21FromDiscord<Kermithos> sent a long message, see http://ix.io/40RT
11:40:38FromDiscord<Kermithos> (edit) "http://ix.io/40RT" => "http://ix.io/40RU"
11:40:47FromDiscord<Kermithos> (edit) "sent a long message, see http://ix.io/40RU" => "In reply to @jan0809 "hey, howd i do": `var test = "abcd"↵echo test[1..2]`↵↵?"
11:40:59FromDiscord<jan0809> ah ty
12:20:59*noeontheend joined #nim
12:31:19*om3ga quit (Read error: Connection reset by peer)
12:34:02*om3ga joined #nim
13:00:10*gsalazar quit (Remote host closed the connection)
13:08:09FromDiscord<andreslowrider> hello 👋; in terms of sending edits to the github wiki is there a procedure for that?
13:34:47FromDiscord<xflywind> In reply to @andreslowrider "hello 👋; in terms": Hello, the Github wiki is supposed to be free to edit. However rcently someone or groups keeps spamming the wiki, It is restricted to edit now. I will lift the restriction. Feel free to edit it.
13:34:58FromDiscord<xflywind> (edit) "rcently" => "recently"
13:36:22FromDiscord<Andreas> @xflywind could you pls send a mail-confirmation to me, i registered at the forum, but did not receive the response with the confirmation-link. thxx.
13:38:31FromDiscord<xflywind> In reply to @Andreas "<@658563905425244160> could you pls": Sorry I am not a moderator of Nim forum. Please tell <@&371760044473319454> about your nickname.
13:39:32FromDiscord<xflywind> (edit) "nickname." => "name of your forum account."
13:39:42FromDiscord<xflywind> (edit) "account." => "account here."
13:40:24FromDiscord<xflywind> Another way is to leave a message on https://github.com/nim-lang/nimforum/issues/127
13:41:22FromDiscord<Yardanico> In reply to @Andreas "<@658563905425244160> could you pls": What's your forum nickname?
13:41:31FromDiscord<Andreas> <@&371760044473319454> Hi nim-forum-moderator, i recently (10-days ago) registered with the nim-forum. I did not receive a confirmation-mail. Nick is Bosinski
13:42:06FromDiscord<Andreas> In reply to @Yardanico "What's your forum nickname?": Bosinski mail is @icloud.com
13:42:23FromDiscord<Yardanico> You don't have to repeat everything twice
13:42:27FromDiscord<Yardanico> I already confirmed it
13:45:20FromDiscord<Andreas> In reply to @Yardanico "I already confirmed it": thx, today or earlier - i looked everywhere and can't find it ?
13:45:49*arkurious joined #nim
13:46:09FromDiscord<Yardanico> Right now after xflywind pinged moderators and you sent the first message with the nickname
13:51:29FromDiscord<Andreas> In reply to @Yardanico "Right now after xflywind": thx, seems to be still travelling ...
13:51:37FromDiscord<Yardanico> ?
13:52:09FromDiscord<Andreas> In reply to @Yardanico "?": mail did not yet arrive, i'll keep you posted..
13:52:11FromDiscord<Yardanico> If you haven't received the mail in the first 10-15 min, it'll probably never arrive
13:52:16FromDiscord<Yardanico> No need to wait
13:52:31FromDiscord<Yardanico> It's caused by Nim forum using nim's own mail server
13:53:00FromDiscord<Andreas> In reply to @Yardanico "It's caused by Nim": did the mail get blocked somewhere in-between ?
13:53:09FromDiscord<Yardanico> yes, most probably
13:53:17FromDiscord<Yardanico> or by your mail provider
13:53:46FromDiscord<Andreas> In reply to @Yardanico "or by your mail": thx for the protection Apple 😉
13:57:48FromDiscord<undel> icloud mail has a bad habit of rejecting emails entirely for no good reason
13:58:12FromDiscord<undel> one time they dropped all emails from namecheap and I couldn't log in
13:58:59FromDiscord<Andreas> @Yardanico @undel i changed ma mail-addr, would you pls try again..
13:59:07FromDiscord<Yardanico> ???
13:59:10FromDiscord<Yardanico> try what
13:59:20FromDiscord<Yardanico> As I said, I already confirmed your account
13:59:25FromDiscord<Yardanico> I don't understand what else do you need
14:01:54FromDiscord<Yardanico> Of course I had to reconfirm your account because you changed the email, but I still don't get why you did that
14:03:12FromDiscord<Andreas> In reply to @Yardanico "Of course I had": i tried to let the CMS send me a passwd-change mail - which never arrived. Thus, maybe my mail-provider eats any mail from the forum. And i want this to work properly..
14:03:31FromDiscord<Yardanico> Well, I can't help with that, I don't maintain the forum
14:03:39FromDiscord<Andreas> (edit) "properly.." => "properly..↵It seems my accout is working now, ty.."
14:03:54FromDiscord<Yardanico> I don't know why it uses a custom mail server in the first place
14:17:22FromDiscord<jmgomez> hey guys, when looking at the compiled nim files, Im seeing that the std libs files (i.e stdlib_system.nim.cpp) uses types imported from Cpp, however it doesnt import the headers
14:18:25FromDiscord<jmgomez> is that the default behaviour? I mean, should it define types imported from c/cpp in them or those types should just be defined where they are used?
14:18:58FromDiscord<jmgomez> in concrete, it happens with types that has seq[cppType]
14:49:53*noeontheend quit (Ping timeout: 255 seconds)
14:59:47FromDiscord<exelotl> Hey so, in fatal.nim there is this line:↵`include "$projectpath/panicoverride"`
14:59:51FromDiscord<exelotl> https://github.com/nim-lang/Nim/blob/8ccde68f132be4dba330eb6ec50f4679e564efac/lib/system/fatal.nim#L18
15:02:59FromDiscord<exelotl> I'm thinking of using a similar pattern in my library (which depends on certain types being generated on the user's side) - but I'm just curious that the ability to use dollar variables in `include` statements doesn't seem to be documented anywhere, nor can I find where the variables themselves are documented
15:03:17FromDiscord<exelotl> (I thought they were part of the docs for nim.cfg but I can't find those lol)
15:05:42FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=40Sn
15:10:32FromDiscord<Not Saucx> hey @exelotl could u help me with something its pretty simple and im new to nim
15:11:29FromDiscord<exelotl> depends what it is xP
15:12:43FromDiscord<Not Saucx> sent a code paste, see https://play.nim-lang.org/#ix=40Sr
15:12:59FromDiscord<Not Saucx> (edit) "https://play.nim-lang.org/#ix=40Sr" => "https://paste.rs/N3a"
15:13:28FromDiscord<Not Saucx> so it looks like this https://media.discordapp.net/attachments/371759389889003532/990273527875797063/unknown.png
15:13:29FromDiscord<Not Saucx> however
15:14:08FromDiscord<Not Saucx> i need it to look like this and i dont have the slightest clue https://media.discordapp.net/attachments/371759389889003532/990273697749282826/unknown.png
15:14:36*ehmry joined #nim
15:17:47FromDiscord<exelotl> hmm it's kinda hard to make sense of this without seeing the input data
15:21:23FromDiscord<exelotl> it also looks like you have several pieces of code that are trying to do the same thing
15:23:28FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=40St
15:26:42FromDiscord<Not Saucx> In reply to @exelotl "it also looks like": just faking it till i make it
15:26:55FromDiscord<Not Saucx> In reply to @exelotl "hmm it's kinda hard": https://media.discordapp.net/attachments/371759389889003532/990276914096771112/unknown.png
15:28:38FromDiscord<exelotl> ah I see, so it's trying to turn a single CSV into several of the same format, but grouped by their first character?
15:28:48FromDiscord<Not Saucx> In reply to @exelotl "ah I see, so": exactly
15:33:42FromDiscord<exelotl> working on it, will get back to you in a sec
15:46:32FromDiscord<exelotl> @Not Saucx OK, here is my feedback:
15:46:43FromDiscord<exelotl> sent a long message, see http://ix.io/40Sx
15:48:00FromDiscord<exelotl> (edit) "http://ix.io/40Sx" => "http://ix.io/40Sy"
15:50:31FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=40SA
16:03:55FromDiscord<Space Ghost> Some very good and useful feedback from @exelotl above. I want to thank you for a professional response and I learned from your comments. Thank you.
16:34:19FromDiscord<Stanley-GF (Stanley)> hi
16:34:25FromDiscord<Stanley-GF (Stanley)> when i'm trying to do https get requests using Puppy it's not working
16:35:42FromDiscord<!Patitotective> code + error
16:36:18*wallabra quit (Ping timeout: 240 seconds)
16:36:33FromDiscord<Stanley-GF (Stanley)> sent a code paste, see https://play.nim-lang.org/#ix=40SG
16:37:13FromDiscord<Stanley-GF (Stanley)> sent a code paste, see https://play.nim-lang.org/#ix=40SH
16:39:00FromDiscord<xflywind> How about using libcurl backing on windows? https://github.com/treeform/puppy#always-use-libcurl
16:40:03FromDiscord<!Patitotective> In reply to @Stanley-GF (Stanley) "Error\: \`\`\`platform.nim(117) ": apparently that error code means that↵> _The server name or address could not be resolved_
16:40:52FromDiscord<federico3> anybody familiar with osx wants to help with https://github.com/nim-lang/Nim/pull/19814 ?
16:41:26FromDiscord<Stanley-GF (Stanley)> Ok fixed thanks
16:41:52FromDiscord<m4ul3r> In reply to @Stanley-GF (Stanley) "Error\: \`\`\`platform.nim(117) ": Just lookin out for ya, but is that a discord token in the code? If so, you might want to edit that value out
16:42:22FromDiscord<Stanley-GF (Stanley)> yeah but its ok i changed my password
16:42:31FromDiscord<Stanley-GF (Stanley)> failed my copy paste
16:42:57FromDiscord<!Patitotective> does the password affect the discord token?
16:43:16FromDiscord<m4ul3r> I believe so?
16:43:35FromDiscord<m4ul3r> (edit) "so?" => "so?↵ediT: yes"
16:56:06*xet7 joined #nim
16:58:24FromDiscord<eyecon> I use the forum rarely (with the same nickname, I have 2 messages over there I think), and I just took a look at it and wrote something. However, when looking at my settings, I saw that I was "under moderation". I am apparently effectively shadowbanned for everyone except moderators:↵↵> Your account is under moderation. This is a spam prevention measure. You can write posts but only moderators and admins will see them until your account is
16:58:38FromDiscord<eyecon> Is this normal? Is it because I am a new user?
16:58:42FromDiscord<glover> good afternoon everyone
16:58:47FromDiscord<Phil> cheers
17:01:21FromDiscord<xflywind> In reply to @eyecon "Is this normal? Is": Yeah new users need moderators' approval to post.
17:02:24FromDiscord<eyecon> In reply to @flywind "Yeah new users need": Ah, thanks. I occasionally saw the verification conversations but I thought that's only when things go wrong, didn't realize that applied to everyone.
17:03:02FromDiscord<eyecon> So, how do I get approved? 🙂
17:04:11FromDiscord<xflywind> What's your nickname for forum? You can @ Moderators on Discord.
17:04:28FromDiscord<eyecon> In reply to @flywind "What's your nickname for": `EyeCon`
17:04:55FromDiscord<xflywind> In reply to @eyecon "`EyeCon`": <@&371760044473319454>
17:07:02FromDiscord<Yardanico> In reply to @flywind "<@&371760044473319454>": There's no such account
17:07:38FromDiscord<Yardanico> Ah nvm casing, approved
17:07:55FromDiscord<eyecon> In reply to @Yardanico "Ah nvm casing, approved": Thanks!
17:08:06FromDiscord<Yardanico> @eyecon you usually get your account approved when you post and moderators notice it
17:09:11FromDiscord<eyecon> OK, good to know. Apparently I joined some monts ago but I don't post often
17:09:21FromDiscord<eyecon> (edit) "monts" => "months"
18:02:33FromDiscord<!Patitotective> damn, codewars only supports nim 1.0 :/
18:03:31FromDiscord<Prestige> Could probably request they add newer versions
18:03:43FromDiscord<huantian> Yeah it shouldn’t be that hard
18:03:59FromDiscord<huantian> It’s kinda neat that uh replit uses mic
18:04:01FromDiscord<huantian> Nix
18:04:10FromDiscord<huantian> So it’s super easy to update
18:05:40FromDiscord<!Patitotective> there is already an issue from 3 months ago :/ https://github.com/codewars/runner/issues/174
18:06:18FromDiscord<Prestige> I almost feel like opening a new issue `Add Nim 1.6.6` lol
18:06:28FromDiscord<!Patitotective> yea, im gonna comment that lol
18:06:53FromDiscord<Prestige> `+1 reaction might help to get this request prioritized.` should get everyone to react for us
18:07:42FromDiscord<Prestige> lmao you +1'd my message
18:24:20FromDiscord<jan0809> hey, not sure which channel so ill ask here 🙂↵↵can somebody tell me how the matrix↵-arg is expected to look here(pixie) https://media.discordapp.net/attachments/371759389889003532/990321564073480252/IMG_20220625_202026.jpg
18:25:43FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=40T6
18:27:02FromDiscord<vestel> Do I have to call `NimMain` in every native thread(created using system api)?
18:31:52FromDiscord<Prestige> What?
18:46:18*xet7 quit (Read error: Connection reset by peer)
19:02:28*vilhelmbergsoe joined #nim
19:03:27FromDiscord<demotomohiro> @jan0809 It seems that matrix comes from this library: https://github.com/treeform/vmath
19:03:45vilhelmbergsoehow do you do something like "echo arrayofstrings[1..]" in nim?
19:06:48FromDiscord<demotomohiro> !eval echo [0, 1, 2, 3][1..^1]
19:06:52NimBot@[1, 2, 3]
19:10:29*vilhelmbergsoe quit (Quit: WeeChat 3.5)
19:17:12FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=40Tj
19:18:12FromDiscord<jan0809> just pasting without any offset (at 0, 0) works just like that
19:18:59FromDiscord<jan0809> (edit) "https://play.nim-lang.org/#ix=40Tj" => "https://play.nim-lang.org/#ix=40Tk"
19:25:15NimEventerNew thread by Bosinski: Back to the basics (of research) - Concurrent data-structures in 2.0 ?, see https://forum.nim-lang.org/t/9264
19:35:13FromDiscord<demotomohiro> In reply to @jan0809 "yeah seems like, but": I think this is what you want to do:↵`image_a.draw(image_b, translate(vec2(x, y)))`
19:36:17FromDiscord<demotomohiro> `translate` proc returns a matrix that translate to (x, y)
19:42:06FromDiscord<jan0809> In reply to @demotomohiro "I think this is": yes, exactly that, vec2 was the first thing i tried and translate was whats missing there! tysm ❤️
19:52:38FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=40Ts
19:56:30*wallabra joined #nim
20:20:01Amun-RaI just find out parseopt is unable to parse short option with value separated by space, hm
20:22:47FromDiscord<demotomohiro> Terminals treat command line options as separated with space. Did you use ' or " to quote the value containing space?
20:24:56FromDiscord<Prestige> I think he means like `foo -d 2` doesn't work, parseopt requires `foo -d:2` iirc
20:25:07FromDiscord<Prestige> which is odd
20:26:12Amun-Rawell, time to make my own, getopt compatible module
20:28:15FromDiscord<m4ul3r> Look into argparse, it is space delimited and is pretty easy to use
20:30:50Amun-Ralooks nice, thanks
20:34:23FromDiscord<Prestige> Oh that's a nice lib
20:36:02FromDiscord<!Patitotective> time to look into therapist↵https://maxgrenderjones.bitbucket.io/therapist/latest/therapist.html
20:37:20FromDiscord<m4ul3r> I took a look at it and it seems like it's no longer maintained? I installed it and it was using a few deprecated procs, although it still works
20:38:49FromDiscord<!Patitotective> :/ https://media.discordapp.net/attachments/371759389889003532/990355405358121060/unknown.png
20:40:32FromDiscord<eyecon> It... does what it's supposed to do
20:41:44FromDiscord<!Patitotective> this PR never was reviewed :/ https://bitbucket.org/maxgrenderjones/therapist/pull-requests/5
20:42:10FromDiscord<m4ul3r> It does what it needs to do until the procs get fully depreciated
20:42:26FromDiscord<!Patitotective> i mean, 4 months without even commenting on the PR :/
20:43:08FromDiscord<Elegantbeef> But but it doesnt have a commit in the future
20:43:31FromDiscord<!Patitotective> 🤨
20:44:55FromDiscord<Elegantbeef> The thing you need to be cognisant about is there is no license t hat i see
20:45:16FromDiscord<eyecon> In reply to @Elegantbeef "The thing you need": I was just about to comment on that
20:46:08FromDiscord<eyecon> So we can fork if the author agrees and applies a suitable license, if he's not going to do any more development
20:46:45FromDiscord<Elegantbeef> The nimble file has `MIT` but yea
20:49:26FromDiscord<SirOlaf> Is there a stdlib function to search in strings that aren't null-terminated
20:49:58FromDiscord<SirOlaf> strutils.find seems to use strstr
20:50:15FromDiscord<Elegantbeef> nim-v?
20:50:38FromDiscord<SirOlaf> Am on git hash b41226001ce596fe520fd326a302c6f4e91c2504
20:50:48FromDiscord<Elegantbeef> Is that devel?
20:50:57FromDiscord<SirOlaf> It's some sort of devel, not most recent
20:51:00FromDiscord<SirOlaf> Did find change recently?
20:51:19FromDiscord<Elegantbeef> IIRC that usage was removed
20:51:27FromDiscord<Elegantbeef> And it was backported, but i might be wrong
20:52:57FromDiscord<SirOlaf> It was changed 15 months ago
20:53:01FromDiscord<!Patitotective> https://bitbucket.org/maxgrenderjones/therapist/issues/4/abandonded :]
20:54:19FromDiscord<SirOlaf> So rfind and find have different behavior not just because of direction but because rfind allows null
20:54:28FromDiscord<SirOlaf> Epic
20:54:53FromDiscord<Elegantbeef> Might just be a case of writing your own then since it seems 1.6.6 still has the cstring optimization
20:55:15FromDiscord<SirOlaf> No I'll just switch to rfind I guess
20:55:23FromDiscord<SirOlaf> Same thing in my usecase
20:56:05FromDiscord<Elegantbeef> cause apparently 10 loc is too many? 😄
20:56:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40TD
20:56:21FromDiscord<SirOlaf> The pain
20:56:28FromDiscord<Elegantbeef> Shit line 4 should be `-1`
20:56:36FromDiscord<Elegantbeef> well `result = -1`
20:57:24FromDiscord<SirOlaf> Hm guess that's fine for now, thanks
20:57:31FromDiscord<SirOlaf> Docs should probably mention that null is not accepted though
20:57:49FromDiscord<Elegantbeef> It shouldnt use cstrstrt
20:57:56FromDiscord<Not Saucx> -+
20:59:24FromDiscord<SirOlaf> Also can't use count because that uses find 😼
20:59:40FromDiscord<SirOlaf> Time to copy and paste that too
21:02:34FromDiscord<Elegantbeef> Yea welcome to "i thought it was a good idea" design 😄
21:04:02FromDiscord<SirOlaf> Actually can work around this using SkipTable it seems
21:04:17FromDiscord<SirOlaf> Not for count though
21:05:28FromDiscord<SirOlaf> Gonna open an issue
21:05:47FromDiscord<Elegantbeef> Yea relying on C functions for strings is always suspect with pascal strings
21:05:58FromDiscord<SirOlaf> Someone already made one https://github.com/nim-lang/Nim/issues/19500
21:07:47FromDiscord<Elegantbeef> Ah there is a PR it just wasnt merged
21:07:49FromDiscord<Elegantbeef> See i'm not crazy!
21:08:16FromDiscord<SirOlaf> Well it would be cool if it had been merged in two months
21:10:03FromDiscord<Elegantbeef> Indeed
21:10:07FromDiscord<Elegantbeef> Bump it!
21:11:27FromDiscord<Elegantbeef> Does cstrstr use SIMD or something? I dont get how it's an optimization
21:13:37FromDiscord<SirOlaf> Will tell you if I can find the implementation
21:14:17FromDiscord<Elegantbeef> cstrstr is the C stdlib's strstr
21:18:52FromDiscord<SirOlaf> https://github.com/bminor/glibc/blob/master/string/strstr.c
21:18:55FromDiscord<SirOlaf> Yeah this is pretty wild
21:19:59FromDiscord<xflywind> Wasn't it a severe regression? I cannot understand why let optimization affect correctness.
21:20:13FromDiscord<Elegantbeef> It's a massive regression
21:20:37FromDiscord<Elegantbeef> It disregards the existence of pascal strings which is what everyone uses, and people often use string as a binary buffer
21:21:50FromDiscord<xflywind> Maybe bumping the issue with new usecases helps.
21:22:36FromDiscord<Tuatarian> how can relatively normal/weaker programmers contribute to nim development?
21:23:03FromDiscord<Tuatarian> I'd like to help but I don't really have the technical ability or understanding to be able to contribute useful things to the compiler I don't think
21:24:15FromDiscord<xflywind> I started to contribute to Nim by fixing typos, add testcase and examlples.
21:24:34FromDiscord<xflywind> See also https://dev.to/xflywind/best-ways-to-make-your-first-contribution-to-nim-language-4ml2
21:24:35FromDiscord<Tuatarian> that's a good idea, making improvements in docs
21:24:49FromDiscord<SirOlaf> For compiler itself you need like a month of pure free time to understand anything
21:25:37FromDiscord<Tuatarian> yeah I can't quite justify committing that much time
21:25:53FromDiscord<Tuatarian> if you look at commits to the nim repo araq has like 6k and next is dom96 with <1k
21:26:11FromDiscord<Tuatarian> which is kind of hilarious to me for some reason
21:26:22FromDiscord<xflywind> You can also remove deprecated code/modules, for instance implicit cstring conversion gives warnings on devel. Remove them to get rid of warnings.
21:26:46FromDiscord<xflywind> take over https://github.com/nim-lang/Nim/pull/19488 for instance
21:26:51FromDiscord<Elegantbeef> Impatiently waits for it to be turned into an error
21:27:23FromDiscord<Tuatarian> I think for it to be an error we would want something `$$` for cstring conversion
21:27:28FromDiscord<Elegantbeef> Actually it shouldnt do anything, so we dont have the `openarray[char]` `cstring`
21:27:29FromDiscord<Elegantbeef> No
21:27:34FromDiscord<Tuatarian> just something to reduce typing
21:27:35FromDiscord<Elegantbeef> We'd still use `cstring(myString)`
21:27:40FromDiscord<Elegantbeef> Fuck no
21:27:46FromDiscord<Tuatarian> too much mental load?
21:27:48FromDiscord<SirOlaf> Ok this is garbage, maybe I'll just hook find using minhook or something
21:27:49FromDiscord<xflywind> Some good first issues are relatively easier https://github.com/nim-lang/Nim/labels/good%20first%20issue
21:28:02FromDiscord<Elegantbeef> It's stupid as hell to use an operator
21:28:13FromDiscord<Tuatarian> ooh that's a wonderful label @xflywind
21:28:27FromDiscord<Tuatarian> thank you that's amazingly helpful
21:28:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=40TO
21:28:53FromDiscord<Elegantbeef> I do not see the benefit in shoehorning operators for things like this
21:29:09FromDiscord<Tuatarian> that's what I ended up doing for my library but I agree it's not worth making an operator for htis
21:29:20FromDiscord<Tuatarian> better to use words in general
21:29:33FromDiscord<Tuatarian> why template and not inline proc?
21:29:41FromDiscord<Elegantbeef> If your code is using a ton of conversions to cstrings what're you doing
21:30:03FromDiscord<Elegantbeef> It's a type conversion no reason to have a proc overhead for it
21:30:07FromDiscord<Tuatarian> using raylib which wants cstring occasionally
21:30:13FromDiscord<Tuatarian> would inline also introduce overhead?
21:30:14FromDiscord<!Patitotective> In reply to @Elegantbeef "If your code is": imgui 😀
21:30:24FromDiscord<Tuatarian> I thought that was kinda the point
21:30:29FromDiscord<Elegantbeef> if the inline is actually inlined
21:30:32FromDiscord<Elegantbeef> It's not always inlined
21:30:35FromDiscord<Tuatarian> oh what
21:30:42FromDiscord<Elegantbeef> It's a compiler suggestion it's not forced
21:30:55FromDiscord<Elegantbeef> The compiler still decides if it's worthwhile
21:31:02FromDiscord<Tuatarian> so I guess to force inline you just use a template
21:32:10FromDiscord<xflywind> inline pragmas doesnt work for JS backend. Thats the reason I end up using templates everywhere in my js frameworks.
21:36:59FromDiscord<jamiepopkin> Can anyone recommend a nim library for the database postgres? I'm spiraling in github repos that aren't well supported. \:(
21:39:18FromDiscord<m4ul3r> Did the std lib postgres implementation not work for you?
21:40:48FromDiscord<jamiepopkin> Is that this one https://xzfc.github.io/ndb.nim/v0.19.6/postgres.html
21:41:38FromDiscord<m4ul3r> Yeah, here's the official doc page that is newer and might have more info https://nim-lang.org/docs/db_postgres.html
21:43:13FromDiscord<jamiepopkin> Sorry. I'm fairly new to nim. But if it says "std/" Does that mean it's installed by default?
21:43:55FromDiscord<m4ul3r> Yup, no need to do anything else
21:44:11FromDiscord<m4ul3r> either `import std/db_postgres` or just `import db_postgres`
21:44:22FromDiscord<jamiepopkin> Oh fantastic. Thanks so much @m4ul3r \:)
22:05:32FromDiscord<SirOlaf> sent a code paste, see https://play.nim-lang.org/#ix=40U4
22:06:19FromDiscord<SirOlaf> Surprised that is possible
22:06:32FromDiscord<SirOlaf> (edit) "Surprised that is possible ... " added "without breakage"
22:09:43FromDiscord<Luckayla> Sometimes I forget how low level Nim is that this stuff has to/can be done lol
22:12:44FromDiscord<Elegantbeef> you know you can just do `cast[pointer](find)`?↵(@SirOlaf)
22:13:06FromDiscord<Elegantbeef> sorry it's `cast[pointer](proc(a, b: string, c: Natural, d: int)(find))`
22:13:55FromDiscord<SirOlaf> Neither of those work, but without the proc stuff you get a nice compiler crash
22:14:26FromDiscord<Elegantbeef> I mean i dont know what create/enableHook does
22:14:34FromDiscord<SirOlaf> The cast fails I mean
22:14:41FromDiscord<SirOlaf> As in compiler does not like it
22:14:53FromDiscord<SirOlaf> Is that actually how you select a type?
22:15:37FromDiscord<SirOlaf> Reason I did it in this way is because I could not figure out how to select the correct `find`
22:17:03FromDiscord<Elegantbeef> You should be able to do it without the temp var
22:17:08FromDiscord<Elegantbeef> But hmmm
22:17:19FromDiscord<SirOlaf> Well it just does the job of selecting the right one for me
22:17:30FromDiscord<Elegantbeef> So does `(proc(a, b: string, c: Natural, d: int))(find)`
22:18:00FromDiscord<SirOlaf> Say's it's ambiguous
22:19:13FromDiscord<SirOlaf> Is there even a syntax for this
22:19:43FromDiscord<SirOlaf> Oh wait that is the correct way of doing it
22:19:46FromDiscord<SirOlaf> Just missing return type
22:19:55FromDiscord<SirOlaf> Thanks
22:23:25FromDiscord<Elegantbeef> Cause i'm an idiot
22:23:26FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=40U6
22:23:26FromDiscord<Elegantbeef> Works fine once you remember it has a return type
22:23:36FromDiscord<Elegantbeef> For what?
22:24:08FromDiscord<Elegantbeef> Matrix bridge makes me cry
22:28:29FromDiscord<j-james> is the matrix bridge matrix-appservice-discord?
22:28:43FromDiscord<Elegantbeef> It's unreliable is what it is
22:28:45FromDiscord<j-james> i wonder why it's so occasionally laggy
22:28:58FromDiscord<j-james> but only occasionally
22:41:29FromDiscord<Elegantbeef> No clue i do want to eventually make my own client/server/bridge 😄
23:36:26*wallabra quit (Ping timeout: 246 seconds)
23:37:53FromDiscord<kevin> is there a good way to get Nim to play well with WinINET?
23:38:24FromDiscord<kevin> I want to use httpclient on Windows using wininet as the SSL backend, instead of default OpenSSL
23:38:42FromDiscord<kevin> possible without writing C code and linking that in?
23:39:07FromDiscord<kevin> (edit) "in?" => "in (or Nim to call Win32 apis)?"
23:41:05FromDiscord<Elegantbeef> Does treeform's puppy not work for you?
23:41:23FromDiscord<Elegantbeef> I dont think that the stdlib has a way to drop in your SSL backend
23:43:22FromDiscord<kevin> hmm, i think this might work
23:43:31FromDiscord<kevin> https://github.com/treeform/puppy
23:43:42FromDiscord<kevin> Thanks @ElegantBeef
23:44:28FromDiscord<kevin> It would be cool to get that supported into the standard library for `net` and `httpclient` but this works for me
23:44:29FromDiscord<kevin> https://github.com/nim-lang/Nim/issues/14719
23:44:40FromDiscord<Elegantbeef> I mean replacing openssl with libressl is the best
23:44:44FromDiscord<Elegantbeef> or bearssl
23:45:13FromDiscord<kevin> why even bother with other SSL implementations on Windows?
23:45:22FromDiscord<Elegantbeef> Single implementation
23:46:11FromDiscord<kevin> I guess that's fair. Still would be nice to have the option for `net` , `httpclient` `-d:ssl` to use WinInet on Windows
23:46:29FromDiscord<kevin> means you wouldn't have to bring any additional code w/ your binary
23:47:10FromDiscord<Elegantbeef> Sure, but bearssl can be statically compiled so it has basically 0 binary size overhead 😄
23:47:16FromDiscord<Elegantbeef> Not 0 of course but it's very small
23:48:18FromDiscord<kevin> that would be very cool as well
23:49:04FromDiscord<kevin> I love Nim but am put off by how every program that performs a web request on Windows must ship openssl DLLs along side the project
23:50:08FromDiscord<kevin> OpenSSL is also huge as well which isn't great
23:50:15FromDiscord<kevin> If I wanted 6MB binaries I'd just use Go 😂
23:56:11FromDiscord<Elegantbeef> Well https://github.com/status-im/nim-bearssl exists so have at 'er 😄