<< 28-11-2020 >>

00:05:33FromDiscord<Quibono> Okay I fixed it, thanks Rika.
00:05:50FromDiscord<Quibono> If anyone wants to know, Nimcrypt is faster at SHA2 than Nimsha2.
00:05:58FromDiscord<Quibono> By like 4 us.
00:06:00FromDiscord<Quibono> lol
00:30:46*Guest96 joined #nim
00:31:51*Guest96 left #nim (#nim)
00:40:46*hmmm quit ()
00:44:00FromDiscord<Rebel> Rika do you have any idea about my conundrum yesterday? Why would adding the async pragma to it cause it to not compile :/
00:48:39*abm quit (Quit: Leaving)
00:58:22*bung joined #nim
01:02:10*abm joined #nim
01:02:55*bung quit (Ping timeout: 256 seconds)
01:38:45FromDiscord<Rika> uh can ya link me where it is
01:38:51FromDiscord<Rika> @Rebel sorry for the late reply
01:42:19FromDiscord<Rebel> https://play.nim-lang.org/#ix=2FCP remove async and it works just fine
01:42:22FromDiscord<Rebel> also all good πŸ˜›
01:46:54FromDiscord<Rika> #14447
01:46:56disbothttps://github.com/nim-lang/Nim/pull/14447 -- 6fix #14421 items uses lent T ; snippet at 12https://play.nim-lang.org/#ix=2pTy
01:48:02FromDiscord<Rika> hmm
01:52:46FromDiscord<Rika> idk sorry, i dont know how openarray works exactly
01:53:40FromDiscord<Rika> regards memory safety i mean
01:53:54FromDiscord<Rebel> I guess I could try a seq
02:00:27FromDiscord<Rebel> Compiling with the workaround still produced same error when using openarray
02:10:45*Q-Master quit (Ping timeout: 240 seconds)
02:10:50FromDiscord<shadow.> any way to get the value of a variable by its name in string form?
02:12:04*Q-Master joined #nim
02:12:09FromDiscord<shadow.> would parseExpr work for this purpose
02:12:57FromDiscord<ElegantBeef> What're you trying to do?
02:14:23FromDiscord<shadow.> making a version of fmt string
02:14:30FromDiscord<shadow.> to learn macros
02:14:43FromDiscord<shadow.> i guess a dumbed-down version if you will lol
02:22:57*apahl_ quit (Ping timeout: 272 seconds)
02:24:28*apahl joined #nim
02:31:45FromDiscord<ElegantBeef> I dont know why you'd use parsestmt there
02:31:48FromDiscord<ElegantBeef> or parse expr
02:33:37FromDiscord<ElegantBeef> I do see fmt uses it but i'm uncertain why
02:35:01*lritter joined #nim
02:37:10*lritter quit (Client Quit)
02:37:32*lritter joined #nim
02:39:11FromDiscord<ElegantBeef> Ah nvm i get it now that i think about it πŸ˜„
02:40:23FromDiscord<ElegantBeef> but yes parseExpr is what you'd use to get the string as what you'd want internally
02:49:22*lritter quit (Quit: Leaving)
02:50:43*lritter joined #nim
03:16:09*zielmicha__ quit (Ping timeout: 272 seconds)
03:16:25*zielmicha__ joined #nim
03:16:26*qwertfisch quit (Read error: Connection reset by peer)
03:17:05*qwertfisch joined #nim
03:18:47FromDiscord<shadow.> oh ok thanks
03:42:16*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
03:43:35*pbb joined #nim
03:54:19*abm quit (Read error: Connection reset by peer)
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:36*supakeen joined #nim
04:33:10FromDiscord<Bahaa> sent a code paste, see https://play.nim-lang.org/#ix=2FKI
04:33:44FromDiscord<Bahaa> This isn't all of the code, I've trimmed it for conciseness. `line` is just a line from a file
04:34:48*lritter quit (Ping timeout: 272 seconds)
04:35:04*lritter joined #nim
04:36:58FromDiscord<InventorMatt> that error is because you don't need the discard statement there
04:37:16FromDiscord<InventorMatt> the add proc doesn't return anything
04:37:38FromDiscord<Bahaa> Ah. Thank you so much! I added that discard when I was debugging some time ago and forgot to remove it.
04:40:42*vicfred joined #nim
04:57:08*vicfred quit (Quit: Leaving)
05:02:26FromDiscord<Bahaa> Is it possible to get a type's field value with a string field name? For example if I have the string `"email"`, can I use something that would act like `Contact[email]` to give me the value of that field for a particular instance of it?
05:02:53FromDiscord<Rebel> a table?
05:05:13FromDiscord<Bahaa> In this instance I have more than two fields and can't use a table
05:05:52*vicfred joined #nim
05:06:05FromDiscord<Bahaa> I'm searching the contacts for a specific value which can be in any of the fields (specified by user)
05:06:23FromDiscord<Bahaa> so `email [email protected]` will look into all the `email` fields for `[email protected]`
05:07:58FromDiscord<Rebel> How efficient does this have to be
05:08:54FromDiscord<Bahaa> Ideally it can directly get the fields by their string names but I'm not looking for over the top efficiency (otherwise I would've used a database, I'm implementing this to learn Nim not really for a real-world usecase)
05:11:08FromDiscord<Rebel> I still think a table is the way to go if you know your keys will be unique if you have more than two fields couldn't the key be a tuple? Should be able to hash the tuple
05:11:45*thomasross quit (Ping timeout: 240 seconds)
05:11:56FromDiscord<InventorMatt> You could create a ``[]`` proc that takes a string as an input and have a case statement for your options
05:12:15*bung joined #nim
05:13:09FromDiscord<Bahaa> But I'll be querying only one for those fields at a time
05:13:20FromDiscord<Bahaa> That's an option for sure
05:13:26FromDiscord<Bahaa> Ideally there'd be something like Go's `reflect`
05:13:39FromDiscord<Bahaa> But yeah switch case is alright
05:14:15FromDiscord<Bahaa> (edit) "alright" => "alright, my only problem with it is it'd have to run once for every contact in the list"
05:17:25FromDiscord<InventorMatt> Does the attribute you are trying to access change each time? If you are looping through it you should be able to just normally access it like an attribute
05:17:42FromDiscord<InventorMatt> Like contact.email
05:18:37FromDiscord<Bahaa> But I'm not aware of a way to use that .email for every contact in the list
05:18:48FromDiscord<Bahaa> It's the same .email but they're different contacts
05:19:58*lritter quit (Quit: Leaving)
05:23:12FromDiscord<InventorMatt> would it not look something like this while you are looping through https://play.nim-lang.org/#ix=2FKR
05:26:29FromDiscord<InventorMatt> but if you do want an indexed string approach you can do this https://play.nim-lang.org/#ix=2FKS
05:26:45*vicfred quit (Quit: Leaving)
05:27:39*vicfred joined #nim
05:34:21FromDiscord<Bahaa> Looks to be the same thing as an in-loop case from an efficiency standpoint but I guess I don't have too many other options
05:34:33FromDiscord<Bahaa> Thanks for your help, InventorMatt and Rebel!
05:37:51FromDiscord<ElegantBeef> @Bahaa you can use the `static` keyword with when to generate procs more akin to generics where it's body is created at compile time https://play.nim-lang.org/#ix=2FKV
05:38:10FromDiscord<ElegantBeef> This talks about it if interested https://forum.nim-lang.org/t/7155
05:38:45FromDiscord<ElegantBeef> Guess this link makes more sense to link πŸ˜„ https://nim-lang.org/docs/manual.html#special-types-static-t
05:39:53FromDiscord<ElegantBeef> I do tend to suggest bad ideas πŸ˜„
05:41:22*mbomba joined #nim
05:42:00*vicfred quit (Quit: Leaving)
05:42:47*vicfred joined #nim
05:43:13*mbomba quit (Client Quit)
05:44:06FromDiscord<Bahaa> Sorry, I don't really understand how using the static keyword in this context would differ from not using it?
05:58:42FromDiscord<Gyllou> has anybody done prim's in nim?
05:58:49FromDiscord<Gyllou> jw, too lazy rn
05:58:52FromDiscord<Gyllou> also drunk
05:59:05FromDiscord<ElegantBeef> It really doesnt, it's just another (probably sillier) way of doing it
05:59:48FromDiscord<Gyllou> seems a shame i can't find it implemented, what with all that sweet alliteration
05:59:58FromDiscord<Gyllou> rhyme? idk
06:00:01FromDiscord<ElegantBeef> Rhyme
06:00:10FromDiscord<Gyllou> lol
06:00:45FromDiscord<ElegantBeef> Yea nothing on github search with "prim language:nim"
06:00:59FromDiscord<Gyllou> thats alright ill do it tomorrow
06:01:16FromDiscord<ElegantBeef> Do it now, it'll be funnier
06:01:21FromDiscord<Gyllou> lol
06:01:33FromDiscord<Gyllou> im gonna level my grim dawn character, got a new build i gotta test
06:01:40FromDiscord<Gyllou> also like 3 beers in
06:01:54FromDiscord<Gyllou> the graph lib is coming along well!
06:02:06FromDiscord<Gyllou> im excited
06:02:14FromDiscord<Gyllou> i hope it helps people
06:05:02FromDiscord<ElegantBeef> Outside the scope of my knowledge so it wont help me, so you'e failed as i am pepople
06:05:07FromDiscord<ElegantBeef> people
06:13:53FromDiscord<Gyllou> lol fair, i feel like graphs are a standard data structure though and i hope if adds to the tools people have for nim
06:15:19FromDiscord<Gyllou> the usefulness of graphs are just now trickling down to the average engineer so i feel like itll be useful. i love nim so far, easily my favorite language so anything i can do to help.
06:15:49FromDiscord<Gyllou> next up is the reinforcement learning lib and the graph neural network lib
06:16:14FromDiscord<Gyllou> can't build shodan without them
06:17:25*vicfred quit (Quit: Leaving)
06:22:48*vicfred joined #nim
06:28:05*narimiran joined #nim
06:41:06FromDiscord<ProfessorEevee> So when is it a good idea to call procs without parentheses?
06:42:00FromDiscord<ElegantBeef> I mean whenever you want really
06:42:38FromDiscord<ProfessorEevee> Just wondering if there's a sort of standard or rule of thumb, really
06:42:55FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax
06:43:06FromDiscord<ElegantBeef> Not much of a suggestion where to use it
06:43:30narimiranif it is your own code: whenever you like
06:44:31FromDiscord<ProfessorEevee> Yeah, I guess. I was thinking maybe there's a structure like Python's PEP 8
06:45:14FromDiscord<ElegantBeef> https://nim-lang.org/docs/nep1.html
06:45:34FromDiscord<ElegantBeef> We've got that, but i dont think it really mentions command syntax
06:51:06FromDiscord<ProfessorEevee> I see, I suppose I'll just try to use what makes the most sense and looks easier to read
06:54:26*Perkol joined #nim
07:05:20narimiranA release candidate for Nim 1.4.2 is out! Get it from the nightlies: https://github.com/nim-lang/nightlies/releases/tag/2020-11-28-version-1-4-74c687e395c946111652c7bef4780b0aa2391cbf or using choosenim: choosenim @74c687e
07:18:40*bung quit (Ping timeout: 246 seconds)
07:30:05*vicfred quit (Ping timeout: 240 seconds)
07:43:14*bung joined #nim
07:54:41FromDiscord<Imperatorn> Is there any process of translating C# to Nim? I know I'm just dreaming, but asking anyway
07:58:21FromDiscord<ElegantBeef> I believe there was someone embarking on that using the DLR
07:58:28FromDiscord<ElegantBeef> Or similar
08:12:28*vicfred joined #nim
08:22:20FromGitter<bung87> I've implemented a async form parser, as api to end developer, question is should I raise exception during parsing ?
08:23:12FromGitter<bung87> http multipart form data
08:24:48FromGitter<bung87> parsing on end user's demand
08:32:09FromDiscord<Imperatorn> Cool
08:38:06bung:)
09:01:55FromDiscord<Imperatorn> I've been through a marathon of evaluating about 50 languages. I see hope for Nim. It just has to gain momentum. What efforts are made to grow the Nim community and/or funding? πŸ€”
09:05:24FromDiscord<Imperatorn> Tried to spend a week with every language
09:05:25*habamax joined #nim
09:05:26FromDiscord<Bahaa> Not to push your message up, but I very much agree. I've tipped my toes into Go and Nim, and while I believe that Nim is more flexible and in many ways simpler, I think Nim's biggest problem is its lack of momentum. (honestly I prefer some aspects of Go more but I think Nim can still easily win, especially with the better performance and easier-to-write code.)
09:06:46FromDiscord<mratsim> Nim is pretty much a community language so it will work as people addresses their own community needs
09:07:05FromDiscord<mratsim> I've seen a lot of efforts on the Japanese, Chinese and Russian Nim users for example
09:07:19FromDiscord<mratsim> I'm doing my part in Data Science/Machine Learning and high Performance computing
09:07:32FromDiscord<mratsim> Some are doing that for music and audio processing
09:07:54FromDiscord<mratsim> Python grew the same but had 20 years move advantage.
09:08:01FromDiscord<Imperatorn> My primary language is C# then C and D
09:08:04FromDiscord<Imperatorn> Yeah
09:08:27FromDiscord<Imperatorn> Python is slow tho. Nim should replace Python
09:08:36FromDiscord<nikki> why is momentum a problem for your project(s)?
09:08:37*natrys joined #nim
09:08:51FromDiscord<mratsim> Dynamic language have their place, Python is very good at rapid prototyping
09:09:02FromDiscord<Imperatorn> I'm thinking about packages primarily
09:09:56FromDiscord<nikki> some times it's an opportunity bc. you can lay those foundations and the space is less saturated in that particular language
09:10:18FromDiscord<Bahaa> Lack of packages -- less widespread support -- restricts your usage of the language to hobbyist usage since there's no real work you can do with it↡These are things that I can think of and it's not an exhaustive list and does not represent what other people think
09:10:46FromDiscord<ElegantBeef> Except Nim can wrap C libraries, rather easily, and there is almost always a C library πŸ˜„
09:10:47FromDiscord<nikki> those aren't problems i think, it should just be factored into when the language is used
09:11:29FromDiscord<ElegantBeef> Or you can always rewrite it in Nim, for that pureness
09:11:30FromDiscord<nikki> and like if the principles / impl of the language is believed in, through its use where it makes sense, it may grow over time. it's just at a particular point in that timeline
09:11:53FromDiscord<ElegantBeef> It's a chicken and an egg problem and that egg will never hatch if everyone avoids it cause "It's not used"
09:11:56FromDiscord<Bahaa> For it to be transpiled back into C? πŸ˜‚
09:11:57FromDiscord<Imperatorn> How "easy" is it to wrap C libs?
09:12:00FromDiscord<nikki> but a lot of times it can be an opportunity because its application to a particular problem domain may unlock some potential that previously was untapped
09:12:12FromDiscord<Imperatorn> Can Nim do c++ as well?
09:12:14FromDiscord<ElegantBeef> Depends on the library, but we've got c2nim to ease it
09:12:15FromDiscord<ElegantBeef> Yes
09:12:19FromDiscord<Idefau> yes it can do c++
09:12:22FromDiscord<Idefau> js too
09:12:23FromDiscord<Imperatorn> Cool
09:12:43FromDiscord<nikki> yes. it's up to you to take all of the tools available and do something that pushes the curve imo. interop with and compilation to c is part of the toolset and the strength
09:12:52FromDiscord<Bahaa> I totally agree and I intend to use Nim more once I'm more comfortable with compiled languages -- IMO Go is a great stepping stone since I've been using JS and Python almost exclusively
09:12:56FromDiscord<Imperatorn> Like, so I could probably use vcpkg and use it with Nim?
09:13:01FromDiscord<nikki> only nim can interop so well with c++ templates bc. of the backend
09:13:20FromDiscord<Imperatorn> Cool, that's a limitation in D
09:13:48FromDiscord<Imperatorn> In Dlang we have dpp, cpp2d, dstep etc, but none is good enough 😒
09:13:49FromDiscord<Idefau> i have no experience with vcpkgs but you probably can use it if you do the wrapper correctly
09:14:08FromDiscord<ElegantBeef> Yea we arent perfect, but nimterop/c2nim are both tools to get you there
09:14:19FromDiscord<ElegantBeef> As i was typing you can include C source code directly and wrap it
09:14:35FromDiscord<ElegantBeef> My favourite example is what impbox did here https://github.com/ftsf/nico/blob/master/nico/stb_vorbis.nim
09:14:44FromDiscord<nikki> i use the c and c++ wrapping p extensively in a game engine proj and it works p well
09:14:48FromDiscord<Imperatorn> Cool, will take a look
09:14:50FromDiscord<nikki> including wrapping c++ templates
09:15:03FromDiscord<nikki> as generic procs in nim
09:15:16FromDiscord<nikki> which not a lot of "ffi" style layers can handle
09:15:21FromDiscord<ElegantBeef> I just love how silly you can go with emit, and just include an entire header file πŸ˜„
09:15:22FromDiscord<nikki> and go's c ffi is basically a joke
09:15:26FromDiscord<nikki> cuz of the overhead
09:15:45FromDiscord<Imperatorn> Oh, didn't know about {.emit
09:15:49FromDiscord<ElegantBeef> Also worth noting iirc Go doesnt have macros
09:15:59FromDiscord<nikki> yeah it helps for some cases esp. when wrapping an iteratir
09:16:01FromDiscord<ElegantBeef> So you cant have fun like we ca nhere
09:16:18FromDiscord<ElegantBeef> ~~All my published nim libraries are about using macros to reduce redundant code~~
09:16:22FromDiscord<ElegantBeef> It's like my niche
09:16:39FromDiscord<ElegantBeef> !repo constructor
09:16:43FromDiscord<ElegantBeef> Did i bot wrong
09:16:45FromDiscord<nikki> https://github.com/nikki93/ng-public/blob/public/src/core/kernel.nim wrapping entt here
09:16:46FromDiscord<ElegantBeef> I think i did
09:16:54FromDiscord<Imperatorn> Imo, any language that wants to take over the world has to do C src with ease. Sad but true...
09:17:06FromDiscord<ElegantBeef> Well that's what Zig is doing
09:17:17FromDiscord<ElegantBeef> But zig is just "modern C"
09:17:20FromDiscord<Imperatorn> Yeah, but it's too small
09:17:27FromDiscord<nikki> i just care about good tools for the particular things i use it for
09:17:28FromDiscord<ElegantBeef> Well it's still very young
09:17:38FromDiscord<nikki> "take over the world"-style fads don't help
09:17:43FromDiscord<ElegantBeef> I just care if what i'm using is fun to use and works well
09:17:45FromDiscord<Imperatorn> Yeah, Nim is more mature
09:17:53FromDiscord<ElegantBeef> <https://github.com/beef331/constructor> this is the library i wanted to link
09:18:00FromDiscord<nikki> zig is p solid at c ing
09:18:06FromDiscord<nikki> esp embedding a compiler lol
09:18:07FromDiscord<ElegantBeef> Macros are great and i'll shoot anyone that says otherwise πŸ˜„
09:18:18FromDiscord<nikki> and parsing header files for decls automatically ish
09:18:21FromDiscord<mratsim> spray and tell
09:18:26FromDiscord<ElegantBeef> You can use the zig compiler for nim, so we can go three levels deep
09:18:29FromDiscord<Imperatorn> I eakt a professional C replacement
09:18:40FromDiscord<mratsim> Nim probably has the best C++ interop of all languages out there
09:18:40FromDiscord<Imperatorn> Been writing D for some time
09:18:52FromDiscord<mratsim> can even wrap header only libraries
09:18:58FromDiscord<nikki> yeah i think its c++ interop is unparalleled
09:19:06FromDiscord<Imperatorn> πŸ‘
09:19:09FromDiscord<nikki> having entt work is like, i don't think u can do that in any other lang
09:19:14FromDiscord<Imperatorn> Gotta check it out
09:19:29FromDiscord<nikki> yup. once you do that we can discuss concrete details
09:19:34FromDiscord<ElegantBeef> Arent you doing it a tad odd though nikki?
09:19:35FromDiscord<Idefau> nimterop is also great for automating wrapping
09:19:41FromDiscord<nikki> instead of blanket statements lol
09:19:44FromDiscord<mratsim> This is a simple BigInt header only library that I wrapped: https://github.com/status-im/nim-ttmath/blob/master/src/ttmath.nim
09:19:49FromDiscord<ElegantBeef> like you arent just `nim cpp ./main.nim`
09:19:58FromDiscord<nikki> @ElegantBeef it'd work w/ that tbh
09:20:10FromDiscord<nikki> i just do it thru cmake only so the wasm build etc. is configureable
09:20:15FromDiscord<ElegantBeef> Ah
09:20:17FromDiscord<Imperatorn> In D we have nice C interop with dpp. You can actually just #include
09:20:21FromDiscord<mratsim> And this is replacing CMake with Nim as a build system for C++ DLLs πŸ˜„ https://github.com/numforge/agent-smith/blob/master/third_party/ale_build.nim
09:20:35FromDiscord<Imperatorn> What's the process like in Nim?
09:20:41FromDiscord<ElegantBeef> Look at the nico git link
09:20:45FromDiscord<ElegantBeef> the stb_vorbis
09:20:53FromDiscord<Imperatorn> Will do
09:21:02FromDiscord<ElegantBeef> the procs are imported from that emited c Code
09:21:02FromDiscord<nikki> we sent some links that contain the actual code for doing it
09:21:27FromDiscord<ElegantBeef> It's a bit more work since Nim's type system diferentiates C types from Nim types
09:21:31FromDiscord<nikki> but it's as easy as proc foo() {.importc.}
09:21:34FromDiscord<ElegantBeef> But it's easy
09:21:46FromDiscord<ElegantBeef> I assume D doesnt even know that a different type of int exists
09:21:52FromDiscord<mratsim> example of bindings with C++: https://github.com/numforge/agent-smith/blob/master/third_party/std_cpp.nim
09:21:53FromDiscord<nikki> there's more options than that, but that's what it boils down to
09:22:14FromDiscord<mratsim> well not bindings, it's using C++ std:vector
09:22:14FromDiscord<Imperatorn> Is there an alternative to emit? πŸ€”
09:22:23FromDiscord<mratsim> just look at the code
09:22:33FromDiscord<ElegantBeef> Yea there is
09:22:40FromDiscord<nikki> unclear yet whether links actually help lol
09:22:43FromDiscord<ElegantBeef> Emit is just what impbox did so it wasnt an extra dependancy
09:23:00FromDiscord<ElegantBeef> He didnt want to carry around a C file, so he just included into the nim source
09:23:05FromDiscord<nikki> alternative depends on what ur tryna do
09:23:09FromDiscord<Imperatorn> Yeah, yeah... On the phone atm. Will take a proper look soon πŸ˜‰
09:23:24FromDiscord<nikki> cool. here's a summary: it's gonna be great
09:23:39FromDiscord<nikki> https://nim-lang.org/docs/manual.html
09:23:48FromDiscord<nikki> meanwhile some phone reading
09:24:27FromDiscord<nikki> the funny thing is i wrote the importc thing within the message, right before the q about emit lol
09:25:16FromDiscord<Imperatorn> Hmm, so about .importcpp
09:26:09FromDiscord<Imperatorn> Can it include an entire header with corresponding procs for functions?
09:26:39FromDiscord<mratsim> you need to define a nim proc per C++ function you want
09:26:42FromDiscord<nikki> importcpp is a pragma on your own prototype defn
09:27:00FromDiscord<nikki> the manual is pretty clear about this
09:27:02FromDiscord<mratsim> you can use c2nim or nimterop to automate that
09:27:11FromDiscord<Imperatorn> Ok rtfm I get it
09:27:15FromDiscord<nikki> yup
09:27:19FromDiscord<ElegantBeef> Well nimterop is rather limited on c++ atm, right?
09:27:22FromDiscord<mratsim> though recursive parsing of headers is not yet supported alas :/
09:27:26FromDiscord<mratsim> yes
09:27:38FromDiscord<nikki> machine generated wrappers seem kinda silly to me
09:28:00FromDiscord<Imperatorn> Why
09:28:04FromDiscord<nikki> unless it's actually as smooth as zig's stuff
09:28:09FromDiscord<mratsim> It's not
09:28:26FromDiscord<nikki> yeah, i think it needs to be cached as part of the build system
09:28:29FromDiscord<nikki> and transparent
09:28:33FromDiscord<ElegantBeef> In Nim's case you kinda have to go deeper to make it idiomatic
09:28:55FromDiscord<nikki> otherwise; tbh i think you should be thinking about each proc and wrapping things only as needed while defining a higher level api
09:28:55FromDiscord<mratsim> This would be a pain to do manually: https://github.com/numforge/nim-clblast/blob/master/src/generated/clblast_c.nim, https://github.com/unicredit/nimcuda/blob/master/nimcuda/cublas_api.nim
09:28:55FromDiscord<ElegantBeef> Let's be honest who wants to use a C api like it's C in Nim πŸ˜„
09:29:32FromDiscord<Imperatorn> Hmm
09:29:53FromDiscord<nikki> sure, i just think it should be a build artifact. but, it's just a file to think about differently now otherwise
09:30:09FromDiscord<nikki> this may not be concrete enough to reason about haha, sry
09:30:22*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:31:02FromDiscord<mratsim> it really depends, for big stuff I just c2nim them, for smaller scale I c2nim and then touch up the declaration to replace ptr by var or byref for example
09:31:47FromDiscord<mratsim> it also depends on how stable the API is, i.e. is that something I can generate once and be done for years or is it moving fast upstream.
09:31:56FromDiscord<nikki> one case where it makes a lot of sense actually is when vendoring the dep
09:32:12FromDiscord<mratsim> and also, will I need to write a high-level wrapper anyway or will it be use at a low-level in any case
09:32:14FromDiscord<nikki> if the dep is versioned with the wrapper
09:32:31FromDiscord<nikki> does the nim main source repo include gen'd wrappers
09:32:31FromDiscord<mratsim> Like if I need to write a wrapper, I don't mind using the raw API
09:32:36FromDiscord<nikki> like for pg and sqlite etc
09:32:39FromDiscord<nikki> or is it handwritten
09:32:50FromDiscord<mratsim> if the use is low-level, I'd rather have proper var/byref, openarray
09:33:44FromDiscord<nikki> agreed on those aspects, just a tradeoff between writing the wrappers as-needed in the higher level lib
09:33:52FromDiscord<nikki> vs. generating upfront
09:33:57FromDiscord<mratsim> For example this has been edited https://github.com/status-im/nim-blscurve/blob/master/blscurve/blst/blst_abi.nim#L247-L250↡↡Because use is low-level, I changed ptr to var and ptr+len to openarray, with proper handling of cstring or arrays of bytes: https://github.com/status-im/nim-blscurve/blob/master/blscurve/blst/blst_abi.nim#L247-L250
09:35:04FromDiscord<ElegantBeef> I look at stuff like this and dont even know how you'd wrap it all without ending the night shooting yourself
09:36:33FromDiscord<mratsim> it's really 5 min to find the proper c2nim command, 30 min to edit the code produced, then 2-6 hours for the high-level API + tests.
09:36:44FromDiscord<ElegantBeef> Yea i meant manually without any tool assist
09:36:48FromDiscord<mratsim> ah right
09:36:57FromDiscord<mratsim> yes, and this is a small one
09:37:25FromDiscord<ElegantBeef> It also doesnt seem to be that complex of an API
09:38:17FromDiscord<mratsim> I want to wrap libTorch for ML https://github.com/SciNim/minitorch/issues/1 but it's 25 or so C++ headers that are recursive ... and with new ML layers being added on a weekly basis.
10:37:44*krux02 joined #nim
10:59:16*bung quit (Ping timeout: 240 seconds)
11:01:43FromDiscord<Recruit_main707> I believe haxcramper was creating a tool based on clang to create wrappers for big projects easily, or was it just a clang wrapper?
11:03:16FromDiscord<haxscramper> It is a tool for wrapping projects based on libclang wrapper
11:04:09FromDiscord<Recruit_main707> And how is it going?
11:05:49FromDiscord<haxscramper> With moderate success I guess. It is just extremely frustrating most of the time and main problems are just related to figuring out how to just parse C++ code reliably with liblcang
11:06:07FromDiscord<haxscramper> E.g. figuring out all little details for C++ """"""build system""""""
11:06:23FromDiscord<haxscramper> And edge-casing everything
11:09:45FromDiscord<Recruit_main707> Do you have a repo? Personally I don’t think I could help you, but maybe someone else does
11:09:56FromDiscord<Recruit_main707> can
11:17:26FromDiscord<haxscramper> In short - it is not guaranteed that a particular header file contains all necessary information to be parsed. For example `std::string` header is made out of ~ten separate files that cannot be parsed separately
11:17:46FromDiscord<haxscramper> And so I need to build a header dependency graph and determine which header should be wrapped on its own
11:18:05FromDiscord<haxscramper> And which ones cannot even be parsed separately
11:18:40FromDiscord<haxscramper> And by extension - struct defined in file does not mean it should be placed on the wrapper for particular header file
11:20:21FromDiscord<haxscramper> I need to have separate wrappers for different header files because otherwise (if I put everything on one giant file) wrapped types are not recognized as equal, and the two libraries that use let's say `std::vector<T>` in it's API cannot interoperate
11:20:27FromDiscord<haxscramper> Due to types being different
11:20:57*bung joined #nim
11:22:17FromDiscord<mratsim> mmmh but doesn't libclang handle that for you?
11:23:00FromDiscord<haxscramper> Well, I can parse header file of course, the problem is determining which stuff goes where
11:24:34FromDiscord<haxscramper> E.g. if two files use `std::string` it should be wrapped separately, but forward declarations of the `std::string` (I just fucking love C++ - even string is template with three generic parameters, defined in separate header) is a single "API chunk"
11:31:15FromDiscord<mratsim> that seems like the plot of a horror movie
11:34:35*Perkol quit (Remote host closed the connection)
11:36:30FromDiscord<haxscramper> Well, I suppose (my current idea on how to fix this) is that I simply need to build dependency graph for headers, and wrap nodes with `degree > 1` as separate headers
11:37:39FromDiscord<haxscramper> And then just add more heuristics for this stuff. Thankfully libclang provides all information about include directives
11:53:27*vicfred quit (Ping timeout: 256 seconds)
11:56:28narimiranA release candidate for Nim 1.4.2 is out! Get it from the nightlies: https://github.com/nim-lang/nightlies/releases/tag/2020-11-28-version-1-4-74c687e395c946111652c7bef4780b0aa2391cbf or using choosenim: choosenim @74c687e
11:57:04ForumUpdaterBotNew thread by Brett351364: How to rewrite nim programming langauge to be pythonic as possible? , see https://forum.nim-lang.org/t/7170
12:04:07*hsh joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:34*supakeen joined #nim
12:08:03FromDiscord<lqdev> ^ is this a troll post?
12:08:37FromDiscord<lqdev> gosh we have to stop marketing as a "better python"
12:11:15FromDiscord<Imperatorn> Why would you want it to be as pythonic as possible? πŸ€”
12:18:10FromDiscord<Rika> How do I write rust code to be as C++ idiomatic as possible
12:26:41FromDiscord<lqdev> just because we have a python-like indentation sensitive syntax doesn't mean we're a "better python", @dom96
12:27:08FromDiscord<lqdev> in my experience writing python and writing nim considerably different
12:27:14FromDiscord<lqdev> (edit) "in my experience writing python and writing nim ... considerably" added "is"
12:27:59FromDiscord<dom96> I disagree πŸ™‚
12:29:31FromDiscord<dom96> Nim is similar enough to Python and Python is popular enough that it makes sense for us to push it as a better alternative to Python
12:29:56FromDiscord<dom96> Go/Rust are also pushed as a "better Python" and they are even less similar
12:30:02FromDiscord<Quibono> I kinda agree with Dom, as a newbie who converted because I wanted a better python.
12:30:31FromDiscord<Quibono> But I think the language is plenty pythonic
12:32:21FromDiscord<Quibono> Shamelessly stealing python libraries on the other hand...
12:42:13supakeenEh.
12:43:02FromDiscord<lqdev> i find it more similar to c than python
12:43:16FromDiscord<Idefau> i find it more similar to a mix of pascal and c
12:43:21FromDiscord<lqdev> yeah
12:43:31FromDiscord<ProfessorEevee> I mean coming from Python, learning Nim has been a lot easier than other languages
12:43:37FromDiscord<ProfessorEevee> for me, I mean
12:43:47FromDiscord<lqdev> in python you never have to deal with pointers etc
12:44:12FromDiscord<Quibono> Yeah, what Eevee said. It’s a good language if you already know some python.
12:44:16FromDiscord<lqdev> and the syntax is quite a bit different
12:44:26FromDiscord<ProfessorEevee> I mean in general Python is really easy, but I mean learning Nim definitely feels like a better learning experience than Python
12:44:30FromDiscord<lqdev> more reminiscent of pascal
12:44:38FromDiscord<Idefau> nim has similarities with python that make it easier to learn if you come from python sure, but that doesnt make it "pythonic"
12:44:41FromDiscord<ProfessorEevee> What you learn in Nim, you could end up using in other languages that aren't Pythonic
12:45:05FromDiscord<lqdev> eh
12:45:10FromDiscord<ProfessorEevee> I'm thinking mostly languages like Java or C++
12:45:37FromDiscord<ProfessorEevee> which C++, I find very hard to learn even understanding a fair amount of Python
12:45:47FromDiscord<lqdev> how about we stop this discussion, it's just a waste of time :/ we all have different opinions on these matters anyways
12:46:09FromDiscord<ProfessorEevee> eh, I mean it's just discussion
12:46:27FromDiscord<lqdev> in the end it doesn't matter as long as you like the language
12:46:37FromDiscord<ProfessorEevee> Not saying it matters, but it is nice seeing other POVs
12:46:38FromDiscord<Quibono> Iqdev I think you can sort the camps into β€œfeels like python” and β€œyeah but technically it’s very different”
12:46:39FromDiscord<Idefau> wrong, you must like it exactly as i say
12:46:52FromDiscord<Quibono> Lol @Idefau
12:46:54FromDiscord<ProfessorEevee> \😳
12:47:29FromDiscord<ProfessorEevee> so is the best way to try and learn Nim through the manual?
12:47:40FromDiscord<ProfessorEevee> I'm finding it a little hard to learn certain things
12:47:48FromDiscord<Idefau> there's the tutorials, and manual is good
12:48:08FromDiscord<Deleted User 5bd78114> Honestly, writing Nim is way better then Python, so i'd rather keep the pythonic side away-
12:48:38FromDiscord<Deleted User 5bd78114> in my opinion
12:48:39FromDiscord<ProfessorEevee> wait maybe I mean the tutorials and not the manual
12:49:11FromDiscord<Quibono> Have you read through Nim by example? That helps me a bunch
12:49:23FromDiscord<Idefau> that too
12:50:17FromDiscord<ProfessorEevee> I got through a fair bit of it, but even it is a little confusing
12:50:43FromDiscord<ProfessorEevee> Something like this
12:50:44FromDiscord<ProfessorEevee> https://i.imgur.com/2p0uV6l.png
12:51:07FromDiscord<Quibono> What about that?
12:51:31FromDiscord<ProfessorEevee> oh you know what. this whole time I thought it was one module
12:51:44FromDiscord<ProfessorEevee> I didn't even bother to read the comments
12:51:59FromDiscord<ProfessorEevee> I was so confused as to how the `` was making it work \🀦
12:52:26FromDiscord<Quibono> Also there’s like another tutorial on the main page in two parts, which helped on some stuff Nim by example didn’t.
12:52:49FromDiscord<Idefau> yea
12:53:13FromDiscord<Quibono> Between those two, reading the docs, and asking for help 20 times a day lol I’m slowly getting by
12:53:26FromDiscord<Idefau> i learned nim by reading the manual and working on a project
12:53:33FromDiscord<ProfessorEevee> I feel like maybe I'm skipping some reading in the tutorials, then
12:53:37FromDiscord<Idefau> and nim by example
12:57:19*Vladar joined #nim
13:01:59FromDiscord<Quibono> I just read the Nim memory model on the website, are there any other types besides seqs that automatically go on the heap?
13:02:15FromDiscord<Quibono> Like what do I need to avoid for stack only memory
13:02:31FromDiscord<krisppurg> Are there any other games made with nico apart from ftsf / jez impbox
13:03:09*bung quit (Ping timeout: 256 seconds)
13:04:25*habamax quit (Ping timeout: 240 seconds)
13:05:39*habamax joined #nim
13:06:12*antranigv_ joined #nim
13:07:12*antranigv quit (Ping timeout: 260 seconds)
13:08:02FromDiscord<lqdev> @Quibono seqs, strings, and refs are all allocated on the heap
13:08:09FromDiscord<lqdev> everything else goes on the stack
13:16:22FromDiscord<Idefau> i made some
13:19:04*filpAM joined #nim
13:20:49FromDiscord<krisppurg> any link?
13:21:30FromDiscord<Idefau> https://github.com/IDF31/door-o-bot
13:27:06*hmmm joined #nim
13:27:11hmmmhallo
13:27:30FromDiscord<Idefau> sup
13:32:27ZevvAraq: can we have disruptek back?
13:35:11*zahary joined #nim
13:38:04*bung joined #nim
13:43:15*PMunch joined #nim
13:46:25FromDiscord<krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2FNa
13:50:48*antranigv_ quit (Quit: ZNC 1.8.2 - https://znc.in)
13:51:16FromDiscord<haxscramper> `pointer` and `ptr T` are different types. You need to `cast[poitner](addr buffer[offset])`
13:51:45FromDiscord<haxscramper> oh, waut
13:52:02*xet7 quit (Quit: Leaving)
13:52:25*antranigv joined #nim
13:52:43FromDiscord<haxscramper> Use `csize(t)` - https://nim-lang.org/docs/system.html#csize
13:56:27FromDiscord<lqdev> @krisppurg maybe you're running an outdated version of sdl2_nim
13:56:38FromDiscord<lqdev> csize is deprecated
13:56:52FromDiscord<Idefau> hmm i tried compiling my game with the nim nightly and it worked
13:57:16Clonkk[m]Why does the doc says it's not the same things if it's just deprecated ? Are there plan to use csize for something else ?
13:57:58FromDiscord<mratsim> use csize_t
13:58:18FromDiscord<lqdev> csize is signed which is not the same as size_t in C
13:58:23FromDiscord<mratsim> the differences is that cfoo types are supposed to be like in C but csize was mapped to int instead of uint
14:01:18Clonkk[m]For my curiosity, why define another m instead of fixing it ?
14:02:04FromDiscord<krisppurg> im using nim v1.4.0
14:05:52FromDiscord<lqdev> @Clonkk lots of code already used csize when csize_t was introduced
14:06:00FromDiscord<lqdev> and the two aren't compatible
14:06:06FromDiscord<lqdev> for a few reasons
14:06:14FromDiscord<lqdev> the most obvious one being signedness
14:06:32FromDiscord<lqdev> but also that unsigned types are not range checked
14:13:59FromDiscord<tomck> Is there any way i can do a mapIt with a `var` iterator var?
14:14:30FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2FNq
14:14:39FromDiscord<tomck> or something from zero_functional, e.g. `myList --> map(...)`
14:15:36Zevvhm that kind of goes against what map() is doing, right? Do you mean apply() instead?
14:16:39FromDiscord<tomck> nope, i want an impure map
14:17:00Zevvit's not there
14:17:08FromDiscord<tomck> alright, thanks
14:17:09*abm joined #nim
14:17:15FromDiscord<lqdev> just use a for loop with mitems
14:17:26Zevvor make your own map, it's trivial
14:17:53FromDiscord<lqdev> or don't because it's useless and decreases readability because mitems exists
14:18:07FromDiscord<tomck> solution with a for loop is like 5 lines
14:18:10FromDiscord<tomck> i'll probably write my own
14:18:13FromDiscord<lqdev> no?
14:18:26Zevvwe can't stop you, right
14:18:29Zevvit's a free internet
14:18:29FromDiscord<lqdev> `for it in mitems(myList): it += 1`
14:18:44FromDiscord<tomck> sent a long message, see https://paste.rs/hpJ
14:18:58FromDiscord<lqdev> uh... why?
14:19:02FromDiscord<lqdev> you can just use mapIt
14:19:13FromDiscord<tomck> no, b/c `it` in mapIt isn't var
14:19:23FromDiscord<lqdev> but why would it be
14:19:32FromDiscord<lqdev> what on earth are you trying to do
14:20:31FromDiscord<tomck> i have a solution now, it's fine - but for you curiosity, I have a function to transform X -> Y, but X has a field to store the result of this transformation for subsequent calls
14:20:42FromDiscord<tomck> So i need a `var X` in order to cache the result inside the X for future calls
14:21:12FromDiscord<Rika> But now it's not functional
14:21:32FromDiscord<Rika> Why use functional style functions if you're not gonna use functional style anyway
14:21:46FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2FNx
14:21:58FromDiscord<tomck> b/c 'functional style' functions are incredibly terse
14:23:35FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2FNy
14:23:51FromDiscord<tomck> doesn't need to be pure, there are plenty of 'loop + collect' operations that aren't pure
14:28:28*filpAM quit (Ping timeout: 246 seconds)
14:32:58bung@mratsim in chronos if I use TLS ,read write should through new stream ?
14:33:25FromDiscord<krisppurg> I've updated nim and still getting same error even updated sdl2_nim
14:33:36FromDiscord<krisppurg>
14:33:57FromDiscord<krisppurg> ^
14:34:05FromDiscord<krisppurg> (edit) "" => "^"
14:38:26FromDiscord<lqdev> then try updating nico?
14:46:04*hmmm quit (Ping timeout: 256 seconds)
14:48:46FromDiscord<krisppurg> i have also
14:48:54FromDiscord<krisppurg> (edit) "also" => "already"
14:48:58FromDiscord<krisppurg> @lqdev
14:49:07FromDiscord<lqdev> no clue
14:49:10FromDiscord<lqdev> cc @impbox
14:54:49*fredrikhr quit (Read error: Connection reset by peer)
15:18:31FromDiscord<krisppurg> whenever I set my executable icon to (attachment) I get a compiler error saying that the file format isn't recognised https://media.discordapp.net/attachments/371759389889003532/782264163749593118/escape_the_cube.ico
15:20:04FromDiscord<lqdev> since when does the compiler allow you to set the executable icon?
15:22:50FromDiscord<krisppurg> https://discordapp.com/channels/371759389889003530/371759607934353448/704378657812250944
15:23:47*PMunch quit (Quit: leaving)
15:23:48FromDiscord<lqdev> huh
15:24:04FromDiscord<lqdev> interesting
15:38:08bungI cant see image ,windows icon is custom format and havn' seen the format definition
16:04:11*lritter joined #nim
16:27:58*rockcavera quit (Remote host closed the connection)
16:33:01FromDiscord<trickster0> Hello quick question, do you know how to wrapSocket or implement SSL on AsyncHttpServer ?
16:46:37*Guest94576 joined #nim
16:48:13*hmmm joined #nim
16:51:01*nixfreak joined #nim
16:51:27*Zevv quit (Quit: Lost terminal)
16:52:12*Zevv joined #nim
16:54:41*pietroppeter joined #nim
16:56:50FromGitter<HJarausch_gitlab> List comprehension : official example fails ⏎ From github.com/nim-lang/Nim/blob/devel/tests/macros/tcollect.nim ⏎ I have copied ⏎ ⏎ ```import sugar ⏎ echo collect(for i in 0..3: i)``` ... [https://gitter.im/nim-lang/Nim?at=5fc281520219b46a266543ff]
16:57:50narimiransee the documentation for collect: https://nim-lang.github.io/Nim/sugar.html#collect.m%2Cuntyped%2Cuntyped
16:58:51narimirani have no idea how you came to `tcollect`
16:59:08narimiranwhich is a test file for `collect` written in that file. not for sugar.collect
17:00:36FromGitter<HJarausch_gitlab> Oh, I see. I thought it is a test for sugar/collect
17:00:53narimiranit doesn't even import sugar
17:01:17Zevvfor narimiran, love from zevv: https://github.com/zevv/aoc2020
17:01:20narimiraneven still, generally it is better to read the documentation of the module, than some random test
17:01:26Zevvwe'll see when you bail out again, boi
17:01:35narimiranZevv: :)
17:02:13narimiranZevv: btw, today i solved 2018, day25, as a preparation
17:02:35narimiranand then i remembered my biggest problem with AoC β€” i can't read.
17:03:12Zevvyeah, it feels like me fixing a random ticket pushed in by some sales or product guy
17:03:16Zevv"done!"
17:03:20Zevvnooo, you're not
17:06:01ForumUpdaterBotNew thread by Mildred: How to unwrap a seq to a varargs[] procedure argument?, see https://forum.nim-lang.org/t/7171
17:13:10FromGitter<HJarausch_gitlab> ```code paste, see link``` ⏎ ⏎ This works, but I haven't managed to use a 'collect' expression directly as parameter of function call like ⏎ ⏎ echo collect .... ... [https://gitter.im/nim-lang/Nim?at=5fc28526226043667c1f3da3]
17:22:23FromDiscord<mratsim> @Bung87 no idea unfortunately
17:24:24planetis[m]works: https://play.nim-lang.org/#ix=2FOx
17:27:14planetis[m]i know why it doesn't work there is a pending fix
17:27:22planetis[m]https://github.com/nim-lang/Nim/pull/16089
17:29:40planetis[m]meanwhile you can try my package: https://github.com/planetis-m/looper
17:37:39*avass quit (Remote host closed the connection)
17:39:08FromGitter<HJarausch_gitlab> @planetis Thanks! What can I do if I want to import both *sugar* and *looper* . Currently there is a name clash
17:39:27narimiranimport sugar except foo
17:41:21planetis[m]wait let me update it, somehow i forgot pushing
17:41:30*nixfreak quit (Quit: Lost terminal)
17:43:55planetis[m]done
17:46:55planetis[m]narimiran can you merge https://github.com/nim-lang/fusion/pull/46 please :)
17:47:34narimiranmerged
17:48:20planetis[m]you 're awesome
17:53:21FromDiscord<krisppurg> im having troubles with linking an icon to my nim executable had a look online about converting a png file to an o file, still cant even know how to convert to that is there any other way of adding an icon to an executable?
17:56:48FromDiscord<lqdev> maybe https://github.com/electron/rcedit ?
17:57:16FromDiscord<lqdev> you'll need to convert your png to an ico file
17:59:25FromDiscord<Daniel> there is neel which i think is similar to electron, not sure
17:59:46FromDiscord<Daniel> !neel
18:00:49FromDiscord<krisppurg> I've already converted my png to an ico file
18:01:07FromDiscord<Daniel> (edit) "!neel" => "!repo neel"
18:01:14FromDiscord<krisppurg> !repo neel
18:02:55FromDiscord<Quibono> I’m trying to spread the good word of Nim.
18:05:58FromDiscord<Quibono> Posted in the algo trading subreddit saying it’s awesome
18:06:28FromDiscord<lqdev> @Daniel uh?
18:06:34FromDiscord<lqdev> i was just linking to a resource editing tool
18:07:20FromDiscord<lqdev> `value.nim(147, 14) Error: invalid type: 'Object' in this context: 'proc (v: Value): bool' for proc`
18:07:21FromDiscord<lqdev> ummmmmm
18:07:22FromDiscord<lqdev> what?
18:07:30FromDiscord<lqdev> anyone could help me decode this error?
18:10:33FromDiscord<Daniel> @lqdev i misunderstood, sry.
18:10:40FromDiscord<lqdev> np
18:10:51*vicfred joined #nim
18:30:56*xet7 joined #nim
18:35:52*vsantana joined #nim
18:36:55disbothttps://github.com/beef331/constructor -- 9constructor: 11Nim macros to aid in object construction including event programming, and constructors. 15 3⭐ 0🍴 7& 2 more...
18:36:55disbotβž₯ Wrapping
18:37:05disbothttps://github.com/Niminem/Neel -- 9Neel: 11A Nim library for making Electron-like HTML/JS GUI apps, with full access to Nim capabilities. 15 52⭐ 2🍴
18:37:07disbotβž₯ buildAst fixe crash with method call syntax
18:37:09disbotβž₯ add collect with infered init, refs #16078 fixes #14332
18:40:11FromDiscord<lqdev> …what happened here?
18:41:04*Guest94576 quit (Quit: Guest94576)
18:45:18*thomasross joined #nim
18:46:25*bung quit (Ping timeout: 264 seconds)
18:46:44FromDiscord<Idefau> yes
18:54:34Zevvdoes anyone know if this compiler crash (sigsegv on stack overflow) fits in an open github issue? https://play.nim-lang.org/#ix=2FPf
19:04:00*pietroppeter quit (Quit: Connection closed for inactivity)
19:04:19*vsantana quit (Quit: Leaving)
19:04:34Zevvnew one then https://github.com/nim-lang/Nim/issues/16175
19:04:36disbotβž₯ Compile crash (stack overflow) on recursive generic type ; snippet at 12https://play.nim-lang.org/#ix=2FPp
19:09:40PrestigeIs there something like Positive but for floats?
19:11:22FromDiscord<nikki> [0.0..Inf] ?
19:11:30FromDiscord<nikki> includes 0 tho
19:11:48Prestigeoh cool, thanks
19:11:51FromDiscord<nikki> !echo [0.0..Inf]
19:12:06FromDiscord<nikki> wups
19:12:17FromDiscord<nikki> !eval echo [0.0..Inf]
19:12:21NimBot[0.0 .. inf]
19:13:36FromDiscord<Recruit_main707> r/wooooosh
19:18:07FromDiscord<Idefau> reddit moment(big chungus 1000 keanu reeves 1000)
19:19:58FromGitter<bung87> https://github.com/simdjson/simdjson
19:20:19FromGitter<bung87> look what i found
19:21:21FromDiscord<Idefau> interesting
19:22:14FromDiscord<Recruit_main707> compare it to flatbuffers & msgpack
19:22:18*nixfreak joined #nim
19:22:26FromDiscord<Recruit_main707> then it might be interesting
19:23:07nixfreakgoing though the nim in action book and getting errors with asyncdispatch. Does asyncdispath.poll() have to a have a default timeout also?
19:23:47nixfreakChat application started
19:23:48nixfreakConnecting to 127.0.0.1
19:23:48nixfreak/home/nixfreak/nim/practice/Chat_project/src/client.nim(30) client
19:23:48nixfreak/home/nixfreak/.choosenim/toolchains/nim-1.4.0/lib/pure/asyncdispatch.nim(1626) poll
19:23:50nixfreak/home/nixfreak/.choosenim/toolchains/nim-1.4.0/lib/pure/asyncdispatch.nim(1316) runOnce
19:23:53nixfreakError: unhandled exception: No handles or timers registered in dispatcher. [ValueError]
19:23:56FromDiscord<Recruit_main707> wowowow
19:24:01Zevvnikki: now make me that range excluding 0
19:24:17FromDiscord<nikki> nope
19:24:23Zevvpff rude.
19:25:13nixfreakI don't even see an asyncdispatch.poll() in the manual
19:25:48FromGitter<bung87> its internal use
19:27:14FromGitter<bung87> you can just use waitfor
19:29:32nixfreakis the code correct for client.nim for version 1.4 ?
19:32:09FromGitter<bung87> dont know whats the problem by reading your error message
19:34:01nixfreakhttp://sprunge.us/PzYR8O
19:39:49*abm quit (Ping timeout: 264 seconds)
19:45:59*vsantana joined #nim
19:47:22*vsantana left #nim (#nim)
19:52:52*vsantana joined #nim
20:04:43*FromGitter quit (Read error: Connection reset by peer)
20:05:40*superbia joined #nim
20:06:11*FromGitter joined #nim
20:08:49*habamax quit (Quit: leaving)
20:10:53*bung joined #nim
20:11:00FromDiscord<treeform> Is there a way to make nim doc also generate `exported modules`?
20:12:22FromDiscord<dom96> nixfreak: you're never calling `connect`, see here for this example: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim
20:15:31*bung quit (Ping timeout: 256 seconds)
20:23:40nixfreakok thanks dom96
20:32:49nixfreakgot it thanks again
20:37:49*abm joined #nim
20:37:59*rockcavera joined #nim
20:51:45*vsantana quit (Read error: Connection reset by peer)
20:52:26*bung joined #nim
20:55:21*mbomba joined #nim
20:56:45*bung quit (Ping timeout: 240 seconds)
21:06:16*oculuxe joined #nim
21:06:20*natrys quit (Quit: natrys)
21:06:52*oculux quit (Ping timeout: 256 seconds)
21:11:36*hmmm quit (Ping timeout: 240 seconds)
21:19:13*hnOsmium0001 joined #nim
21:21:09*Mortir joined #nim
21:21:28*nixfreak quit (Ping timeout: 246 seconds)
21:23:11Mortiris nim still planning to target c++ by default?
21:25:36*narimiran quit (Ping timeout: 240 seconds)
21:26:38*azed joined #nim
21:27:19FromDiscord<haxscramper> I've never heard about nim planning to use C++ by default, so most likely no
21:27:36FromDiscord<haxscramper> But this is just `nim c` vs `nim cpp` to compile your project
21:29:16*rockcavera quit (Remote host closed the connection)
21:30:54FromDiscord<ElegantBeef> isnt `c` short for compile, so if you modify your base `nim.cfg` you can get it to default cpp?
21:33:25FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2FQw
21:34:45FromDiscord<haxscramper> But I guess there is more than one way to send compilation backend, so yeah, `--backend:cpp` probably would also work
21:38:57*hmmm joined #nim
21:42:34Mortirhttps://forum.nim-lang.org/t/4022#25037
21:53:10*nixfreak joined #nim
21:58:34*mwbrown quit (Quit: Exiting)
21:59:20*a_chou joined #nim
22:17:40*a_chou quit (Remote host closed the connection)
22:21:56Mortirgotta go now, if anybody can answer, i will check the logs tomorrow.
22:22:13Mortirgoodnight
22:22:20*Mortir quit (Quit: leaving)
22:25:45*Prestige quit (Quit: Prestige)
22:25:59*mwbrown joined #nim
22:27:16*Prestige joined #nim
22:28:52*azed quit (Quit: WeeChat 2.9)
22:33:57*Jesin quit (Quit: Leaving)
22:35:16*pietroppeter joined #nim
22:39:07*avass joined #nim
22:44:16*Jesin joined #nim
22:52:59*NimBot joined #nim
22:54:15FromDiscord<iWonderAboutTuatara> I'm still having more issues with raylib forever
22:55:22*ChanServ quit (*.net *.split)
22:56:17FromDiscord<iWonderAboutTuatara> has anyone used it?
22:56:51FromDiscord<iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2FQS
23:04:47*mwbrown joined #nim
23:06:42*Vladar quit (Remote host closed the connection)
23:10:12*mbomba quit (Quit: WeeChat 3.0)
23:16:04FromDiscord<ElegantBeef> Do you have the `libraylib.so`?
23:16:41FromDiscord<ElegantBeef> @iWonderAboutTuatara
23:16:48FromDiscord<iWonderAboutTuatara> no
23:16:52FromDiscord<iWonderAboutTuatara> I odn't know where to find it?
23:17:00FromDiscord<iWonderAboutTuatara> Do I have to download it from raylib repo itself?
23:19:00FromDiscord<ElegantBeef> https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux
23:50:10*ryanhowe joined #nim