Better HN
topnewbestaskshowjobs
Log inSign up

devxpy

515 karma · joined Dec 27, 2017 (8y ago) · 421 submissions

https://github.com/devxpy
Submissions

comment 6y ago · link · parent

Yes, this is the kind of things I expect to get better if the tech gets more exposure. If it doesn't then we'll be surely stuck with half-assed solutions for a truly cross-platform dev experience...

comment 6y ago · link · parent

The promise of flutter is alive!

https://web.dahliaos.io/#/

This has the power to accelerate flutter desktop development in general. Really excited for both these projects.

comment 6y ago · link · parent

Looking at the current state of things though, they would probably end up writing a bunch of native code anyway because they'll be missing out on a lot of native functionality that their app currently uses, but isn't really fully accessible through best-effort flutter plugins.

comment 6y ago · link · parent

Don't ad blockers already have special filters for special websites?

comment 6y ago · link · parent

Sorry to take your example too literally, but I suspect ad blockers still might work, because at the end, it's really just JavaScript. The network panel still shows everything the app does. Plus when I see the source code, it's still just transpiled js, and even uses standard js libraries, like Google analytics, which are not written in dart.

comment 6y ago · link · parent

I recently had to implement this feature too. Initially chose approach 2 since it was the easiest. Quickly figured out that it doesn't work on the web because of stupid CORS. Had to resort to approach 3. Using https://metascraper.js.org/#/ now.

comment 6y ago · link · parent

Oh boy, such fun. The chrome inspector is probably the most awesome thing about browsers.

For mobile apps, it takes a lot more gymnastics, and you have to use something like Charles proxy.

But once you get the API, it's very exciting and can potentially save you a lot of money in API subscriptions!

comment 6y ago · link · parent

In your videos you seem to talk a lot about your custom lasers. Is this some in-house tech, or did you outsource this from china like everyone else?

comment 6y ago · link · parent

Your argument might be null though, because I still end up paying for mobile data, so I can use it outside my house.

And the tariff here is kinda rigged to make you buy data. The economics don't work out unless you subscribe to a daily data plan in addition to the voice plan.

comment 6y ago · link · parent

Yeah, same plan. Maybe the throttling is region specific.

comment 6y ago · link · parent

> Over here, unlimited mobile data means unlimited mobile data.

This. Although India has the cheapest data next to Finland, the ground reality is quite different.

I tried using 4G as my primary internet connection after COVID, and I got frustrated by "hidden" limits and random throttling from the ISP - ended up getting a fiber line.

The 4G modem was a complete waste of money.

comment 6y ago · link · parent

I don't see DO mentioning auto scaling in their docs, links?

comment 6y ago · link · parent

I like the sentiment here, competition is great.

But there's also the problem of fragmentation in open source.

I've been using caprover from the early days, and I've seen how much work githubsaturn has put into making it really easy to use.

I think digital ocean has left a lot to be desired on their new offering, which could have been avoided, if they considered collaborating.

And ofcourse I never said digital ocean is just rsync. Just like caprover isn't just docker swarm. The whole is greater than the sum of its parts.

But their new offering is definitely inferior in terms of functionality.

comment 6y ago · link · parent

So if I understand correctly, DigitalOcean just built an inferior version of caprover? (for which a digital ocean one-click droplet exists BTW)

Caprover is essentially a really nice GUI for docker swarm, Let's encrypt and nginx.

https://caprover.com/

comment 6y ago · link · parent

Awesome! Any docs on how the types are mapped between the two?

comment 6y ago · link · parent

Yes, some code won't work -- numba has a nice compiler that will show you errors if it cannot infer the type of even a single variable at compile time (which usually happens the first time you call your function at run-time).

The argument of "some code won't get faster" is null, since you typically only want to use `@njit`, which ensures that you're in `nopython` mode.

I guess that's a double edged sword, in that when it says `nopython`, it really does mean no python.

This means you can only use features from the python interpreter that the numba team has re-implemented in LLVM IR.

---

IIRC `@njit` does involve an overhead in `lowering` the types from python -> LLVM when the first njit function in the call graph is invoked, but not after that.

All this means that if you use `for-loops` in nopython mode, they are guaranteed to run faster, at least in my experience.

comment 6y ago · link · parent

OP said "numba", not "numpy" - numba is a JIT that's compatible with CPython!

https://numba.pydata.org/

comment 6y ago · link · parent

Apart from the energy supply, it sounds like Israel is way, way ahead of India when it comes to scientific prowess. The government is actively involved in building a good story when it comes to science - not something one can say about India.

https://en.m.wikipedia.org/wiki/Science_and_technology_in_Is....

comment 6y ago · link · parent

While cpython doesn't have a jit, there does exist an amazing library called numba which will run a subset of python code through a jit built using llvm and make it crazy fast (and multi-core)

Intel has has a library that lets you use pandas in numba code, so it's I feel pretty confident using it in production without breaking cpython compatibility

comment 6y ago · link · parent

You should look at numba. In some special cases, you can actually write for loops in pure python that are faster than C loops.

comment 6y ago · link · parent

I don't get how this works. Isn't someone down the line earning more profits than they would be in the smartphone industry?

Like Obviously, the sheer resources required to create a router are minuscule compared to a phone, so then who exactly will be pocketing these extra resources that I'm paying for, and why?

comment 6y ago · link · parent

I dont get why these 4g routers are so expensive. I can get a phone with snapdragon processor, lte chip, display, battery and everything for around 1/2 the price of a decent 4g router, its insane. Market theory sucks for the consumer.

comment 6y ago · link · parent

These are really expensive in India, any suggestions for us plebs?

comment 6y ago · link · parent

This. I really agree with this.

The async afficianados also bring along the async ecosystem split.

I wish they did a better job of bridging this gap.

Languages like rust, which already have amazing support for threads don't need this split, please.

comment 6y ago · link · parent

But here's the thing. In all my encounters with asyncio, its slower, even for things like HTTP calls

I suspect its because the event loop gets blocked doing trivial things like json/csv parsing, but it could just be python's slowness.

Asyncio seems super hard to profile too..

comment 6y ago · link · parent

I believe this is how flutter (and by extension, chrome) works as well

comment 6y ago · link · parent

Thanks for the insider info.

I didn't run a STUN server, but I exchanged the WAN ip:port via a server and some simple TCP messages.

comment 6y ago · link · parent

Caprover is what you're looking for.

comment 6y ago · link · parent

Natural follow up question - does NAT traversal actually work?

I've tried to replicate the NAT traversal paper[1] a couple of times in python, but it never really got it to work.

Maybe my ISP's network topology just inlcudes multiple NATs which is messing things up.

[1] https://bford.info/pub/net/p2pnat/

comment 6y ago · link · parent

Genie has an admin panel?
12345
15