<< 12-06-2021 >>

00:05:22*mjsir911 quit (Quit: Goodbye, World!)
00:05:41*mjsir911 joined #nim
00:10:03*beanrunner2049 joined #nim
00:10:04*beanrunner2049 quit (Killed (Sigyn (Spam is off topic on freenode.)))
00:23:44*Gustavo6046 joined #nim
00:35:29*arecaceae quit (Remote host closed the connection)
00:38:47*arecaceae joined #nim
00:42:30*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
00:50:54*rockcavera quit (Remote host closed the connection)
01:02:21*Gustavo6046 joined #nim
01:04:18*orionp9 joined #nim
01:04:18*orionp9 quit (Remote host closed the connection)
01:05:36*ZoomZoomZoom quit (Ping timeout: 240 seconds)
01:22:49*arkurious quit (Quit: Leaving)
01:26:14*rockcavera joined #nim
01:28:11FromDiscord<Hi02Hi> why? if assets are stored in files, then shouldn't they be loaded at compile time?
01:28:37FromDiscord<ElegantBeef> You're going to load all of a games assets at compile time?
01:29:33FromDiscord<Rika> that'
01:29:37FromDiscord<Rika> s a massive binary
01:29:58FromDiscord<ElegantBeef> Nah AAA games are only 100s of GBs now
01:31:27FromDiscord<Rika> but theyre not all in the binary innit
01:31:39FromDiscord<Rika> can oses even run a binary that large
01:31:55FromDiscord<ElegantBeef> If you have enough ram/big enough page file, probably 😄
01:32:24FromDiscord<ElegantBeef> The boot up times got to be super long, asking the OS to allocate 100GB of memory
01:33:01FromDiscord<ElegantBeef> I suppose it'd just be like running a program in a JVM
01:33:05FromDiscord<Rainbow Asteroids> if it's a 2d game with like a few hundred MB of assets tho
01:33:15FromDiscord<Rainbow Asteroids> (edit)
01:33:23FromDiscord<ElegantBeef> Well if it's sensible you can embed the assets
01:33:42FromDiscord<Rainbow Asteroids> i love the proc name `slurp`, ill use any excuse to use it
01:33:46FromDiscord<ElegantBeef> The issue though is it makes it rather annoying to replace assets for developing 😄
01:33:59FromDiscord<ElegantBeef> `slurp("somepath").supersnappy` to really do it properly
01:34:35FromDiscord<ElegantBeef> Ah sorry it's `compress` 😄
01:34:54FromDiscord<Rainbow Asteroids> who needs parenthesis when you have UFCS↵`slurp"somepath".supersnappy`
01:35:11FromDiscord<ElegantBeef> you mean `"somepath".slup.compress`
01:35:18FromDiscord<ElegantBeef> slurp even
01:35:24FromDiscord<Rika> slup
01:35:50FromDiscord<Rainbow Asteroids> slurp is too powerful https://media.discordapp.net/attachments/371759389889003532/853085149725458432/2021-06-11-213537.png
01:36:23FromDiscord<Anuke> why is slurp an alias for staticRead
01:36:27FromDiscord<Rika> do you have 2 gigabytes of ram or what
01:36:37FromDiscord<Rainbow Asteroids> because you slurp up the resource, duh
01:36:38FromDiscord<ElegantBeef> Spaghetti! Joke aside i dont know
01:36:44FromDiscord<Rika> In reply to @Anuke "why is slurp an": likely legacy reasons
01:36:58FromDiscord<Rainbow Asteroids> In reply to @Rika "do you have 2": 8gb, i just have l4d2 open
01:37:08FromDiscord<Rika> lol
01:37:29FromDiscord<Rainbow Asteroids> if i wasn't using browser discord, id have no membory left
01:37:33FromDiscord<Rainbow Asteroids> (edit) "membory" => "memory"
01:39:17FromDiscord<Anuke> In reply to @Rika "likely legacy reasons": so araq sat down one day and thought, "hmm today I will write a proc named slurp"
01:40:26FromDiscord<Rainbow Asteroids> ngl, we need to write more apis like that
01:40:37FromDiscord<Rainbow Asteroids> hmm... it adds two numbers together. call it smart
01:46:34*david2_ joined #nim
01:46:41*david2_ quit (Remote host closed the connection)
01:51:04FromDiscord<ElegantBeef> In reply to @Anuke "so araq sat down": Comically the name `Slurp` is what it's actually called in the compiler code aswell 😄
01:52:10FromDiscord<ElegantBeef> Quite possibly it might be from one of the other languages that inspired nim using that for their static read
01:53:06FromGitter<kaushalmodi> https://www.computerhope.com/jargon/s/slurp.htm
01:54:56FromDiscord<ElegantBeef> Yea seems it's a relatively common term for the action in many languages
01:55:35FromDiscord<ElegantBeef> So kaushal did you get make a PR for that assign macro into `sugar`? 😄
01:58:37FromDiscord<ElegantBeef> Dumb joke aside, seems like there arent any libraries with the sole goal of softening edges of Nim's oop
02:00:23FromDiscord<Rika> i read that as Nim's soap
02:00:28FromDiscord<ElegantBeef> Well that too
02:00:49FromDiscord<ElegantBeef> Sharp corners just cut your gentle bits
02:13:14FromDiscord<Zachary Carter> sent a code paste, see https://paste.rs/4I9
02:13:17FromDiscord<Zachary Carter> when I say fail I mean that `foo` is nil
02:13:27FromDiscord<kaushalmodi> @ElegantBeef I didn't mean to make that PR, mainly for moral reasons.
02:13:34FromDiscord<kaushalmodi> You're the author of that code.
02:14:52FromDiscord<ElegantBeef> Does it work with `-d:useMalloc`?
02:15:16FromDiscord<kaushalmodi> On the topic of PR, recently I started going through my already opened issues, and verifying if they still apply. For one, it was resolved and I submitted a PR with a test for that.
02:15:30FromDiscord<ElegantBeef> I know that shouldnt matter, but i just solve issues the wrong way around 😄
02:15:35FromDiscord<Zachary Carter> In reply to @Hi02Hi "why? if assets are": typically no... you might have some kind of pipeline that preprocesses them and converts them into some internal binary format
02:15:49FromDiscord<Zachary Carter> but you're still going to do some IO when the game loads
02:16:08FromDiscord<Zachary Carter> the goal is to be able to dynamically load assets
02:16:20FromDiscord<Zachary Carter> In reply to @ElegantBeef "Does it work with": no 😦
02:21:19FromDiscord<ElegantBeef> I could be wrong but is that not a standard function? Seems `aligned_alloc` is the standard for that, but my C/C++ knowledge is next to zero so dont trust anything i say 😄
02:21:50FromDiscord<ElegantBeef> Ah that's the windows name 😄
02:22:17FromDiscord<ElegantBeef> I'm a dumb dumb that forgot to add `mingw`
02:23:27FromDiscord<Rainbow Asteroids> In reply to @ElegantBeef "So kaushal did you": ooh what macro
02:24:00FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3pvC this one
02:35:45FromDiscord<ElegantBeef> @Zachary Carter ah the issue is you dont use a base 2 size
02:35:54FromDiscord<ElegantBeef> > _aligned_malloc validates its parameters. If alignment is not a power of 2 or size is zero, this function invokes the invalid parameter handler, as described in Parameter Validation. If execution is allowed to continue, this function returns NULL and sets errno to EINVAL.
02:36:10FromDiscord<Zachary Carter> ah, good find thank you Beef!
02:38:05FromDiscord<Zachary Carter> oh wait
02:38:09FromDiscord<Zachary Carter> but alignment is a power of 2
02:38:14FromDiscord<Zachary Carter> it's 16...
02:38:28FromDiscord<ElegantBeef> alignment is the second variable
02:38:31FromDiscord<ElegantBeef> size is the first
02:38:36FromDiscord<Rika> Lol
02:38:45FromDiscord<Zachary Carter> fuck me
02:39:03FromDiscord<Zachary Carter> the proc signature is just wrong lol okay thanks
02:39:13FromDiscord<Zachary Carter> I need to get off the computer I think xD
02:39:45FromDiscord<ElegantBeef> Comically i think on one of the pages it basically stated "Dont fucking forget that size is first"
02:40:14FromDiscord<Zachary Carter> lol
02:40:36FromDiscord<Zachary Carter> I blame @mratsim
02:40:47FromDiscord<Zachary Carter> https://github.com/mratsim/weave/blob/master/weave/memory/allocs.nim#L101-L102
02:40:52FromDiscord<aleclarson> hi all. does anyone have any "must-use" macros they'd recommend?
02:41:06FromDiscord<ElegantBeef> Depends on what you're doing
02:41:22FromDiscord<ElegantBeef> https://en.cppreference.com/w/c/memory/aligned_alloc might've been due to this?
02:42:39FromDiscord<Zachary Carter> maybe
02:42:43FromDiscord<Zachary Carter> who really knows
02:42:47FromDiscord<Zachary Carter> I just don't want to be at fault
02:43:09FromDiscord<ElegantBeef> You arent
02:43:09FromDiscord<Zachary Carter> but yeah, thanks for the extra set of eyes, issue is no longer present 😄
02:43:33FromDiscord<ElegantBeef> he followed the posix method which turned out to be the wrong one, so now go make a PR to fix it 😛
02:44:07FromDiscord<ElegantBeef> nevermind https://github.com/mratsim/weave/pull/170
02:47:28FromDiscord<ElegantBeef> But yea seems like mratsim really was caught off guard by that silly unconventional param oder
02:47:30FromDiscord<ElegantBeef> (edit) "oder" => "order"
03:04:05*nekits07 joined #nim
03:04:05*nekits07 quit (Read error: Connection reset by peer)
03:04:25*nekits07 joined #nim
03:04:25*nekits07 quit (Remote host closed the connection)
03:04:40*nekits07 joined #nim
03:04:40*nekits07 quit (Remote host closed the connection)
03:04:55*nekits07 joined #nim
03:04:55*nekits07 quit (Remote host closed the connection)
03:05:10*nekits07 joined #nim
03:05:10*nekits07 quit (Remote host closed the connection)
03:05:25*nekits07 joined #nim
03:05:25*nekits07 quit (Remote host closed the connection)
03:05:42*nekits07 joined #nim
03:05:42*nekits07 quit (Remote host closed the connection)
03:06:00*nekits07 joined #nim
03:06:00*nekits07 quit (Remote host closed the connection)
03:06:15*nekits07 joined #nim
03:06:15*nekits07 quit (Remote host closed the connection)
03:06:32*nekits07 joined #nim
03:06:32*nekits07 quit (Remote host closed the connection)
03:06:50*nekits07 joined #nim
03:06:50*nekits07 quit (Remote host closed the connection)
03:07:07*nekits07 joined #nim
03:07:07*nekits07 quit (Remote host closed the connection)
03:07:25*nekits07 joined #nim
03:07:25*nekits07 quit (Remote host closed the connection)
03:07:45*nekits07 joined #nim
03:07:45*nekits07 quit (Remote host closed the connection)
03:08:00*nekits07 joined #nim
03:08:00*nekits07 quit (Remote host closed the connection)
03:08:20*nekits07 joined #nim
03:08:20*nekits07 quit (Remote host closed the connection)
03:08:35*nekits07 joined #nim
03:08:35*nekits07 quit (Read error: Connection reset by peer)
03:08:52*nekits07 joined #nim
03:08:52*nekits07 quit (Remote host closed the connection)
03:09:10*nekits07 joined #nim
03:09:10*nekits07 quit (Remote host closed the connection)
03:09:25*nekits07 joined #nim
03:09:25*nekits07 quit (Remote host closed the connection)
03:09:40*nekits07 joined #nim
03:09:40*nekits07 quit (Remote host closed the connection)
03:09:55*nekits07 joined #nim
03:09:55*nekits07 quit (Remote host closed the connection)
03:10:12*nekits07 joined #nim
03:10:12*nekits07 quit (Remote host closed the connection)
03:10:30*nekits07 joined #nim
03:10:30*nekits07 quit (Remote host closed the connection)
03:44:17*spiderstew joined #nim
03:45:27*spiderstew_ quit (Ping timeout: 245 seconds)
04:15:08FromDiscord<rb3.nim> Hey guys, I'm using a custom path for `nimcache` via the `--nimcache` switch for quick access to the generated cpp files. Is there a way to tell nim (or the backend) to store the `obj` files in a separate folder? using `--cc:vcc`
04:24:31FromDiscord<ElegantBeef> @treeform no clue if you care, but for fun i attempted to port hottie to linux, and hey i have something close to "working" https://media.discordapp.net/attachments/371759389889003532/853127599232385044/unknown.png
04:25:10*fred`22 joined #nim
04:25:17*fred`22 quit (Remote host closed the connection)
04:25:59FromDiscord<ElegantBeef> Suffice to say the windows method was much simpler since it seems the retrieved `rip` on linux is oddly not relative to the memory
04:33:37FromDiscord<treeform> In reply to @ElegantBeef "<@!107140179025735680> no clue if": wow I was also struggling with a linux port how did you do?
04:34:12FromDiscord<ElegantBeef> I'm still uncertain if it's proper, was getting a test up and running but here you go https://github.com/beef331/hottie/blob/master/src/hottie/linux.nim
04:34:33FromDiscord<ElegantBeef> Glad to know i wasnt the only one getting the issue 😄
04:35:14FromDiscord<treeform> I am just not as good at low level linux
04:35:36FromDiscord<ElegantBeef> Eh i'm not either, i had like 40 pages of ptrace opened when i was trying to get this to work
04:35:56FromDiscord<treeform> I tired reading just proc/#/stat it looks like 30 should be the IP reg, but it was always zero
04:36:06FromDiscord<treeform> Then I tried running perf and reading its output
04:36:11FromDiscord<treeform> but I think your solution is much cleaner
04:36:33FromDiscord<ElegantBeef> I dont know if my solution is accurate, need a windows output of test2
04:36:39FromDiscord<ElegantBeef> Sampling test1 i dont get anything out
04:36:48FromDiscord<treeform> really?
04:37:05FromDiscord<ElegantBeef> Yea no lines dumped
04:37:10FromDiscord<ElegantBeef> So i dont think i actually have it working
04:37:12FromDiscord<treeform> so on windows objdump address = memory addresses
04:37:22FromDiscord<treeform> but on linux memory addresses move with every exe load
04:37:29FromDiscord<treeform> you also need to get the "start" of the exe in memory some how
04:37:42FromDiscord<ElegantBeef> Which is where that `address` variable comes in
04:37:58FromDiscord<treeform> Does toRel fix that?
04:38:11FromDiscord<ElegantBeef> It's supposed to, but i think it's wrong
04:38:38FromDiscord<treeform> cool
04:38:42FromDiscord<treeform> I could not figure out that part too
04:39:16*Nebraskka joined #nim
04:39:22FromDiscord<ElegantBeef> Cause address holds the range of maapped memory, which means all you need to do is find which of the of those the address is in and then offset from the start of it, but yea i'm fully blind here
04:39:40FromDiscord<treeform> yeah that could be the solution
04:39:53*Nebraskka quit (Remote host closed the connection)
04:40:31FromDiscord<ElegantBeef> It gives an output now, which was better than before, but my wine tests dont show the same thing so i dont know what's wrong
04:41:11FromDiscord<treeform> I think test1.nim is kind of bad
04:41:22FromDiscord<treeform> I mostly use test4 and above now
04:41:36FromDiscord<treeform> https://github.com/treeform/hottie/blob/master/examples/test4.nim
04:41:37FromDiscord<ElegantBeef> Ah i need to rebase since you have changes
04:41:47FromDiscord<treeform> test4 should clearly be in the 2 inc ks
04:41:51FromDiscord<treeform> about 50% in one and the other
04:42:07FromDiscord<ElegantBeef> I do suggest changing hottie to the file structure i have to easily support other platforms
04:42:13FromDiscord<treeform> yeah
04:42:20FromDiscord<treeform> I usually call the types.nim "common.nim"
04:42:27FromDiscord<treeform> but yeah I agree
04:42:48FromDiscord<treeform> will this work on Mac as well?
04:42:53FromDiscord<ElegantBeef> I dont think so
04:42:58FromDiscord<treeform> ok
04:43:40FromDiscord<ElegantBeef> It'd all depend on if mac maps processess to the `/proc` folder
04:43:45FromDiscord<ElegantBeef> Apparently it supports ptrace
04:44:17FromDiscord<treeform> Oh so it uses this: https://github.com/ba0f3/ptrace.nim
04:45:01FromDiscord<ElegantBeef> Yea, saved a few hairs, didnt need to write bindings for ptrace
04:45:34FromDiscord<ElegantBeef> Could you quickly show me the output for your test4?
04:45:39FromDiscord<treeform> sure
04:45:57FromDiscord<treeform> which mode?
04:46:15FromDiscord<ElegantBeef> What do you mean?
04:46:21FromDiscord<ElegantBeef> default i guess
04:46:36FromDiscord<ElegantBeef> Forgot you had multiple profile modes
04:46:51FromDiscord<ElegantBeef> I've only been using `hottie ./program`
04:47:12FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3pDQ
04:47:29FromDiscord<ElegantBeef> Ok so yea my logic is wrong with a capital fucking
04:48:10FromDiscord<treeform> I think I found that it was usually off by xxxx0000 it left the last 4 digits the same as the objdump
04:48:34FromDiscord<treeform> I guess it moved it by offset in pages or some thing like that
04:49:21FromDiscord<treeform> I usually debug with assembly option
04:49:44FromDiscord<treeform> I get this:
04:49:52FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3pDS
04:49:53FromDiscord<treeform> its easy to verify the dump file matches
04:51:26FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3pDT
04:51:35FromDiscord<ElegantBeef> Yea it's off by something fierce i figure
04:52:52FromDiscord<treeform> excpt?
04:53:03FromDiscord<treeform> did you compile the tests with -d:release mode?
04:53:09FromDiscord<ElegantBeef> No
04:53:29FromDiscord<treeform> that might be correct because excep mode creates all of the stack trace
04:53:33FromDiscord<treeform> (edit) "trace" => "traces and is pretty slow"
04:53:43FromDiscord<ElegantBeef> Even on release it's all in excpt
04:53:54FromDiscord<treeform> ok then its not right
04:54:05FromDiscord<treeform> it should be some thing that `inc k`
04:54:09FromDiscord<treeform> those are hot on purpose
04:54:29FromDiscord<treeform> i bet its the mapping
04:54:44FromDiscord<treeform> maybe you need to subtract original dump offset or some thing
04:55:14*javi40411 joined #nim
04:55:25FromDiscord<treeform> I don't know though I don't how how linux mapping works
04:55:32*javi40411 quit (Remote host closed the connection)
04:55:41FromDiscord<ElegantBeef> Really makes 2 of us 😄
04:57:31PrestigeHow do I init an array without declaring all the values?
04:57:54PrestigeI want an array of booleans of a large size, and default all to false
04:58:07FromDiscord<ElegantBeef> `var a: array[size, bool]`
04:58:40Prestigefollow up, if I have a 2d array of these can I not do arr[x][y] ?
04:58:53FromDiscord<ElegantBeef> you can
04:58:59Prestigeif var arr: array[100, array[200, bool]]
04:59:15FromDiscord<ElegantBeef> So yea the mapping is wrong, due to getting values not in the dump.txt
05:00:48FromDiscord<treeform> but its very close
05:00:53FromDiscord<treeform> usually its a match or not match
05:01:06FromDiscord<treeform> 64bit address space is pretty big
05:01:14Prestigeah it was some other issue
05:01:14FromDiscord<treeform> I think you are some small number of bytes off
05:01:39FromDiscord<treeform> @ElegantBeef what does your dump file starts with?
05:02:04FromDiscord<treeform> I think mine started with some thing like 0xA00
05:02:10FromDiscord<ElegantBeef> `0x1000`
05:02:23FromDiscord<treeform> try subtracting or adding that?
05:02:57FromDiscord<ElegantBeef> Is this right? https://media.discordapp.net/attachments/371759389889003532/853137274308788224/unknown.png
05:03:12FromDiscord<ElegantBeef> It's closer!
05:03:51FromDiscord<treeform> maybe
05:04:01FromDiscord<ElegantBeef> on debug https://media.discordapp.net/attachments/371759389889003532/853137539854368788/unknown.png
05:04:07FromDiscord<ElegantBeef> I think we solved it 😄
05:04:31FromDiscord<treeform> Line 9 and 5 is what you want
05:04:49FromDiscord<treeform> I guess iterator should also be hot, its not as hot for me
05:04:50FromDiscord<ElegantBeef> Our outputs match, just in different order
05:05:09FromDiscord<treeform> yeah
05:05:21FromDiscord<ElegantBeef> so i'll take it as a win and say "we are victorious
05:05:23FromDiscord<treeform> with some 10% for sure
05:05:23FromDiscord<ElegantBeef> (edit) "victorious" => "victorious""
05:05:30FromDiscord<treeform> (edit) "with ... some" added "in"
05:05:39FromDiscord<treeform> yeah
05:06:01FromDiscord<treeform> I would be cool to have a linux backend for hottie
05:06:03FromDiscord<ElegantBeef> Just have to make that inferred addition and we'll be fine
05:07:02FromDiscord<ElegantBeef> atleast for single threaded profiling, multi threaded will be hell to implement
05:07:32FromDiscord<treeform> Yeah I have not done multi threaded yet
05:07:44FromDiscord<treeform> It took me days to get stack traces
05:09:06FromDiscord<ElegantBeef> I do have to wonder if there is a syscall somewhere i missed to get the relative address
05:09:16FromDiscord<treeform> I don't know
05:09:53FromDiscord<treeform> My goal with hottie is to just have a simple tool to get me hot paths, usually use benchy+hottie together
05:10:17FromDiscord<ElegantBeef> Yea it seems like it'll be a nice to use tool
05:10:35FromDiscord<ElegantBeef> Especially since it's less cumbersome than using any other profiler
05:11:02FromDiscord<ElegantBeef> Run it, click the link and edit the code
05:12:01FromDiscord<ElegantBeef> so i guess when parsing the dump lines just offsetting the start address on linux makes the most sense
05:24:05*narimiran joined #nim
05:28:31FromDiscord<ElegantBeef> And damn wish i finished this before your changes, now i have to diff stuff if i want to make a PR 😛
05:28:43*narimiran quit (Client Quit)
05:30:01FromDiscord<Rainbow Asteroids> but his profiler only works on windows :feelseggman:
05:30:12FromDiscord<ElegantBeef> But i just made it work on linux
05:30:27FromDiscord<Rainbow Asteroids> :hype:
05:31:30FromDiscord<ElegantBeef> Now if only i can replace the parsing `mapfiles` to get the stack address
05:32:32FromDiscord<treeform> I think my next change is to fully parse the dump file
05:32:39FromDiscord<treeform> right now I parse it differently based on params
05:32:48FromDiscord<treeform> but I think I should just parse it everyway
05:33:39FromDiscord<treeform> (edit) "everyway" => "into an intermediate form"
05:33:46FromDiscord<treeform> that can be used for everymode
05:33:48FromDiscord<treeform> (edit) "everymode" => "every mode"
05:36:41FromDiscord<ElegantBeef> Ah so seems there is a better way to do what i did for parsing that'll support multi threading
05:39:20FromDiscord<treeform> yes
05:42:34FromDiscord<ElegantBeef> I like the single word yes, just seems so shaming 😄
05:45:54FromDiscord<Dot32> hey, sorry if this is a stupid question, but is there a way to check if a procedure has outputted an error? I have a readline of which i want to convert to an integer. Using `parseInt()` is perfect if the user does input a valid number, but entering anything else will obviously crash. I would prefer for my program to simply warn the user and get them to re-enter a valid value.
05:46:35FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#exception-handling-try-statement
05:46:58FromDiscord<ElegantBeef> Basically wrapping the parseint in a try statement lets you capture the errors and do something based off of them
05:47:14FromDiscord<Dot32> ahh, thank you so much :D
05:53:53*xet7 quit (Remote host closed the connection)
05:55:12*xet7 joined #nim
06:10:25FromDiscord<ElegantBeef> And the dumber part i learned is since it's just the offset from the start of the memory it seems to be as simple as removing reading the first line of the maps file and getting the hex value there
06:10:47FromDiscord<ElegantBeef> So hey cleaner solutions that support multi-threading and dont effect the parsing!
06:26:45*Alanina joined #nim
06:26:53*Alanina quit (Remote host closed the connection)
06:35:32FromDiscord<treeform> Cool
06:46:11*rockcavera quit (Remote host closed the connection)
06:48:04*ichimaru joined #nim
06:48:34*ichimaru quit (Remote host closed the connection)
07:00:53FromDiscord<Bung> how to get code from PNode ?
07:04:15FromDiscord<ElegantBeef> Uhh you're in the compiler?
07:05:42FromDiscord<Bung> yeah , I want extract types from internet nim file
07:06:17FromDiscord<Bung> I get PNode nkTypeSection so far
07:06:50FromDiscord<ElegantBeef> It's a rabbithole, Pnode mostly represents underlying AST so you have to go through there to get the stuff you want afaik, i havent touched the compiler much
07:13:36*clemens3 quit (Ping timeout: 240 seconds)
07:21:48FromDiscord<Bung> hmm ,tried some code they all about parse not code gen
07:22:40*clemens3 joined #nim
07:24:14FromDiscord<Bung> oh , i get expected result
07:25:39FromDiscord<Bung> how to make a template param `cond:untyped` optional?
07:32:04FromDiscord<ElegantBeef> by making a version that doesnt take it
07:33:13FromDiscord<Bung> yeah, this is simple solution , I can't think others
07:37:16FromDiscord<Bung> https://github.com/bung87/slim/blob/devel/src/slimpkg/clonetypes.nim might be useful for others
07:37:43FromDiscord<ElegantBeef> What does it do?
07:38:35FromDiscord<Bung> extract partial of nim code from internet
07:38:50FromDiscord<Bung> `client.copyNimble("src/nimblepkg/packageinfo.nim", it.kind == nkTypeSection)`
07:39:38FromDiscord<Bung> well , the package meant to be package manager wrapper or just a installer
07:47:36*GhostAV11 joined #nim
07:47:52*GhostAV11 quit (Remote host closed the connection)
08:27:08*omnigoat joined #nim
08:36:24FromDiscord<mratsim> In reply to @Zachary Carter "I blame <@!570268431522201601>": I'm sure I saw a fix for this in the repo :/
08:36:55FromDiscord<mratsim> ah yes it's sitting there https://github.com/mratsim/weave/pull/170/files
08:37:47*tux[m] joined #nim
08:37:50FromDiscord<mratsim> ugh CI degrades so fast
08:38:23*tux[m] quit (Remote host closed the connection)
08:41:56FromDiscord<System64 ~ Flandre Scarlet> Does Nim supports Lambdas ?
08:43:05FromDiscord<Rainbow Asteroids> https://nim-lang.org/docs/manual.html#procedures-anonymous-procs
08:43:24FromDiscord<Rainbow Asteroids> you can also look at `std/sugar` for better syntax
08:44:18FromDiscord<System64 ~ Flandre Scarlet> Oh there is sugar syntax too ?
08:44:42FromDiscord<Rainbow Asteroids> https://nim-lang.org/docs/sugar.html#%3D%3E.m%2Cuntyped%2Cuntyped
08:45:56FromDiscord<System64 ~ Flandre Scarlet> Oh nice !
08:46:48FromDiscord<System64 ~ Flandre Scarlet> And the best is it's compiled
08:54:27FromDiscord<System64 ~ Flandre Scarlet> Not like Java or C# which compiles to bytecode
08:54:42FromDiscord<Rainbow Asteroids> i mean yeah, it's a compiled langauge
08:54:46FromDiscord<Rainbow Asteroids> (edit) "langauge" => "language"
08:55:24FromDiscord<Rika> uh compiling to bytecode isnt much of a downside is it
08:58:42FromDiscord<System64 ~ Flandre Scarlet> There is bit loose of performances
08:59:42FromDiscord<Rika> not necessarily?
09:00:10FromDiscord<System64 ~ Flandre Scarlet> Ah ? Why ?
09:03:11FromDiscord<haxscramper> JIT and other optimizations
09:03:43FromDiscord<haxscramper> Given a smart enough interpreter even JS can be as fast as handwritten C, though this is usually not the case
09:04:11FromDiscord<System64 ~ Flandre Scarlet> So why Python is so slow ?
09:04:29FromDiscord<haxscramper> Because it does not have enough optimizations?
09:04:44FromDiscord<haxscramper> Key part here is `"Given a smart enough interpreter"`
09:04:46FromDiscord<Rainbow Asteroids> CPython doesn't even have jit
09:05:42FromDiscord<Rainbow Asteroids> WebASM is very fast, almost machine code speed
09:07:58FromDiscord<System64 ~ Flandre Scarlet> And is C Python fast ?
09:09:47FromDiscord<Rika> cpython is not, but pypy is kinda
09:10:15FromDiscord<Rika> anyway deriving how fast java is from how fast python is is not a valid method
09:13:40FromDiscord<System64 ~ Flandre Scarlet> You talked about Javascript
09:17:51FromDiscord<Rika> read again
09:17:58FromDiscord<Rika> not me, someone else
09:18:05FromDiscord<Rika> js is not comparable with python either anyway
09:18:57FromDiscord<ElegantBeef> unless you're talking about "how to design a bad language" 😛
09:21:24FromDiscord<haxscramper> In reply to @System64 "You talked about Javascript": I just used it as example of "everyone things it is horrible" language
09:21:28FromDiscord<haxscramper> performance-wise
09:21:38FromDiscord<haxscramper> (edit) "In reply to @System64 "You talked about Javascript": I just used it as ... examplethinks" added "an" | "things" => "thinks"
09:22:18FromDiscord<haxscramper> what could be the reason of `nim doc` just hanging in the CI? I try to generate documentation for a module and it does not stop even after like ten minutes
09:23:01FromDiscord<haxscramper> I don't think it is related to any memory/execution caps in the GitHub CI because I can compile the module just fine (as a part of the test)
09:23:29FromDiscord<haxscramper> For now I just had to ignore this file but this is exteremely annoying
09:23:42FromDiscord<haxscramper> And locally everything compiles just fine
09:26:52FromDiscord<haxscramper> Or maybe some suggestions on how to debug this?
09:29:59*dshoreman joined #nim
09:30:26*dshoreman quit (Remote host closed the connection)
09:32:04*AimHere15 joined #nim
09:32:28*AimHere15 quit (Remote host closed the connection)
09:40:22FromDiscord<Rainbow Asteroids> In reply to @ElegantBeef "*unless you're talking about": at least they got full oop
09:41:20*ZoomZoomZoom joined #nim
09:42:55FromDiscord<System64 ~ Flandre Scarlet> Who ? Js or Python ?
09:52:45*iarp joined #nim
09:53:17*iarp quit (Remote host closed the connection)
10:04:31*mst joined #nim
10:09:28*G0Dzilla4 joined #nim
10:10:01*G0Dzilla4 quit (Remote host closed the connection)
10:44:13*phy1729 joined #nim
10:44:22*phy1729 is now known as Guest98217
10:44:51*Guest98217 quit (Remote host closed the connection)
10:45:31FromDiscord<Lefl> Hey,↵↵I'm trying to transmit a datetime via json but I'm getting a compilation error
10:45:32FromDiscord<Lefl> https://play.nim-lang.org/#ix=3pFA
10:45:33*marusich joined #nim
10:45:36FromDiscord<Lefl> (edit) "Hey,↵↵I'm" => "Hey,↵I'm"
10:45:52*marusich quit (Remote host closed the connection)
10:49:12FromDiscord<haxscramper> `DateTime` does not have default implementation for `%` I think you would need to write one yourself
10:49:35FromDiscord<Lefl> Oh Isee
10:50:24FromDiscord<haxscramper> !eval import std/[json, times]; echo %(let t = now(); t)
10:50:26NimBotCompile failed: /playground/nim/lib/pure/json.nim(379, 41) Error: type mismatch: got <proc (x: Time): ZonedTime{.closure, gcsafe, locks: 0.}>
11:11:04FromDiscord<hamidb80> does anyone know how to hue rotate an image in `pixie`?
11:11:13FromDiscord<hamidb80> (edit) "hue rotate" => "do hue-rotatation"
11:16:11FromDiscord<zetashift> In reply to @hamidb80 "does anyone know how": I think you use chroma for that: https://github.com/treeform/chroma#proc-spin
11:16:23FromDiscord<zetashift> Pixie relies on chroma so should be doable
11:16:39FromDiscord<zetashift> oh wait an image damn
11:19:14FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/853231965930913843/unknown.png
11:19:51FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3pFL
11:19:58FromDiscord<hamidb80> i feel dumb 😄
11:24:58FromDiscord<Vindaar> @hamidb80 Yes, `chroma` should be enough as @zetashift says. You'll want a proper coordinate system (read: color space) to perform proper hue rotation. See for instance what I do in `ginger` to reproduce the colors of `ggplot2`: https://github.com/Vindaar/ginger/blob/master/src/ginger.nim#L697-L704
11:29:38*Shine[m]1 joined #nim
11:30:04*Shine[m]1 quit (Remote host closed the connection)
11:32:40FromDiscord<hamidb80> how can i reverse a color?
11:32:56FromDiscord<hamidb80> for example white => true
11:32:59FromDiscord<hamidb80> (edit) "true" => "black"
11:38:46FromDiscord<hamidb80> solved
11:52:47*w1kl4s28 joined #nim
11:52:48*w1kl4s28 quit (Remote host closed the connection)
12:24:53*arkurious joined #nim
12:31:40FromDiscord<zetashift> In reply to @leorize "alternatively you can just": Using this https://nim-lang.org/docs/io.html#open%2Cstring%2CFileMode%2Cint proc, but how would I go about making it a named pipe? IIRC in Unix a named pipe is just a special file but I'm not sure how to let nim-sys do such a thing
12:31:52FromDiscord<zetashift> (edit) "IIRC in" => "In"
12:37:10FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3pG9
12:46:08*Profound joined #nim
12:46:37*Profound quit (Remote host closed the connection)
12:56:37*willyboar joined #nim
13:00:23*warren3 joined #nim
13:00:37*warren3 quit (Remote host closed the connection)
13:01:26*lritter joined #nim
13:07:28*stefantalpalaru quit (Quit: ZNC 1.7.5 - https://znc.in)
13:09:39*stefantalpalaru joined #nim
13:12:18FromDiscord<System64 ~ Flandre Scarlet> My program works !
13:13:29*stefantalpalaru quit (Changing host)
13:13:29*stefantalpalaru joined #nim
13:16:48FromDiscord<gerwy> and mine don't
13:17:28FromDiscord<gerwy> :pain:
13:19:55FromDiscord<gerwy> somehow when i add to sequence one thing gets reset/wipe out and i don't know why, maybe i should use something else than seq
13:21:54*mst left #nim (#nim)
13:21:57FromDiscord<gerwy> maybe lists are better option
13:26:34FromDiscord<konsumlamm> let me guess: you assign your seq to a new variable?
13:26:47FromDiscord<gerwy> what? No
13:27:14FromDiscord<gerwy> i have an object↵and i have seq in type of that object↵and i only do .add(that_object)
13:27:19FromDiscord<zetashift> In reply to @Life Sucks "somehow when i add": do you have some code available to show? Sounds like an interesting porlbem
13:27:59FromDiscord<gerwy> i think it may be to do that i declare the variable in function, but the data should stay right?
13:28:50FromDiscord<konsumlamm> just show us the code
13:29:42FromDiscord<zetashift> In reply to @Life Sucks "i think it may": you want the seq to persist outside of function yeah, but if you can show us the code it'll be easier to judge 😛
13:30:36*Vladar joined #nim
13:30:54FromDiscord<gerwy> its raylib btw https://media.discordapp.net/attachments/371759389889003532/853265101624967189/Zrzut_ekranu_2021-06-12_o_15.30.48.png
13:31:27FromDiscord<gerwy> when there is setupAnimations, in minion object everything is alright↵but when i add it to seq and check if everything inside seq is alright, the texture is gone
13:31:37FromDiscord<gerwy> every other variable is alright
13:33:23FromDiscord<konsumlamm> is `player_minions` a global variable?
13:33:48FromDiscord<konsumlamm> btw, you don't need the explicit `: void`
13:34:41FromDiscord<gerwy> In reply to @konsumlamm "is `player_minions` a global": yes
13:35:03FromDiscord<gerwy> ah sorry ,its from using other languages, a habit
13:35:55FromDiscord<konsumlamm> i can't tell what's happening there without seeing more code
13:36:01FromDiscord<gerwy> player_minions and enemy_minions are both global because they will store all minions that will be on map↵thats where im looping in to render them and to check conditions and all
13:36:11FromDiscord<kaushalmodi> In reply to @Life Sucks "ah sorry ,its from": Global variables work in Nim too. That shouldn't be the problem
13:36:28FromDiscord<konsumlamm> my guess is still that you're unknowingly copying the seq somewhere
13:36:33FromDiscord<gerwy> In reply to @konsumlamm "i can't tell what's": but thats the part where the Texture is missing, literally anything else worked before before i added this seq think
13:36:50FromDiscord<gerwy> In reply to @kaushalmodi "Global variables work in": i meant the `: void` thing
13:37:39FromDiscord<konsumlamm> In reply to @Life Sucks "but thats the part": there is nothing suspisious in that code, it's probably due to how you call it
13:37:42FromDiscord<gerwy> there is no point in showing you other code because i checked and animation is added properly
13:38:33FromDiscord<konsumlamm> there is no point in me helping you when i don't know the other code either
13:39:03FromDiscord<gerwy> hmm well i can show adding animation code
13:39:14FromDiscord<gerwy> but have in mind that i just barely started learning nim
13:39:31FromDiscord<gerwy> https://media.discordapp.net/attachments/371759389889003532/853267268095967232/Zrzut_ekranu_2021-06-12_o_15.39.26.png
13:40:04FromDiscord<gerwy> `animations` is again seq, that stores all animations↵and its a AnimationPlayer property↵in this code everything goes properly
13:40:52FromDiscord<konsumlamm> did you check `player_minions` directly after calling `spawnMinion`?
13:41:40FromDiscord<kaushalmodi> Random thought: Does it work with `--gc:none`
13:41:43FromDiscord<gerwy> no
13:42:28*stefantalpalaru quit (Quit: ZNC 1.7.5 - https://znc.in)
13:42:51*stefantalpalaru joined #nim
13:43:51FromDiscord<gerwy> In reply to @konsumlamm "did you check `player_minions`": well it wasn't hard to guess that it still doesn't have that texture↵because i checked it after the minion was added so everything after that is wrong
13:44:00*rbolling[m|gr] joined #nim
13:44:04*rbolling[m|gr] quit (Remote host closed the connection)
13:44:16*stefantalpalaru quit (Client Quit)
13:44:29FromDiscord<konsumlamm> is that a yes or noß
13:44:32FromDiscord<konsumlamm> (edit) "noß" => "no?"
13:44:39FromDiscord<gerwy> yes
13:44:46*stefantalpalaru joined #nim
13:44:49FromDiscord<gerwy> also lol it compiled so fast without gc
13:47:22FromDiscord<gerwy> ehh i will maybe try it with list↵also maybe trace when and why it gets reset
13:54:00leorize[m]@zetashift assuming that you only have to connect to a pipe, just open it like any other file, then read or write from it like with any other file
13:54:11leorize[m]you don't even have to use nim-sys :p
13:59:28*stefantalpalaru quit (Changing host)
13:59:28*stefantalpalaru joined #nim
14:00:35FromDiscord<Bung> where is nimble `install` proc implementation , I only found the forward declaration
14:02:10FromDiscord<zetashift> In reply to @Bung "where is nimble `install`": Do you mean this? https://github.com/nim-lang/nimble/blob/686555cd347badfe6c48c4ac49afade1ef8409ad/src/nimble.nim#L47
14:02:36FromDiscord<Bung> yeah, I only found this
14:03:14FromDiscord<zetashift> In reply to @leorize "you don't even have": Well TIL, other neovim clients have all these async stuff solutions so I thought some fancy stuff was needed
14:03:31FromDiscord<konsumlamm> In reply to @Bung "where is nimble `install`": https://github.com/nim-lang/nimble/blob/686555cd347badfe6c48c4ac49afade1ef8409ad/src/nimble.nim#L429
14:03:38FromDiscord<konsumlamm> CTRL+F helps
14:04:53*Grauwolf joined #nim
14:04:54*Grauwolf quit (Read error: Connection reset by peer)
14:06:04FromDiscord<Bung> oh, thanks! guess github search issue, it doesn't show in search result.
14:07:55*unixdude joined #nim
14:08:06*unixdude quit (Remote host closed the connection)
14:19:01FromDiscord<Zachary Carter> Ooph that was nasty... Not having the `cdecl` pragma on my procs which I am passing as function pointers to some C code caused a sigsev and was really tough to track down
14:19:27FromDiscord<Zachary Carter> this never was an issue on osx I guess, but on windows using mingw and cl (vcc) it definitely is
14:20:40*willyboar quit ()
14:32:11FromDiscord<kaushalmodi> In reply to @Bung "oh, thanks! guess github": I typically clone a repo and `rg 'proc.install'`
14:35:29FromDiscord<carpal> 8 bit operations are emulated on x86_32?
14:35:32FromDiscord<carpal> (edit) "x86_32?" => "x86_32, right?"
14:35:53FromDiscord<carpal> on x86_64 are 32 operations emulated?
14:35:57FromDiscord<carpal> (edit)
14:39:27FromDiscord<Randall> I'm trying to log in to the Nim forum but it attempts to login using my credentials in a GET request and it doesn't actually log in. Anyone experiencing the same?
14:59:24FromDiscord<zetashift> if you refresh or click the login button again, are you logged in then/.
14:59:25FromDiscord<zetashift> ?
15:01:24FromDiscord<gerwy> i wanted to use arrays but oh god there is no way to add to array without keeping track on the last index ehh
15:02:59FromDiscord<Hi02Hi> but you cant add to an array, they are fixed size
15:08:53FromDiscord<gerwy> i know but i need to keep track of last added element, so that i add it at the end ↵there is no .push or .add function
15:12:49FromDiscord<konsumlamm> ... because arrays always have the same size, you can't change it
15:12:56FromDiscord<konsumlamm> just use a seq instead
15:18:05*wyoung13 joined #nim
15:18:40*wyoung13 quit (Remote host closed the connection)
15:20:25FromDiscord<haxscramper> Or write a wrapper object around array that keeps track of the last element position
15:21:42FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3pHu
15:22:24FromDiscord<gerwy> In reply to @konsumlamm "just use a seq": seq doesn't work as you see
15:22:57FromDiscord<gerwy> even if i add directly object that i initiated and i know what it works, but just adding it doesn't work
15:23:24FromDiscord<Rika> well thats not supposed to happen, either you're using it wrong or youve found a bug
15:23:29FromDiscord<Rika> the latter is very rare
15:29:26FromDiscord<exelotl> Yeah seq should work, it's hard to know what could be wrong without seeing more code
15:30:24FromDiscord<randyr> In reply to @zetashift "if you refresh or": Nope. Apparently it's the form not working well with my password manager's autofill.
15:30:47FromDiscord<gerwy> In reply to @exelotl "Yeah seq should work,": i already shown my code and well it the bug is in adding stuff to seq, nothing more, everything else works as intended
15:31:17FromDiscord<exelotl> is anything taking pointers to data in the seq?
15:32:04FromDiscord<exelotl> because things could go wrong if that happens, since seq data will be reallocated as more items are added
15:33:15FromDiscord<exelotl> so then those pointers would be pointing to deallocated memory
15:33:37*rockcavera joined #nim
15:37:29FromDiscord<konsumlamm> or maybe multiple things are running concurrently?
15:38:20FromDiscord<Rika> In reply to @Life Sucks "i already shown my": okay, good luck
15:50:15FromDiscord<gerwy> In reply to @exelotl "is anything taking pointers": there is no pointers↵there is only index to texture that is stored in gpu, but this doesn't change anything↵but i said it already, everything goes properly, only Texture data gets wiped somehow
16:00:16*altarrel quit (Quit: Idle for 30+ days)
16:02:29FromDiscord<zetashift> In reply to @Life Sucks "i already shown my": do you by any chance have a repo with the code?
16:06:40FromDiscord<Bung> I've forked nimble add feature that handle requires in task https://github.com/bung87/slim
16:08:50FromDiscord<gerwy> In reply to @zetashift "do you by any": nope it was supposed to be side project i didn't had in plans to open source it
16:09:37FromDiscord<haxscramper> In reply to @Bung "I've forked nimble add": https://github.com/bung87/slim/tree/devel/src/slimpkg/hnimast why copy packages completely?
16:10:12FromDiscord<Bung> not plan to create PR to nimble
16:10:25FromDiscord<haxscramper> I mean I have nothing agains it, but I do provide tons of fixes for hnimast quite often
16:11:07FromDiscord<Bung> hmm if you do seperate nimble related to a single file I can use yours
16:11:39FromDiscord<haxscramper> you mean `compier_aux`? into `nimble_aux` and compiler-related things
16:12:27FromDiscord<Bung> yeah, cause I have a module only need compiler aux
16:12:43*stefantalpalaru quit (Quit: ZNC 1.7.5 - https://znc.in)
16:12:57*stefantalpalaru joined #nim
16:13:05FromDiscord<haxscramper> sure, it is not a good idea to mix nimble/compiler together anyway
16:13:11FromDiscord<Bung> well in that period I dont complete nimble related things so it make things more complicated
16:13:59FromDiscord<Bung> yeah, also not much work need to do
16:14:12*stefantalpalaru quit (Changing host)
16:14:12*stefantalpalaru joined #nim
16:16:04FromDiscord<Bung> oh, another think your package requires nimble ,but am a fork so I dont need build nimble binary
16:17:57FromDiscord<haxscramper> well, yeah, but I don't think it is possible to disable build of the nimble binary if I depend on it
16:18:06FromDiscord<haxscramper> So hybrid packages will build binaries
16:18:09FromDiscord<haxscramper> I hate this too
16:18:21FromDiscord<haxscramper> I don't need nimble binary anywere and yet it gets build each time
16:19:02FromDiscord<Bung> your package only need some type from nimble , you can use my tool https://github.com/bung87/slim/blob/devel/src/slimpkg/clonetypes.nim
16:19:42FromDiscord<Bung> well , in the end I need copy full file, but some code might be useful to you
16:23:46*NimBot joined #nim
16:26:35FromDiscord<Bung> I was think that `requires` use name,ver, varargs syntax
16:27:13FromDiscord<Bung> so the nimble can do what exactly you wanna do
16:29:57FromDiscord<haxscramper> similar to cargo? https://doc.rust-lang.org/cargo/reference/features.html#dependency-features
16:32:12FromGitter<bung87> Yeah python pip also allow args
16:34:11FromDiscord<haxscramper> @Bung https://github.com/haxscramper/hnimast/blob/master/src/hnimast/nimble_aux.nim
16:34:27FromDiscord<haxscramper> new version - 3.28
16:34:33FromDiscord<haxscramper> (edit) "3.28" => "0.3.28"
16:38:10FromDiscord<gerwy> ehh i tried to do it with lists and it still doesn't work, something is not going well
16:38:29FromDiscord<haxscramper> Can you send a reproducible code sample?
16:39:04FromDiscord<gerwy> idk, i use a lot of objects and texture so idk if it will work
16:39:12FromDiscord<gerwy> i will try
16:40:34FromDiscord<gerwy> and also you need raylib for that too, because im using its Rectangle type
16:40:58FromDiscord<gerwy> okay wait
16:43:31FromDiscord<haxscramper> In reply to @Bung "well , in the": if you are going for straight-up nimble alternative instead of improvement fork you could also take a look at https://github.com/disruptek/nimph
16:43:39FromDiscord<haxscramper> But I would advise you to just
16:43:40FromDiscord<haxscramper> dont
16:44:30FromDiscord<haxscramper> But that's only my advise so in general you can do as you wish
16:45:07FromDiscord<Bung> I agree, I looked into nimble, I think it will not be fun
16:45:57FromDiscord<dom96> @Bung what are you trying to do with Nimble?
16:46:27FromDiscord<Bung> I added a `requires` processing in `task`
16:46:57FromDiscord<dom96> cool, that's been requested by multiple people
16:47:21FromDiscord<Bung> I dont wanna my lib's user install packages that only I needed during development.
16:48:17FromDiscord<Bung> well, that's a fork, think a temporary solution, nimble will add same feature in future right ?
16:49:12FromDiscord<haxscramper> https://github.com/nim-lang/nimble/issues/482 requested in 2018
16:49:16FromDiscord<Bung> I've noticed @mratsim create a issue for it , yeah , it's actually needed , some dev packages are huge
16:50:07FromDiscord<Rika> might be nicer to adopt the features idea from rust too?
16:50:11FromDiscord<Rika> nicer -> nice
16:50:52FromDiscord<haxscramper> After looking at cargo I just think we could simply
16:50:56FromDiscord<haxscramper> rewrite cargo for nim
16:51:24FromDiscord<haxscramper> generally speaking it would be better than trying to come up with novel solutions
16:51:28FromDiscord<Bung> yeah, nimble code also need rewrite I think , move some code to dependencies
16:52:07FromDiscord<zetashift> In reply to @haxscramper "rewrite cargo for nim": why not just...use cargo for Nim?
16:52:11FromDiscord<zetashift> is cargo rust specific?
16:52:20FromDiscord<haxscramper> yeah, it is insanely rust-specific
16:52:25FromDiscord<dom96> of course it is
16:52:26FromDiscord<zetashift> ah damn
16:52:45FromDiscord<haxscramper> and well, there are nim-specific features as well
16:52:47FromDiscord<Bung> oh , if cargo will go , then npm , pip also be fine...
16:52:53FromDiscord<Rika> some ideas are not 1:1 either, like the repository handling i believe?
16:53:09FromDiscord<zetashift> In reply to @Bung "oh , if cargo": fair enough 😛
16:53:25FromDiscord<Bung> `npm install nimble`
16:53:36FromDiscord<haxscramper> In reply to @Rika "some ideas are not": I thought maybe it would be possible to create a centralized registry and make installation for url possible
16:53:46FromDiscord<haxscramper> so you get better experience with packages from registry
16:53:51FromDiscord<Rika> In reply to @Bung "`npm install nimble`": cursed
16:53:51FromDiscord<haxscramper> but don't close url path completely
16:54:31FromDiscord<Bung> make a registry is not hard , just need someone done.
16:54:33FromDiscord<zetashift> In reply to @Bung "`npm install nimble`": `winget install nimble` https://github.com/microsoft/winget-cli
16:54:36FromDiscord<gerwy> ugh it does work in minimal reproduction...
16:54:37FromDiscord<gerwy> why
16:55:08FromDiscord<haxscramper> In reply to @haxscramper "I thought maybe it": ah well https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories
16:55:13FromDiscord<haxscramper> time to learn rust I guess
16:55:40FromDiscord<Rika> wait what why
16:55:46FromDiscord<Rika> oh to convert?
16:57:21FromDiscord<dom96> In reply to @Bung "make a registry is": everything just comes down to someone doing it 🙂
16:57:38FromDiscord<dom96> and Nimble hasn't had anyone doing for a while
16:57:39FromDiscord<Bung> that's funny
16:58:01FromDiscord<haxscramper> In reply to @Bung "make a registry is": https://github.com/haxscramper/hax-nim/blob/master/compilerapi/test7.nim here is a parser for all packages that extracts their requirements
16:58:14FromDiscord<dom96> I think I've convinced Araq to develop it though
16:58:27FromDiscord<haxscramper> Though it is an older implementation and it might not compile
16:58:38FromDiscord<haxscramper> but It worked for 97% packages at the time
16:59:09FromDiscord<Bung> I'v notice araq and zevv porting z3 that lib might solve the dependencies resolve thing
16:59:32FromDiscord<haxscramper> yes, it is discussed in nimble/#890
16:59:37FromDiscord<Bung> so a package manager almost done.
17:00:07FromDiscord<haxscramper> well, it is a complex problem so I would not declare it "done"
17:00:45FromDiscord<haxscramper> like package manager is not just a manifest-parser+graph-builder+solver
17:02:04FromDiscord<zetashift> even those things aren't simple haha
17:03:40*Aeg joined #nim
17:04:10*Aeg quit (Remote host closed the connection)
17:05:30FromDiscord<haxscramper> z3 approach is clearly out of my level of expertise, but something like libsolve
17:05:45FromDiscord<haxscramper> but again, there is no global RFC to start with
17:06:31FromDiscord<haxscramper> Yeah "nimble bad", it "lacks features" and so on, but this discussion is not focused enough to be explicitly actionable
17:07:04FromDiscord<Bung> that's hard thing , I can only use it , developing no.
17:07:22FromDiscord<haxscramper> you mean use/develop nimble?
17:07:32FromDiscord<Bung> z3
17:08:07FromDiscord<Bung> all my math learned from mid school
17:15:31FromDiscord<Bung> https://github.com/bung87/crown_ui http://crown_ui.bungos.me anyone can help design webpage ?
17:35:49FromDiscord<dom96> easiest way is to just grab some UI/css framework
17:47:51FromDiscord<haxscramper> "features" can be mapped to regular defines
17:48:27FromDiscord<haxscramper> `nimble` manifest is a nimscript, therefore `when defined(feature1): requires "some-library"`
17:48:55FromDiscord<haxscramper> But then we start losing ability to statically parse manifests
17:49:26FromDiscord<haxscramper> I.e. we can get package manager that is as complex as emerge/pacman/cargo combined and supports every possible use case
17:49:50FromDiscord<haxscramper> and then be completely unable to get list of dependencies
17:51:20FromDiscord<Rika> it can be mapped to regular defines but stuffs getting quite messy due to lack of standardisation
17:51:32FromDiscord<treeform> In reply to @ElegantBeef "so i'll take it": Hey I re-did some of the objdump parsing stuff, thoughts? https://github.com/treeform/hottie/pull/3 How would we get linux stack traces working?
17:57:06ForumUpdaterBotNew thread by Lscrd: LowerBound and upperBoud from module “algorithm”, see https://forum.nim-lang.org/t/8108
17:58:58ZevvBung: my z3 port has been pretty much abandoned, I use it myself every now and then but I don't think it has any actual users at this time
17:59:23ZevvI used it to calculate the tooth count and sizes for a planetary 1:12 gear set the other day though
17:59:45*aligator12312 joined #nim
17:59:48*aligator12312 quit (Remote host closed the connection)
18:02:47Prestige@treeform I'm using paths to create a fill a polygon (with pixie), but it seems like the path is not affected by the translation of the Context. Is this the designed behavior?
18:03:16Prestigeto create and fill a polygon*
18:05:14*electr0n9 joined #nim
18:05:42*electr0n9 quit (Remote host closed the connection)
18:15:51Prestigehttps://play.nim-lang.org/#ix=3pIC @treeform for a runnable example. If it's intended I can work around it
18:19:00*ozzz quit (Quit: Bye)
18:19:46*ozzz joined #nim
18:27:10ForumUpdaterBotNew thread by Xigoi: How to add something before a C declaration?, see https://forum.nim-lang.org/t/8109
18:27:51FromGitter<bung87> @zevv okay
18:32:42*markmcb joined #nim
18:33:11*markmcb quit (Remote host closed the connection)
18:34:02FromGitter<BracketMaster> how can I print an int as a binary string in Nim?
18:40:18FromDiscord<zetashift> In reply to @Prestige "https://play.nim-lang.org/#ix=3pIC <@10714017902573": does it work with this fill method? https://nimdocs.com/treeform/pixie/pixie/contexts.html#fill%2CContext%2CPath
18:41:45Prestige@zetashift oh yes, it does. Interesting
18:44:28FromDiscord<zetashift> I think with `context` you don't want to directly access the `image`
18:44:55Prestigeyeah that makes sense
19:00:05FromDiscord<whisperdev> Will Nim's json handling ever be fast?
19:00:33*Guest2385 joined #nim
19:01:05*Guest2385 quit (Remote host closed the connection)
19:07:05FromDiscord<haxscramper> There are several packages for json if `std` version is not fast enough for your needs
19:20:23FromDiscord<hamidb80> what is `parallel` exactly for? is it just a parallel checker?
19:22:00FromDiscord<hamidb80> i don't get it
19:25:36Prestigehttps://nim-lang.org/docs/manual_experimental.html#parallel-amp-spawn-parallel-statement if you haven't seen this
19:56:21FromDiscord<treeform> In reply to @Prestige "https://play.nim-lang.org/#ix=3pIC <@10714017902573": Prestige, you are using image.fillPath which is not part of context, just use the higher level context API and everything will work out.
19:56:51PrestigeThanks
19:57:13FromDiscord<ElegantBeef> @treeform so it seems like it'll be relatively similar to the windows impl, just with ptrace and converting to/from rip, but i guess i cannot think of a non code duplicating method of doing it so will just copy paste it 😄
19:59:02FromDiscord<treeform> In reply to @Prestige "Thanks": Just use ctx.moveTo and ctx.lineTo and ctx.fill()
20:04:51FromDiscord<treeform> In reply to @ElegantBeef "<@!107140179025735680> so it": I think if there is a way to get stack trace as a dump.
20:04:58FromDiscord<treeform> Then pass it so some sort of stack parser
20:05:14FromDiscord<treeform> It does require the address translations though
20:05:23FromDiscord<treeform> copy pasting might not be a bad solution
20:07:23FromDiscord<treeform> Stack walking algorithm I use right now is: Scan the stack, keep anything that looks like an code address. Then for every function call pair see if A can call B (using the call graph from objdump), if can't than that frame is junk so ignore it.
20:10:12*Grinnz27 joined #nim
20:10:20*Grinnz27 quit (Remote host closed the connection)
20:20:57FromDiscord<ElegantBeef> @treeform can i ask for the stack output of your test4?
20:21:42FromDiscord<ElegantBeef> I think mine is right since it seems sensible but want a double check https://media.discordapp.net/attachments/371759389889003532/853368481525006376/unknown.png
20:22:17FromDiscord<treeform> Yeah that looks correct
20:22:23FromDiscord<treeform> try test 5 it has a bunch of junk to filter out
20:22:30FromDiscord<treeform> (due to junk functions)
20:23:11FromDiscord<ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/853368858437877800/unknown.png
20:23:16FromDiscord<treeform> this is my test5:
20:23:18FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/853368886023159858/unknown.png
20:23:29FromDiscord<ElegantBeef> ah so bit noisier 😄
20:23:45FromDiscord<treeform> yeah why is your case when it could not figure out the stack trace so high?
20:23:57FromDiscord<treeform> Maybe because it pauses on exist
20:24:01FromDiscord<treeform> I had that happen too
20:24:17FromDiscord<treeform> Some time when program exists it sits somewhere in the OS for a bit
20:24:54FromDiscord<treeform> test4 is same:
20:24:55FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/853369295907586088/unknown.png
20:25:21FromDiscord<ElegantBeef> Release or debug?
20:28:43FromDiscord<ElegantBeef> I think the variability of the outputs might just be due to differences in processors and OS 😄
20:33:34*Vladar quit (Quit: Leaving)
20:33:44FromDiscord<treeform> yeah
20:33:59FromDiscord<treeform> I do all tests with release
20:34:08FromDiscord<treeform> debug tests are very noisy
20:34:28FromDiscord<treeform> usually they they manage the stack-traces a ton.
20:34:46FromDiscord<ElegantBeef> Yea my release stack trace profile either is super slow or is broken
20:34:55FromDiscord<treeform> oh
20:35:15FromDiscord<ElegantBeef> I'll give it more time to see what happens
20:35:16FromDiscord<treeform> I don't think it makes sense to profile non -d:release code because well ... its debug
20:35:30FromDiscord<treeform> its run time is not what you will ship
20:35:53FromDiscord<ElegantBeef> Yea i know, well we'll see if this ever finishes
20:35:57FromDiscord<treeform> ok cool
20:39:36FromDiscord<ElegantBeef> Hmm on release it seems something freezes the program
20:47:13FromDiscord<ElegantBeef> Think the issue is just that the program is optimizing a lot away so it's missing it running 😄
20:49:40FromDiscord<ElegantBeef> Well with that knowledge time for a PR so you can merge the better parser on top and everyone's happy
20:54:08FromDiscord<ElegantBeef> Sidenote, it doesnt play well with clang
21:03:53FromDiscord<ElegantBeef> @treeform to give you some confuckery gcc is the only compiler that needs the manual offset of addresses, the other compilers have the proper offsets from the `getRegs`
21:04:50*PMunch joined #nim
21:08:27FromDiscord<treeform> oh crazy
21:08:46FromDiscord<ElegantBeef> Seeing in another community if there is a flag we can just use in gcc to get the same mapping
21:08:49FromDiscord<treeform> no manual offset needed on gcc+windows
21:16:35FromDiscord<ElegantBeef> Hopefully there is just a flag that can be used compiling the binary, otherwise a flag will be needed for "using odd compiler" 😛
21:19:58*andrewjs1826 joined #nim
21:20:34*andrewjs1826 quit (Remote host closed the connection)
21:22:00*lritter quit (Ping timeout: 240 seconds)
21:23:19PMunchHi treeform, long time
21:24:07PMunchTried your Istrolid game, pretty cool stuff
21:34:26FromDiscord<ElegantBeef> Well i'm going to walk my dogs and hope someone smarter than i gets back to me why these addresses are vastly different between compilers and a flag to compile linux gcc with 😄
21:34:41PMunchWhat's the issue?
21:35:14FromDiscord<ElegantBeef> on linux gcc made binaries have a system relative `rip`, but clang and tcc have a program relative `rip`
21:35:33PMunchrip?
21:35:40FromDiscord<ElegantBeef> register instruction pointer
21:37:39PMunchRelated to this? https://stackoverflow.com/questions/55648274/why-does-clang-behave-weirdly-with-register-variables-compared-to-gcc
21:38:45FromDiscord<System64 ~ Flandre Scarlet> How can I pass an argument from the command line, such a path to a file for exemple
21:39:21PMunchparamCount and paramStr
21:39:31PMunchOr commandLineParams
21:41:14FromDiscord<System64 ~ Flandre Scarlet> do I need to import something?
21:41:29PMunchYes
21:42:08PMunchThe `os` module, in case you don't have access to the manual or Google :P
21:52:44FromDiscord<System64 ~ Flandre Scarlet> ah yeah thanks
21:52:57PMunchNo problem
21:53:50FromDiscord<System64 ~ Flandre Scarlet> and to remove the x latest characters?
21:54:30PMunchThere are more complex modules as well, to parse the arguments or allow things like the common patterns
21:54:42PMunchYou can just setLen on a string to make it shorter
21:55:08PMunchOr slice using `myStr[0..^10]`
21:55:42PMunchAnd there are some specialised utilities if you want to remove things like a file extension for example
21:59:24FromDiscord<System64 ~ Flandre Scarlet> Doesn't work very well https://media.discordapp.net/attachments/371759389889003532/853393070346207242/unknown.png
22:00:01PMunchThat's because ^ is already an alias for x.len - y
22:01:00FromDiscord<System64 ~ Flandre Scarlet> ah sorry
22:01:30PMunchhttps://play.nim-lang.org/#ix=3pJY
22:07:56FromDiscord<System64 ~ Flandre Scarlet> WTF it's a string! https://media.discordapp.net/attachments/371759389889003532/853395213129482240/unknown.png
22:09:56PMunchparamStr takes an integer to which number of argument you want
22:10:12PMunchWhat you do there is assign path to be the procedure paramStr
22:10:41PMunchAnd you shouldn't call setPositionImpl directly, just call setPosition
22:12:18FromDiscord<System64 ~ Flandre Scarlet> and with CommandLineParams it's an array of params?
22:12:27PMunchA sequence I believe
22:12:45PMunchparamCount and paramStr are analogous to argc and argv in C
22:13:05FromDiscord<System64 ~ Flandre Scarlet> ah I see
22:23:20FromDiscord<ElegantBeef> Ugh pmunch sucks that seems to get clang to work like gcc and not the other way around 😄
22:30:42PrestigeAny thoughts on https://forum.nim-lang.org/t/8110#52013 ? I'm curious if this should go under a new "Feature request" issue
22:30:55PMunchI'm all for it
22:31:19PMunchThe second one though poses another interesting question (well maybe both do), how would we differentiate them?
22:32:25PMunchWe should probably have some kind of common pattern for "procedure that returns on opt"
22:32:35FromDiscord<ElegantBeef> We dont have return type inference so `getOpt` maybe
22:32:36PrestigeYeah I agree
22:32:45FromDiscord<ElegantBeef> or `maybeGet`
22:32:54PrestigeI like getOpt
22:33:07PMunchKinda like how Ruby has ? for things that return a boolean
22:33:40Prestigehow does that syntax look?
22:33:54FromDiscord<ElegantBeef> `thing.has?(x)` afaik
22:34:18PMunchLike this: https://medium.com/@sologoubalex/boolean-methods-in-ruby-94a2e907e5ea
22:34:20FromDiscord<ElegantBeef> It's pointless noise imo, but some people like it
22:34:51PMunchRuby also has ! for methods that mutate state passed to it
22:35:02PMunchx.downcase! would lower case x
22:35:12PMunchWhile x.downcase would return a lower cased version of x
22:35:32Prestige🤔
22:36:23FromDiscord<ElegantBeef> i prefer the `lowered` and `lower`, but we also dont have discardable functions
22:36:29PrestigeI think just `get` would be fine really - table[i] throwing a KeyError makes sense to me, but maybe table.get(i) would return an Option
22:36:41PrestigeAt least I don't think there's a get proc yet
22:36:54FromDiscord<ElegantBeef> clearly you do `{}` for option to make everyone cry 😛
22:37:00Prestigeoh no lol
22:37:54PMunchHaha :P
22:41:33FromDiscord<ElegantBeef> Well actually that didnt change clang any, so now the question is does it support the silly gcc shit, clang, or does someone find how to get gcc's binaries to pass a proper `rip` 😛
22:42:58PMunchWhat are you using this for?
22:43:56FromDiscord<ElegantBeef> the linux port of treeforms sampling profiler
22:44:14FromDiscord<ElegantBeef> the `rip` is used to get the code from the dumped binary
22:44:23PMunchAah I see
22:44:47FromDiscord<ElegantBeef> The addresses of all the gcc stuff is offset by the start of the system memory, whereas clang is exact
22:45:14FromDiscord<ElegantBeef> And there is no way of knowing from the binary that i see to know which compiler it came from
22:45:19FromDiscord<ElegantBeef> So it's just god awful
22:56:30PMunchWouldn't the offsets in GCC be so large that they would be outside the binary?
23:00:15FromDiscord<schneiderfelipe> sent a long message, see http://ix.io/3pK9
23:00:25FromDiscord<ElegantBeef> Exactly the issue, they're super large, and need to be offset by the start of the program which means there is a mismatch between compilers and it makes me sad 😄
23:01:51PMunchYeah I was just saying it'd be easy to detect wether they where local or global
23:02:15FromDiscord<schneiderfelipe> (edit) "long message," => "code paste," | "http://ix.io/3pK9" => "https://play.nim-lang.org/#ix=3pKc"
23:02:58FromDiscord<ElegantBeef> I suppose but still feels stupid and there should be a cleaner way
23:03:14FromDiscord<ElegantBeef> Hopes there is a way to do it with a gcc flag
23:11:33*blackpawn quit (Ping timeout: 258 seconds)
23:22:32FromDiscord<treeform> In reply to @PMunch "Tried your Istrolid game,": Thanks!
23:23:47FromDiscord<treeform> In reply to @ElegantBeef "I suppose but still": Maybe objdump has a flag?
23:24:27FromDiscord<treeform> clang has its own objdump?
23:25:08FromDiscord<treeform> https://llvm.org/docs/CommandGuide/llvm-objdump.html "-r, --reloc Display the relocation entries in the file."
23:25:59FromDiscord<System64 ~ Flandre Scarlet> what is a Tainted string?
23:26:30*ZoomZoomZoom quit (Ping timeout: 258 seconds)
23:26:51FromDiscord<treeform> In reply to @System64 "what is a Tainted": It was an experiment in that strings coming from IO would be tainted and programmer would have to cast them to real strings when parsing. I think nim is moving away from that.
23:26:58FromDiscord<treeform> I don't think it made programs any safter.
23:27:02FromDiscord<treeform> (edit) "safter." => "safer."
23:27:12*orangeacme joined #nim
23:27:21FromDiscord<System64 ~ Flandre Scarlet> so I can cast it without problems?
23:27:24*orangeacme quit (Remote host closed the connection)
23:27:30FromDiscord<treeform> yeah
23:27:34FromDiscord<treeform> just $ also works
23:27:44PMunchIt's just a distinct string, so the data type is exactly the same
23:27:50FromDiscord<ElegantBeef> Well it's an alias to string so you dont need to cast it unless you enable it
23:28:40FromDiscord<treeform> @ElegantBeef there is also `-R --dynamic-reloc` "Print the dynamic relocation entries of the file. This is only meaningful for dynamic objects"...
23:28:59FromDiscord<treeform> Maybe that can help produce a proper dump object file that matches the memory layout?
23:29:16FromDiscord<treeform> https://linux.die.net/man/1/objdump
23:29:28FromDiscord<System64 ~ Flandre Scarlet> Doesn't work https://media.discordapp.net/attachments/371759389889003532/853415735517904896/unknown.png
23:29:40PMunch@treeform, did you write Istrolid all by yourself by the way?
23:29:52FromDiscord<treeform> yes I did
23:30:02FromDiscord<treeform> I had people help with balance/ideas though
23:30:34PMunchYeah I saw you posted something about a community balancing thing
23:30:42FromDiscord<treeform> some people also contributed bug fixes
23:30:47PMunchI would still consider that by yourself :)
23:30:59PMunchWhat's it written in?
23:31:03PMunchLike engine and stuff
23:31:46FromDiscord<treeform> Github says I wrote 89% of the lines.
23:31:58PMunchOh it's on GitHub?
23:32:03FromDiscord<treeform> Private
23:32:14PMunchAh right
23:32:27FromDiscord<treeform> Its written in CoffeeScript
23:32:30FromDiscord<treeform> and is browser based
23:32:34FromDiscord<treeform> the steam version is just electron
23:32:49FromDiscord<treeform> I was always about niche experimental languages
23:32:56FromDiscord<treeform> CoffeeScript just basically died on me
23:33:03FromDiscord<treeform> I don't like JS/HTML5 any more
23:33:24PMunchDied on you?
23:33:30PMunchNo one using it any more?
23:33:42FromDiscord<treeform> CoffeeScript stop being cool, stop being popular
23:33:48FromDiscord<treeform> I got tried of it, it has some design holes
23:34:04FromDiscord<treeform> I used it long enough to understand that it has not future
23:34:07PMunchI remember having heard of it, but never seen anything written in it, let alone a full game
23:35:40FromDiscord<treeform> The atom editor was written in CoffeeScript
23:35:45FromDiscord<treeform> but then they ported it to JS
23:35:55PMunchHuh, didn't know that
23:35:58FromDiscord<treeform> Easy port as you just compile and use the compiled output
23:36:07FromDiscord<treeform> maybe fix up some spaces and award things
23:36:11PMunchSo it's not like Nims C output then :P
23:36:19FromDiscord<treeform> (edit) "award" => "awkward"
23:36:31FromDiscord<treeform> No it tries to produce readable JS
23:36:43FromDiscord<treeform> As its nearly 1:1 match with JS
23:37:12FromDiscord<treeform> Even the docs have coffee on one side and js on the other: https://coffeescript.org/#overview
23:37:20FromDiscord<treeform> even comments are copied
23:37:24PMunchYeah I just saw that
23:37:46FromDiscord<treeform> CoffeeScript is similar to python/nim
23:37:49FromDiscord<treeform> in syntax
23:37:55FromDiscord<treeform> except no types
23:38:12PMunchI mean it's an admirable goal, but I much prefer Nim outputting fast C than readable C
23:38:27FromDiscord<treeform> yes
23:38:46FromDiscord<treeform> I think there is a place for CoffeeC which tries to do that for C
23:39:08FromDiscord<treeform> But it would have to have C's semantics which are honestly not that great.
23:39:09PMunchHmm, no types, I'm already sceptical :P
23:39:55FromDiscord<treeform> I man I could use a nim-like language without GC, or event strings, producing nice looking C
23:40:06FromDiscord<treeform> I mean
23:40:29FromDiscord<treeform> Kind of like CoffeeScript to JS, but CoffeeC to C
23:40:47FromDiscord<treeform> But Nim is probably a better language
23:41:21PMunchIt has its good parts and bad parts, but I like it
23:41:52PMunchBy the way, are you holding a talk this year for NimConf?
23:44:50FromDiscord<treeform> Big problem with CoffeeScript is that it can compile junk into junk, like the language is so loose anything goes.
23:44:58FromDiscord<treeform> So its easy to make typos and it continues to compile and work
23:45:18PMunchOooh, that's not great
23:45:20FromDiscord<treeform> Checkout this beauty:
23:45:21FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/853419733944762368/unknown.png
23:45:48PMunchOuch, yeah that's not great
23:46:11FromDiscord<treeform> Its very very loose
23:46:40FromDiscord<treeform> Nim would stop at first character and say "To" is not defined.
23:47:37FromDiscord<treeform> I am doing NimConf on https://github.com/treeform/pixie
23:47:54FromDiscord<treeform> I was supposed to be recording now, but I am kind of out of energy, will probably do it tomorrow.
23:48:07PMunchOoh, looking forward to that! Pixie looks really nice
23:48:12PMunchHaven't tried it yet though
23:48:12FromDiscord<treeform> I got the slides done and rough text
23:48:32FromDiscord<treeform> I feel like I have grown a ton as a programmer writing Pixie.
23:48:38FromDiscord<treeform> Its not a simple project
23:48:44PMunchI need to get my slides done and record mine yesterday, I'm going to be gone all of next week
23:49:07FromDiscord<treeform> What is yours about?
23:49:19PMunchHaha, I know, I actually started writing a SVG rasterizer at one point
23:49:41PMunchMine is about writing my keyboard firmware in Nim
23:49:55PMunchAnd how Nim is great for micro-controller programming in general
23:49:59FromDiscord<treeform> Its tough. I will never finish the SVG stuff because SVG can contain HTML/JS/CSS. So effectively you need a whole browser.
23:50:24PMunchI feel like I'm a bit on and on about the same topic, but it's just what I've been doing for quite a while
23:50:25FromDiscord<treeform> keyboard firmware cool!
23:50:43FromDiscord<treeform> Do you by any chance have it working on Ergodox Ez?
23:50:47PMunchYeah SVG with HTML/JS/CSS is such a mess
23:50:49FromDiscord<treeform> Otherwise I would flash it.
23:51:07FromDiscord<ElegantBeef> I really should've made a talk about using macros to save your brain cells 😄
23:51:30FromDiscord<treeform> I could make a talk about using macros to delete brain cells 🙂
23:51:41FromDiscord<ElegantBeef> lol
23:52:03FromDiscord<ElegantBeef> I heavily abuse macros in most of my libraries 😄
23:52:11FromDiscord<treeform> I try not to
23:52:16FromDiscord<treeform> I use them as last resort
23:52:34FromDiscord<treeform> My biggest macro is 250 lines and its so hard to figure out what is going on.
23:52:53FromDiscord<ElegantBeef> I dont like writing the same code over and over, so macros save the day 😛
23:53:01PMunchShould work on the Ergodox Ez, uses the Teensy 2.0, which is the same controller that I'm using in my custom board
23:53:03FromDiscord<ElegantBeef> Plus i tend to prefer generative code than manually written
23:53:58PMunchAh, they seem to use a very similar port expander as well
23:54:09FromDiscord<treeform> Maybe it can work?
23:54:20PMunchThe MCP23018, I'm using the MCP23017
23:54:49FromDiscord<treeform> I have two nearly identical Ergodox Ezs I can experiment with one.
23:54:54FromDiscord<ElegantBeef> But i mean considering the libraries i write, i dont think there is a better method than macros, since they're heavy introspectively
23:55:13FromDiscord<treeform> Well jsony is written almost without macros
23:55:21FromDiscord<treeform> and its very introspective
23:55:28FromDiscord<treeform> same with flatty...
23:55:34FromDiscord<treeform> and print...
23:55:44FromDiscord<ElegantBeef> Sure, but https://github.com/beef331/sumtypes for instance
23:56:09FromDiscord<ElegantBeef> I dont see how you'd replicate that api without macros
23:56:24PMunchThe project is here: https://github.com/PMunch/badger. But I have made some finishing touches that aren't in the repo at the moment
23:58:35FromDiscord<treeform> It be cool to have some thing like 2fa time code build into the keyboard
23:58:53FromDiscord<treeform> dongles do it, but keyboard key could be better
23:59:23FromDiscord<treeform> also it might be cool to have some thing that strafes a random direction left or right
23:59:34FromDiscord<treeform> some sort of random left - right key 🙂
23:59:53PMunchPushed my latest version to here: https://github.com/PMunch/badger/tree/final