Hacker Newsnew | past | comments | ask | show | jobs | submit | fatty_patty89's commentslogin

I took a look at your github and saw you implemented the same games in multiple languages, which one did you like the most and why?


To be honest, my favorite language is my own language Tentacode [0], closely followed by my recent experimental language Gar [1]. Tenta is not publicly released yet, but the source can be downloaded on github [2]. I've been experimenting with making games in a bunch of languages to inform the design of Tenta by seeing how much I can strip away and still successfully, efficiently make a meaningful game.

[0] https://tentacode.org/docs/language/basic_types/

[1] https://github.com/Syn-Nine/gar-lang

[2] https://github.com/Syn-Nine/tentacode/tree/llvm


not being able to do alias i32 = int; was the biggest turn off for me


I got irrationally angry when it refused to load the website


You handle your irrational anger much better than whatevermrfukz who keeps pooping his pants.


Interesting that you mention that, how do you keep track of his comments? Some sort of plugin/scraper?


> how do you keep track of his comments?

You can just look at them, turn on showdead in your profile and you'll see a bunch of flag-killed comments in this discussion by whatevermrfukz. No need for a plugin or scraper.


thank you


you could refuse to be angry to mock it


Thank you

do the go bindings require cgo?


The GoLang bindings – yes, they are based on cGo. I realize it's suboptimal, but seems like the only practical option at this point.


In a normal world the Go C FFI wouldn't have insane overhead but what can we do, the language is perfect and it will stay that way until morale improves.

Thanks for the work you do


There are undoubtedly still some optimizations lying around, but the biggest source of Go's FFI overhead is goroutines.

There's only two "easy" solutions I can see: switch to N:N threading model or make the C code goroutine-aware. The former would speed up C calls at the expense of slowing down lots of ordinary Go code. Personally, I can still see some scenarios where that's beneficial, but it's pretty niche. The latter would greatly complicate the use of cgo, and defeat one of its core purposes, namely having access to large hard-to-translate C codebases without requiring extensive modifications of them.

A lot of people compare Go's FFI overhead to that of other natively compiled languages, like Zig or Rust, or to managed runtime languages like Java (JVM) or C# (.NET), but those alternatives don't use green threads (the general concept behind goroutines) as extensively. If you really want to compare apples-to-apples, you should compare against Erlang (BEAM). As far as I can tell, Erlang NIFs [1] are broadly similar to purego [2] calls, and their runtime performance [3] has more or less the same issues as CGo [4].

[1]: https://www.erlang.org/doc/system/nif.html

[2]: https://pkg.go.dev/github.com/ebitengine/purego

[3]: https://erlang.org/documentation/doc-10.1/doc/efficiency_gui...

[4]: https://www.reddit.com/r/golang/comments/12nt2le/when_dealin...


Java has green threads and c#/.net has logical threads


Yes, I have cleaned up the wording a bit. Also, the common implementation of Rust's async is comparable to green threads, and I think Zig is adopting something like it too.

However, the "normal" execution model on all of them is using heavyweight native threads, not green threads. As far as I can tell, FFI is either unsupported entirely or has the same kind of overhead as Go and Erlang do, when used from those languages' green threads.


Genuine question, you make it seem as this is a limitation and they're all in the same bucket but how was Java for example able to scale all the enterprises while having multi threading and good ffi, same with .net.

My impression is that the go ffi is with big overhead because of the specific choices made to not care about ffi because it would benefit the go code more?

My point was that there's other gc languages/envorionments that have good ffi and were somehow able all these decades to create scalable multithreaded applications.


I would suggest gaining a better understanding of the M:N threading model versus the N:N threading model. I do not know that I can do it justice here.

Both Java and Rust flirted with green threads in their early days. Java abandoned them because the hardware wasn't ready yet, and Rust abandoned them because they require a heavyweight runtime that wasn't appropriate for many applications Rust was targeting. And yet, both languages (and others besides) ended up adding something like them in later anyway, albeit sitting beside, rather than replacing, the traditional N:N threading they primarily support.

Your question might just be misdirected; one could view it as operating systems, and not programming languages per se, that screwed it all up. Their threads, which were conservatively designed to be as compatible as possible with existing code, have too much overhead for many tasks. They were good enough for awhile, especially as multicore systems started to enter the scene, but their limitations became apparent after e.g. nginx could handle 10x the requests of Apache httpd on the same hardware. This gap would eventually be narrowed, to some extent, but it required a significant amount of rework in Apache.

If you can answer the question of why ThreadPoolExecutor exists in Java, then you are about halfway to answering the question about why M:N threading exists. The other half is mostly ergonomics; ThreadPoolExecutor is great for fanning out pieces of a single, subdividable task, but it isn't great for handling a perpetual stream of unrelated tasks that ebb and flow over time. EDIT: See the Project Loom proposal for green threads in Java today, which also brings up the ForkJoinPool, another approach to M:N threading: https://cr.openjdk.org/~rpressler/loom/Loom-Proposal.html


In a real (not "normal") world, trade-offs exist and Go choose a specific set of design points that are consequential.


> There's so much that a person who can code and can deal with statistics can apply himself do.

Can you give a few examples please?


For instance, I have a friend with a phd in designing medical experiments. Someone from the biosciences field will come to him and ask for how exactly his experiment needs to be set up to make valid conclusions.

One of the guys I met on HN got into marine telecoms. Something about the necessity of compressing data back before it became ubiquitous.

I work in quant trading stuff, where we try to use stats to decide what to buy and sell.


Second time you posted this, are you a moderator?


Seizure warning for the above link

edit: flashing lights at the end seem to be mostly becauseo f darkreader extension


I hecking love depending on big corpo


What makes you think so?


I wonder if I should really explain or if that would provide a list of things to sanitize before publishing stuff.

If someone has ever written any code is well aware of what can be done in a weekend and especially that no one doing something "in a weekend" will ever add all those useless comments everywhere, literally a few thousand lines of comments. That takes more time than writing code. Comments in Claude style. Other claude-isms all around.

It's ok to vibe things, but just say so, no shame.

And yes, after 5 minutes of looking around I had enough evidence to "prove it". Any moderately competent engineer could.


Probably the commit history.


Yayiee, the “cant prove it” Doakes Dexter meme, making it to HN


You are neither confirming nor denying, why won't you just tell if you vibe-coded it or not?


you posted the Dexter meme earlier, why are you acting surprised?


What the fuck? Nobody else saw the cursor ceo looking through the gpt5 generated code, mindlessly scrolling saying "this looks roughly correct, i would love to merge that" LOL

You can't make this up


That explains a lot.


amazing time to be alive, alone for this clown show


if you’re not using an LLM to vibe code garbage then are you really a software developer?


This is the ideal software engineer. You may not like it, but this is what peak software engineering looks like.

/s


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: