00:04:59 | FromDiscord | <Chronos [She/Her]> Huh? |
00:05:10 | FromDiscord | <Chronos [She/Her]> That is the first thing I see lol |
00:05:40 | FromDiscord | <Elegantbeef> Huh? |
00:08:29 | FromDiscord | <Chronos [She/Her]> Simd accelerated string finding |
00:09:01 | FromDiscord | <Chronos [She/Her]> What usecases is SIMD useful for anyway? |
00:09:17 | FromDiscord | <Elegantbeef> Speeding up any operation that you're doing that simd can do 😄 |
00:09:30 | FromDiscord | <Elegantbeef> It's a collection of hardware extensions so there is no 1 answer |
00:10:14 | FromDiscord | <Elegantbeef> Many of them are aimed at speeding up floating point calculations |
00:11:42 | FromDiscord | <Chronos [She/Her]> Ah so specifically working with floats as a whole? |
00:11:52 | FromDiscord | <Elegantbeef> I mean that's not the whole purpose |
00:12:02 | FromDiscord | <Elegantbeef> There are simd extensions for a variety of operations |
00:12:22 | FromDiscord | <Elegantbeef> Using simd for string find isnt actually daft and is a mild way of speeding up finding on a string |
00:13:44 | termer | simd means Single Instruction Multiple Data |
00:13:58 | FromDiscord | <Elegantbeef> https://www.officedaytime.com/simd512e/ |
00:13:58 | termer | If there's a SIMD instruction that works with the data you want to process to do what you want, use it |
00:14:31 | FromDiscord | <Chronos [She/Her]> Oh huh |
00:14:54 | FromDiscord | <Chronos [She/Her]> So then an example of one way it could be used is game dev for handling physics for example? |
00:15:20 | FromDiscord | <Elegantbeef> If you can find a way to use simd there, sure |
00:15:31 | termer | I have no examples |
00:15:36 | FromDiscord | <Chronos [She/Her]> Neat |
00:15:38 | termer | but you can probably find them |
00:15:43 | FromDiscord | <Chronos [She/Her]> Fair |
00:15:45 | FromDiscord | <Elegantbeef> The thing with simd operations is they're very very specific with a purposeful use case |
00:15:53 | FromDiscord | <Chronos [She/Her]> Makes sense |
00:17:16 | FromDiscord | <Elegantbeef> The premise is that the operation on the large list that you load/unload from is faster than doing it independantly |
00:17:29 | FromDiscord | <Elegantbeef> So it's not like you can just wildly throw simd at problems and it turns out faster |
00:26:00 | FromDiscord | <Chronos [She/Her]> Ah |
00:26:01 | FromDiscord | <Andreas> In reply to @Elegantbeef "So it's not like": exactly, and thats why esp. this talk demonstrates the applied-usage of SIMD - in contrast to the more theoretic-lectures i've found earlier. String-finds and such, that you can find in SIMDJson. My guy sorts things in registers 🙂 |
00:26:15 | FromDiscord | <Chronos [She/Her]> SIMDJson- |
00:29:27 | FromDiscord | <that_dude.> Can someone please help me with concepts? https://play.nim-lang.org/#ix=4E7R Is there anything wrong with this code, as in why it wouldn't compile? I'm getting a type mismatch for `C.ready()`, but not for `C.other()` Is this another naming issue where for whatever reason I can't use the proc name ready? |
00:30:09 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=4E7T |
00:30:12 | FromDiscord | <Elegantbeef> As always a mixin issue |
00:30:31 | FromDiscord | <Elegantbeef> https://www.jasonbeetham.com/writeups/codereuse.html I didnt link this now I realise |
00:31:32 | FromDiscord | <that_dude.> I thought those are already know though? |
00:31:52 | FromDiscord | <Elegantbeef> `mixin` forces the compiler to look at both declaration and instantiation |
00:31:53 | FromDiscord | <heysokam> how do you define an array of 4 elements, where 3 of them are empty?↵not seq, fixed sized array 🤔 |
00:32:06 | FromDiscord | <Elegantbeef> also do not do `Type[T: Bleh] = seq[T]` that makes no sense |
00:32:25 | FromDiscord | <that_dude.> Because we know that `EventContainer` must hold a `ValidEvent` which because it's concepts says so |
00:32:27 | FromDiscord | <Elegantbeef> `[default T, default T, default T, bleh]` |
00:32:40 | FromDiscord | <Elegantbeef> Sure but `seq[T]` is an alias not a distinct type |
00:32:43 | FromDiscord | <that_dude.> That was probably a remnant of me trying to figure out what I was having issues with |
00:32:46 | FromDiscord | <heysokam> In reply to @Elegantbeef "`[default T, default T,": isnt' `default cstring` the same as saying `""`? |
00:32:57 | FromDiscord | <heysokam> i need them to be truly empty, not "" |
00:33:11 | FromDiscord | <Elegantbeef> So i can just pass an `seq[int]` in |
00:33:11 | FromDiscord | <Elegantbeef> Yes you didnt say it was a cstring |
00:33:11 | FromDiscord | <Elegantbeef> nil if it's a cstring |
00:33:24 | FromDiscord | <Elegantbeef> default cstring is actually `nil` |
00:33:27 | FromDiscord | <heysokam> oh |
00:36:27 | termer | cstring is a pointer |
00:36:32 | FromDiscord | <Elegantbeef> Ah actually it seems that a alias does not lose it's constraint |
00:36:39 | FromDiscord | <Elegantbeef> So I guess that's fine |
00:37:07 | FromDiscord | <Elegantbeef> Look at this guy writes a string library then thinks he's an authority on the matter! 😛 |
00:38:31 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4E7U |
00:38:42 | FromDiscord | <Elegantbeef> `cstring(nil), nil, nil, nil]` |
00:38:53 | FromDiscord | <Elegantbeef> As long as the first one is typed the others will fall in place |
00:39:25 | FromDiscord | <Elegantbeef> also not using `cstring"..."` shame on you |
00:39:54 | FromDiscord | <heysokam> i can't, because vulkan crashes |
00:39:57 | termer | I know everything about strings now, that's simply the case |
00:39:59 | FromDiscord | <Elegantbeef> What |
00:40:06 | termer | I've become an authority |
00:40:07 | termer | simple as |
00:40:26 | termer | Pointers? Buffers? Null-termination? I've got it all |
00:40:43 | FromDiscord | <heysokam> In reply to @Elegantbeef "What": empty array, failed if not typed. string array? needed to be cstring. array with `[""]`... validation error and crashed |
00:40:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4E7V |
00:41:01 | FromDiscord | <Elegantbeef> What are you even talking about |
00:41:13 | * | xaltsc_ joined #nim |
00:41:20 | FromDiscord | <heysokam> well an error i got that didn't understand |
00:41:31 | FromDiscord | <heysokam> i just had to hardcode the size like that and then it worked |
00:41:41 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4E7W |
00:41:45 | FromDiscord | <heysokam> k |
00:41:49 | FromDiscord | <Elegantbeef> The first parameter of the array has to be typed |
00:41:55 | FromDiscord | <Elegantbeef> Thats how Nim's array literals work |
00:42:02 | FromDiscord | <Elegantbeef> If the first is typed the rest are inferred |
00:42:12 | * | xaltsc quit (Ping timeout: 246 seconds) |
00:42:21 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4E7X |
00:44:00 | FromDiscord | <heysokam> how do `array[0..Limit, Type]` arrays work? |
00:44:23 | FromDiscord | <Elegantbeef> The same as `array[Limit, T]` cause that's what they compile to |
00:44:50 | FromDiscord | <Elegantbeef> Arrays allow a range type as the first parameter, Nim implicitly converts arrays to range indexed |
00:45:05 | FromDiscord | <Elegantbeef> So `array[0..3, cstring] is array[4, cstring]` |
00:45:20 | FromDiscord | <Elegantbeef> but `array[-1..2, cstring] isnot array[4, cstring]` |
00:52:28 | FromDiscord | <heysokam> ic |
00:52:57 | FromDiscord | <heysokam> can you do `var arr :array[4, cstring] = []`? |
00:53:15 | FromDiscord | <heysokam> basically, that's what i would ideally need 🤔 |
00:54:12 | FromDiscord | <that_dude.> Thanks for both the link and the help Beef, but I'm still wondering why `other` worked but `ready` didn't. Is this a compiler bug that I should report? |
00:54:39 | FromDiscord | <that_dude.> I'll use the mixin like you recomended anyways |
00:54:55 | FromDiscord | <that_dude.> This is more of a follow up thing now |
00:55:00 | FromDiscord | <that_dude.> (edit) "This is more of a follow up thing now ... " added "for me" |
00:55:14 | FromDiscord | <Elegantbeef> `arr = default(array[4, cstring])` |
00:55:44 | FromDiscord | <heysokam> In reply to @Elegantbeef "`arr = default(array[4, cstring])`": yeah, but sometimes I need to pass `["AnActualValue"]` to the `=` |
00:55:56 | FromDiscord | <Elegantbeef> Nim doesnt have shortcuts for array literals |
00:56:05 | FromDiscord | <Elegantbeef> Make a macro or find the one I posted eons ago |
00:56:33 | FromDiscord | <heysokam> what could i search for? i don't remember seeing that |
00:56:44 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/10037#66190 |
00:57:42 | FromDiscord | <Elegantbeef> In your case it'd be `makeArr(4, "Bleh", ...nil)` |
00:57:46 | FromDiscord | <heysokam> leyendary. that's exactly what I was trying to make with a generic function 🙈 |
00:58:19 | FromDiscord | <Elegantbeef> Hmmmm you might be able to do this with a generic |
00:58:29 | * | azimut joined #nim |
00:59:34 | FromDiscord | <heysokam> yeah but im failing rn, so was searching for the easier alternative |
00:59:49 | FromDiscord | <Elegantbeef> I more meant that inquistiively |
01:00:28 | FromDiscord | <heysokam> i understood that last sentence the least 🙈 |
01:01:24 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4E82 |
01:01:27 | FromDiscord | <heysokam> but have 3 versions, and some don't really work |
01:02:22 | FromDiscord | <Elegantbeef> Nothing there should not work really |
01:03:55 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4E83 |
01:04:05 | FromDiscord | <heysokam> i had this one hardcoded... but... yeah |
01:11:29 | FromDiscord | <Elegantbeef> So odd, apparently a `cstring(nil)` at compile time gets emitted to a string that points to `"\0"` |
01:13:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4E84 |
01:13:28 | FromDiscord | <Elegantbeef> Using procedures is simple enough |
01:13:41 | FromDiscord | <Elegantbeef> And when you want custom spread you can use `spread = bleh` |
01:16:34 | FromDiscord | <heysokam> ty ✍️ |
01:23:06 | FromDiscord | <ShalokShalom (ShalokShalom)> https://codeberg.org/ShalokShalom/add-and-friends |
01:23:07 | FromDiscord | <ShalokShalom (ShalokShalom)> @Phil\: We were speaking about abstract naming. This is the result of my personal madness \:D |
01:35:15 | * | xet7 quit (Remote host closed the connection) |
03:54:28 | FromDiscord | <terrygillis> I'm feeling like I'm being trolled by the Nim compiler again because now suddenly I cannot find the output exe file with `nim c file.nim` and `nim c -r file.nim` just output hints and `....................` and then immediately exits |
03:55:09 | FromDiscord | <terrygillis> but this time it's not resolving itself after a few attempts and computer restarts like previous hiccups |
03:55:18 | FromDiscord | <Elegantbeef> Any user configs being loaded? |
03:56:09 | FromDiscord | <terrygillis> sent a code paste, see https://play.nim-lang.org/#ix=4E8t |
03:56:43 | FromDiscord | <terrygillis> (edit) "https://play.nim-lang.org/#ix=4E8t" => "https://play.nim-lang.org/#ix=4E8u" |
03:57:24 | FromDiscord | <Elegantbeef> If those are the only two it makes no sense for this behaviour |
03:57:37 | FromDiscord | <Elegantbeef> does `nim --outDir:./ file.nim` work? |
03:59:27 | FromDiscord | <terrygillis> nope |
03:59:51 | FromDiscord | <Elegantbeef> throw a `-f` in there |
04:01:44 | FromDiscord | <terrygillis> the peculiar thing is that it still outputs the exe files for other nim files in the same folder except for this particular one (which doesn't even appear in the nimcache folder) |
04:02:09 | FromDiscord | <terrygillis> In reply to @Elegantbeef "throw a `-f` in": it doesn't work 😭 |
04:02:21 | FromDiscord | <Elegantbeef> This doesnt make any sense `--listcmd` then |
04:02:39 | FromDiscord | <Elegantbeef> It might be a compiler crash |
04:02:59 | FromDiscord | <Elegantbeef> Actually yea it's a compiler crash |
04:03:05 | FromDiscord | <Elegantbeef> so build a debug compiler and use that to compile it |
04:06:02 | FromDiscord | <terrygillis> I tried changing that file's name and still nothing shows up in the nimcache folder. I guess it has something to do with code in that file but I can't find out why. |
04:06:28 | FromDiscord | <Elegantbeef> Use a debug compiler to hunt the bug |
04:06:33 | FromDiscord | <terrygillis> In reply to @Elegantbeef "so build a debug": How do I do that? |
04:06:46 | FromDiscord | <terrygillis> compile from source? |
04:07:11 | FromDiscord | <Elegantbeef> Yea |
04:08:14 | FromDiscord | <Elegantbeef> Or thereabouts |
04:08:18 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4E8x |
04:48:00 | FromDiscord | <terrygillis> thanks I found out the problematic from the souce compiled compiler |
04:48:29 | FromDiscord | <Elegantbeef> Nice now min repro and make an issue 😛 |
04:49:18 | FromDiscord | <terrygillis> It's my fault and not the compiler's really, but an error message instead of shutting itself down would have been useful |
04:49:28 | FromDiscord | <Elegantbeef> What'd you do? |
04:49:39 | * | cm_ joined #nim |
04:50:32 | * | cm quit (Ping timeout: 240 seconds) |
04:50:32 | * | cm_ is now known as cm |
04:50:44 | FromDiscord | <terrygillis> It turns out I used a template instead of proc when there's recursion. Just changing one word `template` to `proc` solved everything. |
04:51:37 | FromDiscord | <terrygillis> But still, an error message instead of quietly die would have saved tons of time debugging it |
04:51:46 | FromDiscord | <terrygillis> (edit) "die" => "dying" |
04:53:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4E8I |
04:55:17 | FromDiscord | <terrygillis> somehow the compiler doesn't show anything at all and the debug compiler says some thing like `too nested call` without mentioning it's from a template, but that's enough to guide me to the right solution |
04:59:01 | FromDiscord | <Elegantbeef> You likely somehow bypass the check |
06:21:55 | * | advesperacit joined #nim |
07:01:32 | * | PMunch joined #nim |
07:46:48 | FromDiscord | <yaarb> How do i convert a `string` to a `seq[byte]` ? ( like []byte(string) in go |
07:48:17 | FromDiscord | <Elegantbeef> There is not much reason to |
07:48:55 | FromDiscord | <Elegantbeef> you can do `str.toOpenArrayByte(0, str.high)` for any proc that takes a `openArray[byte]`, or put a `@` in front to copy to a new sequence |
07:49:11 | FromDiscord | <Elegantbeef> You also can technically cast to a `seq[byte]` but that's unsafe so do not do that |
07:50:44 | * | PMunch_ joined #nim |
07:51:03 | * | PMunch quit (Killed (NickServ (GHOST command used by PMunch_))) |
07:51:11 | * | PMunch_ is now known as PMunch |
07:51:21 | FromDiscord | <odexine> In reply to @yaarb "How do i convert": just curious, for what? answers are already above by beef |
07:52:33 | * | PMunch_ joined #nim |
07:52:41 | * | PMunch quit (Killed (NickServ (GHOST command used by PMunch_))) |
07:52:41 | FromDiscord | <yaarb> i think a try to emulate the way i do stuff in go ... maybe not a good idea |
07:52:47 | * | PMunch_ is now known as PMunch |
07:52:49 | FromDiscord | <yaarb> (edit) "a" => "i" |
08:11:18 | * | azimut quit (Remote host closed the connection) |
08:11:44 | * | azimut joined #nim |
08:18:25 | * | rockcavera quit (Remote host closed the connection) |
08:22:52 | * | grasek joined #nim |
08:23:00 | grasek | Is Nim the future? |
08:23:21 | PMunch | In that case the future is now! |
08:24:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @grasek "Is Nim the future?": Yeah, it's the future! |
08:31:56 | NimEventer | New Nimble package! margrave - dialect of Markdown in pure Nim with focus on HTML output, see https://github.com/metagn/margrave |
08:36:56 | NimEventer | New Nimble package! rtmidi - Nim bindings for RtMidi, a cross-platform realtime MIDI input/output library., see https://github.com/stoneface86/nim-rtmidi/ |
08:36:57 | NimEventer | New Nimble package! reed_solomon - Library to encode and decode data using Reed-Solomon correction codes., see https://github.com/lscrd/Reed-Solomon |
09:29:16 | * | grasek quit (Read error: Connection reset by peer) |
09:36:33 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4E9w |
09:45:28 | PMunch | Huh? |
09:45:51 | PMunch | You probably don't want to cast to uint by the way |
09:45:58 | PMunch | That's a recipe for disaster |
09:46:45 | * | azimut quit (Ping timeout: 246 seconds) |
09:49:52 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "You probably don't want": It's intentionnal↵so if the position is negative, it warps to positive↵I avoid an extra modulo |
09:50:25 | PMunch | Well that doesn't do what you think it does I believe |
09:50:41 | PMunch | !eval echo cast[uint](-1) |
09:50:44 | NimBot | 18446744073709551615 |
09:50:57 | PMunch | !eval echo cast[uint](-2) |
09:51:00 | NimBot | 18446744073709551614 |
09:51:31 | FromDiscord | <System64 ~ Flandre Scarlet> So I was right↵it underflows and this is what I want |
09:52:00 | PMunch | Eh, if that's what you want sure |
09:52:24 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "Eh, if that's what": This is for a tilemap, and it warps around |
09:52:34 | PMunch | You're question was a bit strange though, why does using a modulo go slower than using a modulo? |
09:53:12 | FromDiscord | <odexine> the question is why does manually doing if ...: smth -= smth (manually wrapping) go slower than using modulo |
09:53:33 | PMunch | Is it? |
09:53:40 | PMunch | The question I mean |
09:53:44 | FromDiscord | <odexine> yes |
09:53:50 | PMunch | The reason it's slower is because of branching |
09:54:12 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4E9A |
09:54:27 | FromDiscord | <odexine> are you timing that correctly? |
09:54:31 | FromDiscord | <odexine> 0 nanoseconds reads wrong |
09:54:46 | PMunch | Haha, yeah 0 nanoseconds is a but suspect |
09:54:49 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4E9B |
09:57:52 | PMunch | Switched to using monotimes: https://play.nim-lang.org/#ix=4E9C |
09:59:11 | PMunch | By the way, why do you just add stuff in a loop? |
09:59:22 | PMunch | Wouldn't it be much faster to just drop the loop entirely? |
10:00:37 | FromDiscord | <System64 ~ Flandre Scarlet> I'm trying algorithms for warping around a tilemap/bitmap |
10:00:54 | PMunch | That code doesn't do anything more than `(posX + swidth) mod mapLen` does it? |
10:01:18 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4E9D |
10:01:33 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "That code doesn't do": Yeah, I try my algorithms for my graphics engine in a smaller scale |
10:27:01 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4E9I |
10:28:01 | FromDiscord | <heysokam> I'm making a new type, and writing tests for it, so I want to be certain that the conversions are actually doing what they should under the hood, so `==` can be sketchy with type conversion sometimes |
10:29:44 | * | PMunch_ joined #nim |
10:32:14 | * | PMunch quit (Ping timeout: 246 seconds) |
10:33:16 | * | PMunch__ joined #nim |
10:35:32 | * | PMunch_ quit (Ping timeout: 240 seconds) |
10:40:02 | FromDiscord | <odexine> In reply to @heysokam "is there a better": this might compare padding bits which may not be equal between the two but will not influence the visible values of that type |
10:40:43 | FromDiscord | <heysokam> In reply to @odexine "this might compare padding": how would padding bits look like on numerical types? |
10:41:06 | FromDiscord | <odexine> if they are not structs then they wont have padding |
10:41:25 | FromDiscord | <heysokam> ah maybe I can just say `not object` in the generic then |
10:41:25 | FromDiscord | <odexine> In reply to @heysokam "how would padding bits": wdym? |
10:42:20 | FromDiscord | <heysokam> In reply to @odexine "wdym?": i was thinking about numerical types only, didn't consider the case of structs (which you were) |
10:42:52 | FromDiscord | <odexine> okay |
10:45:04 | FromDiscord | <heysokam> is there an existing way to get the bitrepr of a type as a string? |
10:45:23 | FromDiscord | <heysokam> i know about `toHex` |
10:46:06 | FromDiscord | <heysokam> (edit) "is" => "~~is" | "string?" => "string?~~↵sry found it right after https://nim-lang.org/docs/strutils.html#toBin%2CBiggestInt%2CPositive" |
10:55:14 | * | PMunch_ joined #nim |
10:57:44 | * | PMunch__ quit (Ping timeout: 252 seconds) |
11:47:52 | FromDiscord | <pk.kyle> sent a code paste, see https://play.nim-lang.org/#ix=4E9V |
11:48:11 | FromDiscord | <pk.kyle> im on windows and nim 2.0.0 |
11:48:56 | PMunch_ | Maybe use `--gc:refc` if you don't need ORC for anything in particular |
11:49:42 | FromDiscord | <pk.kyle> works now! thanks! |
11:51:22 | FromDiscord | <heysokam> how do you expres `5 elevated to -524` in nim's float notation? |
11:52:50 | PMunch_ | 5.pow(-524)? |
11:53:05 | PMunch_ | !eval import math; echo 5.pow(-524) |
11:53:07 | NimBot | Compile failed: /usercode/in.nim(1, 20) Error: ambiguous call; both math.pow(x: float32, y: float32) [func declared in /playground/nim/lib/pure/math.nim(627, 8)] and math.pow(x: float64, y: float64) [func declared in /playground/nim/lib/pure/math.nim(628, 8)] match for: (int literal(5), int literal(-524)) |
11:53:20 | PMunch_ | !eval import math; echo 5.0.pow(-524) |
11:53:24 | NimBot | 0.0 |
11:53:41 | FromDiscord | <heysokam> In reply to @PMunch_ "!eval import math; echo": right, but that's just `0f_1`.... why pow when its just a 1 bit active float? |
11:53:44 | PMunch_ | Hmm, seems to be too small a number |
11:54:03 | FromDiscord | <heysokam> yeah its probably the smallest possible i imagine |
11:54:18 | PMunch_ | float.low then maybe? |
11:54:42 | * | PMunch_ is now known as PMunch |
11:54:50 | FromDiscord | <heysokam> sure, but then i have the problem. how do i express the next check? `0b_10` |
11:55:02 | FromDiscord | <heysokam> meaning as a float, ofc |
11:55:07 | FromDiscord | <heysokam> its also gonna be really smalkl |
11:55:09 | FromDiscord | <heysokam> (edit) "smalkl" => "small" |
11:56:22 | PMunch | I have no idea what you're trying to do |
11:56:40 | PMunch | Could always cast a binary number |
11:56:55 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4E9X |
11:58:23 | FromDiscord | <jviega> I'm also trying to understand. Why would you be doing that? You remember the intricacies of IEEE 754 and write out your bit patterns?? |
11:58:52 | FromDiscord | <jviega> What are you really trying to accomplish?? |
11:58:55 | FromDiscord | <heysokam> In reply to @jviega "I'm also trying to": im just trying to check for the first few bits in particular |
11:59:22 | FromDiscord | <heysokam> In reply to @jviega "What are you really": a deterministic fixed point math library, that does not crash on float-to-fixed conversion without knowing why |
11:59:37 | FromDiscord | <heysokam> so im just making sure that the things im casting do make sense, before i continue |
12:00:19 | Amun-Ra | casting or .union. |
12:02:25 | Amun-Ra | https://play.nim-lang.org/#ix=4Ea0 |
12:03:30 | FromDiscord | <heysokam> yeah casting works. i was just trying to understand nim's float syntax for `NeVAL` numbers |
12:03:46 | FromDiscord | <heysokam> (edit) "`NeVAL`" => "`Ne-Exp`" |
12:04:02 | * | jmdaemon quit (Ping timeout: 260 seconds) |
13:16:58 | * | rockcavera joined #nim |
14:00:16 | * | PMunch quit (Quit: Leaving) |
14:05:01 | FromDiscord | <System64 ~ Flandre Scarlet> Does someone know how I can require a local package please? https://media.discordapp.net/attachments/371759389889003532/1143183981903360010/image.png |
14:05:54 | FromDiscord | <odexine> Do you plan on publishing either packages |
14:05:57 | FromDiscord | <odexine> (edit) "packages" => "packages#" |
14:06:00 | FromDiscord | <odexine> (edit) "packages#" => "package" |
14:07:18 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Do you plan on": No, it's a package required by both client and server↵It contains stuff that is used by both, so I put thoses common stuff inside |
14:10:20 | FromDiscord | <System64 ~ Flandre Scarlet> Even absolute paths don't seems to work |
14:13:20 | FromDiscord | <jviega> You're "requiring" the github URL of the common code? |
14:13:57 | FromDiscord | <System64 ~ Flandre Scarlet> sent a long message, see http://ix.io/4Eaw |
14:14:33 | FromDiscord | <System64 ~ Flandre Scarlet> and the nimble in server requires common |
14:16:06 | FromDiscord | <System64 ~ Flandre Scarlet> Oh, it has to be a git repo |
14:22:15 | FromDiscord | <jviega> That's the way that definitely works |
14:22:32 | FromDiscord | <jviega> There's also "nim develp" but I've never gotten that to work very well |
14:47:36 | FromDiscord | <heysokam> In reply to @sys64 "Oh, it has to": it can also take `requires "file://../common"` |
14:48:13 | FromDiscord | <heysokam> or a `config.nims` file that says `--path:"../common"` |
14:48:47 | FromDiscord | <odexine> In reply to @heysokam "it can also take": I’ve never heard of that, huh |
14:49:01 | FromDiscord | <heysokam> In reply to @odexine "I’ve never heard of": atlas does it, thought it should be compatible |
14:49:11 | FromDiscord | <heysokam> never heard of it either, just saw it testing atlas |
14:49:17 | FromDiscord | <odexine> It might not be compatible for nimble |
14:49:24 | FromDiscord | <heysokam> oh |
14:49:58 | FromDiscord | <heysokam> well it adds it to the nimble file, so I guess that's atlas saying "its either me or him, pick one" |
14:50:15 | FromDiscord | <heysokam> (edit) "one"" => "one. cant have it all"" |
14:51:54 | FromDiscord | <ShalokShalom (ShalokShalom)> https://diataxis.fr/ |
14:52:19 | * | xet7 joined #nim |
15:08:41 | * | azimut joined #nim |
15:10:55 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "or a `config.nims` file": And in the config.nims, can I do a script that copy some files such as DLLs ? |
15:13:06 | FromDiscord | <heysokam> In reply to @sys64 "And in the config.nims,": I would personally take a good look at `heysokam/confy` if you need to configure the buildsystem to do system admin↵I tried already with nimscript, and it gets messy and limiting super fast. With confy you have a proper (self auto-built) executable running the show |
15:13:28 | FromDiscord | <heysokam> I had similar requirements in a project, and I never got rid of them until I ported it to confy |
15:13:48 | FromDiscord | <heysokam> to answer the question, a `config.nims` file is just nimscript, so yeah I figure it can |
15:13:57 | FromDiscord | <heysokam> (edit) "can" => "can. ive never tried though" |
15:14:42 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "to answer the question,": Will take a look to confy↵Btw, should the nims be in src folder, or same folder as the nimble file? |
15:15:08 | FromDiscord | <heysokam> i personally store it in the root of where the file being built is |
15:15:18 | FromDiscord | <heysokam> so if its a test, is in the `tests` folder, and such |
15:15:52 | FromDiscord | <heysokam> the prject setup with `nimble init thefolder` has that setup basically |
15:15:57 | FromDiscord | <heysokam> you can take a look at how its made |
15:20:48 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4EaO |
15:23:11 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4EaP |
15:23:29 | FromDiscord | <heysokam> you need `--outdir:out` and `-o:server.exe` |
15:25:09 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "you need `--outdir:out` and": -o is undeclared |
15:26:34 | FromDiscord | <heysokam> In reply to @sys64 "-o is undeclared": https://nim-lang.org/docs/nimc.html https://media.discordapp.net/attachments/371759389889003532/1143204500065226925/image.png |
15:26:48 | FromDiscord | <heysokam> try --out, maybe it doesn't know the -o one |
15:26:52 | FromDiscord | <griffith1deadly> In reply to @sys64 "-o is undeclared": try --o:"" or --out:"" |
15:26:54 | FromDiscord | <heysokam> happened with -d to me some times |
15:27:05 | FromDiscord | <heysokam> (edit) "happened with -d to me some times ... " added "inside the .nims config" |
15:27:17 | FromDiscord | <heysokam> (edit) removed ".nims" |
15:28:03 | FromDiscord | <griffith1deadly> In reply to @heysokam "happened with -d to": why did you stop supporting nassimp? that would be really cool.. |
15:28:28 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "https://nim-lang.org/docs/nimc.html": Even that doesn't put the exe in out |
15:29:22 | FromDiscord | <heysokam> In reply to @griffith1deadly "why did you stop": because i moved on into `ngltf` which is much better than interoperating with cpp↵there is still https://github.com/beef331/nimassimp, mine was a fork of that to make it static. but their buildsystem is a mess, and interop with tens of unchecked arrays is a pain in the A |
15:29:49 | FromDiscord | <heysokam> (edit) "their" => "the assimp" | "mess," => "mess (as in really complex)," |
15:30:25 | FromDiscord | <heysokam> In reply to @sys64 "Even that doesn't put": 🤷♂️ no clue, i always write tasks for that type of functionality |
15:30:42 | FromDiscord | <heysokam> better if its expressed right there in the `nimble tasks` feature, than being hidden in a config file |
15:30:47 | FromDiscord | <heysokam> at least in my view |
15:30:57 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "🤷♂️ no clue, i": and is it possible to do tasks only after compilation? |
15:31:00 | FromDiscord | <griffith1deadly> In reply to @heysokam "because i moved on": do you plan to make support for gltf2? or vrm files |
15:31:05 | FromDiscord | <heysokam> In reply to @sys64 "and is it possible": yeah |
15:31:21 | FromDiscord | <heysokam> `afterBuild: echo "Hello After"` |
15:31:31 | FromDiscord | <heysokam> or even `afterMyCustomTask: ...` |
15:31:47 | FromDiscord | <heysokam> In reply to @griffith1deadly "do you plan to": gltf2 is the only file format supported |
15:31:50 | FromDiscord | <heysokam> i don't know what vrm files are |
15:32:19 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "`afterBuild: echo "Hello After"`": Undeclared too |
15:32:23 | FromDiscord | <griffith1deadly> https://github.com/assimp/assimp/issues/2096↵vrm based on gltf2 format |
15:33:14 | FromDiscord | <heysokam> In reply to @griffith1deadly "https://github.com/assimp/assimp/issues/2096 vrm ba": if its -really- based on gltf truly, then you should be able to access the common parts of the file without issues |
15:33:37 | FromDiscord | <heysokam> my reader just ignores extensions currently, so I figure that file format must be a custom set of extensions |
15:33:52 | FromDiscord | <heysokam> (edit) "so" => "and" | "extensions" => "extensions, which means it -might- read them" |
15:34:20 | FromDiscord | <heysokam> (edit) "extensions" => "gltf-extensions" |
15:34:27 | FromDiscord | <heysokam> (edit) "gltf-extensions" => "gltf-spec-extensions" |
15:36:54 | FromDiscord | <heysokam> @griffith1deadly if this is true, then -all- of the vrm data is contained inside the data that `ngltf` will give you in memory↵just that the metadata will be contained as json inside the respective sections, and you will need to implement those parts https://media.discordapp.net/attachments/371759389889003532/1143207104115654706/image.png |
15:37:51 | * | tiorock joined #nim |
15:37:52 | * | tiorock quit (Changing host) |
15:37:52 | * | tiorock joined #nim |
15:37:52 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
15:37:52 | * | tiorock is now known as rockcavera |
15:38:07 | FromDiscord | <heysokam> (edit) "you" => "their buffer data contained in the buffers read from the file glb↵you" | "their buffer data contained in the buffers read from the file glb↵youwill ... needto" added "just" | "willjustneed to implement those parts ... https://media.discordapp.net/attachments/371759389889003532/1143207104115654706/image.png" added "to access them" |
15:38:51 | * | azimut quit (Ping timeout: 246 seconds) |
15:39:35 | FromDiscord | <heysokam> only exception would be if they implemented their buffers as a separate binary blob inside the glb... in that case I don't read that, I only read the json and buffer1 blocks |
15:39:40 | FromDiscord | <heysokam> (edit) "blocks" => "blob" |
15:40:53 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#ix=4EaU |
15:42:41 | FromDiscord | <user2m> I know you can use fieldPairs but it loks like u have to instatiate the object before you can iterate over the fields |
15:43:04 | * | syl quit (Quit: C-x C-c) |
15:44:38 | FromDiscord | <odexine> Just make the object then? for fieldName, field in Foo().fieldPairs:... |
15:47:32 | * | syl joined #nim |
15:48:18 | FromDiscord | <user2m> Hmm yeah that's what i've been doing but I thought there would a more direct way. if it work it works. |
16:12:59 | FromDiscord | <fabricio> how many spaces do yall use to indent nim code? I use 2 spaces but the code becomes hard to read when a file grows into hundreds of lines of code so I'm thinking of switching to 4 |
16:14:19 | FromDiscord | <odexine> most people do 2 |
16:14:26 | FromDiscord | <odexine> if it is hard for you, then go with 4 |
16:15:40 | FromDiscord | <Phil> I tend to just split stuff up when a file goes into the hundreds of jubes |
16:15:48 | FromDiscord | <Phil> (edit) "jubes" => "lines" |
16:16:19 | FromDiscord | <Phil> 200 lines tends to be around the time where that thought starts tickling me for a given module |
16:17:56 | FromDiscord | <heysokam> In reply to @fabricio "how many spaces do": if the file grows into hundreds, you have a bigger architectural problem than 2 spaces, imo |
16:18:09 | FromDiscord | <heysokam> nim has proper modules, its not C/C++ |
16:32:13 | FromDiscord | <jviega> Yeah I still use 2, but do end up making indentation mistakes that would be easier to avoid w/ 4 spaces (or braces which I do not care about 🙂 |
16:36:25 | FromDiscord | <nervecenter> In reply to @fabricio "how many spaces do": I write it just like Python, 4 spaces and camel_case |
16:36:58 | FromDiscord | <nervecenter> (edit) "camel_case" => "snake_case" |
16:37:07 | FromDiscord | <nervecenter> I've never liked less than 4 spaces in any language, and I haven't liked camelCase in a loooooong time |
16:37:25 | FromDiscord | <nervecenter> Totally fine with kebab-case though, I like lisps |
16:37:49 | FromDiscord | <jviega> Yeah, the problem is I try to stick to 80 columns because I'm old and 4 spaces with nim seems to leave me with too much weird wrapping |
16:38:23 | FromDiscord | <nervecenter> Careful but liberal use of Nim's punctuation-newline rule is good |
16:40:53 | FromDiscord | <jviega> I do that too, but it's not always the most readable thing either, depends on the circumstances. |
16:42:59 | FromDiscord | <jviega> For instance, if I've got a block of sequential lets, I want the names lined up, the types lined up if I feel it's important for clarity, and the assignments lined up. Wrapping in that world sucks, and it uses 80 cols pretty past if you name things well. |
16:45:07 | * | xet7_ joined #nim |
16:45:08 | * | xet7_ quit (Remote host closed the connection) |
16:45:43 | * | xet7 quit (Remote host closed the connection) |
16:49:03 | * | xet7 joined #nim |
16:54:57 | FromDiscord | <fabricio> In reply to @heysokam "if the file grows": yeah, I probably should split it up :p |
16:56:43 | FromDiscord | <fabricio> also I'm asking because I'm trying to put that thin line that appears at the begining of every block of indentation and with 2 spaces they look very crammed up |
16:58:02 | FromDiscord | <Phil> I tend to go for 2 lines because I very often want to have 2 code-views side by side, so I tend like my lines too long |
16:58:12 | FromDiscord | <Phil> And for me that grants enough visual separation |
16:59:12 | * | lucasta_ quit (Ping timeout: 256 seconds) |
16:59:23 | FromDiscord | <heysokam> In reply to @fabricio "also I'm asking because": ive seen 4spaces used around. its not the common thing, but its seen often enough i would say |
16:59:29 | FromDiscord | <heysokam> (edit) "thing," => "thing in nim," |
16:59:46 | * | mal`` quit (Ping timeout: 260 seconds) |
17:01:18 | FromDiscord | <jviega> For the FFI, if I'm returning a C "whatever_t " where that's actually an unchecked array, if the nim type decl is a ref type, then the return value should be an UncheckedArray[NimWhatever]? Or is a ptr to one? I can obviously experiment but if anyone knows off the top of my head (trying to make things a bit more natural on top of Futhark output) |
17:15:57 | FromDiscord | <odexine> its not wrong to use, no one (~~worth listening to~~) will flame you for using 4 spaces |
17:23:09 | FromDiscord | <duskhorn> sent a long message, see http://ix.io/4Ebb |
17:28:09 | FromDiscord | <jviega> I'm not a windows person by try this: `https://stackoverflow.com/questions/9507184/can-openssl-on-windows-use-the-system-certificate-store` |
17:28:28 | FromDiscord | <saint._._.> Anyone know how to get tree-parser to work with neovim for nim |
17:28:35 | FromDiscord | <jviega> You can bring a whole store with you, or pin the cert if it's just one cite. |
17:28:52 | FromDiscord | <saint._._.> It says it's installed but the syntax highlighting isnt working for nim |
17:29:13 | FromDiscord | <saint._._.> (edit) "nim" => "nim? It says it's installed but the syntax highlighting isnt working for nim. I'm using https://github.com/aMOPel/tree-sitter-nim" |
17:30:19 | FromDiscord | <duskhorn> In reply to @jviega "I'm not a windows": This feels so weird to do by myself honestly, can't the openssl library do it by itself or is there an issue? |
17:32:22 | FromDiscord | <heysokam> is there any way I could assign a type from a `{.strdefine.}` at compile time?↵something like the user gives me `-d:DefinedType:int32` and i do `type MyType = DefinedType` so it becomes an int32↵i figure it should be a macro, maybe? 🤔 |
17:32:29 | * | mal`` joined #nim |
17:33:53 | FromDiscord | <arathanis> In reply to @heysokam "is there any way": that sounds right to me, yeah |
17:33:56 | FromDiscord | <arathanis> probably using `bindSym` |
17:38:22 | FromDiscord | <duskhorn> In reply to @duskhorn "I don't know where": someone help me think here↵it seems like I need to "ship" a certificate file with my app. ↵Can I somehow "mbed" a .pem file into mi executable?↵If not, do I need to make an installer? |
17:40:23 | FromDiscord | <jviega> Why do you need to ship a cert?? That is not true in the slightest. |
17:41:04 | FromDiscord | <duskhorn> then I don't understand how to solve my problem XD |
17:41:13 | FromDiscord | <jviega> The link I gave you the question was about using the windows-native cert store. They could just install OpenSSL on Windows would do the same thing. Or, you could carry around a whole cert store, but seems daft. |
17:41:50 | FromDiscord | <arathanis> In reply to @duskhorn "then I don't understand": is the issue that his machine does not have an SSL cert set up? |
17:42:08 | FromDiscord | <arathanis> Lots of http clients by default won't allow non-secure requests unless you specifically enable it. |
17:42:16 | FromDiscord | <duskhorn> In reply to @arathanis "is the issue that": probably? I'm gonna ask him |
17:42:33 | FromDiscord | <arathanis> if he has not done something like let's encrypt i imagine a request to have that kind of error |
17:42:41 | FromDiscord | <arathanis> (edit) "let's encrypt" => "Let's Encrypt" |
17:42:50 | FromDiscord | <arathanis> (edit) "to" => "would" |
17:43:10 | FromDiscord | <jviega> Not if it works from another machine to the same server |
17:43:23 | FromDiscord | <duskhorn> In reply to @arathanis "Lots of http clients": I mean. I used this↵https://nim-lang.org/docs/httpclient.html |
17:43:28 | FromDiscord | <jviega> That error indicates it's not finding the local cert store |
17:43:43 | FromDiscord | <jviega> That it GOT a cert but can't validate it |
17:43:47 | FromDiscord | <arathanis> In reply to @jviega "Not if it works": If the URL is hard coded as an external URL it will still go over the internet and fail even if its technically on localhost |
17:44:30 | FromDiscord | <jviega> It's not going to give an error about no cert when you don't make a TLS connection |
17:44:31 | FromDiscord | <duskhorn> I had the same error at first, I did this and it got fixed↵https://github.com/nim-lang/nimble/issues/904#issuecomment-808376364 |
17:44:49 | FromDiscord | <arathanis> @duskhorn look at this section: https://nim-lang.org/docs/httpclient.html#sslslashtls-support |
17:45:36 | FromDiscord | <arathanis> you might only need `var client = newHttpClient(sslContext=newContext(verifyMode=CVerifyNone)))` |
17:45:39 | FromDiscord | <jviega> Yes, that is saying the same thing, you need to make sure OpenSSL (which nim is using) has root CA information so it can validate. |
17:45:57 | FromDiscord | <arathanis> i don't recommend it but if that fixes it its beacuse your friend's server is not SSL secured. |
17:45:58 | FromDiscord | <jviega> You can copy them in yourself, hook up to the windows one, or whatever |
17:46:01 | FromDiscord | <arathanis> pretty common issue. |
17:48:37 | FromDiscord | <arathanis> if that does not fix it, jtv's suggestion to bundle a cert is probably the right way. |
17:49:06 | FromDiscord | <jviega> That wasn't my suggestion at all. |
17:49:22 | FromDiscord | <jviega> Nor should you do CVerifyNone, that's a horrible idea |
17:49:44 | FromDiscord | <arathanis> oh you meant root certs |
17:50:05 | FromDiscord | <arathanis> In reply to @jviega "Nor should you do": im not saying its the right thing to do, im saying try it and if it fixes it then you know whats happening and can now approach the situation. |
17:50:08 | FromDiscord | <arathanis> (edit) "situation." => "situation correctly." |
17:50:12 | FromDiscord | <jviega> I said do it right, either use the Windows cert store or install a root CA store if it's too hard |
17:50:27 | FromDiscord | <jviega> I'd pin a cert before I'd turn off TLS |
17:50:38 | FromDiscord | <jviega> Tho that's much easier to do in OpenSSL3 than in 2 |
17:51:10 | FromDiscord | <arathanis> if their friends server has no SSL certs for the endpoint hes pinging you can get these kinds of errors. im merely suggesting using that very small change to see if that is the cause or not |
17:51:20 | FromDiscord | <arathanis> narrowing down the issue is classic troubleshooting |
17:51:38 | FromDiscord | <arathanis> actually turning SSL off as a solution is big no |
17:51:40 | FromDiscord | <arathanis> (edit) "actually turning SSL off as a solution is ... big" added "a" |
17:51:56 | FromDiscord | <duskhorn> I'm disabling the verify so far, tho I don't think this is the issue |
17:52:21 | FromDiscord | <arathanis> then it probably needs the root cert of your friends server so it can verify |
17:52:41 | FromDiscord | <arathanis> like jtv was sasying. either install the root certs of their vendor or pin the proper cert |
17:53:39 | FromDiscord | <jviega> OpenSSL and Windows both ship with a trusted store of root certs. Shouldn't have to install anything else unless they've self-signed, which isn't likely, given if they had, they'd presumably know how to install their self-signed cert |
17:55:24 | FromDiscord | <duskhorn> It still doesn't work. I don't understand what I need to do right now tbh lol |
17:56:18 | FromDiscord | <duskhorn> you said something about root certs, is it something on my app's end, my friend's pc or his sevrer? |
17:56:21 | FromDiscord | <duskhorn> (edit) "sevrer?" => "server?" |
17:56:34 | FromDiscord | <jviega> If he can hit the URL in a browser w/o error then it's going to be the link I posted you or install the OpenSSL roots |
17:57:20 | FromDiscord | <arathanis> when you connect to your friends server, there is an SSL handshake where certificates are exchanged. Your app uses the built-in cert store on the device to verify the cert from the server. Our current assumption is the machine running the application and pinging the server is failing to verify your friend's server's certificate. |
17:57:21 | FromDiscord | <jviega> It's a bit of both. If your friends' server has the openssl store installed, then your app will work. Otherwise your app needs to use the windows one (I think that link I gave you) or drop off the OpenSSl store. |
17:57:25 | FromDiscord | <duskhorn> we can both hit the url with no errors |
17:57:37 | FromDiscord | <arathanis> cert issues are the best |
17:58:27 | FromDiscord | <jviega> Your app is not finding the info it needs to validate, as OpenSSL does not look at the Windows store itself. |
17:58:38 | FromDiscord | <jviega> But the browsers certainly do. |
17:58:58 | FromDiscord | <duskhorn> so my app needs to load the ssl store somehow. is that the issue? |
17:59:04 | FromDiscord | <jviega> Yes |
17:59:22 | FromDiscord | <jviega> You either need to integrate w/ the windows one or automatically bring the OpenSSL one. |
18:00:17 | FromDiscord | <duskhorn> ok but why is this not an issue on linux then? I remember doing something like this with an http server sending POSTs to a different server?↵Is it a Windows quirkiness? |
18:01:10 | FromDiscord | <jviega> Because every distro uses the OpenSSL cert store |
18:01:17 | FromDiscord | <jviega> And every other crypto library does too |
18:02:39 | FromDiscord | <jviega> Even MacOS pre-installs it, even though they also have their own secure enclave for cert storage. |
18:03:01 | FromDiscord | <duskhorn> so hold up a second though |
18:03:09 | FromDiscord | <duskhorn> hm |
18:03:11 | FromDiscord | <duskhorn> ok I got it |
18:04:16 | FromDiscord | <duskhorn> Ok but suppose you need to ship an actual application to users, how do you do this? Whats the most convenient thing to do? Trying to use the windows certs or some other thing? |
18:04:24 | FromDiscord | <jos7388> is there a binding generator to generate rust bindings for nim code? |
18:04:27 | FromDiscord | <jos7388> kind of like the reverse of nbindgen |
18:19:23 | FromDiscord | <jviega> I'd probably try to get the Windows cert store working yes |
18:23:21 | FromDiscord | <duskhorn> In reply to @jviega "I'd probably try to": ok, thank you both @jviega and @arathanis! |
18:24:07 | FromDiscord | <arathanis> np dude and gl |
18:33:02 | * | junaid_ joined #nim |
18:33:15 | * | junaid_ quit (Client Quit) |
19:29:09 | * | jmdaemon joined #nim |
19:54:39 | FromDiscord | <Elegantbeef> You could try the `--header` and if rust has something like futhark that could work↵(@jos7388) |
19:55:17 | FromDiscord | <jos7388> that’s a good idea |
19:55:27 | FromDiscord | <jos7388> they should work pretty well |
19:55:29 | FromDiscord | <jos7388> Ty |
19:57:53 | FromDiscord | <Elegantbeef> Worth noting it's technically not supported, but it does work |
20:11:33 | FromDiscord | <jos7388> the idea in general is good |
20:11:40 | FromDiscord | <jos7388> i found genny and i might use that instead of --header |
20:41:10 | FromDiscord | <.maverk> is there any difference between using ``float64`` or ``float`` ? |
20:42:35 | Amun-Ra | not on 64-bit arch |
20:42:37 | FromDiscord | <Andreas> In reply to @.maverk "is there any difference": no difference when your on a 64-bit CPU. |
20:43:08 | FromDiscord | <.maverk> In reply to @Andreas "no difference when your": so ``float`` is a c datatype in nim ? |
20:45:05 | Amun-Ra | no |
20:45:33 | FromDiscord | <Andreas> @.maverk not sure, but there is a `cfloat`-type, so no. `float` is 32-bit on 32-bit-arch and 64-bit on 64-bit Cpu |
20:45:37 | FromDiscord | <.maverk> In reply to @Amun-Ra "no": then what ? why do we need float when we have float64 ? |
20:46:15 | FromDiscord | <.maverk> In reply to @Andreas "<@1021771961040375900> not sure, but": oky now i understand |
20:46:20 | FromDiscord | <.maverk> machine dependent |
20:46:46 | FromDiscord | <Andreas> In reply to @.maverk "then what ? why": convenience, and when you compile for a 32-bit platform `float` works too |
20:46:53 | Amun-Ra | float has architecture dependent length, if you want a specific length regardless of cpu arch, use either float32 or float64 |
20:47:08 | FromDiscord | <.maverk> In reply to @Andreas "convenience, and when you": but works on windows ? |
20:47:28 | FromDiscord | <Andreas> In reply to @.maverk "but works on windows": not sure, not living there... |
20:47:46 | Amun-Ra | .maverk: it does |
20:47:48 | FromDiscord | <.maverk> In reply to @Andreas "not sure, not living": i see |
20:47:57 | FromDiscord | <.maverk> In reply to @Amun-Ra ".maverk: it does": now i understand it |
20:48:04 | FromDiscord | <.maverk> it is a machine dependt type |
20:48:14 | FromDiscord | <.maverk> it can be 64 on 64 and 32 on 32 |
20:48:26 | FromDiscord | <.maverk> float is both float32 / float64 |
20:48:40 | Amun-Ra | well, it's either 32 or 64 |
20:48:51 | FromDiscord | <.maverk> In reply to @Amun-Ra "well, it's either 32": thank you brother |
20:48:59 | FromDiscord | <.maverk> In reply to @Andreas "not sure, not living": thanks brother |
20:48:59 | Amun-Ra | no worries mate |
21:29:01 | FromDiscord | <konsumlamm> actually, `float` is always `float64` |
21:30:57 | FromDiscord | <.maverk> In reply to @konsumlamm "actually, `float` is always": why always ? |
21:31:20 | FromDiscord | <.maverk> if it is always 64 what is the benefit of it then ??? |
21:31:34 | FromDiscord | <konsumlamm> ask Araq |
21:43:17 | * | genr8eofl_ quit (Ping timeout: 245 seconds) |
21:44:46 | FromDiscord | <djazz> In reply to @konsumlamm "actually, `float` is always": Learned the hard way when coding for embedded. Float was slower than float32, and float32 was silently interpreted as float64 in compiletime. |
21:44:46 | * | genr8eofl_ joined #nim |
21:48:17 | FromDiscord | <Chronos [She/Her]> float32 treated as float64? Huh? |
22:06:29 | * | advesperacit quit () |
22:19:07 | FromDiscord | <Elegantbeef> The VM should mimic the host, so it's likely just that whole `floatVal: BiggestFloat` |
23:23:46 | * | azimut joined #nim |