1,107 karma · joined Mar 22, 2019 (7y ago) · 450 submissions
comment 2y ago · link · parent
SSI nowadays requires a host with a specific server stack and configuration. Meanwhile, with purely static files it's easy to find high quality hosts or CDNs, even for free.
For simple sites, it's much easier to pre-generate the static content and then upload the output files (Web 1.0), rather than dynamically generate it for every HTTP request sent to the server (Web 2.0).
comment 2y ago · link · parent
And because even in 2024, good SEO requires that the content be directly in the HTML source, even without JavaScript.
Also there is no such "old fashioned way". The old fashioned way was to use frames, server side includes with Apache (before PHP became popular), or have WYSIWYG tools do it for you.
comment 2y ago · link · parent
In Tokyo those salaries are enough to live like a king, more than most big cities in the world.
Here you can get a decent family house close to a station for about 100~150k per month (and even buy one for the same range in loan).
No need to own and pay for a car because the public transportation is amazing.
Pension and healthcare are all fairly cheap and automatically handled for you.
Except for education which is super expensive, it's pretty easy as a senior engineer to end up saving 300~500k every month with just a single normal job.
comment 2y ago · link · parent
Unless you have a specifically rare expertise, I do not think it is realistic to ask 20M, it will probably make the company reject your profile without negociation.
Now if you go the freelance route, it's probably feasible (but not necessarily easy, it depends a lot on your Japanese level and how much you want to work and can handle context switching), but you'd need a plan to get an appropriate visa first.
Source: I have been living here for 5 years, AMA.
comment 2y ago · link · parent
However, there is always something that bothered me: I remember the exact moment at 5 years old where I got out of the shower room confused and afraid because I could not remember anything.
So it is not like my memory gradually faded, but really that there is a specific moment in time when it happened.
I also remember that at several times in my life, from as early as 5~6 and up to today, I was wondering about the fact that I could not remember anything from before 5 (like a recursive memory).
Anyone else in this case?
comment 2y ago · link · parent
comment 2y ago · link · parent
Just because those hallucinations sometimes randomly happens to be right, people concluded that being wrong is the exception, while being right is somehow the rule.
It's like when people read [insert millenias old text here], finds a part that happens to illustrate something in their life today and conclude that it is a prophecy that predicted the future.
The meaning/truth in those is nothing more than a cognitive bias from the mind of the reader, not an inherent quality of the text.
comment 2y ago · link · parent
I went away from Firefox a few years ago and am very happy about it.
I also think that the "free web" arguments are bullshit. Blink is open source, so any wrongdoing from Google can be undone.
An organization like Mozilla that is able to develop and maintain his own engine could achieve the same results by forking Blink. It would probably reduce the costs by more than 10, without any ethical compromise, resulting in a far better browser overall.
If they wanted it, they could lead the way to bridge projects like ungoogled-chromium or the various attempts at reviving android extensions in a consistent and ethical fork. Probably even convince others like Vivaldi, Edge, Opera or even Apple to join the initiative.
comment 2y ago · link · parent
Having apps that works as well as native ones, while using the same codebase and open technologies, and that is naturally as decentralized, safe and accessible as the web.
Also not needing to be politically correct, approved by Google and Apple or share large percent of revenue and marketing data with them.
It could be happening if Firefox took it more seriously and Apple didn't prevent it from happening.
comment 2y ago · link · parent
To reuse your example, I've seen things like that:
void deleteお問い合わせ(Map[] otoiawase)
I haven't seen old enough codebases to have encoding issues, but I bet that it would make me shrug the next time I see an é.comment 2y ago · link · parent
The only way we could access the core database was through a mainframe terminal emulator only available on client PCs across the internal network. It was basically an old school terminal based UI where you had to enter specific codes and sequences of keys to navigate.
It was not supposed to be automatable, and we did not have permission to deploy any executable to computers on the network.
However, we found a way to plug into it by calling an obscure DLL via Internet Explorer's ActiveX. From there, we had access to only two functions: one to send a sequence of key strokes to the emulator, and another which was basically getString(x, y, length).
We built whole applications using this database, only via those two functions, which led to giant procedures for each query we had to do. It was terrible, unstable and slow, and broke at every update, but it did the work.
140.
ex.Terminator is a destructor helper for Go(github.com ↗)
1 points · by Seb-C · 2y ago · discuss
141.
Benchmark of WASM Runtimes in Golang(github.com ↗)
2 points · by Seb-C · 3y ago · discuss
comment 3y ago · link · parent
Thank you. Feedbacks are very much appreciated. There is still a long was until an eventual release, but it's very fun to work on it.
> I tend to not need many, so I'd be curious if you can recall any structure in particular which you couldn't find? No biggie if not.
I had trouble finding basic structures like sets or linked lists, as much as more specific ones like R-tree, M-tree, KD-tree quad-tree or specific kinds of tries.
When quickly searching on Google, there are pretty much always some results, but when looking at the details it's not that great. Most of the packages have some kind of flaw that was a deal-breaker for me. Most common ones are:
- The package is something developed by one guy 4 years ago, and has pretty much no stars and is abandoned
- The structure is somehow backed by the native `map`, meaning that it has the same randomized iteration order
- There is some kind of logic to try to handle multi-threading, mixed-up with the data structure's logic. Often with mutexes/locks, thus killing the performance. My game is pretty much only mono-thread, and I just need something simple and that does not care about synchronization.
- The structure is not generic, but only uses `interface{}`
- The structure lacks tests or have unreadable code made of 1-letter variables
> I'm not a game dev, but I've seen some larger games such as https://github.com/divVerent/aaaaxy/tree/main/internal (if you haven't played it before—do it!) which seems to be able to place everything into separate packages without issue, so perhaps there's something to gleam from their architecture?
Thanks for the reference. After looking at it, is seems to me that they are creating really tiny packages made of one or two files. I don't want my codebase to end-up with thousands of 1-file packages, it does not seem very maintainable. I want to keep having packages with clearly defined purposes and domains.
> Hash map iteration shouldn't be sorted in _any_ language (here's Rust, for example https://play.rust-lang.org/?version=stable&mode=debug&editio... (Python makes it _appear_ as if dicts are sorted hash maps, but that's only because it doesn't only use a hash table, but a vector as well (same as you'd have to do in Go))), otherwise it would cause both portability and security (https://github.com/golang/go/issues/2630) issues. You should probably be using a b-tree if you aren't willing to sort it yourself.
I think that you didn't understand my message (or I didn't explain clearly enough). I do not need the items to be sorted, I need the iteration order to be consistent.
Let's say that I insert A, B and C in a map, then want to iterate on it. I will get an unspecified order, maybe ABC, maybe CBA, maybe BAC, which does not matter to me. However, in any language, this order will be consistent across all future iterations unless the data is changed. This is a natural property of any data structure. So if I got CBA in the first loop, I will also get CBA in the second and third loops.
In golang this is not the case because they actively inserted a random order. It means that even if the data does not change, I may get CBA in the first iteration, but BAC in the second, then ABC... Which created a ton of issues for me.
> If you don't care about unloading https://github.com/pkujhd/goloader > > Go actually has one of the best WASM runtimes https://github.com/tetratelabs/wazero > > It also has a bunch of libraries for embedding scripting languages https://awesome-go.com/embeddable-scripting-languages, with Tengo _probably_ being the quickest https://github.com/d5/tengo
Yes, I noticed those packages recently. The problem is that there is little data about how reliable and maintainable goloader is going to be on the long term.
As I care about performance and security, I don't want a scripting language, but WASM seems to be a very promising possibility. I have made benchmarks with 2~3 WASM engines in Go, and so far I am not completely convinced about the quality and performance of the available APIs. Also, when compiling Golang to WASM, the native compiler is still abysmally bad and does not have full support for imports, so Tinygo is a must-have.
Anyway, modding is still a long term idea at this point, so hopefully the ecosystem will get more mature within a couple of years.
comment 3y ago · link · parent
I am the developer of Astral Divide, which is entirely written in Go: https://store.steampowered.com/app/2597060/Astral_Divide/
When I started two years ago, I basically had to choose a language and a package/framework, so I'd like to share my experience about it.
First, about the package, there are two major ones for 2D games, which are Ebiten(gine) and Pixel.
I initially chose Pixel, because it seemed more documented at the time and had a bigger community. Overall, it was good as long as the game was simple, but unfortunately I regretted this choice later.
Don't get me wrong, I am not here to discredit the author, because there is a phenomenal amount of open source work that was done, and I am thankful for it. But as my game grew more complex, the engine started to cause big architectural challenges, memory leaks (it does not correctly garbage collect OpenGL's objects for example), and it's multi-threading model is flawed. I also discovered that it was in fact not maintained. Overall it lacks too much maturity for a serious game.
In the end, I decided to ditch it, because it was easier, and my proposals for help on GitHub never got any answer. It took some effort, but having my own engine based on OpenGL was the best choice in this case.
When it comes to Ebiten, I have only used the sound library called Oto, but overall my opinion of the whole package now is that it is well maintained and architected.
Now when it comes to choosing a language, I hesitated between:
- Go, which I had a lot of experience with and seemed good enough, even if the typing system is a bit too weak
- Rust, which I was (and still is) interested in, but had no experience, and unsure if it was worth it in terms of productivity (because of the additional time spent on worrying code, and the compilation time itself). Also, it didn't have game engines which seemed as mature as in Go at this time (I wish I had known that I would end-up with my own engine).
- C++, which is the industry standard, but on which I have very limited experience. Also, I just didn't want to bother with the header files and the compilation stack.
I chose Go, and too be honest it is a choice that I now regret, but also I have to live with it because I cannot afford a rewrite at this point.
Go certainly had a lot of productivity benefits, but also major flaws when it comes to game development:
- The lack of packages related to data structures. In games, we need a lot of specific sets, trees, queues, tries and maps, but those are almost non existent in Go. The best one is "gods", which still does not support generics. Overall it is always difficult to find quality and experienced packages, even for broadly used and fundamental algorithms.
- The fact that dependency cycles are handled on a package basis, and not per-class or per-file. This is a major source of headaches for video games, because contrarily to web servers, there are not a limited number of predefined layers: everything needs to depend on almost everything else, and Go makes it even worse in this case.
- The lack of data structures is made even worse by the native map, because it forcefully randomizes the iteration order, which causes a lot of bugs and makes it unusable 90% of the time. The authors wanted to prevent people from using it as if the key order was guaranteed, but their fix also broke the natural consistency of iteration order. This means for example that the drawing order of objects is different every frame, even when the data didn't change at all.
- When it comes to modding, there are not much options, because Go does not have a very easy or natural compatibility with FFI (cgo is awkward to use, and not really usable with dynamic linking), the native plugin package is experimental (and not even working in windows), and the support for WebAssembly is still quite poor (but getting better).
comment 3y ago · link · parent
I know this story already, but as much as I can empathize with this since I am a developer myself, from a user point of view they destroyed the ecosystem that was their strength. When I said "bring back", I do not mean XUL as a technology, I mean the functionalities that the extensions could use.
I was on Firefox because it brought me something more, and because I appreciated it as it was. But now that they dumbed it down and made it like Google Chrome rather than focusing on their strengths, I do not have any good reason to use it. Because the many Chromium-based alternatives are better, more innovative, more reliable, and their UIs are stable and does not change every 6 months.
comment 3y ago · link · parent
But still, it's good to know that they finally brought back the extensions on Android. I gave up after waiting one year and a half, and TBH I don't know if I should trust them again to go back to it.
comment 3y ago · link · parent
Or maybe it's also the fault of Google if they suddenly broke all the old extensions and never honored their promise to bring their capabilities back. Or when they disabled the extensions on mobile and did not bring it back despite their promise. Or when they break the user's habits by doing a useless UI revamp every 6 month and ignore the community's feedback.
comment 3y ago · link · parent
You can disagree with me and criticize my points, but I do not feel like it's done in a good faith or is leading to anything constructive.
So I'm going to stop the discussion here and let the readers judge by themselves what I meant, and what to conclude about it.
comment 3y ago · link · parent
Even if sum types were introduced, it would not help with nil values because - as you said - backward compatibility won't be broken.
If I had the luxury of spare time to contribute, I would probably spend it switching away to another richer language instead, because it would be cheaper, solve more of my problems and with a higher degree of certainty. And that's not even mentioning the attitude and toxicity of the community compared to most of other languages facing critics and ideas.
comment 3y ago · link · parent
For example we could have a new non-nilable pointer type (that would not have any default value), or an optional monad natively in the language (or any other thing in-between, there are many possibilities). That would allow the compiler to statically report about missing checks, without breaking backward compatibility.
But we all know that it's not going to happen soon because while not breaking any existing code, it goes against the "everything has a zero-value" dogma. That was the meaning of my message.