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:11 | FromDiscord | <Hi02Hi> why? if assets are stored in files, then shouldn't they be loaded at compile time? |
01:28:37 | FromDiscord | <ElegantBeef> You're going to load all of a games assets at compile time? |
01:29:33 | FromDiscord | <Rika> that' |
01:29:37 | FromDiscord | <Rika> s a massive binary |
01:29:58 | FromDiscord | <ElegantBeef> Nah AAA games are only 100s of GBs now |
01:31:27 | FromDiscord | <Rika> but theyre not all in the binary innit |
01:31:39 | FromDiscord | <Rika> can oses even run a binary that large |
01:31:55 | FromDiscord | <ElegantBeef> If you have enough ram/big enough page file, probably 😄 |
01:32:24 | FromDiscord | <ElegantBeef> The boot up times got to be super long, asking the OS to allocate 100GB of memory |
01:33:01 | FromDiscord | <ElegantBeef> I suppose it'd just be like running a program in a JVM |
01:33:05 | FromDiscord | <Rainbow Asteroids> if it's a 2d game with like a few hundred MB of assets tho |
01:33:15 | FromDiscord | <Rainbow Asteroids> (edit) |
01:33:23 | FromDiscord | <ElegantBeef> Well if it's sensible you can embed the assets |
01:33:42 | FromDiscord | <Rainbow Asteroids> i love the proc name `slurp`, ill use any excuse to use it |
01:33:46 | FromDiscord | <ElegantBeef> The issue though is it makes it rather annoying to replace assets for developing 😄 |
01:33:59 | FromDiscord | <ElegantBeef> `slurp("somepath").supersnappy` to really do it properly |
01:34:35 | FromDiscord | <ElegantBeef> Ah sorry it's `compress` 😄 |
01:34:54 | FromDiscord | <Rainbow Asteroids> who needs parenthesis when you have UFCS↵`slurp"somepath".supersnappy` |
01:35:11 | FromDiscord | <ElegantBeef> you mean `"somepath".slup.compress` |
01:35:18 | FromDiscord | <ElegantBeef> slurp even |
01:35:24 | FromDiscord | <Rika> slup |
01:35:50 | FromDiscord | <Rainbow Asteroids> slurp is too powerful https://media.discordapp.net/attachments/371759389889003532/853085149725458432/2021-06-11-213537.png |
01:36:23 | FromDiscord | <Anuke> why is slurp an alias for staticRead |
01:36:27 | FromDiscord | <Rika> do you have 2 gigabytes of ram or what |
01:36:37 | FromDiscord | <Rainbow Asteroids> because you slurp up the resource, duh |
01:36:38 | FromDiscord | <ElegantBeef> Spaghetti! Joke aside i dont know |
01:36:44 | FromDiscord | <Rika> In reply to @Anuke "why is slurp an": likely legacy reasons |
01:36:58 | FromDiscord | <Rainbow Asteroids> In reply to @Rika "do you have 2": 8gb, i just have l4d2 open |
01:37:08 | FromDiscord | <Rika> lol |
01:37:29 | FromDiscord | <Rainbow Asteroids> if i wasn't using browser discord, id have no membory left |
01:37:33 | FromDiscord | <Rainbow Asteroids> (edit) "membory" => "memory" |
01:39:17 | FromDiscord | <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:26 | FromDiscord | <Rainbow Asteroids> ngl, we need to write more apis like that |
01:40:37 | FromDiscord | <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:04 | FromDiscord | <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:10 | FromDiscord | <ElegantBeef> Quite possibly it might be from one of the other languages that inspired nim using that for their static read |
01:53:06 | FromGitter | <kaushalmodi> https://www.computerhope.com/jargon/s/slurp.htm |
01:54:56 | FromDiscord | <ElegantBeef> Yea seems it's a relatively common term for the action in many languages |
01:55:35 | FromDiscord | <ElegantBeef> So kaushal did you get make a PR for that assign macro into `sugar`? 😄 |
01:58:37 | FromDiscord | <ElegantBeef> Dumb joke aside, seems like there arent any libraries with the sole goal of softening edges of Nim's oop |
02:00:23 | FromDiscord | <Rika> i read that as Nim's soap |
02:00:28 | FromDiscord | <ElegantBeef> Well that too |
02:00:49 | FromDiscord | <ElegantBeef> Sharp corners just cut your gentle bits |
02:13:14 | FromDiscord | <Zachary Carter> sent a code paste, see https://paste.rs/4I9 |
02:13:17 | FromDiscord | <Zachary Carter> when I say fail I mean that `foo` is nil |
02:13:27 | FromDiscord | <kaushalmodi> @ElegantBeef I didn't mean to make that PR, mainly for moral reasons. |
02:13:34 | FromDiscord | <kaushalmodi> You're the author of that code. |
02:14:52 | FromDiscord | <ElegantBeef> Does it work with `-d:useMalloc`? |
02:15:16 | FromDiscord | <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:30 | FromDiscord | <ElegantBeef> I know that shouldnt matter, but i just solve issues the wrong way around 😄 |
02:15:35 | FromDiscord | <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:49 | FromDiscord | <Zachary Carter> but you're still going to do some IO when the game loads |
02:16:08 | FromDiscord | <Zachary Carter> the goal is to be able to dynamically load assets |
02:16:20 | FromDiscord | <Zachary Carter> In reply to @ElegantBeef "Does it work with": no 😦 |
02:21:19 | FromDiscord | <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:50 | FromDiscord | <ElegantBeef> Ah that's the windows name 😄 |
02:22:17 | FromDiscord | <ElegantBeef> I'm a dumb dumb that forgot to add `mingw` |
02:23:27 | FromDiscord | <Rainbow Asteroids> In reply to @ElegantBeef "So kaushal did you": ooh what macro |
02:24:00 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3pvC this one |
02:35:45 | FromDiscord | <ElegantBeef> @Zachary Carter ah the issue is you dont use a base 2 size |
02:35:54 | FromDiscord | <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:10 | FromDiscord | <Zachary Carter> ah, good find thank you Beef! |
02:38:05 | FromDiscord | <Zachary Carter> oh wait |
02:38:09 | FromDiscord | <Zachary Carter> but alignment is a power of 2 |
02:38:14 | FromDiscord | <Zachary Carter> it's 16... |
02:38:28 | FromDiscord | <ElegantBeef> alignment is the second variable |
02:38:31 | FromDiscord | <ElegantBeef> size is the first |
02:38:36 | FromDiscord | <Rika> Lol |
02:38:45 | FromDiscord | <Zachary Carter> fuck me |
02:39:03 | FromDiscord | <Zachary Carter> the proc signature is just wrong lol okay thanks |
02:39:13 | FromDiscord | <Zachary Carter> I need to get off the computer I think xD |
02:39:45 | FromDiscord | <ElegantBeef> Comically i think on one of the pages it basically stated "Dont fucking forget that size is first" |
02:40:14 | FromDiscord | <Zachary Carter> lol |
02:40:36 | FromDiscord | <Zachary Carter> I blame @mratsim |
02:40:47 | FromDiscord | <Zachary Carter> https://github.com/mratsim/weave/blob/master/weave/memory/allocs.nim#L101-L102 |
02:40:52 | FromDiscord | <aleclarson> hi all. does anyone have any "must-use" macros they'd recommend? |
02:41:06 | FromDiscord | <ElegantBeef> Depends on what you're doing |
02:41:22 | FromDiscord | <ElegantBeef> https://en.cppreference.com/w/c/memory/aligned_alloc might've been due to this? |
02:42:39 | FromDiscord | <Zachary Carter> maybe |
02:42:43 | FromDiscord | <Zachary Carter> who really knows |
02:42:47 | FromDiscord | <Zachary Carter> I just don't want to be at fault |
02:43:09 | FromDiscord | <ElegantBeef> You arent |
02:43:09 | FromDiscord | <Zachary Carter> but yeah, thanks for the extra set of eyes, issue is no longer present 😄 |
02:43:33 | FromDiscord | <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:07 | FromDiscord | <ElegantBeef> nevermind https://github.com/mratsim/weave/pull/170 |
02:47:28 | FromDiscord | <ElegantBeef> But yea seems like mratsim really was caught off guard by that silly unconventional param oder |
02:47:30 | FromDiscord | <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:08 | FromDiscord | <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:31 | FromDiscord | <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:59 | FromDiscord | <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:37 | FromDiscord | <treeform> In reply to @ElegantBeef "<@!107140179025735680> no clue if": wow I was also struggling with a linux port how did you do? |
04:34:12 | FromDiscord | <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:33 | FromDiscord | <ElegantBeef> Glad to know i wasnt the only one getting the issue 😄 |
04:35:14 | FromDiscord | <treeform> I am just not as good at low level linux |
04:35:36 | FromDiscord | <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:56 | FromDiscord | <treeform> I tired reading just proc/#/stat it looks like 30 should be the IP reg, but it was always zero |
04:36:06 | FromDiscord | <treeform> Then I tried running perf and reading its output |
04:36:11 | FromDiscord | <treeform> but I think your solution is much cleaner |
04:36:33 | FromDiscord | <ElegantBeef> I dont know if my solution is accurate, need a windows output of test2 |
04:36:39 | FromDiscord | <ElegantBeef> Sampling test1 i dont get anything out |
04:36:48 | FromDiscord | <treeform> really? |
04:37:05 | FromDiscord | <ElegantBeef> Yea no lines dumped |
04:37:10 | FromDiscord | <ElegantBeef> So i dont think i actually have it working |
04:37:12 | FromDiscord | <treeform> so on windows objdump address = memory addresses |
04:37:22 | FromDiscord | <treeform> but on linux memory addresses move with every exe load |
04:37:29 | FromDiscord | <treeform> you also need to get the "start" of the exe in memory some how |
04:37:42 | FromDiscord | <ElegantBeef> Which is where that `address` variable comes in |
04:37:58 | FromDiscord | <treeform> Does toRel fix that? |
04:38:11 | FromDiscord | <ElegantBeef> It's supposed to, but i think it's wrong |
04:38:38 | FromDiscord | <treeform> cool |
04:38:42 | FromDiscord | <treeform> I could not figure out that part too |
04:39:16 | * | Nebraskka joined #nim |
04:39:22 | FromDiscord | <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:40 | FromDiscord | <treeform> yeah that could be the solution |
04:39:53 | * | Nebraskka quit (Remote host closed the connection) |
04:40:31 | FromDiscord | <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:11 | FromDiscord | <treeform> I think test1.nim is kind of bad |
04:41:22 | FromDiscord | <treeform> I mostly use test4 and above now |
04:41:36 | FromDiscord | <treeform> https://github.com/treeform/hottie/blob/master/examples/test4.nim |
04:41:37 | FromDiscord | <ElegantBeef> Ah i need to rebase since you have changes |
04:41:47 | FromDiscord | <treeform> test4 should clearly be in the 2 inc ks |
04:41:51 | FromDiscord | <treeform> about 50% in one and the other |
04:42:07 | FromDiscord | <ElegantBeef> I do suggest changing hottie to the file structure i have to easily support other platforms |
04:42:13 | FromDiscord | <treeform> yeah |
04:42:20 | FromDiscord | <treeform> I usually call the types.nim "common.nim" |
04:42:27 | FromDiscord | <treeform> but yeah I agree |
04:42:48 | FromDiscord | <treeform> will this work on Mac as well? |
04:42:53 | FromDiscord | <ElegantBeef> I dont think so |
04:42:58 | FromDiscord | <treeform> ok |
04:43:40 | FromDiscord | <ElegantBeef> It'd all depend on if mac maps processess to the `/proc` folder |
04:43:45 | FromDiscord | <ElegantBeef> Apparently it supports ptrace |
04:44:17 | FromDiscord | <treeform> Oh so it uses this: https://github.com/ba0f3/ptrace.nim |
04:45:01 | FromDiscord | <ElegantBeef> Yea, saved a few hairs, didnt need to write bindings for ptrace |
04:45:34 | FromDiscord | <ElegantBeef> Could you quickly show me the output for your test4? |
04:45:39 | FromDiscord | <treeform> sure |
04:45:57 | FromDiscord | <treeform> which mode? |
04:46:15 | FromDiscord | <ElegantBeef> What do you mean? |
04:46:21 | FromDiscord | <ElegantBeef> default i guess |
04:46:36 | FromDiscord | <ElegantBeef> Forgot you had multiple profile modes |
04:46:51 | FromDiscord | <ElegantBeef> I've only been using `hottie ./program` |
04:47:12 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=3pDQ |
04:47:29 | FromDiscord | <ElegantBeef> Ok so yea my logic is wrong with a capital fucking |
04:48:10 | FromDiscord | <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:34 | FromDiscord | <treeform> I guess it moved it by offset in pages or some thing like that |
04:49:21 | FromDiscord | <treeform> I usually debug with assembly option |
04:49:44 | FromDiscord | <treeform> I get this: |
04:49:52 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=3pDS |
04:49:53 | FromDiscord | <treeform> its easy to verify the dump file matches |
04:51:26 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3pDT |
04:51:35 | FromDiscord | <ElegantBeef> Yea it's off by something fierce i figure |
04:52:52 | FromDiscord | <treeform> excpt? |
04:53:03 | FromDiscord | <treeform> did you compile the tests with -d:release mode? |
04:53:09 | FromDiscord | <ElegantBeef> No |
04:53:29 | FromDiscord | <treeform> that might be correct because excep mode creates all of the stack trace |
04:53:33 | FromDiscord | <treeform> (edit) "trace" => "traces and is pretty slow" |
04:53:43 | FromDiscord | <ElegantBeef> Even on release it's all in excpt |
04:53:54 | FromDiscord | <treeform> ok then its not right |
04:54:05 | FromDiscord | <treeform> it should be some thing that `inc k` |
04:54:09 | FromDiscord | <treeform> those are hot on purpose |
04:54:29 | FromDiscord | <treeform> i bet its the mapping |
04:54:44 | FromDiscord | <treeform> maybe you need to subtract original dump offset or some thing |
04:55:14 | * | javi40411 joined #nim |
04:55:25 | FromDiscord | <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:41 | FromDiscord | <ElegantBeef> Really makes 2 of us 😄 |
04:57:31 | Prestige | How do I init an array without declaring all the values? |
04:57:54 | Prestige | I want an array of booleans of a large size, and default all to false |
04:58:07 | FromDiscord | <ElegantBeef> `var a: array[size, bool]` |
04:58:40 | Prestige | follow up, if I have a 2d array of these can I not do arr[x][y] ? |
04:58:53 | FromDiscord | <ElegantBeef> you can |
04:58:59 | Prestige | if var arr: array[100, array[200, bool]] |
04:59:15 | FromDiscord | <ElegantBeef> So yea the mapping is wrong, due to getting values not in the dump.txt |
05:00:48 | FromDiscord | <treeform> but its very close |
05:00:53 | FromDiscord | <treeform> usually its a match or not match |
05:01:06 | FromDiscord | <treeform> 64bit address space is pretty big |
05:01:14 | Prestige | ah it was some other issue |
05:01:14 | FromDiscord | <treeform> I think you are some small number of bytes off |
05:01:39 | FromDiscord | <treeform> @ElegantBeef what does your dump file starts with? |
05:02:04 | FromDiscord | <treeform> I think mine started with some thing like 0xA00 |
05:02:10 | FromDiscord | <ElegantBeef> `0x1000` |
05:02:23 | FromDiscord | <treeform> try subtracting or adding that? |
05:02:57 | FromDiscord | <ElegantBeef> Is this right? https://media.discordapp.net/attachments/371759389889003532/853137274308788224/unknown.png |
05:03:12 | FromDiscord | <ElegantBeef> It's closer! |
05:03:51 | FromDiscord | <treeform> maybe |
05:04:01 | FromDiscord | <ElegantBeef> on debug https://media.discordapp.net/attachments/371759389889003532/853137539854368788/unknown.png |
05:04:07 | FromDiscord | <ElegantBeef> I think we solved it 😄 |
05:04:31 | FromDiscord | <treeform> Line 9 and 5 is what you want |
05:04:49 | FromDiscord | <treeform> I guess iterator should also be hot, its not as hot for me |
05:04:50 | FromDiscord | <ElegantBeef> Our outputs match, just in different order |
05:05:09 | FromDiscord | <treeform> yeah |
05:05:21 | FromDiscord | <ElegantBeef> so i'll take it as a win and say "we are victorious |
05:05:23 | FromDiscord | <treeform> with some 10% for sure |
05:05:23 | FromDiscord | <ElegantBeef> (edit) "victorious" => "victorious"" |
05:05:30 | FromDiscord | <treeform> (edit) "with ... some" added "in" |
05:05:39 | FromDiscord | <treeform> yeah |
05:06:01 | FromDiscord | <treeform> I would be cool to have a linux backend for hottie |
05:06:03 | FromDiscord | <ElegantBeef> Just have to make that inferred addition and we'll be fine |
05:07:02 | FromDiscord | <ElegantBeef> atleast for single threaded profiling, multi threaded will be hell to implement |
05:07:32 | FromDiscord | <treeform> Yeah I have not done multi threaded yet |
05:07:44 | FromDiscord | <treeform> It took me days to get stack traces |
05:09:06 | FromDiscord | <ElegantBeef> I do have to wonder if there is a syscall somewhere i missed to get the relative address |
05:09:16 | FromDiscord | <treeform> I don't know |
05:09:53 | FromDiscord | <treeform> My goal with hottie is to just have a simple tool to get me hot paths, usually use benchy+hottie together |
05:10:17 | FromDiscord | <ElegantBeef> Yea it seems like it'll be a nice to use tool |
05:10:35 | FromDiscord | <ElegantBeef> Especially since it's less cumbersome than using any other profiler |
05:11:02 | FromDiscord | <ElegantBeef> Run it, click the link and edit the code |
05:12:01 | FromDiscord | <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:31 | FromDiscord | <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:01 | FromDiscord | <Rainbow Asteroids> but his profiler only works on windows :feelseggman: |
05:30:12 | FromDiscord | <ElegantBeef> But i just made it work on linux |
05:30:27 | FromDiscord | <Rainbow Asteroids> :hype: |
05:31:30 | FromDiscord | <ElegantBeef> Now if only i can replace the parsing `mapfiles` to get the stack address |
05:32:32 | FromDiscord | <treeform> I think my next change is to fully parse the dump file |
05:32:39 | FromDiscord | <treeform> right now I parse it differently based on params |
05:32:48 | FromDiscord | <treeform> but I think I should just parse it everyway |
05:33:39 | FromDiscord | <treeform> (edit) "everyway" => "into an intermediate form" |
05:33:46 | FromDiscord | <treeform> that can be used for everymode |
05:33:48 | FromDiscord | <treeform> (edit) "everymode" => "every mode" |
05:36:41 | FromDiscord | <ElegantBeef> Ah so seems there is a better way to do what i did for parsing that'll support multi threading |
05:39:20 | FromDiscord | <treeform> yes |
05:42:34 | FromDiscord | <ElegantBeef> I like the single word yes, just seems so shaming 😄 |
05:45:54 | FromDiscord | <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:35 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/manual.html#exception-handling-try-statement |
05:46:58 | FromDiscord | <ElegantBeef> Basically wrapping the parseint in a try statement lets you capture the errors and do something based off of them |
05:47:14 | FromDiscord | <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:25 | FromDiscord | <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:47 | FromDiscord | <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:32 | FromDiscord | <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:53 | FromDiscord | <Bung> how to get code from PNode ? |
07:04:15 | FromDiscord | <ElegantBeef> Uhh you're in the compiler? |
07:05:42 | FromDiscord | <Bung> yeah , I want extract types from internet nim file |
07:06:17 | FromDiscord | <Bung> I get PNode nkTypeSection so far |
07:06:50 | FromDiscord | <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:48 | FromDiscord | <Bung> hmm ,tried some code they all about parse not code gen |
07:22:40 | * | clemens3 joined #nim |
07:24:14 | FromDiscord | <Bung> oh , i get expected result |
07:25:39 | FromDiscord | <Bung> how to make a template param `cond:untyped` optional? |
07:32:04 | FromDiscord | <ElegantBeef> by making a version that doesnt take it |
07:33:13 | FromDiscord | <Bung> yeah, this is simple solution , I can't think others |
07:37:16 | FromDiscord | <Bung> https://github.com/bung87/slim/blob/devel/src/slimpkg/clonetypes.nim might be useful for others |
07:37:43 | FromDiscord | <ElegantBeef> What does it do? |
07:38:35 | FromDiscord | <Bung> extract partial of nim code from internet |
07:38:50 | FromDiscord | <Bung> `client.copyNimble("src/nimblepkg/packageinfo.nim", it.kind == nkTypeSection)` |
07:39:38 | FromDiscord | <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:24 | FromDiscord | <mratsim> In reply to @Zachary Carter "I blame <@!570268431522201601>": I'm sure I saw a fix for this in the repo :/ |
08:36:55 | FromDiscord | <mratsim> ah yes it's sitting there https://github.com/mratsim/weave/pull/170/files |
08:37:47 | * | tux[m] joined #nim |
08:37:50 | FromDiscord | <mratsim> ugh CI degrades so fast |
08:38:23 | * | tux[m] quit (Remote host closed the connection) |
08:41:56 | FromDiscord | <System64 ~ Flandre Scarlet> Does Nim supports Lambdas ? |
08:43:05 | FromDiscord | <Rainbow Asteroids> https://nim-lang.org/docs/manual.html#procedures-anonymous-procs |
08:43:24 | FromDiscord | <Rainbow Asteroids> you can also look at `std/sugar` for better syntax |
08:44:18 | FromDiscord | <System64 ~ Flandre Scarlet> Oh there is sugar syntax too ? |
08:44:42 | FromDiscord | <Rainbow Asteroids> https://nim-lang.org/docs/sugar.html#%3D%3E.m%2Cuntyped%2Cuntyped |
08:45:56 | FromDiscord | <System64 ~ Flandre Scarlet> Oh nice ! |
08:46:48 | FromDiscord | <System64 ~ Flandre Scarlet> And the best is it's compiled |
08:54:27 | FromDiscord | <System64 ~ Flandre Scarlet> Not like Java or C# which compiles to bytecode |
08:54:42 | FromDiscord | <Rainbow Asteroids> i mean yeah, it's a compiled langauge |
08:54:46 | FromDiscord | <Rainbow Asteroids> (edit) "langauge" => "language" |
08:55:24 | FromDiscord | <Rika> uh compiling to bytecode isnt much of a downside is it |
08:58:42 | FromDiscord | <System64 ~ Flandre Scarlet> There is bit loose of performances |
08:59:42 | FromDiscord | <Rika> not necessarily? |
09:00:10 | FromDiscord | <System64 ~ Flandre Scarlet> Ah ? Why ? |
09:03:11 | FromDiscord | <haxscramper> JIT and other optimizations |
09:03:43 | FromDiscord | <haxscramper> Given a smart enough interpreter even JS can be as fast as handwritten C, though this is usually not the case |
09:04:11 | FromDiscord | <System64 ~ Flandre Scarlet> So why Python is so slow ? |
09:04:29 | FromDiscord | <haxscramper> Because it does not have enough optimizations? |
09:04:44 | FromDiscord | <haxscramper> Key part here is `"Given a smart enough interpreter"` |
09:04:46 | FromDiscord | <Rainbow Asteroids> CPython doesn't even have jit |
09:05:42 | FromDiscord | <Rainbow Asteroids> WebASM is very fast, almost machine code speed |
09:07:58 | FromDiscord | <System64 ~ Flandre Scarlet> And is C Python fast ? |
09:09:47 | FromDiscord | <Rika> cpython is not, but pypy is kinda |
09:10:15 | FromDiscord | <Rika> anyway deriving how fast java is from how fast python is is not a valid method |
09:13:40 | FromDiscord | <System64 ~ Flandre Scarlet> You talked about Javascript |
09:17:51 | FromDiscord | <Rika> read again |
09:17:58 | FromDiscord | <Rika> not me, someone else |
09:18:05 | FromDiscord | <Rika> js is not comparable with python either anyway |
09:18:57 | FromDiscord | <ElegantBeef> unless you're talking about "how to design a bad language" 😛 |
09:21:24 | FromDiscord | <haxscramper> In reply to @System64 "You talked about Javascript": I just used it as example of "everyone things it is horrible" language |
09:21:28 | FromDiscord | <haxscramper> performance-wise |
09:21:38 | FromDiscord | <haxscramper> (edit) "In reply to @System64 "You talked about Javascript": I just used it as ... examplethinks" added "an" | "things" => "thinks" |
09:22:18 | FromDiscord | <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:01 | FromDiscord | <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:29 | FromDiscord | <haxscramper> For now I just had to ignore this file but this is exteremely annoying |
09:23:42 | FromDiscord | <haxscramper> And locally everything compiles just fine |
09:26:52 | FromDiscord | <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:22 | FromDiscord | <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:55 | FromDiscord | <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:31 | FromDiscord | <Lefl> Hey,↵↵I'm trying to transmit a datetime via json but I'm getting a compilation error |
10:45:32 | FromDiscord | <Lefl> https://play.nim-lang.org/#ix=3pFA |
10:45:33 | * | marusich joined #nim |
10:45:36 | FromDiscord | <Lefl> (edit) "Hey,↵↵I'm" => "Hey,↵I'm" |
10:45:52 | * | marusich quit (Remote host closed the connection) |
10:49:12 | FromDiscord | <haxscramper> `DateTime` does not have default implementation for `%` I think you would need to write one yourself |
10:49:35 | FromDiscord | <Lefl> Oh Isee |
10:50:24 | FromDiscord | <haxscramper> !eval import std/[json, times]; echo %(let t = now(); t) |
10:50:26 | NimBot | Compile failed: /playground/nim/lib/pure/json.nim(379, 41) Error: type mismatch: got <proc (x: Time): ZonedTime{.closure, gcsafe, locks: 0.}> |
11:11:04 | FromDiscord | <hamidb80> does anyone know how to hue rotate an image in `pixie`? |
11:11:13 | FromDiscord | <hamidb80> (edit) "hue rotate" => "do hue-rotatation" |
11:16:11 | FromDiscord | <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:23 | FromDiscord | <zetashift> Pixie relies on chroma so should be doable |
11:16:39 | FromDiscord | <zetashift> oh wait an image damn |
11:19:14 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/853231965930913843/unknown.png |
11:19:51 | FromDiscord | <hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3pFL |
11:19:58 | FromDiscord | <hamidb80> i feel dumb 😄 |
11:24:58 | FromDiscord | <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:40 | FromDiscord | <hamidb80> how can i reverse a color? |
11:32:56 | FromDiscord | <hamidb80> for example white => true |
11:32:59 | FromDiscord | <hamidb80> (edit) "true" => "black" |
11:38:46 | FromDiscord | <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:40 | FromDiscord | <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:52 | FromDiscord | <zetashift> (edit) "IIRC in" => "In" |
12:37:10 | FromDiscord | <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:18 | FromDiscord | <System64 ~ Flandre Scarlet> My program works ! |
13:13:29 | * | stefantalpalaru quit (Changing host) |
13:13:29 | * | stefantalpalaru joined #nim |
13:16:48 | FromDiscord | <gerwy> and mine don't |
13:17:28 | FromDiscord | <gerwy> :pain: |
13:19:55 | FromDiscord | <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:57 | FromDiscord | <gerwy> maybe lists are better option |
13:26:34 | FromDiscord | <konsumlamm> let me guess: you assign your seq to a new variable? |
13:26:47 | FromDiscord | <gerwy> what? No |
13:27:14 | FromDiscord | <gerwy> i have an object↵and i have seq in type of that object↵and i only do .add(that_object) |
13:27:19 | FromDiscord | <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:59 | FromDiscord | <gerwy> i think it may be to do that i declare the variable in function, but the data should stay right? |
13:28:50 | FromDiscord | <konsumlamm> just show us the code |
13:29:42 | FromDiscord | <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:54 | FromDiscord | <gerwy> its raylib btw https://media.discordapp.net/attachments/371759389889003532/853265101624967189/Zrzut_ekranu_2021-06-12_o_15.30.48.png |
13:31:27 | FromDiscord | <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:37 | FromDiscord | <gerwy> every other variable is alright |
13:33:23 | FromDiscord | <konsumlamm> is `player_minions` a global variable? |
13:33:48 | FromDiscord | <konsumlamm> btw, you don't need the explicit `: void` |
13:34:41 | FromDiscord | <gerwy> In reply to @konsumlamm "is `player_minions` a global": yes |
13:35:03 | FromDiscord | <gerwy> ah sorry ,its from using other languages, a habit |
13:35:55 | FromDiscord | <konsumlamm> i can't tell what's happening there without seeing more code |
13:36:01 | FromDiscord | <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:11 | FromDiscord | <kaushalmodi> In reply to @Life Sucks "ah sorry ,its from": Global variables work in Nim too. That shouldn't be the problem |
13:36:28 | FromDiscord | <konsumlamm> my guess is still that you're unknowingly copying the seq somewhere |
13:36:33 | FromDiscord | <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:50 | FromDiscord | <gerwy> In reply to @kaushalmodi "Global variables work in": i meant the `: void` thing |
13:37:39 | FromDiscord | <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:42 | FromDiscord | <gerwy> there is no point in showing you other code because i checked and animation is added properly |
13:38:33 | FromDiscord | <konsumlamm> there is no point in me helping you when i don't know the other code either |
13:39:03 | FromDiscord | <gerwy> hmm well i can show adding animation code |
13:39:14 | FromDiscord | <gerwy> but have in mind that i just barely started learning nim |
13:39:31 | FromDiscord | <gerwy> https://media.discordapp.net/attachments/371759389889003532/853267268095967232/Zrzut_ekranu_2021-06-12_o_15.39.26.png |
13:40:04 | FromDiscord | <gerwy> `animations` is again seq, that stores all animations↵and its a AnimationPlayer property↵in this code everything goes properly |
13:40:52 | FromDiscord | <konsumlamm> did you check `player_minions` directly after calling `spawnMinion`? |
13:41:40 | FromDiscord | <kaushalmodi> Random thought: Does it work with `--gc:none` |
13:41:43 | FromDiscord | <gerwy> no |
13:42:28 | * | stefantalpalaru quit (Quit: ZNC 1.7.5 - https://znc.in) |
13:42:51 | * | stefantalpalaru joined #nim |
13:43:51 | FromDiscord | <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:29 | FromDiscord | <konsumlamm> is that a yes or noß |
13:44:32 | FromDiscord | <konsumlamm> (edit) "noß" => "no?" |
13:44:39 | FromDiscord | <gerwy> yes |
13:44:46 | * | stefantalpalaru joined #nim |
13:44:49 | FromDiscord | <gerwy> also lol it compiled so fast without gc |
13:47:22 | FromDiscord | <gerwy> ehh i will maybe try it with list↵also maybe trace when and why it gets reset |
13:54:00 | leorize[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:11 | leorize[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:35 | FromDiscord | <Bung> where is nimble `install` proc implementation , I only found the forward declaration |
14:02:10 | FromDiscord | <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:36 | FromDiscord | <Bung> yeah, I only found this |
14:03:14 | FromDiscord | <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:31 | FromDiscord | <konsumlamm> In reply to @Bung "where is nimble `install`": https://github.com/nim-lang/nimble/blob/686555cd347badfe6c48c4ac49afade1ef8409ad/src/nimble.nim#L429 |
14:03:38 | FromDiscord | <konsumlamm> CTRL+F helps |
14:04:53 | * | Grauwolf joined #nim |
14:04:54 | * | Grauwolf quit (Read error: Connection reset by peer) |
14:06:04 | FromDiscord | <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:01 | FromDiscord | <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:27 | FromDiscord | <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:11 | FromDiscord | <kaushalmodi> In reply to @Bung "oh, thanks! guess github": I typically clone a repo and `rg 'proc.install'` |
14:35:29 | FromDiscord | <carpal> 8 bit operations are emulated on x86_32? |
14:35:32 | FromDiscord | <carpal> (edit) "x86_32?" => "x86_32, right?" |
14:35:53 | FromDiscord | <carpal> on x86_64 are 32 operations emulated? |
14:35:57 | FromDiscord | <carpal> (edit) |
14:39:27 | FromDiscord | <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:24 | FromDiscord | <zetashift> if you refresh or click the login button again, are you logged in then/. |
14:59:25 | FromDiscord | <zetashift> ? |
15:01:24 | FromDiscord | <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:59 | FromDiscord | <Hi02Hi> but you cant add to an array, they are fixed size |
15:08:53 | FromDiscord | <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:49 | FromDiscord | <konsumlamm> ... because arrays always have the same size, you can't change it |
15:12:56 | FromDiscord | <konsumlamm> just use a seq instead |
15:18:05 | * | wyoung13 joined #nim |
15:18:40 | * | wyoung13 quit (Remote host closed the connection) |
15:20:25 | FromDiscord | <haxscramper> Or write a wrapper object around array that keeps track of the last element position |
15:21:42 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3pHu |
15:22:24 | FromDiscord | <gerwy> In reply to @konsumlamm "just use a seq": seq doesn't work as you see |
15:22:57 | FromDiscord | <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:24 | FromDiscord | <Rika> well thats not supposed to happen, either you're using it wrong or youve found a bug |
15:23:29 | FromDiscord | <Rika> the latter is very rare |
15:29:26 | FromDiscord | <exelotl> Yeah seq should work, it's hard to know what could be wrong without seeing more code |
15:30:24 | FromDiscord | <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:47 | FromDiscord | <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:17 | FromDiscord | <exelotl> is anything taking pointers to data in the seq? |
15:32:04 | FromDiscord | <exelotl> because things could go wrong if that happens, since seq data will be reallocated as more items are added |
15:33:15 | FromDiscord | <exelotl> so then those pointers would be pointing to deallocated memory |
15:33:37 | * | rockcavera joined #nim |
15:37:29 | FromDiscord | <konsumlamm> or maybe multiple things are running concurrently? |
15:38:20 | FromDiscord | <Rika> In reply to @Life Sucks "i already shown my": okay, good luck |
15:50:15 | FromDiscord | <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:29 | FromDiscord | <zetashift> In reply to @Life Sucks "i already shown my": do you by any chance have a repo with the code? |
16:06:40 | FromDiscord | <Bung> I've forked nimble add feature that handle requires in task https://github.com/bung87/slim |
16:08:50 | FromDiscord | <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:37 | FromDiscord | <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:12 | FromDiscord | <Bung> not plan to create PR to nimble |
16:10:25 | FromDiscord | <haxscramper> I mean I have nothing agains it, but I do provide tons of fixes for hnimast quite often |
16:11:07 | FromDiscord | <Bung> hmm if you do seperate nimble related to a single file I can use yours |
16:11:39 | FromDiscord | <haxscramper> you mean `compier_aux`? into `nimble_aux` and compiler-related things |
16:12:27 | FromDiscord | <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:05 | FromDiscord | <haxscramper> sure, it is not a good idea to mix nimble/compiler together anyway |
16:13:11 | FromDiscord | <Bung> well in that period I dont complete nimble related things so it make things more complicated |
16:13:59 | FromDiscord | <Bung> yeah, also not much work need to do |
16:14:12 | * | stefantalpalaru quit (Changing host) |
16:14:12 | * | stefantalpalaru joined #nim |
16:16:04 | FromDiscord | <Bung> oh, another think your package requires nimble ,but am a fork so I dont need build nimble binary |
16:17:57 | FromDiscord | <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:06 | FromDiscord | <haxscramper> So hybrid packages will build binaries |
16:18:09 | FromDiscord | <haxscramper> I hate this too |
16:18:21 | FromDiscord | <haxscramper> I don't need nimble binary anywere and yet it gets build each time |
16:19:02 | FromDiscord | <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:42 | FromDiscord | <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:35 | FromDiscord | <Bung> I was think that `requires` use name,ver, varargs syntax |
16:27:13 | FromDiscord | <Bung> so the nimble can do what exactly you wanna do |
16:29:57 | FromDiscord | <haxscramper> similar to cargo? https://doc.rust-lang.org/cargo/reference/features.html#dependency-features |
16:32:12 | FromGitter | <bung87> Yeah python pip also allow args |
16:34:11 | FromDiscord | <haxscramper> @Bung https://github.com/haxscramper/hnimast/blob/master/src/hnimast/nimble_aux.nim |
16:34:27 | FromDiscord | <haxscramper> new version - 3.28 |
16:34:33 | FromDiscord | <haxscramper> (edit) "3.28" => "0.3.28" |
16:38:10 | FromDiscord | <gerwy> ehh i tried to do it with lists and it still doesn't work, something is not going well |
16:38:29 | FromDiscord | <haxscramper> Can you send a reproducible code sample? |
16:39:04 | FromDiscord | <gerwy> idk, i use a lot of objects and texture so idk if it will work |
16:39:12 | FromDiscord | <gerwy> i will try |
16:40:34 | FromDiscord | <gerwy> and also you need raylib for that too, because im using its Rectangle type |
16:40:58 | FromDiscord | <gerwy> okay wait |
16:43:31 | FromDiscord | <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:39 | FromDiscord | <haxscramper> But I would advise you to just |
16:43:40 | FromDiscord | <haxscramper> dont |
16:44:30 | FromDiscord | <haxscramper> But that's only my advise so in general you can do as you wish |
16:45:07 | FromDiscord | <Bung> I agree, I looked into nimble, I think it will not be fun |
16:45:57 | FromDiscord | <dom96> @Bung what are you trying to do with Nimble? |
16:46:27 | FromDiscord | <Bung> I added a `requires` processing in `task` |
16:46:57 | FromDiscord | <dom96> cool, that's been requested by multiple people |
16:47:21 | FromDiscord | <Bung> I dont wanna my lib's user install packages that only I needed during development. |
16:48:17 | FromDiscord | <Bung> well, that's a fork, think a temporary solution, nimble will add same feature in future right ? |
16:49:12 | FromDiscord | <haxscramper> https://github.com/nim-lang/nimble/issues/482 requested in 2018 |
16:49:16 | FromDiscord | <Bung> I've noticed @mratsim create a issue for it , yeah , it's actually needed , some dev packages are huge |
16:50:07 | FromDiscord | <Rika> might be nicer to adopt the features idea from rust too? |
16:50:11 | FromDiscord | <Rika> nicer -> nice |
16:50:52 | FromDiscord | <haxscramper> After looking at cargo I just think we could simply |
16:50:56 | FromDiscord | <haxscramper> rewrite cargo for nim |
16:51:24 | FromDiscord | <haxscramper> generally speaking it would be better than trying to come up with novel solutions |
16:51:28 | FromDiscord | <Bung> yeah, nimble code also need rewrite I think , move some code to dependencies |
16:52:07 | FromDiscord | <zetashift> In reply to @haxscramper "rewrite cargo for nim": why not just...use cargo for Nim? |
16:52:11 | FromDiscord | <zetashift> is cargo rust specific? |
16:52:20 | FromDiscord | <haxscramper> yeah, it is insanely rust-specific |
16:52:25 | FromDiscord | <dom96> of course it is |
16:52:26 | FromDiscord | <zetashift> ah damn |
16:52:45 | FromDiscord | <haxscramper> and well, there are nim-specific features as well |
16:52:47 | FromDiscord | <Bung> oh , if cargo will go , then npm , pip also be fine... |
16:52:53 | FromDiscord | <Rika> some ideas are not 1:1 either, like the repository handling i believe? |
16:53:09 | FromDiscord | <zetashift> In reply to @Bung "oh , if cargo": fair enough 😛 |
16:53:25 | FromDiscord | <Bung> `npm install nimble` |
16:53:36 | FromDiscord | <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:46 | FromDiscord | <haxscramper> so you get better experience with packages from registry |
16:53:51 | FromDiscord | <Rika> In reply to @Bung "`npm install nimble`": cursed |
16:53:51 | FromDiscord | <haxscramper> but don't close url path completely |
16:54:31 | FromDiscord | <Bung> make a registry is not hard , just need someone done. |
16:54:33 | FromDiscord | <zetashift> In reply to @Bung "`npm install nimble`": `winget install nimble` https://github.com/microsoft/winget-cli |
16:54:36 | FromDiscord | <gerwy> ugh it does work in minimal reproduction... |
16:54:37 | FromDiscord | <gerwy> why |
16:55:08 | FromDiscord | <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:13 | FromDiscord | <haxscramper> time to learn rust I guess |
16:55:40 | FromDiscord | <Rika> wait what why |
16:55:46 | FromDiscord | <Rika> oh to convert? |
16:57:21 | FromDiscord | <dom96> In reply to @Bung "make a registry is": everything just comes down to someone doing it 🙂 |
16:57:38 | FromDiscord | <dom96> and Nimble hasn't had anyone doing for a while |
16:57:39 | FromDiscord | <Bung> that's funny |
16:58:01 | FromDiscord | <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:14 | FromDiscord | <dom96> I think I've convinced Araq to develop it though |
16:58:27 | FromDiscord | <haxscramper> Though it is an older implementation and it might not compile |
16:58:38 | FromDiscord | <haxscramper> but It worked for 97% packages at the time |
16:59:09 | FromDiscord | <Bung> I'v notice araq and zevv porting z3 that lib might solve the dependencies resolve thing |
16:59:32 | FromDiscord | <haxscramper> yes, it is discussed in nimble/#890 |
16:59:37 | FromDiscord | <Bung> so a package manager almost done. |
17:00:07 | FromDiscord | <haxscramper> well, it is a complex problem so I would not declare it "done" |
17:00:45 | FromDiscord | <haxscramper> like package manager is not just a manifest-parser+graph-builder+solver |
17:02:04 | FromDiscord | <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:30 | FromDiscord | <haxscramper> z3 approach is clearly out of my level of expertise, but something like libsolve |
17:05:45 | FromDiscord | <haxscramper> but again, there is no global RFC to start with |
17:06:31 | FromDiscord | <haxscramper> Yeah "nimble bad", it "lacks features" and so on, but this discussion is not focused enough to be explicitly actionable |
17:07:04 | FromDiscord | <Bung> that's hard thing , I can only use it , developing no. |
17:07:22 | FromDiscord | <haxscramper> you mean use/develop nimble? |
17:07:32 | FromDiscord | <Bung> z3 |
17:08:07 | FromDiscord | <Bung> all my math learned from mid school |
17:15:31 | FromDiscord | <Bung> https://github.com/bung87/crown_ui http://crown_ui.bungos.me anyone can help design webpage ? |
17:35:49 | FromDiscord | <dom96> easiest way is to just grab some UI/css framework |
17:47:51 | FromDiscord | <haxscramper> "features" can be mapped to regular defines |
17:48:27 | FromDiscord | <haxscramper> `nimble` manifest is a nimscript, therefore `when defined(feature1): requires "some-library"` |
17:48:55 | FromDiscord | <haxscramper> But then we start losing ability to statically parse manifests |
17:49:26 | FromDiscord | <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:50 | FromDiscord | <haxscramper> and then be completely unable to get list of dependencies |
17:51:20 | FromDiscord | <Rika> it can be mapped to regular defines but stuffs getting quite messy due to lack of standardisation |
17:51:32 | FromDiscord | <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:06 | ForumUpdaterBot | New thread by Lscrd: LowerBound and upperBoud from module “algorithm”, see https://forum.nim-lang.org/t/8108 |
17:58:58 | Zevv | Bung: 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:23 | Zevv | I 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:47 | Prestige | @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:16 | Prestige | to create and fill a polygon* |
18:05:14 | * | electr0n9 joined #nim |
18:05:42 | * | electr0n9 quit (Remote host closed the connection) |
18:15:51 | Prestige | https://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:10 | ForumUpdaterBot | New thread by Xigoi: How to add something before a C declaration?, see https://forum.nim-lang.org/t/8109 |
18:27:51 | FromGitter | <bung87> @zevv okay |
18:32:42 | * | markmcb joined #nim |
18:33:11 | * | markmcb quit (Remote host closed the connection) |
18:34:02 | FromGitter | <BracketMaster> how can I print an int as a binary string in Nim? |
18:40:18 | FromDiscord | <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:45 | Prestige | @zetashift oh yes, it does. Interesting |
18:44:28 | FromDiscord | <zetashift> I think with `context` you don't want to directly access the `image` |
18:44:55 | Prestige | yeah that makes sense |
19:00:05 | FromDiscord | <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:05 | FromDiscord | <haxscramper> There are several packages for json if `std` version is not fast enough for your needs |
19:20:23 | FromDiscord | <hamidb80> what is `parallel` exactly for? is it just a parallel checker? |
19:22:00 | FromDiscord | <hamidb80> i don't get it |
19:25:36 | Prestige | https://nim-lang.org/docs/manual_experimental.html#parallel-amp-spawn-parallel-statement if you haven't seen this |
19:56:21 | FromDiscord | <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:51 | Prestige | Thanks |
19:57:13 | FromDiscord | <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:02 | FromDiscord | <treeform> In reply to @Prestige "Thanks": Just use ctx.moveTo and ctx.lineTo and ctx.fill() |
20:04:51 | FromDiscord | <treeform> In reply to @ElegantBeef "<@!107140179025735680> so it": I think if there is a way to get stack trace as a dump. |
20:04:58 | FromDiscord | <treeform> Then pass it so some sort of stack parser |
20:05:14 | FromDiscord | <treeform> It does require the address translations though |
20:05:23 | FromDiscord | <treeform> copy pasting might not be a bad solution |
20:07:23 | FromDiscord | <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:57 | FromDiscord | <ElegantBeef> @treeform can i ask for the stack output of your test4? |
20:21:42 | FromDiscord | <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:17 | FromDiscord | <treeform> Yeah that looks correct |
20:22:23 | FromDiscord | <treeform> try test 5 it has a bunch of junk to filter out |
20:22:30 | FromDiscord | <treeform> (due to junk functions) |
20:23:11 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/853368858437877800/unknown.png |
20:23:16 | FromDiscord | <treeform> this is my test5: |
20:23:18 | FromDiscord | <treeform> https://media.discordapp.net/attachments/371759389889003532/853368886023159858/unknown.png |
20:23:29 | FromDiscord | <ElegantBeef> ah so bit noisier 😄 |
20:23:45 | FromDiscord | <treeform> yeah why is your case when it could not figure out the stack trace so high? |
20:23:57 | FromDiscord | <treeform> Maybe because it pauses on exist |
20:24:01 | FromDiscord | <treeform> I had that happen too |
20:24:17 | FromDiscord | <treeform> Some time when program exists it sits somewhere in the OS for a bit |
20:24:54 | FromDiscord | <treeform> test4 is same: |
20:24:55 | FromDiscord | <treeform> https://media.discordapp.net/attachments/371759389889003532/853369295907586088/unknown.png |
20:25:21 | FromDiscord | <ElegantBeef> Release or debug? |
20:28:43 | FromDiscord | <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:44 | FromDiscord | <treeform> yeah |
20:33:59 | FromDiscord | <treeform> I do all tests with release |
20:34:08 | FromDiscord | <treeform> debug tests are very noisy |
20:34:28 | FromDiscord | <treeform> usually they they manage the stack-traces a ton. |
20:34:46 | FromDiscord | <ElegantBeef> Yea my release stack trace profile either is super slow or is broken |
20:34:55 | FromDiscord | <treeform> oh |
20:35:15 | FromDiscord | <ElegantBeef> I'll give it more time to see what happens |
20:35:16 | FromDiscord | <treeform> I don't think it makes sense to profile non -d:release code because well ... its debug |
20:35:30 | FromDiscord | <treeform> its run time is not what you will ship |
20:35:53 | FromDiscord | <ElegantBeef> Yea i know, well we'll see if this ever finishes |
20:35:57 | FromDiscord | <treeform> ok cool |
20:39:36 | FromDiscord | <ElegantBeef> Hmm on release it seems something freezes the program |
20:47:13 | FromDiscord | <ElegantBeef> Think the issue is just that the program is optimizing a lot away so it's missing it running 😄 |
20:49:40 | FromDiscord | <ElegantBeef> Well with that knowledge time for a PR so you can merge the better parser on top and everyone's happy |
20:54:08 | FromDiscord | <ElegantBeef> Sidenote, it doesnt play well with clang |
21:03:53 | FromDiscord | <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:27 | FromDiscord | <treeform> oh crazy |
21:08:46 | FromDiscord | <ElegantBeef> Seeing in another community if there is a flag we can just use in gcc to get the same mapping |
21:08:49 | FromDiscord | <treeform> no manual offset needed on gcc+windows |
21:16:35 | FromDiscord | <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:19 | PMunch | Hi treeform, long time |
21:24:07 | PMunch | Tried your Istrolid game, pretty cool stuff |
21:34:26 | FromDiscord | <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:41 | PMunch | What's the issue? |
21:35:14 | FromDiscord | <ElegantBeef> on linux gcc made binaries have a system relative `rip`, but clang and tcc have a program relative `rip` |
21:35:33 | PMunch | rip? |
21:35:40 | FromDiscord | <ElegantBeef> register instruction pointer |
21:37:39 | PMunch | Related to this? https://stackoverflow.com/questions/55648274/why-does-clang-behave-weirdly-with-register-variables-compared-to-gcc |
21:38:45 | FromDiscord | <System64 ~ Flandre Scarlet> How can I pass an argument from the command line, such a path to a file for exemple |
21:39:21 | PMunch | paramCount and paramStr |
21:39:31 | PMunch | Or commandLineParams |
21:41:14 | FromDiscord | <System64 ~ Flandre Scarlet> do I need to import something? |
21:41:29 | PMunch | Yes |
21:42:08 | PMunch | The `os` module, in case you don't have access to the manual or Google :P |
21:52:44 | FromDiscord | <System64 ~ Flandre Scarlet> ah yeah thanks |
21:52:57 | PMunch | No problem |
21:53:50 | FromDiscord | <System64 ~ Flandre Scarlet> and to remove the x latest characters? |
21:54:30 | PMunch | There are more complex modules as well, to parse the arguments or allow things like the common patterns |
21:54:42 | PMunch | You can just setLen on a string to make it shorter |
21:55:08 | PMunch | Or slice using `myStr[0..^10]` |
21:55:42 | PMunch | And there are some specialised utilities if you want to remove things like a file extension for example |
21:59:24 | FromDiscord | <System64 ~ Flandre Scarlet> Doesn't work very well https://media.discordapp.net/attachments/371759389889003532/853393070346207242/unknown.png |
22:00:01 | PMunch | That's because ^ is already an alias for x.len - y |
22:01:00 | FromDiscord | <System64 ~ Flandre Scarlet> ah sorry |
22:01:30 | PMunch | https://play.nim-lang.org/#ix=3pJY |
22:07:56 | FromDiscord | <System64 ~ Flandre Scarlet> WTF it's a string! https://media.discordapp.net/attachments/371759389889003532/853395213129482240/unknown.png |
22:09:56 | PMunch | paramStr takes an integer to which number of argument you want |
22:10:12 | PMunch | What you do there is assign path to be the procedure paramStr |
22:10:41 | PMunch | And you shouldn't call setPositionImpl directly, just call setPosition |
22:12:18 | FromDiscord | <System64 ~ Flandre Scarlet> and with CommandLineParams it's an array of params? |
22:12:27 | PMunch | A sequence I believe |
22:12:45 | PMunch | paramCount and paramStr are analogous to argc and argv in C |
22:13:05 | FromDiscord | <System64 ~ Flandre Scarlet> ah I see |
22:23:20 | FromDiscord | <ElegantBeef> Ugh pmunch sucks that seems to get clang to work like gcc and not the other way around 😄 |
22:30:42 | Prestige | Any 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:55 | PMunch | I'm all for it |
22:31:19 | PMunch | The second one though poses another interesting question (well maybe both do), how would we differentiate them? |
22:32:25 | PMunch | We should probably have some kind of common pattern for "procedure that returns on opt" |
22:32:35 | FromDiscord | <ElegantBeef> We dont have return type inference so `getOpt` maybe |
22:32:36 | Prestige | Yeah I agree |
22:32:45 | FromDiscord | <ElegantBeef> or `maybeGet` |
22:32:54 | Prestige | I like getOpt |
22:33:07 | PMunch | Kinda like how Ruby has ? for things that return a boolean |
22:33:40 | Prestige | how does that syntax look? |
22:33:54 | FromDiscord | <ElegantBeef> `thing.has?(x)` afaik |
22:34:18 | PMunch | Like this: https://medium.com/@sologoubalex/boolean-methods-in-ruby-94a2e907e5ea |
22:34:20 | FromDiscord | <ElegantBeef> It's pointless noise imo, but some people like it |
22:34:51 | PMunch | Ruby also has ! for methods that mutate state passed to it |
22:35:02 | PMunch | x.downcase! would lower case x |
22:35:12 | PMunch | While x.downcase would return a lower cased version of x |
22:35:32 | Prestige | 🤔 |
22:36:23 | FromDiscord | <ElegantBeef> i prefer the `lowered` and `lower`, but we also dont have discardable functions |
22:36:29 | Prestige | I 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:41 | Prestige | At least I don't think there's a get proc yet |
22:36:54 | FromDiscord | <ElegantBeef> clearly you do `{}` for option to make everyone cry 😛 |
22:37:00 | Prestige | oh no lol |
22:37:54 | PMunch | Haha :P |
22:41:33 | FromDiscord | <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:58 | PMunch | What are you using this for? |
22:43:56 | FromDiscord | <ElegantBeef> the linux port of treeforms sampling profiler |
22:44:14 | FromDiscord | <ElegantBeef> the `rip` is used to get the code from the dumped binary |
22:44:23 | PMunch | Aah I see |
22:44:47 | FromDiscord | <ElegantBeef> The addresses of all the gcc stuff is offset by the start of the system memory, whereas clang is exact |
22:45:14 | FromDiscord | <ElegantBeef> And there is no way of knowing from the binary that i see to know which compiler it came from |
22:45:19 | FromDiscord | <ElegantBeef> So it's just god awful |
22:56:30 | PMunch | Wouldn't the offsets in GCC be so large that they would be outside the binary? |
23:00:15 | FromDiscord | <schneiderfelipe> sent a long message, see http://ix.io/3pK9 |
23:00:25 | FromDiscord | <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:51 | PMunch | Yeah I was just saying it'd be easy to detect wether they where local or global |
23:02:15 | FromDiscord | <schneiderfelipe> (edit) "long message," => "code paste," | "http://ix.io/3pK9" => "https://play.nim-lang.org/#ix=3pKc" |
23:02:58 | FromDiscord | <ElegantBeef> I suppose but still feels stupid and there should be a cleaner way |
23:03:14 | FromDiscord | <ElegantBeef> Hopes there is a way to do it with a gcc flag |
23:11:33 | * | blackpawn quit (Ping timeout: 258 seconds) |
23:22:32 | FromDiscord | <treeform> In reply to @PMunch "Tried your Istrolid game,": Thanks! |
23:23:47 | FromDiscord | <treeform> In reply to @ElegantBeef "I suppose but still": Maybe objdump has a flag? |
23:24:27 | FromDiscord | <treeform> clang has its own objdump? |
23:25:08 | FromDiscord | <treeform> https://llvm.org/docs/CommandGuide/llvm-objdump.html "-r, --reloc Display the relocation entries in the file." |
23:25:59 | FromDiscord | <System64 ~ Flandre Scarlet> what is a Tainted string? |
23:26:30 | * | ZoomZoomZoom quit (Ping timeout: 258 seconds) |
23:26:51 | FromDiscord | <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:58 | FromDiscord | <treeform> I don't think it made programs any safter. |
23:27:02 | FromDiscord | <treeform> (edit) "safter." => "safer." |
23:27:12 | * | orangeacme joined #nim |
23:27:21 | FromDiscord | <System64 ~ Flandre Scarlet> so I can cast it without problems? |
23:27:24 | * | orangeacme quit (Remote host closed the connection) |
23:27:30 | FromDiscord | <treeform> yeah |
23:27:34 | FromDiscord | <treeform> just $ also works |
23:27:44 | PMunch | It's just a distinct string, so the data type is exactly the same |
23:27:50 | FromDiscord | <ElegantBeef> Well it's an alias to string so you dont need to cast it unless you enable it |
23:28:40 | FromDiscord | <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:59 | FromDiscord | <treeform> Maybe that can help produce a proper dump object file that matches the memory layout? |
23:29:16 | FromDiscord | <treeform> https://linux.die.net/man/1/objdump |
23:29:28 | FromDiscord | <System64 ~ Flandre Scarlet> Doesn't work https://media.discordapp.net/attachments/371759389889003532/853415735517904896/unknown.png |
23:29:40 | PMunch | @treeform, did you write Istrolid all by yourself by the way? |
23:29:52 | FromDiscord | <treeform> yes I did |
23:30:02 | FromDiscord | <treeform> I had people help with balance/ideas though |
23:30:34 | PMunch | Yeah I saw you posted something about a community balancing thing |
23:30:42 | FromDiscord | <treeform> some people also contributed bug fixes |
23:30:47 | PMunch | I would still consider that by yourself :) |
23:30:59 | PMunch | What's it written in? |
23:31:03 | PMunch | Like engine and stuff |
23:31:46 | FromDiscord | <treeform> Github says I wrote 89% of the lines. |
23:31:58 | PMunch | Oh it's on GitHub? |
23:32:03 | FromDiscord | <treeform> Private |
23:32:14 | PMunch | Ah right |
23:32:27 | FromDiscord | <treeform> Its written in CoffeeScript |
23:32:30 | FromDiscord | <treeform> and is browser based |
23:32:34 | FromDiscord | <treeform> the steam version is just electron |
23:32:49 | FromDiscord | <treeform> I was always about niche experimental languages |
23:32:56 | FromDiscord | <treeform> CoffeeScript just basically died on me |
23:33:03 | FromDiscord | <treeform> I don't like JS/HTML5 any more |
23:33:24 | PMunch | Died on you? |
23:33:30 | PMunch | No one using it any more? |
23:33:42 | FromDiscord | <treeform> CoffeeScript stop being cool, stop being popular |
23:33:48 | FromDiscord | <treeform> I got tried of it, it has some design holes |
23:34:04 | FromDiscord | <treeform> I used it long enough to understand that it has not future |
23:34:07 | PMunch | I remember having heard of it, but never seen anything written in it, let alone a full game |
23:35:40 | FromDiscord | <treeform> The atom editor was written in CoffeeScript |
23:35:45 | FromDiscord | <treeform> but then they ported it to JS |
23:35:55 | PMunch | Huh, didn't know that |
23:35:58 | FromDiscord | <treeform> Easy port as you just compile and use the compiled output |
23:36:07 | FromDiscord | <treeform> maybe fix up some spaces and award things |
23:36:11 | PMunch | So it's not like Nims C output then :P |
23:36:19 | FromDiscord | <treeform> (edit) "award" => "awkward" |
23:36:31 | FromDiscord | <treeform> No it tries to produce readable JS |
23:36:43 | FromDiscord | <treeform> As its nearly 1:1 match with JS |
23:37:12 | FromDiscord | <treeform> Even the docs have coffee on one side and js on the other: https://coffeescript.org/#overview |
23:37:20 | FromDiscord | <treeform> even comments are copied |
23:37:24 | PMunch | Yeah I just saw that |
23:37:46 | FromDiscord | <treeform> CoffeeScript is similar to python/nim |
23:37:49 | FromDiscord | <treeform> in syntax |
23:37:55 | FromDiscord | <treeform> except no types |
23:38:12 | PMunch | I mean it's an admirable goal, but I much prefer Nim outputting fast C than readable C |
23:38:27 | FromDiscord | <treeform> yes |
23:38:46 | FromDiscord | <treeform> I think there is a place for CoffeeC which tries to do that for C |
23:39:08 | FromDiscord | <treeform> But it would have to have C's semantics which are honestly not that great. |
23:39:09 | PMunch | Hmm, no types, I'm already sceptical :P |
23:39:55 | FromDiscord | <treeform> I man I could use a nim-like language without GC, or event strings, producing nice looking C |
23:40:06 | FromDiscord | <treeform> I mean |
23:40:29 | FromDiscord | <treeform> Kind of like CoffeeScript to JS, but CoffeeC to C |
23:40:47 | FromDiscord | <treeform> But Nim is probably a better language |
23:41:21 | PMunch | It has its good parts and bad parts, but I like it |
23:41:52 | PMunch | By the way, are you holding a talk this year for NimConf? |
23:44:50 | FromDiscord | <treeform> Big problem with CoffeeScript is that it can compile junk into junk, like the language is so loose anything goes. |
23:44:58 | FromDiscord | <treeform> So its easy to make typos and it continues to compile and work |
23:45:18 | PMunch | Oooh, that's not great |
23:45:20 | FromDiscord | <treeform> Checkout this beauty: |
23:45:21 | FromDiscord | <treeform> https://media.discordapp.net/attachments/371759389889003532/853419733944762368/unknown.png |
23:45:48 | PMunch | Ouch, yeah that's not great |
23:46:11 | FromDiscord | <treeform> Its very very loose |
23:46:40 | FromDiscord | <treeform> Nim would stop at first character and say "To" is not defined. |
23:47:37 | FromDiscord | <treeform> I am doing NimConf on https://github.com/treeform/pixie |
23:47:54 | FromDiscord | <treeform> I was supposed to be recording now, but I am kind of out of energy, will probably do it tomorrow. |
23:48:07 | PMunch | Ooh, looking forward to that! Pixie looks really nice |
23:48:12 | PMunch | Haven't tried it yet though |
23:48:12 | FromDiscord | <treeform> I got the slides done and rough text |
23:48:32 | FromDiscord | <treeform> I feel like I have grown a ton as a programmer writing Pixie. |
23:48:38 | FromDiscord | <treeform> Its not a simple project |
23:48:44 | PMunch | I need to get my slides done and record mine yesterday, I'm going to be gone all of next week |
23:49:07 | FromDiscord | <treeform> What is yours about? |
23:49:19 | PMunch | Haha, I know, I actually started writing a SVG rasterizer at one point |
23:49:41 | PMunch | Mine is about writing my keyboard firmware in Nim |
23:49:55 | PMunch | And how Nim is great for micro-controller programming in general |
23:49:59 | FromDiscord | <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:24 | PMunch | I 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:25 | FromDiscord | <treeform> keyboard firmware cool! |
23:50:43 | FromDiscord | <treeform> Do you by any chance have it working on Ergodox Ez? |
23:50:47 | PMunch | Yeah SVG with HTML/JS/CSS is such a mess |
23:50:49 | FromDiscord | <treeform> Otherwise I would flash it. |
23:51:07 | FromDiscord | <ElegantBeef> I really should've made a talk about using macros to save your brain cells 😄 |
23:51:30 | FromDiscord | <treeform> I could make a talk about using macros to delete brain cells 🙂 |
23:51:41 | FromDiscord | <ElegantBeef> lol |
23:52:03 | FromDiscord | <ElegantBeef> I heavily abuse macros in most of my libraries 😄 |
23:52:11 | FromDiscord | <treeform> I try not to |
23:52:16 | FromDiscord | <treeform> I use them as last resort |
23:52:34 | FromDiscord | <treeform> My biggest macro is 250 lines and its so hard to figure out what is going on. |
23:52:53 | FromDiscord | <ElegantBeef> I dont like writing the same code over and over, so macros save the day 😛 |
23:53:01 | PMunch | Should 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:03 | FromDiscord | <ElegantBeef> Plus i tend to prefer generative code than manually written |
23:53:58 | PMunch | Ah, they seem to use a very similar port expander as well |
23:54:09 | FromDiscord | <treeform> Maybe it can work? |
23:54:20 | PMunch | The MCP23018, I'm using the MCP23017 |
23:54:49 | FromDiscord | <treeform> I have two nearly identical Ergodox Ezs I can experiment with one. |
23:54:54 | FromDiscord | <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:13 | FromDiscord | <treeform> Well jsony is written almost without macros |
23:55:21 | FromDiscord | <treeform> and its very introspective |
23:55:28 | FromDiscord | <treeform> same with flatty... |
23:55:34 | FromDiscord | <treeform> and print... |
23:55:44 | FromDiscord | <ElegantBeef> Sure, but https://github.com/beef331/sumtypes for instance |
23:56:09 | FromDiscord | <ElegantBeef> I dont see how you'd replicate that api without macros |
23:56:24 | PMunch | The 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:35 | FromDiscord | <treeform> It be cool to have some thing like 2fa time code build into the keyboard |
23:58:53 | FromDiscord | <treeform> dongles do it, but keyboard key could be better |
23:59:23 | FromDiscord | <treeform> also it might be cool to have some thing that strafes a random direction left or right |
23:59:34 | FromDiscord | <treeform> some sort of random left - right key 🙂 |
23:59:53 | PMunch | Pushed my latest version to here: https://github.com/PMunch/badger/tree/final |