00:04:05 | * | jmdaemon joined #nim |
00:06:49 | * | lucasta joined #nim |
00:23:12 | * | fallback joined #nim |
00:30:01 | FromDiscord | <nervecenter> In reply to @Evolver "I'm not the only": Literally what...I can faintly see it but you gotta stretch the hell out of something that abstract, says more about you than Andreas |
00:33:09 | FromDiscord | <bringmethemonke> Hello, sorry if I'm in the wrong channel. I discovered nim ~2018 and really love the language. I haven't used nim in a couple of years was looking to come back to it. It looks like nimgl has died since, so does anyone know of any good Vulkan bindings? IIRC I ended up leaving nim because it had almost no actively maintained libraries (for graphics/game dev) at the time. |
00:33:41 | FromDiscord | <bringmethemonke> (edit) "Hello, sorry if I'm in the wrong channel. I discovered nim ~2018 ... and" added "and joined here a year ago or so" |
00:35:19 | FromDiscord | <Elegantbeef> https://github.com/search?q=vulkan%20language%3Anim&type=repositories |
00:35:28 | FromDiscord | <bringmethemonke> Thank you |
00:35:53 | FromDiscord | <bringmethemonke> pffft its a bot. Maybe I should go to bed at a decent time for once lol |
00:36:42 | FromDiscord | <inventormatt> that's not an actual bot that's just a message from another server that is bridged to here |
00:37:34 | FromDiscord | <Elegantbeef> Well another platform |
00:37:42 | FromDiscord | <Elegantbeef> Atleast I don't think I'm a bot |
00:37:45 | FromDiscord | <bringmethemonke> Ah. Oh, yeah, I remember that now. Sorry, it's been a really long time since I've been here. Appreciate the help though. I guess I'll hold off on anything more here until I'm a bit more awake. |
00:38:11 | FromDiscord | <Elegantbeef> It's fine I'm hardly ever awake here |
00:38:58 | FromDiscord | <bringmethemonke> Haha, yeah, I know that how that feels for sure. Iirc, you helped me out a lot with learning nim. Not sure if you were the one that helped me with Opengl or not though. |
00:39:22 | FromDiscord | <bringmethemonke> (edit) "learning" => "improving at" |
00:40:13 | FromDiscord | <Elegantbeef> Unlikely if it was 2019/2018 π |
00:41:49 | FromDiscord | <bringmethemonke> Hmm, yeah. Just did a quick search through my old posts, looks like it wasn't. TBH, I'm not sure where I was for nim stuff back then. Looks like my first post here was in 2022 asking about OpenGL and generics. |
00:42:14 | FromDiscord | <bringmethemonke> Well, anyway, thanks for the help |
00:45:45 | FromDiscord | <bostonboston> Hey beef, I know you've had some experience c#, do you have any critiques of my recent forum post |
00:46:48 | FromDiscord | <Elegantbeef> So I'd suggest using `openArray` instead of `ptr UncheckedArray` |
00:46:58 | FromDiscord | <Elegantbeef> The benefit is this emits a `ptr UncheckedArray[T], len: int` |
00:48:38 | FromDiscord | <bostonboston> Like in the parameters? As in there's a hidden len passed to a function that takes an openArray |
00:48:46 | FromDiscord | <Elegantbeef> Yes |
00:49:09 | FromDiscord | <bostonboston> Interesting |
00:49:11 | FromDiscord | <Elegantbeef> `proc doThing(oa: openArray[T])` generates `oaData: ptr UncheckedArray[T], len: int` |
00:50:07 | FromDiscord | <Elegantbeef> I do not know much about unmanaged C# but everything seems fine |
00:55:35 | FromDiscord | <bostonboston> That's good to hear |
02:05:50 | FromDiscord | <cy_tek> sent a code paste, see https://paste.rs/MsQwk |
02:10:26 | FromDiscord | <cy_tek> I'm also trying to run this using `nimble run` in case that makes a difference to access the `pixels` library used from the Mastering Nim book π |
02:11:45 | FromDiscord | <Elegantbeef> Might be amd vs arm issue? |
02:12:07 | FromDiscord | <cy_tek> Like I said, it's not an m1 mac, It's an intel chip π |
02:12:49 | FromDiscord | <Elegantbeef> The library is named the same as the error provides? |
02:14:38 | FromDiscord | <cy_tek> libSDL2.dylib is an exact match for the name of what it's looking for. |
02:16:11 | FromDiscord | <Elegantbeef> You are sure those are amd libs? |
02:16:12 | FromDiscord | <cy_tek> sent a code paste, see https://paste.rs/CtDQL |
02:17:29 | FromDiscord | <cy_tek> In reply to @Elegantbeef "You are sure those": They should be, I'm able to use them just fine from other languages like Zig, but is there another way I should check? |
02:17:49 | FromDiscord | <Elegantbeef> If they work from another language they should be fine |
02:17:53 | FromDiscord | <Elegantbeef> Just wanted to make sure of that |
02:18:11 | FromDiscord | <Elegantbeef> I cannot help anymore than throwing darts from 300m away π |
02:18:39 | FromDiscord | <cy_tek> In reply to @Elegantbeef "I cannot help anymore": No worries man, thanks for trying to help π ! |
02:20:44 | FromDiscord | <Elegantbeef> That seems like a fix no? |
02:21:13 | FromDiscord | <michaelb.eth> sent a code paste, see https://paste.rs/oVecZ |
02:22:05 | FromDiscord | <Elegantbeef> What is that even supposed to do? |
02:22:56 | * | lucasta quit (Quit: Leaving) |
02:25:51 | FromDiscord | <cy_tek> In reply to @Elegantbeef "If they work from": So, I'm wondering if you know of the best way to report an issue? It turns out the code works just fine if I run `nimble build`, it finds the dylibs just fine with no issues. If I run it with `nimble run` though, it fails to find the libraries π€― |
02:26:20 | FromDiscord | <Elegantbeef> github |
02:26:27 | FromDiscord | <Elegantbeef> Think there is a repo for the book |
02:26:28 | FromDiscord | <Elegantbeef> No clue |
02:26:40 | FromDiscord | <cy_tek> Awesome, thanks man, have a good one! |
02:26:47 | FromDiscord | <michaelb.eth> In reply to @Elegantbeef "What is that even": not sure, but I saw it "in the wild" re: nim-package-directory |
02:27:14 | FromDiscord | <Elegantbeef> Well it should be `(result.a, result.b, _, _) = ...` but that does compile so uhhh |
02:27:18 | FromDiscord | <michaelb.eth> it's the first thing the compiler fails on when trying to do `nim c -r package_directory.nim`, when using Nim devel |
02:28:04 | FromDiscord | <michaelb.eth> https://github.com/FedericoCeratto/nim-morelogging/blob/master/morelogging.nim#L199 |
02:31:25 | FromDiscord | <Elegantbeef> Seems like devel changed/broke unpacking so an issue might be required |
03:37:59 | * | edr quit (Quit: Leaving) |
04:16:37 | nmz | can someone give me an example of using multiReplace? |
04:18:22 | FromDiscord | <Elegantbeef> `"aabbcc".multiReplace({"a": "b", "c": "d"})` |
04:19:11 | nmz | thanks |
04:19:22 | nmz | wait, I don't need to re"blah" ? |
04:19:35 | nmz | isn't pattern a Regex...!? |
04:19:48 | FromDiscord | <Elegantbeef> there is a `strutils` and `regex` |
04:21:17 | nmz | what do you mean by that? |
04:21:31 | FromDiscord | <Elegantbeef> there are two multireplaces |
04:22:52 | nmz | ... lol I was using the std/re version |
04:23:31 | FromDiscord | <Elegantbeef> Yea don't use regex it's not good for your health |
04:26:20 | nmz | does it offer any dis/advantages? |
04:26:31 | FromDiscord | <Elegantbeef> It's regex that's it |
04:27:48 | nmz | stdutils does mention which is the pattern and what the replacement is |
04:27:57 | nmz | does not |
04:28:18 | nmz | but I'll stop using std/re, thanks for the help |
04:28:50 | FromDiscord | <Elegantbeef> Well I just dislike regex |
04:29:44 | nmz | I'm coming from lua so worrying about groups and matching is just infuriating |
04:31:07 | FromDiscord | <Elegantbeef> Unless you need pattern matching skip out on regex libraries |
04:36:50 | nmz | what are you recommending instead? looping through the string using items() ? |
04:39:36 | FromDiscord | <Elegantbeef> Depends what you want to do |
05:45:19 | * | Guest16 joined #nim |
05:47:27 | * | Guest16 quit (Client Quit) |
05:48:20 | * | rockcavera quit (Remote host closed the connection) |
06:41:44 | * | kenran joined #nim |
06:53:06 | * | fallback quit (Ping timeout: 268 seconds) |
07:02:29 | * | fallback joined #nim |
07:06:31 | * | advesperacit joined #nim |
08:21:29 | FromDiscord | <graveflo> ok beef, if you are still here I am looking at some code that you committed to the compiler source and I'm scratching my head. `procTypeRel` calls `getProcConvMismatch` and that returns `isConvertible` sometimes.. what does that actually mean, that a `proc` may be convertible to another `proc`? |
08:36:00 | * | PMunch joined #nim |
08:58:46 | FromDiscord | <Elegantbeef> @graveflo consider `proc(){.gcsafe.}` to `proc()` |
08:59:52 | FromDiscord | <Elegantbeef> Actually that's for `proc(){.nimcall.}` -\> `proc(){.closure.}` |
09:00:07 | FromDiscord | <graveflo> the one I am looking at is `proc foo[B](x: int)` to `proc (x: int)`. I suppose it means that the back end could technically make it work even though they are slightly different. Kinda like how ranges can be convertible or numbers with some extra logic |
09:00:11 | FromDiscord | <Elegantbeef> nimcall and non annotated implicitly converts to `closure` variations |
09:01:01 | FromDiscord | <Elegantbeef> Right |
09:01:09 | FromDiscord | <Elegantbeef> Atleast I think so |
09:01:44 | * | PMunch_ joined #nim |
09:02:13 | FromDiscord | <graveflo> alright. I'm just going to have to think about this more. The back end hates `foo[B](x: int)` when it is never actually instantiated go figure π Not sure what to do but I think that your thing is not the problem |
09:02:20 | FromDiscord | <Elegantbeef> To be clear I did not really write that code as much as clean it up a tinge |
09:02:28 | FromDiscord | <graveflo> gotcha |
09:02:44 | FromDiscord | <Elegantbeef> Wait what are you trying to make work? |
09:04:36 | * | PMunch quit (Ping timeout: 252 seconds) |
09:05:19 | FromDiscord | <graveflo> there is some fancy code that tries to find the correct operand to pass to a function when the symbol is a choice. It does some `typeRel` esque stuff to see if it can narrow the decision down to one operand. The problem is that it does overload resolution on the operands during that process which makes no sense because the operand itself is not a call site and has no operands of it's own. Apparently making it stop that can also make it c |
09:06:31 | FromDiscord | <graveflo> because `isConverible` > `isNone` but that doesn't mean you are in the clear to chose the symbol. There has to be some check that I should insert somewhere idk |
09:07:17 | FromDiscord | <Elegantbeef> Is there a small code example? |
09:09:45 | FromDiscord | <graveflo> there might be a way to trigger it without the PR code but I only found this from the CI so I dont know about that yet |
09:10:42 | FromDiscord | <graveflo> sent a code paste, see https://paste.rs/Zn7Wl |
09:12:18 | FromDiscord | <graveflo> oh wait it's because I removed the unresolved check but I did that to make macros work so I probably have to just alter that so `untyped` can accept them but nothing else |
09:16:40 | FromDiscord | <graveflo> ah crap, it looks like that was it.. now look like an idiot. I guess just talking about it helps sometimes |
09:17:37 | FromDiscord | <Elegantbeef> Quack quack quack |
09:29:50 | PMunch_ | Is there a rubber duck emoji? |
09:30:12 | FromDiscord | <graveflo> π¦ best I could do |
09:55:29 | * | PMunch_ is now known as PMunch |
10:18:58 | NimEventer | New post on r/nim by momoPFL01: Followup on Nim Treesitter support in Neovim, see https://reddit.com/r/nim/comments/18csls9/followup_on_nim_treesitter_support_in_neovim/ |
12:01:02 | * | PMunch_ joined #nim |
12:02:38 | * | PMunch quit (Ping timeout: 256 seconds) |
12:02:58 | * | PMunch_ is now known as PMunch |
12:21:52 | FromDiscord | <hmmm4m> I want my 10 minutes back :nim1: |
12:23:44 | FromDiscord | <hmmm4m> sent a code paste, see https://paste.rs/GC4Dt |
12:24:33 | FromDiscord | <griffith1deadly> In reply to @hmmm4m "err guys in 2.0.0": latest devel? |
12:24:39 | FromDiscord | <hmmm4m> yepyep |
12:24:54 | FromDiscord | <hmmm4m> on playground |
12:35:23 | FromDiscord | <griffith1deadly> In reply to @hmmm4m "on playground": don't see that in https://play.nim-lang.org/ |
12:41:10 | FromDiscord | <griffith1deadly> oh i misread first message |
12:42:20 | FromDiscord | <hmmm4m> sent a code paste, see https://paste.rs/LJTHB |
12:47:56 | * | dvbst joined #nim |
12:58:29 | PMunch | hmmm4m, create an issue on GitHub, that must be a mistake |
12:58:47 | FromDiscord | <hmmm4m> sent a code paste, see https://paste.rs/Sd6iH |
13:00:51 | * | dvbst quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
13:01:58 | FromDiscord | <ringabout> Well, it's the new type mismatch errors, which are more concise and readable at the expense of some accurate diagnoses |
13:03:13 | FromDiscord | <ringabout> `--legacy:verboseTypeMismatch` is an option if you prefer the old one |
13:05:37 | FromDiscord | <odexine> i can see how its more concise but i dont think many people would describe this as more readable |
13:10:40 | PMunch | Yeah I've had to stare at that message a bit too long a couple of times myself to realise what was wrong |
13:11:16 | * | systemonia joined #nim |
13:12:04 | FromDiscord | <ringabout> It appears to me that it's relatively more readable than the old one |
13:19:49 | systemonia | If I wanted to use this for every compilation ever, would putting "--legacy:verboseTypeMismatch" as-is in the nim.cfg file work? |
13:20:12 | PMunch | I like the new numbered thing, but it should add back the hint that it didn't match because it was not var |
13:22:16 | PMunch | Maybe something as simple as: https://paste.rs/5d1qT.txt |
13:22:40 | PMunch | Man, ix.io is _still_ down.. Might have to replace it with paste.rs on the playground.. |
13:24:25 | FromDiscord | <ringabout> See also https://forum.nim-lang.org/t/9514 |
13:24:32 | FromDiscord | <ringabout> And https://github.com/nim-lang/RFCs/issues/87 |
13:25:37 | FromDiscord | <nnsee> actually PMunch i've been thinking of setting up a paste service (written in nim) for the playground |
13:25:40 | FromDiscord | <nnsee> if you're interested? |
13:26:00 | PMunch | Oh, that'd be great! |
13:26:15 | FromDiscord | <nnsee> probably write it over this weekend |
13:26:19 | PMunch | It was always a bit dodgy with the ix.io TOS to have that button there |
13:26:49 | PMunch | I mean it says you can't have automated uploads, so I figured that having to press a button didn't count as automated |
13:28:13 | FromDiscord | <nnsee> mine will have no such terms for the nim playground specifically :p |
13:28:38 | PMunch | Perfect! |
13:29:11 | PMunch | ringabout, I really like the added proposals of chancyk and doofenstein in the forum as well |
13:29:29 | PMunch | Pulling the mismatched type out like that makes it so much easier to spot what's wrong |
13:29:52 | PMunch | But I think something like what I showed, where it gives some kind of hint that it's the var type specifically not matching would be a nice benefit |
13:31:01 | PMunch | Could even be a general purpose "extra" field which could contain other messages |
13:31:19 | PMunch | As a general feedback though the new format is much nicer than the old one |
13:31:55 | PMunch | I wonder if it would be possible to somehow include information about mismatching converters.. |
13:52:28 | * | derpydoo joined #nim |
13:56:09 | FromDiscord | <srabb> nim |
13:56:45 | FromDiscord | <bostonboston> nim |
13:56:55 | FromDiscord | <michaelb.eth> not NIM |
14:04:38 | * | rockcavera joined #nim |
14:19:00 | FromDiscord | <piqueiras> quick curiosity about performance, is it bad if I define a const inside a proc or is the compiler able to handle it |
14:20:38 | FromDiscord | <odexine> bad for what kind of performance? consts are inlined so ...? |
14:21:43 | FromDiscord | <piqueiras> I mean if every time I call the function it does something to it or only the 1st time |
14:22:13 | * | gooba quit (Remote host closed the connection) |
14:22:32 | * | gooba joined #nim |
14:24:54 | FromDiscord | <piqueiras> but I mean you could define the const outside of the function, it would be the same then |
14:25:19 | FromDiscord | <odexine> sent a code paste, see https://paste.rs/0ry9O |
14:25:32 | FromDiscord | <odexine> yes indeed, consts are computed on compile time so there will not be a runtime cost aside from evaluating the result |
14:26:19 | FromDiscord | <odexine> that last part i mention would be the same whether defined inside or outside a proc, at least to my perception it would be |
14:39:07 | * | edr joined #nim |
14:44:38 | FromDiscord | <piqueiras> cool |
15:12:54 | * | PMunch quit (Quit: Leaving) |
15:28:47 | NimEventer | New Nimble package! moveiterators - Special iterators that use move semantics, see https://github.com/sls1005/moveiterators |
15:32:17 | * | systemonia quit (Quit: Konversation terminated!) |
15:36:55 | * | azimut quit (Ping timeout: 240 seconds) |
16:15:49 | NimEventer | New thread by Charles: Is it possible to encode constraints directly into a type, and enforce them at runtime?, see https://forum.nim-lang.org/t/10744 |
16:36:11 | * | kenran quit (Remote host closed the connection) |
17:48:17 | * | krux02 joined #nim |
17:51:00 | FromDiscord | <.bobbbob> In reply to @odexine "yes indeed, consts are": a const in a function would only be usable in that function due to scope right? |
18:27:53 | * | krux02 quit (Remote host closed the connection) |
20:09:07 | * | PMunch joined #nim |
20:13:39 | * | azimut joined #nim |
20:30:58 | PMunch | AoC stream is live: https://www.twitch.tv/pmunche https://www.youtube.com/watch?v=o8tAFmCFfF4 |
20:54:12 | FromDiscord | <cy_tek> sent a long message, see https://paste.rs/84HZg |
20:54:53 | * | fallback quit (Ping timeout: 240 seconds) |
20:56:48 | FromDiscord | <ieltan> In reply to @cy_tek "Hey everyone, I hope": I think `GC_unref() / GC_ref()` are what you need |
20:57:05 | FromDiscord | <ieltan> Assuming `--mm:arc/orc` |
20:57:57 | FromDiscord | <cy_tek> In reply to @ieltan "I think `GC_unref() /": Awesome! thanks so much, I'll look into those functions π And yup, I'm using --mm:orc (the default now I believe for Nim 2.0) |
20:59:42 | FromDiscord | <demotomohiro> In reply to @cy_tek "Hey everyone, I hope": Put the text in a string that exists while external library is refering it.β΅And dont change the length of that string while external library is refering it. |
21:01:32 | FromDiscord | <ieltan> Also fwiw `string -> cstring` is zero cost, but `cstring -> string` is not, and you should definitely not use `cast` for these conversions |
21:02:44 | FromDiscord | <ieltan> Well, not directly, it's more tricky to go back to `string` because it need more information |
21:03:09 | FromDiscord | <ieltan> Surely someone more knowledgeable can send some input about it :p |
21:04:36 | FromDiscord | <cy_tek> That all makes sense, thanks @demotomohiro and @ieltan for the extra input π I freaking love how helpful and awesome the Nim community is. Just started using it and the community and language itself is blowing my mind with how awesome it is. |
21:04:58 | FromDiscord | <cy_tek> (edit) "it" => "Nim" |
21:05:59 | FromDiscord | <cy_tek> Been programming for 14 years, and this feels different in a really good way! |
21:06:03 | FromDiscord | <ieltan> Nim is by far the most pleasing language to interact with C imo, so many little things take make doing a usually bothersome task a good time |
21:06:17 | FromDiscord | <ieltan> Hope you'll discover that on your own π |
21:06:39 | FromDiscord | <cy_tek> In reply to @ieltan "Hope you'll discover that": I'm sure I will in the very near future! |
21:07:47 | FromDiscord | <Phil> Yes I know inheritance on non ref-object types, these types are mere data vehicles between callbacks, they're not actually used for logic |
21:07:56 | FromDiscord | <Phil> (edit) "logic" => "logic, so that shouldn't be the issue" |
21:08:41 | FromDiscord | <ieltan> Hmm, I don't use inheritance much so I don't know much to be able to say where you went wrong unfortunately |
21:09:00 | FromDiscord | <ieltan> (edit) "much" => "enough" |
21:09:09 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/vTyHF |
21:09:23 | FromDiscord | <ieltan> In reply to @isofruit "Hmm... so I have": Does it at least say the line where it blows up? |
21:09:42 | FromDiscord | <Phil> The invocation trying to instantiate AppContext |
21:10:01 | FromDiscord | <Phil> It's blowing upp explicitly after `let x = AppContext[AdwAppConfig]` |
21:10:07 | FromDiscord | <Phil> (edit) "upp" => "up" |
21:10:19 | FromDiscord | <systemonia> Are there any good tutorials for trying to learn meta programming in Nim? All the common google results are too complex for me |
21:10:21 | FromDiscord | <ieltan> My guess is that you're trying to use the `AppConfig` as a type class to constraint the generic and the type system doesn't like that |
21:10:34 | FromDiscord | <ieltan> (edit) "My guess is that you're trying to use the `AppConfig` ... as" added "object" |
21:10:58 | FromDiscord | <Phil> The thing is I've used inheritance like that before... though on ref-type inheritance and on generic procs rather than generic types |
21:11:01 | FromDiscord | <ieltan> And my uneducated guess is that `ref` object doesn't matter here |
21:13:18 | FromDiscord | <ieltan> I wonder why you're using inheritance (runtime type info) to express compile time type info, probably what you want is closer to type states. @Phil |
21:13:48 | FromDiscord | <Phil> Not out of my own volition, I am contributing to other peoples code π |
21:14:15 | FromDiscord | <Phil> What the author wanted to express in thsi case was that AppConfig has a bunch of fields. AdwAppConfig has exactly the same fields and a couple more as it is an extension of AppConfig |
21:14:38 | FromDiscord | <Phil> You can use one if you don't use GTK's libadwaita, with reduced featureset, and the other if you do want to use it |
21:15:08 | FromDiscord | <ieltan> In reply to @pengwyns "Are there any good": I learned reading and hacking other people macros |
21:15:25 | FromDiscord | <Phil> So it was mostly the extensibility aspect and expressing the interdependence, as any field/feature on AppConfig should be possible with AdwAppConfig etc. |
21:15:32 | FromDiscord | <ieltan> I'm sure there were a couple blog posts about it but I can't find them and I recall they weren't very deep in it anyways |
21:16:19 | FromDiscord | <ieltan> In reply to @ieltan "I learned reading and": (and also using `std/macros` ast debugging utilities I guess) |
21:19:53 | FromDiscord | <ieltan> In reply to @isofruit "What the author wanted": You should maybe tell the author to use case objects instead of this weird inheritance dance lol |
21:20:38 | FromDiscord | <ieltan> Would make it a lot more easier to contribute to it and extend |
21:20:39 | FromDiscord | <Phil> I mean, it's a data vehicle used between literally like 3 procs, the amount of logic resting on this doesn't really warrant bothering π |
21:21:10 | FromDiscord | <Phil> And a case object actually would not work well, as you'd be moving adwaita code that should be split out into an adwaita module into the gtk module |
21:21:39 | FromDiscord | <ieltan> Stolen from beef |
21:22:04 | FromDiscord | <Phil> THat makes no sense, what is State? TypeState? |
21:22:21 | FromDiscord | <Phil> The third line reads like tautology |
21:22:35 | FromDiscord | <ieltan> lol lemme pull my computer I'm on my phone |
21:23:41 | FromDiscord | <ieltan> sent a code paste, see https://paste.rs/eE4EU |
21:29:18 | FromDiscord | <ieltan> alright |
21:29:36 | FromDiscord | <ieltan> yeah actually this wont work, i just noticed the `config: T` |
21:29:40 | FromDiscord | <ieltan> scrap that |
21:49:25 | * | eery quit (Ping timeout: 268 seconds) |
21:55:42 | * | eery joined #nim |
21:58:47 | FromDiscord | <ieltan> sent a code paste, see https://paste.rs/83HDv |
21:59:25 | FromDiscord | <ieltan> hm |
21:59:27 | FromDiscord | <ieltan> hold on |
22:04:07 | FromDiscord | <ieltan> In reply to @ieltan "<@180601887916163073> closest that can": Actually this doesn't even work, bummer |
22:10:08 | * | PMunch quit (Quit: leaving) |
22:16:01 | * | Onionhammer quit (Quit: Ping timeout (120 seconds)) |
22:16:19 | * | Onionhammer joined #nim |
23:00:40 | FromDiscord | <piqueiras> If I have 2 custom implementations of compare, is there a way for sort in algorithm to sort using both? |
23:01:03 | FromDiscord | <piqueiras> That is first sort using cmp1 and in values which have the same result, sort under cmp2 |
23:02:47 | FromDiscord | <Elegantbeef> the second parameter |
23:08:25 | FromDiscord | <piqueiras> huh? |
23:08:40 | FromDiscord | <piqueiras> like I know in sort you can use your own cmp |
23:08:51 | FromDiscord | <piqueiras> but to sort, then group and then sort every group |
23:09:09 | FromDiscord | <Elegantbeef> The second parameter of `sort` allows you to specify your own compare |
23:10:28 | FromDiscord | <piqueiras> yes but I want 2 different own compares |
23:10:38 | FromDiscord | <Elegantbeef> I just showed you how |
23:10:46 | FromDiscord | <piqueiras> oo |
23:10:59 | FromDiscord | <Elegantbeef> Compare first with cmp1 then compare with cmp2 if you have a equal compare |
23:11:07 | FromDiscord | <piqueiras> yea okay you put cmp2 inside cmp1 |
23:11:19 | FromDiscord | <Elegantbeef> Not really I made cmp3 |
23:11:34 | FromDiscord | <piqueiras> tttttrue |
23:11:52 | FromDiscord | <piqueiras> oh well its actually cool that way now that I notice |
23:12:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/kU48s |
23:19:10 | FromDiscord | <bostonboston> Is there a way to get the CPU architecture at runtime |
23:26:36 | * | derpydoo quit (Ping timeout: 245 seconds) |
23:35:20 | FromDiscord | <Elegantbeef> Why do you need it at runtime? |
23:35:22 | FromDiscord | <Elegantbeef> `hostCpu` is there for you |
23:37:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/GnIH5 |
23:44:08 | FromDiscord | <bostonboston> Thanks |
23:44:25 | FromDiscord | <bostonboston> Also, anyone happen to know of a good example of a hybrid nimble library |
23:47:15 | FromDiscord | <Elegantbeef> Nico |
23:50:55 | FromDiscord | <bostonboston> And does `nimble sometask -someflag` forward the flag |