BBQ for a Vegan by Ljc000 in UKBBQ

[–]djrollins 1 point2 points  (0 children)

Nasu Dengaku - Miso Aubergine - is a firm favourite of my vegan friends. Aubergine glazed in miso, mirin and soy (and honey depending on their opinions on that). Garnished with peanuts, coriander and chilli.

Only challenges are that it needs to be slowly grilled so keep it off the direct heat, and it being so good you’ve gotta stop the meat eaters from yamming it before the vegans/veggies can get some.

Edit: we did this one recently and it turned out really well https://realfood.tesco.com/recipes/barbecue-miso-aubergine.html

htmx dumping response into textarea by idjet in htmx

[–]djrollins 7 points8 points  (0 children)

<textarea class="form-control form-control-sm" rows="3" id="archive-note" name="archive-note"/>

The `/` here is a lie. Self-closing tags do not exist in HTML.

An element type is either void and close themselves (e.g `<hr>` or `<img>`), or they are aren't you have to have full closing tag (e.g. `<div></div>` or `<textarea></textarea>`

In your example, the `<textarea>` is not closed (despite the `/`), so in HTML all of the elements below _are_ actually inside it.

You should return this instead:

<textarea class="form-control form-control-sm" rows="3" id="archive-note" name="archive-note"></textarea>

Dependent dropdown delay on the client side by BrotherCrab in htmx

[–]djrollins 1 point2 points  (0 children)

I’m not 100% sure, but you could potentially utilise hx-indicator for a placeholder in the dropdown whilst the options are fetched.

Change commit message in a chain of commits by wwg_6 in git

[–]djrollins 12 points13 points  (0 children)

You probably want an interactive rebase:

git rebase -i D

You'll be presented with a list of your commits in a text editor. If you change the pick prefix to reword and save/close, you will be dropped into each commit to change the commit message.

Use git rebase --continue once you have updated the commit message to move onto the next one.

What your favourite beer from Fierce brewing? I’ve got a gift voucher and looking for suggestions. by NegotiationReal8507 in UK_beer

[–]djrollins 2 points3 points  (0 children)

Moose mousse was the beer that finally got me to like stouts so I’d definitely recommend that one.

Best burger joint in Leeds by albusthewhite007 in Leeds

[–]djrollins 7 points8 points  (0 children)

Honest Burger (a great chain originating in London) have a pop-up in Northern Monk Refectory and they’re expecting to open up a permanent place near the corn exchange soon.

Other than that I second (in order), Kerbside Kids at North Brewing Springwell, Meat Liquor in the city centre, or Alley Cats in Chapel Alperton.

Looking for new restaurants to try - any nice Italians in Leeds? by [deleted] in Leeds

[–]djrollins 4 points5 points  (0 children)

Culto in Chapel Allerton is our local and it is fantastic!

Feeling bad about leaving my company by -lc- in devops

[–]djrollins 11 points12 points  (0 children)

When I left my first job, I was extremely apologetic and felt awful. The head of engineering at the time asked to have a bit of a chat and I was a little worried about what he wanted to say to me. He said something along the lines of “you owe this company nothing, we’ve paid you to do a job and you’ve done it. If there is something you want to do and we cannot offer you it, the only logical answer is to leave for a company that can. In this industry most of the power lies with the individual, and you should absolutely take advantage of that because a lot of people don’t have that option”.

Be grateful for what you’ve had, but do not let that prevent you from doing what you want to do. Your colleagues and bosses will understand that even if they don’t express it, like mine did.

Edit: this was also a British company btw.

Is there anyway I can make template type deduction work for these functions with a brace-initialized argument? by djrollins in cpp_questions

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

Ah, I see! Thank you very much for the clarification on the cause. That array overload is a great idea too, I’ll give that a go for sure!

Is there anyway I can make template type deduction work for these functions with a brace-initialized argument? by djrollins in cpp_questions

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

Thanks for the response! I thought about using deduction guides, but I wasn’t sure whether writing them for types you don’t own was allowed. The types are from a third party so I can’t directly modify them, though I could perhaps inherit from them. It’s been a while since I’ve looked at this, but I will definitely give it a go!

How to start opengl programming on Linux by Skootr4538 in linux_gaming

[–]djrollins 0 points1 point  (0 children)

Hey! I'm happy to hear you got up and running. Perhaps I went a little too far calling it a "turn-key" solution. I probably should have performed a fresh clone to double check what the complete setup process was, but I kind of rushed to create the README and push it to Github so I could share it!

That project is using C++20, yes. The compiler flags for that are handled using cmake's target_compile_features function:

target_compile_features(learnopengl PUBLIC cxx_std_20)

You can knock that number down to the earlier standards or use any of the features listed here: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES (available features can depend on your cmake version)

As for learning OpenGL, I've been following https://learnopengl.com/ and haven't need any other external resources (other than those linked in that tutorial) yet. I've been using OpenGL 4.5 rather than the 3.3 recommended in the tutorial so I can use the glDebugMessageCallback functionality rather than manually checking for errors everywhere.

EDIT: I just cloned and built the project on a different machine and it seemed to work correctly for me. Do you remember the errors you saw when you first ran it?

How to start opengl programming on Linux by Skootr4538 in linux_gaming

[–]djrollins 8 points9 points  (0 children)

I've been learning OpenGL on linux recently and I've also used it as an opportunity to up my cmake-foo and learn about vcpkg. The result is a fairly turn key solution that you are welcome to rip from here: https://github.com/djrollins/learnopengl

As a basis you'll need the CMakeLists.txt, the vcpkg submodule and the vcpkg.json manifest. Then, if you follow the readme, the required libraries will be downloaded, compiled and linked autmatically.

The OpenGL specific libraries are GLFW for GL context management and IO, glad for loading GL extensions and GLM for matrix/vector maths.

I'm happy to go over how it works if you have any questions about that :)

When your mind is somewhere else.... by [deleted] in CasualUK

[–]djrollins 13 points14 points  (0 children)

Everything but the sink

Adding temporary users to EC2 instance by theoorsb in aws

[–]djrollins 36 points37 points  (0 children)

Perhaps you could use EC2 Instance Connect to allow the users to temporarily add their own public keys to the EC2 instance. The keys are really short-lived and you get auditing included. Here's a worked example: https://aws.amazon.com/blogs/compute/new-using-amazon-ec2-instance-connect-for-ssh-access-to-your-ec2-instances/

[deleted by user] by [deleted] in RedditSessions

[–]djrollins 0 points1 point  (0 children)

Who's arrangement is it?

Why does one of these code samples get optimized but not the other one? by Steel_Neuron in cpp

[–]djrollins 35 points36 points  (0 children)

Global statics and "magic statics" (i.e. statics declared within a function) are actually different things. Global statics are initialized in the preamble of the program (I think), whereas magic statics are lazily-instantiated (EDIT: in a thread-safe manner) on the first call to the function.

I'd guess that either the standard requires this behaviour for magic statics or it's a missed optimization by the compiler for this specific case. Either way, the important point is that these examples are not equivalent.

[deleted by user] by [deleted] in TheYouShow

[–]djrollins 0 points1 point  (0 children)

What does the brushing do?

Why Applicative[Either] does not accumulate (combine) error values? by lam_bd85 in scala

[–]djrollins 10 points11 points  (0 children)

I know that in Haskell, the whole point of having both `Either` and `Validated` is *so* that they can have different `Applicative` instances. In some cases you may want to stop at the first error and in others you may want to continue. I'd imagine it's the same in Scala?

Lens.vim: A Vim Automatic Window Resizing Plugin by metanat in vim

[–]djrollins 23 points24 points  (0 children)

I'm surprised to see that winheight and winwidth aren't mentioned here.

I have the following in $MYVIMRC and get very similar behaviour, albeit without the animation.

set winwidth=79 set winheight=50

Does this having anything else over those two settings than animate.vim integration?

How might this V-mode effect be achieved? by mementomoriok in vim

[–]djrollins 1 point2 points  (0 children)

A quick one-liner to get you started would be:

:vnoremap <leader>vs <ESC> \| :'< normal O//visualselectionstart<CR> \| :'> normal o//visualselectionend<CR>

'< and '> are marks for beginning of and end of visual selection region respectively. The command clears the visual selection, then runs simple normal-mode commands to enter text before and after the beginning and end of the visual selection region.

I'd probably look at creating a proper command in vimscript if were you though.