<< 15-08-2023 >>

01:16:29FromDiscord<heysokam> how can you convert an `array[N,cstring]` into a `cstringArray` directly? ๐Ÿค”
01:22:21FromDiscord<jviega> sent a code paste, see https://play.nim-lang.org/#ix=
01:22:38FromDiscord<jviega> Oh, from an array
01:23:09FromDiscord<jviega> No that works too
01:23:25FromDiscord<jviega> sent a code paste, see https://play.nim-lang.org/#ix=4DuL
01:25:31FromDiscord<jviega> Hmm, I suspect you could solve w/ casting then copying, but just iterating through the array would basically be the same
01:36:46FromDiscord<Elegantbeef> make the last entry in your `array[N, cstring]` nil then you can just `cast[cstringarray]`
01:48:34FromDiscord<terrygillis> Is there a way to pass in an array to a macro to loop through it and generate new nodes based on its content?
01:50:54FromDiscord<terrygillis> sent a code paste, see https://play.nim-lang.org/#ix=4DuP
01:51:46FromDiscord<intellij_gamer> sent a code paste, see https://play.nim-lang.org/#ix=4DuR
01:53:32FromDiscord<Elegantbeef> Though I do question why even use a macro
01:55:29FromDiscord<Elegantbeef> Also why not just `arr: varargs[untyped]`
01:55:35FromDiscord<Elegantbeef> If we're going down the macro route
01:56:47FromDiscord<terrygillis> sent a code paste, see https://play.nim-lang.org/#ix=4DuV
01:57:04FromDiscord<Elegantbeef> Of course
01:57:42FromDiscord<terrygillis> I tried `const node` to force compile time evaluation but it didn't work because `NimNode` is ref type
01:59:58FromDiscord<Elegantbeef> `const node = generateNimNode(name, arr).astAsString`
02:00:15FromDiscord<terrygillis> `let node` wouldn't run at compile time so the compiler just pass into the macro the proc `generateNimNode` as the node itself and so the output to `dir` is just literally `generateNimNode(name, arr)`
02:00:26FromDiscord<Elegantbeef> But yet again... why are you doing this
02:00:29FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/yBL4x
02:00:33*azimut quit (Remote host closed the connection)
02:00:36FromDiscord<jviega> Hmm, if I'm trying to add a {.cdecl.} pragma to a sugar'd function type that has 0 or 1 args, no problem. 2 or more args, I am having a hard time figuring out where to put the {.cdecl.}?
02:01:00*azimut joined #nim
02:02:13FromDiscord<terrygillis> In reply to @Elegantbeef "But yet again... why": I want to have two macros: one spits out code for direct use and the other writes the said code to a different file.
02:04:08FromDiscord<terrygillis> or rather a string to be written to another file
02:04:23FromDiscord<Elegantbeef> Why not just have a single macro and one that does `myCode.repr`?
02:05:33FromDiscord<terrygillis> wouldn't it repeat a lot of code ๐Ÿ™‚
02:07:00FromDiscord<terrygillis> In reply to @Elegantbeef "Also why not just": what would this do?
02:07:23FromDiscord<Elegantbeef> I do not know your usage so i figured you were doing `myMacro("bleh", ["bleh", "meh", "Steh"})`
02:08:28FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/6iwki
02:11:18*azimut quit (Ping timeout: 246 seconds)
02:15:53FromDiscord<terrygillis> Well I'm now hitting the error that it says `name: string` or `name: static[string]` cannot be evaluated at comptime in the macro body despite clearing passing a const into it.
02:20:24FromDiscord<odexine> Can you show what you wrote?
02:20:48FromDiscord<terrygillis> yeah i'm condensing my code into a small snippet
02:20:51FromDiscord<Elegantbeef> The macro is only instantiated once, it does not instantiate per call
02:23:59*krux02 quit (Remote host closed the connection)
02:27:03FromDiscord<terrygillis> sent a code paste, see https://play.nim-lang.org/#ix=4Dv0
02:28:13FromDiscord<terrygillis> (edit) "https://play.nim-lang.org/#ix=4Dv0" => "https://play.nim-lang.org/#ix=4Dv1"
02:29:22FromDiscord<Elegantbeef> I'm so lost
02:30:20FromDiscord<terrygillis> ok that's weird the new piece of code despite my condensing from my original does show error at the baseName but at the `varargs[untyped]/varargs[string]` part
02:30:43*rockcavera quit (Read error: Connection reset by peer)
02:30:46FromDiscord<terrygillis> which makes it unrepresentative of my original :/
02:31:04FromDiscord<Elegantbeef> I just don't get what this is supposedly trying so solve
02:31:40*rockcavera joined #nim
02:31:41*rockcavera quit (Changing host)
02:31:41*rockcavera joined #nim
02:33:07*lucasta_ joined #nim
02:38:55FromDiscord<terrygillis> sent a code paste, see https://play.nim-lang.org/#ix=4Dv4
02:39:15FromDiscord<terrygillis> (edit) "https://play.nim-lang.org/#ix=4Dv4" => "https://play.nim-lang.org/#ix=4Dv5"
02:39:28FromDiscord<Elegantbeef> Ok so firstly do not use strings, use `untyped`
02:39:43FromDiscord<Elegantbeef> So `baseName` is now `untyped`
02:40:17FromDiscord<Elegantbeef> I'd do `(A: tuple[time: int, mod: string]), (B: tuple[width: float, setting: Base])`
02:40:47FromDiscord<Elegantbeef> So now we make our type def(draw the owl)
02:41:30FromDiscord<terrygillis> oh so I should actually do all the string processing outside of the macro right?
02:41:34FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/SFKfv
02:41:45FromDiscord<Elegantbeef> What strings? ๐Ÿ˜„
02:50:39FromDiscord<terrygillis> sent a code paste, see https://play.nim-lang.org/#ix=4Dv7
02:51:19FromDiscord<terrygillis> yeah that's basically what my code does except the structure of the strings in the array involves much more maneuvering
02:51:24*lucasta_ quit (Quit: Quit)
02:51:35FromDiscord<Elegantbeef> Stop using strings firstly
02:52:08*lucasta_ joined #nim
02:54:23FromDiscord<terrygillis> What would be the ideal ways to pass in this kind of structure?
02:54:31FromDiscord<terrygillis> (edit) "ways" => "way"
02:54:32FromDiscord<Elegantbeef> I told you a tuple
02:54:34FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4Dv8
02:55:03FromDiscord<Elegantbeef> But then again you're just remaking https://github.com/beef331/fungus or https://github.com/metagn/skinsuit/tree/master
02:58:49*lucasta_ quit (Quit: Quit)
02:59:03*lucasta_ joined #nim
02:59:40FromDiscord<terrygillis> would a tuple also work with a variable number of fields? Like: โ†ต`(A: tuple[time: int]), (B: tuple[width: float, setting: ref Base], (C: tuple[field1: string, field2: float, field3: int, field4: seq[int]])`
02:59:59FromDiscord<Elegantbeef> Why wouldnt it
03:00:33FromDiscord<Elegantbeef> I use a tuple for fungus myself, it's the best way that gives you a bit of protections cause of the parser
03:01:43FromDiscord<terrygillis> Before now I thought tuple means "two" because of the lmao. Therefore almost never utilised it except for quick multiple returns.
03:03:35FromDiscord<haoyu233> Does copying happen when passing parameters in a non-var way? I don't modify the parameter data, but I don't want it to be copied when I pass it, e.g. `=destory` in nim 2.0 uses a non-var method.
03:03:37FromDiscord<Elegantbeef> Ah no they're a product type which means they are as long as you want and can store whatever you want
03:04:21FromDiscord<Elegantbeef> Nim does copy small types as an optimisation, it does not interfere with hooks
03:05:11FromDiscord<Elegantbeef> You can make `=dup` and `=copy` error if you wish to prevent implicit copies
03:15:03FromDiscord<haoyu233> Thanks for the reply, because I use intrusive data structures in my code, and there are a lot of pointers in there that have self-references, so I was worried about them being copied, leading to pointer failures
03:18:06FromDiscord<Elegantbeef> Sounds like you should disable those hooks then
03:22:31FromDiscord<elpinguinohelado> sent a code paste, see https://play.nim-lang.org/#ix=4Dvb
03:22:42FromDiscord<Elegantbeef> You don't
03:22:52FromDiscord<Elegantbeef> The entire point of scoping is you scope it
03:24:30FromDiscord<Chronos [She/Her]> Is there no way to get the column and line number of where the JSON parser had an error without committing heinous crimes (string parsing)?
03:28:12FromDiscord<jos7388> hey im trying to set up good testing for my project
03:28:17FromDiscord<jos7388> https://media.discordapp.net/attachments/371759389889003532/1140849417340071956/image.png
03:28:20FromDiscord<jos7388> this is the output balls gives me
03:28:29FromDiscord<jos7388> its the first `expectAst` that failed
03:28:32FromDiscord<jos7388> but it's showing all of this trash
03:28:44FromDiscord<jos7388> is there a way to just get it to show the exact line that failed or something
03:28:47FromDiscord<jos7388> instead of the whole test
03:29:55FromDiscord<Elegantbeef> Use check instead perhaps
03:35:17FromDiscord<jos7388> i am using check now but its the same thing, even in a simple test
03:35:21FromDiscord<jos7388> it might be because im using the weird inline tests thing
03:35:27FromDiscord<jos7388> but it also might just be how balls works idk
03:36:07FromDiscord<jos7388> same thing happens with a simple test
03:36:28FromDiscord<jos7388> i think this is what turned me off from balls last time
03:36:29FromDiscord<jos7388> https://media.discordapp.net/attachments/371759389889003532/1140851479616434186/image.png
03:36:35FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "Is there no way": I am guessing there isn't, oh well
03:37:37FromDiscord<jos7388> the output of unittest2 is much more useful
03:37:39FromDiscord<jos7388> https://media.discordapp.net/attachments/371759389889003532/1140851774002036736/image.png
03:38:09FromDiscord<Chronos [She/Her]> Also I'm surprised std/json didn't update to allow for undefined keys to have default values too since that seems like something that'd fit well tbh
04:39:29*advesperacit joined #nim
05:01:54*rockcavera quit (Remote host closed the connection)
05:42:21NimEventerNew Nimble package! cflags - A C-compatible bitmask flags interface, with a subset of nim set functionality, see https://github.com/MCRusher/cflags
05:58:32FromDiscord<odexine> ?
05:58:59FromDiscord<odexine> I see
05:59:00FromDiscord<odexine> Makes sense
06:09:40FromDiscord<joseph54> "I'll help anyone interested on how to earn 100k in just 24hoursย  from the crypto market. But you will have to pay me my commission! when you receive your profit! if interested click on the link and send me a direct message by asking me HOWโ†ต๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡๐Ÿ‘‡โ†ตhttps://t.me/+B7s7bIRsCUZjMjY0
06:14:37FromDiscord<demotomohiro> <@&371760044473319454>
06:38:50*PMunch joined #nim
06:46:30FromDiscord<aph> hi people, is there a way to send array in winim's SendInput? if not im going to do for loop instead
07:01:07*junaid_ joined #nim
07:20:22*Jjp137 quit (Ping timeout: 245 seconds)
07:28:40FromDiscord<demotomohiro> https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput
07:29:42*Jjp137 joined #nim
07:30:34FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4Dwh
07:32:14*azimut joined #nim
07:43:36FromDiscord<litlighilit> On js backend, How to convert string to cstring?โ†ตโ†ต( this is implicitly done but left a warning)
07:44:18FromDiscord<Elegantbeef> `cstring myString`
07:44:19FromDiscord<Elegantbeef> You can just disable the warning realistically there ๐Ÿ˜„
07:44:19FromDiscord<Elegantbeef> It's less of an issue on the JS backend though
07:44:42FromDiscord<Elegantbeef> It is a performance concern but there is no logical reason why it's dangerous
07:47:32NimEventerNew Nimble package! stack_strings - Library for guaranteed zero heap allocation strings , see https://github.com/termermc/nim-stack-strings/
07:48:31FromDiscord<Elegantbeef> And i helped!
07:48:51FromDiscord<litlighilit> ๐Ÿ˜…I've found many methods, never thinking this would work!โ†ตThanks
07:49:02FromDiscord<Elegantbeef> Welcome to type conversions
07:50:59FromDiscord<Elegantbeef> Ugh termer making me make issues to make his code betterer
07:51:21termerSay what
07:52:04termerI suspect this library will be another thing I spent an entire day on and then I never end up using
07:52:11FromDiscord<Elegantbeef> > because there is no easy way to return a slice without allocating heap memory
07:52:11termerthat's probably not true actually
07:53:10termerok... why the fuck did the nimble package get named "stackstrings" instead of "stack_strings"
07:53:11termeram I retarded
07:55:43termerElegantbeef, Am I wrong with the slice thing
07:55:50FromDiscord<Elegantbeef> Yes
07:55:50termerI'm woefully uninformed about Nim slices
07:56:06FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4Dwo
07:56:06termerwould those just be a pointer to an existing slice or something
07:56:14termeror I dunno, it's 3AM lol
07:56:17termerlet's see
07:56:31FromDiscord<Elegantbeef> you can of course apply that to `HSlice` aswell
07:57:00termerlol what the fuck
07:57:03FromDiscord<Elegantbeef> `sink static string` and `: static auto` are comical as all fuck
07:57:05termerok guess I know what I'm doing tomorrow
07:57:18termerstatic auto is actually for a good reason
07:57:27termersink static string is stupid
07:57:39FromDiscord<Elegantbeef> How do you sink a constant, it's data stored in global
07:57:48termer3AM programing
07:58:04termeranyway, the uses of auto in here looks retarded but are because of poor type system
07:58:04FromDiscord<Elegantbeef> Yea just doing a review ๐Ÿ˜„
07:58:27termeris it possible to return a pointer to an existing array
07:58:31termerbut a slice of it
07:58:43FromDiscord<Elegantbeef> You mean a `openArray[T]`?
07:58:45termeror is that what you sent is already doing
07:58:46termeryeah
07:58:50termersomething, I dunno
07:58:54FromDiscord<Elegantbeef> use a template
07:59:03termerlike how golang's slices are just pieces of an existing array
07:59:09termerso no new allocation
07:59:12termeror whatever
07:59:25FromDiscord<Elegantbeef> `template toOpenArray(ss: StackString, start, end: int): untyped = ss.data.toOpenArray(start, end)`
07:59:31FromDiscord<Elegantbeef> There you go we have nim's equivlent
07:59:45FromDiscord<Elegantbeef> Right but go also does silly thing like raises values up to the heap magically iirc
08:00:02termerGo's memory is magic
08:00:07termerI don't think too hard about it
08:00:54FromDiscord<Elegantbeef> right, but it allows that to happen safely
08:01:03FromDiscord<Elegantbeef> Since it raises arrays to references and shit afaik
08:01:11termerright
08:01:32termerin any case, this library is part of a bigger project which is a zero-allocation HTTP parser
08:01:44termerwhich in turn is part of my arduino webserver rewrite
08:03:22termerThere was that one DB product in Zig I found out about that does no heap allocation whatsoever and it piqued my interest in fully stack-based programming in Nim
08:03:26termeralthough that's a lot harder with exceptions
08:03:39termerEspecially when you realize how terrible Option is to work with repeatedly
08:03:51FromDiscord<Elegantbeef> Also you're not nil terminating these strings
08:04:00termerI don't need to
08:04:13termerthe length is stored with it
08:04:32FromDiscord<Elegantbeef> You want to nil terminate for if you ever want to use these with C code
08:04:40termerhmm
08:04:53FromDiscord<Elegantbeef> "But I use 1 extra byte", but if C code requires that `\0` you just work with it
08:04:58FromDiscord<odexine> with sentinel based c code
08:05:12FromDiscord<odexine> safely can be ignored if you never use it
08:05:32FromDiscord<Elegantbeef> Which is most of it, let's be honest
08:05:34termerThe only times I pass strings to C is when it wants a buffer and I'm usually also passing the size with it
08:05:41FromDiscord<Elegantbeef> Also your `sink` is cute all around, but this is a stack type
08:05:45FromDiscord<odexine> a good amount of it has a length-based alternative
08:05:53termerI'm aware about the sink thing
08:06:02termerI just went retard mode at one point and kept second-guessing for no reason
08:06:05FromDiscord<Elegantbeef> Just making sure ๐Ÿ˜„
08:06:19termerI will stand by my use of auto however
08:06:33termerI tested this code on 1.6.12 and it doesn't even work there because of type system weirdness
08:06:49termerApparently there were some very tangible improvements to the type system in 2.0.0
08:06:50FromDiscord<Elegantbeef> Also why no put the `$` inside a `when not defined(stackStringPreventAllocation)`
08:06:56FromDiscord<Elegantbeef> Instead of using fatal inside
08:07:12termerBecause I want a more clear error message
08:07:49FromDiscord<Elegantbeef> Also no `mitems` or `mpairs`
08:07:52termerI thought about just not including some of the heap-capable things with `when` but decided against it because the error messages would be confusing
08:07:56FromDiscord<Elegantbeef> Fuck i'm a monster
08:07:57termerwhat are the m variants again
08:08:02FromDiscord<Elegantbeef> Just giving an unasked for code review
08:08:05FromDiscord<Elegantbeef> `mutable`
08:08:12FromDiscord<Elegantbeef> return ` var char` and `(int, var char)`
08:08:15termerI'd need to look at the implementations of those
08:08:35termerI can implement those, I don't see a problem with that
08:08:39FromDiscord<Elegantbeef> It's so you do not need to do a length iteration just to mutate your data
08:09:01termercool
08:09:04termerthat's really useful
08:09:12termer# An implementation of `[]` that accept HSlice is not implemented because there is no easy way to return a slice without allocating heap memory
08:09:13termer# TODO ^ WRONG, I can do it with this code snippet: https://play.nim-lang.org/#ix=4Dwo (thanks Beef LOL)
08:09:13termer\
08:09:22FromDiscord<odexine> In reply to @termer "I thought about just": you can have the $ in the when define(...alloc...): be a real impl then after that you do an else: proc ... fatal
08:09:25FromDiscord<odexine> you know what i mean
08:09:27FromDiscord<odexine> (edit) "mean" => "mean?"
08:09:46FromDiscord<Elegantbeef> Another thing to consider is `&` can work for static strings and people might want to concat them
08:09:56termerNot really necessary odexine
08:10:23termeroh yeah, I can implement & huh
08:11:06FromDiscord<Elegantbeef> The really nice part is all this code can now work with unicode/parseutils
08:11:08termerBy the way, IndexableChars used to be a concept but it couldn't handle itself
08:11:19FromDiscord<Elegantbeef> So you already have made a very usable string ๐Ÿ˜„
08:11:28FromDiscord<odexine> someone should really provide an alloc effect xddd
08:11:33termerYes
08:11:34termerReally
08:11:46termerElegantbeef, It was absolutely necessary for them to work with unicode cause I can't stand when people forsake unicode support
08:11:54termerThanks for the feedback and the praise
08:11:59FromDiscord<Elegantbeef> You're welcome
08:12:02termerI'll implement the things you pointed out tomorrow
08:12:18FromDiscord<Elegantbeef> Both for the feedback and for the unicode support
08:12:39termeroh yeah, I think I could make a compiler switch for null termination
08:12:51termerand offer a cstring conversion that does copying if you don't have the switch on
08:12:59termerI think that'd be a happy medium
08:13:23FromDiscord<Elegantbeef> Eh `toString` exists
08:13:34FromDiscord<Elegantbeef> unless you make a stack allocated variation
08:13:43termercan cstring be stack-allocated
08:13:46termerI don't think it can
08:13:54termerbut could be wrong
08:13:55FromDiscord<Elegantbeef> Which is a template that creates a new array and returns the pointer to it
08:13:56termerI'm not a c programmer
08:14:03FromDiscord<Elegantbeef> Of course it can be it's a pointer
08:14:22termercouldn't I just return a pointer to the string itself without copying
08:14:26termerassuming it was nil termianted
08:14:27FromDiscord<Elegantbeef> All you need to do is `toCstring` which copies to a an array with 1 extra space and then put a nil terminator at len + 1
08:14:28termeror wait
08:14:40FromDiscord<Elegantbeef> Right it's not always nil terminated which is the issue
08:14:47FromDiscord<Elegantbeef> If it's a full array it's not a cstring
08:15:02FromDiscord<Elegantbeef> Or if you reduce the size it's not a cstring
08:15:08FromDiscord<odexine> In reply to @Elegantbeef "All you need to": no need for the terminator if its already 0-init
08:15:10FromDiscord<Elegantbeef> Welcome to the worst part about C strings ๐Ÿ˜„
08:15:25FromDiscord<Elegantbeef> Right
08:15:45FromDiscord<Elegantbeef> Copying the data over implicitly gives you a nil terminate collection
08:15:50FromDiscord<odexine> also if you make an array in the tocstring proc, wont it be dead after it returns lol
08:16:03FromDiscord<Elegantbeef> Did i say proc
08:16:07FromDiscord<Elegantbeef> A template would be what you use
08:16:07FromDiscord<odexine> i dont remember
08:16:10termerhere's your nil termination bro https://txt.termer.net/view?id=yjw5ftfnsq
08:16:14FromDiscord<odexine> o template
08:16:30FromDiscord<Elegantbeef> Lol termer
08:16:36termeractually I didn't even need unsafeSet cause it's already 0
08:16:38termerwell
08:16:47FromDiscord<odexine> i heard you liked termination so i terminated your terminators
08:16:49termerpresumed to be 0 I suppose, I'm pretty sure Nim zeros out new obejcts
08:16:52FromDiscord<Elegantbeef> I'd say a variation that is guaranteed to be nil terminated is fine, but anyway
08:17:01FromDiscord<Elegantbeef> I'm outta here
08:17:03termerMaybe a variation would be fine
08:17:04termeryeah
08:17:06termerfuck I'm tired
08:17:19FromDiscord<odexine> its just 5 pm for me ๐Ÿ˜›
08:17:30termereuros
08:17:33FromDiscord<odexine> i assume both of you are in the americas or
08:17:35FromDiscord<odexine> okay
08:17:37termerUSA
08:17:45termerIt's 3:17
08:18:29FromDiscord<odexine> go sleep then xd
08:18:36FromDiscord<odexine> see you ig
08:18:51termergood night
08:35:26FromDiscord<System64 ~ Flandre Scarlet> Is there a specific ORM that supports SQLite you recommand?
08:43:40FromDiscord<System64 ~ Flandre Scarlet> There are 4 of them https://media.discordapp.net/attachments/371759389889003532/1140928785479376896/image.png
08:51:29NimEventerNew post on r/nim by aadoop6: Can I use nim to write memory safe code on embedded systems like the AVR architecture? Can it do memory safety without GC on such architectures?, see https://reddit.com/r/nim/comments/15rn0a3/can_i_use_nim_to_write_memory_safe_code_on/
09:02:03*cm quit (Ping timeout: 246 seconds)
09:03:41*cm joined #nim
09:12:57FromDiscord<Phil> In reply to @sys64 "Is there a specific": Me? Norm, I like it personally a fair bit
09:13:01FromDiscord<Phil> (edit) removed "Me?"
09:13:16FromDiscord<Phil> But that's because I added what I found necessary and I didn't actually understand Ormin tbh
09:13:58FromDiscord<Phil> The main draw to norm for me was it actually having docs
09:14:19FromDiscord<Phil> (edit) "The main draw to norm for me was it actually having ... docs" added "easily findable"
09:15:34FromDiscord<Phil> If you can make Ormin work for you though try that, it looks pretty nice and having the compile-time checked SQL is a feature norm literally can not compete with
09:16:03FromDiscord<Phil> gatabase I recall being centered around... I think postgres?
09:17:21FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DwY
09:17:45FromDiscord<System64 ~ Flandre Scarlet> In reply to @isofruit "Norm, I like it": Norm makes me thinking to C#'s entity framework a bit
09:18:31FromDiscord<Phil> In reply to @sys64 "Norm makes me thinking": Somewhat, but Imo it has a sensible limitation:โ†ตIt does the bare minimum crap (findAll, findOne, update one, delete on, create one) for you and for the more complex stuff you can easily write your own queries that map to read-only models
09:19:36FromDiscord<Phil> It is the best documented of the bunch I think, though I'm not sure if it has the best featureset.
09:20:12FromDiscord<System64 ~ Flandre Scarlet> I'll try that, if I have problems, I can change later
09:23:48FromDiscord<System64 ~ Flandre Scarlet> Well I have a problem hereโ†ตA Game can have up to 4 players, but a player has one game https://media.discordapp.net/attachments/371759389889003532/1140938883429838949/image.png
09:25:36FromDiscord<odexine> In reply to @sys64 "Well I have a": remove the `type` in the middle
09:25:45FromDiscord<odexine> just straight up delete the line, dont change anything else
09:26:49FromDiscord<System64 ~ Flandre Scarlet> solves the problem, thanks!
09:33:27FromDiscord<Phil> In reply to @sys64 "Well I have a": Note that you can mark any model that you want to use only for reading (e.g. because you use them for a more complex SELECT query) you can mark wit {.ro.}, which will cause compile-time errors if you ever wrongly try to use that model for saving
09:33:33FromDiscord<Phil> (edit) "saving" => "saving/updating/deleting"
09:33:43FromDiscord<Phil> (edit) "wit {.ro.}," => "with {.ro.} or {.readonly.},"
09:34:25FromDiscord<Phil> Can also be useful for more performance sensitive stuff because you might have models with only a subset of all columns on your table so that you don't fetch useless information.
09:41:58FromDiscord<System64 ~ Flandre Scarlet> Good to knpwโ†ตAnd how can I create a new sqlite database? The doc doesn't seems to explain that
09:46:09FromDiscord<Phil> It doesn't? Could've sworn it does, one sec
09:46:35FromDiscord<Phil> Oh right, it only goes into creating tabels in a DB, not creating a db by itself
09:47:26FromDiscord<Phil> TBH I've never done that via norm and completely overlooked that that could be a valid feature.โ†ตI tend to use Sqlitebrowser as a GUI to see what's in my DB and that one does it for me.
09:47:52FromDiscord<Phil> Though I'm pretty sure if you open a connection to an imaginary file path it'll create a DB for your
09:48:50FromDiscord<System64 ~ Flandre Scarlet> yeah it does
09:49:04FromDiscord<Phil> In reply to @sys64 "Good to knpw And": Yep, `let con = open("./lala.sqlite3", "", "", "")`creates lala.sqlite3
09:49:08FromDiscord<Phil> Ah, too slow
09:54:39FromDiscord<System64 ~ Flandre Scarlet> Yeah it works! https://media.discordapp.net/attachments/371759389889003532/1140946648416145499/image.png
09:55:31FromDiscord<System64 ~ Flandre Scarlet> I should add constraints
09:55:44FromDiscord<System64 ~ Flandre Scarlet> especially on pseudo
09:57:12FromDiscord<Phil> Absolutely
09:58:14FromDiscord<System64 ~ Flandre Scarlet> Can Norm do that too?
09:58:42FromDiscord<Phil> Not that I'm aware of, that's one of the non-core features that nobody implemented yet
10:00:24FromDiscord<heysokam> sent a code paste, see https://paste.rs/wUSvx
10:01:24FromDiscord<heysokam> I'm trying to infer that string should be taken as cstrings for `array[N,cstring]`, but nim wants strings by default
10:01:26FromDiscord<System64 ~ Flandre Scarlet> Or I can enforce this on the constructor
10:02:53FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4Dx8
10:03:13FromDiscord<Phil> Norm provides one
10:03:16FromDiscord<Phil> sent a code paste, see https://paste.rs/i6Iv5
10:04:17FromDiscord<odexine> sent a code paste, see https://paste.rs/2qEql
10:04:17FromDiscord<odexine> in static: args.len
10:04:21FromDiscord<eb442a17a2aaee577399ca9e38eb67b5> what does discard: do?
10:04:28FromDiscord<eb442a17a2aaee577399ca9e38eb67b5> (edit) "discard:" => "dispath:"
10:04:33FromDiscord<eb442a17a2aaee577399ca9e38eb67b5> (edit) "dispath:" => "dispatch:"
10:05:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Dxa
10:05:53FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4Dxa" => "https://play.nim-lang.org/#ix=4Dxb"
10:06:07FromDiscord<Phil> But connection pooling sounds easier to me tbh
10:06:35FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4Dxc
10:06:41FromDiscord<odexine> then you simply cant
10:06:41FromDiscord<heysokam> thats why i was trying to add it, and asked
10:06:47FromDiscord<odexine> because seqs do not have static lengths
10:06:54FromDiscord<System64 ~ Flandre Scarlet> I do pooling
10:06:56FromDiscord<heysokam> but its not a seq
10:06:56FromDiscord<odexine> and openarray includes seqs
10:06:58FromDiscord<heysokam> its an array
10:07:26FromDiscord<odexine> youre getting the length of an openarray (which args is) and openarrays match on seqs too which dont have static lengths
10:07:26FromDiscord<heysokam> I just want to be able to infer the size, based on the inputs, and its for a static block
10:07:35FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Dxd
10:07:38FromDiscord<heysokam> In reply to @odexine "youre getting the length": ahhh true that
10:07:43FromDiscord<odexine> oh sorry, varargs
10:07:49FromDiscord<odexine> varargs also match seqs iirc
10:07:59FromDiscord<heysokam> didn't know, thats great to know
10:08:11FromDiscord<heysokam> how would you achieve this? can you think of a way?
10:08:23FromDiscord<heysokam> I just want to infer the size, given the inputs
10:09:03FromDiscord<Phil> (edit) "https://paste.rs/v5Nf7" => "https://play.nim-lang.org/#ix=4Dxe"
10:09:10FromDiscord<heysokam> and `[]` does not match `array[0,cstring]` by default, neither does `["some"]`, which becomes `array[1,string]`... but i want both to be `array[N,cstring]`
10:29:37FromDiscord<System64 ~ Flandre Scarlet> In reply to @isofruit "If having to specify": and no gcsafe problems with that?
10:36:13FromDiscord<Phil> In reply to @sys64 "and no gcsafe problems": Assuming your withDbCon gets to be the only thing that touches that pool you're good
10:36:39FromDiscord<Phil> Note that sqlite won't magically allow concurrent write because of that
10:36:47FromDiscord<Phil> The database still locks up upon write
10:36:48FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/1140957253302751242/image.png
10:37:25FromDiscord<Phil> Try again with written out "connection", might be that you get married to the name of the variable in the template
10:38:04FromDiscord<System64 ~ Flandre Scarlet> even with "connection"
10:38:26FromDiscord<Phil> That's weird, does that also happen with compilation?
10:38:33FromDiscord<Phil> I tend to trust compiler-errors more than nimsuggest
10:39:26FromDiscord<System64 ~ Flandre Scarlet> the compiler also complains
10:41:27*dza quit (Quit: )
10:41:49FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Dxl
10:42:28FromDiscord<System64 ~ Flandre Scarlet> the first part is in a separate file
10:43:00*dza joined #nim
10:44:09FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Dxn
10:48:03FromDiscord<Phil> In fact you don't even need to export SQLITE_POOLโ†ตWhich gives you a guarantee that nobody can touch that thing outside of your init/destroy and withDbConn procs/templates
10:49:48FromDiscord<System64 ~ Flandre Scarlet> It works fine, thanks!
10:52:04FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://paste.rs/PD0gq
10:54:28FromDiscord<Phil> You mean for when no record matches your query?
10:55:41FromDiscord<Phil> That is indeed intended behaviour (https://github.com/moigagoo/norm/blob/0449e0189a282d6e8c1018949d790040aff6d787/src/norm/sqlite.nim#L225) โ†ตโ†ตI personally am not a massive fan of that either, I wrapped that proc in my own which returns an optional
10:56:07FromDiscord<System64 ~ Flandre Scarlet> the weird thing is UserORM exists
10:56:32FromDiscord<Phil> Enable logging of the query and execute it yourself against the DB to check
10:58:45FromDiscord<System64 ~ Flandre Scarlet> ``DEBUG SELECT "UserORM".pseudo, "UserORM".password, "UserORM".id FROM "UserORM" WHERE UserORM.pseudo = ? LIMIT 1 <- ['e']``
10:59:15FromDiscord<System64 ~ Flandre Scarlet> Why throwing an error? Why not just set my object to Nil?
10:59:55FromDiscord<Phil> In reply to @sys64 "Why throwing an error?": Not my design choice.โ†ตthough either way you never should be given back nil, rather an option would've sufficed in my book
11:00:06FromDiscord<Phil> If the API were designed that way that is
11:02:56FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4Dxq
11:03:50FromDiscord<System64 ~ Flandre Scarlet> Oh I needed to put some instead of user
11:04:44FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Dxr
11:05:18FromDiscord<Phil> And you can also return within the block
11:05:58FromDiscord<Phil> Though never mind, your way is slightly better in that it limits how long you keep the connection
11:06:07FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/1140964634254385193/image.png
11:06:09FromDiscord<System64 ~ Flandre Scarlet> In my API
11:07:52FromDiscord<Phil> Don't check for nil. There is no nil, there is only an option.โ†ตAre you familiar with the concept or should I go into it quickly?
11:08:06FromDiscord<System64 ~ Flandre Scarlet> I think you should go into it
11:12:30FromDiscord<Phil> sent a long message, see http://ix.io/4Dxw
11:13:03FromDiscord<Phil> If you use Optionals everywhere where a thing might "be something or nothing" one of the nice things is that you can be 100% sure that every ref object you have can not be nil
11:13:50FromDiscord<System64 ~ Flandre Scarlet> Oh this is a nice feature!
11:18:16FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Dxz
11:19:43FromDiscord<System64 ~ Flandre Scarlet> pretty interesting
11:22:00FromDiscord<Phil> It's basically highly recommended to never, ever, ever deal with nil.โ†ตIf something might not exist, express it via optionals.โ†ตThat does not hold true for other languages, e.g. in java it's... weird and in javascript it's basically "We have a billion operators that are explicitly to make dealing with null acceptable so no Optionals for you"
11:22:16FromDiscord<Phil> (edit) "It's basically highly recommended to never, ever, ever deal with nil.โ†ตIf something might not exist, express it via optionals.โ†ตThat does not hold true for ... other" added "all"
11:22:48FromDiscord<System64 ~ Flandre Scarlet> is Optionnal like Nullables types in C#?
11:22:53FromDiscord<Phil> But quite a lot in general like optionals, Rust has them, I think C++ does as well
11:22:58FromDiscord<Phil> Never written a single line of C#
11:23:06FromDiscord<System64 ~ Flandre Scarlet> Oh, sorry then
11:23:37FromDiscord<Phil> It looks kind of like an optional (?)
11:23:59FromDiscord<Phil> The type declaration looks a bit odd to me but it does express the same thing seemingly:โ†ตSomething might exist or be null
11:24:12FromDiscord<Phil> And you can check whether it exists with "hasValue"
11:24:21FromDiscord<Phil> And unwrap with `x.Value`
11:24:52FromDiscord<Phil> Yeah, the idea seems to be the same, the words used to express them just differ
11:25:29FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4DxB
11:25:45FromDiscord<Phil> I assume in C# everything is heap allocated?
11:26:47FromDiscord<System64 ~ Flandre Scarlet> In reply to @isofruit "I assume in C#": I think value types (int, structs, floats etc) are on stack
11:27:11FromDiscord<Phil> It isn't as of my recent googling, C# has structs which get stack allocated.โ†ตMaybe those can't be nullable?โ†ตOtherwise I'm not sure why they chose that wording
11:27:43FromDiscord<Phil> In reply to @sys64 "I think value types": Yeh, was more whether object-types can be stack allocated and they got structs, so they can.
11:29:08FromDiscord<Phil> sent a long message, see http://ix.io/4DxD
11:32:01FromDiscord<System64 ~ Flandre Scarlet> Ooooh alright
11:40:46FromDiscord<System64 ~ Flandre Scarlet> I have this code that sends an HTTPResponse, is there a way to get the status code? (200, 404 etc) https://media.discordapp.net/attachments/371759389889003532/1140973356213080185/image.png
12:02:05FromDiscord<System64 ~ Flandre Scarlet> So I can't make assignments in a callback? https://media.discordapp.net/attachments/371759389889003532/1140978715954774106/image.png
12:08:42FromDiscord<intellij_gamer> Think you are meant to use [addCallback](https://nim-lang.org/docs/asyncfutures.html#addCallback%2CFuture%5BT%5D%2Cproc%28Future%5BT%5D%29)
12:11:04FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DxL
12:12:28*ntat joined #nim
12:12:29*cedb quit (Quit: WeeChat 4.0.2)
12:14:15NimEventerNew thread by Hobbyman: SnelInstaller, see https://forum.nim-lang.org/t/10409
12:14:19*ced1 joined #nim
12:16:09FromDiscord<System64 ~ Flandre Scarlet> In reply to @intellij_gamer "Think you are meant": I did that but I still have a mismatch https://media.discordapp.net/attachments/371759389889003532/1140982255653752842/image.png
12:17:38FromDiscord<System64 ~ Flandre Scarlet> Bruh seriously?!โ†ตIt's just async! not a thread! https://media.discordapp.net/attachments/371759389889003532/1140982629253005322/image.png
12:18:35PMunchAre you still struggling with async?
12:19:06FromDiscord<System64 ~ Flandre Scarlet> Yes :/
12:24:13FromDiscord<System64 ~ Flandre Scarlet> Alright so this is weirdโ†ตWhy does it work perfectly on the browser (the 409 one) and not on my login app? https://media.discordapp.net/attachments/371759389889003532/1140984289975087114/image.png
12:39:52*sagax quit (Quit: Konversation terminated!)
12:42:04FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4DxU
12:50:31PMunchThat's a very good question..
12:52:54FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4DxZ
13:05:20*disso-peach quit (Quit: Leaving)
13:11:21FromDiscord<System64 ~ Flandre Scarlet> Finally I fixed it!โ†ตI needed to convert the name to cstring
13:54:16FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4Dyu
13:54:58FromDiscord<heysokam> (edit) "https://play.nim-lang.org/#ix=4Dyu" => "https://play.nim-lang.org/#ix=4Dyv"
13:57:19FromDiscord<odexine> i dont think that is valid syntax?
13:57:25FromDiscord<heysokam> yeah thats the idea
13:57:32FromDiscord<heysokam> that i don't know how to make it valid
13:57:51FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4Dyw
13:58:01FromDiscord<heysokam> let me try that
13:58:26FromDiscord<heysokam> is there no way to pass the body of the text to the template?โ†ตor is that just a feature of macros only?
13:58:43FromDiscord<odexine> the body "of the text"?
13:59:18FromDiscord<heysokam> the body of the arguments, sorry
13:59:29FromDiscord<heysokam> aka passing that without the parenthesis
13:59:42FromDiscord<System64 ~ Flandre Scarlet> Does someone know how I can solve this problem please? https://media.discordapp.net/attachments/371759389889003532/1141008318752624690/image.png
13:59:48FromDiscord<odexine> i dont think it is valid syntax at all
13:59:52FromDiscord<odexine> In reply to @heysokam "aka passing that without": i mean to this
13:59:59FromDiscord<odexine> so it cannot work in any sense
14:00:02FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DyC
14:00:06FromDiscord<odexine> In reply to @heysokam "I thought that was": that is doable
14:00:15FromDiscord<heysokam> so whats the difference?
14:00:22FromDiscord<odexine> syntax
14:00:58FromDiscord<odexine> In reply to @sys64 "Does someone know how": you cant set external variables in that sense iirc
14:01:00FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DyH
14:01:16FromDiscord<odexine> In reply to @heysokam "yeah but is this": no? if nim says its ok for syntax, then it is, if nim says it isnt, then it isnt
14:01:27FromDiscord<heysokam> yeah im just trying to understand whats ok
14:01:40FromDiscord<heysokam> trying to make sense of why one is correct and the other not
14:01:59FromDiscord<heysokam> your () solution worked, btw. tysm
14:02:08FromDiscord<odexine> the comma is not allowed as is
14:04:06FromDiscord<heysokam> ic
14:05:22*PMunch quit (Quit: Leaving)
14:12:50*xet7 joined #nim
14:18:56FromDiscord<ieltan> In reply to @sys64 "Does someone know how": Post it on the forum better chance to get a response i think
14:20:58FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=4DyN
14:23:39FromDiscord<System64 ~ Flandre Scarlet> I did something very hacky but at least it works ๐Ÿคฃ https://media.discordapp.net/attachments/371759389889003532/1141014345267036160/loginWindow.nim
14:28:38FromDiscord<griffith1deadly> In reply to @sys64 "I did something very": why you use waitFor future in complete callback for IT future?
14:31:19FromDiscord<System64 ~ Flandre Scarlet> In reply to @griffith1deadly "why you use waitFor": I think it doesn't work otherwise
14:32:12FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=4DyV
14:32:39FromDiscord<System64 ~ Flandre Scarlet> will try this
14:32:54FromDiscord<griffith1deadly> (T) -> void requires import sugar module
14:33:15FromDiscord<System64 ~ Flandre Scarlet> is then executed once future is complete?
14:33:23FromDiscord<griffith1deadly> yes
14:35:38FromDiscord<griffith1deadly> simplest example https://media.discordapp.net/attachments/371759389889003532/1141017356856995871/image.png
14:38:12FromDiscord<System64 ~ Flandre Scarlet> Oh alright
14:44:01FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=4Dz2
14:48:31*xet7 quit (Quit: Leaving)
14:51:14FromDiscord<System64 ~ Flandre Scarlet> I changed to read(), is that better? https://media.discordapp.net/attachments/371759389889003532/1141021285745438720/loginWindow.nim
14:52:44FromDiscord<griffith1deadly> yep
14:53:03*junaid_ quit (Remote host closed the connection)
14:55:17FromDiscord<System64 ~ Flandre Scarlet> In reply to @griffith1deadly "yep": Is it still possible to improve the entire system? I find it very hacky
14:57:17FromDiscord<griffith1deadly> as you proc is async you maybe can just waitFor future without callbacks
14:57:59FromDiscord<System64 ~ Flandre Scarlet> In reply to @griffith1deadly "as you proc is": It will block the rest of rendering
15:00:48FromDiscord<System64 ~ Flandre Scarlet> Btw is there any ways to generate, send and check authentication tokens on Nim?
15:07:53FromDiscord<System64 ~ Flandre Scarlet> I think it would be cleaner and more secure to send user/password each time I connect to the server
15:11:57FromDiscord<odexine> what do you meran
15:11:59FromDiscord<odexine> (edit) "meran" => "mean"
15:12:55FromDiscord<System64 ~ Flandre Scarlet> Using a token instead of checking password each time
15:18:30FromDiscord<odexine> In reply to @sys64 "I think it would": so you mean "than"
15:18:51FromDiscord<System64 ~ Flandre Scarlet> Oh yeah sorry
15:19:12FromDiscord<odexine> most session tokens are basically "on log in make random string, save to some table, send to user, user sends that every time they use api and server checks table"
15:20:03FromDiscord<System64 ~ Flandre Scarlet> Oh alright, the principle is simpler than I thoughtโ†ตSo an User-String table?
15:23:12NimEventerNew Nimble package! strophe - Libstrophe wrapper, see https://github.com/SillaIndustries/nim-strophe
15:25:41FromDiscord<jviega> Usually not even stored in tables; just digitally signed and validated
15:26:30FromDiscord<leetnewb> Huh, wrapping libstrophe was on my todo list that I was never going to get to. nice.
15:27:38FromDiscord<odexine> In reply to @jviega "Usually not even stored": insert dont use stateless tokens for sessions rant here
15:28:02FromDiscord<odexine> with extremely tiny asterisk noting that its fine if you know what youre doing
15:28:09FromDiscord<jviega> Well, all of JWT is built on the notion that you can just keep everything you need in the token
15:30:04FromDiscord<odexine> im not about to start arguing with who i think is an actual cryptographer or something xd
15:30:16FromDiscord<jviega> Lol
15:32:22FromDiscord<System64 ~ Flandre Scarlet> I already used tokens with C#, but I think a lib managed that for me
15:34:06FromDiscord<jviega> I did a JWT implementation just for us (in C tho) that can do more than 10m signs or verifies per second on my laptop, and there's no need to go to a database ๐Ÿ˜‰
15:34:44FromDiscord<System64 ~ Flandre Scarlet> 10m == 10 millions?
15:34:47FromDiscord<jviega> Yes
15:34:51FromDiscord<System64 ~ Flandre Scarlet> oh wow!
15:35:11FromDiscord<System64 ~ Flandre Scarlet> I thought cryptography was something CPU demanding?
15:35:35FromDiscord<jviega> Public key cryptopgraphy is. Symmetric key cryptography is not.
15:36:08FromDiscord<jviega> But public key crypto is only ever used when necessary anyway.
15:36:32FromDiscord<System64 ~ Flandre Scarlet> cryptography isn't easy to understand tooโ†ตEspecially public key
15:36:46FromDiscord<System64 ~ Flandre Scarlet> I did some hashing for my password https://media.discordapp.net/attachments/371759389889003532/1141032743099187312/image.png
15:36:47FromDiscord<System64 ~ Flandre Scarlet> (edit) "password" => "passwords"
15:36:58FromDiscord<odexine> dont do just hashing
15:36:58FromDiscord<jviega> It's not supposed to be, you're just supposed to use big, well-vetted high level abstractions such as TLS
15:37:00FromDiscord<odexine> also
15:37:10FromDiscord<odexine> better use something that already does it for you, the management of passwords
15:38:09FromDiscord<jviega> 100% correct, you shouldn't have to be an expert, you should use big black boxes that do what you need that you can trust to address the 100's of risks you don't understand, which is why the things are too complicated in the first place ๐Ÿ™‚
15:38:33FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "better use something that": Is there something for that in Nim?
15:38:55FromDiscord<odexine> In reply to @jviega "It's not supposed to": it ideally would be simple but oh well
15:39:06FromDiscord<odexine> In reply to @sys64 "Is there something for": not sure
15:39:23FromDiscord<jviega> Sure, OpenSSL ships with Nim and has a bunch of this stuff, tho not well documented at the Nim level
15:39:51FromDiscord<System64 ~ Flandre Scarlet> I can add a salt
15:40:08FromDiscord<odexine> i think theres also a nacl library somewhere
15:40:12FromDiscord<odexine> libsodium
15:40:13FromDiscord<jviega> I don't 100% love NimCrypto, but it's used in a lot of places, and has pbkdf2 which is the minimum I'd consider for password hashing
15:40:32FromDiscord<System64 ~ Flandre Scarlet> In reply to @jviega "I don't 100% love": Stronger than SHA 256?
15:40:37FromDiscord<jviega> Adding a salt will still leave 1000 other risks
15:40:54FromDiscord<odexine> In reply to @sys64 "Stronger than SHA 256?": sha256 alone should not be used for password hashing
15:41:15FromDiscord<jviega> Sha265 is a very low-level algorithm, NimCrypto is a library that provides much higher level (and standard) algorithms
15:41:38FromDiscord<odexine> i think you should not worry about the implementation like oh does it use insert some jumble of letters here and just see if people still consider the library as prod.ready or something like that
15:41:48FromDiscord<jviega> You don't understand how hard it is to do good password hashing. You need to at least use pbkdf2 if not a more modern replacement.
15:41:50FromDiscord<Chronos [She/Her]> In reply to @odexine "libsodium": Opussum I think?
15:41:53FromDiscord<Chronos [She/Her]> Nvm
15:41:59FromDiscord<jviega> It is a well trusted standard
15:42:13FromDiscord<System64 ~ Flandre Scarlet> Alright will use thatโ†ตIt's also for a school project btw
15:42:57FromDiscord<odexine> if its just for school okay maybe you can ignore a lot of this stuff but hey, if you decide to go further than just school then you have it ready, if you listen to jtv
15:43:23FromDiscord<System64 ~ Flandre Scarlet> Gotta listen to him so
15:43:39FromDiscord<System64 ~ Flandre Scarlet> It would be some code I can reuse later
15:43:45FromDiscord<jviega> pbkdf2 is one function call and basically does everything you need it to do except stick the result somewhere.
15:44:20FromDiscord<odexine> pretty much
15:45:13FromDiscord<System64 ~ Flandre Scarlet> In reply to @jviega "pbkdf2 is one function": Is that in NimCrypto?
15:45:34FromDiscord<jviega> Yes
15:46:05*lucasta_ quit (Ping timeout: 246 seconds)
15:48:01FromDiscord<terrygillis> I keep getting: `(1, 1) Error: undeclared identifier: 'MZ'` despite having only valid imports on the first line (literally `import os, std/[macros, strutils]`). What is happening? The vscode extension is also not showing error of any sort.
15:49:01FromDiscord<jviega> I believe MZ are the first two bytes of a PE binary file, so you're likely trying to import from something that's pointing to a binary file?
15:49:24FromDiscord<odexine> jtv what the fuck
15:49:35FromDiscord<odexine> thats some hella intuition
15:50:20FromDiscord<jviega> Yeah, I'll bet I'm right though ๐Ÿ™‚
15:50:46FromDiscord<terrygillis> no really, literally that's my only imports from the std lib
15:51:00FromDiscord<terrygillis> import os, std/[macros, strutils]
15:51:02FromDiscord<System64 ~ Flandre Scarlet> Wow what's going on? https://media.discordapp.net/attachments/371759389889003532/1141036335717679165/image.png
15:51:05FromDiscord<odexine> do you have a binary file somehow called os in the directory
15:51:17FromDiscord<terrygillis> nope
15:51:19FromDiscord<jviega> I'm saying, however it's happening, there's a binary somewhere in your nim path
15:52:00FromDiscord<jviega> Because a) MZ doesn't appear on the line it's complaining about, and b) MZ on Windows will be the first two bytes of plenty of binaries, and that's the error you'd get
15:52:28FromDiscord<terrygillis> suddenly it cropped up and no matter how I modify the code now the error from the compiler is still the same, different from the extension output
15:52:33FromDiscord<System64 ~ Flandre Scarlet> I don't see pbkdf2 here either https://media.discordapp.net/attachments/371759389889003532/1141036716178813010/image.png
15:52:35FromDiscord<jviega> T is which hash algorithm to use (use sha256).
15:52:43FromDiscord<jviega> I don't know why M and N aren't just bytes
15:53:05FromDiscord<jviega> You just pasted the first two lines of pbkdf2
15:53:16FromDiscord<odexine> sent a long message, see http://ix.io/4Dzy
15:53:31FromDiscord<jviega> I'd hope there are docs or exampels for you.
15:54:01FromDiscord<System64 ~ Flandre Scarlet> pbkdf2 isn't even declared for me, weird
15:54:42FromDiscord<System64 ~ Flandre Scarlet> Oh, just needed to import
15:55:57FromDiscord<jviega> Sadly they have neither examples nor docs for it. I really don't love that library.
15:56:36FromDiscord<System64 ~ Flandre Scarlet> Is there an alternative to that?
15:57:57FromDiscord<jviega> Well, not unless you delve into how to call into C libraries from Nim. I do tend to just use OpenSSL, but I understand their C API as well as anyone can, so it's not much of a problem for me
15:58:51FromDiscord<terrygillis> ok i don't know how the compiler just magically works again with code
15:58:59FromDiscord<terrygillis> no rhyme or reason
15:59:24FromDiscord<terrygillis> (edit) "ok i don't know how the compiler just magically works again with ... code" added "the same"
15:59:40FromDiscord<odexine> sounds good
15:59:43FromDiscord<odexine> :baqua:
16:09:24FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4DzD
16:17:17FromDiscord<odexine> owasp recommends c = 600000 for sha256
16:17:40FromDiscord<odexine> https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2
16:19:15FromDiscord<System64 ~ Flandre Scarlet> Oh, good to know
16:27:52*Mister_Magister quit (Ping timeout: 240 seconds)
16:33:58*Mister_Magister joined #nim
16:35:11FromDiscord<jviega> mySalt should always just be 16 random bytes
16:35:26FromDiscord<jviega> (when you're storing; used the stored bytes when recomputing for validation)
16:44:43FromDiscord<jviega> BTW, for that, I use this:
16:44:58FromDiscord<jviega> sent a code paste, see https://play.nim-lang.org/#ix=4DzO
16:45:27FromDiscord<jviega> sent a code paste, see https://play.nim-lang.org/#ix=4DzP
16:45:54FromDiscord<jviega> or `secureRand[uint64]()` etc
17:03:05*cornfeedhobo quit (Ping timeout: 246 seconds)
17:04:12FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#ix=4DA1
17:11:49FromDiscord<System64 ~ Flandre Scarlet> In reply to @jviega "mySalt should always just": But how can I compare the passwords then?
17:15:17FromDiscord<jviega> You re-use the salt when you recompute
17:15:57FromDiscord<System64 ~ Flandre Scarlet> but the salt is randomly generated?
17:16:40FromDiscord<jviega> Only when you're enrolling someone
17:16:44FromDiscord<jviega> Then you keep the salt around
17:22:44FromDiscord<odexine> In reply to @sys64 "but the salt is": the salt is random per user
17:23:16FromDiscord<odexine> each user has a different salt but the salt doesnt change unless their password is changed too (iirc)
17:24:03*ced1 quit (Quit: WeeChat 4.0.3)
17:25:16FromDiscord<odexine> In reply to @user2m "can anyone explain how": test2 works for me? what version of nim are you on
17:26:59FromDiscord<heysokam> if I have a file that does `.{importcpp:"somesymbol" ...`โ†ตdoes my entire project need to be compiled with the cpp backend?
17:28:30FromDiscord<jviega> Sorry I was on a call, Rika explained it well; the salt is per-user. You can change per-password if you like, but that's basically irrelevent
17:31:10*pbsds quit (Ping timeout: 246 seconds)
17:31:59FromDiscord<m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4DAj
17:32:11*pbsds joined #nim
17:32:50FromDiscord<Phil> In reply to @user2m "can anyone explain how": I can confirm that on nim 2.0.0 this works, both cases
17:33:20FromDiscord<Phil> Does fail on 1.6.10 though
17:33:45FromDiscord<user2m> In reply to @isofruit "I can confirm that": hmmm that's odd
17:33:48FromDiscord<jviega> If it's a string constant why on earth would you want to copy the full thing to the stack ever?
17:34:00FromDiscord<user2m> In reply to @odexine "test2 works for me?": 1.16.12
17:34:35FromDiscord<Phil> In reply to @user2m "1.16.12": Looks like a bugfix with ranges being kind of an unspecified type and that not interacting well with strings that made it into 2.0.0
17:34:39FromDiscord<Phil> Did you install via choosenim?
17:34:50FromDiscord<Phil> Because then you can just update to nim 2.0.0 if you want
17:35:32FromDiscord<Phil> There aren't really that many breaking changes, the only one I had to go through was db_sqlite & co migrating to a db_connector package
17:37:37FromDiscord<Phil> In reply to @sys64 "but the salt is": Generally, you store the salt together with the number of iterations and the password in your database, Django e.g. does it as one string:โ†ต`$pbkdf2_sha256$180000$SomeSalt$SomeVeryLongHashWithASpecificAmountOfChars`
17:37:44FromDiscord<user2m> In reply to @isofruit "Looks like a bugfix": yeah there was some issue with nim 2.0 and the jwt library I was using. I'll have to look back at it. it's no biggie to use 1.16 atm
17:37:53FromDiscord<m4ul3r> In reply to @jviega "If it's a string": position independent code that relies only on the .text section - obviously #security related
17:38:37FromDiscord<jviega> Last time I tried wasn't very long ago, and still was getting memory leaks galore. I'm definitely not in a hurry to move to 2.0
17:38:58FromDiscord<Phil> Mind you I have absolutely no sort of security expert looking over this, I basically coded this together based on what I learned from mratsim and reading through the docs of libsodium, but for easy dealing with password hashing I wrote myself nimword
17:39:10FromDiscord<Phil> (edit) "Mind you I have absolutely no sort of security expert looking over this, ... Imyself.โ†ตI" added "nor am" | "nor amI ... basically" added "myself.โ†ตI"
17:39:20FromDiscord<jviega> Just looking to ASLR all the things??
17:40:21FromDiscord<Phil> (edit) "Mind you I have absolutely no sort of security expert looking over this, nor am I myself.โ†ตI basically coded this together based on what I learned from mratsim and reading through the docs of libsodium, but for easy dealing with password hashing I wrote myself nimword" => "sent a long message, see http://ix.io/4DAm"
17:41:21FromDiscord<jviega> Are you trying to randomize the space between the constants you're using or something?
17:44:54FromDiscord<Phil> sent a long message, see http://ix.io/4DAo
17:45:16FromDiscord<Phil> (edit) "http://ix.io/4DAo" => "http://ix.io/4DAp"
17:45:30FromDiscord<Phil> (edit) "http://ix.io/4DAp" => "http://ix.io/4DAq"
17:46:02FromDiscord<Phil> (edit) "http://ix.io/4DAq" => "http://ix.io/4DAr"
17:46:51FromDiscord<Phil> (edit) "http://ix.io/4DAr" => "http://ix.io/4DAt"
17:47:08FromDiscord<jviega> So Argon had a big security issue immediately after it got standardized that led to having to revise it. The best algorithm for it is more recent, and has a strong proof attached to it, something called Balloon Hashing, which was out of Stanford I believe. But the revised Argon is fine too; still, nothing wrong w/ good ol' PBKDF2, even if I can objectively detail a few ways in which Balloon hashing is the one everyone should be using f
17:47:42FromDiscord<Phil> God fucking dangit, literally can not move fast enough to keep up with security
17:48:12FromDiscord<Phil> Is Balloon hashing in libsodium? Might include it in nimword and if it were that would make it easier
17:48:15FromDiscord<jviega> Well, like Rika says, this is entirely my area.
17:48:35FromDiscord<jviega> No, it is newer than libsodium by a lot
17:48:56FromDiscord<Phil> ... there isn't perchance a wrapper around whatever C-implementation exists, is there=
17:48:58FromDiscord<Phil> (edit) "there=" => "there?"
17:49:52FromDiscord<jviega> IDK. IIRC the stanford implementation was actually in Python
17:50:12FromDiscord<jviega> It's not too hard to implement
17:50:21FromDiscord<jviega> But why does it matter? ๐Ÿ™‚
17:51:26FromDiscord<odexine> it doesnt matter
17:51:27FromDiscord<Phil> Eh, because I wrote myself a package for easy password hashing that also supports argon2 (and easily swapping between implementations for that matter) I felt somewhat responsible to provide the best solutions I can there.
17:51:31FromDiscord<odexine> pbkdf2 is fine
17:51:47FromDiscord<odexine> best in security is not always best to use
17:51:51FromDiscord<jviega> 100% pbkdf2 is good enough.
17:52:26FromDiscord<odexine> theres also support to consider (in which case it is exactly your problem rn, you dont know any library implementing or exposing it to nim)
17:53:49FromDiscord<jviega> Wouldn't scare me personally given my experience, but tbqh I'm far more likely to just reach for pbkdf2. With Argon's history, I don't really trust it until I hear there's a well vetted proof around it
17:55:10FromDiscord<Phil> I mean the lib pretty much got Argon and pbkdf2-HMAC with either SHA256 or 512.โ†ตAdding one more would've been nice either way, but I really don't fancy actually dealing with C myself.
17:55:12FromDiscord<jviega> Also, I don't ever really want to have to be an identity provider anyway, doing it well is a lot of work
17:55:16FromDiscord<jviega> OAUTH is your friend
17:55:17FromDiscord<odexine> idk, for as much as how awful sounding "go blindly follow the cryptographer" sounds, i dont know of a better thing to do than that xdddd
17:55:30FromDiscord<odexine> "but oauth isnt an id provider
17:55:31FromDiscord<odexine> (edit) "provider" => "provider""
17:55:49FromDiscord<odexine> kinda dont like the whole oauth oidc thing, its kinda a mess
17:56:13FromDiscord<odexine> In reply to @isofruit "I mean the lib": i hear for crypto libs, less is more
17:56:16FromDiscord<jviega> No, oauth allows me to identify users without having to do a lot of the crap you need
17:56:25FromDiscord<odexine> harder to fuck things up if you got less options to choose
17:56:43FromDiscord<jviega> It's ugly, but it's widespread and ultimately is far less work
17:57:09FromDiscord<jviega> One of the many many areas where the Nim ecosystem should have something that it doesn't
18:01:02FromDiscord<Phil> Just looked for an oauth package to make that simpler, 1 present =/โ†ตThough the pipelines stated it worked for devel and stable 3 days ago, so possibly workable
18:02:06FromDiscord<jviega> Oh really? What's the URL?
18:02:32FromDiscord<jviega> It's not too much work to wrap C projects these days too
18:03:22FromDiscord<Phil> Just like with macros I have this mental block when it comes to C.โ†ตRecently overcame it for macros, but C is still one of those things where the conventions seem weird and I really don't like how it treats types
18:04:09FromDiscord<jviega> Once you wrap it w/ Furthark you don't need to worry about the C ๐Ÿ˜‰
18:04:10FromDiscord<Phil> https://github.com/CORDEA/oauthโ†ตThe libโ†ตhttps://github.com/CORDEA/oauth/actionsโ†ตThe pipelines showing it worked recently
18:05:04FromDiscord<Phil> In reply to @jviega "Once you wrap it": I mean kinda, I still need to read the docs and understand what they're trying to do and how they're trying to achieve it.โ†ตNot all that rarely you need to deal with providing memory sizes that come from ??? locations and what-not
18:05:12FromDiscord<jviega> Ah that one yeah. It hasn't had a commit in a hell of a long time.
18:05:42FromDiscord<Phil> Yeah, while that's true the pipelines work and ran recently so I'd cross my fingers and hope it worked if I were to try it
18:06:24FromDiscord<jviega> In my view, things like that should be put into the std library instead of trying to take stuff out. The language should own ensuring it's current. If I see something like that is some random guy's unupdated project for an evolving standard, I'm very unlikely to take the risk.
18:07:32FromDiscord<jviega> I really don't understand the move to excise crap, it seems like it's a bad move for driving adoption.
18:09:10FromDiscord<Phil> I think the idea is that how currently libs and compiler are coupled you've got to make a new nim-version to update the libs and the effort that goes into it feels not worth it.โ†ตThe base assumption being that libs can be updated independently quicker and with less effort as needed.โ†ตWhich I assume you're aware of though, so that argument makes no sense to you?
18:10:49FromDiscord<jviega> That's irrelevent ultimately. The nim language should be trying to have as big a standard library as possible; the internal release management issues are a solvable implementation detail.
18:15:31FromDiscord<jviega> When I hammer on "lack of ecosystem", a lot of the problem is essentially, dev needs very common thing X that's easy to find in any other language? Well, you can choose from 1-4 unmaintained things, most of which aren't going to be very complete; the alternative? They have to do a lot of work, whether it's writing or wrapping.
18:16:38FromDiscord<jviega> That includes incredibly basic stuff like writing to a damn S3 bucket. There isn't a good library for that, never mind all the other AWS services. Or GCP services. Or Azure services.
18:19:26FromDiscord<jviega> How about using a secrets management API? Couldn't find anything good there either. Stuff that's 101 basic crap that's easy to find in other languages... the languages either maintain, or are so popular the big vendors maintain.
18:19:35FromDiscord<odexine> it being on the stdlib wouldnt really change the fact that someones gotta maintain it
18:20:20FromDiscord<jviega> Right, but if it's actually in the umbrella of the "official org" such as it is, when the creator abandons working on it, it's easier to get other people to pick up the pieces instead of forking
18:20:33FromDiscord<jviega> Forking a project those people don't want to work on anywa
18:20:51FromDiscord<jviega> It would def make it easier to get people involved in nurturing the community
18:23:28FromDiscord<jviega> When I find a project that's abandonware, like an s3 lib say, that I have to patch up to make it work, I then submit a PR and that person just ignores it, because that was years ago, and not even remotely interesting to them. So nobody benefits, and nobody's going to come to my page to look to see if my fork is marginally better, etc. It's much better off getting important stuff into the tent, so to speak
18:24:18FromDiscord<jviega> I've had several PRs for nim projects that I yanked after 6 months of monthly pings trying to get a response.
18:25:35FromDiscord<nomad> sent a code paste, see https://play.nim-lang.org/#ix=4DAI
18:26:55FromDiscord<odexine> https://media.discordapp.net/attachments/371759389889003532/1141075564883619891/image.png
18:27:03FromDiscord<odexine> oh i didnt see the text below
18:28:28FromDiscord<odexine> prolly different dns resolvers for browser and winapi
18:28:44FromDiscord<nomad> maybe but how do i fix that
18:38:29*rockcavera joined #nim
18:57:16*ced1 joined #nim
19:30:21FromDiscord<nervecenter> What libraries exist for quad precision floats?
19:30:42FromDiscord<nervecenter> or arbitrary precision
19:39:31FromDiscord<m4ul3r> In reply to @nomad "maybe but how do": You need to url encode the `@`
19:40:21FromDiscord<m4ul3r> This works for me https://media.discordapp.net/attachments/371759389889003532/1141094043883941918/image.png
19:42:06FromDiscord<m4ul3r> In reply to @jviega "Are you trying to": Just trying to avoid the use of the data section
19:43:44FromDiscord<nomad> In reply to @m4ul3r "You need to url": thank you so much, i was at the brink of punching a hole through something haha ๐Ÿ™
19:46:28*ntat quit (Quit: leaving)
19:58:13qwrI disagree, "as big a standard library as possible" is not a good goal. it is easy to not foresee future requirements or do stupid design decisions, and then you have to live with this. what's reasonable, is to have commonly useful things in standard library, which is subjective and compromise, but still useful and it seems that nim standard library seems to be kind of like that
20:00:21NimEventerNew thread by DMisener: \suggestions on handling \destructuring of array/seq into a list of named fields?, see https://forum.nim-lang.org/t/10410
20:09:39FromDiscord<jviega> sent a long message, see http://ix.io/4DB5
20:10:58FromDiscord<jviega> But the lack of ecosystem is a huge, huge barrier, and a bigger reason for the rest of my team not wanting to use it than the syntax and any quirks in the language itself. Just makes everything seem like so much more work than if they went and did it in Go.
20:11:03FromDiscord<jviega> And they're right
20:12:09FromDiscord<Elegantbeef> But but there are no popular languages with similar syntax to Nim! ๐Ÿ˜›
20:12:14FromDiscord<jviega> LOL
20:13:02FromDiscord<jviega> The syntax is mostly not very relevant to the people I work with, tho there are obviously plenty of people who will either love or hate things.
20:13:47FromDiscord<jviega> Even 9 months into nim, I still hate the choice of & for array additions, for instance
20:13:55FromDiscord<Elegantbeef> It's very much a nothing burger but people bikeshed it
20:13:58FromDiscord<Elegantbeef> Compiler, Tooling, Libraries, Package dependencies is all that really matters
20:14:00FromDiscord<jviega> But I don't really care, other than I still get it wrong all the fucking time ๐Ÿ™‚
20:14:22FromDiscord<jviega> Yup totally agreed, and it's good to see work on the tooling w/ Atlas
20:15:23FromDiscord<jviega> But the philosophy seems to be to shed responsibility on libraries, but there's not a big enough community yet, so when you need to reach for something external, it always feels like abdandonware
20:15:39FromDiscord<jviega> And even then, there's often nothing decent ๐Ÿ™‚
20:16:14FromDiscord<Elegantbeef> Right, but being in the stdlib is another issue for a multitude of reasons
20:16:40FromDiscord<jviega> stdlib isn't important. That's an implementation detail. What's important is that it be "official" and supported.
20:17:10FromDiscord<Elegantbeef> Ok you just mean under the nim-lang umbrella which is fine
20:18:48FromDiscord<jviega> For instance, when someone writes a halfway decent AWS library because none exists, but then they abandon it, it eventually goes stale. Maybe I'll PR against one, but those people did it because nothing was out there and they needed it, they don't want to keep getting dragged back into it.
20:19:10FromDiscord<jviega> I've got several PRs like that that have lingered for 6 months myself.
20:19:19FromDiscord<jviega> Nobody's going to come looking for my fork, either.
20:19:55FromDiscord<jviega> If it's 'official', then it's easy for me to know, if they all suck, at least if I try to improve the one that's there, then someone else will pick it up
20:20:48FromDiscord<jviega> It's really disheartening to people looking for basic stuff every other language has, and seeing crappy libraries where nothing has been commited for 3 years, and they're not 'official'. If they were official, that's more imply, "wow, it's so good we haven't had to touch it in 3 years"
20:21:40FromDiscord<Elegantbeef> That's a mixed bag, cause people will come in here and be like "This thing hasnt been commited on in 2 days, it must be a dead repo"
20:22:14FromDiscord<jviega> Well, when you've got one huge repo for the org, less attention gets paid to individual modules, let's say
20:22:25FromDiscord<jviega> In terms of the "this is abandonware" reaction
20:22:34FromDiscord<Elegantbeef> But yea having important packages under a nim-lang org is nicer
20:23:31*advesperacit quit ()
20:23:31*krux02 joined #nim
20:25:00FromDiscord<jviega> Once Nim's bigger, the big vendors will clearly be willing to release their own supported nim packages (e.g., aws, gcp, etc). But until then, not supporting those things well is an issue. Most recent one for me is finding anything decent to abstract away dealing with all the common secret manager libs. I end up writing too much crap myself that should just be easy and official
20:25:50*cornfeedhobo joined #nim
20:25:53FromDiscord<jviega> The bar for me being, it's major tech, and easy to find supported versions in most any other language I'd consider
20:31:28FromDiscord<System64 ~ Flandre Scarlet> In reply to @m4ul3r "This works for me": Can you do routing with Puppy?
20:32:18FromDiscord<_gumbercules> I'm going to be so glad when the trend of naming Nim libraries with words that end in `y` dies
20:32:29FromDiscord<jviega> Lol
20:33:00FromDiscord<Elegantbeef> That's one way of saying "I dislike treeform" ๐Ÿ˜„
20:33:48FromDiscord<_gumbercules> More like I don't appreciate their convention of naming libraries. I barely know treeform - it'd be difficult for me to hate them.
20:34:02FromDiscord<Elegantbeef> I of course was joking
20:34:06FromDiscord<_gumbercules> I know ๐Ÿ™‚
20:34:10FromDiscord<_gumbercules> Just don't want anyone to get the wrong impression
20:34:33FromDiscord<Elegantbeef> Do you hate my pun based naming scheme?
20:35:19FromDiscord<jviega> As my kids remind me any time I try to use a pun, "dad jokes are bad jokes"
20:35:22FromDiscord<_gumbercules> If effort goes into the name I appreciate it
20:35:29FromDiscord<Elegantbeef> Kashae - memoization libraryโ†ตFungus - Rust style ADT macrosโ†ตTraitor - trait libraryโ†ตOopsie - oop introspection library
20:35:33FromDiscord<_gumbercules> Effort and thought
20:35:34FromDiscord<Elegantbeef> Cmon jviega those are good names
20:36:16FromDiscord<jviega> Oh, I still like puns myself, I have 4 kids, so I must like them a lot
20:37:15FromDiscord<m4ul3r> In reply to @sys64 "Can you do routing": can you elaborate? I haven't use much puppy and just tested what was shared?
20:37:35FromDiscord<Elegantbeef> Isnt puppy an http client not a server so why would it do routine?
20:37:41FromDiscord<Elegantbeef> routing even
20:37:56FromDiscord<m4ul3r> isn't that what mummy is for?
20:38:16FromDiscord<m4ul3r> They meant hosting a webserver?
20:38:31FromDiscord<_gumbercules> Somewhat off topic but one day my wife brought home some chick-fil-a and these amazing cards that came with one of their kids meals apparently: https://media.discordapp.net/attachments/371759389889003532/1141108681753239583/p_20230809_175633.png
20:39:03FromDiscord<_gumbercules> They're pretty amazing
20:39:12FromDiscord<_gumbercules> Definitely upped my dad joke game
20:39:14FromDiscord<jviega> Guess I need to eat some CFA this week
20:39:14FromDiscord<System64 ~ Flandre Scarlet> It's for fetching API, might be interesting
20:42:58FromDiscord<_gumbercules> Why do watermelons have fancy weddings? They cantaloupe ๐Ÿฅ ๐Ÿ’ฟ
20:53:18termercompletely uncalled for
20:53:31FromDiscord<_gumbercules> what's that?
20:53:58termeroh wait you're showing those cards LOL I thought you decided to start telling horrible jokes out of the blue
20:54:46FromDiscord<_gumbercules> xD
20:55:10FromDiscord<_gumbercules> I have a whole deck of them if you want me to keep going
20:58:23FromDiscord<_gumbercules> but really - I don't have a problem with puns or dad jokes. It's more when the name of everything has to fit some strict but unnecessary convention, like ending in `y` , that someone will start to lose me.
20:59:17FromDiscord<.maverk> hello
21:42:03termerhello
21:42:26termer_gumercules, I love those kinds of jokes and I also love shitting on them
21:43:05qwrjviega: the problem you described is that there is simply (yet) not enough people willing to maintain all libraries that might be useful
21:43:56FromDiscord<_gumbercules> In reply to @qwr "<@1046486398850576494>: the problem you": We're approaching two decades of Nim being a thing - when will there be enough people if there are ever going to be enough?
21:44:08FromDiscord<jviega> I think plenty of people would be willing to help out w/ such things if they knew it wasn't going to be wasted effort.
21:44:13FromDiscord<jviega> Exactly right
21:44:20FromDiscord<jviega> If you don't make it easy for people to add value they won't
21:45:31qwrthis probably matters to some people, but others maintain things they find useful for themselves or where they simply enjoy doing it
21:46:14FromDiscord<jviega> Sure, and they can keep doing that, but it doesn't help the community grow, now does it.
21:47:28FromDiscord<jviega> Having to do days or weeks of work to build stuff that is well supported and can be done in a few mins in Go, Python, C, Rust, Java, ... is an incredibly common barrier I'm seeing just from trying to get people to use it internally.
21:50:07*disso-peach joined #nim
21:50:18qwrusing C or rust library should be easy in nim
21:50:37qwrcan't imagine spending days on it
21:50:37FromDiscord<jviega> Great, then wrap a bunch of crap and keep people from bouncing out of the language
21:51:37FromDiscord<jviega> Well you'd be right, because most people just don't bother.
21:52:37FromDiscord<jviega> Again, your approach might be fine for you, and it is for me personally, but it's not even remotely good for helping the broader Nim community. Paraphrasing what Gumbercules said, expect to spend another 20 years with no significant adoption.
21:52:44FromDiscord<_gumbercules> In reply to @qwr "using C or rust": Using a Rust library in Nim is only trivial if it exports a C API and most people are just going to use Rust if Rust can already do what they want done.
21:52:52qwrthat's true, and then they bother fighting days and weeks with go deficiencies and java framework monstrosities
21:53:14FromDiscord<jviega> And even then, watching people hitting their heads on trying to wrap C, even with some good guides around, is tiresome
21:53:29termerTo me, the case has always been that Nim has no killer feature so nobody knows why they're using it
21:53:38FromDiscord<_gumbercules> Nim has basically zero enterprise software support - like no one is going to pick Nim to author a production software component used in a larger organization because they'd need to bring too much to the table
21:54:01termerNim can be a bit difficult to use in a team setting I'd imagine
21:54:07FromDiscord<_gumbercules> And for better or worse, enterprise software support is what drives the wider software development world towards tech adoption
21:54:10FromDiscord<jviega> No, they feel 100% more productive in Go. I know dozens of people in the tech world who gave Nim a look, and this ecosystem problem was a non-starter for all of them.
21:54:14qwreven rust, with all the mindshare it has, is having difficult time in enterprise settings
21:54:20FromDiscord<jviega> But you keep telling yourself that Go's not productive enough for them
21:54:35FromDiscord<jviega> While the Nim user base grows aenemicly
21:54:42FromDiscord<_gumbercules> In reply to @qwr "even rust, with all": Sure but they're miles ahead of Nim and in less time
21:55:09FromDiscord<jviega> Yes, and the reason I wouldn't want to use Rust isn't ecosystem, it's because it's the modern perl, in terms of it being a write-only language.
21:55:28FromDiscord<_gumbercules> Hell Odin is already used in a industry leading product and it's been a blip on the radar compared to Nim. Zig has appealed to a much wider audience than Nim as well, in a much shorter time span, and it has no killer product.
21:56:06termerZig's killer product is C
21:56:15termerthat's always been clear, and that's what they market it as
21:56:16qwrwell to me it seems that number 1 criteria in enterprise is "can you hire bunch of programmers who barely know this _cheaply_?"
21:56:18FromDiscord<jviega> Yup, because they act like a community, instead of a bunch of individuals who happen to use some guy's pet project
21:56:19FromDiscord<_gumbercules> Nim has a history of driving users and contributors away, there are no two ways about it and until that is understood and fixed I think Nim will maintain its footing if it doesn't see some slippage
21:56:44qwryou can't really apply any merit-based logic against that
21:56:53FromDiscord<_gumbercules> In reply to @qwr "well to me it": I mean - all languages start out with one user
21:57:12FromDiscord<_gumbercules> Golang, Rust and Zig did - and they all somehow overcame the lack of users and thrived
21:57:56termerPeople like to talk about community a lot, but I legit think the reason Nim suffers so much is that it has no direction and no killer app
21:58:02qwryes and there the initial growth after C++ has always been massive marketing - java, C#, go
21:58:03termerits killer app is being whatever you want
21:58:08FromDiscord<jviega> No, false. I have run large enterprise software teams, and language selection in the tech world tends to be, "whatever the individuals want, we're not going to disenfranchise them". But I still would urge people to consider whether someone else is going to pick up that Rust code in a year and read it.
21:58:30FromDiscord<jviega> It's the developers who don't want to use Nim
21:58:53termerI mean, to be honest, I'm extremely hesitant to use Nim in a production setting, at least for my applications
21:59:00termerwhich are network-based
21:59:10qwrand if you've hired bunch of people by criteria that they know java, then the common language between them tends to be java etc
21:59:14FromDiscord<jviega> Hell, I've written 100K lines of Nim in 9 months, and I wouldn't recommend it to anyone who isn't already using it, even though I enjoy it for me.
21:59:21termerLOL yeah
21:59:49termerI dunno, it feels like it really has a hard time evolving past a toy
21:59:56FromDiscord<_gumbercules> Yeah most of the time I tell people about Nim I preface my glowing review with - if I were running a software company to do we / you do - I probably wouldn't choose Nim
22:00:01FromDiscord<jviega> Yup, and this is the mindset holding it back..
22:00:08termer_gumbercules, That's how I talk about it
22:00:11termerbut
22:00:19termerI'm actively trying to make things I can use in production
22:00:26termerbut it's hard
22:00:31termerI think a lot of improvement could be made by removing like half the features
22:00:33qwrthere is one much more mature language with similar growth to nim that i also like very much - ocaml
22:01:10qwrits been around like eternity, its really stable, and the use and libraries are very limited
22:01:14termerThe NimWorks people are working on NimSkull, which in its current state is basically Nim with more narrowed features
22:01:28FromDiscord<jviega> Also not a success by any means, qwr, so I am waiting to hear your point.
22:02:19FromDiscord<_gumbercules> In reply to @termer "The NimWorks people are": I'm not sure how much it has in common with Nim anymore - certainly quite a bit - but I don't think the intention is to maintain any sort of compatibility with Nim
22:02:21qwrjviega: that is the point, that its not a success in mindshare, while technically sound (except maybe multicore support until like last year)
22:02:35termerThere is no intention to maintain compatibility, which is why I don't use it
22:02:45termerbut its purpose is good and is what I wish Nim would do
22:02:53FromDiscord<jviega> OCAML at least was and continues to be responsible for many academic papers and ideas that drive design in other successful languages.
22:03:21*disso-peach quit (Quit: Leaving)
22:03:29FromDiscord<jviega> If you're happy w/ Nim being not fit for most people that's fine, but being an absolute tosser to people who are trying to help it get adoption is unfathomable.
22:03:49termerI want it to become more successful
22:03:54termerI really do
22:03:55qwrjviega: maybe your right that one common denominator is standard library (nims is honestly the better one here)
22:03:59FromDiscord<jviega> I'm talking to qwr
22:04:08termermy bad
22:06:06FromDiscord<jviega> There's nothing fundamentally wrong w/ languages as pet projects. I've got that merit badge. But unless it's your decision and you're saying, "This is only ever going to be a pet project", then arguing it's good enough staying a pet project while others are trying to help it evolve is just a jerk move.
22:06:55termerI've seen people talk about this on other forums, specifically the fact that there isn't a clear map of where the language is going
22:07:34qwri'm not trying to stop anything, only thought that throwing kitchen sink into stdlib might not be too useful in the end, but maybe i'm wrong
22:07:36FromDiscord<jviega> Yeah, the external perception I've heard from friends who went to Zig instead is, "let's continue to dink around with different memory management approaches forever"
22:07:42FromDiscord<_gumbercules> I think the fact that those empowered to change the situation don't even pay attention to conversations like ^ (so far as I can tell - and I'm not attempting to bash anyone here or claim people aren't working hard) is proof that the level of desire to see Nim evolve its community and grow its user base is lacking
22:07:46FromDiscord<jviega> You're definitely wrong ๐Ÿ™‚
22:08:06FromDiscord<jviega> It is a broader problem of no investment in community building, but that's one huge part of it
22:08:25FromDiscord<jviega> Exactly that, Gumbercules.
22:09:21termerCommunity building as priority is kind of backwards when community forms around things people want to use in the first place
22:09:46termerPeople want to use Nim for fun but it's lacking direction at the core language level
22:10:06FromDiscord<jviega> I think plenty of people have had interest, but been driven away due to the lack of investment in ecosystem / community
22:10:13FromDiscord<_gumbercules> People want to use and contribute to Nim but the channels to do so need to be easy to swim in and wide open - which they are not
22:10:25termerare they not
22:10:37termerwell contribution, I'm not sure
22:10:41termerI've never contributed to the compiler
22:10:54FromDiscord<_gumbercules> If you want examples of attempts at contributing to Nim just to see how dififcult it can be, I'm happy to provide them
22:10:55FromDiscord<_gumbercules> haxscramper and fusion is a good one
22:10:55FromDiscord<_gumbercules> disruptek and incremental compiliation is another good one
22:10:56termerand stdlib is mostly a no-go because you can only add to it
22:11:12termerman I really wish the whole CPS in the compiler thing panned out
22:11:16FromDiscord<_gumbercules> I mean - writing and maintaining a package is still contributing to the language's ecosystem
22:11:26termerThere's a post by Araq in a GitHub issue thread where he flat out said CPS is the future
22:11:33termerI would agree, if that's what actually happened
22:11:47termerCPS is miles better than async/await in both performance and usability
22:12:12FromDiscord<_gumbercules> krux02 is another good example of a contributor who couldn't seem to find balance with leadership - there are a myriad of examples from the history of Nim
22:12:34termerI only know vague bits about the story of Fusion and concurrency wars
22:13:38FromDiscord<jviega> For me, I don't even know why I keep shouting about things, other than I have written a lot of code. As much as I like it, I'm unlikely to ever do another new project in Nim.
22:14:23FromDiscord<jviega> Tho the one I'm working on is looking likely to end up being adopted into the Linux Foundation in Nov time frame, which has me really a bit nervous about it all being in a language I cannot recommend.
22:14:24qwrhm, and why?
22:14:26termerI'm hanging out in #nim-embedded and am pretty optimistic about doing projects on microcontrollers
22:14:56termerI'm also optimistic about CPS and am going to try driving more adoption of it
22:15:12*qwr is using nim for personal projects simply because its most easy to use / fastest / optimal solution in many cases
22:15:15FromDiscord<jviega> I've just told you. There's too much friction on common things for strong engineers in the tech world.
22:15:33termerWhat's your project jviega
22:17:22qwrit's stdlib is often good enough, language is nice to use, compiler catches common errors and produces small and fast binary - idk any other language with that combination of properties
22:18:03FromDiscord<jviega> In a nutshell, makes it very easy for people to connect what's running on production systems to who wrote it and the exact commit it was built from. Collects arbitrary metadata, including stuff like SBOMs, signs software, collects runtime environmental info, but nobody needs to even be aware it's running (it fully wraps the docker command, and can fully wrap entry points for software, etc).
22:18:49FromDiscord<jviega> Already have several big companies using a preview like Cloudflare, even though the first source release isn't for a few more weeks.
22:18:52termerThat's pretty cool
22:19:23FromDiscord<jviega> Yup, it includes injecting metadata directly into artifacts like elf executables, etc.
22:19:42termerqwr, I like doing network programming, and while the stdlib appears to be nice for I/O, asyncnet is really hard to use in a way that won't leak or cause performance issues
22:19:44FromDiscord<_gumbercules> In reply to @qwr "it's stdlib is often": Nice to use is subjective, same with the stdlib often being good enough. I'd argue that a langauge that allows me to do the things I need to get done in an efficient manner is a language that is nice to use.
22:19:57termerNim's stdlib is generally nice to use
22:20:11termerjson is good, blocking I/O is good, threading is good
22:20:15FromDiscord<jviega> If it has what you need
22:20:26termermy biggest problem is async
22:20:27FromDiscord<jviega> No the Json is passable at best
22:20:48termerI unmarshall JSON to objets
22:20:50termer*objects
22:20:55termerit does that well and I don't worry about it
22:21:02termerI know there's jsony
22:21:09qwrmaybe i don't care about corner cases because i'm fine with using different languages for different tasks...
22:21:41FromDiscord<jviega> I hate the async paradigm in general. I don't see why people love taking sequential programs and then obfuscating the control flow ๐Ÿ™‚
22:22:32termeras someone who does network programming, I can tell you all sorts of ways why it's useful
22:22:42termerit's not always necessary
22:22:53termerbut everything I build that uses async I expect to be able to handle thousands of people at once
22:23:14termermaybe it's stockholm syndrome, but async in general is pretty crystal clear to me
22:23:32termerEverything's async in the kernel anyway
22:24:05FromDiscord<jviega> No, everything is multi-threaded
22:24:46termerthreads are done by a scheduler that runs asynchronously
22:25:04FromDiscord<jviega> I'm fine with parallel programming in general. I've done a lot in the arena. Async is a horrible abstraction that doesn't even really get you parallelism
22:25:09termerfundamentally you have an event loop that polls hardware and dishes out events
22:25:19termersynchronous I/O without interrupts is just an abstraction
22:25:22FromDiscord<_gumbercules> colored anything sucks
22:25:53termerI'm enjoying Go, not having to think about that
22:26:01termerbut the dislike for async is really overblown
22:26:06termerit's not that hard to reason about
22:26:13FromDiscord<jviega> False. Having a fair scheduler running across potentially multiple CPU threads is 100% different than the async paradigm that is actually deterministicly executing, UNFAIR, but obfuscating your flow
22:26:56termerit's not 100% different but it is quite a bit different for sure
22:26:58FromDiscord<_gumbercules> https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
22:27:05termerKeep in mind I'm not talking about async/await
22:27:25FromDiscord<System64 ~ Flandre Scarlet> Tbhโ†ตEven if I love Nim, I don't really like how async/await works on Nim
22:27:33termerI can tell you exactly how it works
22:27:37termerI've read the entire implementation
22:27:46FromDiscord<Elegantbeef> The next line is "it doesnt"
22:27:50FromDiscord<_gumbercules> I don't like how it works in any language because again colored functions suck
22:27:55FromDiscord<jviega> Can't tell you how many times I've laughed at people who think their program works okay, change something in module A, then totally unrelated thing in module Z breaks because the interleaving of the iterator yields has changed.
22:28:00termerI wasn't gonna say that but now that's all I feel like saying Elegantbeef
22:28:09FromDiscord<yandall> Is there a way to manually free a var when using mm:orc?
22:28:27FromDiscord<Elegantbeef> `=destroy`, but why do you manually need to free anything
22:28:55FromDiscord<Elegantbeef> Note calling `=destroy` manually without disarming the destructor will double destroy
22:28:56termerIf you want to be doing manual memory management, you're free to work with raw ptr types using alloc, etc., but I don't know why you'd want to do that
22:29:06termercouldn't you do GC_unref Elegantbeef
22:29:10termerif you know it's the last usage
22:29:11FromDiscord<_gumbercules> In reply to @termer "If you want to": because you're interoping with C?
22:29:19FromDiscord<Elegantbeef> That doesnt destroy it though termer
22:29:20FromDiscord<jviega> If you say "async programming", these days that's an abstraction over an iterator yielding. It's not a real concurrent programming model even
22:29:26FromDiscord<yandall> I'm still investigating the problem but it seems that the response from a request doesn't geet freed so overtime my server keeps growing in memory size
22:29:37FromDiscord<Elegantbeef> `GCRunOrc`
22:29:54termerjviega, Kotlin's coroutines are nice
22:30:02termerCPS works similarly
22:30:20termerbreak up functions into state machines that are put into a queue
22:30:36termerbetter abstraction than promises which are shitty containers for callbacks and values
22:30:54FromDiscord<jviega> Sure, I'm okay with a bunch of other approaches. Again, I've done a ton of parallel programming.
22:30:55FromDiscord<yandall> Everytime the memory goes to 15mb is because I manually restarted the container https://media.discordapp.net/attachments/371759389889003532/1141136968021987328/image.png
22:30:57termerThe way Nim does asyncmacro is clever but really makes it hard to understand what's going on
22:31:17termerand anyway, clever never automatically meant good
22:31:42termerMy biggest issue is that async is really polarizing at a technical level when it comes to libraries
22:31:47FromDiscord<Elegantbeef> Stop wanting to do more than one operation at a time, rocks were never meant to do more than one thing
22:31:59termerI tried using Chronos but you basically had to rewrite the world or port a bunch of libs to chronos that used asyncdispatch
22:32:08termerat the same time, I really did give asyncdispatch a real college try
22:32:13termerit didn't end well
22:33:20termerChronos is probably fine but it's hard to use due to lack of documentation
22:33:52termerThe other thing is that because of all the allocation in both asyncdispatch and Chronos, you see real performance differences between refc and ORC, with ORC performing much worse
22:34:16termerWhen people talk about how fast httpbeast is, that's because it doesn't even use asyncdispatch
22:34:41termerit implements its own event loop that doesn't touch any of that stuff and interacts with the OS directly
22:35:47termerThank you for coming to my weekly asyncdispatch hate seminar
22:35:54FromDiscord<jviega> Well, generally reference counting tends to be less efficient in absolute numbers, but better amortized (no pauses).
22:36:12termerfor sure
22:36:25termerI happen to enjoy the memory efficiency gains you get from not having a GC
22:36:32termerbut it's not a silver bullet
22:36:46FromDiscord<jviega> "memory efficiency"??
22:36:51termerA lot of Rust people dunking on Go completely misunderstand that you still have to be allocating and deallocating
22:37:00termerefficiency as in you use less cause you don't have to have a GC watching things
22:37:06termerit also piles up less
22:37:44FromDiscord<jviega> Nothing. inherently more memory efficient. In fact, compacting collectors can end up with lower memory footprints, and much better locality
22:38:08termerI came from Java where I was so shaken by the horrible "allocate 1GiB and then cut it back down to 300MiB in 30 seconds" cycles that I didn't want to touch GC ever again
22:39:11termerhowever I will say this: these become non-issues if you're simply careful about not allocating too much
22:40:16termerI'm just a guy learning this stuff along the way, so I'm no expert
22:40:30termerultimately I just wanna write software that works well
22:40:47FromDiscord<jviega> Another reason I don't like Rust is, safety alone isn't enough of a reason to work EVEN HARDER than C on memory management
22:41:07termerRust lost its charm for me when I found out it has no compiler safeguards against cycles
22:42:08termerI still like the idea of Rust and will learn it someday
22:42:38termerbut right now Nim scratches my fun programming itch and Go is becoming my productivity language
22:42:39FromDiscord<Elegantbeef> > it has no compiler safeguards against cycles
22:42:43FromDiscord<Elegantbeef> Isnt it impossible to make cycles?
22:42:49termernot at all
22:43:07termeryou can read online about people being surprised that leaking memory "isn't considered unsafe"
22:43:37FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DBy
22:43:59FromDiscord<Elegantbeef> Should be nothing
22:44:10FromDiscord<heysokam> does putting it in a pragma guarantee that it will be compile time even if it has runtime things?
22:44:18FromDiscord<Elegantbeef> No
22:44:31FromDiscord<heysokam> so its not like a static block, i assume
22:44:42FromDiscord<Elegantbeef> It's just passing in an argument
22:45:03FromDiscord<heysokam> wdym?
22:45:22FromDiscord<Elegantbeef> `{.somePragma.}: body` is just annotating the body with the pragma
22:45:30FromDiscord<Elegantbeef> You cannot even use `{.myMacro.}`
22:45:32termerjviega, I'll keep doing work to try to develop something useful with CPS and then if that fails then maybe I will become blackpilled
22:45:41FromDiscord<Elegantbeef> That only applies to procs
22:45:44FromDiscord<heysokam> In reply to @Elegantbeef "`{.somePragma.}: body` is just": so it doesn't really do anything?
22:46:03FromDiscord<Elegantbeef> Depends on the context
22:46:10FromDiscord<heysokam> i wanted to do something like the `{.compile: "somefile.c".}` pragma
22:47:02FromDiscord<heysokam> but i need context on where the contents are -actually- called from
22:47:37FromDiscord<Elegantbeef> You cannot make a pragma afaik
22:47:38FromDiscord<heysokam> something like `currentSourcePath()` should return the name of the file calling the pragma/template/macro... instead of the original where it is stored
22:47:42FromDiscord<Elegantbeef> A functional pragma\
22:48:06FromDiscord<Elegantbeef> The only pragmas users can write are annotation
22:48:15FromDiscord<Elegantbeef> with the exception of Nim converting proc pragmas to macro calls
22:49:08FromDiscord<heysokam> i have this i made with your help, but i don't remember how i was using itโ†ตhttps://github.com/heysokam/nstd/blob/27a08131fedfb9f340623ca8ebb44b2d02ee3fcf/src/nstd/compile.nim#L11-L25
22:49:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4DBz
22:49:26FromDiscord<heysokam> basically it works like the compile pragma, but i don't remember if the call is a pragma or just a regular call
22:49:40FromDiscord<Elegantbeef> It's a regular call
22:49:47FromDiscord<heysokam> kk
22:49:53FromDiscord<Elegantbeef> Like I said you cannot make functional pragmas
22:50:02FromDiscord<Elegantbeef> they can only be used for annotation
22:50:04FromDiscord<heysokam> so i would need a template or a macro then, no biggie
22:50:48FromDiscord<heysokam> what should i use for this? macro?โ†ตbasically its repeated code that will be used in multiple files, with only a couple of parameters changing the behavior
22:51:44FromDiscord<heysokam> also, @ElegantBeouf, according to the comment i was invoking it from a pragma ๐Ÿค”
22:52:12FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DBB
22:52:22FromDiscord<heysokam> ah no wait... thats what it generates
22:52:33FromDiscord<heysokam> nvm sry ignore me ๐Ÿ™ˆ
22:55:18FromDiscord<Elegantbeef> I alway so
22:55:21FromDiscord<Elegantbeef> do\
22:56:49FromDiscord<jviega> lol
22:58:42FromDiscord<heysokam> tru
23:01:28FromDiscord<heysokam> how can I get the `let rootDir = projectDir()/" ???? "` origin guaranteed, so that I can find the path of the nimble file, and not the path of the `.nim` file being compiled?
23:05:18FromDiscord<Elegantbeef> macros.projectPath perhaps, i do not know
23:16:39FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DBG
23:18:34FromDiscord<graveflo> do we just use `nimble init` to set up our new project skeletons with atlas or is there a fancy new way to structure project folders?
23:18:52FromDiscord<Elegantbeef> araq says use nimble init
23:19:01FromDiscord<graveflo> sounds good to me
23:22:18FromDiscord<arne> I saw my name mentioned
23:24:45FromDiscord<levantguy> sent a code paste, see https://paste.rs/mb4mJ
23:25:29FromDiscord<krux02> @levantguy looks like a good candidate to use a `for-loop` for
23:26:31FromDiscord<Elegantbeef> A for loop in my imperative language?! I'd never!
23:30:42FromDiscord<levantguy> In reply to @arne "<@718748800478609418> looks like a": argh, I was hoping for a parameter or a way to set format
23:32:14FromDiscord<krux02> a `\x` is technically speaking not part of hexadecimal representation, it's just used as a crutch for the language to provide the context that a literal is in hexadecimal
23:33:34FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4DBJ
23:38:02FromDiscord<heysokam> is there an equivalent to `execShellCmd` for the vm during compile time?
23:38:11FromDiscord<Elegantbeef> `staticExec`
23:39:09FromDiscord<heysokam> but that's gorge
23:39:31FromDiscord<Elegantbeef> Ok?
23:39:33FromDiscord<heysokam> i need it to just run the command like normal, because its running external buildsystem commands
23:39:49FromDiscord<heysokam> gorge returns the string, which means you only get the output after it ends
23:41:09FromDiscord<Elegantbeef> Well `osProc.execCmdEx` is wrapped for the VM but aside from that you got nothing else
23:41:18FromDiscord<Elegantbeef> Wrap the call in side of a shell call that doesnt eat the stdin/out and returns the error code otherwise
23:41:42FromDiscord<Elegantbeef> I guess that doesnt work now that I said that outloud
23:41:46FromDiscord<heysokam> doesn't that mean i have to call for each platform's shell manually?
23:54:18FromDiscord<_gumbercules> In reply to @arne "I saw my name": That was me I think friend. My bad haha
23:54:34FromDiscord<_gumbercules> Hope you are well!
23:55:13FromDiscord<krux02> thanks, I am well
23:55:42FromDiscord<krux02> I am working for a startup now, doing scala programming again.
23:56:30FromDiscord<_gumbercules> Niceeee! I haven't touched Scala since working at Wargaming but I do miss it from time to time!
23:56:58FromDiscord<_gumbercules> And yeah you've definitely come full circle