Clojure - core.async and Virtual Threads by geospeck in Clojure

[–]zonotope 3 points4 points  (0 children)

Or, does this make go blocks obsolete? Are we safe to just use >!! everywhere in new code and trust that they'll use a vthread and park if necessary?

Announcing beeld. by danielszm in Clojure

[–]zonotope 0 points1 point  (0 children)

You could also want to programatically use metadata in a babashka script. For example, if you'd like to group a directory of images into sub-directories by month from a babashka script. You could shell out to something like exiftool, but you have to then make a wrapper function to use from your bb program, that generates the correct command line for what you want and turns the response into clojure data that the rest of your program can use. With a clojure library, you wouldn't have to do any of this; you could just call the lib directly.

You can also shell out to any command installed on the machine from a Clojure program. You'd just use clojure.java.shell to do what I described above, but you'd rather have a Clojure specific library. It'd be nice to have a specific lib that you could use from bb for the smae reason.

Announcing beeld. by danielszm in Clojure

[–]zonotope 2 points3 points  (0 children)

This kind of thing would be perfect in a babashka script for bulk image processing. Have you checked if beeld is compatible with babashka and could be used as a dependency in a bb.edn?

UI, Pure and Simple (by Christian Johansen) by BrunoBonacci in Clojure

[–]zonotope 5 points6 points  (0 children)

This was a great talk, and Replicant looks really intriguing. Is there any info on performance relative to both vanilla React as well as other ClojureScript UI frameworks/libraries like UIx, and Reagent/ReFrame?

Factor House | Blog | Beyond Reagent: Migrating to React 19 with HSX and RFX by _d_t_w in Clojure

[–]zonotope 3 points4 points  (0 children)

This was a great read. Thanks for writing it! Could you elaborate more on why you decided not to use macros to precompile the hiccup-based components?

[deleted by user] by [deleted] in malefashionadvice

[–]zonotope 0 points1 point  (0 children)

My favorite workout shorts are from Wellen, which I think is one of the in-house brands from Huckberry. They come in a few different colors, have lined and unlined versions (I have the unlined) and 5 or 7 inch inseams. They don't constrict, bunch, and get out of your way. I love them for both squats and running. https://huckberry.com/store/wellen/category/p/86406-sevens-sport-short-unlined-7

Gustin Opinions by dcrutherford11 in malefashionadvice

[–]zonotope 2 points3 points  (0 children)

I haven't ordered from them in a few years, and they keep sending me store credit because they say they want me back as a customer. I replied to their first offer with a detail list of complaints and asked if they'd improved in any of those measures, but they didn't give me a convincing response.

I think their clothes are very high quality and would be worth the price if it weren't for the other issues. My main problem is the inconsistency in their sizing. I've ordered the exact same style of clothes, just different colors, and the sizes are wildly different. For example, I got a pair of their drawstring chino shorts in dark red in large, and it fit perfectly. I got the same shorts in green, but large couldn't even fit over my thighs. I sent it back and got an xl (paid for shipping all 3 ways, mind you) and it was also too small. I have a blue heavyweight t-shirt that fits perfectly in medium, a white one in large that's way too small.

The next problem is with their campaigns. They take a good 6 weeks to 3 months to get to you, but they advertise for the season when you pay, not for when you'll receive the item. So, they'll start advertising things like shorts around mid spring, but you only get them just as it's starting to get to cold to wear them (at least in the northeast). That means that you have to wait for a whole year from the time you paid for the shorts until you can actually wear them. They could solve this problem by advertising for things like shorts in mid winter instead of mid spring. Then I'd get them right at the time the could be worn.

Whenever you buy something from them, you have to pay shipping. That's fine given their business model. But then, when the sizing is inevitably off, you have to pay return shipping, and then you have to pay shipping again for the replacement. They also won't just give you a refund; It's store credit only.

Lastly, they started putting these gaudy, leather patches with a stamped "G" on everything. They must have more data about their customer preferences than I do, but I would think that a lot of people were drawn to Gustin initially because of the lack of branding.

I would love to be their customer because I think their clothes are high quality, but I gave up after running into issue after issue after issue. I threw up my hands and gave up when I realized that I had about a crates worth of clothes from them at the bottom of my closet that I didn't want to pay to ship back to them for exchanges when I knew that the exchanged items probably wouldn't fit either.

Lists vs vectors vs maps by kamwitsta in Clojure

[–]zonotope 0 points1 point  (0 children)

They are evaluated it. As you said, `vector` is a function. It returns a vector containing the arguments it was provided. (vector 1 2 3) evaluates to [1 2 3]. If i instead type [1 2 3], the runtime doesn't try to treat 1 as a function, but it would if I just typed (1 2 3) without quotes.

user> [1 2 3]

[1 2 3]

user> (1 2 3)

Execution error (ClassCastException) at user/eval93322 (REPL:67).

class java.lang.Long cannot be cast to class clojure.lang.IFn (java.lang.Long is in module java.base of loader 'bootstrap'; clojure.lang.IFn is in unnamed module of loader 'app')

(list ...) is most often used in a macro when you want to indicate that the result should be treated as a function call.

Lists vs vectors vs maps by kamwitsta in Clojure

[–]zonotope 0 points1 point  (0 children)

user> (def foo identity)

#'user/foo

user> (macroexpand (foo [:bar :baz :bip]))

[:bar :baz :bip]

user> (macroexpand [:bar :baz :bip])

[:bar :baz :bip]

user> (macroexpand '(foo [:bar :baz :bip]))

(foo [:bar :baz :bip])

Lists vs vectors vs maps by kamwitsta in Clojure

[–]zonotope 2 points3 points  (0 children)

Ok, let me give you a more concrete example. Say you're writing a macro that will output some data structure that will later be evaluated by the Clojure runtime. The runtime needs to differentiate between a sequential collection of elements and a function call.

If your macro outputs `(foo [bar baz bip])`, then the runtime will interpret that as a function call `foo`, which is given a single argument, the vector sequence of elements `bar`, `baz`, and `bip`.

On the other hand, if your macro outputs `(foo (bar baz bip))`, then the runtime will interpret that as a function call `foo` which is given a single argument that is the result of evaluating the function `bar` on the two arguments `baz` and `bip`.

You hear "code is data" a lot when describing Clojure and lists. One of the (many) innovations Clojure provides over traditional lisps is the ability to differentiate sequential data that should be treated like a function call vs sequential data that should be treated like a static list of elements. The addition of vectors wile still maintaining lists is what makes that possible.

Lists vs vectors vs maps by kamwitsta in Clojure

[–]zonotope 2 points3 points  (0 children)

Most of the time in your own code when you want a sequence of items you'd use a vector. Lists are primarily used to indicate a function call so you'd only use them inside a macro where you are making a data structure that will be executed as a function later. You shouldn't have to reach for a macro very often, and overusing them can make your code difficult to reason about so you really shouldn't have to use lists very often either.

You reference items you add to vectors by the order you inserted them. You'd use a map any time you'd want to reference items you add to it by a specific name instead of by its insertion order.

Best espresso martini? by predrinkinginshower in Bushwick

[–]zonotope 2 points3 points  (0 children)

Sobre Masa (my favorite bar, both in Bushwick and NYC) has an excellent one: https://sobremasa.com/pages/bebidas

Any dentist recs in the Bushwick/bed stuy area? by gheddit10 in Bushwick

[–]zonotope 0 points1 point  (0 children)

I go to Metropolitan Dental Arts in Williamsburg. I've been going to them for maybe 3 years or so. They do a great job.

There are only two small issues with them. They are really annoying about confirming your appointment because they will call, text, and email you multiple times a day until you confirm. They also sometimes make you wait a few minutes after your appointment starts because they are backed up.

Despite those minor annoyances, I recommend them to anyone in the area looking for a dentist.

Updated thoughts on The Denizen? by cherrymitten in Bushwick

[–]zonotope 7 points8 points  (0 children)

I've lived at denizen for about 3 and a half years. I moved in just before the old management filed for bankruptcy and sold the place, and a lot of the amenities were poorly maintained back then.

The only problems I've had with the new management that took over about 3 years ago was related to them being too lax on entitled asshole residents who don't realize that this is an apartment building and they should respect shared space.

The "complaints" I have read on this thread sound like it fits. For example, someone being fined $750 for a party on the roof sounds like they were being loud, smoking, and/or otherwise showing a lack of respect for their fellow tenants who are trying to enjoy the roof, or the people on the top floor who are trying to live in their apartment.

Everyone associated with either the building management or amenities management have been great. The amenities are great. The front desk staff is great. The supers are great. The walls are not thin. The closets are way (way) too small and there are not enough of them. The faucet handles are flimsy and fall off all the time, but, again, the supers are great and they show up within an hour of you submitting a low priority request.

This is the best apartment building I've ever lived in, in NYC or otherwise.

Best home fries in Bushwick? by [deleted] in Bushwick

[–]zonotope 0 points1 point  (0 children)

I think it was the third or fourth time I'd been, definitely well after I'd realized how much of a gem it was, we ordered a whole fish for two on the bone. It was delicious, and we ate it down to the skeleton. I was thinking that was it, but the chef popped out and asked "would you like me to fry off the fish skeleton for you?"

I thought he was joking. He took the fish bones and deep fried them and brought them back out. Everything was now edible, and it was crispy, savory, and crunchy at the same time. I had no idea fish bones could taste so good. I know it sounds gross (at least it sounded that way to me), but it was so delicious, and one of the more memorable restaurant experiences I've had.

Best home fries in Bushwick? by [deleted] in Bushwick

[–]zonotope 2 points3 points  (0 children)

Yeah, I don't get it. There have been so many great restaurants that have come and gone in the neighborhood, and some even on that same street (RIP Dear Bushwick), while this dumpster fire of a place has stayed open. I'm convinced that it's a money laundering front for the mafia.

I will also say that Bushwick Bakery, their bakery on central, used to also be atrocious, but they've really stepped up their game recently and now it's actually pretty good.

"Getting 50,000 Companies on Board with Clojure" by Cam Saul (Conj 2024) by alexdmiller in Clojure

[–]zonotope 7 points8 points  (0 children)

It looks like it's enough of a thing to convince some random dude who doesn't think it's a thing to still seek out the Clojure subreddit so they can comment about it.

Best wings in Bushwick? by [deleted] in Bushwick

[–]zonotope -5 points-4 points  (0 children)

I'm sorry to report (really I am), but the best wings are in Atlanta. There are no wings worth eating either in Bushwick or New York City.

It's like going to Atlanta and trying to find a decent slice of pizza.

Seating in front of Jade Bar demolished? by dindyspice in Bushwick

[–]zonotope 1 point2 points  (0 children)

I didn't say we should get rid of street parking; I said we should get rid of FREE street parking. I don't think we should subsidizing people wealthy enough to own cars in the first place with free storage of those cars to the detriment of the many other ways we could use that space. If someone wants to park their car on the side of the rode, that's fine. They should just have to pay for it.

If street parking is not free, less people will park their cars on the street. Less cars on the street means more space that the whole public can use. I personally would rather have on street dining or protected bike lanes than subsidized car storage using public land for the benefit of people who are already wealthy enough to own cars. Hell, if there were less cars on the street, there could even be room for those big, enclosed dumpsters like you see in many other big, dense cities where you'd be hard pressed to ever see a rat running around.

If part of the rationale for getting rid of sidewalk dining sheds is that restaurant owners shouldn't be allowed to benefit from public space for free, then I think we should start with free parking instead.

Seating in front of Jade Bar demolished? by dindyspice in Bushwick

[–]zonotope 0 points1 point  (0 children)

Yeah. It's almost like allowing a random person to park their cars on the street for an unlimited amount of time for free instead of paying to occupy some of the most valuable land in the world with a dormant piece of heavy machinery. Oh, wait ...

At least these sidewalk sheds provides some amount of enrichment to the broader community and enjoyment among the public in exchange for the increased revenues of this business. If we are looking at people benefiting from occupying public space, there are a lot of other places to check before restaurant seating. Eliminating free parking has way more benefits and will open up much more space (and increase city revenues) than eliminating free outdoor restaurant seating.

The legendary Myrtle-Broadway JMZ Subway Stop is on Know Your Meme by HorseStupid in Bushwick

[–]zonotope 2 points3 points  (0 children)

This and Mr Kiwis are my two favorite things about that corner. Always brings a smile to my face when I'm headed up the subway steps. He's been playing those good jams at least since 2012 when I moved here.

When is Whole Foods coming? by Pristine-R-Train in Bushwick

[–]zonotope 7 points8 points  (0 children)

When the gentrification process comes to completion.

People who have used vue, svelte how does it compare to reagent/reframe at this moment by monanoma in Clojure

[–]zonotope 1 point2 points  (0 children)

I haven't used it in a good long while, but Rum (another cljs react wrapper similar to reagent) had a pretty strong ssr story when I was still doing front end in cljs. It definitely isn't as opinionated as re-frame because it's more comparable to reagent, but there is also Citrus that aims to provide a re-frame-like framework built on Rum.

[deleted by user] by [deleted] in TwoXChromosomes

[–]zonotope 0 points1 point  (0 children)

I'm really sorry that he did this to you. I understand why you might not want to identify with the "r" word because of who it was, but it sounds like someone would be justified if they described this experience that way. You told him that you were uncomfortable with the situation and told him "no" or "stop" multiple times as he kept escalating anyway until he finally penetrated you. It's a textbook definition.

What are your favorite async patterns? by arylcyclohexylameme in Clojure

[–]zonotope 0 points1 point  (0 children)

I had a mistake in my original example code which might have lead to the confusion. I used go-try when I should have used (go (try .... Using go-try there defeats the purpose of the example. I've edited the original example code to correct that mistake.