<< 21-09-2021 >>

00:08:23FromDiscord<niltok> where should I be able to find stdlib modules in the filesystem?
00:08:33FromDiscord<niltok> i search for hashes.nim and can't find anything
00:08:58FromDiscord<Elegantbeef> it should be in your `nim/lib/pure` directory
00:09:21FromDiscord<Elegantbeef> I use choosenim on linux so it's in `~/.choosenim/version/lib/pure`
00:10:05FromDiscord<niltok> thanks, I must have been searching wrong
00:15:58FromDiscord<HuskyHacks> hello 🙂
00:16:05FromDiscord<Elegantbeef> Hello
00:18:17FromDiscord<impbox [ftsf]> o/ ahoy there
00:19:26FromDiscord<HuskyHacks> I am a recent nim convert but for reasons that may be a little off the beaten path
00:19:37FromDiscord<Elegantbeef> `hacks` yep
00:19:40FromDiscord<HuskyHacks> 😉
00:19:49FromDiscord<HuskyHacks> but I'm here because I want to be a better programmer
00:20:08FromDiscord<Elegantbeef> Well we will almost certainly not aid in helping malware but general nim questions can be answered
00:20:15FromDiscord<HuskyHacks> nah I got that part covered
00:20:36FromDiscord<HuskyHacks> I have a long way to go from a basic CS/programming standpoint though
00:20:57FromDiscord<HuskyHacks> and Nim is the only language that has ever made sense to me so I figured it's my best shot
00:21:07FromDiscord<Papel> sent a long message, see http://ix.io/3zv9
00:21:25FromDiscord<Elegantbeef> Well then i welcome you to make non malicious programs 🙂
00:21:53*arfy is also a recent nim discoverer
00:22:12FromDiscord<impbox [ftsf]> welcome!
00:24:13FromDiscord<impbox [ftsf]> I've been using nim for over 5 years now, wow
00:24:22arfywow
00:24:38FromDiscord<Elegantbeef> I've only used it for like a year and a half
00:27:18FromDiscord<HuskyHacks> It's getting very popular with red teamers/pentesters, along with Rust
00:28:21FromDiscord<HuskyHacks> and as far as I can tell, security products don't quite "get" the structure of Nim compiled binaries yet to the extent that they can hook and analyze others, so I have a feeling it will be popular for a while until the vendors catch up
00:31:07FromDiscord<Elegantbeef> Well Nim binaries are already blocked by multiple anti viruses afaik
00:31:54arfy:(
00:34:04FromDiscord<HuskyHacks> the compiler is for sure!
00:34:11FromDiscord<HuskyHacks> I was surprised by that
00:42:10FromDiscord<cabboose> Yes it is annoying
00:42:19FromDiscord<cabboose> I turn off my antivirus with frustration whenever I’m coding
00:42:26FromDiscord<impbox [ftsf]> >_> good to know
00:42:48FromDiscord<Elegantbeef> I just use a organic freerange OS
00:43:02FromDiscord<cabboose> Sounds like a hippy thing
00:43:21FromDiscord<Elegantbeef> Nah the hippy thing is me chaning myself to a goat that's chained to a tree
00:46:20NimEventerNew thread by Elcritch: Thoughts on pure Nim api for SPI & I2C device access?, see https://forum.nim-lang.org/t/8443
00:50:41arfyugh
00:50:48FromDiscord<Elegantbeef> hgu
00:50:57arfytrying to figure out how to get notepad++ to play nice with nim in terms of spacing
00:55:54FromDiscord<impbox [ftsf]> i haven't used that since my quake2 modding days
00:56:17arfyyeah. good tgime to try vscode.
00:56:19arfytime
01:03:47FromDiscord<Gumber> vim + nimlsp is nice
01:03:48FromDiscord<Gumber> or emacs
01:03:58FromDiscord<Gumber> or spacemacs with evil mode
01:19:18*arkurious quit (Quit: Leaving)
01:26:33*neurocyte0133 joined #nim
01:26:33*neurocyte0133 quit (Changing host)
01:26:33*neurocyte0133 joined #nim
01:28:54*neurocyte013 quit (Ping timeout: 260 seconds)
01:28:54*neurocyte0133 is now known as neurocyte013
02:29:55FromDiscord<treeform> In reply to @fae "also i havent really": My lib uses std/json ... so you been using it too 🙂
02:30:17FromDiscord<treeform> In reply to @Gumber "I disagree and have": do you have link?
02:33:27FromDiscord<treeform> More backends besides OpenGL would be cool. Its more work to make them happen though.
02:34:22FromDiscord<treeform> I really want to get Metal and Vulkan backends.
02:35:01nrds<Prestige99> @Elegantbeef I've been thinking about ways to make this system more robust/handle any type. Was thinking I could generate a new type that had this information stored, and a proc to update them all (so the type wouldn't matter). What do you think? Probably just an adaptation of what you created, previously
02:35:11FromDiscord<treeform> I would like to finish glfw/gl backend first. Once that is done I'll make more.
02:35:39*justsomeguy joined #nim
02:35:56arfylol. I just ran file on a nim file and it said. python script
02:36:05nrds<Prestige99> :o
02:36:25FromDiscord<Elegantbeef> Hmm i dont know prestige
02:36:50FromDiscord<Elegantbeef> I was thinking it did need a key or something to allow calling different enimations
02:37:19FromDiscord<Elegantbeef> I dont know if it needs a type since i figure this stuff is all done at CT
02:37:33nrds<Prestige99> So my thought is that an Animation would have multiple seq[tuple[T, float]]
02:37:51nrds<Prestige99> where each is a different type, but found at compile time
02:39:39nrds<Prestige99> e.g. https://play.nim-lang.org/#ix=3zvr but the Animation type is generated
02:39:58FromDiscord<Elegantbeef> I'm just wondering if this is need
02:40:19FromDiscord<Elegantbeef> Could it not just be a compile time string -\> animation?
02:40:46nrds<Prestige99> wdym?
02:40:55FromDiscord<treeform> In reply to @tandy "what im doing is": In jsony to skip a key, you would have to override the dumpHook for the whole objet and check the keys type. A specific option dumpHook does not dump the key, so it can't skip it.
02:41:00FromDiscord<Elegantbeef> Well why does the animation object exist?
02:41:11FromDiscord<Elegantbeef> To hold data to get invoked upon right?
02:41:17FromDiscord<Elegantbeef> And to be able to use specific animators
02:41:21FromDiscord<Gumber> In reply to @treeform "do you have link?": I think we've hashed out the conversation before
02:41:32nrds<Prestige99> Yeah
02:41:39FromDiscord<Gumber> we've talked about it at least twice I think in the past treeform
02:41:49*rockcavera quit (Remote host closed the connection)
02:41:54FromDiscord<Gumber> my previous handle is Zachary Carter
02:41:57FromDiscord<Gumber> in case you weren't aware
02:42:14FromDiscord<Gumber> but I just have different requirements for my GUI libraries than you and I guess others do
02:42:26FromDiscord<Gumber> I want them to do the bare minimum for me
02:42:28FromDiscord<treeform> In reply to @tandy "what im doing is": I think this might do what you want: https://gist.github.com/treeform/b9ae82d583773dc77fd214df45d5d20c
02:43:00FromDiscord<treeform> In reply to @Gumber "my previous handle is": I was not aware sorry!
02:43:12FromDiscord<Gumber> ah no worries! I tried to do like a transition period with both names in my server nick
02:43:27FromDiscord<Gumber> but trying to get rid of my real name being associated with my discord after that whole incident last year
02:43:43FromDiscord<Elegantbeef> So i'm just wondering if there is any reason to have this leak or allow an api like https://play.nim-lang.org/#ix=3zvu
02:45:10FromDiscord<Elegantbeef> I dont know i might be missing something
02:46:06nrds<Prestige99> that would be fine I think but needs to support any type
02:46:08FromDiscord<treeform> I was working on animations like a year ago. I found its too hard to manage in code, so I just did a json file with key frames.
02:46:21FromDiscord<Elegantbeef> Well my method does support anytype
02:46:43FromDiscord<treeform> animation are hard to get right without an editor of some sort
02:46:57FromDiscord<treeform> so editor + simple keyframe format would be my vote
02:47:27FromDiscord<Elegantbeef> Yea something like that would be the best though he wants to animate fields so he needs to make the tooling in conjunction with the format
02:47:28nrds<Prestige99> oh, hmm
02:47:33nrds<Prestige99> I'll explore it more
02:48:03FromDiscord<Elegantbeef> The biggest issue with this format is it's just super hard to do anything, you really want an editor with this
02:49:27FromDiscord<Elegantbeef> Only issue is that for an editor you're pretty much forced to mark everything so you can view it's fields and actually animate it at runtime
02:49:38FromDiscord<Elegantbeef> No clue the best way to handle that/serialize that
03:05:00FromDiscord<impbox [ftsf]> I made an keyframe animation editor in nim, but each keyframe contains all the possible keys so it's a bit ugly
03:05:42FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3zvB
03:06:27FromDiscord<impbox [ftsf]> would be nicer with each channel just being a seq[(time,value)]
03:07:23nrds<Prestige99> Beef I was thinking of saving the anim data in a file and loading it in, later
03:10:38FromDiscord<impbox [ftsf]> Prestige, you could just use Vec4s for all channels and make them homogenous
03:11:21nrds<Prestige99> why a Vec4?
03:11:40FromDiscord<impbox [ftsf]> since it should be able to handle all the things you want to animate
03:11:51FromDiscord<impbox [ftsf]> (not exactly sure what your requirements are)
03:12:06FromDiscord<impbox [ftsf]> but color, pos, rotation, scale, etc all fit in a vec4
03:12:16nrds<Prestige99> I want to be able to "animate" any type - int, float, string, tuples of any data, custom types
03:12:18FromDiscord<impbox [ftsf]> as do any scalars
03:12:27nrds<Prestige99> and also invoke function calls, eventually
03:12:35FromDiscord<impbox [ftsf]> animate strings? o_O
03:12:38nrds<Prestige99> but I could handle that separately I suppose
03:12:42FromDiscord<impbox [ftsf]> how does it interpolate those?
03:12:56nrds<Prestige99> that would depend on the function provided
03:13:09FromDiscord<impbox [ftsf]> ok, so you want it to be super generic
03:13:15nrds<Prestige99> Yeah
03:13:16FromDiscord<impbox [ftsf]> but do you have a specific usecase?
03:13:21nrds<Prestige99> Trying to replicate godot's system
03:13:28FromDiscord<impbox [ftsf]> maybe just focus on your usecase rather than making it overly generic
03:13:30nrds<Prestige99> basically
03:13:40FromDiscord<Elegantbeef> It being super generic is hard to do given Nim type information is mostly gone at runtime
03:13:53nrds<Prestige99> I want to recreate a game I made in godot, and it uses this system
03:14:05FromDiscord<impbox [ftsf]> well you can do it if you dynamic dispatch
03:15:33FromDiscord<impbox [ftsf]> it'll just be very heavy
03:17:05FromDiscord<impbox [ftsf]> https://docs.godotengine.org/en/stable/classes/class_animation.html this what you're basing it off?
03:17:24*arfy8820 joined #nim
03:18:25nrds<Prestige99> basing it off using the ui
03:18:53FromDiscord<impbox [ftsf]> looks like there's a pretty limited set of track types
03:19:17FromDiscord<impbox [ftsf]> object variants seems fine
03:19:42FromDiscord<Elegantbeef> Yea object variant + method for handling lerps
03:19:56*arfy quit (Ping timeout: 246 seconds)
03:20:00*arfy8820 is now known as arfy
03:20:06FromDiscord<Elegantbeef> well procedure 😛
03:20:22nrds<Prestige99> I was struggling to get variants working but your macro system seems to work
03:20:56FromDiscord<Elegantbeef> Well the macro system is hard to serialize
03:21:00FromDiscord<Elegantbeef> So no editor
03:26:23*justsomeguy left #nim (WeeChat 3.2)
03:29:57nrds<Prestige99> I'll try getting variants to work
03:41:24NimEventerNew post on r/nim by AccountDry2463: 🍭 Үoung Scнооl Роrn 🍭, see https://reddit.com/r/nim/comments/psap7p/үoung_scнооl_роrn/
03:47:26FromDiscord<Archion> Hi
03:47:36FromDiscord<Elegantbeef> Hello
03:47:40nrds<Prestige99> That seems like a link I don't want to click
03:49:54FromDiscord<Yardanico> uff
03:50:31FromDiscord<Yardanico> seems like it's just generic spam, not aimed at r/nim specifically (so the person/bot who posted it didn't know it gets bridged to 2+ communities)
03:52:41nrds<Prestige99> Elegantbeef: How would you go about variants here? I could make the AnimationTrack a variant, and depending on the type, pass a different generic to my seq[KeyFrame[T]]? Don't know if that'd even work
03:55:48*sagax joined #nim
03:56:57FromDiscord<Elegantbeef> Well you just make a keyframe for each value so float, int, vector...
03:57:05FromDiscord<Elegantbeef> You cannot use a generic here since that's resolved to a concrete type
03:57:38nrds<Prestige99> Hm yeah I suppose that'd work
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:17*Jjp137 quit (Ping timeout: 245 seconds)
04:06:30*supakeen joined #nim
04:07:57*Jjp137 joined #nim
04:21:48nrds<Prestige99> I can do something like when foo is int, but can't seem to be able to use a case statement for it?
04:22:23nrds<Prestige99> eh maybe I'm still going about this the wrong way
04:32:00nrds<Prestige99> or there isn't a way to check if a variable is a proc
04:32:28FromDiscord<Elegantbeef> `when T is proc` or have a proc that takes that parameter as a different type
04:35:20nrds<Prestige99> seems to be complaining about when T is proc
04:35:32nrds<Prestige99> like it expects a proc implementation or a type after the color
04:35:36nrds<Prestige99> colon*
04:36:02nrds<Prestige99> ah wrapping in parens worked
04:57:37FromDiscord<linux user> process goes defunt when kill or terminate
04:57:51FromDiscord<linux user> solution: discard waitforexit process
04:58:00FromDiscord<linux user> (edit) "defunt" => "zombie/defunt"
05:02:24FromDiscord<Gumber> In reply to @haxscramper "so `get_images` is declared": Soooo I tried out your suggestions and I'm still really confused. The `importcpp`s all seem correct. One fun thing is - when I remove the `vkb::detail::Result[std::vector[VkImage]]` from the equation so that only the `VkImageView` result vector is left - the code compiles and produces the correct `VkImageView` type
05:02:59FromDiscord<Gumber> and if I place the line with the `VkImageView` above the line with the `VkImage` then I get an error about `VkImage` and both lines have `VkImageView` as the type
05:03:48FromDiscord<Gumber> so I"m starting to think again that it's NOT that my `importcpp` s are incorrect somewhere but instead it's that I either haven't wrapped something I need to or there's something wrong with the cpp compiler backend
05:25:50FromDiscord<Gumber> I feel like it's because they're both just aliases to pointers to opaque types
05:26:32FromDiscord<Gumber> so the codegen is generating a typedef to alias `vkb::detail::Result[std::vector[VkImage]]`
05:27:17FromDiscord<Gumber> but I'm guessing what's happening is it goes to generate one for `vkb::detail::Result[std::vector[VkImageView]]` and is like - wait I already have that essentially because `VkImage` and `VkImageView` are just aliases to `pointer`
05:27:26FromDiscord<Gumber> maybe I need to make them a distinct pointer? is that even a thing lol?
05:30:59FromDiscord<Gumber> if you use `distinct pointer` with `importcpp` it will generate a single type def still but this time it won't even use the cpp type name it will just generate a random type name
05:31:08FromDiscord<Gumber> oh man so much weird shit with this backend
05:31:52*Pyautogui joined #nim
05:36:36FromDiscord<Gumber> I guess you can't make wandbox use the cpp backend?
05:51:03FromDiscord<Gumber> Okay
05:53:13FromDiscord<Gumber> that's what it is and I have a min reproducible example
06:01:53*Pyautogui quit (Ping timeout: 264 seconds)
06:15:57NimEventerNew thread by Ingo: Socket questions. selectRead(fds), dispatcher., see https://forum.nim-lang.org/t/8444
06:21:36FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zwi
06:24:10FromDiscord<Elegantbeef> `nimble --version`?
06:24:34FromDiscord<Elegantbeef> Dont have arm and have never had this issue so no clue really just hoping something odd pops up
06:25:05FromDiscord<impbox [ftsf]> execption is mispelt too
06:25:18FromDiscord<Bren> I am typing it from another pc
06:25:28FromDiscord<impbox [ftsf]> oh ok
06:26:11FromDiscord<impbox [ftsf]> what are you passing to nimble when you get that error?
06:26:19FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zwk
06:28:02FromDiscord<Bren> Not sure why it is trying to get git hash when its compiled from the source tar
06:28:35FromDiscord<Elegantbeef> Well that's the hash that nimble was built with
06:28:48FromDiscord<Bren> but its not a git repo
06:29:21FromDiscord<Bren> it is from https://nim-lang.org/install_unix.html and https://nim-lang.org/download/nim-1.4.8.tar.xz
06:31:23*neurocyte013 quit (Ping timeout: 246 seconds)
06:33:18*PMunch joined #nim
06:34:20FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zwm
06:35:12FromDiscord<impbox [ftsf]> and the error message is the only output?
06:35:42FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3zwo
06:36:14FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zwp
06:36:27FromDiscord<xflywind> `nimble install illwill --verbose` ?
06:36:41FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zwq
06:37:06FromDiscord<impbox [ftsf]> can try `--debug` also
06:37:36FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zwr
06:38:00FromDiscord<Rika> Do you have git installed and updated
06:38:09FromDiscord<Bren> yes
06:39:15FromDiscord<impbox [ftsf]> any more info with --debug?
06:39:31FromDiscord<Bren> sent a code paste, see https://paste.rs/F3t
06:40:21FromDiscord<Bren> should I just blow away the tarball and tryt again?
06:40:28FromDiscord<impbox [ftsf]> can you try `which git` ?
06:40:32FromDiscord<impbox [ftsf]> it may be an alias
06:40:41FromDiscord<Rika> Or another install
06:40:58FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zws
06:41:08FromDiscord<Rika> And the version of git is?
06:41:16FromDiscord<impbox [ftsf]> they already posted that
06:41:18FromDiscord<Rika> Oh
06:41:20FromDiscord<Rika> Okay
06:41:24FromDiscord<Bren> `git version 2.32.0`
06:41:31FromDiscord<Rika> Sorry
06:41:39FromDiscord<Bren> I can try 1.4.6
06:41:52FromDiscord<impbox [ftsf]> only thing i can think of is nimble can't find git, but that seems odd
06:43:01FromDiscord<impbox [ftsf]> presumably it's the same output when installing any other package via nimble
06:43:14FromDiscord<Bren> ya
06:43:34FromDiscord<Bren> for whatever reason nimble when it compiles trys to get the git hash
06:43:43FromDiscord<Bren> even though it is from a tarball
06:43:51FromDiscord<Elegantbeef> That's the stored git hash from when compiled
06:44:02FromDiscord<Bren> yea but its from a tarball
06:44:05FromDiscord<Bren> there is no git hash
06:44:07FromDiscord<Bren> or repo
06:44:15FromDiscord<impbox [ftsf]> it's normal
06:44:21FromDiscord<Bren> ok
06:44:31FromDiscord<Elegantbeef> It's supposed to be the hash from the repo when it built
06:44:31FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3zwu
06:44:47FromDiscord<Bren> quality
06:45:12FromDiscord<Rika> I don’t think it is related nonetheless
06:45:23FromDiscord<Bren> ok I'll try blowing it all away
06:45:26FromDiscord<Bren> and trying again
06:46:53FromDiscord<Bren> takes ages to build on this host
06:47:07FromDiscord<Bren> trying to build static compiled apps for my kindle
06:47:46PMunchFor your Kindle?
06:47:52PMunchI didn't think those could run apps
06:48:02FromDiscord<Bren> yup they are just linux
06:48:10PMunchHuh, cool
06:48:14FromDiscord<Bren> if you have jailbroken them you can do whatever
06:48:32FromDiscord<Bren> people have compiled KOReader to work on them
06:48:37PMunchAnd here I am building my own eInk laptop like a scrub :P
06:48:41FromDiscord<Bren> so native epub support
06:48:56FromDiscord<Bren> yea you can hook up a keyboard and mouse
06:48:58PMunchOoh, that'd be handy
06:49:00*pro joined #nim
06:49:10FromDiscord<Bren> people even got full DE working
06:49:16FromDiscord<Bren> but the NAND is old
06:49:19FromDiscord<Bren> I have a PW1
06:49:24FromDiscord<Bren> so its has no RAM
06:49:30FromDiscord<Bren> so TUI is the way to go
06:49:41PMunchI have the one from the same gen, but not paperwhite version
06:49:41FromDiscord<Bren> but some crazy dude got chromium running on one
06:49:53PMunchWow, that's impressive
06:50:10PMunchI'm using a single board computer and a much bigger 10.3" display
06:50:20prois there a limit on number of tcp connections I can have open?
06:50:21PMunchPaired with an old laptop chassis that has a keyboard and mouse
06:50:28PMunch@pro, yes
06:51:02proback to the drawing board
06:51:15FromDiscord<Rika> How many are you opening…?
06:51:18PMunchNow I'm writing my own compositor to do dithering and update windows on the panel :)
06:51:30PMunchYeah there is a limit, but it is quite large..
06:51:38FromDiscord<Rika> By the way how’s that dithering thing going for you
06:51:43proit caps somewhere between 340 and 680
06:51:50PMunchTypically if you hit it you've just forgotten to close some sockets
06:51:54proI need to open 50000
06:51:55PMunchThat's nowhere near the limit
06:52:07PMunchAh, 50k will get you into the territory
06:52:12PMunchWhy do you need that many?
06:52:21PMunch@Rika, pretty well
06:52:21FromDiscord<Rika> Isn’t the limit 65k or something or what
06:52:25prosimulating many clients
06:52:42PMunchI've been playing with a-dither and different magic numbers
06:52:46PMunchPromising stuff
06:52:47pro65k is the hard limit because it's how many ports you have, but you need to deduct like 1k system ports, so the cap is somewhere around 63k ?
06:53:06PMunchAnd that's for your whole system
06:53:12procorrect
06:53:17FromDiscord<Rika> You can bind to system ports as non root given the capability
06:53:47FromDiscord<Bren> would not recommend on a PW1. On the newer ones its much better
06:53:48FromDiscord<Bren> Look up the mobileread forums if you want to know how
06:53:48FromDiscord<Bren> Would not recommend on a PW1. On the newer ones it's much better
07:02:34FromDiscord<Rika> In reply to @PMunch "I've been playing with": Nice what's the numbers you got so far? Anything better than the default ones
07:04:41arfyillwill experts. I'm using illwill successfully for most of the interface of a thing I'm writing, but want to have a section where a more Q and A like thing happens. the type of thing where you'd echo a prompt, then var answer = stdin.readLine() happens. this, surprisingly worked on windows, but on posix it bombed out. what's the propper way to do this mix-mode interface?
07:05:30PMunch@Rika, well better is a subjective term. Most of the number combinations seems to have some directionality to them, which causes what appears as lines
07:05:42PMunchI kinda like 137/119 though
07:06:23PMunchBut I wouldn't say it's "better" than 237/119
07:07:36PMunchI have a 1.1Gb montage of the same image dithered with all the different algorithms if you have 43Gb of RAM and want to have a look if you can find some nice ones :P
07:07:46PMunchdifferent magic numbers*
07:08:08FromDiscord<Rika> I do not have that much ram lol
07:08:39FromDiscord<Elegantbeef> Pmunch might aswell be running the tower of babel there
07:09:51FromDiscord<Elegantbeef> I meant library but too late now
07:10:29PMunchLibrary of Babel?
07:10:37arfylol
07:10:39FromDiscord<Rika> Tower of library
07:10:39FromDiscord<Elegantbeef> https://babelia.libraryofbabel.info/slideshow.html
07:11:14FromDiscord<Elegantbeef> Endless stream of random images to look through
07:12:45PMunchOh wait, they're supposed to just be random noise?
07:14:13FromDiscord<Elegantbeef> Well it's random images
07:15:19PMunchDefine image
07:15:34FromDiscord<impbox [ftsf]> they're autostereograms
07:15:36PMunchMine looks like every pixel is just rand(255), rand(255), rand(255)
07:15:57FromDiscord<Elegantbeef> That's pretty much it pmunch
07:16:05FromDiscord<Elegantbeef> The whole monkey on a type writer thing to images
07:16:10FromDiscord<impbox [ftsf]> you don't see the sailboat?
07:16:15PMunchHaha :P
07:16:37PMunchI have an anti-tracking extension that tends to do that to all canvas elements :P
07:16:41PMunchSo it's hard to tell
07:16:53PMunchFor example I had to turn it off to play linerino
07:17:08FromDiscord<Elegantbeef> Not worth it
07:17:16FromDiscord<Elegantbeef> Linerino could have trackers
07:17:53*max22- joined #nim
07:20:20*pro quit (Quit: WeeChat 3.2.1)
07:21:11FromDiscord<impbox [ftsf]> PMunch, dither example?
07:22:35PMunchhttps://uploads.peterme.net/cube_dithered_m1-237_m2-119.png
07:22:56FromDiscord<impbox [ftsf]> nice!
07:23:11FromDiscord<impbox [ftsf]> i'm keen to add some nicer dithers to nico
07:23:23PMunchhttps://uploads.peterme.net/cube.png
07:23:31PMunchThat's the images that's being dithered
07:24:22PMunchFloyd-Steinberg: https://uploads.peterme.net/cube_dithered_fs.png
07:24:29PMunchAtkinson: https://uploads.peterme.net/cube_dithered_at.png
07:45:50FromDiscord<Rika> Oh you're also using the cube lol
07:47:43PMunchHaha, yeah it was a nice test image :P
07:53:28PMunchHmm, what is a good example C project to import for my automatic importing project?
07:54:18FromDiscord<Elegantbeef> `stb` stuffs?
07:54:28FromDiscord<impbox [ftsf]> good ... C ...
07:55:10FromDiscord<Yardanico> In reply to @PMunch "Hmm, what is a": llvm :DD
07:55:16FromDiscord<impbox [ftsf]> blender?
07:55:25FromDiscord<Elegantbeef> llvm is in C++ no?
07:55:29FromDiscord<Yardanico> they have a C API
07:55:42FromDiscord<Yardanico> that's how nlvm works
07:55:49PMunchSomething simple where I can import it on one line and use some simple procedures
07:56:08PMunchI can't have a huge example in the README :P
07:56:11FromDiscord<Yardanico> yeah the beef's suggestion is pretty good
07:56:21FromDiscord<Elegantbeef> "the beef's"
07:56:27FromDiscord<Elegantbeef> Fuck i've been dehumanized
07:56:34FromDiscord<Yardanico> how beef can be human
07:58:20FromDiscord<Rika> PMunch have you tried the XOR a dither?
07:58:37PMunchYeah I tried it, but wasn't too happy with the results.
07:58:46PMunchMaybe I should create another massive collage of all those..
07:59:56FromDiscord<Rika> It doesn't have the line issue
08:00:00FromDiscord<Rika> Of course
08:00:04PMunchOh really?
08:00:06PMunchInteresting
08:00:41PMunchUgh, a dither is such an annoying name..
08:00:47FromDiscord<Rika> Hahah
08:00:50FromDiscord<Rika> Yes
08:01:34PMunchHmm, it seems to use different ranges for the magic numbers though..
08:04:29FromDiscord<pietroppeter> In reply to @PMunch "Hmm, what is a": something from here? https://github.com/oz123/awesome-c
08:04:31nrds<R2D299> itHub: 7"A curated list of awesome C frameworks, libraries, resources and other shiny things. Inspired by all the other awesome-... projects out there."
08:05:25FromDiscord<Yardanico> In reply to @pietroppeter "something from here? https://github.com/oz123/aweso": it's nice that they mention licenses
08:18:32PMunchHmm, @Rika, it has less of an issue with lines, but it is very noisy..
08:18:52FromDiscord<Rika> Yeah that's the downside
08:18:55FromDiscord<Rika> Noisier
08:19:24FromDiscord<Rika> How many levels do you have for grays ale?
08:19:34FromDiscord<Rika> Greyscale
08:20:15FromDiscord<Rika> Add looks fine with 16 levels for example
08:20:33FromDiscord<Rika> 16 levels is also the usual amount of levels an e ink screen has
08:21:30PMunchWell I have 16 levels for the full mode
08:21:38PMunchBut the fast mode is B/W
08:21:42FromDiscord<Rika> But you're doing B mode are you
08:21:44FromDiscord<Rika> I see
08:21:51PMunchAnd that's the one where I really need this
08:22:11PMunchThe 16 colour mode is so slow to update I won't be doing any animations on it anyways
08:22:12NimEventerNew thread by Kobi: How to enable incremental compilation?, see https://forum.nim-lang.org/t/8445
08:22:13FromDiscord<Rika> ~~I recommend using dithering on both modes anyway~~
08:22:26PMunchSo I could just as well use something like Floyd Steinberg
08:22:40PMunchOh for sure, I'll use it for both
08:23:09PMunchMan the xor version creates some really trippy results for some values :P
08:27:59PMunchhttps://pippin.gimp.org/a_dither/ <- In the first case statement, do ((x ^ y * 1) * 51& 511)/511.0. Then set pattern to 1 and levels to 1
08:29:13FromDiscord<impbox [ftsf]> beautiful https://media.discordapp.net/attachments/371759389889003532/889790354042273792/unknown.png
08:30:54PMunchI generate a bunch of them and flick through with feh, makes it kinda animated
08:34:15FromDiscord<Rika> In reply to @impbox "beautiful": Looks like an effect for a game
08:34:43PMunch100/32 is pretty nice
08:36:47PMunchLot of "artistic" ones, like 99/96
09:04:07*pro joined #nim
09:16:43prothere is no file descriptor limit in nim, right ?
09:17:36FromDiscord<dom96> your OS has one
09:19:07proI removed the limit, but for example python is compiled with hard limit of 1024, so my python apps still can't have more than 1024 :(
09:19:21FromDiscord<cabboose> wot
09:19:26FromDiscord<cabboose> how do you remove a FD limit of your OS
09:19:50proif you are on linux, open bash and type ulimit -a
09:20:03prothen raise the FD with ulimit -n 50000
09:20:10prothen verify with ulimit -a again
09:20:34prothen only in that terminal you will have (temporarily) raised the limit
09:20:53FromDiscord<cabboose> oh yeah
09:20:55FromDiscord<cabboose> i mean
09:20:58FromDiscord<cabboose> still limited
09:21:04FromDiscord<cabboose> its never unlimited
09:21:39proyou are limited by the number of free ports, so max 65k
09:25:45FromDiscord<linux user> unlimited
09:44:00FromDiscord<Yardanico> In reply to @richard stallmen(crazy GNU guy) "unlimited": this is not #memes btw
09:44:27FromDiscord<linux user> but i no post meme
09:49:49FromDiscord<impbox [ftsf]> I thought you only meme?
10:06:15FromDiscord<Yardanico> he does
10:16:19*[R] quit (Ping timeout: 252 seconds)
10:20:50*[R] joined #nim
10:33:52nrds<Prestige99> Is there a way to use a case statement on a type of a field that's a sumtype?
10:36:27nrds<Prestige99> e.g. https://play.nim-lang.org/#ix=3zxi
10:37:28FromDiscord<Yardanico> no, you have to use when
10:37:40FromDiscord<Yardanico> so you have to write when/elif/else
10:37:48nrds<Prestige99> Hm dang
10:38:08nrds<Prestige99> Actually may be able to write a macro for this?
10:46:15FromDiscord<Rika> Maybe you can within a static block?
10:46:36FromDiscord<Yardanico> In reply to @Rika "Maybe you can within": no, when is different
10:46:47FromDiscord<Yardanico> if you do it in a static block then all code inside of it would be executed at compile time
10:47:04FromDiscord<Rika> Well I didn’t look at the code since my internet is bad
10:47:10FromDiscord<Yardanico> but you need the checks to be done at compile time and the code inside the branches at runtime
10:47:12nrds<Prestige99> I think all I'd need is a way to disect the types of a sumtype
10:47:13FromDiscord<Rika> I was merely guessing what it would be
10:47:22FromDiscord<Yardanico> In reply to @Rika "Well I didn’t look": just view through the ix.io directly with ix.io/3zxi
10:47:24FromDiscord<Yardanico> it's plaintext
11:00:21FromDiscord<cabboose> holy shit I had no idea thats where that stuff was coming from
11:00:39nrds<Prestige99> ?
11:01:16FromDiscord<cabboose> when people would link ix.io code
11:01:40FromDiscord<cabboose> I didn't know you can view playground code with that
11:01:42FromDiscord<cabboose> lit
11:11:51*pro quit (Quit: WeeChat 3.2.1)
11:58:15*kayabaNerve_ is now known as kayabanerve
11:58:21*kayabanerve is now known as kayabaNerve
12:04:35*pro joined #nim
12:06:01*supakeen quit (Quit: WeeChat 3.3)
12:06:30*supakeen joined #nim
12:15:49*rockcavera joined #nim
12:15:49*rockcavera quit (Changing host)
12:15:49*rockcavera joined #nim
13:14:52*arkurious joined #nim
13:27:25PMunchHow do I compile in a header only library in Nim?
13:27:50PMunchWithout attaching a header pragma to a proc or an object
13:40:19PMunchHmm, a `{.emit: staticRead("header_file.h").}` seems to have worked
13:40:23FromDiscord<haxscramper> Include it somewhere and it would compile all the functions in it.
13:40:35PMunchBut now I ran into const char vs char..
14:06:57*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
14:07:09*Gustavo6046 joined #nim
14:10:52*Onionhammer0 joined #nim
14:11:43*koltrast quit (Ping timeout: 252 seconds)
14:12:49*Onionhammer quit (Ping timeout: 252 seconds)
14:12:49*Onionhammer0 is now known as Onionhammer
14:13:29*koltrast joined #nim
14:15:49*PMunch quit (Quit: Leaving)
14:27:16*pro quit (Quit: WeeChat 3.2.1)
14:36:36FromDiscord<iffy (Matt Haggard)> I'm going to give an Intro to Nim presentation at work and want to highlight some of the cool things people are doing with Nim. I'm planning to highlight nico and pixie (because they demo well). Any other favorites? Doesn't have to be graphics-related.
14:37:40FromDiscord<cabboose> status-desktop
14:37:55FromDiscord<cabboose> i mean they have actually deployed things
14:38:07FromDiscord<cabboose> if you're trying to sell nim to them
14:47:37*xet7 quit (Remote host closed the connection)
14:48:40*xet7 joined #nim
14:49:10FromDiscord<Papel> Does nim have an official or native GUI package? Something to make windowed applications
15:02:46FromDiscord<Gumber> In reply to @iffy (Matt Haggard) "I'm going to give": are you trying to get people to adopt Nim?
15:02:56FromDiscord<Gumber> like what is your goal for this demo?
15:03:19FromDiscord<Gumber> In reply to @Papel "Does nim have an": official? no... a lot of it depends on your use case / requirements as to which lib might be best suited for you
15:03:39FromDiscord<Gumber> does C have "an official" one?
15:04:06FromDiscord<Gumber> if you meant does the stdlib include some GUI rendering lib
15:04:07FromDiscord<Gumber> no
15:04:15FromDiscord<Gumber> (edit) "lib" => "module"
15:04:33FromDiscord<Papel> Got it, gonna take a look at the available ones
15:04:39FromDiscord<enthus1ast> @Smarc\: i have played with the library a little https://gist.github.com/enthus1ast/303ce18d918eeb31789cf075d16c1b94
15:04:58FromDiscord<enthus1ast> for your purpose it should be enough wrapping i guess
15:04:58FromDiscord<Gumber> In reply to @Papel "Got it, gonna take": if you tell me what you're trying to do, I can maybe recommend one
15:05:12FromDiscord<Gumber> but often times requirements for GUI libraries differ vastly based on use case
15:05:38FromDiscord<Gumber> like what are you building and what platforms are you targetting?
15:05:46FromDiscord<Papel> Crossplat simple text editor, akin to notepad
15:05:53FromDiscord<Gumber> okay thanks - that helps
15:06:03FromDiscord<Gumber> so @haxscramper is working on generating Qt bindings for Nim
15:06:06FromDiscord<Papel> Win/Linux/mac and maybe mobile
15:06:08FromDiscord<Gumber> but I don't know how far away that is
15:06:18FromDiscord<Gumber> and obviously it brings in a hard requirement on Qt which you may / may not like
15:06:39FromDiscord<Gumber> but I mean - you'd have Qt which is the crem de la crem of UI / app development frameworks in the native world
15:06:44FromDiscord<Papel> It's license, ok for open source, all weird for other things
15:06:55FromDiscord<Gumber> there's been a lot of work around enabling support for GTK with Nim
15:07:03FromDiscord<Gumber> so that's always an option too if you can deal with non native looking UIs
15:07:34FromDiscord<Gumber> there are quite a few options out there that leverage like GLFW or SDL2 if you don't care about your UI library being a bit overbearing and doing more than just UI stuff
15:07:49FromDiscord<Gumber> tmk most of them handle drawing the UI for you as well as eventing
15:08:05FromDiscord<Gumber> this is a deal breaker for me - and means really none of the xplat GUI libraries are options for me
15:08:10FromDiscord<Gumber> but for most applications this isn't a big deal
15:08:12FromDiscord<Papel> Going with SDL2 might be interesting, since it's gonna be useful for games and multimedia stuff
15:08:32FromDiscord<Gumber> there are some built on top of SDL2 and some on top of GLFW
15:08:43FromDiscord<Gumber> but yeah - if you need to be able to draw the GUI yourself or handl events yourself
15:08:55FromDiscord<iffy (Matt Haggard)> Gumber\: yes, I'm trying to get people to try nim out and maybe adopt it for some things
15:08:57FromDiscord<Gumber> and you just want the GUI library to track these things and reporrt them to you
15:09:10FromDiscord<Gumber> then none of these libraries will be good choices
15:09:32FromDiscord<Gumber> your only real options are like DearIMGUI or Nuklear or one of the other simliar libraies out ther elike microgui or something
15:09:37FromDiscord<Gumber> (edit) "ther elike" => "there like"
15:09:58FromDiscord<Gumber> pretty much all the retained mode GUI libraries for Nim are quite opinionated / have hard dependencies and do more than just UI and layout
15:10:28FromDiscord<Gumber> I think the most promising one out there is - https://github.com/trustable-code/NiGui
15:10:29nrds<R2D299> itHub: 7"Cross-platform desktop GUI toolkit written in Nim"
15:10:30FromDiscord<HuskyHacks> In reply to @Papel "Does nim have an": I played around with wnim a little, it was coo! slight learning curve though
15:10:32FromDiscord<dom96> iffy: what's the audience like? what areas are they interested in?
15:10:38FromDiscord<Gumber> but it's also the most ambitious and furthest from complete
15:11:00FromDiscord<HuskyHacks> (edit) "coo!" => "cool!"
15:11:04FromDiscord<Gumber> In reply to @iffy (Matt Haggard) "Gumber\: yes, I'm trying": okay then this strategy is not going to work TBH
15:11:13FromDiscord<Gumber> unless you really don't care if anyone actually checks it out or not
15:11:37FromDiscord<Gumber> and you just enjoy presenting about topics you're passionate about
15:12:02FromDiscord<Gumber> tech evangelism is hard, and almost always requires more than just showing a technology to someone
15:12:23FromDiscord<Gumber> it generally requires you to also convince them that whatever technology they're currently using is subpar or not as good as what you're presenting
15:12:35FromDiscord<Gumber> you have to give the audience a reason to want to go check it out
15:12:38FromDiscord<Gumber> beyond - hey it can do this cool thing
15:12:55FromDiscord<Gumber> because lots of technologies can do cool things - but people are only going to go look them up / research them if they have some motivation to
15:13:08FromDiscord<Gumber> beyond oh it's another technology I've never heard of before
15:13:19FromDiscord<Gumber> because for most people - there are lots of those floating in and out of their awareness on a daily basis
15:13:31FromDiscord<Gumber> Nim becomes just another name in a vast sea of buzz words
15:14:09FromDiscord<Gumber> if you show them that they're using Java for instance and they can write the same program in Nim and get it to execute N times faster with N less loc and cleaner abstractions or something
15:14:20FromDiscord<Gumber> now you might have some people interested
15:14:55FromDiscord<Gumber> but in my experience it's a very uphill battle - especially if you work in a enterprisey software shop that does agile / OOP / stuff like that where engineering decisions come second to business decisions
15:15:05FromDiscord<Gumber> and the tech is an afterthought compared to product
15:15:28FromDiscord<Gumber> they're concerned with making money and limiting tech sprawl and also having a huge pool of engineers at their disposal to hire from
15:15:54FromDiscord<Gumber> so you also need to think about that if you want to gain adoption at your workplace
15:17:10FromDiscord<Gumber> It's not an impossible task - like Nim's been approved at my company (although I haven't found a great use case yet - I'm sure one will arise eventually)
15:17:47FromDiscord<Gumber> but I work at an Elixir shop with a team of engineers and a CTO that are very tech savvy and don't mind taking risks on the engineering side to deliver the best tech possible
15:18:42FromDiscord<Gumber> not every company (and I'd posit most) don't have those same goals / aspirations and most of the time the tech is serving the business and CTOs / VPs / managers don't care that it can be made faster or better using some niche programming language it's going to be difficult to hire engineers for
15:19:02FromDiscord<Gumber> (edit) "not every company (and I'd posit most) don't have those same goals / aspirations and most of the time the tech is serving the business and CTOs / VPs / managers don't care that it can be made faster or better using some niche programming language ... it's" added "if"
15:23:23FromDiscord<dom96> Yeah, convincing people is tough
15:23:42FromDiscord<dom96> Honestly the best way is to probably try to get a CTO position at a company and just use Nim
15:24:09FromDiscord<dom96> (or a really senior position in a company with a CTO that is open to you doing things your way)
15:28:37FromDiscord<Gumber> Yeah I mean - how it happened for us is our former VP of engineering found Nim and wrote a torrent client lib in it
15:28:48FromDiscord<Gumber> Liked Nim so much they approved its use at work
15:29:03FromDiscord<Gumber> we didn't have our current CTO at the time, but I mean, same kind of thing @dom96 is talking about
15:29:28FromDiscord<Gumber> you also need a CTO that is tech savvy - a lot of CTOs are way more business minded / haven't really touched a programming language in decades
15:30:15FromDiscord<dom96> Huh, sounds like those CTOs wouldn't be great at their job
15:30:26FromDiscord<dom96> but what do I know, I guess business mind is good at those positions
15:30:53FromDiscord<IsaacPaul> I have free rein where I'm at :3 though I am the entire mobile department...
15:31:57*kayabaNerve quit (Remote host closed the connection)
15:32:16*kayabaNerve joined #nim
15:32:49FromDiscord<Gumber> That's the thing right
15:32:54FromDiscord<Gumber> when you become a CTO you're less involved in the technology
15:32:54FromDiscord<IsaacPaul> Though the only practical use from nim are scripts: https://gist.github.com/izackp/353e0f46964fef1fc75b5844b62594e5
15:33:04FromDiscord<IsaacPaul> (edit) "scripts:" => "scripts (in my field):"
15:33:25FromDiscord<Gumber> you're not doing any hands on work, most of the time, your position mandates that you serve the business really
15:33:57FromDiscord<Gumber> and your responsibilities shift from ensuring quality software is delivered on time to making sure you can deal with the management problems that engineering orgs often encounter
15:34:09FromDiscord<Gumber> you leave the former to the SMEs
15:34:31FromDiscord<Gumber> now there's exceptions to every rule - when I was at Ten Square Games, we had THE best CTO I've ever worked with (from an engineering point of view)
15:34:59FromDiscord<Gumber> he was just a genius when it came to unix based systems, backend development, infrastructure, CI/CD, networking, etc....
15:35:20FromDiscord<Gumber> like he literally wrote and scaled up the entire backend for TSG and it's not like it was substandard quality work - it was top notch - everything
15:35:40FromDiscord<Gumber> like best practices everywhere, software wasn't needlessly bloated and didn't try to pull in every dependency under the sun
15:36:01FromDiscord<Gumber> there were no huge frameworks like spring or anything like that - the best library was chosen for a particular job
15:36:26FromDiscord<Gumber> just stuff you tend not to see at big enterprisey software companies where frameworks and the lowest common denominator as far as engineering best practices go are the norm and good solid tech decisions are not
15:37:19FromDiscord<Gumber> our CTO at my current company is good too - he's not nearly as good on the tech side of things as the CTO of TSG was but he's still way more tech savvy / minded than any other CTO I've worked with in the past
15:37:36FromDiscord<Gumber> the majority of the CTO's I've worked with hadn't written a line of code in over a decade
15:38:16FromDiscord<Gumber> and I've been at a lot of companies throughout my 15 year programming career - my mom was also the CEO of a fortune five hundred software company, so I have some insight from that as well
15:38:40FromDiscord<Gumber> In reply to @IsaacPaul "I have free rein": being on an island is a blessing and a curse 😄
15:39:46FromDiscord<Gumber> (edit) "company," => "company that was bought out by EMC,"
15:39:47FromDiscord<IsaacPaul> I definitely agree. I feel I could be more productive and have cleaner code with pair programming / PR reviews.
15:40:05FromDiscord<Gumber> ooph you don't even have others reviewing your PRs?
15:40:09FromDiscord<Gumber> that's yikes territory
15:40:18FromDiscord<Gumber> not because I question your programming abilities
15:40:24FromDiscord<Gumber> but because I assume you're a human and not a robot
15:40:33FromDiscord<IsaacPaul> exactly lol
15:42:07FromDiscord<Gumber> I'm on an island but at least it's not deserted and there's one other engineer on there with me
15:42:43FromDiscord<Gumber> And we also bring in developers from other teams to code review work even if they don't work on the same product we do
15:43:01FromDiscord<Gumber> It's hard when it comes to mobile though because like I be terrible at reviewing Swift PRs because I haven't written a line of Swift in my life
15:43:05FromDiscord<iffy (Matt Haggard)> @dom96 security researchers, general-purpose programmers (managing servers), gamers. I'm not really trying to get people to start using it at work (though if they do, fine). I mostly just want them to check it out, maybe for their own stuff.
15:43:13FromDiscord<Gumber> And I imagine our mobile developers would be bad at reviewing elixir PRs so
15:43:33FromDiscord<Gumber> In reply to @iffy (Matt Haggard) "@dom96 security researchers, general-purpose": If that's your goal then I think your original presentation idea is fine
15:44:01FromDiscord<Gumber> Most of the time when people talk about showing Nim to people at work, they have this unspoken expectation that they'll be able to start using it at work
15:44:37FromDiscord<Gumber> And that just by seeing Nim in action everyone will be convinced that it is the greatest thing since sliced bread and will become the de facto programming language at work
15:44:46FromDiscord<Gumber> I mean I had that very naive expectation at one point in my career
15:45:11FromDiscord<Gumber> So I apologize for making assumptions about your situation but I elaborated for the greater benefit of the community and I wasn't trying to personalize it regarding your situation
15:45:34FromDiscord<cabboose> you're doing it wrong iffy
15:45:35FromDiscord<Gumber> This could actually be a good blog topic for anyone that blogs lol
15:45:42FromDiscord<cabboose> you show them `echo "hello world"`
15:45:43FromDiscord<cabboose> duh
15:45:50FromDiscord<Gumber> Like how to effectively evangelize a technology at your workplace
15:45:58FromDiscord<Gumber> Although I'm sure there's a myriad of blog articles out there already
15:46:13FromDiscord<IsaacPaul> hallo world↵😂
15:46:37FromDiscord<cabboose> show them hello world before you show them goodbye world which wipes the servers clean
15:46:46FromDiscord<Gumber> Another big challenge I had was just dealing with the fact that in today's world not that many people right native code anymore it's the exception rather than the rule
15:47:27FromDiscord<Gumber> So while some people might understand the benefits of a language that compiles to C clearly expressing those benefits to someone who was only ever worked in Java or C sharp or some other language with a managed runtime is challenging
15:47:40FromDiscord<cabboose> probably the shit learning curves and pitfalls when people just want to script phub sites↵(@Gumber aka Zachary Carter)
15:47:45FromDiscord<Gumber> Even explaining the benefits of something like static typing to a modern web developer can be a difficult prospect
15:47:55FromDiscord<Gumber> And I'm talking about modern web developers that use typescript
15:48:17FromDiscord<Gumber> They just don't have the knowledge of computer science fundamentals to realize that the reason type script is so great is because of the type safety half of the time they don't even understand what type safety is they just use TypeScript because they see it being used by everyone else
15:48:49FromDiscord<haxscramper> I stiff fail to understand how can people thing without types
15:48:59FromDiscord<haxscramper> (edit) "thing" => "think"
15:49:40FromDiscord<cabboose> Because numbers are words are the same thing; if i write them down you know what I mean
15:49:43FromDiscord<cabboose> why cant a program do the same thing
15:49:43FromDiscord<Gumber> I think it depends on the paradigm
15:49:44FromDiscord<cabboose> duh
15:49:50FromDiscord<cabboose> if I say divide i obviously mean its a number
15:49:57FromDiscord<cabboose> unless I want you to split the string
15:49:58FromDiscord<Gumber> It's not so bad in lisp or scheme or Erlang etccc
15:50:00FromDiscord<cabboose> in which case do that
15:50:04FromDiscord<cabboose> also why didnt you do what I thought you would
15:50:22FromDiscord<Gumber> Python or JS though are nightmares
15:51:20FromDiscord<haxscramper> In reply to @Gumber "so <@!608382355454951435> is working": Also I don't think it is correct to describe what I'm doing like this, qt bindings are not the end goal, they are just intermediate step for testing
15:51:27FromDiscord<Gumber> Ah okay
15:51:32FromDiscord<Gumber> My mistake
15:51:49FromDiscord<haxscramper> I'm okay, but someone might get their hopes up and wait for me to deliver this
15:51:58FromDiscord<haxscramper> I like qt as well, so eventually I will come to this,
15:52:03FromDiscord<Gumber> 🙂
15:52:07FromDiscord<haxscramper> But right now I'm too busty already
15:52:12FromDiscord<Gumber> yeah I feel you on that one
15:52:25FromDiscord<cabboose> Yeah that's me↵(@haxscramper)
15:52:29FromDiscord<cabboose> give me fucking qt
15:52:29FromDiscord<cabboose> bastard
15:52:52FromDiscord<cabboose> or just a less toothpick nimqml
15:52:55FromDiscord<haxscramper> Well, maybe I will
15:53:04FromDiscord<cabboose> 1 extra iota of meat on the body
15:53:06FromDiscord<haxscramper> I remembered your earlier offer with ninph
15:53:10FromDiscord<haxscramper> Nimph
15:53:10FromDiscord<cabboose> 1 atom
15:53:19FromDiscord<iffy (Matt Haggard)> cabboose\: that would be an awesome demo. See how fast Nim can delete this server? JavaScript would have taken much longer. Probably.
15:53:22FromDiscord<haxscramper> So maybe I could come up with 2 for 1 deal for you
15:53:37FromDiscord<cabboose> Precisely
15:53:47FromDiscord<cabboose> Aiya
15:53:55FromDiscord<cabboose> I can't sell you my soul
15:54:01FromDiscord<cabboose> I don't have one
15:54:39FromDiscord<cabboose> I am kidding though you do you baby
15:54:53FromDiscord<haxscramper> In reply to @cabboose "or just a less": Is nimqml that bad?
15:54:55FromDiscord<cabboose> I have so much uni to study in the next week and a half
15:54:57FromDiscord<cabboose> exams coming up
15:54:59FromDiscord<cabboose> yeah
15:55:04FromDiscord<cabboose> it has nothing
15:55:23FromDiscord<cabboose> status actually brought the thread safe signalling
15:55:49FromDiscord<cabboose> like status do more work on nimqml and dotherside than filcuc unfortunately
15:55:56FromDiscord<cabboose> which isn't anything wrong since filcuc is probably doing other things
15:56:29FromDiscord<haxscramper> Etf is filcuc
15:56:47FromDiscord<cabboose> he's the author of nimqml
15:56:47FromDiscord<cabboose> and dotherside
15:56:58FromDiscord<cabboose> which is just the qtqml bindings
15:56:59FromDiscord<cabboose> that are used by other languages
15:57:07FromDiscord<cabboose> \~it is a dll that exposes the magic\~
15:58:18FromDiscord<haxscramper> Well, I'm certainly going to be throwing a lot of shit in the qt bindings for things I find convenient
15:58:30FromDiscord<haxscramper> Maybe even make it work for the C backend
15:59:45FromDiscord<cabboose> image.png https://media.discordapp.net/attachments/371759389889003532/889903739211763722/image.png
16:00:26FromDiscord<Goel> Where can i read more about multiple returns for a proc? (a link)
16:01:11FromDiscord<cabboose> Like in a tuple?
16:02:06FromDiscord<Goel> `proc loadImage(imageDir: string): seq[byte], array[3, int] =`↵its possible to do something like this? If so how do i select the `return=` of the second return and not the first return?
16:02:35FromDiscord<haxscramper> But before all of that happens I need to (1) write the damn thing, (2) find someone and make them used it while it is not finished, because up until now this has been a ping-pong game where I tried to figure out correct APIs and workflows
16:02:38FromDiscord<Rika> return a tuple
16:02:54FromDiscord<Rika> `proc loadImage(imageDir: string): (a: seq[byte], b: array[3, int])`
16:03:13FromDiscord<cabboose> what part of qt are you binding though
16:03:16FromDiscord<Rika> `return (theseq, thearray)`
16:03:17FromDiscord<haxscramper> Discussion with arkanoid when they were trying to make c2nim just not die was really useful for that
16:03:25FromDiscord<haxscramper> Qt widgets ofc
16:03:37FromDiscord<haxscramper> Well, it does not matter really
16:03:58FromDiscord<haxscramper> With proper binding generator handling thousands of files is just as simple as 1
16:04:23FromDiscord<cabboose> you realise status would probably froth that
16:04:29FromDiscord<cabboose> hahaha
16:05:33FromDiscord<cabboose> Im already using nimqml so you've already got a user here
16:05:41*kayabaNerve quit (Ping timeout: 252 seconds)
16:05:44FromDiscord<cabboose> well I'm redoing everything
16:06:26FromDiscord<cabboose> Don't know how you can do such magic though
16:15:54FromDiscord<Gumber> @haxscramper not sure if you saw my messages from last night / this morning but that whole cpp vector of pointers to opaque types thing actually did turn out to be a cpp codegen bug
16:17:18FromDiscord<Gumber> the type unification pass doesn't respect the aliases as one might hope for, and you end up with only the first alias to the generic type being generated and which one gets generated depends on which one is referenced first in the code
16:17:42FromDiscord<Gumber> we tried out a change in `compiler/sighashes.nim` last night but it didn't fix it in devel or 1.4.8
16:17:53FromDiscord<Gumber> (edit) "we tried out a ... change" added "singe loc"
16:18:22FromDiscord<Gumber> (edit) "we tried out a singe loc change in `compiler/sighashes.nim` ... last" added "on line 128 (I think) by adding `tyPointer` to the `case` discriminant"
16:19:10FromDiscord<Gumber> so I dunno - I was able to get around the compilation error by using `{.emit.}` to manually generate the aliases but this introduce a host of new problems - like now I have to wrap all of the `std::vector` interface I plan on using for each alias of it
16:19:23FromDiscord<Gumber> (edit) "so I dunno - I was able to get around the compilation error by using `{.emit.}` to manually generate the aliases but this introduce a host of new problems - like now I have to wrap all of the `std::vector` interface I plan on using for each alias of it ... " added "which is a PITA without the help of a macro"
16:23:17FromDiscord<Gumber> and then even when I do that I get conversion issues when I try to assign from the aliased opaque pointer type back to the opaque pointer type so like `ImageVector` which is an alias to `std::vector<VkImage>` needs:
16:23:27FromDiscord<Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3zzj
16:23:49FromDiscord<Gumber> and `sw.images[i] = cast[Image](images[i])` for an asssignment to come even close to working
16:24:54FromDiscord<Gumber> so yeah - huge pain in the ass
16:24:54FromDiscord<Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3zzk
16:25:18FromDiscord<Gumber> definitely going to have to cook up some macros for this because it's a pretty pervasive pattern in the Vulkan API
16:25:29FromDiscord<Gumber> and libraries that depend on it
16:27:28FromDiscord<haxscramper> Cpp codegen but of this type does really sound nasty, but to be honest I'm not surprised
16:32:25FromDiscord<Gumber> yeah me either
16:32:30FromDiscord<Gumber> it's probably a tricky problem to solve
16:32:49FromDiscord<Gumber> but I don't pretend to be a compiler dev or language designer
16:33:15FromDiscord<Gumber> my compiler dev skills are running `koch temp` and using `find in files`
16:33:37FromDiscord<Gumber> I can go about one level deep in the compiler call stack before I become completely useless
16:33:42FromDiscord<Gumber> backend I mean
16:34:14FromDiscord<Gumber> I at one point was spending some time trying to learn some of it along with the VM - but I decided it wasn't what I wanted to be doing, and my efforts were better spent working on R&D for my game
16:36:46*yewscion joined #nim
16:39:40FromDiscord<haxscramper> Cpp backed is least tested and has more demands as it faces c++ world
16:39:49FromDiscord<Gumber> yeah! it's good stuff
16:40:06FromDiscord<Gumber> has been the read headed stepchild of the Nim backends for a while - I feel like even the JS backend has gotten more love
16:40:14FromDiscord<Gumber> okay - maybe it's the objective-c backend but
16:40:34FromDiscord<Gumber> at least that's workable and you don't need much more than what it already has most of the time
16:40:59FromDiscord<Gumber> (edit) "read" => "red"
16:48:58FromDiscord<haxscramper> we had PHP backend
16:53:08FromDiscord<tandy> in nim??
16:53:33*arfy can't sleep
16:53:39FromDiscord<tandy> oh sweet what game?↵(@Gumber aka Zachary Carter)
16:53:50arfyit's 00:54 here
16:54:15FromDiscord<cabboose> so how do you get to PNode
16:54:47FromDiscord<cabboose> I want to use these juicy isTyRef compiler procs etc
16:55:07FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3zzr
16:55:40FromDiscord<tandy> are there any other datatypes for this? a seq maybe?
16:56:16*kayabaNerve joined #nim
16:56:35FromDiscord<cabboose> there was some gypsy way to get to the memory when that error would happen
16:56:39FromDiscord<cabboose> i think it was a closure?
16:56:56FromDiscord<haxscramper> yes
16:57:11FromDiscord<tandy> bruh
16:57:55FromDiscord<tandy> when did it get dropped?
16:58:37FromDiscord<haxscramper> https://github.com/nim-lang/Nim/commit/35b0cc67e89a929270e77c07ecbf06f7cced3668
17:00:45FromDiscord<tandy> wow
17:03:14FromDiscord<tandy> https://github.com/nim-lang/Nim/issues/17187
17:05:29FromDiscord<haxscramper> There are some weird 'cannot be captured' issues
17:05:37FromDiscord<haxscramper> Sometimes it errors out on `var ref T`
17:05:56FromDiscord<haxscramper> Also it can't correctly capture `var T` even if it is passed from enclosing arguments
17:05:56FromDiscord<tandy> https://github.com/nim-lang/Nim/issues/7831
17:06:00FromDiscord<tandy> this is my issue
17:06:02FromDiscord<tandy> it says use seq instead ol
17:15:44FromDiscord<tandy> is there a seq like thing with keys and values in nim?
17:15:48FromDiscord<tandy> that isnt varargs lol
17:19:01FromDiscord<haxscramper> you can do `openarray[(KeyType, ValueType)]` and call it with `{<key>: <value>}`
17:19:09FromDiscord<haxscramper> Otherwise you can do `Tables`
17:20:37*Pyautogui joined #nim
17:21:41*kayabaNerve quit (Ping timeout: 246 seconds)
17:24:11FromDiscord<tandy> openarray has the same compiler error sadly
17:26:38FromDiscord<haxscramper> Then you can do `openarray[(KeyType, ValueType)]` and call it with `@{<key>: <value>}`
17:26:51FromDiscord<haxscramper> `@{}` is a seq constructor
17:27:03FromDiscord<Rika> You mean seq right
17:27:06FromDiscord<haxscramper> You might also write `@^` operator for `ref seq T`
17:27:28FromDiscord<haxscramper> I would assume `ref` anything won't trigger memory safety checking
17:27:33FromDiscord<haxscramper> because it is guaranteeed to outlive
17:27:49FromDiscord<haxscramper> IIRC closure capture increases lifetime
17:27:50FromDiscord<tandy> ohh nice
17:27:56FromDiscord<tandy> then i dont have to find and replace
17:28:53FromDiscord<haxscramper> what do you mean?
17:29:31FromDiscord<tandy> are u sure
17:29:37FromDiscord<tandy> i tried it it doesnt work
17:31:03FromDiscord<haxscramper> !eval echo typeof @{1\: 3}
17:31:04NimBotCompile failed: /usercode/in.nim(1, 16) Error: undeclared identifier: '\:'
17:31:19FromDiscord<haxscramper> https://wandbox.org/permlink/sOO8ZnGYnM9D2DVK
17:35:40FromDiscord<tandy> hm true it works
17:35:42FromDiscord<tandy> tyty
17:57:26PyautoguiDoes anyone have any resources for building quick parsers in Nim?
17:57:39PyautoguiIf so, could you please share them?
18:00:03FromDiscord<auxym> Depends on your needs. There's npeg, last I checked you can't use it to extract a full AST.
18:01:30FromDiscord<Archion> Hiiiiii
18:01:32PyautoguiAs a learning experience, I am trying to build an interpreter for a simple language consisting of just variable assignment, some arithmetic and looping.
18:01:38FromDiscord<auxym> If you want to write a hand-roll a recursive descent parser, the book "crafting interpreters" is available online for free and is a good introduction. The example code is java (in part 1, part 2 is pratt parsing in C iirc), but pretty easy to transpose to nim
18:01:43FromDiscord<Archion> I have a question about php
18:02:08FromDiscord<auxym> In reply to @Pyautogui "As a learning experience,": Then I definitely recommend Crafting Interpreters
18:02:10FromDiscord<Archion> I need a php compiler app or website to use php?
18:02:13PyautoguiThanks
18:02:37FromDiscord<haxscramper> https://gist.github.com/haxscramper/3562fa8fee4726d7a30a013a37977df6
18:02:58FromDiscord<haxscramper> there are several languages written in nim, and three reimplmenetations of "crafting interpreters"
18:02:59PyautoguiThanks
18:03:02FromDiscord<haxscramper> or two
18:03:12PyautoguiI will go check them out.
18:04:18FromDiscord<Gumber> In reply to @tandy "oh sweet what game?": I'm making a 3d networked real time strategy game in Nim
18:04:38FromDiscord<Gumber> for Windows
18:04:52FromDiscord<Gumber> I don't think I'm going to support any other platforms besides Windows - cross platform determinism is a bitch
18:05:00FromDiscord<Gumber> maybe I can look into what the guy for Northgard did
18:05:16FromDiscord<Gumber> I should just PM the devs on discord and ask
18:12:21FromDiscord<Gumber> done and done - well I didn't PM them I just pinged them since I don't know them
18:13:29FromDiscord<Ricky Spanish> if i compile a c library from nim, do i always need the nim runtime linked to execute the code library i compiled with nim?
18:14:40FromDiscord<Ricky Spanish> i.e if i use no-gc for example etc, can i remove the runtime part and have it behave as though it is a regular static library compiled from c
18:18:31FromDiscord<Gumber> if you don't use anything in the stdlib
18:18:35FromDiscord<Gumber> I imagine so
18:18:40FromDiscord<Gumber> but don't quote me on it
18:18:52FromDiscord<Gumber> better to ask in #internals
18:19:43*Pyautogui quit (Ping timeout: 265 seconds)
18:26:27FromDiscord<Ricky Spanish> ok thanks @Gumber aka Zachary Carter
18:37:19*neurocyte013 joined #nim
18:37:19*neurocyte013 quit (Changing host)
18:37:19*neurocyte013 joined #nim
18:41:48*neurocyte013 quit (Client Quit)
18:43:09*neurocyte013 joined #nim
18:43:09*neurocyte013 quit (Changing host)
18:43:09*neurocyte013 joined #nim
18:50:09*Pyautogui joined #nim
18:52:53FromDiscord<haxscramper> btw, speaking of Qt etc
18:52:53FromDiscord<haxscramper> https://doc.qt.io/qtcreator/creator-project-nimble.html
18:53:16FromDiscord<haxscramper> qt creator is shipped with nim/nimble support for the last several years if I recall correctly
18:56:58FromDiscord<Gumber> In reply to @Ricky Spanish "ok thanks <@!204328759715692544>": Np
19:00:12*Pyautogui quit (Quit: Connection closed)
19:00:46FromDiscord<Recruit_main707> In reply to @haxscramper "qt creator is shipped": yep, syntax highlight too, but thats it afaik
19:00:48*Pyautogui joined #nim
19:05:11*yewscion quit (Remote host closed the connection)
19:09:52nrds<Prestige99> Is there a way to get the type implementation of a generic with a pragma? e.g. `proc foo[T: SomeType](t: T) = ...` I want to get the type impl of SomeType
19:12:23FromDiscord<auxym> In reply to @haxscramper "qt creator is shipped": Wait what? We can use Qt from Nim?
19:13:37FromDiscord<Recruit_main707> Qt creator, the ide
19:14:39FromDiscord<auxym> so... no creating qt GUIs in nim. Not familiar with QT Creator. Does it have anything to do with the library / UI toolkit or not at all?
19:21:34FromDiscord<Yardanico> In reply to @Recruit_main707 "yep, syntax highlight too,": It supports nimsuggest too
19:22:03FromDiscord<Yardanico> In reply to @auxym "so... no creating qt": You can use nimqml to create GUI apps with Nim and QML, but no, Qt Creator doesn't allow you to use Qt directly
19:22:26FromDiscord<Yardanico> Not with Nim, for Nim it's just an IDE
19:32:14FromDiscord<tandy> coool↵(@Gumber aka Zachary Carter)
20:00:32*Pyautogui quit (Ping timeout: 252 seconds)
20:02:41FromDiscord<tandy> is it possible to print the output of an async proc? im trying to debug the results of a http request
20:06:01FromDiscord<tandy> nvm i figured it
20:06:08FromDiscord<tandy> somehow it just started working
20:07:24FromDiscord<Yardanico> echo waitFor asyncProcCall()
20:07:58FromDiscord<tandy> mm, i think using asyncCheck instead of await helped
21:15:23FromDiscord<QueenFuckingAdrielle> heyo
21:16:08FromDiscord<QueenFuckingAdrielle> do anyone know of a way to manage nim environments?
21:16:54FromDiscord<QueenFuckingAdrielle> I'm mostly using containers as it is, but i have container orchestration code in dev that i'd like to put in a virtual environment
21:17:36FromDiscord<QueenFuckingAdrielle> fwiw ive had a really positive experience using singularity containers with nim
21:30:09*Gustavo6046 quit (Remote host closed the connection)
21:30:09*Gustavo6046_ joined #nim
21:32:42*Gustavo6046_ is now known as Gustavo6046
21:46:26*greyrat quit (Ping timeout: 260 seconds)
21:47:22*lucerne quit (Ping timeout: 260 seconds)
22:00:51*max22- quit (Quit: Leaving)
23:26:33FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zB5
23:27:36FromDiscord<Elegantbeef> Did you run with `--debug` like was suggested?
23:27:43FromDiscord<Bren> yes
23:27:50FromDiscord<Elegantbeef> What was the output?
23:28:06FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zB6
23:28:35FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zB7
23:28:43FromDiscord<Elegantbeef> Hmm that doesnt mention `executing`
23:29:35FromDiscord<Bren> It must be something to do with my system as I have tried 1.4.8 and 1.4.6
23:30:15FromDiscord<Bren> sent a code paste, see https://play.nim-lang.org/#ix=3zB9
23:31:42FromDiscord<Elegantbeef> Guess i'll give it a whirl on my phone
23:32:12FromDiscord<Bren> That is exactly where I am running it. An alpine chroot on termux
23:37:28FromDiscord<tandy> damn ive figured this out before but
23:37:54FromDiscord<Elegantbeef> Going to be fun to compile a release Nim on a phone, how long did it take on your tablet? 😀
23:38:19FromDiscord<tandy> `artistName: `""""\`↵how do u get rid of the escapes when getting strings from json nodes?
23:38:39FromDiscord<Elegantbeef> `strVal`?
23:38:42FromDiscord<Elegantbeef> Sorry `getStr`
23:39:26FromDiscord<tandy> yeeee
23:39:27FromDiscord<tandy> tytyt
23:39:51FromDiscord<Elegantbeef> No problem
23:55:30FromDiscord<RattleyCooper> https://security.googleblog.com/2021/09/an-update-on-memory-safety-in-chrome.html
23:56:09FromDiscord<RattleyCooper> Google might be looking at alternative languages for use in Chrome. Unfortunately Rust is the leading contender
23:56:48nrds<Prestige99> D:
23:57:17FromDiscord<Elegantbeef> Well until notnil is fully implemented that's a safer language \:D
23:57:23nrds<Prestige99> "Ideally we’d choose option 1 - make C++ safer, at compile time. Unfortunately, the language just isn’t designed that way."
23:58:08FromDiscord<RattleyCooper> In reply to @Elegantbeef "Well until notnil is": Sad!
23:59:05nrds<Prestige99> @Elegantbeef https://play.nim-lang.org/#ix=3zBb what I was mentioning earlier. Would like to make this safer but so far it "works"
23:59:11FromDiscord<Elegantbeef> Plus views
23:59:22nrds<Prestige99> Mainly looking at the use of TrackFieldType with TrackKind