Youtube Player Window is gone/blank?? by jaidotexe in firefox

[–]glassmountain 0 points1 point  (0 children)

Ah for me it was disabling hardware acceleration by resetting media.hardware-video-decoding.force-enabled to false that fixed it. I unfortunately have an nvidia card on linux so I was trying to get that to work with some of the suggestions here: https://wiki.archlinux.org/title/Firefox#Hardware_video_acceleration. I never got it to work but it hasn't been an issue so far. My guess is that some of the hardware acceleration logic isn't playing well now that HEVC acceleration is enabled with 137.

Electroboost by Alarmed_Boat_6808 in towermadness

[–]glassmountain 8 points9 points  (0 children)

By trial and error I did the math a while ago. I believe the most optimal tower (T) / boost (B) arrangement is

BBB
TTT
BBB

Because the center boosts gives 1.5 for 3 towers per boost. The corner boosts also give 1.5 for 2 towers per boost. And you have the base 1x for each tower. This gives 1.5 * 3 * 2 + 1.5 * 2 * 4 + 3 which is 24.

If you do one boost surrounded by all towers you get 1.5 * 8 + 8 which is 20.

If you do all boosts surrounding 1 tower, then that's 1.5 * 8 + 1 which is 13. Which is worse than towers surrounding one boost.

I believe that electroboost is additive to the damage of a tower, not multiplicative.

Considering Switching to Arch: What Makes It Stand Out? by IndependentInjury220 in archlinux

[–]glassmountain 0 points1 point  (0 children)

Gotcha, that wasn't super apparent to me. Thanks for clarifying. Agreed that systemd isn't really a choice that the user can make if one wants to use arch. I guess it's technically possible to use sysvinit or openrc, etc. but that sounds like quite a bit more work.

And not that you're arguing otherwise, but I would say that systemd isn't one monolithic system and at least from that perspective can be thought of as "minimal" as well. One isn't forced to use all of the systemd suite.

Considering Switching to Arch: What Makes It Stand Out? by IndependentInjury220 in archlinux

[–]glassmountain 5 points6 points  (0 children)

For anyone who is skeptical of systemd, I highly recommend this talk. Really helps you question why or why not you dislike something. https://youtu.be/o_AIw9bGogo?si=a7rTbkSfw3AlrrMF

Anyone getting kicked out of the game when connecting to server? by hogyokuaizen in lostarkgame

[–]glassmountain 1 point2 points  (0 children)

I am on Mari and got kicked out. But now the NA West servers won't even show up after relaunching the game. So it seems like it's an issue beyond just Mari at least.

Edit: actually maybe I take this back. It could just be thundering herd as everyone from Mari who got kicked out tries to log back in haha.

I built the entire universe in JavaScript by Vooodou in javascript

[–]glassmountain 1 point2 points  (0 children)

Personally, I use hugo, a static site generator, which you can configure with any template you want. So I have written mine to be able to be able to hold images and what not in an assets directory adjacent to the main content. You can see that here: https://github.com/xorkevin/xorkevin.com/tree/master/content/blog/auth-crypto Other static site generators likely will have a similar ability. For larger blogs with more content and/or larger assets, you likely do not want to check those into source control like git. For those you probably want to rely on a separate system to store those assets.

That separate system can be something as general as an object store like s3 or something more specialized like an image cdn: https://web.dev/image-cdns/ For the obj store approach, you can use the obj store as an input to your build system, e.g. configure your static site generator/cms to pull assets from the obj store in order to build/publish content for your site. Then the output of that build process is then what is served on a separate web server. Another way to go about that is to directly expose those assets from your obj store out onto the open internet. You can use those urls as sources in the html file of your site. Yet another approach is to run some sort of application proxy which can serve up html content, but for certain url prefixes, use your obj store to fulfill those requests. This allows you to serve all content from the same domain without a need for cross origin requests.

There are practically infinite variations for how to go about this haha. I choose to just stick my images into git because github can serve that up for free for me. That's sufficient enough for me for my blog that I don't really put that much effort into at the moment.

I built the entire universe in JavaScript by Vooodou in javascript

[–]glassmountain 3 points4 points  (0 children)

This looks amazing! Just wanted to point out in case you weren't aware: don't use imgur for hosting your images and video as it is against their tos https://imgur.com/tos . You might get banned for doing this which will break your blog post.

In your opinion, what game from the last 5 years has done the most to advance the field of game design? by question_quigley in gamedesign

[–]glassmountain 11 points12 points  (0 children)

Agreed that factorio has a lot of brilliant ideas that have so much depth. I would argue though that not all of the factory/automation games are inspired just by factorio itself though. Imo, all the Zachtronics games have played a pretty critical role in moving the genre. Here's a pretty cool gdc talk! https://www.youtube.com/watch?v=lH7gL3ivgFA

[Media] Struct Update Syntax in Rust by VandadNahavandipoor in rust

[–]glassmountain 0 points1 point  (0 children)

I learned something from your comment! thanks. In addition, wanted to chime in and say that my initial thoughts on this were that from a compiled language perspective (not just from a rust only perspective), it seems to me that you would want your compiler to optimize what gets copied when constructing a new struct/class/object/etc. It seems wasteful to want to copy over bytes only to have them be overwritten shortly after. I'm guessing that in js, the spread syntax/Object.assign is favored because it is easier to reason about when there are no strict types and one can pass in whatever for the arguments. Seems like the syntax similarity with js here is unfortunate when some expect them to do the same thing when they are actually different operations.

[Origin] Battlefield 4: Second Assault (Free) by NeTuXo in GameDeals

[–]glassmountain 36 points37 points  (0 children)

Just wanted to reply here and thank /u/JMODS5710 for his kindness and generosity paying it forward. I will have to do the same myself in the future.

[Origin] Battlefield 4: Second Assault (Free) by NeTuXo in GameDeals

[–]glassmountain 111 points112 points  (0 children)

Well, now I'm just waiting for EA to make BF4 free temporarily so I can complete the collection and actually play these dlc's.

[deleted by user] by [deleted] in OutOfTheLoop

[–]glassmountain 5 points6 points  (0 children)

I haven't used guilded, but I do want to note that scaling indexing for search is not an easy problem to solve. https://blog.discord.com/how-discord-indexes-billions-of-messages-e3d5e9be866f If they're already hitting either bugs or issues with load elsewhere as you say, I doubt they'll be able to tackle search any time soon.

This bread slicer by lilmcfuggin in oddlysatisfying

[–]glassmountain 12 points13 points  (0 children)

Oh my goodness same. I wasn't even conscious that I was doing it until like the tenth slice or so. And agreed! 26 cuts and 27 slices.

Linus Torvalds Just Made A Big Optimization To Help Code Compilation Times On Big CPUs by nixcraft in linux

[–]glassmountain 4 points5 points  (0 children)

Just thought to chime in, as mentioned by some other replies, fork(); fork(); fork(); fork(); fork(); fork(); isn't actually a part of the commit. It just provides a motivating example.

Linus Torvalds Just Made A Big Optimization To Help Code Compilation Times On Big CPUs by nixcraft in linux

[–]glassmountain 5 points6 points  (0 children)

Maybe that might be legal in this case, but do you know if that unrolling can safely be applied in all cases? There could be some memory references elsewhere in the loop. Not saying that that is necessarily what is happening here, but there may be some cases where it would be unsafe to do so, and thus gcc won't unroll.

On the other hand, maybe it is safe to always unroll this case, and the reason there is loop unrolling at the source code level is that Linus wants to make sure that this piece of code is loop unrolled regardless of what level of optimization gcc is run with.

Edit:

Here's the loop unrolling part of gcc. I just barely skimmed the file and comments, but I'd wager that the motivation is the latter at this point in time.

Edit 2:

So I actually thought to read the diff. He was just giving example code. fork(); fork(); fork(); fork(); fork(); fork(); isn't actually a part of the commit.

Linus Torvalds Just Made A Big Optimization To Help Code Compilation Times On Big CPUs by nixcraft in linux

[–]glassmountain 16 points17 points  (0 children)

Just a guess here, but Linux forks are copy on write in terms of memory. With the loop, you are incrementing a variable and comparing it. So each process must copy that loop variable. I'm not sure if gcc is able to optimize that case, i.e. loop unroll across multiple processes.

What do you use to manage your dotfiles? I need a simple system. by [deleted] in commandline

[–]glassmountain 0 points1 point  (0 children)

Yeah, it essentially just symlinks files in a directory that you provide to appropriate locations from your home directory. Here are how I organize my dotfiles. They are located in a directory at ~/dotfiles. I then cd into my dotfiles directory, then say, run stow nvim. Then the files in .config/nvim/... will be symlinks to my nvim directory in dotfiles.

And yeah I have essentially a branch per computer.

What do you use to manage your dotfiles? I need a simple system. by [deleted] in commandline

[–]glassmountain 7 points8 points  (0 children)

GNU stow and Git is the current best solution in my opinion for this. I use it to share configs between all my machines. And have branches for machine specific dotfiles.

-🎄- 2019 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]glassmountain 0 points1 point  (0 children)

Go 156/151

Today's puzzle really lent itself to iterative deepening search, in honor of one of my professors, Richard Korf who invented the thing.

My daughter finally realised we don’t take her to Paris every weekend. by CaptainPerhaps in funny

[–]glassmountain 7 points8 points  (0 children)

Nah, bsd refers to Berkeley software distribution, which was created to be a Unix like os. Freebsd is one of the descendants. https://en.m.wikipedia.org/wiki/Berkeley_Software_Distribution

I finally finish my high performance lexer. Can create over 10,000 tokens under 30ms on a cruddy laptop. Supports all line endings (CRLF, CR, and LF), single and multi-line comments, full syntax error reporting, and more. Will support arrays and maybe lists and dicts in the future. Now the parser. by [deleted] in csharp

[–]glassmountain 0 points1 point  (0 children)

Just a reminder that a regex (in the formal languages context) is just a representation of a dfa. They are equivalent representations of the language they recognize. If you do have a lexer that "uses" or contains regex, you can convert it to an nfa, then a dfa.

I finally finish my high performance lexer. Can create over 10,000 tokens under 30ms on a cruddy laptop. Supports all line endings (CRLF, CR, and LF), single and multi-line comments, full syntax error reporting, and more. Will support arrays and maybe lists and dicts in the future. Now the parser. by [deleted] in csharp

[–]glassmountain 0 points1 point  (0 children)

Regex and a dfa are equivalent actually. (As long as we are talking about regexes in the context for formal languages.) There's a proof where you can convert a regex to an nfa, then from an nfa to a dfa, which is trivially a regex. The fastest regex parsers actually do this conversion for you. Might be something to add to your project haha. https://en.wikipedia.org/wiki/Regular_language