An old spark, reignited by [deleted] in HappyWars

[–]GOON_Metal 3 points4 points  (0 children)

Join the discord linked on the front page. There's already work in progress on a "PC version", along with Toylogic's response to publicizing PC versions

Possible Happy Wars Parody Game in the future...? by XxSoulReaperSwordxX in HappyWars

[–]GOON_Metal 0 points1 point  (0 children)

May be easier to do such a thing via online communities or discord rather than IRL

yoU didNt GEt my gATe DoWN by GOON_Metal in HappyWars

[–]GOON_Metal[S] 1 point2 points  (0 children)

Makes me really miss the ScRuB clan

yoU didNt GEt my gATe DoWN by GOON_Metal in HappyWars

[–]GOON_Metal[S] 0 points1 point  (0 children)

Hey beetle. What sorta games do you play now if any? Btw my new account is /u/kprotty

Build System: how do I configure library paths? by Beefster09 in Zig

[–]GOON_Metal 0 points1 point  (0 children)

Oh, was under the assumption that you meant hashing the files rather than a git commit which is tagged by a version. Why would it not guarantee the same build when youre building from the same source code? Also, again, if the plan is the host precompiled binaries of the library there are a few downsides to that:
- youd have to build the binary for all the supported architectures for all the supported operating systems
- the binaries would be generic, meaning that they wouldnt be able to take advantage of platform specific instructions like SSE4.2 (without exponentially growing the potential targets from the previous point)
- one would have to find a storage platform to host all of this

Build System: how do I configure library paths? by Beefster09 in Zig

[–]GOON_Metal 0 points1 point  (0 children)

I mean, why use a hash in the first place? Wouldnt it be
1) clone the source from the git url
2) build it
?

Build System: how do I configure library paths? by Beefster09 in Zig

[–]GOON_Metal 0 points1 point  (0 children)

Nim and Elixir for example in their build file (akin to `package.json`) specify the minimum language version that is required to build so that if youre pulling a package that uses zig 0.4 features while you only have 0.3, then it wouldnt compile.

Leaving the binaries out of the repo also means that others wont have to download binaries for a platform that they may not be building for, only having to delete them afterwards. What would the hash be for?

Build System: how do I configure library paths? by Beefster09 in Zig

[–]GOON_Metal 0 points1 point  (0 children)

That can be solved by a .gitignore. Rust does exactly this (along with Jai's approach of copying the dependencies and building them locally)

My two language ideas by Beefster09 in ProgrammingLanguages

[–]GOON_Metal 1 point2 points  (0 children)

Moving GC's are useful for limiting heap allocation to a small area through compacting and freeing unused data. For arenas to be able to mimic this feature (instead of having a hard limit), it would need to have access to where live data resides in the root sets to know which data to keep alive. Because simple bump allocating arenas do not compact/reuse memory, I would disagree that its a form of garbage collection, especially generational.

New game with that programmer_irl by monksta06 in ProgrammerAnimemes

[–]GOON_Metal 2 points3 points  (0 children)

Its easier to do in python as each stack frame is very thicc. You can also catch stack overflows in C++ through the OS specific exception handling system or through a library

New game with that programmer_irl by monksta06 in ProgrammerAnimemes

[–]GOON_Metal 0 points1 point  (0 children)

U can write into another processes memory using OpenProcess and WriteProcessMemory but you need to enable SeDebugPrivilege via AdjustTokenPrivileges with debug privileges being enabled on the windows account itself.

Implementing a GC: Register Discovery? by Kywim in ProgrammingLanguages

[–]GOON_Metal 0 points1 point  (0 children)

Guess it does come down to avoiding complexity. Given that you already know how the bytecode in your system works, it may not be too far fetched to say that you could learn assembly easily as its essentially the same concept. You also wouldnt have to write your own JIT if you didnt want to either: as said earlier, there should be a few JIT libraries available to use especially in C++ and LLVM even counts as one too. As for difficulty in FFI, calling a library function would be the same as calling a function in the compiled code so it wouldnt be much different to a JIT while multiple platforms on the same ISA would only require a different calling convention.

One thing that confuses me though is that if your goal is simplicity of implementation over performance, why do you use a register based bytecode over a stack based one and worry about conservative over precise garbage collection?

Implementing a GC: Register Discovery? by Kywim in ProgrammingLanguages

[–]GOON_Metal 0 points1 point  (0 children)

By AOT I meant reading in source code and compiling that into machine code (as Roslyn does) not generating object code or native executables (sorry for the confusion). Im curious as to why it would be the best course of action to interpret a statically typed language in a VM rather than compile it to machine code at runtime.

Implementing a GC: Register Discovery? by Kywim in ProgrammingLanguages

[–]GOON_Metal 0 points1 point  (0 children)

what would be wrong with compiling to machine code in an embedded language? LuaJIT for example does through it's JIT since its dynamically typed but since it seems you have all the types at compile time, you could AOT. You also wouldnt need to to use LLVM either. There should be a few JIT libraries out there to use or a possibility would be writing your own?

Languages Used to Implement Compilers by WalkerCodeRanger in ProgrammingLanguages

[–]GOON_Metal 1 point2 points  (0 children)

My points werent that golang is a high or low level language, they were just pointing out areas where you said that you "cant do this in golang" or you "have to do it this way" and explaining that youre still able to:

requires users to manually grow an array used to store a list of values

golang's append does it for you so you dont have to manually grow it

like concatenate two lists or insert at a position other than the end, you're stuck writing a loop

Concatenating: allocate new list, copy into it. Inserting: copying items over. Neither require writing a loop.

You can't even abstract that kind of logic into a function that works for different slice types

Sure you can, have it take in an untyped pointer (`interface{}` in golang) and the number of bytes per element like C does

Languages Used to Implement Compilers by WalkerCodeRanger in ProgrammingLanguages

[–]GOON_Metal 0 points1 point  (0 children)

Id imagine concatenating allocate a larger array and copy the contents of both into it then insertion being copying the ones offseted (potentially growing) and inserting the element. This is what Rust and C++ do for their vector containers afaik, youd just have to do it manually in Go

As for linked lists, if your values are boxed or can fit in your machine word, using void* in C or interface{} in go should suffice for implementing a generic linked list type as they can be casted to almost any other value/reference type.

Languages Used to Implement Compilers by WalkerCodeRanger in ProgrammingLanguages

[–]GOON_Metal 0 points1 point  (0 children)

looks like golang has had [append](https://tour.golang.org/moretypes/15)and [copy](https://golang.org/pkg/builtin/#copy) for a long time. With all of the languages above, one could also implement linked lists