<< 05-01-2021 >>

00:01:23FromDiscord<ElegantBeef> `proc get[T](entity: Entity, T: typedesc): T =`
00:01:27FromDiscord<ElegantBeef> I believe
00:01:35jkenahhhh
00:01:47FromDiscord<jken> thanks!
00:02:34FromDiscord<ElegantBeef> Also that's a EC system if i've ever seen one
00:02:38FromDiscord<jken> actually no, does not allow that either.
00:03:16FromDiscord<Recruit_main707> you can also specify the generic type this way:↵`proc get[T](entity: Entity): T` and calling it like this:↵`get[YourType](yourEntity)` or `yourEntity.get[:YourType]()`
00:03:32FromDiscord<fwsgonzo> can you overload assignment? so that assigning a specific type has some specific meaning? (calling a function)
00:03:36FromDiscord<ElegantBeef> seems you dont need the `[T]`
00:03:51FromDiscord<Recruit_main707> if he uses typedesc no
00:04:02FromDiscord<fwsgonzo> (edit) "function)" => "function)↵In C++ I would overload operator= and just implement the function"
00:04:07FromDiscord<ElegantBeef> yea i suggest doing the generic method
00:04:16FromDiscord<ElegantBeef> doing `[T: Component]`
00:05:27FromDiscord<jken> Either way I get generic instantiation when called :/ I am probably missing something obvious
00:05:37FromDiscord<Recruit_main707> its required
00:05:44FromDiscord<Recruit_main707> thats what you are missing :p
00:05:47FromDiscord<ElegantBeef> what's your call look like?
00:06:03FromDiscord<Recruit_main707> it cannot be inferred from the return type
00:06:11FromDiscord<Recruit_main707> nvm
00:06:22FromDiscord<jken> `var t = entity.get(T)` which is the API I had working before I rewrote the inside of the ECS 😛
00:06:23FromDiscord<Recruit_main707> ignore those 3 sentences
00:06:36FromDiscord<ElegantBeef> now it's `entity.get[: T]`
00:06:38FromDiscord<Recruit_main707> or maybe not
00:06:47FromDiscord<ElegantBeef> you dont need the typedescp art
00:06:53FromDiscord<ElegantBeef> (edit) "typedescp art" => "typedesc part"
00:07:10FromDiscord<ElegantBeef> `get[T: Component](ent: Entity): T` is your proc signature
00:07:24FromDiscord<jken> AH!
00:07:41FromDiscord<ElegantBeef> This is the second time you reacted prematurely 😛
00:07:49FromDiscord<jken> yep just realized that
00:08:01FromDiscord<ElegantBeef> Speaking of prematurely where is diprustek
00:08:06FromDiscord<jken> 🤣
00:08:09FromDiscord<Recruit_main707> :disruptek:
00:08:25disruptekwut
00:08:33FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=2KTD
00:08:47FromDiscord<fwsgonzo> what's an alternative?
00:09:12FromDiscord<Recruit_main707> check this @fwsgonzo https://nim-lang.org/docs/destructors.html↵maybe it helps
00:09:18FromDiscord<ElegantBeef> believe you can override the `=sink` and `=destroy`
00:09:21FromDiscord<ElegantBeef> Ah there you go
00:10:07FromDiscord<fwsgonzo> but its only for the same type
00:10:11FromDiscord<fwsgonzo> (edit) "type" => "type?"
00:10:18FromDiscord<fwsgonzo> (edit) "type?" => "type on both sides?"
00:10:38FromDiscord<ElegantBeef> well make your own using `~=` or any other custom operator
00:10:39FromDiscord<Avatarfighter> :disruptek:
00:10:46FromDiscord<fwsgonzo> hmm
00:10:49FromDiscord<ElegantBeef> Why'd you summon him i was making a joke
00:11:08FromDiscord<fwsgonzo> ooh nice thanks @ElegantBeef
00:11:11FromDiscord<ElegantBeef> @fwsgonzo https://nim-lang.org/docs/manual.html#lexical-analysis-operators all available symbols are here
00:11:14FromDiscord<Recruit_main707> does the emote ping him btw?
00:11:16FromDiscord<fwsgonzo> I used := haha
00:11:24FromDiscord<ElegantBeef> Well it writes `:disruptek:`
00:11:26FromDiscord<Avatarfighter> @ElegantBeef wym summon, disruptek flows through all of us regardless of what we want
00:11:33FromDiscord<jken> sent a code paste, see https://play.nim-lang.org/#ix=2KTF
00:11:42FromDiscord<jken> No matter the configuration I can't get rid of the generic instantiation
00:11:49FromDiscord<ElegantBeef> Ew cast
00:11:57FromDiscord<ElegantBeef> Well you dont provide a T
00:12:14FromDiscord<ElegantBeef> your `componentType` would need to be `T` then you dont need `[T]` iirc
00:12:38FromDiscord<ElegantBeef> I still say drop the componentType and just use Nim's generic calling logic
00:12:58FromDiscord<jken> ah, yep, right problem but fixed in the wrong part of the call chain
00:13:03FromDiscord<ElegantBeef> `get[T](uni,entity)` or `uni.get[: T](ent)
00:13:03FromDiscord<Recruit_main707> i dont know why people prefer typedesc over generics
00:13:04FromDiscord<ElegantBeef> (edit) "T](ent)" => "T](ent)`"
00:13:37FromDiscord<ElegantBeef> Well it's probably do to not knowing `[:T]` exists
00:13:41FromDiscord<jken> @Recruit_main707 probably the lack of neurons from writing too much JS for years
00:13:51FromDiscord<jken> in my case anyway
00:13:56FromDiscord<fwsgonzo> can I override ~= to do a regex comparison (assume that I have that ready to go) , so that it returns a bool?
00:13:59FromDiscord<ElegantBeef> I personally avoided generics for things cause i didnt know you could do the generic method
00:14:05FromDiscord<Recruit_main707> we all have our wiffs ;)
00:14:11FromDiscord<ElegantBeef> operators just call procs fwsgonzo
00:14:19FromDiscord<ElegantBeef> So whatever you want the proc to do you can have it do
00:14:35FromDiscord<fwsgonzo> hmm, that's very nice
00:15:29FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2KTJ lazy showcase of it
00:15:52FromDiscord<Recruit_main707> @jken its not just you iirc mratsim also does, (he is /imho/ one of the best nim programmers)
00:15:56FromDiscord<ElegantBeef> And remember if you're really lazy you can add `{.discardable.}` so if it's unhandled it doesnt minde
00:16:11FromDiscord<fwsgonzo> grazie
00:16:42FromDiscord<jken> Maybe its actually secret sauce
00:17:01FromDiscord<ElegantBeef> I really think the typedesc only works well if you dont know about that generic call method
00:17:07FromDiscord<ElegantBeef> Since without it it breaks ufcs
00:18:49FromDiscord<Rika> i use typedesc when i need to mix that with a real generic
00:19:04FromDiscord<Rika> since if i didnt then the user would need to specify the "real generic type" as well
00:19:08FromDiscord<Rika> instead of it being inferred
00:19:43FromDiscord<Rika> there is a real use case for using typedesc over noninferrable generic
00:20:43FromDiscord<Recruit_main707> any goers out there, is this essentially the same as clearing the contents of an `[]int`? `b.vtable = b.vtable[:0]`
00:22:53*Jjp137 quit (Ping timeout: 260 seconds)
00:23:26*Jjp137 joined #nim
00:33:23mipribelatedly, I've written functions like this a few times, including just now: https://play.nim-lang.org/#ix=2KTN . "oh, I don't need a return false after that; result's already false".
00:35:58FromDiscord<Rika> who are you saying that to
00:36:34*Tanger joined #nim
00:37:56*filcuc quit (Ping timeout: 272 seconds)
00:38:53*abm quit (Quit: Leaving)
00:53:28*kwilczynski quit (Ping timeout: 268 seconds)
00:53:55*taprack joined #nim
00:54:02*fowl quit (Ping timeout: 264 seconds)
00:54:25FromDiscord<KallDrexx> I think that's in reply to my conversation I started a good 9 hours ago :)
00:55:22*fowl joined #nim
00:56:45*kwilczynski joined #nim
01:11:55*krux02 quit (Remote host closed the connection)
01:28:31*j-james joined #nim
01:33:10FromGitter<awr1> @mipri I do that a lot
01:36:12FromGitter<awr1> Technically in that situation I would rather do the functional approach, i.e. `["a", "b", "c"].anyIt(s.startsWith(it))`. But there are a lot of cases where I (quite intentionally) implicitly return the default value of `result`
01:53:06*taprack quit (Read error: Connection reset by peer)
01:56:45FromDiscord<has1> how do i get the first item out of a seq[string] ?
01:56:49FromDiscord<has1> s[0] ?
01:59:02FromDiscord<has1> nvm, it was a different issue
02:00:21FromDiscord<has1> man, nim is such a good language but the tooling is so terrible
02:04:48qwrdepends, what tooling? nimble is imho good and the compiler is fast... i guess completion in emacs/etc is rough
02:07:11FromDiscord<Rika> ive never had major issues understanding the errors from the compiler
02:07:34FromDiscord<Rika> i do not rely on errors from my editor, ive always found them unreliable no matter the language
02:09:23*leorize quit (Ping timeout: 240 seconds)
02:09:55FromGitter<awr1> Errors from Nim are okay, I wish suggestions would be made more often though
02:10:14FromGitter<awr1> Elm had some pretty neat error reporting
02:24:19FromDiscord<poopoopeepee> yo dude the nim memory management options look poggers
02:24:28FromDiscord<poopoopeepee> how does the default refcounting gc work?
02:24:46*leorize joined #nim
02:25:07FromDiscord<ElegantBeef> https://nim-lang.org/docs/gc.html
02:25:51FromDiscord<poopoopeepee> i did read that, i'm mostly curious how u can predict the performance of the refcounting gc with the "backup" mark and sweep
02:26:27FromDiscord<poopoopeepee> like if you wrote your code with no cycles, would the mark and sweep run at all? i'm not sure where i can find information about it
02:26:37FromDiscord<ElegantBeef> I'd assume not
02:27:38FromDiscord<poopoopeepee> pretty wild
02:27:40FromDiscord<poopoopeepee> if true
02:27:51FromDiscord<poopoopeepee> i read the blog post and everything i could find about it
02:28:03FromDiscord<poopoopeepee> i'm really curious about this approach
02:28:47*Prestige quit (Quit: Prestige)
02:30:19*Prestige joined #nim
02:33:54FromDiscord<ElegantBeef> Well that's not even the cool memory management system
02:34:21FromDiscord<ElegantBeef> Actually are you talking about `refc` or `arc`/`orc?
02:34:22FromDiscord<ElegantBeef> (edit) "`arc`/`orc?" => "`arc`/`orc`?"
02:34:29FromDiscord<poopoopeepee> i was looking at orc and refc as the most interesting ones
02:34:57FromDiscord<poopoopeepee> orc seems interesting but without knowing more details the footnote of "not actually deterministic" scared me away a little, because that's always my priority
02:35:34FromDiscord<poopoopeepee> from a more pragmatic perspective all of this seems very cool
02:43:25FromDiscord<Quibono> What’re you doing that you need it to be deterministic?
02:43:51FromDiscord<ElegantBeef> Counting to 10
02:45:05FromDiscord<Quibono> Lol
02:45:26FromDiscord<Quibono> The GC beef. :p
02:46:11mipriarc's deterministic but can be leak with cycles. orc uses trial deletion to break cycles. the details are in how trial deletion works. you can help orc by telling it when it shouldn't bother (on acyclic objects)
02:52:25*nickster4 joined #nim
02:54:32FromDiscord<has1> @Rika there is no auto completion / type hints most of the time. It takes forever to load anything and most of the time its incomplete.↵Also it doesnt show me when my code has errors, it takes like 5 seconds, and I have a very fast computer.
02:54:34*nickster quit (Ping timeout: 260 seconds)
02:54:34*nickster4 is now known as nickster
03:02:45FromDiscord<Rika> autocompletion/typehints worked swell on my editor, load times are good as well, unless you consider a second for the highlighting to pop up as bad, errors do show but i ignore them as i dont like relying on those
03:06:22FromDiscord<has1> i takes at least 4 seconds
03:06:26FromDiscord<has1> for me
03:06:37FromDiscord<has1> what plugin are you using on vs code?
03:13:21FromDiscord<Rika> uh
03:13:21FromDiscord<Rika> well
03:13:23FromDiscord<Rika> uhm
03:13:27FromDiscord<Rika> im not using vs code
03:13:38FromDiscord<Rika> but i dont think it takes 4 seconds to load the file for me in vs code
03:13:53FromDiscord<Rika> or do you mean load the highlighting or completes or whatever else?
03:15:43FromDiscord<has1> i mean changing 1 character and for it to display as error
03:15:51FromDiscord<has1> everything is very slow
03:16:19FromDiscord<Rika> nimsuggest is a wonky mess i believe
03:16:27FromDiscord<has1> how can it be so slow when nim implements the LSP? wasn't that supposed to give a great experience?
03:16:36FromDiscord<Rika> lsp != good experience
03:16:45FromDiscord<Rika> just means that its more compatible
03:16:47FromDiscord<has1> i mean, unless the implementation is a mess
03:16:54FromDiscord<Rika> nim itself doesnt implement lsp
03:17:03FromDiscord<has1> sure
03:17:04FromDiscord<has1> its tooling
03:17:19FromDiscord<Rika> the lsp implementation is tooling on top of tooling
03:17:39FromDiscord<Rika> lsp server is based on nimsuggest as well i believe
03:17:55FromDiscord<ElegantBeef> Yes it is
03:18:13FromDiscord<has1> sounds like someone should create a new implementation with speed in mind
03:18:27disruptekwhat's stopping you?
03:18:33FromDiscord<ElegantBeef> Yea you're someone!
03:18:57FromDiscord<has1> if someone paid me, I'd take a crack. Otherwise I will have to tend to other stuff
03:19:13FromDiscord<ElegantBeef> Lol
03:19:21disruptekbelieve it or not, most of us are in the same boat.
03:22:46FromDiscord<has1> well, it would be a shame to have this language go to waste if the tooling doesn't get some attention.↵All the time that has been invested into the language must be massive
03:23:00FromDiscord<ElegantBeef> Again as i linked last time https://github.com/nim-lang/RFCs/issues/300
03:23:02disbotDeveloper tooling
03:23:03FromDiscord<has1> I feel like creating such tooling would be much easier than creating the entire language
03:23:19disruptekthe sooner you start, the sooner we'll have the benefit of your work.
03:24:17FromDiscord<Quibono> Lol
03:24:25PrestigeI'm excited for better tooling support
03:24:42FromDiscord<Quibono> Has1, nimsuggest isn’t that great, just don’t use it.
03:24:45PrestigeAlthough what I have right now covers like 90% of what I want
03:24:55miprinobody's eating the intellisense dogfood so this condition has persisted for a while.
03:24:58FromDiscord<has1> @Quibono well that's the problem though
03:25:01FromDiscord<has1> its like coding in notepad
03:25:05disruptekhas1: give us a link to your repo so we can follow your progress.
03:25:06FromDiscord<ElegantBeef> "just dont use tooling" is a non solution
03:25:19mipri"just don't use tooling" is literally everyone's actual solution.
03:25:19Prestigemipri: what do you mean?
03:25:34Prestigein regards to intellisense
03:26:21FromDiscord<has1> :disruptek: ill just stick to a different language with better tooling. Which is unfortunate because the language itself is great
03:26:27FromDiscord<Quibono> @ElegantBeef don’t use X piece of tooling is a valid suggestion. I believe Araq uses some sort of autocomplete
03:26:41FromDiscord<Quibono> AI thingermergig
03:26:45FromDiscord<ElegantBeef> Tabnine
03:26:55FromDiscord<Quibono> That
03:26:56Prestigeah okay
03:26:59FromDiscord<ElegantBeef> Which doesnt work overly well for giving information/descriptions of the procedures
03:27:19Prestigewhatever coc.nvim is doing, is giving me good suggestions
03:27:29FromDiscord<Quibono> I mean I just keep the docs open in another page, I’d love nimsuggest to be better, but...
03:27:48FromDiscord<ElegantBeef> Many people want an IDE experience where that isnt needed
03:27:52disruptekhas1: i speak only for myself, but i don't miss people that don't contribute.
03:28:27FromDiscord<has1> so why didnt you create it
03:28:35FromDiscord<Quibono> ...
03:28:40FromDiscord<has1> you dont contribute either by that logic
03:28:44FromDiscord<Quibono> Even I think you’re sounding entitled
03:28:44disruptekneovim works great for me unless i'm in the compiler's includes or some of my heavy macro+concepts+statics+generics stuff.
03:28:56FromDiscord<Quibono> Disruptek writes shittons of useful things
03:29:01PrestigeThere are many things to contribute to, can't write code for everything
03:29:34FromDiscord<has1> so how do you know i dont write other code or i dont contribute to other things?
03:29:35Prestigewell maybe disruptek can, but the rest of us have things to do irl
03:29:36FromDiscord<has1> flawed logic
03:29:52FromDiscord<Quibono> He’s saying you’re complaining about the ecosystem
03:29:58FromDiscord<Quibono> Without contributing to it
03:30:06FromDiscord<Quibono> And telling other people they ought to do stuff
03:30:10FromDiscord<Quibono> Which imho is entitled
03:30:19disruptekno, i'm saying i won't miss him if he moves on. 🤷
03:30:33FromDiscord<ElegantBeef> Well it's comical to hear "it's a shame" whilst also saying "I dont want to make it better"
03:30:50disruptekactually, i agree with a lot of the criticism.
03:30:56disrupteki make the same claims all the time.
03:31:05disrupteki often don't want to make things better, either.
03:31:13disruptekbut, i usually replace things with stuff i prefer.
03:31:17FromDiscord<ElegantBeef> Yet you made IC which will make it better
03:31:20FromDiscord<has1> that's just silly. Are you going to tell everyone that doesnt like the tooling "do it yourself"
03:31:37mipriNot everyone. Eventually someone who actually wants this shit will provide it.
03:31:38FromDiscord<has1> "do it yourself or dont tell us you dont like it"
03:31:39disruptekthis is an open source project with almost no paid contributors.
03:31:46FromDiscord<ElegantBeef> It's OSS be the change you want to be in the world
03:31:56disrupteklike i said, feel free to criticize.
03:32:39disrupteki doubt you're more critical than i am, honestly.
03:32:50FromDiscord<Quibono> Is that possible disruptek?
03:32:53mipriI have good syntax highlighting and good autoindent from a vim mode, so I'm not wanting for anything.
03:32:59FromDiscord<Quibono> 😄
03:33:30disrupteki don't think i've ever met someone more critical than me. it could happen; i won't rule it out. but i can't think of who that might be in this community.
03:34:15FromDiscord<Rika> ngl i agree
03:34:24FromDiscord<Rika> maybe a few came close
03:34:49disruptekkrux is pretty critical.
03:34:54disruptekhe might be a winner.
03:35:06FromDiscord<Rika> yeah too bad theyre not here anymore i think?
03:35:37disrupteki saw him at fosdem but i don't think we've spoken in a few months now at least.
03:35:54FromDiscord<has1> alright boys. I am going back to c# to get some work done
03:35:57FromDiscord<Rika> see you
03:36:01disruptekpeace.
03:36:17FromDiscord<Rika> tooling really does need improvement
03:36:25disruptekalways has.
03:36:34FromDiscord<Rika> improvement doesnt come when everyone tells everyone else to use something else though
03:36:44disruptekwhat?
03:37:25FromDiscord<Quibono> Personally I’d love nimsuggest to be good lol.
03:37:35FromDiscord<Rika> well of course
03:37:38FromDiscord<Rika> everyone would
03:37:54FromDiscord<Rika> what i would love to be able to do is to contribute to it but i dont know jack shiiiiit lmao
03:38:40FromDiscord<Rika> contributing to compilers and their tooling always feels much more pressuring to me than third party libs
03:38:55disruptekic could help the speed, but i'm not too impressed with the current ic impl, so it's hard to get excited about pulling it into nimsuggest.
03:39:34FromDiscord<Rika> how does rust do its tooling given the, uh, compile times they have
03:40:08disruptekthere are two main differences afaict: they care about quality, and they are paid to care about quality.
03:42:33disruptek!repo disruptek/ups
03:42:34disbothttps://github.com/disruptek/ups -- 9ups: 11a package handler 15 1⭐ 0🍴
03:43:04disruptekhere's an easy place to contribute; i'm slowly porting nimph guts into a package we can use in both nimph and nimble and anywhere else.
03:43:36disrupteki'm trying to improve the quality over what started in nimph, which imo is still pretty decent (else i wouldn't be porting it over).
03:47:44*muffindrake quit (Ping timeout: 258 seconds)
03:49:50*muffindrake joined #nim
03:51:21FromDiscord<KallDrexx> How active is Nim development outside of Araq?
03:52:14mipriof Nim itself? https://github.com/nim-lang/Nim/graphs/contributors
03:52:59FromDiscord<KallDrexx> That's not too bad
03:53:24FromDiscord<Rika> pretty bad for a well used language though i believe
04:31:33*spiderstew joined #nim
04:32:42*j-james quit (Quit: Leaving.)
04:32:58*spiderstew_ quit (Ping timeout: 258 seconds)
04:43:22*Gustavo6046 quit (Ping timeout: 256 seconds)
04:44:12saemWell that was a lot of excitement
04:53:59disruptekwhat happened?
04:54:22disrupteki always miss the excitment.
04:54:28saemjust catching up on messages
04:55:54*rockcavera quit (Remote host closed the connection)
04:56:24*a_chou joined #nim
04:58:20*a_chou quit (Remote host closed the connection)
04:58:45*a_chou joined #nim
04:58:46*a_chou quit (Remote host closed the connection)
05:06:52FromDiscord<Anonymous Poet> hey, out of curiosity, whats the current state of dr nim?
05:06:59*leorize quit (Quit: WeeChat 2.9)
05:07:42FromDiscord<Anonymous Poet> it was one of the things that got me pretty excited about nim, but the docs give an example and then say "but this doesnt currently work", and the binary doesnt come preinstalled with nim (and koch doesnt either - i tried compiling dr nim but wasnt actually successful)
05:07:59FromDiscord<Anonymous Poet> is it worth trying to include as part of a ci/cd system or is it not there yet?
05:08:15*leorize joined #nim
05:08:52disruptekit was an unpaid project and it ran out of time.
05:08:57disruptekit's not there yet.
05:09:02leorizedrnim development stalled as more important things require attention
05:09:19FromDiscord<Anonymous Poet> aww, thats a shame, but it totally makes sense
05:09:42disruptekyou can probably build it successfully with a small amount of work, but i don't think it really does much yet.
05:10:21FromDiscord<Anonymous Poet> honestly i cant say im really in need of it yet
05:10:41FromDiscord<Anonymous Poet> but it would be the kind of thing that id spend a weekend or two playing around with
05:10:51disrupteki think i got further using klee on nim->llvm ir.
05:12:16FromDiscord<Anonymous Poet> not familiar with it, but a quick google search suggests its a symbolic evaluation engine; sorry if this is a dumb question, but how does that address the same use cases?
05:12:31FromDiscord<Anonymous Poet> id be interested in the formal verification aspects of dr nim
05:13:23*leorize quit (Ping timeout: 240 seconds)
05:13:41disruptekit can do the same sort of static analysis to both identify bugs and develop tests.
05:19:44*leorize joined #nim
05:20:54leorizesaem: I'm not sure what you're trying to propose for nimsuggest (on nimsuggest#66)
05:21:44saemIt starts up as a process, you call `project foo.nim bar.cfg`that sets the project and it'll work in that context
05:22:11saemyou can call `project baz.nim whatever.cfg` and it'll change projects/context of suggestions.
05:23:20leorizesounds like that'd need a new protocol
05:23:27saemEffectively you can change projects on the fly without firing up new processes all the time. It moves nimsuggest in the right direction IMO as you can then think about tying in other useful tools like nim find and so on.
05:23:49saemNot hugely, can still have initialising parameters as currently exists.
05:24:11saemJust don't take advantage of project setting/changing.
05:24:13leorizebut why would you want that?
05:24:25saemBecause managing a whole bunch of these processes is a pain and not useful
05:24:33saemIt should be easy and effortless to change config
05:24:43saemNot allocate the same memory for every slight flavour of compilation
05:24:44leorizesuggestion context shouldn't change between projects
05:24:49saemYes, yes it should
05:24:54saemcfg makes a massive difference.
05:25:13leorizeno, what I meant is that why shouldn't nimsuggest just figure everything out?
05:25:44saemNo, that's not a good idea, because it _can't_ it still needs to know which project and there are tons of them.
05:25:52leorizeit can detect project files, so why not let it do that for every file and figure the project?
05:25:56saemNo it can't
05:26:01*fputs quit (Ping timeout: 246 seconds)
05:26:05saemAnd it's not fixable
05:26:08saemI've read the code
05:26:20disruptekisn't this what nimph and nim itself do?
05:26:23saemAs soon as you have a have when defined(foo), you've lost
05:26:46leorizeI still don't understand what's the problem
05:27:12saemBecause you're assuming too much
05:27:32leorizeplease elaborate
05:27:50saemstrip back your assumptions, project.nim and project.cfg.nim <--- this is not useful and the current state of affairs pretending that it is is a huge mistake
05:28:17leorizeI'm pretty sure it looks for project.nim.cfg
05:28:24saemOMG
05:28:25saemstop
05:28:28leorizebut there's also a nimble search code path that works 99% of the time
05:28:32saemI know all this shit
05:28:33saemwell
05:29:09saemnim and all such tools should beyond all the existing cfg lookup magic, should take a config parameter where you can specify a config that you want. <-- this is how it should work and everything supporting some magical looking around projects is just a waste of time.
05:29:47saemThis is what I mean by the assumptions are broken.
05:29:56disrupteki support the concept, but the reality is that we have to support a few hundred projects that people actually use.
05:30:43disrupteki don't see a way around following the current codepath of reading N different files. we don't have to do it for every dependency, just the main project.
05:30:44saemInstead we have all this silly code in nimble and nimscript and whatever build system which is people just writing out permutations of config composition. When it could just be simplified by this.
05:31:09saemThen all of a sudden you can't pretend findProjectNimFile works, because it doesn't and can't.
05:31:32disruptekwell, i don't use that code and i'm not suffering.
05:31:43disruptekwhere is it?
05:32:11disruptekcompiler/options?
05:32:28leorize4raq actually aimed for configuration to be done in the source file itself
05:33:04saemThat doesn't seem great...
05:33:16saemNow we have to execute arbitrary code to figure out config?
05:33:22leorizedisruptek: a variant of findProjectNimFile is used in nim.nvim for automated project discovery if that's what you're looking for
05:33:38disruptekno, i'm looking at the code now.
05:34:17leorizesaem: we are already doing that with nimscript :P
05:34:24saemIt's a mistake
05:34:29saemWhy perpetuate it?
05:34:34saemHow about take security seriously?
05:34:48disruptekdon't use that word.
05:35:01saemBy default I want the compiler to compile, not execute arbitrary code because a nimscript got injected into my path somehow.
05:35:22leorizewelcome to macros :)
05:35:38FromDiscord<Rika> well nim's compiler is more of a combined make and gcc than just something like gcc
05:35:47leorizebecause yes your normal nim code can execute during compile time
05:36:05disruptekthe reason to dump nimscript is that it doesn't work and isn't performant.
05:36:27disruptekthe security angle, correct though it may be, is undermined by every other feature of the os and nim itself.
05:36:27FromDiscord<Rika> i dont see how nimscript worsens security
05:36:56saemDoes it execute on every compiler invocation, even a query rather than a compile or execute?
05:37:16leorizeit used to
05:37:19disruptekit doesn't /have/ to.
05:37:33saemdisruptek: fine, I won't use the word security
05:37:40leorizeuntil 4raq finally implements "core mode" to ban writeFile and staticExec
05:40:07FromDiscord<ElegantBeef> Comically a nim compiler without a libffi vm has very few security issues due to not being able to do much of anything
05:40:59saemRegardless there are many permutations of a project even in a simple code base and firing up a process for each or juggling those around doesn't make sense.
05:41:35FromDiscord<ElegantBeef> What is your suggested method of managing configurations?
05:41:38saemAnd building a cross-platform process supervisor to manage that mess isn't a good idea.
05:41:51leorizewell... have you looked at nimlsp?
05:42:01saemhave a cfg file, pass that as a parameter, it is lower priority than CLI, and higher than everything else.
05:42:03saemYes
05:42:16saemRead the code, experimented with it a bunch.
05:42:49leorizethough it might be worth noting that the compiler is kind of a mix between a build tool and a compiler
05:42:53leorizeunlike rust for example
05:43:17disruptekyes, it needs more information than a typical compiler.
05:43:21saemSure... but that can only go so far.
05:43:45leorizewhy would you want configuration to be passed by hand completely?
05:43:57FromDiscord<ElegantBeef> Probably a dumb idea but couldnt we introduce a new `buildConfig "name":` to nims/cfg so then you can just have the editor have a `selectConfig` for any file with any multiple configs
05:44:54leorizehow would passing-by-hand configuration affect the UX of nim?
05:44:58saemBecause for those of us who want an ide experience and are building it, maintaining multiple build profiles, seamlessly switching between them, interchanging it with other tools is a real need.
05:45:11FromDiscord<ElegantBeef> So then do that in the cfg?
05:45:24saemYou mean the one that the user can define?
05:45:27saemNow you haev conflicts
05:45:32saemthe one that shows up in the git repo?
05:45:40saemOr maybe somewhere along their path and now you have GOPATH
05:45:40FromDiscord<ElegantBeef> Didnt you just suggest using by hand?
05:45:44saemYes, I did
05:45:51FromDiscord<ElegantBeef> So how is that worse?
05:45:54saemSorry, I thought you meant change one of the existing ones.
05:46:15saemIt isn't, it's fantastic.
05:46:44FromDiscord<ElegantBeef> I did, i meant inserting scoped builds the editor can pickup on and use as a flag to load from the project config fiile
05:47:38FromDiscord<ElegantBeef> so you can do `build js:` in nims and give it all you desired js builds, in your editor code you just have to find the `build js:` and give that as an option for the user to choose
05:48:14saemTo get an idea of the parameters of a build just look at travis ci or whatever's build matrix. IDEs have a similar issue, slightly different parameters.
05:48:52saemIf you try to shove that into one dimension, a single build profile you'll have a massive list and that'll have to be figured out in a giant if statement from hell
05:48:57leorizeto be fair in most of nim ci all we do is to switch the target os :P
05:48:59saemWhich I mean, whatever.
05:49:34saemyes, because what we do today is such a good indicator of what one will do when better tooling changing transaction costs will show up?
05:50:43disruptekthe best tooling removes the config.
05:50:48leorizethe problem is that you haven't shown why there is a need for that
05:50:52disruptekby which i mean, /my/ tooling. 😁
05:51:02saemNo, you haven't demonstrated that you know the problem.
05:51:29leorizethen please guide me
05:51:46disrupteki don't use an ide but i think saem wants to be able to click a button and get an apriori build config for a xplatform compile.
05:52:45saemI'm not even going that far yet. I'd like to have folks be able to manage their projects and build profiles.
05:53:21disrupteksomehow they are doing that now, though, right?
05:53:23leorizewe do have support for such thing in nim.cfg, in the form of `<arch>.<os>.<compiler>`
05:53:33saemNot well.
05:53:35leorizewhat I'm puzzled about is this build profiles and such
05:54:27leorizeif you can give me an example of why the way it is done now is bad and what's your solution, I'd be grateful
05:55:09disrupteksaem: what languages are you coming from, again?
05:55:12saemOK, so every file in a nim codebase can be a project.
05:56:00saemJava, Kotlin, Haxe, JS, TypeScript, Php, the list goes on for a while but those area recent...
05:58:05saemThe fact that any file can be a project already does fun things with main module and defines.... highlighting and such break down. I mean it's fair, trying to do symbolic execution across conditional compilation... loool
05:58:57saemThen on top of that you have, as stated, the backends.
05:59:37saemNow even without one of those backends you have sub-parameters, which again create more permutations...
06:00:43saemFiguring out how to launch your debugger for you, which debugger to choose in fact, because backend. Or even more exciting, are you trying to debug a test that's associated to a source module and we want to provide features based on correlation?
06:01:38saemIt's a million things, trying to say this can all be some how managed by a heuristic like findProjectNimFile is not going to work. I mean give up on tooling, there is a very low upper ceiling.
06:05:01FromDiscord<ElegantBeef> Seems like you could solve this with allowing users to force a config file for a project basis mixed with the idea i mentioned previously where do your different build settings overrides/setting inside a `build name` in the nimscript
06:05:24saemTo a degree.
06:06:18saemI've 100% thought of that idea and it has some good legs, but it gets weird when say you're running tests and it's more than just --path=../src to solve the problem
06:06:31disrupteki'm not convinced, honestly.
06:07:02disruptekpeople are complicated. my experience is that knowing the entire environment isn't as hard.
06:08:03disruptekit was easier to write the code, is my point. maybe it doesn't help your problem, though.
06:08:28leorizeso afaik Araq is planning to solve your point about conditional compilation via IC, where the compiler can compile all possible branches of the AST
06:08:51disruptekthat won't happen any time soon.
06:09:24disruptekit's pretty damned difficult to do it correctly. i think i've killed the idea like three times now.
06:09:32saemyeah, also I'm thoroughly curious about what the growth on that is.
06:09:54disruptekgrowth in what, file size?
06:09:59saemYes
06:10:12disruptekmeh, i doubt it matters.
06:10:15saemAlso, it doesn't matter if you do all the branches, you need to know which one you're in.
06:10:25saemI think that depends upon code base.
06:10:33leorizeif you have a map, you can find the way
06:10:40saemNo you can't
06:10:54saemYou can only know where you are, not how you got there.
06:11:08saemThat second part is relevant to know what else beyond your local scope is in scope.
06:11:31disrupteki don't follow that. these aren't just fat binaries.
06:12:16saemI know, you blat out both sides of a define for example, sure. But that doesn't tell you what the other defines are resolved to... so is your search space all other possible define combinations wrt to wherever you are in the AST?
06:12:41saemThen... how do you provide the right answer?
06:12:48disruptekno, you can always go up.
06:13:03Zevvha you dropped the candy!
06:13:03disrupteki'm not sure what you're asking, though.
06:13:08saemHow? defines are independent variables.
06:13:37disruptekZevv: just for you, buddy.
06:13:44disruptekdunno why you couldn't do it for me, though.
06:13:57Zevvsheer lazyness
06:14:45saemIf I have three independent defines and I'm somewhere in an AST inside a branch, i can know where in the AST I am. I can know all sides of ever other when using a define. But I do _not_ know the state of the other defines... unless I know the cfg at play.
06:15:05disruptekof course you know the config.
06:15:28saemSo we didn't solve the problem whatsoever.
06:15:40saemYou might as well only know the paths you care about at that point.
06:16:08disruptekit's not as though you don't know what alternate paths exist and how to get there.
06:16:46disrupteki'm afraid i really don't understand your point.
06:17:17saemI'm not saying that, but you don't know how to suggest things. Either you know the config and everythign resolves and you can do meaningful suggestions etc... or you don't in which case you can probably do highlighting sufficiently accurately but other things are problematic.
06:18:07disruptekokay, first of all, the branches are in the ast. you get that.
06:18:12saemyes
06:18:18disruptekthe config is practically in the ast, also. you get that.
06:18:34disruptekthen the viewer brings a config to the table.
06:18:39saemyes, they're defines. Which means you can resolve the branches to which ones are active.
06:18:47saemHold on...
06:18:51disruptekpresumably, the configs are similar. maybe the same, maybe not.
06:19:15disruptekwe have the config that we sem'd with and we have the config that you read via tooling codepath.
06:19:19*leorize quit (Quit: WeeChat 2.9)
06:19:22saemI think we're purporting the same thing. :P
06:19:43disruptekokay, is that good?
06:19:47saemYes, very.
06:20:34disruptekhave you looked at araq's attempt to mimic class files?
06:20:38disruptekjava bytecode i mean
06:20:41saemA config (hence a project) must be settable. If it can only be set in the beginning, then knowing all sides of the branches is meaningless.
06:21:05saemYou mean the MIR conversation? Haven't dug in.
06:21:07*leorize joined #nim
06:21:30disruptekwell, compiler/ic/rodfiles is like 150 lines or something.
06:22:03saemGuess I should have a quick look is that in the ic-6 branch?
06:22:16*waleee-cl quit (Quit: Connection closed for inactivity)
06:22:28disrupteki don't know what's current now but i think the last tests i did were against ic5.
06:23:05saemLet me see if I can find it, but go on.
06:23:19disruptekbut also realize that the branches, currently, are NOT in the ast. 😁
06:23:28saemI do know that.
06:23:31disruptekokay.
06:23:44saemI've been reading sem pass shit for 3 days, it's not all in there, but not at zero
06:24:12disrupteki pity the fool.
06:24:14saemAlso, the debugger is awesome, I crammed in so much more when I could see the state + stack trace
06:24:40saemI'm in a module, in an include, in an import, in an include... fuck you, but also cool.
06:25:01disruptekgdb?
06:25:04saemyeah
06:25:20disrupteklike i said, it has come a long way.
06:25:22saemI can make some more quick wins to make the state easier to inspect.
06:25:54saemMight make it a whole lot easier for more folks to contribute to the compiler because they can _see_ it
06:26:11saemwhatever, getting distracted.
06:26:23saemback to "class files"
06:27:08disruptekwell, what do you need to know?
06:27:15disruptekit's not going to help all that much, i'm afraid.
06:27:27saemWell I felt like you were about to tell me a story
06:27:37saemI was going to ask if I can grab some tea and cozy up with a blanket.
06:28:20disruptekum, what you can do is suggest based upon the information you have.
06:28:32disrupteksince that includes a config, maybe you use that.
06:28:46disrupteki dunno. i don't really give a shit about nimsuggest; i've never worked with it.
06:29:01disruptekleorize creates a product that works well enough for me.
06:29:18leorizesaem is proposing that nim supports passing a configuration file
06:29:27leorizethen extend that to nimsuggest to afaict
06:29:28leorizetoo*
06:29:28saemYes, if the config is in there, it's all good. And yeah, I've seen the compiler down right pull cfgs in and yeah, they're basically top level symbols
06:29:31disrupteki'm really happy when i can trust someone else to do better work than i could. 😀
06:30:02saemleorize: nimsuggest, nim, nimfind, etc... all use the same cli infra so it'd be part and parcel regardless
06:30:17disrupteki still support having a --config= option.
06:30:27disruptekwe've discussed that.
06:30:46leorizeI think your idea should be presented as an RFC
06:30:52disruptekbut i think we need to be realistic about what it means.
06:31:15saemLoL, an RFC for a config parameter
06:31:30FromDiscord<has1> when you use a future with yield, the proc will already run in the background and yield will only wait for the result of it, right?
06:31:30leorizesaem: was talking about your idea :P
06:32:05leorizehas1: that's the simple way to look at it
06:32:28FromDiscord<has1> sent a long message, see http://ix.io/2KV7
06:32:30saemleorize: my idea isn't even that big. All I'm saying is the current project command inside nimsuggest takes parameters to swap out the project, which is module + cfg
06:32:53FromDiscord<has1> basically, the same thing as c# for example
06:33:11disruptekhas1: i believe the design is based upon c#, unfortunately.
06:33:25FromDiscord<has1> why unfortunately?
06:33:35disruptek!rfc 295
06:33:36disbothttps://github.com/nim-lang/RFCs/issues/295 -- 3next steps for CPS
06:33:38FromDiscord<has1> which concurrency implementation would you have rather seen?
06:33:52leorizesaem: I would actually want nimsuggest to be stateless for the most part
06:34:19saemleorize: it isn't right now and how can it be, it's a compiler as a service
06:34:22leorizewe should have a --v3 protocol so you can pass all this stuff as part of a command
06:35:04leorizestateless as in the UI
06:35:18leorizecommands should be self-contained and not influence other commands
06:35:20saemThat's great for text editors
06:35:25saemoh
06:35:28saemactually yeah
06:35:30saemI support that
06:35:46saemI mean, let's not repeat opengl here.
06:36:01FromDiscord<ElegantBeef> opengl here
06:36:32saemit does increase the amount of data shipped, but commands are tiny, result payloads. eeeeep
06:36:49leorizewell we can certainly expand the socket interface to enable one-connection-per-session
06:37:20leorizeper-project I mean
06:37:28leorizethen nimsuggest can work in parallel
06:37:29disruptekbeef: he said, /not/ repeat opengl here.
06:37:35disruptekoops.
06:37:39saemdamnit!
06:37:43saemnow we have three
06:38:06disruptekjust, y'know, don't say opengl here again and we'll be fine.
06:38:07saemWell I guess we have opengl... at least it makes pretty pictuers
06:38:25FromDiscord<ElegantBeef> Wait sorry i didnt get the memo what about opengl here?
06:38:41saemwe're not supposed to say opengl here.
06:38:44disruptekwe're talking about not continuing to talk about opengl here, here.
06:38:57FromDiscord<ElegantBeef> This is over my paygrade
06:39:56FromDiscord<has1> so instead of async await
06:40:00FromDiscord<has1> you want go style CSP?
06:40:12disruptekultimately, yes.
06:40:20FromDiscord<has1> i am all for it
06:40:26FromDiscord<has1> its my #1 language
06:40:46FromDiscord<has1> but even in go concurrency stuff isn't just a heaven to use either
06:40:47saemleorize: I think having one socket is good because it forces serialization of the right things, it's not like it can meaningfully service many requests simultaneously... also I don't think it's worth the complexity of trying to do it.
06:40:59leorizesaem: I did actually formulated a potential "nimsuggest manager" thingy with a "session <project.nim>" that returns an id then every request will have the id prefixed
06:41:05disruptekwell, we aren't limited the way go is.
06:41:21disruptekwe have generics and concepts and metaprogramming out the ass.
06:41:30saemleorize: is that an outside nimsuggest process or in nimsuggest?
06:41:39leorizeoutside process
06:42:00leorizeshouldn't be hard to do it with nimsuggest as a library
06:42:04saemleorize: I did a bunch of stuff by porting over what aporia does/did and learned some unfun things along the way
06:42:18leorizethe compiler parted ways with globals for the most part
06:42:18FromDiscord<has1> should i even bother with async nim?
06:42:25FromDiscord<has1> or should i handle this in c#
06:42:39saemleorize: oh wait... like that, as a library is a different matter, the only thing there is that nimsuggest then doesn't match your compiler version/toolchain.
06:42:43FromDiscord<has1> i was trying to do some tasks in parallel and thought i would just use nim with yield
06:42:49disrupteki personally do not recommend async/await, as you know.
06:42:57disrupteki am in the minority.
06:43:05FromDiscord<ElegantBeef> But i bet you also dont recommend C# either 😛
06:43:15disruptekactually, i think c# is pretty nice.
06:43:16leorizeI hate Nim async/await too, complicated all of my types
06:43:23FromDiscord<ElegantBeef> Shit, my joke failed!
06:43:33saemyeah, it's all the opengl
06:44:07disrupteki'd rather write c# than go, but the problem with c# is that you'd be mad to try to do it professionally on linux, so for me it's right out.
06:44:08saemyeah, not a fan of async/await, but it's better than the promise crap I have to do in js land.
06:44:25saemdisruptek: I know a guy...
06:44:30FromDiscord<has1> why rather c# than Go?
06:44:48disrupteki just think go is too limited in its expressive ability.
06:44:58saem^^ that
06:45:02FromDiscord<has1> like when?
06:45:08disruptekbut i don't code professionally, so you can ignore anything i say.
06:45:13leorizesaem: the idea for something like that is to replace the current nimsuggest
06:45:22FromDiscord<has1> are you using generics or something?
06:45:27saemleorize: oh, so it lives in the compiler not 3rd party
06:45:40disrupteki don't really write anything that isn't chock full of generics.
06:45:50Prestigesaem: why not async/await in js?
06:45:52saemgenerically pseaking
06:45:58leorizesaem: if it's 3rd party I would make it spawn nimsuggest
06:46:20saemPrestige: sorry, I mean in Nim out to JS, there is a bunch of it in the extension
06:46:29Prestigeah
06:46:31leorizewell I pondered on the idea for awhile but then I just hate the concept of needing a project file
06:46:40leorizebeen figuring out how to not need it
06:46:55saemPrestige: I didn't discover sugar until much later and man I can't stand the anonymous proc syntax... uuuuugh
06:47:12Prestigewithout sugar?
06:47:38saemPrestige: yeah, I like sugar, but without... oof
06:48:20*narimiran joined #nim
06:48:28PrestigeI don't ever remember when to use -> or => with sugar
06:48:42PrestigeHave to look at the docs every time
06:48:47disrupteki don't use sugar; to me, it's not good enough. i will probably write something for myself to use with csp.
06:50:19saemleorize: project management/detection is really fucking annoying, kept writing for a day straight trying to distil all the crap and end up with something... still not done. But there are graduations and I think auto-detection can only really do "package" detection and a heuristic for "the most project-y of projects"
06:54:28saemleorize: Here is my half finished and sorta out of date first crack at it: https://gist.github.com/saem/58228a5cfe88e7e857b17fdc3f0c377d
06:57:30leorize99% of the time we would be dealing with a package
06:57:50saemI think that's because people are trying to use nimble as a build tool. ;)
06:57:53saembut yeah.
06:57:54leorizeI don't mind that much, hence findProjectNimFile
06:58:03saemYeah, but it has issues.
06:58:28leorizemy approach with it has been to be correct 90% of the time
06:58:31saemYou can't use that and rely on a when isMainModule section, IIRC.
06:59:53saemI know and I need you to aim higher, because that's a ceiling for everyone else and if it further cements itself as authoritative it's a little death.
07:00:16leorizewell you can try writing an rfc to propose your better scheme
07:00:24leorizethe stuff I use don't have a concept of a "project"
07:00:40leorizeyou use the stuff that does have that concept, so I would imagine you could drive it further
07:01:22leorizehave you read into LSP? do they have that concept?
07:01:27saemHonestly, I'll take `--config`on the command line at this point and live with managing a bunch of processes for a few more months.
07:01:37saemI've studied the protocol a bunch.
07:01:54saemSo LSP lifetimes are 100% client managed.
07:03:06leorizefor big ideas you'd need to write an rfc so that everyone can be informed
07:04:38saemThat means you either give the LS the right answer, you have the LS start figure out the answer (which is a mild spec violation IIRC) and return you the answer on init, or you use the given points of protocol extension to reconfigure the LS.
07:05:02saemThe only big idea would be a nimsuggest v3
07:05:42leorizewell you did write your config idea to be a big thing
07:06:04leorizeif we were to implement it, then tooling would have to start being aware of it
07:06:42saemYou mean the gist? That's me refining my thinking to distil it down to something very succinct, so it's easy to convey and deeply simple.
07:06:54saemWhat tooling?
07:07:28leorizenot the gist :P, but the thing that you wrote to explain your idea to me earlier
07:07:34saemoh
07:09:05saemI guess I better write an RFC at some point... blech
07:09:25leorizeplease do :P and make it long like disruptek rant on cps
07:09:30saemno
07:09:31saemfuck that
07:09:37leorizewould make things much easier to comprehend :P
07:09:40saemLook I'm trying to not work right now. ;)
07:09:50leorizeI'm not very good at English so I need long ass explainations
07:10:05saemDo you want opengl here?
07:10:28FromDiscord<ElegantBeef> Did some one say "opengl here", i came as quickly as i could?!
07:10:33FromDiscord<ElegantBeef> It's the only thing i can contribute
07:10:43disruptekwhat, opengl? here?
07:11:12saemYes, beef said he can contribute opengl here
07:11:34disruptekare we doing opengl here, now?
07:11:41disrupteki thought we weren't doing opengl here.
07:11:59saempretty sure leorize said to do opengl here
07:12:19disruptekleorize: i gave you a dist rant and you never said `thank you`.
07:13:28leorize[m]:p
07:15:13*disruptek throbs at ufcs in templates.
07:15:22leorize[m]oh, as of now CIs used by libraries/programs hosted by nim-lang org has switched to choosenim
07:15:31saemIs that a good throbbing or bad?
07:15:35disruptekNOOOO
07:15:46saemI mean, I can be pretty pro-throbbing here, so no judgement
07:15:51leorize[m]not sure if I should continue developing setup-nim when choosenim seems to becoming mainstream
07:16:11saemugh
07:16:12disruptekit won't last.
07:16:13saemno....
07:17:07disruptekif there's one thing that's reliable about nimble/choosenim, it's that they are reliably broken.
07:19:02disruptekError: internal error: openArrayLoc: Bytes
07:19:50saemAnyone done nim + nodejs testing?
07:20:19FromDiscord<ElegantBeef> The compiler has tests that use nodejs afaik
07:20:38disrupteki'm debating getting into it to help support jc.
07:20:49disrupteki mean, adding support to my testes.
07:22:27leorize[m]saem: what kind of testing?
07:22:54saemleorize[m]: I need to test this vscode extension, more than me just poking around for 30 seconds and being like, LGTM.
07:23:38disruptekbut that's the nim way.
07:23:43disruptekis there any other?
07:23:49saemowned
07:23:55disruptekthrow a debugEcho in there and ship it.
07:23:56leorize[m]use testament
07:25:15leorize[m]the compiler make use of testament for its js testing, so you can pull a page outta that
07:25:42saemvscode has all the bits and pieces there https://code.visualstudio.com/api/working-with-extensions/testing-extension I need to write some bindings to setup that test harness, output the equivalent js that is the test harness, then run the actual tests which are more nim to js things.
07:26:46saemYeah... I'm not sure I'll be able to use testament for this, vscode needs to fire up an extension environment for the execution and be the boss, think a heavy nodejs.
07:26:54saemdisruptek: can your testes handle that?
07:27:12saemDon't answer, I just wanted to ask the joke.
07:27:27FromDiscord<ElegantBeef> Probably less if his testes can handle it and more if you can handle them
07:27:28disruptekhuh?
07:27:37disruptekmy testes were /made/ to be the boss.
07:27:57saemsure thing Tony Danza.
07:28:05saemActually, he wasn't the boss, Abed proved it.
07:28:57disrupteki... okay.
07:29:08disrupteki got nothin' for charles in charge jokes.
07:29:50saemyou Ray Charles, cuz you can't see the joke. (I'm here all night folks)
07:32:47saemBum, looks like I'm not going to fix this markUsed/includes issue tonight.
07:36:21saemleorize[m]: how much of sem pass and suggest code have you dug into?
07:37:12*PrvDragon joined #nim
07:37:13leorize[m]enough to get a general idea
07:37:54leorize[m]what problem are you trying to solve?
07:38:34saemDid you have look at why includes break? I'm pretty sure I understand at this point and I think I can at least get the outline working, I've figured out most of the sem stuff involved, now it's tracking the info heading back to suggest.
07:39:07saemWondering if you've looked at it before and if I can bounce my thinking off you.
07:39:40disruptekaim for his throat.
07:40:03saemI'm trying to fix outline... I have to aim for the outline...
07:40:17saemAnd now I'm being told it's bed time. :(
07:40:56leorize[m]includes break? I haven't look at it actually, outline works fine for me
07:41:32leorize[m]but generally most nimsuggest bug has been down to incorrect lineinfo
07:41:34saemif you go to sem and outline it doesn't show you the included code, only the forward declarations
07:41:53saemand if you go to an include and outline you get nothing.
07:42:01saemwell most of the time you get nothing.
07:42:37leorize[m]usually I would try to reduce the test case down first
07:42:41saemThere is some wonky state in there and it breaks, but I think that's related to a potential issue with fileInfos
07:42:55leorize[m]because nimsuggest is wonky as hell
07:43:09leorize[m]sem used to crash it in 3-4 ways
07:43:44saemyeah, I have like a ~5 line 3 file test case which covers it well
07:44:47leorize[m]please open an issue in nim-lang/nimsuggest then ping me, I'll look at it tmr
07:44:58saemImma do that tomorrow
07:45:01saemI gotta crash
07:45:10leorize[m]'night
07:45:16saemI have to get on calls with Europe in the morning
07:45:21saemnight
07:46:22saemgn folks
07:53:00FromDiscord<Rika> sleep well
08:11:33*Privacy_Dragon joined #nim
08:13:07*PMunch joined #nim
08:14:55*PrvDragon quit (Ping timeout: 258 seconds)
08:18:54*leorize quit (Quit: WeeChat 2.9)
08:18:59*taprack joined #nim
08:33:48*Tanger quit (Quit: Leaving)
08:45:44*xet7 joined #nim
09:21:36*krux02 joined #nim
09:28:39*filcuc joined #nim
09:32:19*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:46:33*abm joined #nim
10:08:47*abm quit (Read error: Connection reset by peer)
10:10:18*abm joined #nim
10:10:37*adnan338 joined #nim
10:10:42*adnan338 quit (Client Quit)
10:11:00*adnan338 joined #nim
10:24:39*Vladar joined #nim
10:26:49FromDiscord<Clyybber> orc is more deterministic then refc actually. orc is not really undeterministic, it just has certain thresholds/heuristics for when and how much to collect afaict
10:29:08*JustASlacker joined #nim
10:35:19*Tanger joined #nim
10:50:47*Romanson joined #nim
10:58:22FromDiscord<mratsim> You need to do a first pass to gather the byte offset of each starting lines, and then split that on multiple threads.
10:58:40FromDiscord<mratsim> @zevv @disruptek, I'm back from 64k (I even had 20k at one point ...)
11:05:19*FromDiscord quit (Remote host closed the connection)
11:05:33*FromDiscord joined #nim
11:07:39Zevvhooray!
11:07:44ZevvI thought you said "end of januari"
11:07:57Zevvif you were using IRC, 20k would be ample :)
11:08:01*so quit (Ping timeout: 264 seconds)
11:08:14ZevvI guess you used your bit of offline-time for the good and everything is done & finished?
11:13:17*JustASlacker quit (Ping timeout: 260 seconds)
11:17:56*so joined #nim
11:49:37*PMunch quit (Ping timeout: 246 seconds)
11:50:02*PMunch joined #nim
11:53:30FromDiscord<mratsim> yeah so it was end of january, then yesterday, it worked a bit in the weekend before being down again end of the weekend
11:53:39FromDiscord<mratsim> I changed ISP
12:02:50*rockcavera joined #nim
12:13:59FromDiscord<Jake> @1T0S_
12:14:02FromDiscord<Jake> install gentoo
12:23:58ForumUpdaterBotNew question by Alex Craft: Does value/reference types in Nim works same way as in Swift?, see https://stackoverflow.com/questions/65578845/does-value-reference-types-in-nim-works-same-way-as-in-swift
12:25:51FromDiscord<exelotl> writefile exists in nimscript but doesn't seem to be documented. Is it OK to use or might be removed in the future?
12:28:08ZevvI'll allow it.
12:28:40*NimBot joined #nim
12:28:45FromDiscord<exelotl> thanks zevv :P
12:36:35Zevvyw
12:43:52*Arrrrrrrr joined #nim
12:46:35*krux02 quit (Remote host closed the connection)
13:05:29*Vladar quit (Quit: Leaving)
13:07:19*Tanger quit (Remote host closed the connection)
13:17:00*tiorock joined #nim
13:17:00*tiorock quit (Changing host)
13:17:00*tiorock joined #nim
13:17:00*rockcavera is now known as Guest85073
13:17:00*tiorock is now known as rockcavera
13:17:45*Guest85073 quit (Ping timeout: 240 seconds)
13:25:25*muffindrake quit (Ping timeout: 272 seconds)
13:27:04*muffindrake joined #nim
13:36:02*muffindrake quit (Ping timeout: 264 seconds)
13:36:03*Romanson quit (Quit: Connection closed for inactivity)
13:38:17*muffindrake joined #nim
13:43:59*adnan338 quit (Quit: adnan338)
13:45:46FromDiscord<jken> sent a code paste, see https://play.nim-lang.org/#ix=2KWY
13:47:12FromDiscord<Rika> How are you calling the procedure
13:47:54FromDiscord<jken> sent a code paste, see https://play.nim-lang.org/#ix=2KX0
13:48:07FromDiscord<Rika> Youre calling it wrong
13:48:19FromDiscord<jken> How should it be called?
13:49:14FromDiscord<Rika> universe.componentListFor[:T](#[youre missing a variable of type T here]#)
13:49:26FromDiscord<Rika> Actually
13:49:32FromDiscord<Randall> sent a code paste, see https://play.nim-lang.org/#ix=2KX1
13:49:43PMunchUhm, that's not really the issue
13:49:46FromDiscord<Rika> You can remove the [:T] part if you put the missing variable ij
13:50:14FromDiscord<Rika> Are you referring to me PMunch because I’m pretty sure this is the issue
13:50:31PMunchYeah I was referring to you
13:50:33FromDiscord<jken> It's pretty unhappy with either syntax.
13:50:50PMunchHis problem is that he passes a typedesc to something that seems to expect an object
13:50:51FromDiscord<Rika> Well you have to fill in the missing variable I said there was
13:50:55FromDiscord<Rika> I know
13:51:02FromDiscord<Rika> Hence the comment
13:51:07PMunchAh right
13:51:14FromDiscord<Rika> Sigh
13:51:16PMunchYeah if he fills that variable it'll work
13:51:47PMunchNot 100% what they're trying to do though..
13:52:12*tane joined #nim
13:52:29FromDiscord<Rika> Yeah me neither
13:52:31mipriget() isn't generic. It accepts an arbitrary typedesc at runtime, and then passes it to componentListFor(). componentListFor() is generic, so its [T] needs to be statically known, but you're trying to pass it at runtime. This is incoherent.
13:53:11FromDiscord<Rika> Uh there are no typedescs in runtime
13:53:29FromDiscord<Rika> You can pass a T generic to a T typedesc param
13:53:45FromDiscord<Rika> Its just generic can infer and typedesc you have to input
13:54:42FromDiscord<jken> 😕
13:55:08FromDiscord<Rika> To be honest I don’t understand what you’re trying to do
13:55:11mipriwhat you want here is componentListFor[T]() and no 'component' param. The type of 'component' isn't Terrain, it's 'type Terrain', as in the error. So you're trying to create a 'component list' that contains typedescs instead of one that contains Terrain
13:55:58FromDiscord<Rika> What is the component list for procedure supposed to receive as input? Just so we don’t make incorrect assumptions
13:56:24FromDiscord<jken> sent a code paste, see https://play.nim-lang.org/#ix=2KX5
13:56:44FromDiscord<Rika> So it’s supposed to actually receive a component object?
13:57:19FromDiscord<jken> Well, I used to have it accept a typedesc but was advised to move away from that in here last night.
13:57:32FromDiscord<jken> Because I still couldn't get it to work that way
13:58:20FromDiscord<Rika> I said this before, there is nothing wrong with using a typedesc as an input parameter
13:58:26FromDiscord<Rika> Why did they tell you not to?
13:58:40FromDiscord<Rika> There are valid uses for a typedesc as an input parameter
13:58:57miprimove farther away from them. It makes no sense to accept a typedesc and then pass that to a generic proc like you're doing. Separate your static and your dynamic parameters.
14:00:33PMunch@jken those typeof(component) will be type type Terrain if you pass the typedesc Terrain to it
14:00:43FromDiscord<Rika> Use one or the other. IMO your use case calls for typedesc parameters
14:00:49PMunchhttps://play.nim-lang.org/#ix=2KX9
14:01:18PMunchmipri, they're both static, typedesc doesn't exist on runtime
14:01:34FromDiscord<Rika> I said that already
14:01:46PMunchI know, but they didn't seem to get it :P
14:02:16FromDiscord<jken> So when I have this proc: `proc something(u: Universe, T: typedesc): T =` is `T` the type of the typedesc?
14:02:27FromDiscord<Rika> Yes
14:02:46FromDiscord<jken> Sorry, I meant "is it the type OR the typedesc"?
14:02:51FromDiscord<Rika> The type
14:03:04FromDiscord<jken> so, `T.typeof` would return the typedesc?
14:03:16FromDiscord<Rika> I believe so
14:03:31FromDiscord<Rika> Not sure on that, I have never tried
14:03:33FromDiscord<jken> and `type[T.typeof]` is redundant, but would be the type.
14:03:39FromDiscord<jken> just trying to internalize this
14:03:40miprino. It'd return something like 'type Terrain' as the type, rather than 'Terrain' as the type
14:03:49mipriit's not redundant. It's different.
14:04:04FromDiscord<jken> Ah, I don't yet understand that difference then.
14:04:22mipriyeah these guys are focusing on technicalities instead of on your understanding of the problem.
14:04:58FromDiscord<Rika> Read this please
14:05:01FromDiscord<Rika> https://nim-lang.org/docs/manual.html#generics-implicit-generics
14:07:48FromDiscord<jken> sent a code paste, see https://play.nim-lang.org/#ix=2KXb
14:08:33FromDiscord<Rika> It explains it better than I would
14:14:01FromDiscord<jken> holy #@#!!! I got it working 😄
14:14:57FromDiscord<Rika> Nice
14:21:55*evilkhaoskat joined #nim
14:30:13*wezl[m] joined #nim
14:41:03ForumUpdaterBotNew thread by Domogled: SourceMap, see https://forum.nim-lang.org/t/7336
14:42:13*evilkhaoskat quit ()
14:49:52FromDiscord<jken> Is it possible to convert a string containing a type name back to a typedesc of that type?
14:51:07FromDiscord<mratsim> if it's a static string known at compile-time, you can bindSym(myString).
14:52:25FromDiscord<jken> Where does bindSym come from?
14:52:34FromDiscord<mratsim> but if you work with types in arrays/tables it might be easier to use an enum
14:52:41FromDiscord<mratsim> bindSym is in the macro module
14:52:46FromDiscord<mratsim> import macros
14:52:55FromDiscord<jken> ah. not actually known at compile type.
14:52:57FromDiscord<jken> time
14:53:14FromDiscord<mratsim> well types oly exist at compile-time so you can't get a type-desc at runtime
14:53:35FromDiscord<mratsim> you should consider an object variant if it's only known at runtime
14:57:41filcucquestion regarding ORC/ARC in NimQml compiler tells me "Error: cannot bind another '=destroy' to: QObject:ObjectType; previous declaration was constructed here implicitly: /home/filippo/Repo/Nim/lib/system/arc.nim(226, 15)"
14:57:59filcucand in that line i'm simply doing "new(result, delete)"
14:58:04filcucwhere delete is some proc
14:58:36filcucshould i simply declare my own =destroy proc?
14:58:40filcucand remove my custom deleter?
14:58:48filcuc*removing*
14:59:32FromDiscord<mratsim> I think arc replaced finalizers with =destroy
14:59:36*JustASlacker joined #nim
15:00:26FromDiscord<mratsim> and if you use finalizers they must be declared in the same file as your "new"
15:01:05FromDiscord<mratsim> similarly iirc =destroy must be in the same file as the type declaration.
15:01:32filcucprobably i've just to move the finalizer proc at the top before the new
15:02:45FromDiscord<mratsim> ah yes
15:03:23FromDiscord<mratsim> I rmember having to track down a similar (the exact same) issue when trying to get OpenCL work with ARC: https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/tensor/backend/opencl_backend.nim#L41-L50
15:04:03filcucbut how does destroy work with inheritance?
15:04:53filcucif i subclass should i write a new destroy proc for the subclass?
15:05:08filcucand if yes should i make an explicit call to base class destroy proc?
15:06:51FromDiscord<mratsim> no idea.
15:07:03FromDiscord<mratsim> I avoid inheritance like the plague :p
15:07:33FromDiscord<mratsim> I don't think it works since =destroy must be a proc not a method
15:07:39FromDiscord<mratsim> and you have to keep using finalizers
15:08:02FromDiscord<mratsim> when i say "=replaced" I mean, internally they use the same codepath
15:08:44filcucunderstandable but i used inheritance for simple binding of C++ types
15:09:54filcucthat said the deleter is already before the new call (see https://github.com/filcuc/nimqml/blob/master/src/nimqml/private/qobject.nim) but the type declaration is in a different nim file
15:09:58filcucmaybe that's the issue
15:10:28FromDiscord<mratsim> probably
15:10:39filcuc(all types are in https://github.com/filcuc/nimqml/blob/master/src/nimqml/private/nimqmltypes.nim)
15:10:56FromDiscord<mratsim> btw, you might want to go over the commits by my colleagues: https://github.com/status-im/nimqml
15:11:09FromDiscord<mratsim> there is not much divergence yet.
15:12:34filcucyou mean for solving this issue in particular or just for incorporating their work?
15:14:14FromDiscord<mratsim> I don't think they tried to solve tha t issue since we target Nim 1.2.-
15:14:21FromDiscord<mratsim> 1.2.6
15:15:11FromDiscord<mratsim> yes incorporating the work
15:15:56*JustASlacker quit (Ping timeout: 240 seconds)
15:16:43*JustASlacker joined #nim
15:17:19FromDiscord<exelotl> Is there a Nim equivalent for fopen(filepath, "r+b") ?
15:17:35filcucmratsim i think that they're basically doing a complete "fork"..never seen any pull and they forked dotherside too. The first step for aligning things is to synchronize the DOtherSide repos
15:19:12FromDiscord<exelotl> i.e. open file for read/update (so I can seek to position 0 and replace the header of the file without destroying the rest of the file)
15:19:45miprifmReadWrite and fmReadWriteExisting
15:20:14FromDiscord<mratsim> @filcuc it's more git submoduling with extra fixes
15:20:18mipriAFAICT Nim always avoids text mode
15:21:08miprithose are in https://nim-lang.org/docs/io.html#FileMode
15:21:18FromDiscord<exelotl> ah perfect existing is what I needed
15:22:09FromDiscord<exelotl> Lots of words and I missed the bit where it said it doesn't clear the file 😅
15:27:09Oddmongerusing json module, i get a seq[JsonNode] which is an array of @[1,2,3 …]
15:27:25Oddmongerhow can i convert this seq to a «true» seq of integers ?
15:27:43Oddmongerparse each elem and copy it to my seq ?
15:27:56FromDiscord<Rika> toElems or something i forgot
15:28:10Oddmongerthanks, i try toElemts
15:28:14FromDiscord<Rika> no no
15:28:14FromDiscord<Rika> wait
15:28:16*PMunch quit (Quit: leaving)
15:28:18FromDiscord<Rika> im reading the docs now
15:29:09FromDiscord<Rika> its getElems
15:29:38Oddmongeryes that's it i use for now
15:29:45FromDiscord<Rika> but then you need to convert again since that returns `seq[JsonNode]` so maybe `.to(seq[int])` works
15:29:58Oddmongerah ok
15:30:08FromDiscord<Rika> https://nim-lang.org/docs/json.html#to%2CJsonNode%2Ctypedesc%5BT%5D heres the doc if you need
15:30:31FromDiscord<jken> Are all bits set by default in a BitsRange?
15:33:08filcucmratsim is nimqml used for the android app?
15:33:42Oddmongerok with «to» rather than «getElems», it's perfect!
15:33:47Oddmongerthanks again
15:38:03*JustASlacker quit (Ping timeout: 258 seconds)
15:42:08*greenfork joined #nim
15:42:41*^Q-Master^ joined #nim
15:43:15*Q-Master quit (Read error: Connection reset by peer)
15:45:08ForumUpdaterBotNew thread by Drkameleon: How to make Nim compilation faster?, see https://forum.nim-lang.org/t/7337
15:46:47Oddmongerwell the obvious answer is to compile less :)
15:47:27Oddmongeror use modules for avoiding compiling all the cached stuff every time
15:48:17greenforkhi, what is the current state of naming convention for library wrappers from C? as an example there's a function `rlglInit` from library `rlgl` and options: `init`, `rlglInit`, `initRlgl`. official SDL2 library uses `init` as in `sdl2.init` in code but I heard there are some additional thoughts on it
15:54:26FromDiscord<mratsim> Personally I use proc init(T: type LibraryType): T {.importc: "something".}
15:54:51FromDiscord<mratsim> I find the initFoo and newFoo ugly and they also hurt generic programming.
15:55:14FromDiscord<mratsim> their saving grace is auto completion and saner error reporting when you pass invalid parameters
15:57:28greenforkmratsim, here it is going to be probably always prefixed with module name because some functions don't accept arguments like `close` or `draw`
16:05:43FromDiscord<Randall> sent a code paste, see https://play.nim-lang.org/#ix=2KXY
16:06:07filcucis there a way to evaluate a block of code at compile time and obtain the resulting value?
16:06:33filcucmy use case is to write something eval(foo.start) and obtain proc start(....)
16:08:27greenforkfilcuc, you probably want macros https://nim-lang.org/docs/manual.html#macros
16:09:04*wezl[m] left #nim ("User left")
16:09:52FromDiscord<andeee> has anyone ever made a nodejs extension in nim? either using the n-api or the node-addon-api for c++
16:10:13FromDiscord<andeee> (edit) "c++" => "c++?"
16:16:15FromDiscord<mratsim> @filcuc static(myfunction(a, b, c))
16:17:22FromDiscord<mratsim> also static(block: your statemenents)
16:17:25*Vladar joined #nim
16:17:32*Gustavo6046 joined #nim
16:19:43filcucmratsim thanks
16:21:02filcucmratsim is it possible to have C++ like template varargs in nim. In practice i would like to have a parameter that is a functoin pointer to something
16:21:39filcuclike C++ template<typename ...Args> void foo(std::function<Args...>
16:22:22Clonkk[m]<FromDiscord "<andeee> has anyone ever made a "> Never used it but there is this https://github.com/juancarlospaco/nodejs#nodejs-standard-library-for-nim
16:23:06FromDiscord<haxscramper> filcuc: no, it is not possible in general
16:23:24FromDiscord<haxscramper> The best alternative would be to use `[T1, T2, T3]` etc.
16:23:56FromDiscord<haxscramper> Nim has no veriadic templates, so this part of C++ simply cannot be mapped to anything
16:24:04FromDiscord<haxscramper> (edit) "veriadic" => "variadic"
16:25:16filcucok back to pre C++ variadic templates then
16:28:41*lritter joined #nim
16:31:16FromDiscord<mratsim> static seq might work :p
16:31:49FromDiscord<mratsim> I tried to have BigInt in templates and had issues with static objects but seq might work
16:33:38FromDiscord<mratsim> ah it was this issue which was fixed: https://github.com/nim-lang/Nim/issues/11142
16:33:40disbotType mismatch on init of static[T] object with T being a static[U] ; snippet at 12https://play.nim-lang.org/#ix=27Qf
16:34:43*waleee-cl joined #nim
16:35:10*filcuc quit (Ping timeout: 265 seconds)
16:42:14greenforkmratsim, more on naming, you mentioned that you don't use prefixes. do you have any thoughts in this regard for functions that operate on global state and receive no arguments, still same approach? example is drawing API
16:43:20FromDiscord<mratsim> there is no prefix because on use you have to call `init` with the library type like so: `ArrayRef.init()`
16:43:56FromDiscord<mratsim> similarly, Weave, my multithreading runtime has a dummy "Weave" object: https://github.com/mratsim/weave/blob/master/weave/runtime.nim#L35
16:44:07FromDiscord<mratsim> and you initialize it with Weave.init()
16:44:29FromDiscord<lqdev> btw mratsim, i wonder why in the readme you use `init(Weave)` instead of `Weave.init()`
16:44:31FromDiscord<mratsim> later when I introduce non-global threadpool, you can use pool.init()
16:44:44FromDiscord<mratsim> @lqdev good question.
16:44:54FromDiscord<lqdev> i do like `init Weave` tho
16:44:56greenforkand if I don't have a library-specific object? like so: `beginDrawing(); drawLine(a,b,c: int); endDrawing()`
16:44:57FromDiscord<lqdev> looks clean af
16:45:26FromDiscord<mratsim> type MyLib = object
16:46:01FromDiscord<mratsim> https://github.com/mratsim/weave/blob/master/weave/contexts.nim#L26
16:46:27FromDiscord<mratsim> @lqdev when i wrote Weave, I had way too many things to think and keep in mind at the same time.
16:46:57FromDiscord<mratsim> so I probably didn't look that much into some of the brain dumps I did.
16:49:11greenforkmratsim, oh I see, that is kind of cool. looks almost same as doing `import modname as nil` but with more flexibility
16:49:35FromDiscord<mratsim> it's a way to force qualified calls.
16:51:05FromDiscord<mratsim> Should probably write something about this trick on the forum.
16:54:49*JustASlacker joined #nim
16:55:16*tiorock joined #nim
16:55:16*rockcavera quit (Killed (verne.freenode.net (Nickname regained by services)))
16:55:16*tiorock is now known as rockcavera
16:55:16*rockcavera quit (Changing host)
16:55:16*rockcavera joined #nim
16:59:23*hnOsmium0001 joined #nim
17:00:13*JustASlacker quit (Ping timeout: 264 seconds)
17:04:14*JustASlacker joined #nim
17:06:13*taprack quit (Ping timeout: 260 seconds)
17:13:25*JustASlacker quit (Ping timeout: 240 seconds)
17:14:50*a_chou joined #nim
17:15:06*a_chou quit (Client Quit)
17:19:38*letto quit (Ping timeout: 258 seconds)
17:24:21*taprack joined #nim
17:27:30FromDiscord<Randall> What's the main way people here tests module-private things? `doAssert` is kind of annoying because it doesn't show you the diff in case of failure, and the nim tutorials are shockingly sparse on testing. Or do you just put procedures that you'd like to test in a private module and test them there?
17:28:58FromDiscord<juan_carlos> https://nim-lang.github.io/Nim/testament.html ?
17:29:37*abm quit (Read error: Connection reset by peer)
17:29:55FromDiscord<juan_carlos> `include` for private stuff.
17:31:27*abm joined #nim
17:31:43FromDiscord<Randall> Thanks
17:34:16FromDiscord<Randall> Doesn't seem like it's for me. Don't exactly look forward to writing my tests in a string literal
17:35:34FromDiscord<Randall> Remind me of the phpt tests that the php impl uses
17:35:41FromDiscord<Randall> (edit) "Remind" => "Reminds"
17:35:51FromDiscord<mratsim> doAssert can be wrapped in a template that expands the argument on failure
17:36:32FromDiscord<mratsim> and otherwis you can pass a failure string like so: https://github.com/mratsim/constantine/blob/master/tests/t_bigints_mul_vs_gmp.nim#L129-L139
17:36:57FromDiscord<Rika> mratsim id like to know why you force qualification for weave
17:37:52FromDiscord<mratsim> because "init()" alone is a bit too much
17:38:04FromDiscord<juan_carlos> It is not tests on strings tho.
17:38:21FromDiscord<mratsim> also Weave.init() reminds that there is global state.
17:38:52*letto joined #nim
17:39:04FromDiscord<mratsim> and I plan to do scoped threadpool that are non global, var pool: WeavePool; pool.init()
17:39:09FromDiscord<Rika> nic
17:39:11FromDiscord<Rika> nice
17:39:14FromDiscord<Rika> makes sense
17:43:34*JustASlacker joined #nim
17:43:37FromDiscord<Randall> @juan_carlos are there any example available of testament where it doesn't look like it's testing output / where you're writing your expectations in a string? https://media.discordapp.net/attachments/371759389889003532/796071417186615296/unknown.png
17:44:32FromDiscord<juan_carlos> Nim uses testament, so any Nim test is a testament. Is also linked there.
17:47:43FromDiscord<Rika> you can prolly still use unittest
17:47:51FromDiscord<Rika> i dont think its too bad for simpler tests
17:49:00*JustASlacker quit (Ping timeout: 272 seconds)
18:20:20*taprack quit (Quit: Leaving)
18:24:19*taprack joined #nim
18:38:45reversem3how would you strip this kind of string ("user1\n2021-01-04\n", "", 0)
18:39:19reversem3I'm trying to parse it like this user: user1 date: YYYYmmdd
18:43:59FromDiscord<mratsim> !repo strscans
18:44:00disbothttps://github.com/ujihisa/srap -- 9srap: 11strscan wrapper 15 2⭐ 0🍴 7& 3 more...
18:44:05FromDiscord<mratsim> ugh
18:44:14FromDiscord<mratsim> https://nim-lang.org/docs/strscans.html
18:44:22FromDiscord<mratsim> @reversem3
18:44:37reversem3strscans ?
18:47:21reversem3ok I will look into it thanks
18:47:51reversem3I did a typeof and found this (string, string, int)
18:48:04reversem3would this still work with strscan lib?
18:49:02miprino, but all the information you want is in that first string.
18:49:08*leorize joined #nim
18:50:28FromDiscord<fwsgonzo> is it possible to call a function in another module that forces you to implement this function in a main module?
18:50:36FromDiscord<fwsgonzo> (edit) "call" => "define/call"
18:50:58FromDiscord<fwsgonzo> I guess a C function could do the job
18:51:05leorizeyes, Nim's generic got something called `mixin`
18:51:11reversem3That what I am confused about , I call ssh to give me this 3 ┊ let j = await client.execCommand("echo $(date +%Y-%m-%d)")
18:51:12leorizeand we also have concepts
18:51:38reversem3it returns ("user1\n2021-01-04\n", "", 0)
18:51:53miprithat's probably stdout, stderr, and the exit code
18:52:19reversem3what I want to accomplish is put this in a csv file then use gglplot to create some graphs
18:52:20mipriit's a tuple. j[0] is what you're interested in.
18:54:03reversem3oh sweet , thanks
18:55:04*FromDiscord quit (Remote host closed the connection)
18:55:20*FromDiscord joined #nim
18:57:23*FromDiscord quit (Remote host closed the connection)
18:57:36*FromDiscord joined #nim
19:00:08Oddmongerregex is only available in re module ?
19:00:24Oddmongeri just want to extract a filename from a path
19:00:40Oddmonger(maybe split from strutils would be less overkill)
19:01:53greenforkOddmonger, maybe this https://nim-lang.org/docs/os.html#extractFilename%2Cstring
19:01:56ZevvOddmonger: like, getting the file name /from/a/path. ?
19:01:58ZevvsplitFile?
19:02:04ZevvextractFileName?
19:02:11mipriif you don't want to depend on pcre, there's nim-regex for a pure Nim option. If you don't want to import some kind of module to get regexes, then--yeah, they're only available in modules.
19:02:38Oddmongerah extractFilename is there already ^^'
19:03:10Oddmongeri did it like this: var path=fullpath.split("/"); echo path[^1]
19:05:46FromDiscord<jken> Is it possible to call an objects methods from a ptr to that object?
19:05:49FromDiscord<jken> Or am I insane?
19:06:24mipristart with theptr[].themethod
19:09:02FromDiscord<jken> sent a long message, see http://ix.io/2KYR
19:09:33disruptekdom96 wants to offer his /assistance/ to anyone who thinks the irc module isn't good enough for their purposes.
19:10:15FromDiscord<jken> Which makes me wonder if I need to update all of my component object methods to work on ptrs
19:11:56FromDiscord<jken> My brain has been spoiled by dynamic languages and I have not had to think about this before 🙂
19:12:11reversem3lol I agree
19:12:25reversem3but it gets better the more you do it , frustrating at first
19:12:33*ofelas joined #nim
19:14:57miprihere's a plan: start by always copying objects from/to the ECS. Then add an mget() that returns a var Obj that can be mutated directly. Then fully use viewtypes when those are more stable.
19:21:49*letto quit (Ping timeout: 264 seconds)
19:25:07FromDiscord<jken> Is there a different between a proc that returns `ptr SomeType` and `var SomeType`?
19:25:23FromGitter<HJarausch_gitlab> How can I suppress that a symbol is ⏎ *gensymed* ? ⏎ In a macro I have ⏎ ⏎ ``` let foo = quote do ⏎ block : ⏎ let StpItCount= StopIterateCount``` ... [https://gitter.im/nim-lang/Nim?at=5ff4bd2393af5216fc83c063]
19:26:45FromGitter<haxscramper> Annotate with `{.inject.}`
19:27:57FromDiscord<JSGRANT> I know Nimscript is marginally (at best) slower than Python atm -- but is it reasonable to expect that if it was relative focus on optimization that it'd be "in the same ballpark" as something like Lua or would everything have to be up-ended to that pursuit?
19:28:39disruptekluajit is a pretty high bar.
19:28:50disruptekanyway, why would you want that?
19:32:27FromDiscord<JSGRANT> It's maybe not "as important" if/when IC lands & if the hot-reload story improves a fair bit -- but basically my ideal with Nim I'm comparing it to is the style of "conversational programming" I'm used to historically in Common-Lisp. And you can get to parity in the Smalltalks. And really Nimscript seems like the most viable way currently, to get there -- based on what's already available :^P
19:34:01FromDiscord<JSGRANT> But yeah, Lua is "top of the class" to a point where it's probably unreasonable to expect Nimscript to get real close (without that qualifier of uprooting everything ... which is obviously unreasonable)
19:34:03FromGitter<HJarausch_gitlab> @haxscramper Many thanks. I have one more question: I have ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ff4bf2ace40bd3cdb22e115]
19:34:52disrupteki don't think nimscript is the right way to get to the cl-style repl.
19:35:55FromDiscord<JSGRANT> Is "the answer" hcr with ic ? I really don't know. Obviously Nim doesn't have the late-binding blackmagic CL or Smalltalk for that matter have
19:37:18disruptekthe answer is probably a new hcr impl that exploits ic, yes.
19:37:32FromGitter<haxscramper> @HJarausch_gitlab you don't need to provide any specific annotations for symbols that are declared later in code
19:37:57FromGitter<haxscramper> So you can just put `newStopRaise()` and define it later, in another module or anywhere ese
19:38:20FromDiscord<JSGRANT> Literally just remembered inim was a thing; Wonder how that works
19:38:38FromGitter<haxscramper> Since `quote do:` operates on untyped AST IIRC (or at least most of the time it does)
19:39:23FromDiscord<haxscramper> Saves file and runs it IIRC, just repl emulation
19:39:33FromDiscord<haxscramper> not actual repl
19:40:04FromDiscord<JSGRANT> Ah; So it's at the tier of "convincing fake"?
19:40:31FromDiscord<haxscramper> Well, it is mostly used for quick-testing one-liners, at least that's what I use it for
19:41:00FromDiscord<haxscramper> It is not like `cling` for example, although it might be possible to cook up something using it
19:41:51FromDiscord<haxscramper> But in the end I just have `entr | nim r` and this gives me almost the same experience as LISP
19:41:58FromDiscord<haxscramper> Well, """"almost""""
19:42:57FromDiscord<JSGRANT> Ultimately I'm not even a huge fan of "the repl"; For me that's more of a Smalltalk idiom / workflow. In Emacs it's more like you're evaluating expressions and overwriting them regularly -- in a more traditional editor workflow. Which I STRONGLY prefer because moving to separate lines in a repl is eck
19:44:02FromDiscord<haxscramper> Well, I use emacs too - `entr` is actually comparatively similar, the only fundamental difference is that it can't accumulate state
19:44:47FromDiscord<haxscramper> It is also a "fake" emulation of interactive programming, but it works so fast I basically don't notice the difference
19:45:56FromDiscord<JSGRANT> I'm an Emacs apostate btw; lol Threw it all away and basically went on like an actual LISP detox when I realized how 'far down the rabbit hole' I was ... saved me from art-school so I'm grateful for that. loool
19:46:23FromDiscord<JSGRANT> @haxscramper Yeah, it's the workflow over the actual implementation
19:47:25FromDiscord<JSGRANT> If it looks like a duck, quacks like a duck, does it really matter when you cut it open ... it's actually just a being of pure-light?
19:47:58FromDiscord<haxscramper> `fd -e nim | entr -rc nim r file.nim`
19:51:18FromDiscord<JSGRANT> doesn't look too bad; still something I want to be "hidden" from me though lol
20:01:45*JustASlacker joined #nim
20:02:15*JustASlacker quit (Max SendQ exceeded)
20:02:43*JustASlacker joined #nim
20:03:36FromDiscord<fwsgonzo> is there a helper function to construct a nim string from a cstring, len combo?
20:05:46FromDiscord<juan_carlos> $ stringify anything.
20:06:02FromDiscord<fwsgonzo> which involves a costly strlen
20:06:12FromDiscord<fwsgonzo> i already have the length
20:06:58*JustASlacker quit (Ping timeout: 246 seconds)
20:07:02FromDiscord<juan_carlos> newStringOfCap or NewString
20:18:48FromGitter<awr1> Potentially `$toOpenArray(input, 0, inputLen)`
20:18:55FromGitter<awr1> No wait
20:18:59FromGitter<awr1> uhhhhhhhhhhh
20:19:37FromGitter<awr1> that might just give you a stringified array, which is not the same thing
20:22:32mipriyou've got to copy anyway to get a Nim string. the strlen might not matter that much on top of that.
20:23:52FromGitter<awr1> https://github.com/nim-lang/RFCs/issues/70 is relevant
20:23:58disbot[Meta - RFC] The meaning of strings ; snippet at 12https://play.nim-lang.org/#ix=2KZb
20:26:13FromGitter<awr1> https://play.nim-lang.org/#ix=2KZd
20:26:24FromGitter<awr1> i.e. `var x = newString(cstrLen); moveMem(dest = addr x[0], source = unsafeAddr cstr[0], cstrLen); x`
20:27:16FromGitter<awr1> In general what mipri said is probably correct - the allocation is probably of bigger significance perf-wise than the strlen.
20:29:05*leorize quit (Quit: WeeChat 2.9)
20:29:53FromGitter<awr1> Also on REPLs i think REPLs are more interesting and usable when used in a more embedded context. Not embedded as in hardware, more embedded as in scripting language to a larger program
20:31:46*Gustavo6046 quit (Ping timeout: 272 seconds)
20:33:04*leorize joined #nim
20:39:38FromDiscord<eye contacts for nyagito komaeda> Hi, I'm new to nim (as of a few hours ago), and I have a couple questions, not a new programmer though
20:40:08*JustASlacker joined #nim
20:40:12FromDiscord<eye contacts for nyagito komaeda> but, are objects in nim basically structs in c? as long as I only use them for data and not procs?
20:40:59leorizeyes, objects are pretty much structs, though there are no field ordering guarantee (unless {.bycopy.} is used)
20:41:39leorize(but the compiler does not perform this optimization at the moment)
20:46:50FromDiscord<mratsim> I think there is a guarantee because otherwise alignof and offsetof and the exportc pragma and C API would be broken
20:46:51*JustASlacker quit (Ping timeout: 272 seconds)
20:47:37leorizethe spec specify no guarantee, and I think we are gonna have field reordering in the future
20:48:21leorize4raq said that he was gonna make {.bycopy.} the switch to disable that behavior for C compatibility
20:48:46leorizenote that reordering won't break `alignof` and `offsetof`
20:49:15Zevvso the reordering is solely for size optimization? basically, sort from big to small?
20:49:20Zevvas to fill the holes
20:49:26leorizeyea
20:49:34ZevvI think in practice, this will gain nada
20:49:53*Gustavo6046 joined #nim
20:50:08leorizewell there is a reason why we don't have it yet, but it can be useful and is a cheap optimization that pretty much everyone else is doing
20:50:11Zevvmy objects mostly contain refs, ints, strings. The only thing getting optimized would be bools
20:51:03FromDiscord<mratsim> exportc is important as well
20:51:10Zevvright
20:51:39FromDiscord<mratsim> It can gain if your object is over 64 bytes (a cache line) or an embedded.
20:51:59FromDiscord<mratsim> but in both case the developer will take great care to ensure optimizations
20:52:25*adnan338 joined #nim
20:52:28FromDiscord<Avatarfighter> is there a way to put the values of a sequence to variables? Example of what I mean is `var command, action = "ACTION hello world".split(' ', 1)` so that `command == "ACTION"` and `action == "hello world"`? Pretty sure no but I'm not sure.
20:52:35*adnan338 quit (Client Quit)
20:52:42leorize!repo unpack
20:52:43disbothttps://github.com/technicallyagd/unpack -- 9unpack: 11sequence/object unpacking/destructuring for nim 15 33⭐ 0🍴 7& 2 more...
20:52:45*adnan338 joined #nim
20:52:49FromDiscord<mratsim> also in practice you can optimize for size, which reorder does, or you can optimize for speed, and in that case you don't want to have the compiler reorder under your feet
20:53:19FromDiscord<mratsim> you want "hot data" at the start fo the object, and cold data at the end, which is what I do for Weave memory pool metadata.
20:53:52leorizeit should be overridable
20:54:04FromDiscord<mratsim> so I'd rather have a {.reorder.} pragma for those who wants autopacking, and the default stays as is
20:54:11FromDiscord<mratsim> autoreordering
20:54:12leorizeanyhow, we won't see this anytime soon :P but it's still a hole in the spec
20:54:29leorizerust do autoreordering and it seems to work well enough
20:54:45FromDiscord<mratsim> my only grip is with object variant
20:54:53FromDiscord<mratsim> put the damn tag at the end of the object
20:55:04leorizefrankly they have much better C interop story than we do :P
20:55:36FromDiscord<mratsim> if I have an object variant with say 4 uint64, I want them at the beginning of the object.
20:55:42FromDiscord<mratsim> for aligned access.
20:56:46*Privacy_Dragon quit (Quit: Konversation terminated!)
20:56:50FromDiscord<Avatarfighter> leorize: thanks that's exactly what I needed
21:00:13*JustASlacker joined #nim
21:02:17FromDiscord<eye contacts for nyagito komaeda> thanks, that answers my question
21:03:19FromDiscord<eye contacts for nyagito komaeda> also though, other than having to manually allocate and clear memory, are there any problems with using nim gc less?
21:03:55FromDiscord<eye contacts for nyagito komaeda> like, what if I want to use a package, does the package have to explictly support gc less? (manual memory management)
21:04:28FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=2KZm
21:05:03FromDiscord<fwsgonzo> (edit) "https://play.nim-lang.org/#ix=2KZm" => "https://play.nim-lang.org/#ix=2KZn"
21:05:36FromDiscord<mratsim> no
21:05:37leorizefwsgonzo: as long as you declare its signature to take cstring, it's fine
21:05:49FromDiscord<mratsim> C function don't know about Nim strings.
21:05:50FromDiscord<fwsgonzo> it does take a cstring, cint
21:05:51leorizethe pattern is used a lot within Nim's stdlib
21:06:23leorize@eye your biggest problem will be refs
21:06:23FromDiscord<fwsgonzo> alright, thanks - I have an issue somewhere I'm trying to root out, so I have to ask obvious things
21:06:49leorizeif they use refs then you can't free them
21:07:06leorizebut really, just use gc:arc or gc:orc, works better than gc:none and won't leak
21:07:29FromDiscord<eye contacts for nyagito komaeda> refs are just gc managed pointers right?
21:07:35leorizeyea
21:08:02leorizeand strings/seqs are backed by those as well, unless you use --gc:arc/orc
21:09:16FromDiscord<mratsim> "managed" is a big word since they never increment/decrease the refcount unless you use shalow copies.
21:09:37FromDiscord<mratsim> they have value semantics like C++ strings and vectors
21:10:21leorizewith arc/orc shallow copies no longer exist :P
21:10:52FromDiscord<mratsim> i would be surprised, Arraymancer rely on those
21:11:09leorizeif you need those use ref string
21:11:20leorizewe really just remove the hidden ref layer
21:11:54leorizeand if moving a string into ref string is also cheap now with `move()` optimizing away the copy
21:14:38FromGitter<awr1> Uhh
21:14:40FromGitter<awr1> weird thought
21:15:03FromDiscord<eye contacts for nyagito komaeda> alright, and out of curiosity, theres probably no way for me to just have it treat refs as ptrs right?
21:15:04FromGitter<awr1> nimvm/compile time execution always uses like the default nim gc right?
21:18:51leorizenimvm has its own gc :P
21:19:11leorize@eye nope, because then the library's code might leak
21:19:11disruptekhaha
21:19:20leorizebut why do you want to not use the gc?
21:20:39*jamesboehmer joined #nim
21:21:05*Arrrrrrrr quit (Quit: Arrrrrrrr)
21:21:08*cyraxjoe quit (Ping timeout: 260 seconds)
21:22:40*JustASlacker quit (Ping timeout: 258 seconds)
21:23:09*jamesboehmer quit (Quit: Textual IRC Client: www.textualapp.com)
21:24:02*neveranullday joined #nim
21:28:08*narimiran quit (Ping timeout: 260 seconds)
21:37:49*adnan338 quit (Quit: adnan338)
21:38:19*Jesin joined #nim
21:46:47disruptekFUD
21:46:49FromDiscord<mratsim> @eye contacts for nyagito komaeda you can use "foo[].addr", to convert a ref to a ptr
21:47:54FromDiscord<mratsim> with current ref scheme that's a no-op because ref directly points to the data,and ref metadata is intrusive but in the future it might become a fat pointer.
21:48:16leorizeand you won't be able to free it so whats the point?
21:50:36FromDiscord<mratsim> when you only need weak reference
21:50:49FromDiscord<mratsim> for example graph traversal
21:51:08FromDiscord<fwsgonzo> how to get everything after ": " (colon space) in a string?
21:51:34disrupteks[s.find(": ")..^1] ?
21:51:40FromDiscord<mratsim> @fwsgonzo not sure I can parse what you mean
21:52:05disruptekhe wants to GET IT
21:52:15FromDiscord<fwsgonzo> 200
21:54:23FromDiscord<fwsgonzo> that actually included the colon-space, but it gave me something to look for 🙂
21:54:36disruptekoh right.
22:05:01*greenfork quit (Ping timeout: 264 seconds)
22:06:59FromDiscord<fwsgonzo> does Nim have something like _ to discard return values?
22:07:19disruptekfrom tuple deconstruction? yes.
22:07:37FromDiscord<fwsgonzo> > Error: expression 'remote_call(do_login, uname)' is of type 'cstring' and has to be used (or discarded)↵just from that
22:07:47disruptektry `discard`.
22:07:55disruptek~manual
22:07:56disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
22:07:56disbotmanual: 11just good to Ctrl+F in cases like this
22:09:20*superbia joined #nim
22:09:39*superbia quit (Client Quit)
22:10:16FromDiscord<inv> @mratsim Hi, can you plz merge? https://github.com/status-im/nim-decimal/pull/4
22:10:16disbotmake the module gc:arc compatible
22:10:32leorizedisruptek: your testes give me a "compile failed" and I don't see any error messages
22:10:59leorizeother than 'Error: execution of an external program failed'
22:11:08disruptekyou get error messages in --define:release.
22:11:10FromDiscord<Avatarfighter> that sounds like a large message for testes
22:11:23FromDiscord<Avatarfighter> (edit) "a large message" => "alarge issue "
22:11:25FromDiscord<Avatarfighter> (edit) "alarge" => "a large"
22:11:36*taprack quit (Ping timeout: 240 seconds)
22:13:39FromDiscord<mratsim> @inv done
22:15:31FromDiscord<inv> thx
22:15:41FromDiscord<andeee> is my understanding correct that you use pointer for an opaque type and ptr when you know the type you're pointing to?
22:15:58disruptekbasically, yes.
22:16:34FromDiscord<inv> @mratsim can I publish it to nimble for the status-im repo somehow?
22:17:14*taprack joined #nim
22:18:17*Vladar quit (Remote host closed the connection)
22:19:22FromDiscord<eye contacts for nyagito komaeda> sorry for the late response, but really I just wanted to know the logistics of going gc less becuase I'm a masochist who wants to write as much stuff as I can my self
22:19:39FromDiscord<eye contacts for nyagito komaeda> that and understand as much about stuff as I can
22:20:01disruptekit buys you very little to do so, but you can always manage memory manually alongside any nim gc.
22:21:14mipriif you want to start with something functional and then gradually achieve masocism, just use --gc:arc and make use of manual allocation, and use --expandArc: to spot any sneaky copies.
22:22:51FromDiscord<eye contacts for nyagito komaeda> as for actually using a gc, arc is the most efficient/fastest right?
22:23:00disruptekyes.
22:23:21FromDiscord<eye contacts for nyagito komaeda> and, that nice that I have the option at least to manually memory manage
22:23:22FromGitter<awr1> @leorize I was just hoping that it had some sort of GC. Generally I don't think about optimizing compile time code that much...
22:23:38FromDiscord<eye contacts for nyagito komaeda> also, thanks for the tip mipri
22:24:48FromDiscord<eye contacts for nyagito komaeda> one last question though, is the only difference with orc vs arc the ability to recognize loops/cycles?
22:24:59mipriyes.
22:25:32FromDiscord<eye contacts for nyagito komaeda> when is that actually a problem?
22:26:04mipriyou mean, when is it a problem that orc has a cycle breaker?
22:26:30miprithe cycle breaker's costs aren't as predictable.
22:26:44leorizewhen you have a cyclic structure, like a doubly linked list
22:26:54disruptekorc's costs are predictable if you break the cycles yourself.
22:27:28FromGitter<awr1> Is there are anything like fileExists for compiletime
22:27:34disruptekyes.
22:27:50FromGitter<awr1> Besides using the shell utilities with gorge()
22:27:53qwrin other words, orc performance is unpredictable, when arc would leak memory? ;)
22:28:07*vsantana quit (Quit: vsantana)
22:28:16miprisure.
22:28:29leorizeunpredictable when cycles are involved, yes
22:28:46qwrdoesn't sound too bad :)
22:28:55disruptekit's what you want.
22:29:12leorize4raq's variant of havlak benchmark shows that it's not much slower than doing it by hand
22:29:16FromDiscord<inv> @mratsim I did publish from my repo to fix if something wrong with publish, unfortunately I am not decimal expert to support the lib
22:29:32FromDiscord<inv> (edit) "@mratsim I did publish from my repo to fix if something wrong with publish, unfortunately I am not decimal expert to support the lib ... " added "actively"
22:31:08FromDiscord<eye contacts for nyagito komaeda> I mean't more when do cycles ever come into play
22:31:27FromDiscord<eye contacts for nyagito komaeda> afaik I've never ran into anything in my time programing that loops in on it's self like that
22:31:43disruptekhow long have you been programming?
22:31:55disruptekjust since the semester started?
22:32:30FromGitter<awr1> Oh fileExists() just works at compiletime okay
22:33:14mipridoubly linked lists and cyclic graphs, but even a self-referential structure like a linked list *could* be cyclic, and only isn't due so far as code handles it correctly.
22:33:54FromDiscord<eye contacts for nyagito komaeda> try for about 6 years on and off again lol, though the first 3 years of that were strictly ruby and javascript (node.js)
22:33:59FromGitter<awr1> it can be easy to think "why would I ever need cycles" until you actually need them
22:34:17FromDiscord<inv> until async
22:37:19FromDiscord<mratsim> I think you can, people published laser on nimble even though it's not meant for general consumption 🤷
22:37:38FromDiscord<eye contacts for nyagito komaeda> I see now why doubly linked lists would be useful, but I've never actually used them directly
22:38:01FromDiscord<mratsim> @eye contacts for nyagito komaeda breaking cycles is necessary for any graph library
22:38:37FromDiscord<mratsim> also just look into any of the Swift questions about cycles, they don't have a cycle collector and are basically walking on hot embers.
22:40:31FromDiscord<eye contacts for nyagito komaeda> when you say graph, do you mean literally in the y=mx+b sense?
22:42:04FromDiscord<mratsim> no, like a tree, but that can have cycles
22:42:29FromDiscord<mratsim> things like this: https://en.wikipedia.org/wiki/Travelling_salesman_problem
22:43:12FromDiscord<mratsim> you described connected component as `type Node = object; connections: seq[Node]`
22:43:26FromDiscord<mratsim> and you can return to your starting point
22:43:52FromDiscord<mratsim> All social network analysis require graphs algorithms for example
22:47:05FromDiscord<eye contacts for nyagito komaeda> oooh, I get it now
22:47:52FromDiscord<eye contacts for nyagito komaeda> thanks for bearing with me lol
22:48:15disrupteki'm used to it; elegantbeef hangs out a lot in this channel.
22:48:47FromDiscord<Avatarfighter> elegantbeef slander 😈
22:49:44FromDiscord<eye contacts for nyagito komaeda> so, then, why wouldn't I just use orc?
22:49:52disruptekyou tell us.
22:50:12mipriif you don't care about cycles there's no need to use it.
22:50:23miprithis isn't a monumental decision. it's a compilation flag.
22:51:06mipriif you just want advice, pick --gc:orc because greenskins are cool.
22:51:19FromDiscord<eye contacts for nyagito komaeda> are there no penalties to using orc over arc?
22:51:44mipriorc is arc + a cycle breaker.
22:51:56mipriThe penalty is "it uses the cycle breaker"
22:52:04miprispeaking of cycles, this conversation.
22:52:25miprilet me just up-arrow a few times...
22:52:35mipriyou mean, when is it a problem that orc has a cycle breaker?
22:52:39miprithe cycle breaker's costs aren't as predictable.
22:53:02reversem3how can I break up this line ? let box1 = await client.execCommand("printf '\n%s' $(date +%Y-%m-%d); printf '\t\t%s' $(uname -n)")
22:53:10FromDiscord<mratsim> orc has no cost if a type cannot have cycles
22:53:15*tane quit (Quit: Leaving)
22:53:15FromDiscord<haxscramper> @eye contacts for nyagito komaeda Do you have any specific memory & performance requirements? If not, I would advise just going with defaults, since you can switch any time
22:54:53miprithere's not much you can do that line, reversem3. It's just a long string. You could construct the string across multiple lines if you want, or put a newline in it since bash won't care.
22:55:35reversem3yeah its more for readability to access everything with one tuple
22:55:50mipriyou could also use stdlib for time and a nimble package for the hostname
22:55:56reversem3otherwise my write statement is going to have alot of variables
22:56:17reversem3using ssh library though
22:58:08*krux02 joined #nim
23:00:14FromDiscord<eye contacts for nyagito komaeda> ah, alright yeah that makes sense
23:02:06FromDiscord<eye contacts for nyagito komaeda> sorry for repeating the question, ik it's not a big deal to change later on down the line but I usually want to learn the most efficient way first rather than have to switch later
23:02:35FromDiscord<eye contacts for nyagito komaeda> thanks for all the help though, easily the best programming discord I've been in so far 👍
23:02:51FromDiscord<eye contacts for nyagito komaeda> (/irc channel/glitter channel ect.)
23:09:48*radgeRayden quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
23:10:05*Sembei joined #nim
23:20:21*adnan338 joined #nim
23:20:30*adnan338 quit (Client Quit)
23:20:40*adnan338 joined #nim
23:23:54*xet7 quit (Quit: Leaving)
23:29:13*neveranullday quit (Quit: Textual IRC Client: www.textualapp.com)
23:32:58*letto joined #nim
23:41:00adnan338Hello, is it possible to embed an enum into a type?
23:41:02*lritter quit (Quit: Leaving)
23:41:02adnan338https://play.nim-lang.org/#ix=2L01
23:42:03miprihttps://play.nim-lang.org/#ix=2L03
23:42:37mipriyour assertion will work, minus the .Address, if you init ui with a column: Address
23:43:19adnan338ok I see. thanks
23:54:53saem(catching up here while I take a break) I miss vacation, I got to play with Nim all day.
23:55:12*jmiven quit (Quit: reboot)
23:55:55*jmiven joined #nim