Better HN
topnewbestaskshowjobs
Log inSign up

codesnik

1,035 karma · joined Mar 11, 2009 (17y ago) · 494 submissions

Submissions

comment 11mo ago · link · parent

this is what I don't understand, why is it useless? there're multiple variants, vaccination could create reaction to a different part of the virus, etc.

comment 11mo ago · link · parent

This is my biggest irk about Sorbet: because its signatures are wordy and because it can't infer the generic type of a private method, it slightly pushes you towards NOT extracting helper methods if they are going to be 2-5 lines. With Sorbet annotation, it'd easily become 10 lines. So it pushes towards bigger methods, and those are not always readable.

If only private methods would be allowed not having typing at all (with a promise of not being used in subclasses, for example), and Sorbet would be used mostly on the public surface of classes, it'd be much more tolerable for me.

comment 11mo ago · link · parent

eh, it's just a little celebration. Let Matz have it.

comment 11mo ago · link · parent

from what I understand, ruby::Box has nothing to do with GIL. At least, not yet.

comment 11mo ago · link · parent

I only have it when iphone simulator is running and using the same audio output.

comment 1y ago · link · parent

And earth contains so much of heavier elements.

comment 1y ago · link · parent

I think idea was that fungi for some time couldn't consume lignin in fallen trees.

comment 1y ago · link · parent

I kinda feel that singly linked lists isn't a data structure in FP as much as a (dynamic) control flow structure. It's okay in that application.

comment 1y ago · link · parent

interesting. how named arguments work with currying?

comment 1y ago · link · parent

this is very unnecessary. Arrays and maps transformations are really easy and concise in core ruby already, one line of map, to_h or whatever.

comment 1y ago · link · parent

Well, erlang and elixir operate on almost exclusively immutable data, in addition to message passing between "processes". They are more strict than most other languages in that regard.

comment 1y ago · link · parent

or wifi toggle-toggle!

comment 1y ago · link · parent

it's an .oh-my-zsh thing (~/.oh-my-zsh/lib/functions.zsh) but thanks, I didn't know about it.

comment 1y ago · link · parent

problem is not with ifTrue, and not with it's performance, it's easy to do. it is "ifTrue:ifFalse:"

also it is common to do assignments in the "if", and with actual method and blocks scope of the introduced variable would be different and everyone would be tripping on it all the time.

comment 1y ago · link · parent

basically it's because of "else" and "elsif". While ".each" works the same as "for .. in ...; end", it's harder to do "if else" as method which will also return value of the block inside the branch. Smalltalk can do it because "ifTrue:ifFalse:" is _one_ message, ruby didn't go that way syntactically.

comment 1y ago · link · parent

jq allows to covert normal json document to jsonlines and back, though it does it much faster if it can slurp an original doc into memory (no --stream option)

comment 1y ago · link · parent

I waited for this as the more or less easiest option to regain back some trust. Benevolent leaders still keep many communities together.

comment 1y ago · link · parent

I can't imagine a usecase. Ok, you receive incremental updates, which could be useful, but how to find out that json object is actually received in full already?

comment 1y ago · link · parent

ah, of course it have been discussed already https://discuss.rubyonrails.org/t/proposal-adding-postgres-p...

comment 1y ago · link · parent

activerecord in Rails has async mode, which allows you to queue several requests and read results later. But those will go through the connection pool, and will be executed in separate connections, separate transactions, and separate PostgreSQL server processes. I wonder if using pipelining instead, on a driver level (app code would be the same), would be a better approach in general, or at least easier on db instance.

comment 1y ago · link · parent

two of my friends at different times called me and spoke for an hour each, how they suddenly realized that they have ADHD, got diagnosed, got meds, and how their life is completely different now. Sounded almost like they joined a cult or something, but I've been happy for them. In half a year initial joy subsided. I guess they got their new normalcy or something, it doesn't sound like they're having any adverse side-effects.

I still don't want to go this route, I had my ups and that was glorious. Also I hope to get a pilot license one day.

comment 1y ago · link · parent

I avoid working in big companies, fighting bureaucracy is not my thing. But ordered-micromanaging-managers do happen even in companies of 10 people. One of the worst experiences like that I had in a company of _four_ people, CEO was just insufferable, we actually spent an hour every day creating a schedule for a day for everyone with 15 minutes granularity.

One thing slightly bothering me is that I have zero problem managing people both like me, and ordered stable focused guys, because I try to use people's strengths and put them on tasks which suit them the best. I've been CTO twice and can speak from experience. The only requirement for me is wanting to be useful in some form, we'll find a task, occupation, or feature lifecycle stage.

And managers who tried to put on me some kind of "personal improvement plan" clearly can work productively only with people exactly like them. Maybe they shouldn't be managers, a lot of good devs have some degree of ADHD, cutting them out or putting them in the box can't be good for business.

comment 1y ago · link · parent

I'm doing the same, or at least trying to do it.

Worst periods for me were when I had one clear, important goal, not particularly hard but hairy, and nothing else to do, sometimes because I myself cleared it up. I could spend months doing nothing useful, and end up very, very tired and burnt up.

I also several times had a conversation with managers, whom I told that I'd rather work on something very urgent, or otherwise give me something NOT (really) urgent and a big murky area of things to clear out which no one else knows how to deal with. That something won't probably be done, but that area will be improved a lot in creative ways. Typical managers' responses have been trying to micromanage my time up to personal hourly schedules, morning and evening personal reports, and scold me if I did anything out of the order of the list of priorities they imposed on me. Exactly the opposite of what's needed for me to be productive. And of course "let's just try that, and I'm not asking."

Next time I'll see such a response, I probably will quit on the spot; this is unbelievably cruel.

But it looks like the secret of the author is: just work in academia.

comment 1y ago · link · parent

I wonder if somebody already experiments on altering toxoplasmosis

comment 1y ago · link · parent

it kinda looks like you've assumed my "ideology", or even a country. Also, to die of natural causes, you know, for some people in some positions is actually a good wish. And we all will be there, I just really hope to outlive particular people.

comment 1y ago · link · parent

I'd love the current generation of POSs in power to die off naturally before those advancements will be applied, thank you.

comment 1y ago · link · parent

i wonder how screen locking works then

comment 1y ago · link · parent

I really hope you don't just get your data from ChatGPT

comment 1y ago · link · parent

but actual code preceded the hardware!

comment 1y ago · link · parent

I've never used it, but perl contains support for Berkeley DB in stdlib since forever. But sqlite maps to perl just fine.
12345
17