<< 31-12-2020 >>

00:00:42*tane quit (Quit: Leaving)
00:40:06FromDiscord<juliuskiesian> what's nim's way of calling method of the super type?
00:40:35FromDiscord<ElegantBeef> `a.SuperType.method` i believe
00:42:28FromDiscord<ElegantBeef> Tested that and i was wrong
00:48:27FromDiscord<ElegantBeef> Ah it's `proccall`
00:48:36FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2KmD
00:48:40FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#methods-inhibit-dynamic-method-resolution-via-proccall
00:49:07*l1x quit (Quit: Connection closed for inactivity)
00:59:37*Gustavo6046 quit (Ping timeout: 272 seconds)
01:01:02*Gustavo6046 joined #nim
01:12:54*vicfred quit (Quit: Leaving)
01:13:38FromDiscord<juliuskiesian> hm, the naming is a bit confusing.
01:14:00FromDiscord<juliuskiesian> one would expect methodCall.
01:19:28*azed joined #nim
01:43:46PrestigeA method is just a special type of proc, and I don't think procCall is limited to methods
01:46:04*cyraxjoe quit (Quit: I'm out!)
01:48:54*cyraxjoe joined #nim
01:51:54*azed quit (Quit: WeeChat 3.0)
02:02:27saemA butts, can't fill in all the info for the big report on my phone. Hopefully I remember later.
02:03:06*cyraxjoe quit (Quit: I'm out!)
02:05:53*cyraxjoe joined #nim
02:19:55*jjido quit (Quit: Connection closed for inactivity)
02:53:31*Tanger joined #nim
03:41:54*rockcavera quit (Remote host closed the connection)
03:50:32*D_ quit (Ping timeout: 256 seconds)
03:51:00*D_ joined #nim
03:52:50*muffindrake quit (Ping timeout: 264 seconds)
03:53:23*leorize quit (Ping timeout: 240 seconds)
03:54:43*muffindrake joined #nim
04:10:04*leorize joined #nim
04:15:00FromDiscord<Rika> is there a sugar.dup for functions with two arguments that are modified in place?
04:21:24*rockcavera joined #nim
04:35:38*spiderstew_ joined #nim
04:38:22*spiderstew quit (Ping timeout: 256 seconds)
04:45:25FromDiscord<exelotl> aw man the compiler's segfaulting on me :(
04:46:29FromDiscord<Rika> the nim experience™️
04:46:29FromDiscord<exelotl> sent a code paste, see https://paste.rs/RFN
04:46:34FromDiscord<Rika> yes
04:46:38FromDiscord<Rika> theyre the hints from 1.0
04:46:49FromDiscord<exelotl> is there a way to get it to output the module name?
04:46:51FromDiscord<Rika> hint processing module etc
04:46:53FromDiscord<Rika> nope
04:46:57FromDiscord<Rika> no clue how
04:47:53FromDiscord<exelotl> dangit
04:49:43FromDiscord<exelotl> ah well I'll figure it out tomorrow
04:49:55FromDiscord<exelotl> if anyone knows the answer please ping me x)
04:52:58FromDiscord<Sorrow> sent a code paste, see https://play.nim-lang.org/#ix=2Knc
04:54:12FromDiscord<Rika> any issue?
04:55:37FromDiscord<Sorrow> Eh?
04:57:35FromDiscord<Rika> what are you asking
04:57:43disruptekhow tall are you?
04:58:52FromDiscord<Sorrow> How to port it to Nim.
04:59:34disruptek~manual
04:59:35disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
04:59:35disbotmanual: 11just good to Ctrl+F in cases like this
04:59:57disrupteki'd be happy to port it for you at a very reasonable rate.
05:00:44FromDiscord<Rika> lol
05:00:58FromDiscord<Sorrow> 10 headpats?
05:07:45*Jesin quit (Read error: Connection reset by peer)
05:08:04*Jesin joined #nim
05:22:03saemissue submitted.
05:27:08*Jesin quit (Read error: Connection reset by peer)
05:38:12*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:38:21*njoseph joined #nim
05:47:24ForumUpdaterBotNew thread by Chris3606: Error Using _kbhit with .importc, see https://forum.nim-lang.org/t/7317
06:27:19*habamax joined #nim
06:32:00*Tanger quit (Remote host closed the connection)
06:43:09*waleee-cl quit (Quit: Connection closed for inactivity)
07:30:57disruptek!repo testes
07:30:58disbothttps://github.com/disruptek/testes -- 9testes: 11a small unittest framework with decent support 🔴🟡🟢 15 22⭐ 0🍴 7& 29 more...
07:34:02*opal quit (Remote host closed the connection)
07:34:29*opal joined #nim
07:34:38*narimiran joined #nim
07:36:55FromDiscord<CodeHz> can I create indirect recursive type? https://media.discordapp.net/attachments/371759389889003532/794106797023559720/unknown.png
07:37:12FromDiscord<CodeHz> (consider B is vtable for A
07:39:26FromDiscord<CodeHz> oh, can be done in same typesection
07:41:53FromDiscord<CodeHz> still not working... https://media.discordapp.net/attachments/371759389889003532/794108046405664768/unknown.png
07:44:57FromGitter<gogolxdong> Does Channel have any issue when working with async?
07:44:59FromDiscord<ElegantBeef> This works https://play.nim-lang.org/#ix=2Knx
07:46:17*kenran joined #nim
07:59:37FromDiscord<CodeHz> (edit) still not working... (updated: fixed, I just swap two typedef https://media.discordapp.net/attachments/371759389889003532/794108046405664768/unknown.png
08:26:22*letto quit (Quit: Konversation terminated!)
08:29:46FromGitter<gogolxdong> Will Nim be GC free after turing into CPS?
08:29:53*letto joined #nim
08:33:40FromGitter<gogolxdong> It seems that CPS's memory management is using stack
08:35:13FromDiscord<ElegantBeef> Well ARC isnt technically a GC, so it already can be
08:36:50FromDiscord<cybertim> trying to put my feet into the nim js waters, i noticed there is a asyncjs lib but using that one still gives me the "Error: 'getCurrentException' is not GC-safe as it accesses 'lastJSError' which is a global using GC'ed memory" error which seems to be related to 'always set a Future' as return type? (following the docs) but i'm also using the asynchttpserver, that internally uses asyncdispatch instead of asyncjs, so.. is nim js ever goi
08:37:41FromDiscord<ElegantBeef> afaik the httpserver uses system calls or C ffi, so i dont think it'll ever work with js
08:38:31FromDiscord<cybertim> ok, so nim js really needs 'different' kind of codebase i presume, its not magic like just set the js tag and voila your nim program now runs on deno or node etc
08:38:49saemThat's correct
08:38:51FromDiscord<ElegantBeef> Well pure nim code that doesnt rely on system libs or C should
08:39:52FromDiscord<ElegantBeef> https://github.com/juancarlospaco/nodejs is the nodejs stdlib bindings
08:40:09saemNim supports the browser, but not node when it comes to JS. In that system APIs assuming an OS don't work.
08:40:35FromDiscord<ElegantBeef> Yep you can use Nim for node but you'd need to make bindings for the specific libraries you need
08:40:41saemYou can output JS so with some glue, 3rd party or your own you can run that code in node
08:40:57FromDiscord<cybertim> yes but i thought (maybe) since asynchttpserver probably also has some internal difference between windows/linux etc these libraries were also written with an internal difference for the js ecosystem
08:41:22FromDiscord<ElegantBeef> Well they could be
08:41:26FromDiscord<ElegantBeef> But they currently are not
08:41:31saemThe node js define is mostly there to allow for a few things to get out of your way, but doesn't do all the FS and other bits.
08:41:51FromDiscord<ElegantBeef> JS doesnt have a http request backend though so idk how you'd do it
08:42:13FromDiscord<ElegantBeef> Unless the browser request is the same as node's
08:42:32FromDiscord<ElegantBeef> If it's not you'd have to support every seperate js runtime manually
08:43:49FromDiscord<cybertim> yes that is true, im to focused on nodejs kind of services, but that wouldnt make sence anyway because these can be easily done within nim itself, i will try a different approach 🙂
08:44:20FromDiscord<ElegantBeef> If you want to use JS get comfortable writting the bindings
08:44:44saemUnless you have particular needs just complied to the C backend for server side
08:44:45FromDiscord<ElegantBeef> It's not overly difficult, this is a quickly made example i've made https://github.com/beef331/mrapi/blob/master/src/mrapi.nim
08:45:01FromDiscord<ElegantBeef> Yep, no point using JS when you have C
08:45:33saemI've written a whole bunch of node and vs code API bindings, it was pretty easy and quick
08:46:03FromDiscord<ElegantBeef> Yep it's super easy, although unless you're forced to using JS, there is no point
08:46:38FromDiscord<ElegantBeef> The more annoying thing is if you want properly typed objects, i just half assed the WebRTC stuff for that api
08:46:50saemAlthough the node js api docs are awful
08:46:52FromDiscord<ElegantBeef> `JsObject` is a nice abstraction, although super unhelpful
08:48:06saemYou only need JsObject at the edge of your system where it's squishy
08:48:37saemAny other time I used it wasn't worth while.
08:48:50FromDiscord<ElegantBeef> Yea, like in my example i couldnt be arsed to attempt to match the required type since it was super complicated
08:49:04FromDiscord<ElegantBeef> Nim objects in JS match a normal JS object right?
08:49:14FromDiscord<ElegantBeef> When inherited from jsobject
08:49:53saemYes
08:50:22saemEven without, because that's all JS really gives you until you get to classes or records
08:50:58saemBut even then that stuff works anyways, because JS
08:51:10FromDiscord<ElegantBeef> I really should revisit the JS nim binding generator at one poine
08:51:23saemSo unless you're going back and forth it's fine
08:51:34saemYou mean TS?
08:51:40FromDiscord<ElegantBeef> Nope js
08:52:03saemLook at JS code and generate bindings?
08:52:06FromDiscord<ElegantBeef> Some things are in just normal JS and it'd be nice to be able to auto generate them
08:52:13FromDiscord<ElegantBeef> Yea i toyed with it briefly
08:52:25saemThat's quite the hill
08:52:46saemI mean so many of the pure js things have TS bindings
08:53:14saemAnd JS is a subset of TS so...
08:53:22FromDiscord<ElegantBeef> Yea i know
08:53:47FromDiscord<ElegantBeef> The biggest thing is that those dont work well either honestly, since you have to dick around with anywhere there is an interface atm
08:53:50PrestigeWith TS having types, could be quite handy
08:53:52saemAnyways there are two such projects for TS and only one is semi-active presently
08:54:13saemLast I checked
08:54:37saemWhen you get to interfaces I think you need to go concepts
08:54:39FromDiscord<ElegantBeef> Having `JsObject` instead of having to manually convert code is just easier to atleast test 😄
08:54:50saemYup
08:55:49PrestigeConcepts are being reworked, right? Curious what will be changed
08:56:12saemOr I guess even with interfaces you could make no-op cast procs on top of distinct JSObjects or something
08:56:30saemMe too
08:58:02saemI partly wish we had rows as a lighter weight version but the utility might be too low. They'd be like light weight concepts. Similar to template and macro relationship.
08:58:36PrestigeRows?
08:59:50saemRow polymorphism, like typescript interfaces. All compile time, if it has field with the right name and type it fits. Basically marks anything that uses it implicitly generic
09:00:25FromDiscord<ElegantBeef> So Nim's concepts? 😄
09:00:47PrestigeSounds like the same thing to me
09:00:51saemYes, but lighter, as it doesn't cover as many things
09:01:04saemSo structural
09:01:21PrestigeWhat about proc definitions?
09:01:28saemAgain, the narrowing might not be sufficient to lighten the implementation
09:01:31saemNot covered
09:01:35PrestigeAh okay
09:01:53saemUnless it's a field storing a function pointer
09:02:21PrestigeBeef, did you ever do anything with that macro/template to import and export with a single line?
09:02:54*Gustavo6046 quit (Ping timeout: 268 seconds)
09:03:18PrestigeLike make a lib or a PR
09:03:40FromDiscord<ElegantBeef> I think i made one forever ago, though i never kept it
09:04:00FromDiscord<ElegantBeef> Also i'm just realizing now Nim concepts are user defined duck typing 😄
09:05:19PrestigeImport and export together would be a nice language feature
09:05:48FromDiscord<ElegantBeef> Yea but unless it got brought into the system module would require manually modifying cfgs 😄
09:06:00PrestigeAlso being able to import relative to the project root... There's probably already a way
09:06:24FromDiscord<ElegantBeef> Huh?
09:06:36FromDiscord<cybertim> lol https://github.com/pragmagic/karax this is what i had in mind, i see this has already been done, nice case study 🙂
09:06:56PrestigeLike, not having to import "../a"
09:07:01FromDiscord<ElegantBeef> Ah
09:07:33FromDiscord<ElegantBeef> Yea time to make `import-utils`
09:08:41saemHonestly what's the big deal about import/export in one line?
09:08:56FromDiscord<ElegantBeef> It's a nice feature
09:09:12saem... is it?
09:09:16PrestigeYes
09:09:23FromDiscord<ElegantBeef> `word ./[moduleA, moduleB, moduleC]`
09:09:29FromDiscord<ElegantBeef> word being whatever i decide
09:09:44FromDiscord<ElegantBeef> guess `.` was redundant
09:09:47saemI mean, if anything I went in the opposite direction
09:10:06FromDiscord<ElegantBeef> What do you mean?
09:10:13saemI try to minimize my imports to specific types and imports
09:10:19saemTo keep the surface area small
09:10:34FromDiscord<ElegantBeef> Eh that's one way
09:10:39saemAnd easy to reason about how strong/necessary the dependency is
09:10:46PrestigeIt gets tedious
09:11:08FromDiscord<ElegantBeef> Sure, it's tedious and an uphill battle if you're writing code from a blank canvas
09:11:21saemExpanding API surface and doing so easily seems like a bad idea.
09:11:33FromDiscord<ElegantBeef> It's the norm and it's' fine
09:12:20*NimBot joined #nim
09:12:21saemIt really isn't
09:12:33FromDiscord<Rika> Don’t give them too many redundant choices
09:12:36saemBesides the option is there
09:12:43saemIt's just not streamlined
09:12:56FromDiscord<ElegantBeef> It's tedious to work around imo
09:13:01PrestigeYep
09:13:20FromDiscord<ElegantBeef> Unless you need only a few features of a module, i dont see why you'd do it
09:13:31saemYes, but it's generally bad so the tedium is a good signal to reconsider and a small price for what should be something that doesn't happen often.
09:13:50saemI mean the single line import export
09:13:51FromDiscord<Rika> What’s streamlined for you may not be for me, and the disadvantages of “polluting” for you is lesser than the disadvantages of people needing to work around your excessive “streamlining”
09:13:58PrestigeDepends on the program/lib
09:14:15FromDiscord<ElegantBeef> What's' the issue with the `import export` single line?
09:14:31*ThatGuyFromThere joined #nim
09:14:37PrestigeYou'd need to work around not using a template?
09:14:58ThatGuyFromThereYo, working cairo binding or do i need to fixem myself
09:15:08FromDiscord<ElegantBeef> Was that to me prestige?
09:15:11FromDiscord<Meowz> Are the devs of nimpy here?
09:15:11FromDiscord<Rika> What is Cairo
09:15:17PrestigeTo Rika
09:15:27FromDiscord<ElegantBeef> Cairo is a linux api rendering api iirc
09:15:34ThatGuyFromThereRika: they are
09:15:35ThatGuyFromThereextra/cairo 1.17.4-3 (635.8 KiB 1.7 MiB) (Installed) 2D graphics library with support for multiple output devices
09:15:38FromDiscord<Rika> Prestige, I’m not sure what you mean, but I’ll just drop the argument if so
09:15:56ThatGuyFromThererika basically p5.js on c++
09:15:57FromDiscord<Rika> I’m a bit oxygen deprived from exercise
09:16:08PrestigeYou said something about people having to work around excessive streamlining, but we were just be adding a new template
09:16:15FromDiscord<Rika> I don’t know what p5.js is either
09:16:21FromDiscord<ElegantBeef> It's basic rendering
09:16:39FromDiscord<ElegantBeef> Rika wasnt talking against import/export on a single line but selective importing
09:16:45PrestigeAh
09:16:50FromDiscord<ElegantBeef> Atleast my reading seems to indicate that
09:16:55FromDiscord<Rika> Yeah
09:16:56saemThatGuyFromThere: haven't seen one, but have you checked nimble already?
09:17:35FromDiscord<ElegantBeef> Yea we got multiple bindings for it
09:17:38ThatGuyFromTherenimble only had the main cairo I know the fixes so I'll try implement them basically not good dir structure
09:17:51ThatGuyFromThereNot okay imports too
09:17:52PrestigeI think I'd just call it 'importAndExport' tbh
09:18:00FromDiscord<ElegantBeef> Pretty wordy
09:18:36PrestigeYeah, but at least it's descriptive. Maybe I'm not creative enough for this naming stuff thing lol
09:19:23ThatGuyFromThereSomebody had already fixed em but in 2018
09:22:17FromDiscord<ElegantBeef> `impart` could work
09:22:55FromDiscord<cybertim> whats is the difference between string and cstring?
09:23:01PrestigeI think it's too similar to import
09:23:27FromDiscord<ElegantBeef> Well i had `share` or `expose` as other ideas
09:24:16FromDiscord<Vindaar> Nim's cairo module works great, what are your issues with it?
09:25:30ThatGuyFromThereVindaar: Not working
09:25:32FromDiscord<Vindaar> @Meowz not sure I'd call myself a dev of nimpy, but I've contributed several times. What's your issue?
09:25:42FromDiscord<Vindaar> what does "not working" mean?
09:25:43ThatGuyFromTherecannot import x
09:25:59saemMaybe an import pragma like "open", in terms of an open module, wherein a normal import (no export) is sealed. Still sounds like not a great call. 😉
09:26:05PrestigeCan you show a code sample?
09:26:12PrestigeThatGuyFromThere:
09:27:13FromDiscord<Meowz> No really an issue. I was just wondering if the future of `exporting Nim types/functions as Python classes/methods` is already under progress
09:27:14Prestigesaem: sealed? How is that different from a normal import?
09:28:35FromDiscord<Meowz> I saw some `exportExperimentalPy` (?) pragma. Guess that could be it?
09:29:02saemIt's not and they don't need it, would be implied. But before rushing down that route people might have bigger ideas around modules, like first class ones that are more worth exploring.
09:29:25*habamax quit (Ping timeout: 246 seconds)
09:30:39PrestigeI'm not exactly following, but that's okay. If it's not added into the language I'll just make and use a package for it
09:31:48ThatGuyFromTherePrestige: in cairo there is freetypeh
09:31:50ThatGuyFromTherewhat is it
09:32:13Prestigefreetype? Some lib for font rendering iirc
09:32:26PrestigeGoogle would know more
09:33:35*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:37:22FromDiscord<Vindaar> @Meowz I just checked the code again: regarding objects, they are currently transformed into python dictionaries whereas Nim procs are handed as `PyCapsule`↵So I suppose the answer is "no". Where did you see that pragma?↵I'm not sure what would be required to hand Nim objects as Python objects (well obv. create a Python class of it, instantiate an element of it; but how one would best do that)
09:40:05FromDiscord<Meowz> It was `pyexportTypeExperimental`: https://github.com/yglukhov/nimpy/blob/master/nimpy.nim#L1213
09:42:01FromDiscord<Vindaar> ahh, very interesting!
09:42:56FromDiscord<Meowz> Indeed. Just fails currently for most of my functions 😄
09:43:28FromDiscord<Vindaar> so you want to call Nim from Python and use the Nim types as native Python types in Python?
09:45:22*tane joined #nim
09:46:30FromDiscord<Meowz> Guess thats how it should work some day. A simple vector object could be used like `vector.x` from python instead of the dict way `vector["x"]`
09:47:06Oddmongerhow to have two codepaths, one for libc and one for javascript in nim sources ?
09:47:22saemWhen statement
09:47:24Oddmongerusing « when: » ?
09:47:27Oddmongerah ok
09:47:50Oddmongerwhen javascript: …
09:47:51FromDiscord<Vindaar> yes, sure. ↵I was just curious, because of course one also might want to call Python from Nim, but hand a native Nim type to a Python function, in which one wants to use that type as a native Python type
09:50:15Oddmongercan i test target with when ? (and how :) )
09:50:37FromDiscord<Rika> target what?
09:50:38FromDiscord<Rika> os?
09:50:41FromDiscord<Rika> architecture?
09:51:07*Kaivo quit (Ping timeout: 246 seconds)
09:51:34Oddmongerjs / other
09:51:42Oddmongerah when defined(javascript): , maybe
09:52:28Oddmongeryes
09:52:53FromDiscord<ElegantBeef> i believe it's `when defined(js)`
09:53:19Oddmongerah surely, thank you
09:53:26*Kaivo joined #nim
09:53:35FromDiscord<ElegantBeef> So prestige the absolute importing is going to be tricky
09:54:03FromDiscord<ElegantBeef> Hmm actually
09:54:27FromDiscord<ElegantBeef> Nope cannot figure out a way to get the module that called the macros path
09:54:34PrestigeYou'd just need the path to the current file from the project root
09:54:42PrestigeHmm
09:55:25FromDiscord<ElegantBeef> there is `getProjectPath` for project root, and `currentSourcePath` for the file that's compiling but it says "which returns the path of the source file containing that template call." and doesnt seem to work with macros
09:55:34FromDiscord<ElegantBeef> oh nvm i see what i means
09:55:57*ThatGuyFromThere quit (Quit: leaving)
09:55:59ForumUpdaterBotNew question by Ridcully: nim - custom macro/pragma to get ast of complete module but get &amp;quot;cannot attach a custom pragma&amp;quot;, see https://stackoverflow.com/questions/65519270/nim-custom-macro-pragma-to-get-ast-of-complete-module-but-get-quotcannot-att
09:56:51ZevvNim @HN fp
09:56:59FromDiscord<Rika> link?
09:57:06Zevvhttps://news.ycombinator.com/ :
09:57:07Zevv:)
09:57:14FromDiscord<Rika> smh
09:57:25Zevvit's the 2020 post
09:57:37FromDiscord<ElegantBeef> Must be a slow day for hackernews that this post gets fp 😄
09:57:45Prestigehttps://news.ycombinator.com/item?id=25590962
09:57:52FromDiscord<Rika> first comment and it compares with rust sigh
09:58:04PrestigeLmao
09:58:08ZevvI think it's moderated to the fp, there's only a handful of points yet
09:58:42FromDiscord<Rika> mods prolly thought it would generate nice discussion and not which language is better argument
10:00:11ZevvRust clearly is better
10:00:11PrestigeSilly mods
10:00:16ZevvSilly Nim
10:03:12FromDiscord<ElegantBeef> Nim has three letters and you know what else has 3 letters bad, rust has 4 letters and you know what has 4 letters good 😄
10:03:46*narimiran quit (Ping timeout: 272 seconds)
10:04:21*narimiran joined #nim
10:05:14*Arrrrrrrr joined #nim
10:09:26FromDiscord<Rika> god also has 3 letters
10:09:29FromDiscord<Rika> shit has 4 letters
10:09:33FromDiscord<Rika> checkmate beef
10:10:12Zevvlet's not go there people
10:10:19FromDiscord<ElegantBeef> Fuck you, there is 4 and 3 letters for you
10:10:43FromDiscord<ElegantBeef> Go where?
10:10:45FromDiscord<ElegantBeef> I cannot travel
10:10:51FromDiscord<Meowz> Like that: https://play.nim-lang.org/#ix=2Ko9 ? I'm already happy if I could use Nim types as Python Types on pythons end and pass them again to nim functions
10:12:08FromDiscord<ElegantBeef> To do that you'd have to have some form of interop
10:12:15FromDiscord<ElegantBeef> Like i do for nimscripter
10:12:27FromDiscord<ElegantBeef> My response is always, write nim not pythong
10:12:29FromDiscord<ElegantBeef> (edit) "pythong" => "python"
10:13:12FromDiscord<Meowz> We're writing nim. Which pythoners can use ;D
10:13:31FromDiscord<ElegantBeef> Nim doesnt store types the same as python, so you'd need to emit glue both ways which means you'd need to make a format which annotates the type for the python -> nim way
10:13:37FromDiscord<Rika> beef i want to ask you a question about the randgen lib im making; when you initialize an rng, would you mind if the seed is put through another rng to make the seed for the chosen rng?
10:13:51FromDiscord<ElegantBeef> I'd dislike that as it's multiple dependancies
10:14:03FromDiscord<Rika> all rngs are in the same library
10:14:17FromDiscord<ElegantBeef> I mean i dont see why you would
10:14:23FromDiscord<Rika> and are compat. with most arches/backends i believe
10:14:38FromDiscord<Rika> i dont know if anyone would consider this undesirable
10:14:50FromDiscord<Rika> i just want to know someone else's opinion as i only have my own
10:15:03FromDiscord<ElegantBeef> Well it'd suck for proc gen
10:15:11FromDiscord<Rika> proc gen?
10:15:16FromDiscord<ElegantBeef> Procedural generation
10:15:26FromDiscord<Rika> why?
10:15:28FromDiscord<ElegantBeef> If you're making the rng system seeded differently with the same seed that's useless
10:15:37FromDiscord<ElegantBeef> If it's seeded the same, then why take the second step
10:15:40FromDiscord<Rika> what?
10:15:57FromDiscord<Rika> ah
10:15:58FromDiscord<Rika> okay
10:16:03FromDiscord<Rika> okay
10:16:06FromDiscord<Rika> i see
10:16:17FromDiscord<Rika> basically "if youre given a seed why make another one"?
10:16:21FromDiscord<Rika> okay
10:16:40FromDiscord<Rika> then ill only generate a new one when the given and required seed sizes are different
10:16:42FromDiscord<ElegantBeef> If i understand what you were asking you take seed pass it through an intialized rng, the next time that first seed is ran you have to have the second rng set the same or you arent seedding
10:16:43FromDiscord<Rika> thanks
10:16:50FromDiscord<Rika> no no
10:17:00FromDiscord<Rika> see this pseudocode
10:17:36FromDiscord<Rika> proc initrng(seed): rng =↵ let seed2 = initotherrng(seed)↵ rng.state1 = seed2.next()
10:17:42FromDiscord<Rika> something like that
10:17:50FromDiscord<Rika> just for initializing
10:18:27FromDiscord<ElegantBeef> That doesnt seem to do anything overly special
10:18:38FromDiscord<ElegantBeef> Pretty redundant honestly
10:18:50FromDiscord<Rika> yeah so ill only do it when the state size != given seed size
10:18:52FromDiscord<Rika> thanks
10:19:08FromDiscord<ElegantBeef> Glad you could decide whilst i was rambling 😄
10:19:26FromDiscord<Rika> ill make you my rubber duck in the future xd
10:20:00FromDiscord<ElegantBeef> Lol sounds like an occupation
10:20:13FromDiscord<ElegantBeef> Although i've rarely seen you coding 😉
10:20:22FromDiscord<Rika> oof
10:20:31FromDiscord<Rika> i moved a few months ago let me recover
10:20:38FromDiscord<ElegantBeef> Well prestige here it is for now, gotta solve `absImport` https://github.com/beef331/import-utils
10:29:46FromDiscord<ElegantBeef> Yea even using a template that calls `currentSourcePath` fails to get the actual path wanted
10:34:37FromDiscord<ElegantBeef> Ah got it, had to copy the code in the macro 😄
10:34:45FromDiscord<ElegantBeef> Rather the code in the template
10:42:42FromDiscord<Vindaar> @Meowz yeah, that's what I meant
10:57:11*habamax joined #nim
11:41:54*Arrrrrrrr quit (Quit: Arrrrrrrr)
11:49:44planetis[m]nim is in the frontpage at hn
11:53:27FromDiscord<haxscramper> nim vs rust again
11:54:21ForumUpdaterBotNew question by Alex Craft: Why same strings are not equal in Nim?, see https://stackoverflow.com/questions/65520523/why-same-strings-are-not-equal-in-nim
11:54:24FromDiscord<Rika> as expected
11:54:34FromDiscord<haxscramper> Is there anyone who is knowledgeable enough to make a rough outline for nim for rust programmers for wiki? I can write/research remaining parts from that point
11:54:53FromDiscord<haxscramper> But since I don't program a lot in rust it would be difficult to come up with main points
11:55:03FromDiscord<haxscramper> Except for MM of course and sAfEtY
12:04:52FromDiscord<cybertim> sent a long message, see https://paste.rs/azr
12:08:13FromDiscord<haxscramper> We already have very good nim vs python/typescript article on wiki. Comparing wrt. to language design quality is absolutely pointless,
12:08:47FromDiscord<haxscramper> (edit) "We already have very good nim vs python/typescript article on wiki. Comparing ... wrt.tolanguage" added "anything to go" | "to language" => "tolanguage"
12:10:23*waleee-cl joined #nim
12:10:54FromDiscord<cybertim> comparing all those languages is pointless anyway 🙂
12:11:57FromDiscord<flywind> it is helpful for marketing
12:12:09FromDiscord<haxscramper> These articles are mostly needed as macros for answering common misconcepsions for people coming from different languages and showing how they need to adapt their code
12:12:16FromDiscord<haxscramper> adapt how they should write code
12:13:09FromDiscord<cybertim> end of the day people use what they use, marketing comes mainly from overhyped blogs of big new startups that used some language and tackled a gazillion issues etc.
12:13:25FromDiscord<haxscramper> E.g. showing feature substitues or minor details that are not important enough to discuss them at length in manual let's say, but can be a major blocker for someone coming from different languages
12:13:49FromDiscord<cybertim> but most projects can even be created in qbasic or maybe even a bash script 😛 if you try hard enough
12:13:58FromDiscord<haxscramper> Well, `X vs Y` is an absolute best of what you can get in terms of useless overhyped artilces
12:15:16FromDiscord<haxscramper> It's just that nim doesn't exactly have this "scream everywhere about my lang" community (especiall compared to go/rust/vlang several others)
12:18:16FromDiscord<Rika> It's nice, those kinds of people can get annoying
12:18:49FromDiscord<haxscramper> Though there is no "killer feature" that separates from other languages. Being "generally better in most ways" (in my opinion) is not something that you can easile market
12:20:58FromDiscord<flywind> though I hope someone can act as that annoying person for Nim 😜
12:21:08FromDiscord<flywind> https://github.com/timotheecour/Nim/discussions/490#discussioncomment-246873
12:22:02*Torro joined #nim
12:24:35*lritter joined #nim
12:38:57*Zevv is late to the party it seems. The compiler can be built with ARC and I didn't even know that.
12:39:15Zevvah, not quite: SIGSEGV
12:39:20*letto_ joined #nim
12:39:34*letto quit (Ping timeout: 272 seconds)
12:42:44FromDiscord<Rika> boutta port all pcg generators to nim, this is daunting as fuck
12:42:52FromDiscord<Rika> list: https://www.pcg-random.org/using-pcg-c.html#low-level-api
12:43:32FromDiscord<Rika> no i do not know what lcg is
12:49:15FromDiscord<dom96> yay, front page of HN
12:49:35FromDiscord<Rika> yeah but it got them rust bois
12:50:31FromDiscord<dom96> Gotta love them rust bois
12:51:17FromDiscord<Rika> oh wow the dude talking about whitespace got downvoted to oblivion it sees
12:51:19FromDiscord<Rika> seems
12:52:15*tane quit (Quit: Leaving)
12:55:09FromDiscord<bark> isn't arc and metaprogramming killer features?
12:56:44FromDiscord<bark> and having a js backend as well and react bindings
13:01:12FromDiscord<haxscramper> Metaprogramming is a murky when you try to actually use it as "instantly solves all your problems, zero abstraction, no overhead PR marketing BS". For simple things like `fields`, `fieldPairs`, some enum features, `static`, and some pragmas, this really feels like a part of the language. Some well-written macros from standard library also fall into this category.
13:01:42FromDiscord<haxscramper> When you come intro more heavy-weight macros you get really powerful toolset
13:02:20FromDiscord<haxscramper> But it is hard to pin down like, this one-sentence motto for metaprogramming
13:02:44FromDiscord<haxscramper> Like "fearless concurrency" in rust
13:02:57FromDiscord<haxscramper> Regardless of how close to reality this is
13:03:25FromDiscord<haxscramper> It is "killer" feature alright
13:03:26FromDiscord<Rika> fearless concurrency after you get over your fears of lifetime annotations
13:04:10FromDiscord<haxscramper> Well yes, first of all there is like ten pages worth of footnotes that you need to add if you want to be fair
13:04:32FromDiscord<haxscramper> And metaprogramming is a "killer" feature alright, but it is just not really defined.
13:05:09FromDiscord<Rika> well defined
13:05:11FromDiscord<haxscramper> I can only get wow-effect if I show some code that does this "absolutely crazy insane thing in five lines"
13:05:12FromDiscord<Rika> not really well defined
13:06:00FromDiscord<haxscramper> yes
13:08:47*kungtotte quit (Read error: Connection reset by peer)
13:09:50*kungtotte joined #nim
13:18:20FromDiscord<Sorrow> I'm confused with how Nim deals with bytes. Still trying to search bytes in a file.
13:22:07*Gustavo6046 joined #nim
13:22:58FromDiscord<Rika> whats confusing maybe i can help
13:23:08FromDiscord<Sorrow> Everything, haha.
13:24:01FromDiscord<Sorrow> I basically wanna be able to read a file in chunks and search those chunks for bytes patterns.
13:24:46FromDiscord<Sorrow> In Py, you can just do .find(b'\x01\x02').
13:27:40FromDiscord<Rika> nim string is more closely associated to python's byte string thingy
13:34:23FromDiscord<Sorrow> There's this, but it only takes a single int. https://nim-lang.github.io/Nim/algorithm.html#binarySearch%2CopenArray%5BT%5D%2CT
13:34:41FromDiscord<Rika> look into strutils
13:34:57FromDiscord<Rika> https://nim-lang.github.io/Nim/strutils.html
13:37:37FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=2H9W
13:38:37FromDiscord<lqdev> sent a code paste, see https://paste.rs/Q3V
13:38:39FromDiscord<lantos> also always nice to see nim in top hacker news
13:41:47FromDiscord<lantos> sent a code paste, see https://paste.rs/gKl
13:42:37FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=2KoX" => "https://play.nim-lang.org/#ix=2KoW"
13:42:52FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=2KoW" => "https://paste.rs/8l8"
13:48:53*Vladar joined #nim
13:58:30Zevvhow is introspection in rust?
14:15:00FromDiscord<Sorrow> sent a code paste, see https://play.nim-lang.org/#ix=2Kp8
14:16:37FromDiscord<Rika> why an array instead of a string?
14:16:44*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
14:20:41*PMunch joined #nim
14:26:17FromDiscord<Sorrow> Got a code example?
14:27:57FromDiscord<haxscramper> `let file = readFile(r"G:\nim\file.bin"); let pos = file.find('\0x44' #[byte to find]#)` should work
14:28:18FromDiscord<Sorrow> It does, but what if It's more than one byte?
14:28:59FromDiscord<haxscramper> Nim strings are just bytes, so you should be able to use any string operations, such as `find("\0xFF\0xAA"
14:29:03FromDiscord<Rika> {byte, byte, byte}
14:29:12FromDiscord<haxscramper> (edit) "`find("\0xFF\0xAA"" => "`find("\0xFF\0xAA")`"
14:29:22*narimiran quit (Ping timeout: 246 seconds)
14:29:28FromDiscord<Rika> if you're looking for any of many bytes
14:29:41FromDiscord<Rika> if youre looking for a specific combination of bytes make them into a string
14:29:53FromDiscord<Sorrow> Yeah, thank you.
14:30:24FromDiscord<Sorrow> How should I change my buffer?
14:31:24*Torro quit (Read error: Connection reset by peer)
14:31:44FromDiscord<Rika> i'd just recommend using a filestream (defined in `streams`) if you need streaming instead of reading the whole file at one
14:31:45FromDiscord<Rika> once
14:33:10*abm joined #nim
14:47:19*hmmm joined #nim
14:47:27hmmmyo :3
14:52:23hmmm/
14:52:33hmmmops
14:52:39hmmmslipped
14:53:05FromDiscord<Rika> hello /hm+/
14:53:11hmmmrika!
14:53:16hmmmmy bro happy new year
14:53:30FromDiscord<Rika> hny, theres still 6 minutes for me
14:54:42hmmmwaaat
14:54:48hmmmare you from australia or something
14:55:14FromDiscord<Rika> japan
14:55:53hmmmdude I went to japan last year for 2 weeks and it was super fun
14:56:11hmmmjapan is megafun
14:57:27FromDiscord<Rika> im in kinda rural japan
14:58:49*gangstacat quit (Quit: Ĝis!)
14:59:08FromDiscord<Rika> so its kinda boring
14:59:44hmmmstill a) the rural landscape is wonderful b) people are very kind and nice c) it's fkin japan so it's awesome
15:00:50FromDiscord<Rika> happy new year
15:00:56hmmmu2!
15:02:05Oddmongerah yes, midnight in Tokyo
15:02:26Oddmongerhappy new year (with 8 hours of advance for me)
15:05:58FromDiscord<Meowz> Is there a way to get all const variables from a module? I actually want all colors from colors.nim. To bad that `colorNames` isnt exported.
15:06:30FromDiscord<dom96> not anymore D:
15:06:58FromDiscord<dom96> So I managed to get a cool effect for my game to work in Firefox
15:07:26FromDiscord<dom96> in Chrome the background is "uninitialised", so Chrome just draws what's in the other tabs. Seems like I found a webkit bug D:
15:12:16FromDiscord<Rika> why do we have to keep on arguing about tabs spaces whitespace braces 2 4 vim emacs... man this is just so tiring
15:13:44*gangstacat joined #nim
15:14:12FromDiscord<KingDarBoja> Lua 3 spaces :D
15:14:52FromDiscord<Rika> man
15:15:54oz7 non-breaking spaces is the best.
15:16:55FromDiscord<dom96> I personally like 3.14 spaces
15:19:23*Torro joined #nim
15:25:24FromDiscord<Sorrow> You're Japanese? Neat.
15:31:16FromDiscord<Rika> i am not, i am living in japan
15:31:47FromDiscord<Jarred Kenny> Is there a way to have a table whos values are arrays of different types without inheritance. Like `type Map = Table[string, MyTypeArray[SomeType]` where each table entry has a different `SomeType`
15:31:49FromDiscord<Sorrow> Ah. Been learning the lang for 4 years, but don't have the balls to visit. Sorry for off-topic talk.
15:32:09FromDiscord<Jarred Kenny> I know with inheritence, I would have all of SomeTypes extend a base type, but I am curious if there is a better way
15:32:29FromDiscord<Rika> object variants?
15:36:40FromDiscord<Jarred Kenny> On the MyTypeArray?
15:42:31FromDiscord<Jarred Kenny> Oh I see what you mean
15:46:29*superbia joined #nim
15:46:37FromDiscord<William_CTO> I came across this: `openArray[(string, string)]` which can be used like `{"foo": "bar"}` but this looks more like a table than an array. What exactly is this? I thought arrays were linear "lists."
15:47:55FromDiscord<William_CTO> All the examples of arrays in nim by example, the nim tutorial always show arrays as `[1,2,3]`
15:48:15FromDiscord<haxscramper> `{}` is just syntax sugar for `[("foo", "bar")]`
15:48:54FromDiscord<haxscramper> You just get an array of tuples, it is still linear, just contains `(string, string)`, instead of let's say `int` as in `[1,2,3]`
15:49:31FromDiscord<haxscramper> !eval echo typeof {"foo" : "bar"}
15:49:33NimBotarray[0..0, (string, string)]
15:49:46FromDiscord<haxscramper> !eval echo typeof @{"foo" : "bar"}
15:49:47FromDiscord<William_CTO> oh, ok
15:49:48NimBotseq[(string, string)]
15:49:58FromDiscord<William_CTO> Wow, thanks a ton
15:50:10FromDiscord<William_CTO> I wish this were added to the docs
15:51:10FromDiscord<haxscramper> Which part of documentation in particular are you reading now?
15:51:20*superbia left #nim (#nim)
15:51:57FromDiscord<haxscramper> Or just somewhere in nim by example?
15:52:04FromDiscord<Jarred Kenny> Are seqs of a fixed length allocated linearly in memory?
15:52:17FromDiscord<William_CTO> I glanced at the nim manual section on arrays, but I found examples in the tutorial https://nim-lang.org/docs/tut1.html#advanced-types-arrays
15:52:49FromDiscord<haxscramper> you mean arrays? yes
15:53:15FromDiscord<Jarred Kenny> I mean whatever is created with newSeq[Type](length)
15:54:27FromDiscord<demotomohiro> Seq type always has continuous memory
15:54:29FromDiscord<haxscramper> https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor actually it is just placed on manual
15:55:03FromDiscord<demotomohiro> excepts len == 0
15:55:10FromDiscord<William_CTO> I'm very new to Nim and am re-learning how to read documentation lol
15:55:12FromDiscord<haxscramper> I didn't know you can also do `"key2", "key3": "value2"`
15:55:19FromDiscord<haxscramper> Nice
15:55:46FromDiscord<haxscramper> Another edge case for DSL though, will have to account for that one
15:57:19FromDiscord<Jarred Kenny> Makes sense when the length is fixed, but how does this work when seqs can grow?
15:58:07FromDiscord<haxscramper> all elements are reallocated in new, larger block of memory
15:58:22FromDiscord<juan_carlos> Theres no fixed len seq.
15:58:31FromDiscord<William_CTO> If I wanted to create an empty seq for this I'd use `var y: seq[(string,string)] = @[]`
15:59:28FromDiscord<haxscramper> Yes though `@[]` is not strictly necessary, Or you can use `newSeq[(string, string)]()` too
15:59:48FromDiscord<Jarred Kenny> Oh, I misunderstood seqs then.
16:00:30*aenesidemus joined #nim
16:01:10FromDiscord<William_CTO> Which method is more preferred? `y: seq...` or `y = newSeq...`
16:01:18FromDiscord<Rika> new seq is shorter
16:01:18FromDiscord<William_CTO> (edit) "preferred?" => "preferred or correct?"
16:01:20FromDiscord<Rika> either is ok
16:01:45FromDiscord<haxscramper> No particular preferences in style guide too, IIRC they are functionally equivalent
16:02:22FromDiscord<Jarred Kenny> sent a code paste, see https://play.nim-lang.org/#ix=2KpR
16:02:41FromDiscord<haxscramper> In earler versions `seq` could be `nil`, but now they have value semantics so implicit initialization is okay
16:03:15FromDiscord<Rika> for inheritance to work, the objects must be ref
16:03:22FromDiscord<haxscramper> No
16:03:27FromDiscord<haxscramper> Not necessarily
16:03:32FromDiscord<Rika> so sizeof(pointer) size will be allocated
16:03:34FromDiscord<Rika> ?
16:03:35FromDiscord<Rika> really?
16:03:42FromDiscord<Rika> i only ever saw them work with ref
16:03:47FromDiscord<Rika> work properly
16:03:51disruptek^
16:04:24FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2KpS
16:04:45disruptekmethods don't work w/o refs.
16:05:22FromDiscord<haxscramper> True, but inheritance /could/ be useful without methods too
16:05:28FromDiscord<haxscramper> Not very often though
16:05:43FromDiscord<Rika> not very useful either
16:06:49FromDiscord<haxscramper> In this particular case you get `sizeof(MyOtherObj2) 10`. IF you use refs (most likely that's what you wanted) it will be `sizeof(pointer) 10`
16:08:40FromDiscord<Jarred Kenny> The downside of using refs being that the objects being referenced won't be contiguous in memory right?
16:08:51FromDiscord<Rika> yes
16:09:00FromDiscord<Rika> but you will be able to properly use methods
16:09:35FromDiscord<Jarred Kenny> I am trying to build a system where all objects of a given type in my "manager" are stored together in memory, its for an entity component sytem
16:09:37FromGitter<HJarausch_gitlab> I need a helpful hand. ⏎ During compilation parsing and macro processing must be interwoven somehow. ⏎ Can anybody please give me some pointers where this process is documented? ⏎ Many thanks, Helmut [https://gitter.im/nim-lang/Nim?at=5fedf7c0ce40bd3cdb12cb5a]
16:10:16FromGitter<haxscramper> You can use https://nim-lang.org/docs/macros.html#parseStmt%2Cstring
16:10:39FromDiscord<Jarred Kenny> I am trying to implement this: https://austinmorlan.com/posts/entity_component_system/
16:10:47FromDiscord<Jarred Kenny> ctrl-f "component manager"
16:10:55FromGitter<haxscramper> But this is a hack, and works only on strings that you generate elsewhere. Mixing parsing of main file and macro evaluation is not possible
16:12:37FromDiscord<haxscramper> You can just go with the same approach as C++ - OOP inheritance (if number of subtypes is not fixed), or use object variants if you only dealing with finite number of subtypes
16:13:48FromDiscord<haxscramper> Inheritance basically means you need to use `ref` in order for it to be useful. Object variants allow you to place all subtypes in single array
16:13:55FromDiscord<Sorrow> Got my issue sorted. Ended up using a fstream with readStr().
16:14:21FromDiscord<haxscramper> And variants play better with generics
16:14:29FromDiscord<Jarred Kenny> I've steered away from subtypes because ideally I want to be able to register arbitrary objects as components at runtime
16:14:43FromGitter<HJarausch_gitlab> @haxscramper ⏎ I am especially interested in ⏎ ⏎ 1) when is a macro processed ⏎ 2) what if a macro calls another macro ... [https://gitter.im/nim-lang/Nim?at=5fedf8f363fe0344962cf72b]
16:14:50FromDiscord<Jarred Kenny> /s/subtypes/object varients/
16:15:15FromGitter<jrfondren> it's annoying to always get "why not Rust" questions, but it's still worth answering. here's a go: https://nim-lang.moe/on-nim.html#vsrust
16:15:22FromDiscord<haxscramper> Then go with `ref object of MyObj` and `array[10, MyObj]`
16:16:09FromDiscord<Jarred Kenny> but then all of the objects won't be continuous in memory
16:17:15FromDiscord<haxscramper> I haven't read whole article top to bottom, but you can also use interface-like approach
16:17:34FromDiscord<haxscramper> If you only need to change behavior of the objects
16:17:41*Torro quit (Quit: bye)
16:17:59FromDiscord<Jarred Kenny> I guess I don't know enough about c++ interfaces to translate that to nim yet
16:20:00FromDiscord<William_CTO> `proc foo( query: Option[openArray[(string, string)]] = none(openArray[(string, string)]) )` doesn't work because `invalid type: 'openArray[(string, string)]' in this context`↵How can you make an optional openArray parameter with a default none?
16:20:57FromGitter<haxscramper> @HJarausch_gitlab `untyped` macro is processed before semcheck, everything else is processed and subject to overload resolution rules https://gist.github.com/haxscramper/8821819221b1d73866e4aed306147f0c
16:21:10FromDiscord<Jarred Kenny> What would the type layout for this look like?
16:21:32FromGitter<haxscramper> IIRC all symbols in AST are evaluated repeatedly, until there is nothing left to evaluate
16:21:58FromGitter<haxscramper> IIUC there is no functional difference between second and third point
16:23:26FromDiscord<haxscramper> If you have `implCb: proc() {.closure.} # some implementation proc` it's is comprised of pointer to C function and environment stored elsewhere
16:23:53FromDiscord<William_CTO> I decided to use an overload since I only have one optional arg/parameter
16:24:32FromGitter<HJarausch_gitlab> @haxscramper Many thanks, I'll have to digest this first.
16:24:36FromDiscord<haxscramper> Is is that important to have everything aligned in memory?
16:25:11FromDiscord<Jarred Kenny> in reality no, in theory yes, just trying to wrap my head around nim and ecs
16:25:33FromDiscord<haxscramper> `openarray` is a not a "type", not without view types, so yes, you can't exactly have `Option[openarray[_]]` now
16:26:03mipriWilliam_CTO, I don't think it works to make an Option of an openArray at all. You can get a proc with https://play.nim-lang.org/#ix=2KpY , but you can't use it.
16:26:16FromDiscord<haxscramper> I would recommend just going with inheritance because it closer to what C++ uses and then changing to something else if this is needed
16:26:29FromDiscord<William_CTO> Thanks, so overloading is the correct way to go
16:26:59FromDiscord<haxscramper> Although you can just accept `seq[T]`
16:27:13FromDiscord<exelotl> ahh thank goodness, yesterdays compiler crash was just due to --experimental:views which I'm not actually using yet
16:27:47FromDiscord<haxscramper> E.g. `openarray` is not exactly necessary if you need `{}` syntax
16:31:48FromDiscord<demotomohiro> https://play.nim-lang.org/#ix=2Kq1↵This code might help to understand how seq grows
16:32:42ForumUpdaterBotNew post on r/nim by RickyFX: [ADVICE] Is Nim worthy of time to master?, see https://www.reddit.com/r/nim/comments/knt1o7/advice_is_nim_worthy_of_time_to_master/
16:34:04FromDiscord<Jarred Kenny> sent a code paste, see https://play.nim-lang.org/#ix=2Kq3
16:34:33*PMunch quit (Quit: leaving)
16:38:43FromDiscord<demotomohiro> No↵Try create a such array and see sizeof(a)
16:39:06FromDiscord<haxscramper> You forgot `ref object of ...`
16:44:44FromDiscord<Rika> @jrfondren nim's runnableExamples doesnt count as inline testing?
16:45:03FromDiscord<Rika> in the blog post you made, it says there isnt any inline testing for nim
16:46:36FromDiscord<Sorrow> What would this be in Nim? prev = buf[-15 + 1:]
16:46:52ZevvI don't know what that means
16:46:54FromDiscord<Rika> prev = buf[-15+1..^1]
16:47:10ZevvRika does, though
16:47:12FromDiscord<Rika> oh, negative
16:47:13FromDiscord<Rika> uh
16:47:15FromDiscord<Rika> well
16:47:19FromDiscord<Rika> you have an issue there
16:47:25FromDiscord<Sorrow> Fuckballs.
16:47:27Zevvit's not wrong, Nim arrays can index negative indices
16:47:36FromDiscord<Rika> i guess its more of buf[0..^14] i think
16:47:53FromDiscord<Rika> nim slice indexing can handle negatives?
16:48:16ZevvNo, but arrays can have negative indices :)
16:48:20FromDiscord<Rika> Zevv: wdym does? im pointing out that runnableExamples should count as inline testing but he doesnt mention it
16:48:33Zevvhttps://play.nim-lang.org/#ix=2Kq7
16:48:33FromDiscord<Rika> well python doesnt have negative indices
16:48:41FromDiscord<Rika> and thats what he's referencing, python code
16:48:47ZevvAh, well, there you have it.
16:48:50ZevvYou knew that, I didn't
16:49:11miprisee, asking a question based on Python was a waste of time. You should've asked how to get the last N members of an array
16:49:58ZevvAh right. buf[^15..^1] is what you want
16:50:24Zevvmight have an off-by-one error, because I'm full of those
16:51:52*jjido joined #nim
16:54:33planetis[m]look at that douche https://news.ycombinator.com/reply?id=25594323&goto=item%3Fid%3D25590962%2325594323
16:54:52*hmmm quit (Read error: Connection reset by peer)
16:55:05planetis[m]people can't have an opinion these days
16:55:22FromDiscord<haxscramper> I remember that one who went full-on about hAtESpeAch AboUt FP In NiM
16:55:54ZevvHehe these /are/ kind of douchebags comments tho :)
16:56:23FromDiscord<Rika> surprise a lot of people are like that
16:56:28ZevvMeh
16:57:10*abm quit (Quit: Leaving)
16:58:24mipriFacebook uses PHP. doteka's argument is invalid.
16:59:46planetis[m]wonder if he screenshots me and post to a certain platform
17:03:41disrupteki screenshot you, but just for my own special archive.
17:04:35*hmmm joined #nim
17:04:38disruptekholy shit.
17:04:51hmmm~disruptesque
17:04:52disbotdisruptesque: 11the art of telling it as it is
17:04:57disruptekzevv you are such a sweetheart.
17:05:02disruptekthank you, man.
17:05:21Zevvleast I can do, right
17:05:35disruptekit's kinda huge, honestly.
17:06:02ZevvI figured I'm not spending anything on the studio anymore lately, so might as well spend it somewhere else
17:06:18disruptekwhy aren't you spending on the studio?
17:06:26Zevvall closed
17:06:37disruptekreally?
17:06:39Zevvsure
17:06:42disrupteki thought you guys were open still.
17:06:58Zevvnah that's long past. Kids are stuck at home again, all shops closed xpt for supermarkets
17:07:14ZevvI'm just sitting in my room practicing my bowing
17:07:15disruptekthis is your week off, right?
17:07:26Zevv'off'
17:07:34disruptekdid you fix tzevv?
17:07:42Zevvnot yet, you told me to wait
17:07:51disrupteki did?
17:08:02Zevvanway, I got it to compile a bit, and most stuff fails with wrong number of invocations
17:08:14disrupteki think loops are broken.
17:08:20Zevvseems so
17:08:26disruptekwhich is kinda, y'know, bummerific.
17:08:40Zevvthat's what you get from making 76 commits with tests broken
17:08:54Zevvdoes it make sense to go back to 0.0.13 and cherrypick what's relevant?
17:08:56Zevvor is it all?
17:09:05disruptekno way, we're making progress.
17:09:55disruptekhttps://github.com/disruptek/cps/issues/47
17:09:56disbotmutable params and the developers who love them
17:13:18Zevvoi oi
17:13:48Zevvcan't we just ignore that for now and not allow var args on cps procs?
17:14:28Zevvhow can this even work. The original args might be long gone when things get resumed
17:14:34disruptekwe need a pass that does the rewrite foo -> env(continuation).foo and the question is, where and when.
17:15:26disruptekbut they might not be long gone.
17:16:24Zevvcan we just do one thing at a time
17:16:34Zevvor do you think that if we skip this, it'll be impossible to put it in later?
17:16:35disrupteksure.
17:16:41Zevvbecause my hunch is to just copy or move stuff into the env
17:16:44Zevvand be done with it
17:17:03disruptekwell, it's an issue. we have some old ones.
17:17:10disrupteklook at the tock one.
17:17:19Zevvyeah
17:17:54disruptekmy branch is broken at the moment but i had a lot of stuff working last night.
17:18:23Zevvdo you and mratsim talk?
17:18:38disruptekhe hasn't been around.
17:18:47Zevvhe has worse internet then you until end of januari
17:18:50Zevvthey cut his fiber
17:19:00Zevvthat'll be a nice stretch of deep focus for him I guess
17:19:09disrupteki went a couple years on 4g; it's pretty rough.
17:19:28ZevvI went a couple of years on ISDN. That's 64k symmetric
17:19:35disrupteki need to do ssl bump on my tunnel.
17:19:41FromDiscord<William_CTO> Is there a way to pretty print an object to the console for debugging?
17:19:50disrupteki had a 56k frc back in the day.
17:20:05Zevvdisruptek: mosh is a bliss
17:20:09disruptekisdn was an improvement, but the latency was worse.
17:20:28ZevvWilliam_CTO: .repr
17:20:35Zevvecho this.repr, that.repr
17:20:43Zevvit's not "pretty-pretty"
17:20:54Zevvlike, indenting and all
17:21:02federico34g with good antennas can be very usable
17:21:21disruptekit's hard when you're constantly moving around.
17:21:22FromDiscord<haxscramper> @William_CTO !repo hpprint
17:21:31FromDiscord<William_CTO> !repo hpprint
17:21:31disbothttps://github.com/haxscramper/hpprint -- 9hpprint: 11Generic configurable pretty-printer with partial auto-layout. Correctly handles unicode text and ANSI escape codes in text. 15 2⭐ 0🍴
17:21:42Zevvfederico3: problem is that most devices tend to fall back to an idle mode with huge latency, and only pop back up to proper 4G after a certain bandwidth limit is hit
17:21:47Zevvso for inteactive SSH it can be a PITA
17:21:58FromDiscord<haxscramper> Absolute abomination, but it should work on anything except for cyclic data structures
17:22:02FromDiscord<William_CTO> thanks hax
17:22:02disrupteki had three devices for three different telcos. pita.
17:22:08FromDiscord<haxscramper> I haven't added support for them yet
17:22:34disruptekmy interactive ssh was better on 4g than it is now.
17:22:59ZevvI've been working at a company building industrial WWAN modems pretty much from scratch. I know more about these things then I'd like to. In 2020 the de facto interface protocol for all these 2G..5G modems is
17:23:03Zevv(guess what)
17:23:09ZevvThe Hayes protocol
17:23:13disrupteklol
17:23:36federico3anybody with dual uplink? I have a load-balancing tool for that
17:24:30disrupteki added a t1 to my frc but i never bothered to multihome it.
17:25:01Zevvping @treeform
17:25:15FromGitter<eagledot> @vindaar you there?
17:26:00FromDiscord<Vindaar> @eagledot: yup, but only on my phone
17:26:04disruptekjrfondren: you use nimcr extensively?
17:26:23FromGitter<eagledot> @vindaar on arraymancer channel too?
17:27:25disruptekanyone here use nim as a compiled scripting language? i dunno if that even makes sense, but i have a feeling it might, to someone.
17:27:49FromGitter<jrfondren> dunno about extensively. I use it for some scripts and for some CGI.
17:28:11FromDiscord<treeform> @Zevv why did you summon me?
17:28:12disruptekyou're on linux, right?
17:28:20FromGitter<jrfondren> nimcr has the limitation of requiring files ending in .nim but otherwise it's fine. On Linux, yes.
17:28:32disruptekhave you seen this?
17:28:35disruptek!repo disruptek/dist
17:28:36disbothttps://github.com/disruptek/dist -- 9dist: 11a nim distribution 👑 15 5⭐ 0🍴
17:29:01disruptekyou might be able to make some meaningful contributions.
17:29:07disruptekit's a wip.
17:30:06FromDiscord<treeform> @disruptek it looks like I already did?
17:30:27disruptekyeah, i'm showing it to jrfondren. 😁
17:30:49disrupteki don't mean package contributions, though; i mean designing ways to integrate it.
17:30:58disruptekpackages are easy to add.
17:31:38FromDiscord<treeform> why include both zip and zippy?
17:31:47FromDiscord<treeform> and untar
17:31:58disruptekbecause other packages require them.
17:32:03FromDiscord<treeform> zippy can do zip/untar faster then zip/untar can do them
17:32:05FromDiscord<treeform> ok
17:32:13FromGitter<jrfondren> eh, the only friction I have with Nim on Linux is that I have all these super old distros, so I need some shell work to make sure Nim sees a modern enough compiler. I'd prefer to bundle the cc into nim somehow. For libraries, nimble works. Or in the only case that it didn't (bad openssl lib), I would've had the same problem later.
17:33:09disrupteki wrote a shim for zig that is kinda handy for that, but tcc isn't supported well-enough in my experience.
17:33:23disruptekhave you seen this?
17:33:25disruptek~gitnim
17:33:26disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek
17:34:00disrupteki mixed it with zig to get a static toolchain.
17:34:16FromDiscord<haxscramper> disruptek: for gitnim - why did you make a copy of source instead of making `git nim 1.4.2` just clone thing and build them when needed
17:34:38FromDiscord<haxscramper> I tried it recently because I wanted to use PR something to compiler
17:34:51FromDiscord<haxscramper> And I'm not sure why but I was expecting something like
17:34:56FromDiscord<treeform> @disruptek My packages mostly interoperate with each other... not sure how you want to interoperate everything though?
17:34:59disruptekbecause i want the artifacts to be the same ones published by nim.
17:35:07disruptektreeform: why not?
17:35:28disrupteki'm trying to achieve araq's "batteries included" ideal in a way that makes sense to me.
17:35:30FromDiscord<treeform> I don't know why, I mean how, what are the mechanics?
17:35:54disruptekthe mechanics are that all the packages live in the same namespace and are "tuned" to the particular compiler version.
17:35:58FromDiscord<treeform> What does interoperate mean to you?
17:36:06Zevvtreeform: yeah, I was fiddling with adding Oklab (see PR), but wondered what you want in there regarding tests et al
17:36:08FromDiscord<haxscramper> But if you check out the same commit as one used for building nim artifacts you would get the same results?
17:36:32ZevvAlso I'd like to put the polar form in, but not sure about the nomenclature
17:36:33disruptekhaxscramper: the artifacts are musl-based, and really, you don't get the same results.
17:37:10disruptekhaxscramper: that said, you should fork gitnim and add that feature.
17:37:15disruptekit's only like 100 lines of code.
17:37:26disruptekit's /designed/ to be forked.
17:37:38disrupteki cannot stress that enough.
17:37:45FromDiscord<treeform> @Zevv okLab looks pretty simple, usually polar just add Polar to the name.
17:37:58FromDiscord<haxscramper> Just in my head it was something closer to github CLI with nim-specific commands
17:38:13FromDiscord<treeform> @Zevv ColorLUV -> ColorPolarLUV
17:38:15disruptekwe will build distribution logic into gitnim and then everyone will be able to manage their own distributions trivially.
17:38:17Zevvk
17:38:45Zevvyou should add a test that actually makes something I can /look/ at though :)
17:38:48Zevv(diner time)
17:38:57FromDiscord<treeform> @Zevv there just needs to be a color method on every color space to bring it back to RGBA.
17:40:04FromDiscord<treeform> @Zevv I would just ask for some thing like this: https://github.com/treeform/chroma/blob/4ae602c816e5b76d8364302f37095d3b0fda023f/tests/test_colors.nim#L179-L205
17:40:21FromDiscord<treeform> To make sure colors can convert to and from.
17:42:10FromDiscord<treeform> @Zevv for polar form some times extra conversion function to take it to polar form and back are required. See: https://github.com/treeform/chroma/blob/4ae602c816e5b76d8364302f37095d3b0fda023f/src/chroma/transformations.nim#L476-L498
17:47:07FromDiscord<haxscramper> disruptek: I thought about adding support for distribution-wide documentation generation
17:47:30*a_chou joined #nim
17:47:36FromDiscord<haxscramper> Shouldn't be that hard to implement, but will be really useful, at least in theory
17:47:47disruptekyeah, that's kinda what ndoc is about.
17:47:50FromDiscord<treeform> disruptek: I think you should add the `ws` web socket package.
17:48:04FromDiscord<haxscramper> !repo ndoc
17:48:07disbothttps://github.com/nodeca/ndoc -- 9ndoc: 11js port of pdoc, with extentions 15 93⭐ 8🍴 7& 29 more...
17:48:37disruptektreeform: done!
17:48:49disruptek!repo disruptek/ndoc
17:48:50disbothttps://github.com/disruptek/ndoc -- 9ndoc: 11like pydoc but for nim 15 0⭐ 0🍴
17:48:51FromDiscord<treeform> disruptek, you should get on discord and we should voice chat some times...
17:49:11disrupteki don't like to support closed platforms. 🙁
17:49:59FromDiscord<treeform> I like to support closed platforms when they are good. 😦
17:50:13FromDiscord<haxscramper> good, ndoc/pydoc seems quite close to what I have in mind
17:50:26disruptek...if you aren't the customer, you are the product...
17:51:09FromDiscord<Sorrow> I had to take 1 off the first index to get the same results as my Py script. Was one too many bytes.
17:51:33disruptekhaxscramper: my thinking is that i'll wait until ic is ready and then precompile all files; the result should be fast enough to index with frosty or just operate on directly.
17:52:59FromDiscord<treeform> disruptek: if you added ws, one would probably need an async db as well, I would add `pg` library. Most of my servers are just `ws`+`pg`.
17:53:47FromDiscord<haxscramper> I wanted to build on top of nimsuggest-like logic find all uses for particular symbols, precomplile a database and generate nice, searchable examples
17:53:54FromDiscord<haxscramper> in adddition
17:53:56disruptektreeform: done.
17:54:03disruptekwould be nice if you'd tag it, though.
17:54:14FromDiscord<treeform> ok i'll tag it
17:54:15FromDiscord<haxscramper> to improving overall documentation apprearance, UX and so on
17:54:16disruptekhaxscramper: yeah, let's do that thing.
17:54:42disruptekwe should render the docs for the distribution with hugo or something.
17:54:49disruptekthen we can include them as a submodule.
17:54:55FromDiscord<treeform> disruptek: looks like pg is tagged?
17:55:05FromDiscord<haxscramper> Though I decided to write parser for documentation again
17:55:15disruptekoh, you're right.
17:55:19FromDiscord<haxscramper> Because current one doesn't cut it in terms of supported features
17:55:23disrupteki'll point to one of these 0.1.0s.
17:55:51FromDiscord<treeform> pg is a pretty good lib, no fixes needed in 2 years 🙂
17:55:56FromDiscord<haxscramper> Like, I want `@arg{someArg}` and other structured markup parts too that I can exploit for information too
17:56:49FromDiscord<treeform> @haxscramper have you seen https://github.com/treeform/mddoc ?
17:57:11disrupteknice, yeah, i like how most of my nim doesn't need rework. almost all my commits are for ci and packaging changes.
17:57:12*JustASlacker joined #nim
17:57:15FromGitter<bung87> which lib close to js Inquirer or yeoman or plop ?
17:57:23disruptekwhich is annoying as shit, don't get me wrong.
17:57:31*a_chou quit (Quit: a_chou)
17:57:54FromDiscord<treeform> Yeah I have a tons of update version, so that I can tag it, so that other lib can use it crap commits....
17:58:00JustASlackerhappy new year
17:58:03FromDiscord<haxscramper> No, but it looks relatively similar to what I have in mind
17:58:06FromDiscord<treeform> Its so hard to live in a web of packages
17:58:12disruptekit sucks.
17:58:16disruptekwe can do better than this.
17:58:21FromDiscord<haxscramper> Though I decided to go one level deeper and get all of the information directly from sempass
17:58:35FromDiscord<haxscramper> Instead of `re`-parsing json files
17:58:38FromGitter<bung87> dont talk web..
17:58:39JustASlackerIm trying to get a process via startProcess and write / read into the streams
17:58:56JustASlackervar input = inputstream(p)
17:59:16FromDiscord<haxscramper> And also support literate programming, org-mode style in documentation
17:59:20FromDiscord<treeform> Parsing json was the easiest thing I could do.
17:59:44JustASlackerinput.write("foo") complains about tpye mismatch
18:00:04disruptekhaxscramper: i wrote a source code filter for literate mode but it was rejected.
18:00:04FromDiscord<haxscramper> Because next time I have to write `assert "hello" = procThatPrintsHello()` to show output of the code I will jump out of the window
18:00:44*narimiran joined #nim
18:01:18*narimiran quit (Remote host closed the connection)
18:01:21disruptekit's only like 200 lines and it probably still merges green.
18:01:33FromDiscord<haxscramper> Well, that is part of the reason
18:01:41FromDiscord<haxscramper> for writing docgen from scratch
18:01:54FromDiscord<haxscramper> we can do craziest shit
18:02:11disruptekmostly i want the docgen to magically infer compatability.
18:02:33FromGitter<jrfondren> JustASlacker: https://forum.nim-lang.org/t/7249#45843 example of that
18:02:47FromDiscord<haxscramper> Well, if not for that generic caching bug I would've finished tree diffing
18:03:01disruptekwhich bug?
18:03:28FromDiscord<haxscramper> #16128
18:03:32disbothttps://github.com/nim-lang/Nim/issues/16128 -- 3Changing statement order in generics can cause type mismatches ; snippet at 12https://play.nim-lang.org/#ix=2Kqv
18:03:37FromDiscord<Beckingham> Anyone know if there's a nim package for converting audio formats?
18:03:41FromDiscord<haxscramper> We discussed it
18:03:59FromDiscord<haxscramper> Before I minimized it correctly and realized this is a bug
18:04:18FromDiscord<treeform> disruptek: what are your thoughts on adding https://github.com/treeform/urlly
18:04:18disruptekoh, right.
18:04:20*Arrrrrrrr joined #nim
18:04:37FromDiscord<haxscramper> Not a showstopper, but at that time I decided to just "scre this, I have other things to do"
18:04:57disruptektreeform: add whatever you want. you have push, right? i will add this one for you.
18:05:22JustASlackerjrfondren: thin I just forgot to import *stream*
18:05:26JustASlackerthx
18:05:46FromDiscord<haxscramper> And this one is for fuzzy tree diffing - e.g. autodoc for implementation changes. API differencing is even simpler AFAIC
18:06:08disruptekhmm, that bug is pretty gnarly.
18:06:44disruptekwe have a workaround iirc.
18:08:13*tane joined #nim
18:10:11disruptektreeform: yeah, you have a pending invite to dist -- do you need me to resend it?
18:11:00FromDiscord<treeform> It says `This invitation has expired.`
18:12:04disruptekschrodinger's invite, i guess.
18:12:16FromDiscord<treeform> ok accepted
18:12:36FromDiscord<treeform> now i'll purge my competitors 🙂
18:12:44disrupteklol
18:13:12disrupteki haven't added much from important_packages, but that should keep most dependencies in the namespace.
18:14:27disrupteki'm working on a gitnim extension that manages the distribution, too. pretty simple.
18:15:03FromDiscord<treeform> I have a tool to manage my "private" idea of distribution
18:15:10FromDiscord<treeform> you should have one too
18:15:20disruptekthat's what this is.
18:15:28disruptekno reason to distinguish between private/public.
18:36:00FromDiscord<William_CTO> What are the most common licenses used by nim packages?
18:37:25FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2KqB
18:38:58FromDiscord<haxscramper> Wrong regex
18:39:18FromDiscord<haxscramper> But MIT is still leading, then Apache
18:39:30FromDiscord<haxscramper> Only 73 GPL
18:56:58*prods joined #nim
19:08:30FromDiscord<William_CTO> Thank you. I'm trying to run my test with `nimble test` and I keep getting the SSL error. I've tried creating a `test1.nim.cfg` file with `-d:ssl` and I still get the same error. I've also tried putting a similar file in my src directory with the same results
19:09:05FromDiscord<haxscramper> Use `tests/nim.cfg`
19:09:23FromDiscord<haxscramper> E.g. `test1.` prefix is unnecessary
19:09:32FromDiscord<William_CTO> 🤦‍♂️
19:09:46disruptekit's a good idea to name it test1.nim.cfg.
19:10:04disruptekconvention is for package managers to feel free to overwrite nim.cfg wherever they may find it.
19:11:57*prods quit (Quit: Leaving)
19:12:13FromDiscord<William_CTO> That didn't work either. `nimble init` creates `config.nims` so I added `switch("d","ssl")` which works
19:12:59FromDiscord<William_CTO> Although vscode doesn't like the switch statement https://media.discordapp.net/attachments/371759389889003532/794281964617465876/unknown.png
19:13:14disrupteknimscript is for chumps.
19:13:25FromDiscord<William_CTO> why xD
19:14:02FromDiscord<Jarred Kenny> Is it possible to count the fields of an object? Say I have many objects that extend an object, and I want a count of the fields in the object without knowing which of the child types it is.
19:16:00FromDiscord<haxscramper> Runtime or compile-time&
19:16:01FromDiscord<haxscramper> ?
19:17:50FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2KqO
19:18:17*hnOsmium0001 joined #nim
19:18:48*JustASlacker quit (Ping timeout: 265 seconds)
19:18:51FromDiscord<Jarred Kenny> I guess ideally compile time
19:19:01FromDiscord<Jarred Kenny> thanks
19:19:01FromDiscord<haxscramper> Then ^ should work
19:19:12FromDiscord<haxscramper> But this won't work with inheritance of course. But you can store this information when creating new derived object
19:19:48FromDiscord<Jarred Kenny> oh, okay. so that would only work with variant types?
19:20:08FromDiscord<haxscramper> no, it will work with any type,
19:21:03FromDiscord<haxscramper> But if `A` has three fields, and you add two more in `B`, `fields` iterator won't introspect your objects at runtime
19:21:04*Jesin joined #nim
19:21:23FromDiscord<juan_carlos> @haxscramper https://github.com/nim-lang/fusion/blob/master/src/fusion/matching.rst#use-example Gives `Error: selector must be of an ordinal type, float or string`
19:23:04FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2KqQ
19:24:40FromDiscord<haxscramper> For now you still need to use `{.experimental: "caseStmtMacros".}`
19:24:55FromDiscord<haxscramper> Though I forgot to add this to documentation
19:25:50FromDiscord<juan_carlos> Works, but complain of discard'ing its results. :)
19:26:12FromDiscord<haxscramper> Well, this is a case expression
19:26:35FromDiscord<haxscramper> it works the same way without any matching
19:27:48*Arrrrrrrr quit (Quit: Arrrrrrrr)
19:28:25FromDiscord<juan_carlos> Cool, yeah I imagined.
19:28:31disruptekwilliam: because nimscript is 2nd-class citizen and doesn't work in orc, imposes significant performance penalty for evaluation, and the code itself misses critical functionality from proper nim code, creating dialects.
19:29:01federico3can ./koch docs be used to convert only one rst file?
19:29:55FromGitter<iffy> I'm statically linking to libsodium with `passL:libsodium.a` and `dynlibOverride:libsodium` and it works fine when making an executable. But when I try `--app:staticlib` it complains about not being able to find some of the libsodium functions. Can `--app:staticlib` not include other static libs in it?
19:36:39FromDiscord<fwsgonzo> try --whole-archive it?
19:37:37FromDiscord<fwsgonzo> it would be done something like this: `passL:--whole-archive passL:libsodium.a passL:--no-whole-archive`
19:38:01FromDiscord<fwsgonzo> you can still prune unreffed stuff with LTO and (if you really have to) linker GC
19:43:16FromDiscord<fwsgonzo> most likely your linking order is wrong when you make your program a static lib, so just fixing the order should take care of the undefined references
19:44:26FromDiscord<haxscramper> @juan_carlos I updated documentation for this example and started follow-up PR draft
19:44:38federico3iffy: why statically linking a cryptographic library tho? People might want to receive security fixes
19:45:05FromDiscord<haxscramper> And also - do you know when updated fusion will be available on playground and when fusion documentation index will be rebuilt?
19:45:22*not_lum joined #nim
19:47:27*beatmox quit (Ping timeout: 260 seconds)
19:47:36*hpyc9 quit (Quit: 420)
19:47:37*beatmox joined #nim
19:47:46*hpyc9 joined #nim
19:48:37*lum quit (Ping timeout: 260 seconds)
19:49:36*cyraxjoe quit (Ping timeout: 272 seconds)
20:00:16FromDiscord<juan_carlos> CI builds doc.
20:04:21Zevvtreeform: I'm confused about RGB vs sRGB
20:11:11FromDiscord<Daniel> should be more colours in sRBG
20:12:54FromDiscord<juan_carlos> RGB uses colors, sRGB uses colours.
20:14:00FromDiscord<treeform> what are you confused about?
20:14:50FromDiscord<treeform> I guess in Chroma, Color is sRGB
20:21:31FromDiscord<Jarred Kenny> Does anyone know why i get "nvalid type: 'ComponentStore' in this context: 'proc (): Universe' for proc" here? https://play.nim-lang.org/#ix=2Kr4
20:23:26*Torro joined #nim
20:23:41FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2Kr6 you forgot to add generic types
20:23:53FromDiscord<haxscramper> This error message though
20:24:49FromDiscord<Jarred Kenny> but I want the ComponentStore table to hold a different type for each entry
20:25:37FromDiscord<haxscramper> Table only works for two types
20:25:56FromDiscord<haxscramper> And specializing generic parameters is mandatory
20:26:30FromDiscord<Jarred Kenny> I guess I need to rethink my approach
20:27:02FromDiscord<haxscramper> IIUC ECS Is basically almost always OOP
20:27:45FromDiscord<haxscramper> So I would advise to just go with it unless you have some really specific requirements
20:29:21FromDiscord<Jarred Kenny> I know, I am still just trying to understand some of the ECS concepts. ECS is defintely not OOP. It's the opposite.
20:29:51FromDiscord<nikki> ecs is not oop yeah 🤔
20:30:24FromDiscord<Jarred Kenny> I am trying to find some datastructure that lets me store contigious arrays of objects of any given type
20:30:57FromDiscord<nikki> @Jarred Kenny you're kinda on the right track but you can't have a single World type that just has all of the component arrays type erased
20:31:07disruptekarray[pointer]
20:31:10FromDiscord<nikki> unless you store sth similar to a void pointer and have extra runtime info that gives the tye
20:31:18FromDiscord<haxscramper> https://github.com/yglukhov/ecs/blob/master/ecs.nim
20:31:51FromDiscord<haxscramper> And yes, for some reason I was convinced that ECS is some heavyweight OOP concept, sorry
20:32:00FromDiscord<nikki> @Jarred Kenny entt is a good ecs impl imo that doesn't have the registry need to know all the types
20:32:02FromDiscord<haxscramper> design pattern
20:33:31FromDiscord<nikki> i think along ecs lines this is better thought of as one table per component type, with entries in each for entities that have them
20:34:06FromDiscord<Jarred Kenny> oh, that sounds logical, I just just have things nested backwards
20:34:14FromDiscord<William_CTO> What are "Exports"?
20:34:42FromDiscord<nikki> depends on the context probably @William_CTO
20:34:46FromDiscord<Jarred Kenny> but how do you write that table type :/
20:35:01FromDiscord<nikki> Table[T]
20:35:25FromDiscord<William_CTO> Ok to be honest I'm not sure
20:35:25FromDiscord<nikki> you're gonna need to type erase it at some level though
20:35:41FromDiscord<nikki> @Jarred Kenny the entt impl in c++ is very instructive
20:36:15FromDiscord<nikki> tbh in nim, i would just use metaprogramming shenanigans to register all the types and just have the tables for each type be not type erased
20:38:07FromDiscord<Jarred Kenny> I'll check it out. Thanks.
20:41:00FromDiscord<William_CTO> What's the difference between a custom exception of type Exception as seen in https://nim-lang.org/docs/manual.html#exception-handling-custom-exceptions vs one of type CatchableException and when should I favor one over the other?
20:46:12*l1x joined #nim
20:46:25FromDiscord<Jarred Kenny> Can you elaborate on this?
20:46:53disruptekuse catchable when you want to be able to catch it. else, use defect.
20:48:06FromDiscord<nikki> i'm hoping to eventually code this kinda idea myself. i'd wrapped entt in this fame i'm working on; but; it's a bottleneck on the compile time so i wanted to rewrite the ecs in nim 🤔
20:48:27FromDiscord<nikki> @Jarred Kenny it's just an idea; i don't really have a detailed answer till i try coding it myself haha
20:48:35FromDiscord<Jarred Kenny> fair enough!
20:48:53FromDiscord<nikki> https://github.com/nikki93/ng-public/blob/public/src/types.nim
20:49:08FromDiscord<nikki> here's an example where i register some component types with the `comp` macro
20:49:31FromDiscord<nikki> all that stuff is in kernel.nim (just my fancy word for the ecs World)
20:50:04FromDiscord<nikki> since the types are registered, i could potentially just have a bunch of tables, one per type, and code statically just uses the right table
20:50:05FromDiscord<Jarred Kenny> What does comp do?
20:50:35FromDiscord<nikki> registers that type so that i can iterate over types statically whenever later
20:51:01FromDiscord<nikki> bottom of kernel.nim
20:52:10FromDiscord<Jarred Kenny> I have so much to learn, this is greek to me.
20:53:37FromDiscord<nikki> types.nim and then something like player.nim shows the actual use of the ecs
21:05:06FromGitter<iffy> @federico3 Can people update libsodium on iOS? (this is for iOS)
21:05:24FromGitter<iffy> I mean, can they install their own dylib to upgrade it?
21:06:07*Kaivo quit (Quit: WeeChat 2.9)
21:26:41FromGitter<iffy> I tried those various `passL` flags, but just ended up combining with `libtool` after the fact
21:33:38FromDiscord<William_CTO> Is it possible to do something like this `range[0..12, 14..20]`? I'd like a range with excluded numbers
21:37:18FromDiscord<haxscramper> No, it is not possible
21:46:05*habamax quit (Ping timeout: 240 seconds)
21:58:06*beatmox quit (Quit: ZNC 1.8.0 - https://znc.in)
21:59:18FromDiscord<Jarred Kenny> @nikki , not sure about my read from nil, but am I on to something here? https://play.nim-lang.org/#ix=2Krt
21:59:57FromDiscord<nikki> as soon as i see inheritance / virtual tables i'd say it's probably not really like an ecs impl 😐
21:59:59*beatmox joined #nim
22:00:23FromDiscord<William_CTO> With the help of all of y'all I've made my own library: azure_translate. Do y'all mind looking at the code and providing suggestions?
22:00:46FromDiscord<nikki> but maybe it's good to keep going, get something working; then be ok with doing another version? @Jarred Kenny
22:01:21FromDiscord<Jarred Kenny> My thinking there was that components were stored in contigious seqs in a table still
22:06:00*Lord_Nightmare joined #nim
22:10:01*vicfred joined #nim
22:41:28*jjido quit (Quit: Connection closed for inactivity)
22:44:06FromDiscord<Filipe Duarte> Is it possible to send a message to my email during a scientific computation experiment? Every hour send a summary of my computations.
22:45:32FromDiscord<Filipe Duarte> (edit) "Is it possible to send a message to my email during a scientific computation experiment? Every hour send a summary of my computations. ... " added "Maybe send the step where the program is."
22:47:32FromDiscord<Filipe Duarte> I think the question is how to do that
22:50:04FromDiscord<Filipe Duarte> Maybe create a file and upload to a simple web page
22:50:28FromDiscord<Filipe Duarte> What's the simple and fast way to do this?
22:56:07FromDiscord<Filipe Duarte> (edit) Is it possible to send a message to my email during a scientific computation experiment in Nim? Every hour send a summary of my computations. Maybe send the step where the program is.
23:13:59*l1x quit (Quit: Connection closed for inactivity)
23:14:02FromDiscord<ElegantBeef> Might be able use the the imap api to do it
23:15:05FromDiscord<ElegantBeef> Ah my bad dont know email APIs imap cannot send 😄
23:15:26disruptekyou don't need to send, you just need to add a message. 😉
23:15:28*smitop joined #nim
23:15:33disruptekbut, we have native smtp support.
23:15:43disruptekthough it's easier to just call sendmail.
23:16:15FromDiscord<ElegantBeef> Also nice to see the stdlib shipping things like that
23:16:53disrupteki would use something else, though. dbus or statds.
23:16:58disruptekstatsd, too.
23:17:01disruptek!repo nim-metrics
23:17:02disbothttps://github.com/status-im/nim-metrics -- 9nim-metrics: 11Nim metrics client library supporting the Prometheus monitoring toolkit, StatsD and Carbon 15 22⭐ 1🍴
23:17:05disruptek!repo deebus
23:17:06disbothttps://github.com/disruptek/deebus -- 9deebus: 11simple sugar over dbus 15 0⭐ 0🍴
23:19:43*leorize quit (Ping timeout: 240 seconds)
23:20:07FromDiscord<ElegantBeef> Depends on what they want, but system notifications or a push notification to their phone is just a better impl
23:20:39disruptekstay off of my phone, beef.
23:20:47FromDiscord<Filipe Duarte> I want the fastest
23:20:49FromDiscord<ElegantBeef> Dude you'd love me on your phone
23:21:01FromDiscord<Filipe Duarte> kkk
23:21:01FromDiscord<ElegantBeef> Fastest, it's a notification system, speed isnt a concern
23:21:15disruptekmetrics is faster than dbus.
23:21:29disruptekit runs in an adjacent thread and pushes udp.
23:21:47FromDiscord<Filipe Duarte> send to my phone?
23:21:52disruptekif you want to move complex data, you want dbus. if you just want stage info or whatever, you use metrics.
23:22:26disrupteki already have rika on my phone. no room for beef.
23:22:29*leorize joined #nim
23:22:36FromDiscord<Filipe Duarte> Only info, I'm not concern with saving data during the process
23:22:49FromDiscord<Filipe Duarte> so, metric
23:22:52FromDiscord<Filipe Duarte> (edit) "metric" => "metrics"
23:23:20FromDiscord<ElegantBeef> Well i dont know what you overall desire is, sounded like using emails for notifications
23:23:50FromDiscord<Filipe Duarte> Notification about the stage of the experiment
23:27:01FromDiscord<Filipe Duarte> which execution, algorithm iteration, dataset etc
23:27:41FromDiscord<ElegantBeef> `notify-send` goes brrr 😄
23:28:14FromDiscord<Filipe Duarte> with metrics?
23:28:45FromDiscord<Filipe Duarte> oh it's a package
23:30:33*Vladar quit (Quit: Leaving)
23:35:30*JustASlacker joined #nim
23:52:58PrestigeLooks like jester is not 1.0, are there any stable Nim web frameworks?
23:53:48disrupteknope.
23:54:01Prestigeah.