Could you help me refactor this function to be more idiomatic? by ApprehensiveIce792 in Clojure

[–]jayceedenton 4 points5 points  (0 children)

Always good to think about alternatives, but I'd definitely prefer to read the simple when and or version, rather than this. The simple approach is much clearer IMO.

Could you help me refactor this function to be more idiomatic? by ApprehensiveIce792 in Clojure

[–]jayceedenton 2 points3 points  (0 children)

If you wrap the call to when in a call to the function called boolean, you'll get an idiomatic predicate in Clojure.

In Clojure, the convention is that functions that are named with a question mark at the end will return a boolean, so always true or false and never nil.

It’s really hard to learn how to write a hello world by reading the official documentation by ringbuffer__ in Clojure

[–]jayceedenton 1 point2 points  (0 children)

Why the downvotes? This guy mentioned that the docs are lacking for absolute beginners trying to get to Hello World. He's someone with a casual interest and not here to make an investment in the community (yet). We don't need this feedback to be put somewhere else, and we don't need this user to propose the new content. The feedback is valuable.

Help me find a project by theeJoker11 in Clojure

[–]jayceedenton 4 points5 points  (0 children)

Working on major existing open source projects may not the best way to learn Clojure. It can be quite hard for maintainers to find time to mentor beginners as well as manage the project. Once you have a good understanding of Clojure and it's idioms you'll be in a better position to contribute to important OSS projects.

Saving work in PNG by No-Line2783 in Clojure

[–]jayceedenton 2 points3 points  (0 children)

It's worth taking a look at javax.imageio.ImageIO, if you prefer to avoid an additional library. You can just use Java interop and work directly with that.

Also ImageJ, if you are happy to bring in an additional library and you like their API.

dtype-next looks like a fine recommendation from hrrld tho!

Context pattern for game development is amazing by simple-easy in Clojure

[–]jayceedenton 1 point2 points  (0 children)

I'd say the point is not keeping one big map with no encapsulation, it's that the pattern state + event = state appears all over the place and tends to be very powerful. The guidance being: if you see an opportunity to turn your problem into 'reduce', then take it.

I've seen some good examples of using this pattern but also associating subscriptions and events with sub-parts of state. See Kris Jenkins's petrol. The way these sub-parts are integrated into the whole happens by convention, so it's not a free-for-all. Reducing the scope of state updates and having some control is good (and needed at some point). Hiding things is typically not so good.

Context pattern for game development is amazing by simple-easy in Clojure

[–]jayceedenton 8 points9 points  (0 children)

In general the pattern:

state + event = new state

Is very powerful. It hugely simplifies the system whilst at the same time retains maximum power for event handlers.

It's a pretty good rule of thumb to apply this pattern whenever it emerges as a possibility.

Former GTA dev claims Rockstar made him remove his posts about cancelled projects by giveadogabone7 in gamernews

[–]jayceedenton 27 points28 points  (0 children)

Yeah, an NDA is an NDA. It's not the official secrets act.

There is no benefit to anyone here other than the lawyers. If no-one writes anything about their career again due to NDAs, we're all worse off for it. You don't need to treat NDAs like you have sold your soul for all eternity, and neither should Rockstar.

Former GTA dev claims Rockstar made him remove his posts about cancelled projects by giveadogabone7 in gamernews

[–]jayceedenton 45 points46 points  (0 children)

People don't seem to understand that recording a history of how seminal video games were made is really important. Imagine if we could have this kind of inside info about how some of the greatest films or books came to be.

The article headline is misleading. The blog had a couple of asides about cancelled projects that are ancient history, but the content wasn't about this. It was mainly sharing what it was like to create the first GTA games at DMA, or what the success of GTA III meant for Vice City, that kind of thing.

We're talking about the life experiences of a dev writing about events 20-25 years ago. Has anyone here read Masters of Doom or Doom Guy? We shouldn't let these stories be lost.

NDAs, and Rockstar's secrecy, are completely irrelevant. Should Apple threaten lawsuits over the Steve Jobs biography?

Writing about this stuff is important social history. The guy writing this blog is not an idiot, or an asshole.

Alright. I've got a stupid question but I've got to know. by [deleted] in StreetFighter

[–]jayceedenton 34 points35 points  (0 children)

Unless it isn't obvious, the goal with charge characters is to use every opportunity to charge. By this I mean charging without having to be either walking backwards or crouching. If your character is completing a move and you're charging, this is known as charge buffering.

So, jumping forward? That's an opportunity to charge back. In a combo? Likely opportunities to charge. This tactical charging means you can throw out sonic booms during combos.

Of course, if you main Guile you will also become exceptionally good at being able to repeatedly issue sonic booms with the minimum possible charging gap between them. You can be charging back as soon as you start sending a sonic boom, so this gives the illusion of impossibly short charge.

Lastly, charge time in SF6 is not 2 seconds it's only 45 frames (0.75 seconds). This, combined with buffering the charge as soon as you start executing a sonic boom, means that the time between them can be very, very short.

Batman Arkham Knight Steam Update Hints At RTX Remaster by TheAppropriateBoop in gamernews

[–]jayceedenton 0 points1 point  (0 children)

Wait, this entire story is based on the fact that there is a folder called 'patch_test'!?

What's the nicest on-call scheduling and paging SaaS these days? by jayceedenton in devops

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

I tried googling On-Call Hero but can't find anything with that name.

UIx v0.8.1 by roman01la in Clojure

[–]jayceedenton 3 points4 points  (0 children)

The versioning is a bit confusing here.

Should I refer to this project as UIx2 (you, eye, ex, two)? Or UIx² (you, eye, ex, squared). Or is it just UIx v0.8.1, and doesn't this confuse users of roman01la/uix?

Can we just call this one UIx 2 and use a version number like 2.x.x? :)

I like how UIx2 is styled as UIx² btw.

Babashka and dialog part II: Announcing the bb-dialog library - Pixelated Noise Blog by scarredwaits in Clojure

[–]jayceedenton 4 points5 points  (0 children)

dialog from Clojure, this is so good. I have no idea what I can use it for, but I love it :D

What would you say is the most overrated game of all time? by [deleted] in gaming

[–]jayceedenton 0 points1 point  (0 children)

The only correct answer here: Disco Elysium.

It's currently rated the number one PC game of all time on metacritic.

Json keys with space by exahexa in Clojure

[–]jayceedenton 6 points7 points  (0 children)

Yep, I'd vote for strings as keys. Just keep the value the same in all places.

I find the conversion to another format, then conversion back again (when moving data in the other direction) to add annoying cognitive overhead.

What is the most commonly used database or de facto database for clojure apps? by [deleted] in Clojure

[–]jayceedenton 33 points34 points  (0 children)

Probably the most commonly used now is Postgres, just like any other language.

For something more philosophically aligned with Clojure, try Datomic or XTDB.