Hacker Newsnew | past | comments | ask | show | jobs | submit | tejinderss's commentslogin

And the stock goes up 3%


Matching events to stock movements doesn't work, because investors use other sources to estimate sales beforehand, and compete hard with each other to find out first. So the information was already priced in. Low sales do impact the stock, but _when_ they impact it is complicated and unintuitive.


Why does this largely only apply to the stock symbol TSLA?


Tesla declaring bankruptcy, stock +5%


Starship turns out to be a modern-day Moonraker. London, Paris, and DC are now smoking radioactive craters. Stock +8%


Worked for Bed, Bath and Beyond, fsvo ‘worked’.


NVDA P/E is 46 , Tesla P/E is...drum roll.... 290!


It's not a car company. It's a cult.


Or maybe this wasn't a surprise to anyone and was already priced in, and then the final numbers were slightly better than the general consensus expectation? Could be that too.

But you're right, everyone who owns stock in Tesla is probably the member of a cult, no need to think any harder about it.


TSLA is in the S&P 500 index so large numbers of people doing index investing own shares of it without thinking hard about its individual performance.


Yes but are those the marginal buyers and sellers that drive price movements? Most people in index funds are probably not flitting in and out of index positions at anything approaching even medium frequency.


Index investing doesn't steer price, it simply follows it.



Do you know any good default PRAGMAs that one should enable?


These are my PRAGMAs and not your PRAGMAs. Be very careful about blindly copying something that may or may not match your needs.

    PRAGMA foreign_keys=ON
    PRAGMA recursive_triggers=ON
    PRAGMA journal_mode=WAL
    PRAGMA busy_timeout=30000
    PRAGMA synchronous=NORMAL
    PRAGMA cache_size=10000
    PRAGMA temp_store=MEMORY
    PRAGMA wal_autocheckpoint=1000
    PRAGMA optimize <- run on tx start
Note that I do not use auto_vacuum for DELETEs are uncommon in my workflows and I am fine with the trade-off and if I do need it I can always PRAGMA it.

defer_foreign_keys is useful if you understand the pros and cons of enabling it.


You should pragna optimize before TX end, not at tx start.

Except for long lived connections where you do it periodically.

https://www.sqlite.org/lang_analyze.html#periodically_run_pr...


Also foreign_keys has to be set per connection but journal_mode is sticky (it changes the database itself).


Yes, if journal_mode was not sticky, a new process opening the db would not know to look for the wal and shm files and read the unflushed latest data from there. On the other hand, foreign key enforcement has nothing to do with the file itself, it's a transaction level thing.

In any case, there is no harm in setting sticky pragmas every connection.


Using strict tables is also a good thing to do, if you value your sanity.


Really, no mmap?


I'm curious what your suggest mmap pragma would be.


PRAGMA mmap_size=268435456;

for example? I'm surprised by the downvotes. Using mmap significantly reduced my average read query time; durations about 70% the length!


Explanation of sqlite performance PRAGMAs

https://kerkour.com/sqlite-for-servers


Although not what you asked for, the SQLite authors maintain a list of recommended compilation options that should be used where applicable.

https://sqlite.org/compile.html#recommended_compile_time_opt...


I dont know whats apple obsessions with thinness, instead they should focus on usability and battery life.


I've been a PC guy my whole live, and was forced onto a MacBook Pro this year for work.

The battery life is insane. The idea of charging my laptop has become this weird ritual now, only known of in lore and legend, that I partake of only when there is a blood moon.


Now if you look at the smart watches, they are by far the worst on the market.


Meanwhile my 2019 i9 16" MacBook Pro gets battery life on par with the MacBook Wheel (as seen in this classic from The Onion: https://www.youtube.com/watch?v=9BnLbv6QYcA) I kid you not, the hummingbird battery is real.

At least I have something to look forward to when I upgrade.


The battery life while in use is amazing. The battery life while closed and apparently asleep is abysmal and probably the worst of any laptop I’ve used in the last 20 years.

I think the problem is that Safari allows tabs to ask to be periodically woken while the laptop is asleep, and there is no obvious way to turn this off. And it will keep doing this until the battery is so low that the laptop needs to hibernate.


Safari on Desktop is just appalling, every year you wish there are some improvements and it is the same. webkit gets some update in terms of web features and bug fix. Safari itself doesn't seems to want to improve. Even Orion using same webkit engine is better.


See this: https://news.ycombinator.com/item?id=44745897

TL;DR: Make sure Power Nap is turned ON. It allows macOS to consolidate wakeup requests into a bulk queue. So the thing isn't turning on all the time.


I read that. It contains no actual useful or authoritative explanation. It references Apple docs that sort of say that it's not supported on Apple Silicon. The man page says:

> powernap - enable/disable Power Nap on supported machines (value = 0/1)

Thanks, Apple.


Use Chrome. Problem solved.


They did that too, in the other products. Longest battery ever.


I’d really love an inch-thick iPhone Dad which has a battery that lasts for days on end. Even a week.


> I’d really love an inch-thick iPhone Dad which has a battery that lasts for days on end. Even a week.

You're describing a case with a battery pack.


They make some pretty beefy battery cases.


They could make it thicker and give longer battery?


That would be the iPhone Pro


I assume they're getting ready for a folding iPhone, so the thinness tech is being developed largely for that. They're releasing this thin iPhone to test the market and to make use of it in the meantime.


I don’t see it; to my mind the last great Apple thin product was the 12” MacBook from 2015.


> dont know whats apple obsessions with thinness

It forces them to the forefront of miniaturisation and efficiency. It's also something they're unusually good at, which creates differentiation.


> they should focus on usability

usability is so '00. Nowadays the focus is on ads.


> Working effectively with LLMs for writing code is an extremely deep topic.

There is a space for learning materials here. I would love to see books/trainings/courses on how to use AI effectively. I am more and more interested in this instead of learning new programming language of the week.


At the moment the space is moving so fast that anyone who tries to write a book will be outdated by the time it's published. The only option is to dive in yourself or give up and wait for things to settle down and plateau.


> Here are some books I spent money on in the last 5 years

Would you recommend these books?


They are great in each their way, but they're niche.

Production Haskell is for people who want to take their academic Haskell and turn it commercial. There's a lot of practical advice, both coding and non-coding.

Thinking with Types is a very good introduction to type-driven , but the later chapters assume very strong type systems (type-level functions, higher-kinded types, etc.) so you may not be able to apply this kind of modelling outside of Haskell, PureScript, Idris, LEAN, etc.

The book that translates best into any environment is Granin's Functional Architecture.

I can warmly recommend that one even if you're not venturing into FP as a whole.

I can't compare it to a whole lot of other software architecture books, though.


At my current place, using Redis with celery is becoming bottleneck for number of concurrent connections it can hold. We are using 1000 workers and start seeing issues (ceiling is 10k connections in Redis); apparently Celery creates huge number of connections. We are considering moving to RabbitMQ for same reason.


Celery is an over engineered pile.. Rather move lower down the stack, with your first step being Kombu which powers celery under the hood. It's oddly "configurable" so if you need to optimize and adjust connections this is where you should go, and it's pretty interchangeable between Redis and AMQP. Really, almost a drop in replacement that should just be a config change.


> That being said, I wish there was a single consistent resource[1] that summarizes truly modern software design philosophy in the sense that it leaves the object orientation inspired ideas behind that did not turn out to be useful and focusses on typed functional programming. Maybe with examples in Typescript and Rust.

Not Rust or TS, but i found Java to Kotlin a decent book which provides refactoring of java OOP to more functional patterns. One of the authors Nat Pryce was big into OOP design and was also a co-author of famous book Growing Object Oriented Software by Tests.


One of the strengths python has is its ecosystem. All the languages you listed don’t come close to python’s ecosystem except perhaps TypeScript/nodeJS (whose quality of ecosystem is questionable although improving in recent times).


The keyword here is “mutable” config object and not config data object in general. I use immutable config dataclass liberally in one of my python projects and i pass it around in all modules. Many functions rely on multiple values and instead of passing all of them as function parameters (which requires their own function typings), the dataclass has all variables with typing definitions in one place, its pretty handy design pattern.


Try Deno, it compiles cli apps in distributable binaries


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: