<< 10-03-2024 >>

00:05:04FromDiscord<sOkam! 🫐> Is there any existing/up-to-date way to translate python to nim?
00:05:08*FromDiscord quit (Remote host closed the connection)
00:05:21*FromDiscord joined #nim
00:05:53*FromDiscord quit (Remote host closed the connection)
00:06:06*FromDiscord joined #nim
00:06:49*FromDiscord quit (Remote host closed the connection)
00:07:02*FromDiscord joined #nim
00:07:43FromDiscord<sOkam! 🫐> These two functions are all I need to translate, but last time I tried manually translating them it didn't go well πŸ˜­β†΅So wondering if there is any alternative to doing it manually https://media.discordapp.net/attachments/371759389889003532/1216175614726377642/og.py?ex=65ff6ece&is=65ecf9ce&hm=dd66308a69d989b801fae046073d7ede95c764ed3372a3cdb7e7f173c4f6ffc1&
00:08:44FromDiscord<sOkam! 🫐> @ElegantBeef is there anything like that `bisect_right` function already in nim? or can you think of a way to do that simply?
00:11:34FromDiscord<Elegantbeef> Just use a priority queue?
00:11:49FromDiscord<sOkam! 🫐> whats a priority queue πŸ€”
00:12:01FromDiscord<Elegantbeef> A queue that is sorted by priority
00:12:19FromDiscord<sOkam! 🫐> im not following
00:12:25FromDiscord<Elegantbeef> One of the queue impls in the stdlib is a priority queue
00:12:28FromDiscord<sOkam! 🫐> how is that related to random.choices?
00:12:41FromDiscord<Elegantbeef> I mean the biset\_right inserts an element no?
00:12:48FromDiscord<sOkam! 🫐> ah you mean for bisect
00:13:06FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "One of the queue": which module exactly? never seen queues in nim
00:13:16FromDiscord<Elegantbeef> https://nim-lang.org/docs/heapqueue.html
00:13:19FromDiscord<sOkam! 🫐> ty
00:15:20FromDiscord<sOkam! 🫐> goes all over my head big time. no clue how to recreate python random.choices() with this
00:15:38FromDiscord<sOkam! 🫐> i cannot even see the relationship with bisect_right πŸ˜”
00:16:55FromDiscord<Elegantbeef> Then just port the code over
00:16:58FromDiscord<Elegantbeef> I don't even know what this is doing
00:18:12FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "I don't even know": its a classic `choices`, but it allows you to add a weight to each element of the array
00:18:36arkanoidElegantbeef, I'm reading about mixins, as I never used them
00:18:48arkanoidalso seems quite complicated to extract an example from this
00:18:57arkanoidI'l tryy
00:19:07FromDiscord<sOkam! 🫐> (edit) "array" => "array↡choices gives the same priority to every element, but this gives you a way to skew the result towards each element with a specific weight"
00:19:13FromDiscord<Elegantbeef> Put a `mixin procedureName` inside your generic procedures
00:20:01arkanoidthis is the signature of the proc that should be imported, but it's not found in the generic proc "proc contains*(attr: H5Attributes, key: string): bool"
00:20:19arkanoidis it "mixin contains" ?
00:20:25FromDiscord<Elegantbeef> yes
00:21:01arkanoidsame error
00:21:03FromDiscord<Elegantbeef> Right then I'd just say to port this verbatim sokam removing all the incessant `None` checking
00:21:57FromDiscord<Elegantbeef> You're holding it wrong
00:38:30arkanoidI've isolated the portion of code that goes compile error, error is no more there
00:38:40arkanoidthis means that the nim compiler is giving the wrong compile error
00:38:49arkanoidthis is impossible to debug
00:38:59FromDiscord<ElegantBeef> Bridge being funny
00:39:18FromDiscord<ElegantBeef> It's likely a generic binding issue are you using `not` or `notin`?
00:39:45FromDiscord<bosinski2023> ,
00:40:47arkanoidthe error is on a line with `in`: https://github.com/Vindaar/nimhdf5/blob/4dc50f90f02ba01d363d6701af38f7c048d0903c/src/nimhdf5/attributes.nim#L354
00:41:13FromDiscord<ElegantBeef> You put a `mixin contains` inside that procedure?
00:41:20arkanoidAll I can do is do a larger isolated test until I spot
00:41:31arkanoidI tried to add mixin contains just before that line
00:41:49FromDiscord<ElegantBeef> ok change that `h5attr.contains name` and see if it persists
00:42:21arkanoidthis is the error I get https://play.nim-lang.org/#pasty=DQnuLtfUiPki
00:42:47arkanoidas you can see "proc contains*(attr: H5Attributes, key: string)" is not listed, but it really is https://github.com/Vindaar/nimhdf5/blob/4dc50f90f02ba01d363d6701af38f7c048d0903c/src/nimhdf5/attributes.nim#L399
00:42:50FromDiscord<ElegantBeef> Yea it's not binding properly which makes me think the `in` template is causing it to not properly bind
00:43:04FromDiscord<ElegantBeef> You get the same thing with `items` in generics
00:43:19FromDiscord<ElegantBeef> If you do not use `items` or `pairs` directly you get generic issues
00:44:07FromDiscord<ElegantBeef> Wait that's declared after the procedure
00:44:07arkanoidchanged into "let attr_exists = h5attr.contains(name)", same error
00:44:13FromDiscord<ElegantBeef> That'll never bind
00:44:25FromDiscord<ElegantBeef> Move contains before that procedure and even with `in` it'll likely work
00:44:31FromDiscord<ElegantBeef> Declaration order matters
00:44:53FromDiscord<ElegantBeef> A generic cannot bind a procedure that it does not know about
00:45:16FromDiscord<ElegantBeef> You won't need `mixin` or `bind` when you do that either
00:45:20FromDiscord<Elegantbeef> Ping
00:45:34arkanoidmoved `proc contains` before `proc read_attribute` and now I get different compile error!
00:45:39arkanoidno mixin involved
00:46:32arkanoidthanks beef (as usual)
00:46:47FromDiscord<Elegantbeef> Let's be honest it's implied at this point
00:51:57arkanoidI actually touch about it, but I moved the proc 1 less slot ahead than needed
00:52:05arkanoidmaybe I should do a PR
00:53:28FromDiscord<sOkam! 🫐> @ElegantBeef I just randomly found this searching for something else:↡https://nim-lang.org/docs/random.html#sample%2CopenArray%5BT%5D%2CopenArray%5BU%5D↡Do you know how this function works? Is it doing the same thing I was trying to do with the cumulative weights thing from python? πŸ€”
00:54:48FromDiscord<Robyn [She/Her]> I wonder if system.nim can be written without making use of any magic
00:54:48FromDiscord<Elegantbeef> It's indirection all the way down https://github.com/nim-lang/Nim/blob/version-2-0/lib/pure/random.nim#L524-L525
00:54:54FromDiscord<Robyn [She/Her]> Probably not
00:55:13FromDiscord<Elegantbeef> No cause there are no integers without magic
00:55:19FromDiscord<Elegantbeef> Or arrays
00:55:43FromDiscord<Elegantbeef> Without magic you get... `object`
00:56:06FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "It's indirection all the": wdym?
00:56:18FromDiscord<Elegantbeef> It keeps calling procedures in small procedures
00:56:25FromDiscord<Elegantbeef> Code reuse and all that jazz
00:56:40FromDiscord<sOkam! 🫐> so answer is you don't know how it works?
00:56:40FromDiscord<Elegantbeef> It seems like it is similar
00:56:43FromDiscord<Elegantbeef> Whether it's the same I have no clue
00:56:50FromDiscord<sOkam! 🫐> i see, ty
00:59:21FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "No cause there are": Couldn't you just wrap a C integer for the native backends?
01:00:02*nazgulsenpai quit (Quit: ZNC 1.8.2 - https://znc.in)
01:00:44FromDiscord<Elegantbeef> Those are defined as aliases to builtins
01:04:36*nazgulsenpai joined #nim
01:08:52FromDiscord<sOkam! 🫐> @ElegantBeef it did exactly the right thing! damn, wasted so much time not knowing this existed https://media.discordapp.net/attachments/371759389889003532/1216191002646155345/image.png?ex=65ff7d22&is=65ed0822&hm=a8299880fd6e7452c0ed78169b34028a7b169f817c1ba492cf5f02cb9a7bb9db&
01:09:21FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=PnDpRSpKXCzk
01:09:36FromDiscord<sOkam! 🫐> (edit) "https://play.nim-lang.org/#pasty=dVtnAzLPHQwu" => "https://play.nim-lang.org/#pasty=ihtHffmAOtSt"
01:10:49arkanoidkeep fighting in generic and concept context: "got: <typedesc[Meter], typedesc[DecaMeter], typedesc[Minute]> but expected: <D: Length, LD: Length, T: Time>"
01:11:03arkanoiddamn you nim compiler, you are not helpful at all
01:16:04FromDiscord<Robyn [She/Her]> Oh I wonder how hard it'd be to compile Nim libraries into static libraries then only recompile the static libs once you do something like add a genetic so you can reduce the time Nim takes to build projects
01:16:25FromDiscord<Elegantbeef> Sounds like IC with more work
01:16:28FromDiscord<Robyn [She/Her]> Since it'd prefer the static lib to compile against instead of the Nim code
01:16:41FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Sounds like IC with": Why would it be more work?
01:16:53FromDiscord<Robyn [She/Her]> Well
01:17:01FromDiscord<Elegantbeef> Cause you still need the IC cache but now also need to compile static libraries
01:17:11FromDiscord<Elegantbeef> Plus you have no compile time support
01:17:24FromDiscord<Robyn [She/Her]> Yeah okay :p
01:17:29FromDiscord<Robyn [She/Her]> Welp
01:17:31FromDiscord<Robyn [She/Her]> I tried
01:18:55FromDiscord<Elegantbeef> If there was an easy solution to IC it'd be done
01:20:01FromDiscord<Robyn [She/Her]> Fair
01:20:23FromDiscord<Robyn [She/Her]> This sucks though, compiling takes so long and I don't understand enough to help with IC
01:22:07FromDiscord<Robyn [She/Her]> Pong
01:22:26FromDiscord<Robyn [She/Her]> Testing bridge responsiveness
01:23:36FromDiscord<Robyn [She/Her]> Seems fine
01:23:37FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=sPtcDXTnvRAR
01:24:41FromDiscord<Robyn [She/Her]> Do you mean initialising an array's value via index assignment in the constructor?
01:24:55FromDiscord<Robyn [She/Her]> I don't know C++
01:25:14FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=muNtteJOsmtz
01:26:21FromDiscord<sOkam! 🫐> In reply to @Robyn "I don't know C++": actually, that doesn't exist in C++, afaik its a C thing
01:26:30FromDiscord<sOkam! 🫐> at least for objects
01:27:06FromDiscord<Elegantbeef> There is not
01:27:06FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/10037#66190
01:27:16FromDiscord<Elegantbeef> `Left: 2, Right: 2, Up: 1, Down: 2`
01:27:30FromDiscord<Robyn [She/Her]> Ah↡(@sOkam! 🫐)
01:29:32FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "`Left: 2, Right: 2,": how do you use this?
01:30:43FromDiscord<Robyn [She/Her]> Ah the bridge is lagging
01:31:06FromDiscord<Elegantbeef> Paste it inside `[]`
01:31:12FromDiscord<sOkam! 🫐> the slice thing is neat, but doesn't solve my problem↡the example I gave only has 4 options and its easy to read... but that won't be the case for the other cases. so doesn't serve the goal sadly πŸ˜”
01:31:24FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "Paste it inside `[]`": then it does exist
01:31:46FromDiscord<sOkam! 🫐> that is essentially what designated initialization is
01:34:20FromDiscord<Elegantbeef> I'd argue it's not the same since it creates an array and all indices have to be written, I'm guessing C allows `int arr[7] = {[0] = 1, [4] = 15 }` but I could be wrong
01:35:59arkanoidI clearly cannot understand yet the different between proc foo[T](bar: T), and proc foo(bar: Z) where Z is a concept or a typeclass
01:36:25FromDiscord<Elegantbeef> What difference?
01:36:51FromDiscord<Elegantbeef> Unless you mean `proc foo [T: Z](bar: Z)`
01:36:59FromDiscord<Elegantbeef> i mean `bar: T` of course
01:37:59FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "I'd argue it's not": C does support partial initialization, yeah. true that
01:38:28FromDiscord<sOkam! 🫐> nim's named syntax solves my problem though. I just wanted the numbers to be named, so that solves it
01:39:18arkanoidyou mean concepts and typeclasses can't be used as type arguments?
01:39:20FromDiscord<bosinski2023> @beef is it possible to allocate smth. and then transfere ownership to ARC/ORC ?
01:39:56arkanoidbosinsky, create an object with a pointer and declare destructor of that object?
01:40:04FromDiscord<Elegantbeef> You can take ownership of anything if you write your own hooks
01:40:09arkanoidsorry, typo in your name
01:40:40FromDiscord<Elegantbeef> That's one of the perks of Arc it's indistinguishable from manual memory management
01:40:45FromDiscord<bosinski2023> In reply to @arkanoid "bosinsky, create an object": yes, this way, i want ARC/ORC to collect & dispose the thing
01:41:14FromDiscord<Elegantbeef> There is no automated solution you have to wrap it
01:41:45FromDiscord<bosinski2023> In reply to @Elegantbeef "There is no automated": wrap it ? how and what ?
01:42:20FromDiscord<Elegantbeef> Make a new object with a field of the type you want to wrap or make the type a `distinct ptr YourType`
01:42:28FromDiscord<Elegantbeef> Then implement the move semantic hooks
01:42:33FromDiscord<bosinski2023> (edit) "In reply to @Elegantbeef "There is no automated": wrap it ? how and what ? ... " added "so have a outer type, a struct and then my allocated thing inside ?"
01:42:34FromDiscord<Elegantbeef> Then bob's your auntie
01:43:01FromDiscord<bosinski2023> In reply to @Elegantbeef "Then bob's your auntie": wuhuu - i love bob..
01:43:17FromDiscord<Elegantbeef> https://nim-lang.org/docs/destructors.html read this
01:43:27FromDiscord<Elegantbeef> The motivating example creates a sequence
01:44:03FromDiscord<bosinski2023> @beef would you know a sorting-algo thats done in nim and is single-threaded faster than the sort from `std/algorithm`
01:44:17FromDiscord<Elegantbeef> I don't sort things
01:44:25FromDiscord<Elegantbeef> Who am I to play god
01:44:34FromDiscord<bosinski2023> In reply to @Elegantbeef "The motivating example creates": thx uncle beef πŸ™‚
01:44:39arkanoidhaha
01:44:47FromDiscord<morgan> In reply to @morganalyssa "so i'm wrapping clap,": well i tried replacing the exported struct with some emit pragmas but i just keep running into issues
01:45:13FromDiscord<Elegantbeef> Did you use the `emit: """/TYPESECTION/ ..."""`?
01:45:27FromDiscord<bosinski2023> In reply to @Elegantbeef "Who am I to": i tried smth. and i see around 10-X - i think i like it ..
01:46:19FromDiscord<Elegantbeef> I don't even know what that means
01:46:53FromDiscord<morgan> it's code that goes at the bottom in the example im following
01:47:10FromDiscord<bosinski2023> In reply to @Elegantbeef "I don't even know": i mean - i have a algo that sort 1-million int32 in 1/tenth of the time std/sort takes..
01:47:20FromDiscord<bosinski2023> (edit) "sort" => "sorts"
01:47:27FromDiscord<morgan> it's supposed to be the entry point for a dynamic library
01:47:40FromDiscord<Elegantbeef> Oh that meant 10\:1
01:48:23FromDiscord<bosinski2023> In reply to @Elegantbeef "Oh that meant 10\:1": roughly, on small arrays 4-5, surprisingly on larger up to 10x
01:49:10FromDiscord<bosinski2023> (edit) "In reply to @Elegantbeef "Oh that meant 10\:1": roughly, on small arrays 4-5, surprisingly on larger up to 10x ... " added "- its a vectorized quicksort - do you know what std/algorithms does ?"
01:49:17FromDiscord<morgan> In reply to @morganalyssa "it's supposed to be": https://github.com/free-audio/clap/blob/main/src/plugin-template.c#L447
01:49:55FromDiscord<Elegantbeef> Why use emit?
01:50:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=UavlenOZyNVx
01:50:43FromDiscord<morgan> i thought i tried a pragma for that
01:50:47FromDiscord<morgan> but ill try it again
01:51:09FromDiscord<Elegantbeef> If you didnt have `dynlib` it only exports it and does not prevent DCE
01:53:22FromDiscord<morgan> well clap validator can't seem to load it and i get like basically no info
01:53:56FromDiscord<morgan> maybe it's a compiler setting idk
01:54:09FromDiscord<Elegantbeef> Alternatively your types do not match
01:54:55FromDiscord<morgan> oh yea that could do it
01:55:25FromDiscord<Elegantbeef> https://github.com/Alkamist/clap/blob/main/clap/public.nim#L171
01:55:28FromDiscord<morgan> ill have to look thru them again when i work on this again
01:55:29FromDiscord<Elegantbeef> This was working
01:56:01FromDiscord<morgan> oh someone already wrapped clap
01:56:25FromDiscord<morgan> huh
02:08:11FromDiscord<morgan> well i might actually try theirs and see if i can get a working thing with it and build off of that
02:08:25FromDiscord<morgan> i do wish i had seen it before
02:11:54FromDiscord<morgan> i do still have other stuff to do, like getting sokol rendering into a window created thru the clap api, and using the clap wrappers to make the other plugin formats
02:12:04FromDiscord<morgan> so having less to do here would be nice
03:24:46arkanoidare typeclasses allowed for types? like `type Foo[L: Length, T: Time]: distance: L clock: Time` I have a piece of code that works if I only omit typeclasses
03:26:19arkanoidsorry I mistyped my example. Fix: `type Foo[L: Length, T: Time]: distance: L clock: T`
03:26:56arkanoidIf I use typeclasses in my types I get errors like: got: <typedesc[Meter], typedesc[DecaMeter], typedesc[Minute]> but expected: <D: Length, LD: Length, T: Time>
03:58:57FromDiscord<minihondaguy> @room I made a nim library called fuckNiggers want to try it
03:59:10FromDiscord<ElegantBeef> <@&371760044473319454>
03:59:12FromDiscord<minihondaguy> It let's you embed this video
03:59:18FromDiscord<minihondaguy> 1000000027.webm https://media.discordapp.net/attachments/371759389889003532/1216233896547455076/1000000027.webm?ex=65ffa515&is=65ed3015&hm=f70d29ef86e384a789155580f006a02f5deebff613cd57940008c49a35e4b5a8&
03:59:25FromDiscord<minihondaguy> It let's you ekbed the flame on video
03:59:31FromDiscord<minihondaguy> Its called fuckNiggers
03:59:41FromDiscord<minihondaguy> 1000000027.webm https://media.discordapp.net/attachments/371759389889003532/1216233993540997120/1000000027.webm?ex=65ffa52c&is=65ed302c&hm=c85db76c55829f3c236caf5b2f840bf0c8139505437fcfaa024af21aa3a963ab&
04:19:22*azimut quit (Ping timeout: 260 seconds)
04:39:39*azimut joined #nim
04:45:14FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=zDXUbduwTdah
04:51:26FromDiscord<odexine> astToStr?
05:16:38FromDiscord<morgan> In reply to @morganalyssa "well i might actually": well i built it, there's no info for what to use as the build command, but it fails the validator in the same way so :|
05:16:42*xet7 joined #nim
05:58:20FromDiscord<grumblygibson> Exceptions. Any thoughts on best practices or workflows? If you put `{.raises: [].}` then do you put a unique `try/catch` around each line that can raise, or do you do something else? Especially curious about commercial Nim code. (realizing I should go read Status' projects code)
05:59:32FromDiscord<Elegantbeef> Put it around all code you want to not error as high or low as you want to do
06:06:10NimEventerNew Nimble package! koi - Immediate mode UI for Nim, see https://github.com/johnnovak/koi
06:06:12FromDiscord<grumblygibson> πŸ€” thanks, seems like a silly question now as that is the only answer that logically follows.
06:06:47FromDiscord<Elegantbeef> Of course, you can lazily try except at top level or lower down and handle it πŸ˜„
06:06:51*junaid_ joined #nim
06:10:25FromDiscord<grumblygibson> uh oh, we've opened Pandora's box of sage advice.
06:55:42*azimut quit (Ping timeout: 260 seconds)
07:27:52FromDiscord<bung8954> how to start a interactive shell instead of `execCmdEx` ?
07:28:41FromDiscord<bung8954> (edit) "how to start a interactive shell ... instead" added "with command"
07:29:30FromDiscord<bung8954> I got `Chocolatey detected you are not running from an elevated command shell` when `execCmdEx` with `{poUsePath, poParentStreams}`
07:30:46FromDiscord<demotomohiro> run `execProcess` or `startProcess` with `poParentStreams`.
08:10:27FromDiscord<nnsee> In reply to @NimEventer "New Nimble package! koi": this looks nice
08:31:42FromDiscord<bung8954> In reply to @demotomohiro "run `execProcess` or `startProcess`": in the end I get `let (output, exitCode) = execCmdEx(fmt"powershell.exe Start-Process -FilePath 'powershell' -Verb runAs -ArgumentList 'choco','install', '{$pkg}'", options = {poEchoCmd, poUsePath, poEvalCommand}, input="Y")`
08:32:53*advesperacit joined #nim
08:54:04NimEventerNew thread by kragil: Is there a plan to make Nim a language for normal businesses?, see https://forum.nim-lang.org/t/11189
10:25:44*xet7 quit (Remote host closed the connection)
10:37:11*ntat joined #nim
11:06:33*ntat quit (Quit: Leaving)
12:39:32*xet7 joined #nim
13:13:25*xet7 quit (Ping timeout: 246 seconds)
13:14:31*junaid_ quit (Remote host closed the connection)
13:26:06*xet7 joined #nim
13:31:08*xet7 quit (Remote host closed the connection)
13:39:15*xet7 joined #nim
13:59:59*KhazAkar quit (Ping timeout: 264 seconds)
14:29:11*KhazAkar joined #nim
14:51:39*emilknievel joined #nim
14:57:42*azimut joined #nim
15:02:13FromDiscord<xtrayambak> Is there a way to find out the UTF-8 length of a character?
15:03:33FromDiscord<Robyn [She/Her]> In reply to @xtrayambak "Is there a way": Does `std/unicode` work for you?
15:04:02FromDiscord<xtrayambak> I can't find a way to get the UTF-8 length of a character there -- there's no proc that takes in a character and outputs an integer
15:04:47FromDiscord<Robyn [She/Her]> What do you mean by utf-8 length?
15:04:59FromDiscord<Robyn [She/Her]> Like, the total bytes in a unicode character?
15:05:02FromDiscord<xtrayambak> Yeah
15:05:10FromDiscord<xtrayambak> There's `graphemeLen` but it's not exactly that
15:05:25FromDiscord<Robyn [She/Her]> You could do `$rune.len`?
15:05:58FromDiscord<xtrayambak> Isn't that converting it to a UTF-8 string and getting its length?
15:06:00FromDiscord<Robyn [She/Her]> It'd convert the unicode rune to a string which means you could get the length of the string for the amount of bytes
15:06:11FromDiscord<xtrayambak> Ah, I think `size()` is the correct proc
15:06:20FromDiscord<xtrayambak> https://media.discordapp.net/attachments/371759389889003532/1216401762299281469/image.png?ex=6600416b&is=65edcc6b&hm=c3e0e81cbeb325ffb17cdc5fbe08a6762c4cbf1bdd4225d5fc92b8643aceffe8&
15:06:24FromDiscord<Robyn [She/Her]> Ah ignore me then
15:06:29FromDiscord<Robyn [She/Her]> Good luck!
15:07:44FromDiscord<xtrayambak> good lord, now I need to find the UTF-16 length of that character
15:08:11FromDiscord<Robyn [She/Her]> Ah good luck with that!
15:08:53FromDiscord<xtrayambak> I think I'm gonna pull off this really neat trick known as "deviating from the standard" right here
15:08:54FromDiscord<xtrayambak> :P
15:10:08FromDiscord<Robyn [She/Her]> What are you doing, out of curiosity?
15:17:53FromDiscord<xtrayambak> I'm writing a CSS3 tokenizer and parser, lol
15:19:00FromDiscord<Robyn [She/Her]> Ah okay, fair :P
15:28:33*emilknievel left #nim (#nim)
15:31:46*libercv joined #nim
15:31:48*ntat joined #nim
15:35:01FromDiscord<odexine> In reply to @xtrayambak "good lord, now I": UTF-16 is not a variable length character encoding iirc
15:35:21FromDiscord<odexine> "The encoding is variable-length, as code points are encoded with one or two 16-bit code units" oh it is
15:35:29FromDiscord<odexine> prolly thinking of UTF-32 then
15:38:22*KhazAkar quit (Ping timeout: 264 seconds)
15:43:51*KhazAkar joined #nim
15:47:29FromDiscord<Robyn [She/Her]> Hm, out of curiosity, you can overload `()` on types, right?
15:47:57FromDiscord<Robyn [She/Her]> What if someone made an `int128` type that overloaded `()` so you could use it as if it was a typical int type
15:49:01FromDiscord<odexine> In reply to @chronos.vitaqua "Hm, out of curiosity,": ive not heard of such
15:49:20FromDiscord<Robyn [She/Her]> Fair, I think it was experimental
15:54:14*azimut quit (Ping timeout: 260 seconds)
16:10:23*xet7 quit (Remote host closed the connection)
16:19:11FromDiscord<amaank404> wait
16:19:19FromDiscord<amaank404> isn't utf-8 variable encoding
16:19:46FromDiscord<amaank404> becuz utf-8 non-ascii characters have a larger size in memory
16:25:28FromDiscord<odexine> 8 and 16 are variable
16:27:11Amun-Ranot to be confused with ucs-2
16:32:15*def- quit (Quit: -)
16:32:28*def- joined #nim
16:34:11*azimut joined #nim
16:35:43*junaid_ joined #nim
16:38:11*krux02 joined #nim
16:42:19FromDiscord<fosster> mh I'm having difficulties to find documentation for `checksums/sha2`, anyone can help?
16:42:42FromDiscord<fosster> I get 404 on the official documentation's link
16:43:39Amun-Rahttps://github.com/nim-lang/checksums/blob/master/src/checksums/sha2.nim#L39-L46
16:45:32Amun-Rahmm, gh project's readme.md points to https://nim-lang.github.io/checksums/theindex.html
16:45:47Amun-Raand https://nim-lang.github.io/checksums/src/checksums/sha2.html does work
16:51:35FromDiscord<fosster> thank you very much, that is exactly what I needed!
16:51:56FromDiscord<fosster> actually they should update the official documentation
16:52:12Amun-Rayes
16:52:19Amun-Rano worries :)
16:52:28FromDiscord<fosster> on https://nim-lang.org/docs/sha1.html they link to non-existing page
16:57:24*azimut quit (Remote host closed the connection)
16:57:42*azimut joined #nim
17:02:45*def- quit (Quit: -)
17:02:57*def- joined #nim
17:26:57*junaid_ quit (Remote host closed the connection)
17:53:25*Amun-Ra quit (Ping timeout: 268 seconds)
17:59:29FromDiscord<fosster> is https://github.com/cheatfate/nimcrypto the official nim cryptographic library?
18:06:59*junaid_ joined #nim
18:11:34*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
18:11:59*SchweinDeBurg joined #nim
18:22:11*Amun-Ra joined #nim
18:24:02*def- quit (Quit: -)
18:26:14*def- joined #nim
18:30:29*mal`` quit (Quit: Leaving)
18:40:05FromDiscord<Phil> There really is no "official" cryptographic lib
18:40:14FromDiscord<Phil> The closest you could assume would be the openssl wrapper
18:45:57*mal`` joined #nim
19:32:25*libercv left #nim (Leaving)
20:05:39*ntat quit (Remote host closed the connection)
20:06:05*ntat joined #nim
20:58:17*ntat quit (Quit: Leaving)
21:10:54FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=XeBUYxIAztdw
21:11:12FromDiscord<user2m> (edit) "https://play.nim-lang.org/#pasty=vkkICVPUfPpt" => "https://play.nim-lang.org/#pasty=VoSUuuhcidWR"
21:31:31*junaid_ quit (Remote host closed the connection)
21:35:40FromDiscord<Elegantbeef> What are you trying to do exactly read from the output of the child process?
21:37:23FromDiscord<user2m> Yes and send input to it as well
21:37:57FromDiscord<Elegantbeef> then you should be able to just use the `inputstream` and `outputStream`
21:49:24FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=blBrJtxfxGAs
21:50:16FromDiscord<Elegantbeef> Sure not that it's how I'd write it
21:50:46FromDiscord<bosinski2023> In reply to @Elegantbeef "Sure not that it's": ik, so how would you do it ?
21:52:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=mWSRoKVwMJaq
21:53:21FromDiscord<bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=mWepqiJCWVKn
21:53:34FromDiscord<Elegantbeef> Missing `()` in the `N` calc for the `div`
22:11:45*advesperacit quit ()
22:19:43*xet7 joined #nim
22:25:34FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=gHygxQNpwRjc
23:27:51FromDiscord<ccloud_> ccloud
23:42:57*lucasta joined #nim