Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
MrQueasy
Nov 15, 2005

Probiot-ICK

fart simpson posted:

i really like haskell again

Haskell’s type system makes me angry about the java I have to write for my day job.

Adbot
ADBOT LOVES YOU

MrQueasy
Nov 15, 2005

Probiot-ICK

Bloody posted:

what are linear types

it allows you to create things that are guaranteed to be used once and only once

MrQueasy
Nov 15, 2005

Probiot-ICK

Asleep Style posted:

the consultant delivered an EAR file

Can you unzip it and try deploying just its contents?

I'm not sure if that's helpful... I see EAR files mentioned and I think about JBoss and Tomcat and the fun our red team had running their tools against those old pre-Java8 machines that somehow were still being deployed.

MrQueasy
Nov 15, 2005

Probiot-ICK

Asleep Style posted:

so this has been resolved now. as it turns out, we had provisioned a new app server last week because the recommended specs for this POS were too low and it was crawling. firing up the old app server and bouncing jboss on it was enough to update the timestamp in the db

you should bounce jboss directly into the trash

MrQueasy
Nov 15, 2005

Probiot-ICK

hbag posted:

why the gently caress did nobody tell me about pyenv sooner
this poo poo's great

If you want the single tool, plugin-for-different languages version: https://asdf-vm.com/

I'm not sure I want to switch over to this, as I only use multiple python versions right now...

E: Dang... beat

MrQueasy
Nov 15, 2005

Probiot-ICK

Bored Online posted:

srs question why use scala now that there is kotlin in any new project

MrQueasy
Nov 15, 2005

Probiot-ICK
More [JIRA/Jenkins] plugins for the plugins god!

MrQueasy
Nov 15, 2005

Probiot-ICK
the more I’ve read xp and post-scrum agile thinkpieces, the more I’m convinced that standups are only useful to show that your team’s communication is bad.

If you are only talking to your coworkers about blockers in standup, then why not talk to them more? why are you on a team if all of your work is solo?

If you don’t know what your engineers are working on, you’re not talking to them enough or you’re not reading the task list. why not just have them email you a status update?

If you are going more than a few days between committing something to trunk, then your sizing needs to be fixed. (my favorite places to work had all figured out how to chop things down so most stories/tickets came out around the same size)

MrQueasy
Nov 15, 2005

Probiot-ICK

Ocean of Milk posted:

It's feels untypically unprecise for mathematics that logarithms are so rarely written out with the base. Like supposedly in these CS type questions with binary search and stuff, it's usually 2, right? Aren't you supposed to write "log2 n" then? In other cases it's e (in which case you're supposed to write ln instead of loge, at least that's what I've been taught) and sometimes it is in fact 10 (which is supposed to be the default, i.e. if you don't write the base I assume it's 10)

IIRC (which I probably don't) when you're talking about generalized equations, log_x(n) is the same as log_y(n) / log_y(x)... so you can kind of abstract x out a bit.

MrQueasy
Nov 15, 2005

Probiot-ICK

Share Bear posted:

expressive typing shall save the day! *names functions filter1 filter2 filter3 and filter4*

note: i do not know or understand haskell

Well, obviously. You would have found a way to generalize something and then it would just be f

MrQueasy
Nov 15, 2005

Probiot-ICK

Boiled Water posted:

do one thing well
The masses demand boatcar.

MrQueasy
Nov 15, 2005

Probiot-ICK

Share Bear posted:

this is related to the current discussion and from a couple of pages back

WHY is that the standard? how did we get here? can we do better?

i think this all the time about all the jargons/conventions we use for stuff. in practice, i do whatever the group i'm working with is doing.

but postin ain't praxis boyyyy

I dunno, I think <K,V> is pretty safe when talking about dictionary structures. Dictionaries always have a key and a value. If it's truly generic, then something more complicated than K+V shouldn't really be necessary. The whole point of a "generic" is that it doesn't matter.

Now... for Java Fuckery... like

public interface EnumerableAssert<SELF extends EnumerableAssert<SELF, ELEMENT>, ELEMENT> {
(from AssertJ) then yes, please add an exception to your style checker for these non-single letter type template thingies.

Even guido got something right: A Foolish Consistency is the Hobgoblin of Little Minds (from pep8)

MrQueasy fucked around with this message at 18:13 on Jun 8, 2021

MrQueasy
Nov 15, 2005

Probiot-ICK

Corla Plankun posted:

how do you guys feel about the new walrus operator?

when it's useful, it's really useful. Those times are vanishingly rare in python though... especially with its already loose idea of scope.

MrQueasy
Nov 15, 2005

Probiot-ICK

fart simpson posted:

what’s the walrus operator

assignment expression

(x := 3) returns the value of x when it resolves.

MrQueasy
Nov 15, 2005

Probiot-ICK

fart simpson posted:

so it’s just a way to do variable assignment as an expression rather than as a statement?

Yes.

It's more useful in languages with strong scoping, but it lets you eliminate some nested ifs so I think it's nice, but most of the time in python it just highlights some tortured logic that needs refactoring anyway.

MrQueasy
Nov 15, 2005

Probiot-ICK

Ocean of Milk posted:

I just stumbled upon this at work:

code:
public abstract class AbstractIterableAssert<SELF extends AbstractIterableAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>,
                                             ACTUAL extends Iterable<? extends ELEMENT>,
                                             ELEMENT,
                                             ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>>
       extends AbstractAssert<SELF, ACTUAL>
       implements ObjectEnumerableAssert<SELF, ELEMENT> 
:psyduck:

(tbf, they documented it)

The Generics abuse by the AssertJ is nothing short of miraculous. It’s only tolerable/usable because their documentation practice is one of the best I’ve seen in Java land.

And it keeps them from having to use reflection/bytecode shenanigans more than they already do.

MrQueasy
Nov 15, 2005

Probiot-ICK

Sapozhnik posted:

Disagree because identifiers following the latter convention sort better

Look at this doofus not putting all his interfaces into a completely separate module so the sorting is hosed up no matter what you do.

MrQueasy
Nov 15, 2005

Probiot-ICK

Presto posted:

C++20 has the UFO operator <=>

Amateur hour.

Haskell has an owl combinator that looks like a topless woman wearing a necklace.

((.)$(.))

MrQueasy
Nov 15, 2005

Probiot-ICK
IME it's not the testing tools. It's the lovely legacy DI frameworks.

MrQueasy
Nov 15, 2005

Probiot-ICK

Jabor posted:

This improves your compile times since you can compile a bunch more stuff totally in parallel (perhaps even on different computers entirely) instead of requiring information from the compilation of B to be present when you're compiling A.

Why are you building on toasters? It doesn't matter how fast compile goes because I have to wait for our terrible integration tests that someone has mistaken for unit tests to finish anyway.

MrQueasy
Nov 15, 2005

Probiot-ICK

raminasi posted:


all of this applies 100% when there's no di framework involved, legacy or otherwise


I generally don’t have a problem with testing tools and only working with Foo, and not both Foo and it’s interface. Mocking is generally a smell, so stubbing via something like Mockito works 99% of the time without having to create arbitrary interfaces to provide a shim for a proper mock.

My DI comment was targeted more at some legacy/homegrown frameworks requiring interfaces for injection. Modern magic/annotations like Spring just kinda handles it for you.

MrQueasy
Nov 15, 2005

Probiot-ICK

Chalks posted:

increasing the complexity of your code "just in case" is the worst - even when it occasionally turns out to be useful and saves you some time, you already wasted far more time than you saved scattering 1000 other "just in case" complications throughout the rest of the code.

the best code is the code you decided not to write

This is the most secure and bug-free code I've ever seen. https://github.com/kelseyhightower/nocode

MrQueasy
Nov 15, 2005

Probiot-ICK

men with puns posted:

that's cool. maybe some day it'll click for me

The problem is, once you understand monads, you become incapable of explaining them properly.

Haskell as a language is kindof like that, but on a larger scale.

MrQueasy
Nov 15, 2005

Probiot-ICK

DELETE CASCADE posted:

type systems help eliminate common bugs, but i don't see what category theory has to do with that

A type is a category, OP.

MrQueasy
Nov 15, 2005

Probiot-ICK

animist posted:

lisps are what happen when epic "gifted burnout kids" get bored of writing parsers and start thinking dangerously laterally

you can intuitively know this, but never really know it until you’re staring down a macro that writes macros.

kind of like when people tell soon-to-be parents that “lol rip your sleep”, but until you have a kid you don’t realize the depth of it… not exactly.

MrQueasy
Nov 15, 2005

Probiot-ICK

DELETE CASCADE posted:

ok but who cares? my dick is a category. how does this help me?

your dick can’t help anyone, much less you

MrQueasy
Nov 15, 2005

Probiot-ICK
this is the page where we talk about Malbolge

MrQueasy
Nov 15, 2005

Probiot-ICK

none of these people have worked here since 2017.

MrQueasy
Nov 15, 2005

Probiot-ICK
for python scripts, I tend to just use https://www.gnu.org/software/parallel/ to do the conncurrency

MrQueasy
Nov 15, 2005

Probiot-ICK

shoeberto posted:

I'm not really sure what it's doing, it seems to get blocked randomly when there are no resources being used, either on the DB or disk IO. I'm still just playing with it though. We've used this pattern with PHP code before without much trouble so part of me expected it to just work.

It takes 7 hours to fully run, it's going to be run routinely, and each work set really is independent. It's not 100% necessary but it would be nice. I'm not going to sink a ton of time into it though.

I've done a less sophisticated version of this previously with wrapping Python scriprs, but I was hoping to do it from within the code itself rather than just wrapping. We have some workflow infrastructure built on this project now so doing Bash-y type process management isn't really a "clean" solution (even if it would get the job done)

Could you leverage something like AWS Lambda or Batch/ECS to split up the work more?

MrQueasy
Nov 15, 2005

Probiot-ICK

Sapozhnik posted:

Imagine writing new software in python. lol. also lmao.

If you don't write it in python, you have to write it in Java.

Java 6.

MrQueasy
Nov 15, 2005

Probiot-ICK

pokeyman posted:

can I have mypy?

if no, java 6 sounds fine

No, only jython.

MrQueasy
Nov 15, 2005

Probiot-ICK

Soricidus posted:

oh well in that case it’s fine, jython is the one python implementation that is actually capable of running two threads at once

god drat it... all I've got left to break your enthusiasm is that you have to use Dr. Java as your ide.

MrQueasy
Nov 15, 2005

Probiot-ICK

Sleng Teng posted:

How, uh, do they answer that question exactly, I have been so far been spared interviewing candidates in depth

A data structure is a structure for data. QED.

MrQueasy
Nov 15, 2005

Probiot-ICK

Shaggar posted:

holy gently caress who is using ruby in 2021?

Metasploit devs who find go too hard.

MrQueasy
Nov 15, 2005

Probiot-ICK

MrMoo posted:

I’ve been trying to package Python “virtual environments” inside a Debian package as part of a multi-lingual app. Turns out people like to jump on a very high horse and shout “Why! That is not the Python way.” I am not a fan of the Python way, and hence wanting to hide away in a package.

oof I feel this. I'm not even trying to VENV anything and I'm having trouble finding good examples of "proper" python deb packaging.

MrQueasy
Nov 15, 2005

Probiot-ICK

any smaller, and people might make comments

MrQueasy
Nov 15, 2005

Probiot-ICK

Soricidus posted:

build tools written in java can be good, like maven.

Poe's law.

MrQueasy
Nov 15, 2005

Probiot-ICK
Started looking at a ruby codebase after living in java/pythonland... now I'm sad.

like what the poo poo is

Ruby code:
response = Net::HTTP.start(host, port, use_ssl: true) |http|
  request = Net::HTTPPost(path, 'Cookie' => cookie)
  request.body = { content: contents }.to_json
  http.request request
end
I mean, granted, corelib java and python for this ALSO suck... but come on

Adbot
ADBOT LOVES YOU

MrQueasy
Nov 15, 2005

Probiot-ICK

pokeyman posted:

what part(s) do you object to?

having to set 'use_ssl', having to do this in a bunch of individual lines... mainly I just like complaining.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply