<< 17-05-2022 >>

00:02:58FromDiscord<root> does anyone now what documentation i would need to read to learn to make a rev shell in nim? ive been trying to figure it out a while and i just cant
00:03:49FromDiscord<Elegantbeef> Look up how to make a reverse shell then copy that reasoning to Nim
00:04:50*noeontheend quit (Ping timeout: 240 seconds)
00:06:10FromDiscord<root> Ok
00:07:50*xet7 quit (Ping timeout: 240 seconds)
00:08:10FromDiscord<spoon> does pixie have a function for getting the value of a single pixel/a column? or will i have to resort to using data?
00:11:39FromDiscord<!Patitotective> In reply to @spoon "does pixie have a": https://nimdocs.com/treeform/pixie/pixie/images.html#getColor%2CImage%2Cint%2Cint ?
00:12:28FromDiscord<spoon> ah ty
00:17:10FromDiscord<Elegantbeef> `[x, y]` gets you pixel
00:19:46FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3XXg
00:19:52FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3XXh
00:20:02FromDiscord<Elegantbeef> You're still copying pmunch's shitty example 😄
00:20:21FromDiscord<!Patitotective> :[ is there another better example
00:20:22FromDiscord<!Patitotective> (edit) "example" => "example?"
00:20:55FromDiscord<Elegantbeef> if you have a dynamic library https://github.com/beef331/wasmedge_playground/blob/master/src/wasmedge.nim#L33-L40 is pretty nice
00:20:59*xet7 joined #nim
00:21:08FromDiscord<Elegantbeef> Is this a C source library or a system library?
00:21:56FromDiscord<!Patitotective> In reply to @Elegantbeef "Is this a C": i thing source idk
00:22:03FromDiscord<Elegantbeef> Do you have a `.so`?
00:22:08FromDiscord<Elegantbeef> do you have a `.a`
00:22:15FromDiscord<Elegantbeef> Or do you have a `.h`
00:22:23FromDiscord<Elegantbeef> It seems to be a source library
00:22:44FromDiscord<Elegantbeef> So you'll want to use futhark then do `{.compile: "path/to/my/tinyfiledialog.h".}` probably
00:25:15FromDiscord<Elegantbeef> might be the `.c` dont recall
00:27:18FromDiscord<huantian> I thought there already was a wrapper for that, might be old tho
00:27:48FromDiscord<Elegantbeef> https://github.com/search?q=dialogs+language%3Anim
00:28:42FromDiscord<Elegantbeef> nim-native-dialogs might still work
00:37:49FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3XXk
00:37:49FromDiscord<Elegantbeef> Then fix it
00:37:50FromDiscord<Elegantbeef> Jesus
00:38:08FromDiscord<Elegantbeef> If you cant get TFD to work 😄
00:38:35FromDiscord<!Patitotective> In reply to @Elegantbeef "Or do you have": h
00:38:38FromDiscord<!Patitotective> (edit) "h" => "yes"
00:38:47FromDiscord<Elegantbeef> I already told you what to do 😄
00:39:12FromDiscord<!Patitotective> omg
00:39:13FromDiscord<!Patitotective> it does work
00:39:22FromDiscord<Elegantbeef> What does
00:39:53FromDiscord<!Patitotective> i just tried notify popup but now gonna test all of them
00:40:03FromDiscord<!Patitotective> TFD
00:41:27FromDiscord<!Patitotective> two things↵1. to "rename" the procs (nim friendly), do i need to create a new proc and call the ugly proc inside?
00:42:40FromDiscord<Elegantbeef> Or you can use the rename callback like i do in wasmedge
00:42:45FromDiscord<!Patitotective> 2. how do i convert this into a libary, like make it work without having to write futhark header
00:43:10FromDiscord<Elegantbeef> You take the generate futhark file and distribute taht
00:43:18FromDiscord<Elegantbeef> You take the generated futhark file and distribute that
00:43:32FromDiscord<Elegantbeef> It's in your `.cache/nim/d_yourProjectFile/`
00:43:36*Zectbumo joined #nim
00:46:10FromDiscord<Elegantbeef> And since it's ZLib licensed you can include the C file in that library
00:46:51FromDiscord<!Patitotective> the c and the header, right?
00:47:01FromDiscord<Elegantbeef> Of course
00:48:05FromDiscord<!Patitotective> btw, is `define TINYFD_IMPLEMENTATION` actually needed, you dont seem to use it 🤨
00:52:49FromDiscord<Zectbumo> what is the real difference between a template and an inline proc? and is there a performance difference?
00:53:06FromDiscord<Elegantbeef> The real difference is one is up to the C compiler and the other is certainly inlined
00:53:17FromDiscord<Elegantbeef> You generally dont use templates for inlining you use them for other reasons
00:53:41FromDiscord<Elegantbeef> Compilers are smart and they will generally inline where they need
00:53:45FromDiscord<Zectbumo> so inline proc would be preferred over template?
00:54:33FromDiscord<Zectbumo> ... if templates weren't needed
00:54:37FromDiscord<Elegantbeef> You only really inline when you're using the procedures a lot and dont want that extra stack frame growth
00:54:48FromDiscord<Elegantbeef> Templates are not meant for a tool for inlining it's a side effect of how they work
00:55:03FromDiscord<Elegantbeef> Templates are macros-lite
00:56:05FromDiscord<Elegantbeef> Consider these https://github.com/beef331/wasmedge_playground/blob/master/src/wasmedge.nim#L112-L120
00:56:21FromDiscord<Elegantbeef> Then look at the callsite below
00:56:25FromDiscord<arkt8> sent a long message, see http://ix.io/3XXn
00:56:31FromDiscord<Elegantbeef> It's much much cleaner than manually writing the same thing 10-20 times
00:57:26FromDiscord<Elegantbeef> Issue is you forgot calling conventions
00:57:30FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3XXo
00:57:49FromDiscord<Elegantbeef> By default a procedure in a type definition is a `closure`
00:58:08FromDiscord<Elegantbeef> Whereas in this case it's actually a `cdecl` you want
00:59:57FromDiscord<Elegantbeef> The C compiler error isnt nice, but alas
01:00:09FromDiscord<arkt8> I'm still a bit confused when use or not {.cdec.}.↵↵I will focus on it... Thank you :)
01:00:10FromDiscord<Elegantbeef> Nim doesnt know you lied about the C code 😄
01:00:30FromDiscord<Elegantbeef> It's the default calling convention for C code, so you generally use it on pointer procs coming from C
01:01:54FromDiscord<arkt8> Yes... Im writting some tests for c wrapping to understand how to translate correctly
01:03:07FromDiscord<Elegantbeef> To answer the question though, you can actually cast procs to different proc types but it'll create bugs if the calling conventions dont match 😄
01:03:22FromDiscord<Elegantbeef> The only time you really cast to/from a proc is when you're doing a type erasure to a pointer
01:08:34FromDiscord<spoon> sent a code paste, see https://play.nim-lang.org/#ix=3XXq
01:08:42FromDiscord<Elegantbeef> `array[i, int]`
01:08:47FromDiscord<Elegantbeef> arrays are statically typed
01:08:59FromDiscord<Elegantbeef> `newSeq[int](i)`
01:09:28FromDiscord<!Patitotective> In reply to @Elegantbeef "It's in your `.cache/nim/d_yourProjectFile/`": `futhark_9FB241AF935DCC8E.nim`?
01:09:32FromDiscord<spoon> does shuffle work on sequences?
01:09:39FromDiscord<Elegantbeef> Yes
01:09:41FromDiscord<spoon> i tried to shuffle a sequence earlier
01:09:48FromDiscord<Elegantbeef> it takes a openarray
01:09:56FromDiscord<Elegantbeef> It works on openarrays which are sequences and arrays
01:10:49FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Chc
01:12:21FromDiscord<Elegantbeef> The funpart is even `a.toOpenArray(1, 2).shuffle` is valid
01:12:31*mjsir911 quit (Quit: Goodbye, World!)
01:12:40FromDiscord<spoon> ah, i wrote a whole iterator because i used `let` instead of `var` on accident
01:12:53FromDiscord<Elegantbeef> Time to read compiler messages
01:13:17FromDiscord<spoon> the first message said `but expression 's' is of type: seq[Image]`
01:13:22FromDiscord<Elegantbeef> `but expression 'a' is immutable, not 'var'`
01:13:23FromDiscord<spoon> threw me off
01:14:10FromDiscord<spoon> scrolling down is too hard, would rather write an iterator
01:15:00FromDiscord<spoon> but what are the restrictions on using arrays then? you have to use a seq in iterators/procedures?
01:15:10FromDiscord<Elegantbeef> what?
01:15:19FromDiscord<Elegantbeef> Arrays are statically typed that's the restriction
01:16:10FromDiscord<Elegantbeef> If the length is not known at compile time you cannot allocate on the stack
01:16:18FromDiscord<Elegantbeef> Rather should not
01:16:44FromDiscord<Elegantbeef> Arrays in Nim are both statically typed by their size and stack allocated
01:16:49*mjsir911 joined #nim
01:16:57FromDiscord<Elegantbeef> As such they are not used for dynamism
01:17:47FromDiscord<spoon> weird, specified length there
01:17:55FromDiscord<Elegantbeef> What?
01:19:23FromDiscord<Elegantbeef> if you mean `array[i, int]` yes you specified a length with is derived from a runtime value and as such is unknown
01:19:44FromDiscord<spoon> ah
01:20:04FromDiscord<Elegantbeef> It's a simple case of "How much memory should it allocate for this array"
01:20:23FromDiscord<Elegantbeef> And if you cannot answer that question statically it should not be stack allocated
01:20:51FromDiscord<Elegantbeef> As such you use a sequence
01:21:33FromDiscord<Zectbumo> !evail↵import std/[strformat, strutils]↵var s = &"boo".unindent
01:21:52FromDiscord<Zectbumo> (edit) "!evail↵import" => "!evail import" | "strutils]↵var" => "strutils]; var"
01:22:08FromDiscord<Zectbumo> !evail import std/[strformat, strutils]; var s = &"boo".unindent
01:22:16FromDiscord<Zectbumo> evail 🙂
01:22:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XXr
01:22:52FromDiscord<Elegantbeef> or
01:24:22FromDiscord<Zectbumo> it's a bummer that the formatter doesn't get preference
01:24:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XXs
01:24:37FromDiscord<Elegantbeef> Well it binds to the statement
01:24:55FromDiscord<Elegantbeef> Consider `$some.complex.dot.statement`
01:25:01FromDiscord<Zectbumo> yeah \:(
01:25:47FromDiscord<Zectbumo> right, but this is a string{lit} macro. it should bind to the " not get bumped out
01:25:48FromDiscord<Elegantbeef> `fmt"boo".unindent` does work
01:26:18FromDiscord<Zectbumo> well, maybe & shouldn't require a string{lit} then
01:26:18FromDiscord<Elegantbeef> How can you know you wanted the macro and not another operator?
01:26:40FromDiscord<Zectbumo> because one is an error and the other isn't
01:26:52FromDiscord<Elegantbeef> You cannot have a compiler work based off which compiles
01:26:58FromDiscord<Zectbumo> (edit) "because one is ... an" added "always"
01:27:02FromDiscord<Elegantbeef> That's an unpredictable compiler with very shitty semantics
01:27:25FromDiscord<Zectbumo> or smart one 🙂
01:28:43FromDiscord<Zectbumo> but, thanks, I'll use the command syntax one you gave me
01:28:52FromDiscord<Elegantbeef> It's not smart
01:29:19FromDiscord<Elegantbeef> "X compiles so we use it" is not a smart compiler it's unpredictable
01:30:28FromDiscord<Elegantbeef> consider `&a.b.c` where `c(&(a.b))` is valid but `&(a.b.c)` is invalid
01:30:47FromDiscord<Elegantbeef> Now to reason about what the compiler is doing you need to know what compiles in the statement
01:31:30FromDiscord<Elegantbeef> Versus going "Ah yes all unary operators bind tightly to the statement they are attached to"
01:31:37FromDiscord<!Patitotective> im having an issue, `tinyfd_inputBox` `aDefaultInput` parameter expects a cstring↵and depending supposedly, if it is `""`, it will create an inputBox but if it is `NULL`, it will create a passwordBox↵but, whether i pass `""` or `NULL` it creates a passwordBox
01:31:50FromDiscord<!Patitotective> (edit) "`tinyfd_inputBox` `aDefaultInput`" => "`tinyfd_inputBox(.., aDefaultInput=`"
01:31:55FromDiscord<!Patitotective> (edit) "aDefaultInput=`" => "aDefaultInput)`"
01:32:13FromDiscord<!Patitotective> (edit) "cstring↵and" => "cstring↵and, supposedly," | "supposedly," => "on"
01:32:48FromDiscord<Elegantbeef> How are you calling it?
01:33:22FromDiscord<!Patitotective> `inputBox("Name", "Please enter your name :]", " ")`?
01:33:29FromDiscord<!Patitotective> they are of course cstrings
01:33:37FromDiscord<Elegantbeef> sure
01:33:45FromDiscord<Elegantbeef> And for the password?
01:34:19FromDiscord<!Patitotective> `inputBox("Name", "Please enter your name :]", "")` or `nil`, gives the same result
01:34:45FromDiscord<!Patitotective> In reply to @Elegantbeef "sure": yet it fills the input box with a space, which is a not nice
01:35:05FromDiscord<Elegantbeef> Well you did `" "`
01:35:06FromDiscord<Elegantbeef> So yea
01:35:11FromDiscord<Elegantbeef> That's what you get for passing a space
01:35:25FromDiscord<!Patitotective> but if i dont it will make it a passwor box :Ñ
01:35:26FromDiscord<!Patitotective> (edit) ":Ñ" => ":["
01:35:39FromDiscord<Elegantbeef> "\\0"
01:35:51FromDiscord<Elegantbeef> Didnt you say it wasnt working?
01:36:08FromDiscord<Elegantbeef> Oh you heavily edited the message
01:36:18FromDiscord<!Patitotective> hehe
01:36:21FromDiscord<!Patitotective> In reply to @Elegantbeef ""\\0"": nope
01:37:02FromDiscord<!Patitotective> maybe its something about how c interprets `if (aDefaultInput)` (?)
01:37:36FromDiscord<Elegantbeef> It should be a check if it's null
01:37:49FromDiscord<Elegantbeef> non-zero is true 0 is false iirc
01:37:52FromDiscord<Elegantbeef> Might have that backwards
01:39:01FromDiscord<!Patitotective> well `\0` does not work? maybe settings cstrings length or something 🤷‍♂️
01:39:07FromDiscord<!Patitotective> (edit) "work? maybe" => "work↵maybe"
01:39:15FromDiscord<Elegantbeef> "settings cstrings length" 😄
01:39:29FromDiscord<!Patitotective> :[
01:39:32FromDiscord<Elegantbeef> Cstrings dont have lengths
01:40:26FromDiscord<Elegantbeef> You can try `\1` or other non printable character
01:40:38FromDiscord<Elegantbeef> But that's not going to end well either
01:40:42FromDiscord<Elegantbeef> Seems like you get to fix C code
01:40:56FromDiscord<!Patitotective> lul https://media.discordapp.net/attachments/371759389889003532/975935922656915456/unknown.png
01:41:07FromDiscord<!Patitotective> In reply to @Elegantbeef "Seems like you get": 😨
01:41:14FromDiscord<Elegantbeef> Right this if for guis
01:41:31FromDiscord<!Patitotective> what would i say instead of `if (aDefaultInput)`?
01:41:59FromDiscord<Elegantbeef> I dont have the fucking code now do i
01:41:59FromDiscord<!Patitotective> (edit) "say" => "write"
01:42:34FromDiscord<!Patitotective> ugh sourceforge is not-nice, too plain↵i cannot reference a line
01:42:40FromDiscord<!Patitotective> nvm i ca
01:42:42FromDiscord<!Patitotective> (edit) "ca" => "can"
01:42:42FromDiscord<!Patitotective> lol
01:43:05FromDiscord<!Patitotective> https://sourceforge.net/p/tinyfiledialogs/code/ci/master/tree/tinyfiledialogs.c#l1225
01:43:56FromDiscord<Elegantbeef> That's the windows API
01:46:31FromDiscord<!Patitotective> https://sourceforge.net/p/tinyfiledialogs/code/ci/master/tree/tinyfiledialogs.c#l2905
01:46:42FromDiscord<Elegantbeef> Or atleast that looks like windows code
01:48:26FromDiscord<Elegantbeef> Yep i dont know what to say fix the code
01:48:26FromDiscord<Elegantbeef> 😄
01:48:44FromDiscord<Elegantbeef> Either fix nim-native-dialogs or tinyfiledialog
01:49:18FromDiscord<!Patitotective> tinyfiledialog has color chooser and notif popup so i guess ill try to fix it :]
01:59:49FromDiscord<!Patitotective> to fix it i should fork it, right?
02:04:16FromDiscord<!Patitotective> it seems like sourceforge doesnt have "that"
02:05:19FromDiscord<!Patitotective> omg im so stupid
02:05:24FromDiscord<!Patitotective> it was just ther
02:08:08FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=3XXx
02:08:12FromDiscord<ambient> mainly wondering the pointer arithmetic. from C/asm point of view it's very simple
02:09:09FromDiscord<ambient> basically every iteration it just increments the next memory location by 2 x float64
02:13:55*Zectbumo quit (Remote host closed the connection)
02:18:59*Zectbumo joined #nim
02:40:26*byanka quit (Quit: Leaving)
02:40:31FromDiscord<Elegantbeef> could do `for tq in countup(0, ls, 2)`
02:43:27FromDiscord<Elegantbeef> other than that dont know how to make it anymore expressive @ambient
02:44:09*Zectbumo left #nim (#nim)
02:46:07FromDiscord<Zectbumo> what is strutils.normalize used for? It just says what it's not used for↵https://nim-lang.org/docs/strutils.html#normalize%2Cstring
02:50:41FromDiscord<huantian> Ig it’s just for if you need to toAsciiLower and remove ‘_’ at the same time
02:50:48FromDiscord<huantian> No idea why you’d need that tho either
02:51:29FromDiscord<huantian> ig if you want osmething to be completely case and underscore insensitive
02:51:47FromDiscord<huantian> as opposed to nim idents which are case insensitive not for first char
02:52:43FromDiscord<treeform> In reply to @spoon "does pixie have a": Just `image[x, y]` or you can also use `image.unsafe[x, y]` for faster no-bounds checking.
03:04:17FromDiscord<Zectbumo> In reply to @huantian "No idea why you’d": yeah, I have not seen this sort of need and the closest thing would be nim identifiers and it doesn't even do that, so...
03:05:48FromDiscord<Zectbumo> https://nim-lang.org/docs/manual.html#modules-import-statement↵how would one know that import can use brackets to import a list? `import std/[a,b,c]`
03:06:13FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#modules-collective-imports-from-a-directory
03:06:22FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#modules-pseudo-importslashinclude-paths
03:10:19FromDiscord<Zectbumo> oh 🙂 I thought I had read it and then was confused how I knew this
03:12:45FromDiscord<Zectbumo> neat I want to try pkg
03:15:00FromDiscord<Zectbumo> aw I did `import pkg/pylib` and used it but I was hoping for an automatic nimble fetch when I did `nim r`
03:15:24FromDiscord<Elegantbeef> Nope you need the `requires` or it already installed
03:15:37FromDiscord<Zectbumo> oh! requires will do it?
03:15:45FromDiscord<Elegantbeef> Well if it's in your nimble file
03:16:17FromDiscord<Zectbumo> how do I use requires?
03:17:07FromDiscord<Elegantbeef> You make a nimble file
03:17:47FromDiscord<Elegantbeef> https://github.com/nim-lang/nimble#creating-packages
03:34:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XXF
03:36:32FromDiscord<Zectbumo> yeah I've been doing the brackets and was wondering why indention isn't just used like it is in a lot of places in the lang
03:37:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XXH
03:37:33FromDiscord<Elegantbeef> The issue is that parsing
03:38:09FromDiscord<Zectbumo> yeah. and I guess it follows the punctuation at the end rule which then you can't do the second import on std/
03:38:14FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3XXI
03:38:20FromDiscord<Elegantbeef> yep
03:38:39FromDiscord<Elegantbeef> `/` is an infix so std and re are parsed, but `strutils` cannot be parsed
03:38:43FromDiscord<Zectbumo> @ElegantBeef you mentioned in the other channel wrong way to suggest. I see now there is an #internals that talks about nim compiler but where do I start the discussion?
03:39:13FromDiscord<Elegantbeef> A well written RFC i think is the proper way to talk about this
03:39:40FromDiscord<Zectbumo> oh well, I don't want to write an entire RFC and then it be a "stupid idea" or "well, you can just do this"
03:40:19*noeontheend joined #nim
03:40:21FromDiscord<Zectbumo> I guess I chat in #main about it
03:40:32*nsyd joined #nim
03:40:55FromDiscord<Elegantbeef> Well then you dont want to propose your idea
03:41:02FromDiscord<Elegantbeef> Based off of what araq has said i'm fairly cetain he'd agree with your suggestion somewhat, but I could be 100% wrong
03:41:44FromDiscord<Zectbumo> oh I do. I can write the RFC for this. I'm talking about other ideas. If you think it's good I'll write one
03:42:05FromDiscord<Elegantbeef> I mean i was just saying where to properly address your suggestions
03:42:15FromDiscord<Elegantbeef> If you feel like spending the time writing an RFC for it then you do you
03:44:02FromDiscord<Zectbumo> where can I see the past suggested RFCs?
03:48:02*rockcavera quit (Remote host closed the connection)
03:48:56FromDiscord<Zectbumo> I found https://github.com/nim-lang/RFCs but this is talking about stuff that is accepted? where are the rejected ones? and milestones is empty :/
03:50:36FromDiscord<Elegantbeef> https://github.com/nim-lang/RFCs/issues?q=is%3Aissue+is%3Aclosed
04:11:11*slowButPresent quit (Quit: ERC 5.4 (IRC client for GNU Emacs 28.1))
04:11:18*noeontheend quit (Ping timeout: 276 seconds)
04:19:30FromDiscord<Zectbumo> if I do `const myConst = someProc()` and someProc is never used outside of compiling, is it stripped away from the executable?
04:19:47FromDiscord<Elegantbeef> Only used code is included
04:20:14FromDiscord<Zectbumo> "used" in the runtime, I presume
04:20:53FromDiscord<Elegantbeef> Yes `const` is evaluated at compile time so the procedure is not included
04:31:33FromDiscord<Zectbumo> this language is so cool I can't get over it↵`Digits + Letters + "_-+.@".toSet`
04:32:26FromDiscord<Elegantbeef> You're welcome for that toset 😄
04:32:44FromDiscord<Zectbumo> that was you? 👏
04:33:22FromDiscord<Elegantbeef> you also could just you know `{'_', "-", "+', '.' , '@'}` 😄
04:33:55FromDiscord<Zectbumo> yeah, I'm lazy 😛
04:33:55FromDiscord<Elegantbeef> single quotes of course
04:34:49FromDiscord<Zectbumo> I'm just going to `const` it and it all gets stripped away anyway. 0 performance hit. this is why I'm just jaw dropped right now
04:34:58FromDiscord<Elegantbeef> Ah
04:35:24FromDiscord<Elegantbeef> Yea i have a toy wave function collapse implementation and using bitsets was quite a fun experience
04:35:39FromDiscord<Zectbumo> lazy and zero impact. I just love it
04:36:34FromDiscord<Zectbumo> that sounds cool. @ElegantBeef so what cool stuff are you doing with that wasmedge?
04:36:56FromDiscord<Elegantbeef> simplescreenrecorder-2022-05-16\_02.01.00.mp4 https://media.discordapp.net/attachments/371759389889003532/975980215530561536/simplescreenrecorder-2022-05-16_02.01.00.mp4
04:37:08FromDiscord<Elegantbeef> This is the present toy project that i've started implementing for testing it
04:37:28FromDiscord<Zectbumo> aw fun
04:37:46FromDiscord<Elegantbeef> Premise is scripted AI compete against eachother
05:06:07*byanka joined #nim
05:24:23FromDiscord<Zectbumo> @ElegantBeef can wasmedge be used to run a local nim playground?
05:25:00FromDiscord<Elegantbeef> I mean it can be used for scripting and hot code reload-esque things
05:26:39FromDiscord<Zectbumo> oh I saw the other day there are hot reload flags in nim. I want to try that out
05:26:51FromDiscord<Elegantbeef> They dont work well afaik
05:41:21FromDiscord<0st guy on the list> In reply to @planetis "Fuck rust you should": i am afraid no
05:53:36*byanka quit (Read error: Connection reset by peer)
06:18:25FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3XYa
06:20:02FromDiscord<demotomohiro> I think return type of your proc is `T`.
06:20:25FromDiscord<Phil> Still explodes
06:22:54FromDiscord<Rika> I haven't tried this
06:22:57FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3XYb
06:24:54FromDiscord<huantian> https://play.nim-lang.org/#ix=3XYc
06:25:22FromDiscord<huantian> UFC generic moment
06:25:40FromDiscord<demotomohiro> Or `s.parseEnun[:T]()`
06:26:36FromDiscord<Phil> In reply to @Rika "I haven't tried this": Still explodes, same error
06:27:17FromDiscord<Phil> That.... works. Why the colon?
06:27:22FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#procedures-method-call-syntax
06:27:23FromDiscord<Phil> That's the first time I've seen it used like this
06:28:44FromDiscord<huantian> Yeah you either have to use colon or don’t write it with `.`
06:35:44FromDiscord<demotomohiro> https://wandbox.org/permlink/tspfZlOeb3V1XaQj
06:36:10FromDiscord<Rika> In reply to @demotomohiro "Or `s.parseEnun[:T]()`": I forgot about that lol
06:41:47FromDiscord<demotomohiro> Nim uses `[]` for both array/seq and for generic parameters that cause problem like this.↵ascii code has few parenthesis like charactor and programming languages have to reuse same charactor for different things.
06:46:31FromDiscord<demotomohiro> If Nim used parenthesis like charactors like 【】or「」 for generics parameter, you dont need to write `s.parseEnum[:T]()`. You can write `s.parseEnum【T】()`.
06:48:57FromDiscord<Zectbumo> In reply to @root "does anyone now what": you didn't get it going?
06:52:09FromDiscord<Phil> In reply to @demotomohiro "If Nim used parenthesis": ... I think I'll take the colon, special parenthesis characters sounds like absolute carnage
06:52:29FromDiscord<Rika> In reply to @demotomohiro "If Nim used parenthesis": It would be difficult for users of ANSI keyboards to type these
06:56:19FromDiscord<Phil> I kinda wish I had a need for some sort of really fast python module.↵I'm kinda itching to take nimpy for a spin, but I don't really have a usecase
06:59:42FromDiscord<demotomohiro> Making a keyboard that has '【' and '】' keys would make programming slightly easier.
07:00:47FromDiscord<Zectbumo> In reply to @Isofruit "I kinda wish I": make a game or demo scene
07:01:59FromDiscord<Phil> In reply to @Zectbumo "make a game or": Not a gamedev 😄 ↵Maybe once I've got my project out I'll ask a couple folks I know that program in python if they need an algorithm in something fast
07:02:00FromDiscord<Zectbumo> In reply to @demotomohiro "Making a keyboard that": what keys are those? 😅
07:02:16*nsyd quit (Ping timeout: 272 seconds)
07:03:35FromDiscord<demotomohiro> They are keys to just type '【' and '】'.
07:04:22FromDiscord<Zectbumo> do you use that as operators? what do they do?
07:04:51FromDiscord<Zectbumo> oh, reading above
07:06:49FromDiscord<Zectbumo> I see now. some futuristic programming keyboard
07:07:48FromDiscord<Zectbumo> Neuralink will take over and keyboards obsolete by then. Elon's got you covered
07:07:51FromDiscord<Rika> In reply to @Isofruit "I kinda wish I": Why?
07:08:21FromDiscord<Rika> In reply to @Zectbumo "Neuralink will take over": Probably by then AI would code for us and we’d all be fucked from a job
07:10:38FromDiscord<Zectbumo> wouldn't it be a crazy world if us developers don't lose our jobs but actually we turned into mental therapists for the AI that took our jobs.
07:12:12FromDiscord<Zectbumo> AI: I totally messed this program up and I don't know why I did this. ↵Therapist Former Dev: Well, what thoughts did you have as a child (1 minute ago)
07:14:24FromDiscord<Phil> In reply to @Rika "Why?": It seems fun to write something in python with access to a billion and one pre-made module and then the one part where python is actually slow can be made fast by outsourcing it into nim
07:16:48FromDiscord<Zectbumo> so, python just because of the module base size
07:18:56FromDiscord<0st guy on the list> In reply to @demotomohiro "Making a keyboard that": https://tenor.com/view/talos-talosian-star-trem-star-trek-big-head-gif-12496470
07:22:16FromDiscord<uinjei> how can I stop antivirus from deleting my application?
07:30:02FromDiscord<Rika> In reply to @uinjei "how can I stop": Report false positive to antivirus and disable it for now
07:39:20*ltriant quit (Ping timeout: 260 seconds)
07:39:39*xet7 quit (Ping timeout: 240 seconds)
07:40:05FromDiscord<0st guy on the list> bruh guys why is my compiler going mad!?!?!
07:41:18FromDiscord<0st guy on the list> sent a code paste, see https://paste.rs/QrO
07:53:06*xet7 joined #nim
07:58:38FromDiscord<0st guy on the list> this lib is kinda sus dude
08:01:38FromDiscord<jmgomez> Is the forum down?
08:02:24FromDiscord<jmgomez> it seems it's back now
08:03:06FromDiscord<jmgomez> can I send over via FFI a seq via an open array?
08:07:22*ehmry quit (Ping timeout: 250 seconds)
08:12:31*ehmry joined #nim
08:18:52FromDiscord<Elegantbeef> You can send it over as a address to the first value and a length(this is what an open array is)
08:19:09FromDiscord<Elegantbeef> Aslong as you ensure it stays alive
08:19:27FromDiscord<Elegantbeef> Arc/Orc are a bit more annoying to do this with than refc
08:19:42FromDiscord<Elegantbeef> Refc was capable of making seq/strings stay alive longer than their scope
08:21:03FromDiscord<everyone> can someone help me?
08:22:27FromDiscord<Phil> Could you post the compile command you executed?
08:22:56FromDiscord<everyone> sent a code paste, see https://play.nim-lang.org/#ix=
08:23:19FromDiscord<Phil> Can you write a minimal example that causes that behaviour?
08:23:36FromDiscord<everyone> In reply to @Isofruit "Can you write a": you mean the code?
08:24:14FromDiscord<Phil> Basically a stripped down version of the code, just enough to produce the above behaviour↵At a glance I can't really say what's exploding, but I'd assume some usage of a specific library is a culprit
08:24:47FromDiscord<everyone> In reply to @Isofruit "Basically a stripped down": well actually it's just the example code of drawing shapes i got from github
08:24:59FromDiscord<everyone> sent a code paste, see https://play.nim-lang.org/#ix=3XYj
08:25:01FromDiscord<everyone> T H I S
08:25:51FromDiscord<Phil> Huh... turns out that thing isn't in nimble, is it
08:25:55FromDiscord<Phil> (edit) "it" => "it?"
08:26:03FromDiscord<everyone> In reply to @Isofruit "Huh... turns out that": nooooouuu
08:26:54FromDiscord<Phil> Could you link the raylib package you're using?
08:27:15FromDiscord<everyone> https://nimble.directory/pkg/naylib
08:27:27FromDiscord<Phil> it's called naylib, ahhhh
08:27:44FromDiscord<everyone> In reply to @Isofruit "it's called naylib, ahhhh": lol
08:28:50FromDiscord<everyone> sooooooo what should i do?
08:29:08FromDiscord<Rika> It still says raylib isn’t found
08:29:21FromDiscord<Rika> So you probably have to make the C compiler aware of where you installed it
08:29:31FromDiscord<everyone> In reply to @Rika "So you probably have": hmmmm
08:29:34FromDiscord<everyone> how me do thet
08:29:55FromDiscord<Rika> I forgot 👁️ 👄 👁️
08:30:07FromDiscord<Elegantbeef> Seems you're supposed to use `nayget`
08:30:31FromDiscord<everyone> In reply to @Rika "I forgot 👁️ 👄": 💀
08:30:44FromDiscord<everyone> In reply to @Elegantbeef "Seems you're supposed to": now what on earth is this?
08:31:08FromDiscord<Elegantbeef> A binary installed when you installed naaylib
08:31:27FromDiscord<Elegantbeef> you should be able todo `nayget build` and it then might work
08:31:37FromDiscord<Elegantbeef> Idk planetis doesnt have informative docs
08:31:41FromDiscord<Elegantbeef> The only ones i've seen worse are mine
08:31:48FromDiscord<everyone> In reply to @Elegantbeef "The only ones i've": lol
08:32:13FromDiscord<everyone> nope i can't use `naylib`
08:32:32FromDiscord<Elegantbeef> no one said use `naylib`
08:32:54FromDiscord<Phil> sidenote, I did do a nimble install naylib
08:33:06FromDiscord<everyone> In reply to @Elegantbeef "no one said use": oops
08:33:08FromDiscord<everyone> sory
08:33:08FromDiscord<Phil> If I run `nayget` i just get command not found, so not sure
08:33:10FromDiscord<Elegantbeef> Shit arent you talented
08:33:10FromDiscord<everyone> hehhe
08:33:16FromDiscord<everyone> In reply to @Elegantbeef "Shit arent you talented": thenks
08:33:35FromDiscord<Elegantbeef> Seems planetis didnt setup the project properly
08:33:39FromDiscord<Phil> I accept all glory for being able to run `nimble install`, praise my intellect
08:33:43FromDiscord<Elegantbeef> Make an issue and carry on with your day or use raylib now
08:33:47FromDiscord<everyone> well `nayget` ain't working aswell
08:34:38FromDiscord<everyone> is this `planetis` guy on the server?
08:34:48FromDiscord<Zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=3XYG
08:34:53FromDiscord<Elegantbeef> Yes they are but come one github issues exist
08:35:05FromDiscord<Phil> In reply to @uncle jim "is this `planetis` guy": giiiiithuuuub iisssuuuueeees
08:35:06FromDiscord<Elegantbeef> Yep there you go zect
08:35:33FromDiscord<Elegantbeef> I mean like i said has is ambiguous
08:35:48FromDiscord<Zectbumo> (edit) "https://play.nim-lang.org/#ix=3XYG" => "https://play.nim-lang.org/#ix=3XYH"
08:35:49FromDiscord<Zectbumo> (edit) "https://play.nim-lang.org/#ix=3XYH" => "https://paste.rs/wwr"
08:36:00FromDiscord<Elegantbeef> It seems like something you expect in a `when has a.b` which is just syntax sugar for `compiles(a.b)`
08:36:07FromDiscord<Rika> In reply to @Zectbumo "I'm really liking `has`": If you prefer that sure it works
08:36:28FromDiscord<Elegantbeef> Fewer characters is not more opaque
08:36:50FromDiscord<Elegantbeef> Guess transparent is more correct for my point
08:37:28FromDiscord<planetis> @everyone\: you tried to compile it first?
08:37:28FromDiscord<Elegantbeef> We've summoned planetis
08:37:38FromDiscord<Rika> Lmao
08:37:39FromDiscord<Elegantbeef> Why dont you ship the binary planetis?
08:37:54FromDiscord<Elegantbeef> Like why do you make the user fetch the sources to run your `nayget` tool?
08:38:47*xet7 quit (Remote host closed the connection)
08:38:59FromDiscord<planetis> Wdym
08:39:16FromDiscord<Elegantbeef> Why does `nimble install naylib` not work
08:39:16FromDiscord<Rika> You can make nimble install binaries
08:39:42FromDiscord<Elegantbeef> Picostdlib, Nico, karax all install binaries to make this process seemless
08:40:02FromDiscord<planetis> I don't use nimble no idea how to make it work
08:40:05FromDiscord<everyone> In reply to @planetis "<@856412455507984404>\: you tried to": you mean to convert it into a exe?
08:40:17FromDiscord<Elegantbeef> Well refer to the three packages i suggested
08:41:00FromDiscord<planetis> There is a huge wall of text in the readme and nowhere what I am looking for
08:41:14FromDiscord<planetis> Like I can't overload task install
08:41:22FromDiscord<Elegantbeef> https://github.com/beef331/picostdlib/blob/master/picostdlib.nimble#L9
08:41:32FromDiscord<jmgomez> In reply to @Elegantbeef "You can send it": okay, thanks. Will revisit it, I end up using std::vector since the target platform is cpp
08:41:49FromDiscord<everyone> but why the hell am i getting this cryptic stuff
08:41:54*xet7 joined #nim
08:42:06FromDiscord<Elegantbeef> Shitty terminal
08:42:16FromDiscord<everyone> https://media.discordapp.net/attachments/371759389889003532/976041952426467358/message.txt
08:42:34FromDiscord<everyone> In reply to @Elegantbeef "Shitty terminal": vscode
08:42:43FromDiscord<Elegantbeef> Shitty shell
08:42:57FromDiscord<everyone> In reply to @Elegantbeef "Shitty shell": pwsh
08:43:06FromDiscord<Elegantbeef> Did i stutter
08:43:18FromDiscord<planetis> I will pbl revert to nake again
08:43:24FromDiscord<planetis> Kinda workef
08:43:25FromDiscord<Elegantbeef> Why?
08:43:31FromDiscord<planetis> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/976042240617115678): Kinda worked
08:43:52FromDiscord<Elegantbeef> I mean i guess it's a bit better than maintaining your own build tool
08:44:19FromDiscord<planetis> Because I don't need to teach someone to compile it
08:44:31FromDiscord<Elegantbeef> I mean if you ship nayget you dont have to
08:44:51FromDiscord<Elegantbeef> you can do what impbox does for nico and have a `nayget init` which setups a project
08:45:15FromDiscord<planetis> Ok I will check nico
08:45:37FromDiscord<Elegantbeef> I mean it's up to you dont feel pressured to support a build tool
08:45:40FromDiscord<Elegantbeef> It's your software 😄
08:48:55FromDiscord<planetis> no I want to fix this crap
08:49:02FromDiscord<planetis> once and for all
08:50:28FromDiscord<planetis> also is that windows?
08:50:45FromDiscord<Elegantbeef> Sounds like it
08:50:58FromDiscord<planetis> tough luck I haven't ported it to windows
08:51:02FromDiscord<planetis> I don't use it
08:51:27FromDiscord<Elegantbeef> So then yep looks like raylib now is your best bet
08:51:50FromDiscord<planetis> help needed: https://github.com/planetis-m/naylib/issues/1
08:56:46FromDiscord<planetis> https://github.com/karaxnim/karax/blob/master/karax.nimble#L15 it's that freaking simple?
08:56:59FromDiscord<Elegantbeef> Yes
08:57:07FromDiscord<Elegantbeef> That plus the `installExt`
08:57:15FromDiscord<Elegantbeef> It then makes your package a hybrid nimble package
09:04:44FromDiscord<planetis> Is it too much to just clone the whole repo? Why all that bs
09:06:27FromDiscord<planetis> Anyway, my workflow is just git clone and I will keep supporting that
09:07:47FromDiscord<Elegantbeef> Just to be clear you submitted a package to the nimble repository that doesnt work if installed through a package manager?
09:08:39FromDiscord<planetis> haha, no it should work
09:09:08FromDiscord<planetis> And there are more package managers that use nim-lang/packages
09:09:38FromDiscord<planetis> like atlas and nymph
09:09:47FromDiscord<Elegantbeef> Afaik they still abide by `bin`
09:11:00FromDiscord<Elegantbeef> Anyway i'll go back to my troll hole
09:11:06FromDiscord<planetis> not atlas
09:11:36FromDiscord<planetis> I'll go get a troll haircut
09:14:18FromDiscord<planetis> thanks for the help beef
09:30:59FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3XYR
09:31:30FromDiscord<jmgomez> (edit) "https://play.nim-lang.org/#ix=3XYR" => "https://play.nim-lang.org/#ix=3XYS"
09:32:04FromDiscord<jmgomez> (My intention is to use delete on the cpp side of things later on)
09:32:42FromDiscord<Elegantbeef> One is a vector vector the other is just a vector
09:34:00FromDiscord<jmgomez> but where is that repetition coming from?
09:35:20FromDiscord<Elegantbeef> also `let v = ptrV[]` is going to copy the vector
09:35:40FromDiscord<Elegantbeef> No clue why it's duplicating
09:36:56FromDiscord<jmgomez> In reply to @Elegantbeef "also `let v =": ohh. Thanks, this better? (ptrV[]).add(x)
09:39:17FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3XYW
09:39:34FromDiscord<jmgomez> notice it retuns poitner now instead of ptr StdVector[T]
09:50:51FromDiscord<eyecon> @KatrinaKitten would you be interested in a PR for the validate function we briefly discussed?
09:53:36*ltriant joined #nim
09:56:12FromDiscord<Clonkk> Anyobdy here uses "nim.projectMapping" with Saem's VSCode extension ?
10:01:10FromDiscord<tandy> you should make a cpp ffi library \:)↵(@jmgomez)
10:05:32*vicecea quit (Ping timeout: 260 seconds)
10:13:38FromDiscord<jmgomez> In reply to @tandy "you should make a": sorry, not following, what do you mean?
10:13:54FromDiscord<jmgomez> like exporting a cpp lib instead of ffi?
10:14:22FromDiscord<tandy> no i mean you should make a nimble package with useful things like that code snippet↵(@jmgomez)
10:16:54FromDiscord<jmgomez> In reply to @tandy "no i mean you": ohh, I was wondering why there isnt one already. I only exported that as temporary workaround for something else Im working on. But my spare nim "contribute back" time is all taken by unreal engine 5 bindings 😅
10:17:32FromDiscord<jmgomez> having nim bindings for std I think it's a great idea
10:18:31FromDiscord<Recruit_main707> In reply to @tandy "you should make a": there is already one
10:18:51FromDiscord<Recruit_main707> with vectors, strings and smart pointers i think
10:41:48FromDiscord<demotomohiro> In reply to @tandy "you should make a": https://github.com/Clonkk/nim-cppstl
10:49:15*xet7 quit (Remote host closed the connection)
11:03:05FromDiscord<tandy> oh nice↵(@Recruit_main707)
11:08:47FromDiscord<planetis> uncle jim, I confirmed nimble install works now
11:10:14FromDiscord<planetis> but uncle someone needs to be kind enough to add a when defined(windows) branch in the top of raylib.nim with the correct passL command for windows.
11:10:24FromDiscord<planetis> I can do it but I have no way to test it
11:12:54*xet7 joined #nim
11:22:51FromDiscord<ambient> I wonder how much of stuff like this https://forum.nim-lang.org/t/6164 is just somewhere in Discord log
11:28:45FromDiscord<Rika> A good bit of it
11:32:55FromDiscord<ambient> because in many ways it's better than the official documentation 😢
11:35:01FromDiscord<Gibbons> Hello, I have a certainly dumb question but I'm starting now to learn Nim so...↵As far as I understand there is no real constructor for objects, so my question is: how should I approach a situation where I want to validate a value during object creation?↵Say for example i have a GrownMan object with name and age, and I want to restrict by age...
11:35:26*rockcavera joined #nim
11:35:26*rockcavera quit (Changing host)
11:35:26*rockcavera joined #nim
11:41:43FromDiscord<Recruit_main707> even though constructors arent a thing as such the usual approach is to create a function that acts as one and use that
11:42:41FromDiscord<Recruit_main707> for example:↵`proc newDisplay(title: string; w, h: int32; ): ref RayDisplay =`↵` result.width = w`↵` result.height = h...`
11:51:08FromDiscord<Gibbons> @Recruit_main707 thanks... but wouldn't it still be possible to create the object such as var x = GrownMan(name: "bob", age: 20) without involving newDisplay()?
11:54:31FromDiscord<Recruit_main707> i think so, im not sure if you can avoid it
11:54:53FromDiscord<Recruit_main707> (edit) "i" => "~~i" | "so," => "so~~ yes,"
11:56:20FromDiscord<Gibbons> It's ok... i'm afraid not, that's why I was asking if this situation has an approach I didn't know about in Nim... the point is that I am writing a small library that does things with IP addresses, and I followed the logic of Python's ipaddress module, where you can IPAddress('192.168.0.1') and if you pass stuff like '192.168.1.666' it will raise an exception
11:58:12FromDiscord<Gibbons> I wanted to keep that idea somehow... so my idea was, at this point, to let the fields of the object "private" and force to do something like: var myIP = IPAddress() and then try myIP.init('192.168.666.0') except ValueError bla bla bla
11:58:51FromDiscord<Gibbons> I just wanted to make sure I'm not going on a path that is far away from the Nim's way of designing stuff, if this makes any sense
12:06:00FromDiscord<Recruit_main707> yeah, its a normal question dont worry
12:06:22FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=3XZn
12:11:01*noeontheend joined #nim
12:17:07*slowButPresent joined #nim
12:17:18FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=3XZq
12:28:46FromDiscord<ambient> sent a code paste, see https://paste.rs/aBE
12:29:40FromDiscord<Rika> If is runtime
12:29:44FromDiscord<Rika> Types don’t exist runtime
12:29:50FromDiscord<Rika> You need to use when for compile time
12:29:58FromDiscord<ambient> oh i see
12:53:47NimEventerNew thread by Ingo: To enum type and back, see https://forum.nim-lang.org/t/9160
12:58:08FromDiscord<Clonkk> Have you checked https://github.com/SciNim/nimfftw3 if yo uwant to calculate FFT from Arraymancer Tensor ?↵(@ambient)
13:03:26FromDiscord<ambient> @Clonkk yeah my issue with C/C++ based libs is that how well I can reason about them and how easily they can be ported is a question mark
13:03:57FromDiscord<ambient> for example if I have some complex FPGA to Verilog transformer fftw3 doesn't work at all
13:04:04FromDiscord<ambient> I mean Nim -> Verilog
13:04:35FromDiscord<Clonkk> Ah okay, I do not know about the Verilog aspect of FFTW↵(@ambient)
13:04:59FromDiscord<ambient> Plus with -d:lto a very simple FFT in nim is already 50% of PocketFFT performance
13:05:31FromDiscord<ambient> @Clonkk it's just a generic example of how C/C++ lib is in essence a binary blob when it comes to adapting it to different situations
13:06:49FromDiscord<Clonkk> Very true, the main benefit of of using C / C++ lib is not having to re-implement stuff (especially when it comes to low level optimisation) that already works.↵(@ambient)
13:07:06*noeontheend quit (Ping timeout: 246 seconds)
13:25:48FromDiscord<eyecon> Considering I'm a beginner and I have no low-level stuff in my project (manually allocated or borrowed memory, directly accessed memory), should I explicitly select ARC/ORC or should I go with the defaults?
13:31:59FromDiscord<Clonkk> There's probably still more bug with arc\|orc than refc though
13:32:00FromDiscord<Clonkk> I would with arc\|orc since it will be the default in the future↵(@eyecon)
13:48:15FromDiscord<funnybyte> sent a code paste, see https://paste.rs/zsi
13:49:19FromDiscord<Rika> What are those atom types exactly?
13:51:55FromDiscord<funnybyte> sent a code paste, see https://play.nim-lang.org/#ix=3XZN
13:56:56FromDiscord<funnybyte> I looked at some example c++ code and they can just loop over the returned list. Like here https://cpp.hotexamples.com/examples/-/-/XGetWMProtocols/cpp-xgetwmprotocols-function-examples.html#0xee289a2fb4acd6380a0912e5e5b6a23329c2161c3f1548f35404c2703020caae-217,,246,
14:04:42*ltriant quit (Ping timeout: 260 seconds)
14:17:08FromDiscord<Rika> A double pointer is usually a returned list
14:17:14FromDiscord<Rika> The list is the first pointer
14:17:21FromDiscord<Rika> The second pointer is for returning a type
14:17:56FromDiscord<Rika> You can cast the pointer to atom into a “ptr UncheckedArray[Atom]” safely and use it like a list
14:18:22FromDiscord<Rika> (edit) "pointer to atom" => "PAtom"
14:25:25FromDiscord<Zoom> Do we have anything to simplify GraphQL querying? Too much effort to deal with paging by hand.
14:35:33FromDiscord<funnybyte> @Rika thanks, that worked
14:36:02FromDiscord<Rika> In reply to @Rika "You can cast the": sorry, "safely" its not really safe
14:46:17FromDiscord<d4rckh> is there any way i can save my cwd when running shell commands via `execCmdEx` and then restore it later?
14:46:57FromDiscord<d4rckh> i can use the `workingDir` parameter to specify a specific working dir, but what about saving it?
15:13:38*ltriant joined #nim
15:14:48*vicfred quit (Quit: Leaving)
15:32:42FromDiscord<KatrinaKitten> In reply to @eyecon "<@204718116020682753> would you be": I don't recall, feel free to send it in and I'll take a look.
15:42:28*hellstabber_ joined #nim
15:44:46FromDiscord<Zoom> What do you mean saving? You either get it by `getCurrentDir` or you change it manually.↵(@d4rckh)
15:44:49*joshbaptiste1 joined #nim
15:45:10*laintree joined #nim
15:45:58FromDiscord<d4rckh> well, was thinking they would be a way to edit my path by just running `cd <path>` via execCmd
15:46:50FromDiscord<konsumlamm> In reply to @Gibbons "<@386230567571554305> thanks... but wouldn't": not if the fields are private
15:47:12FromDiscord<d4rckh> (edit) "they" => "there"
15:47:58FromDiscord<Gibbons> In reply to @konsumlamm "not if the fields": Thanks for the answer... yes, in fact that's the thing I've done at this point
15:48:29*madprops_ joined #nim
15:49:58*hellstabber quit (*.net *.split)
15:49:58*fallback quit (*.net *.split)
15:50:00*lain quit (*.net *.split)
15:50:00*joshbaptiste quit (*.net *.split)
15:50:00*nisstyre quit (*.net *.split)
15:50:01*madprops quit (*.net *.split)
15:50:01*hellstabber_ is now known as hellstabber
15:56:41*nisstyre joined #nim
16:02:07FromDiscord<d4rckh> In reply to @d4rckh "well, was thinking there": i did it by checking if the command ran is `cd` and if it i just used setCurrentDir
16:04:50*fallback joined #nim
16:39:19*krux02 joined #nim
17:42:44*xet7 quit (Remote host closed the connection)
17:43:02*noeontheend joined #nim
17:43:45*xet7 joined #nim
17:47:10*noeontheend quit (Ping timeout: 250 seconds)
17:57:59*rockcavera quit (Remote host closed the connection)
18:06:19*rockcavera joined #nim
18:06:19*rockcavera quit (Changing host)
18:06:19*rockcavera joined #nim
18:06:31*Jjp137 quit (Quit: Leaving)
18:09:51*Jjp137 joined #nim
18:18:43*jmdaemon joined #nim
18:33:34*jmd_ joined #nim
18:33:50*jmdaemon quit (Ping timeout: 240 seconds)
18:42:30FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=3Y1j
18:42:34FromDiscord<ambient> according to that, i can only make a function that takes T, T -- not T, U
18:42:48FromDiscord<ambient> something I'm misunderstanding?
19:11:00*rockcavera quit (Remote host closed the connection)
19:16:34*pro joined #nim
19:28:05*pro quit (Quit: pro)
19:35:51*kenran joined #nim
19:48:01*GULPF joined #nim
19:49:17*GULPF quit (Client Quit)
20:11:01*firq quit (Read error: Connection reset by peer)
20:11:34*firq joined #nim
20:45:07*madprops_ is now known as madprops
20:45:07*madprops quit (Changing host)
20:45:08*madprops joined #nim
20:48:19*wallabra quit (Ping timeout: 240 seconds)
20:48:54*wallabra joined #nim
20:58:53*rockcavera joined #nim
20:58:53*rockcavera quit (Changing host)
20:58:53*rockcavera joined #nim
21:07:07*laintree is now known as lain
21:22:40*kenran quit (Quit: WeeChat info:version)
21:32:28*wallabra quit (Ping timeout: 272 seconds)
21:32:53*wallabra joined #nim
21:46:37FromDiscord<retkid> how do i access an index in a database
21:46:57FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/976239424729927690/unknown.png
21:47:06FromDiscord<retkid> wikipedia uses this structure
21:47:11FromDiscord<Yardanico> you don't
21:47:15FromDiscord<retkid> 🥴
21:47:20FromDiscord<Yardanico> do you mean the index as in actual index
21:47:22FromDiscord<Yardanico> or just a numbeR?
21:47:24FromDiscord<Yardanico> (edit) "numbeR?" => "number ID?"
21:47:26FromDiscord<retkid> as in page_Id
21:47:30FromDiscord<Yardanico> then just make a query with that id
21:47:38FromDiscord<Yardanico> it's not really a question for #main ,it's a basic SQL question
21:47:47FromDiscord<retkid> well
21:48:04FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/976239704833916939/unknown.png
21:48:16FromDiscord<retkid> https://media.discordapp.net/attachments/371759389889003532/976239755618578482/unknown.png
21:48:19FromDiscord<retkid> now it is
21:48:24*nsyd joined #nim
21:48:43FromDiscord<retkid> if you do page_id, there is no table
21:48:47FromDiscord<retkid> page.page_id either
21:52:12FromDiscord<retkid> im fucking stupid those are collums
21:52:16FromDiscord<retkid> (edit) "collums" => "columns"
21:53:06FromDiscord<retkid> how did i forget about that
22:04:50*vicfred joined #nim
22:05:47FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Y1X
22:05:59FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3Y1X" => "https://play.nim-lang.org/#ix=3Y1Y"
22:06:35FromDiscord<Elegantbeef> Then dont use multiline strings
22:06:54FromDiscord<!Patitotective> :[ but theyre nice
22:06:56FromDiscord<Elegantbeef> `proc foo: string = "hello\nim a multiline string\n"`
22:07:16FromDiscord<!Patitotective> its less legible
22:07:24FromDiscord<!Patitotective> and more for longer stirngs
22:07:26FromDiscord<!Patitotective> (edit) "stirngs" => "strings"
22:07:29FromDiscord<!Patitotective> (edit) "and ... more" added "even"
22:10:00FromDiscord<Andreas> In reply to @Patitotective "and even more for": right, btw: maybe please him for a macro - he knows these things 🙂
22:10:34FromDiscord<!Patitotective> In reply to @Andreas "right, btw: maybe please": hahah ElegantMacro
22:10:57FromDiscord<Elegantbeef> you can make a compile time procedure that removes indents, but it wouldnt know where to start
22:11:14FromDiscord<Elegantbeef> It doesnt have current scope depth knowledge
22:11:32FromDiscord<spoon> can make a `multiline:` template or something that auto concats strings with a newline
22:11:44FromDiscord<!Patitotective> smart
22:11:48*termer quit (Read error: Connection reset by peer)
22:12:01FromDiscord<Elegantbeef> Why a template?
22:12:21*termer joined #nim
22:12:23*nsyd quit (Quit: WeeChat 3.5)
22:12:31FromDiscord<spoon> guess it would work with commas, too
22:13:14FromDiscord<judithbnks> I'll help 10 people on how to earn $20,000 within 72 hours but you will pay me 10% of your profit when you receive it.↵Note\: only interested people should apply, drop a message let's get started↵https://t.me/Tradewitholiver01
22:13:33FromDiscord<!Patitotective> c-crypto?
22:14:26FromDiscord<Elegantbeef> We dondeded it
22:14:30FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Y20
22:15:23FromDiscord<spoon> calling with `multiline:` so no parentheses would be my preference there, looks cleaner imo
22:15:48FromDiscord<Elegantbeef> Then go make a macro
22:16:23FromDiscord<spoon> ah, forgot for procs you have to use `do` syntax
22:17:51FromDiscord<!Patitotective> how do i make it so i can have a `string` as the return param of a macro, it seems like its a NimNode 🤨
22:18:43FromDiscord<spoon> hmm, i know you have to use `static[string]` as an arg
22:18:44FromDiscord<Yardanico> you just make a NimNode of a string
22:18:57FromDiscord<resumin> Patitotective\:↵↵https://nim-lang.org/docs/strutils.html#dedent%2Cstring%2CNatural
22:18:57FromDiscord<Yardanico> and if you need static[string] - just make a compiletime proc instead of a macro?
22:19:12FromDiscord<!Patitotective> In reply to @resumin "Patitotective\: https://nim-lang.org/docs/strutils": no please
22:19:14FromDiscord<Yardanico> In reply to @resumin "Patitotective\: https://nim-lang.org/docs/strutils": yes, but this is not that efficient as it dedents in runtime
22:19:27FromDiscord<Yardanico> unless the C compiler is smart enough to optimize it of course
22:20:20FromDiscord<!Patitotective> In reply to @Yardanico "you just make a": `result = newStrLitNode("")`?
22:20:29FromDiscord<Yardanico> In reply to @Patitotective "`result = newStrLitNode("")`?": yes
22:20:29FromDiscord<!Patitotective> it seems like `result.strVal` is not `var`
22:20:38FromDiscord<Yardanico> In reply to @Patitotective "it seems like `result.strVal`": ?
22:20:47FromDiscord<!Patitotective> how do i add to that strlit node?
22:21:10FromDiscord<!Patitotective> `result.strVal.add "hello"` does not work since `strVal` is not var
22:21:11FromDiscord<Yardanico> just construct a normal string in the macro, and in the end make a newStrLitNode ?
22:21:18FromDiscord<!Patitotective> smart
22:21:19FromDiscord<!Patitotective> thanks
22:25:25FromDiscord<!Patitotective> how would i echo it? 🤨 ↵https://play.nim-lang.org/#ix=3Y23
22:27:38FromDiscord<resumin> dedent works at compile time too
22:29:04FromDiscord<resumin> assign it to a const and return that value
22:30:52FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Y26
22:31:07FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3Y26" => "https://play.nim-lang.org/#ix=3Y27"
22:37:57FromDiscord<spoon> maybe you could do it without quotes and make a macro to access the contents of all the indent nodes
22:38:22FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Y29
22:38:52FromDiscord<!Patitotective> In reply to @spoon "maybe you could do": it wouldnt look nice since reserved keywords would get highlighted and it ill be harder to manage `:` or for loops things
22:38:55FromDiscord<!Patitotective> (edit) "things" => "things, i guess"
22:39:27FromDiscord<spoon> or custom operator, but also you would have to append spaces so that would be worse than just using dedent
22:39:41FromDiscord<spoon> well not for a custom operator maybe
23:02:35FromDiscord<resumin> sent a long message, see http://ix.io/3Y2c
23:02:59FromDiscord<Elegantbeef> What bug?
23:04:20*noeontheend joined #nim
23:06:02FromDiscord<resumin> proc a =↵↵const b = dedent"bang"
23:06:39FromDiscord<resumin> pretend this intended \:)↵↵I'm using my tablet...
23:07:16FromDiscord<resumin> \indented
23:08:02FromDiscord<Elegantbeef> ah it's an issue with the optional
23:08:13FromDiscord<Elegantbeef> `const b = dedent("myStr", 0)` works
23:08:35FromDiscord<Elegantbeef> Probably an issue with the `s: string` not being `s: static`
23:10:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Y2e
23:12:42FromDiscord<resumin> I'm not familiar with the compiler code that affects that. It still seems like a bug with just the temp symbol's prefix printed in the error message
23:13:03*jmd_ quit (Quit: ZNC 1.8.2 - https://znc.in)
23:15:44*jmdaemon joined #nim