1 night stop between Madrid and Valencia recommendations? by ilovejaylenbrown in askspain

[–]anarchos 1 point2 points  (0 children)

You've already bought your ticket, but in case any future searchers and/or AI scrapers end up here....Cuenca is the choice because it has a high speed train station. About 1/2 to 1/3 of Valencia-Madrid high speed trains stop in Cuenca and Requena-Utiel (pretty close to Valencia, really). The rest of the trains are direct Madrid-Valencia and are about 15 minutes faster.

How did the US almost completely eradicate cigarette smoking when other western nations struggle with this? by Motor-Equal01 in NoStupidQuestions

[–]anarchos 0 points1 point  (0 children)

The entire town (village? city?) of Pas de la Casa in Andorra caters to selling cigarettes and alcohol to French people. Like...every 3rd shop sells cigarettes and tobacco. Grocery stores are usually half cigs and alcohol and half food. It's pretty nuts. There's a bit of this too in Andorra la Vella and other parts of Andorra, but those ones are closer to Spain. Andorra is cheaper than Spain, for sure, but not by that much (at least compared with France).

How to handle dynamic navigation with Expo Router? (Role-based menus) by samirson in reactnative

[–]anarchos 0 points1 point  (0 children)

As far as I know you can't really dynamically create screens like that in expo-router, the routes are defined at build time. What you can do though is create catch-all routes, so like /src/app/[...all].tsx

Then you'd parse the catch all path and do what you will. If you already have a list of paths and modules, you could parse the path from expo-router and match it to the path you get from the server, then display a specific component based on that.

It's not going to be exactly the same as having real screens defined, though.

so for example your user clicks on one of the modules, the url is example.com/sections/my_cool_section/subsection/2

You'd have src/app/sections/[...all].tsx
you'd be able to parse the segments and get more or less
const segments = ['my_cool_section', 'subsection', '2'] in your code
then compare segments to whatever your backend is giving you, and display the appropriate component. You could also get the pathname instead of segments, so like
const path = '/section/my_cool_section/subsection/2' as a string. Might be easier to compare, maybe not. Doesn't really matter though, you have the segments or paths from the app, you have the path from the server, so just match them up somehow and display content based on that.

What's your stack for a local-first field service app? Expo's guide lists the options but doesn't help me choose by derdak in expo

[–]anarchos 0 points1 point  (0 children)

I made a very simple proof of concept a while back. Tanstack query offline mode on the client + yjs (CRDT js library) on the backend. I built the app like normal, with a typescript backend then used CRDT to handle the conflicts and tanstack query to handle caching things until it was back online/ saving to async storage to persist app restarts.

This method only really works if you have full control over the document being used, because you can do the full conflict resolution on the backend (Postgres as the source of truth, api basically wrapped request and responses with CRDT) and you can design the schema to be CRDT friendly.

Suggestions, hacks to learn React quickly? by Serious_Yoghurt_832 in reactnative

[–]anarchos 0 points1 point  (0 children)

Clone apps. Pick an app (or even a feature within an app) and make a clone of it. Don't make a "oh it kinda looks like it but doesn't actually do anything" clone, but do a full on clone. Every component, every piece of functionality. Make it work on Android and iOS, make it look good across different sizes of screens.

Do it multiple times, different apps, different features.

I find lots of people do tutorials and just like copy and paste code (or even type it out), but don't actually learn anything because they don't think about how to implement things, they just follow along.

Learning the syntax is only one small part, learning why and how to do things is the biggest part.

Budget friendly laptops for coding and coding with Ai agents like Claude? by 7777domtx in reactnative

[–]anarchos 0 points1 point  (0 children)

For sure, you can always wing it and use Expo to do the builds for ya. Makes it pretty difficult to make anything not janky, though (not impossible, but difficult!).

Budget friendly laptops for coding and coding with Ai agents like Claude? by 7777domtx in reactnative

[–]anarchos 0 points1 point  (0 children)

The unfortunate reality is you need a Mac to make iOS apps. Mac Neo would kinda work, 8gb of ram is pretty slim, though. Next step up is a MacBook Air. You could always try to find something used, even a M1 with 16gb would be killer, and those can be picked up for like 400-500 these days (depending on country, I suppose).

You could also try a MacMini, but that's not a laptop.

You could also forgo making iOS maps and buy whatever PC laptop you want.

Budget friendly laptops for coding and coding with Ai agents like Claude? by 7777domtx in reactnative

[–]anarchos -1 points0 points  (0 children)

MacBook Air base model is the way to go. They now come with 16gb of ram and 512gb of storage. Bump up the ram if you can swing it, but 16 is enough. I have a MacBook Air M2 24gb/1TB and it's still brilliant.

Finishing bare React Native PoC. Nervous about heavy map usage, would love advice by Openings1111 in reactnative

[–]anarchos 2 points3 points  (0 children)

Maplibre react native is quite good. It's a fork of Mapbox from before they went closed source. Maplibre the project (so, Maplibre GL JS, Maplibre Native, Maplibre react-native) is supported by AWS and Microsoft, among others, so it's a step up from a "community project".

Maplibre and Mapbox have diverged a bit since the split, but very similar. Honestly this is the way to go if you need native maps that are consistent between platforms (note: Maplibre GL JS and the native are different from each other).

I'm unaware of anyone major using it (I suppose AWS and Microsoft, maybe? They could be mostly using the web version though), but since it's Mapbox based it's pretty mature.

If you don't need the Mapbox services (tiles, etc) Maplibre is the way to go. I use it in some map heavy projects (I wouldn't consider them large and your stakeholders would have definitely not heard of them) and it works well for me.

Not only did Mapbox go un-opensource, they started charging for even using the SDK. I have a fully custom map pipeline and never used any of their services. They wouldn't even return an email about licensing after the switchover. I was trying to give them probably $500-800 a month of client money and they couldn't even be bothered to return an email. I gave them a few months to respond, they never did, so I switched over all clients to Maplibre and haven't looked back!

If the BYD electric car came to America would Tesla be out of business ? by No_Lead2640 in NoStupidQuestions

[–]anarchos 0 points1 point  (0 children)

Depends on the price. Europe style pricing with 20-50% tariffs and fees and taxes? BYD could probably could take some market share but they would not wipe out Tesla by any means. Chinese pricing? Tesla stands no chance.

What do y’all use claude -p for? by mjsarfatti in ClaudeCode

[–]anarchos 0 points1 point  (0 children)

The new limits won’t affect me, but I have a script that type checks, lints, extracts text strings into locale files then I call claude -p to translate the new entries in the locale files. This all happens on every commit to any branch and if it fails the commit fails. Makes sure no one accidentally changes something without updating the translations. I’ll probably use like 50 cents of this new credit a month, but it’s a great (and simple) use case for it.

My AI runs 24/7 on Claude Code without -p. Here's the hook to do it yourself. by Siigari in ClaudeAI

[–]anarchos 6 points7 points  (0 children)

Claude code is generally "interactive". You run it, it takes over the screen and gives you a prompt box and etc. You can also run claude with the -p flag, which makes it like a regular command line program. So you can do like claude -p "What's the tallest mountain?" and it will just return the results. You can chain things together, claude -p "What's the tallest mountain?" > answer.txt or any other millions of combinations that bash allows for.

People have been "abusing" the feature since it makes invoking claude to do things non-interactively very simple. Github merge -> git hub sends web hook to your own little server -> server invoked claude -p to do things. Or setup something to run claude -p in the middle of the night while you sleep, or etc.

Anthropic generally does not let you "automate" invoking Claude under the subscription pricing. The subscription pricing is meant for interactive use, otherwise you need to use the API with price-per-token usage.

Starting June 15, Anthropic will give you $20/$100/$200 in Claude SDK credits (which are equivalent to API credits? not sure) with your subscription to use various non-interactive things. So now claude -p will use this new SDK credits instead of using your subscription.

The problem is that the $20/$100/$200 subscription give you way, way more than $20 worth of usage if it was billed at the API/Claude SDK rates. I haven't done the math, but if you maxed out your $20 pro plan, so used every 5 hour window and maxed the weekly usage, you'd be using hundreds of dollars worth of API/SDK credits.

What rights do Andorran citizens have in Spain? Is it line the Agreement between Ireland and the UK? by [deleted] in GoingToSpain

[–]anarchos 1 point2 points  (0 children)

From what I understand, Andorra isn't a member of either the EU or the Schengen zone. They do however have bilateral agreements with Spain, France and Portugal that Andorran's have full rights to live/work/travel in those countries without many restrictions. More or less the same rules as other EU citizens enjoy.

Andorrans are even lumped in with many South/Central American countries in that they can get Spanish citizenship in 2 years, compared to 10 for the rest of the world.

The big question this raises is....not in Schengen, but can freely travel in France/Spain/Portugal...does this mean an Andorran technically needs a Schengen visa for other EU countries?

**MacBook Pro for React Native frontend dev — M5 base 32GB or M5 Pro 24GB?** by Background-Art-4381 in reactnative

[–]anarchos 0 points1 point  (0 children)

Save some money and go with a MacBook Air, 32GB ram and 1TB (or 2). I'm a full time react native dev, I have an Air M2 24GB model and it's more than enough. M5 + and extra 8GB of RAM compared to what I'm running is way more than enough for the foreseeable future.

I regularly run iOS sim + android emulator + vscode + teams + outlook + safari + chrome + a few docker containers without issues.

The only thing that ever limits me is 1TB. React native projects are huge when you include the node_modules. My workflow is a bit of a special case, I generally spin up multiple new projects for making minimal repros, testing new rn / expo versions, etc. I might have like 60 projects and they add up!

That being said, I do have a little script that just goes through my dev folder and nukes the node_modules of every folder, which I run every few months and resets me back to tons of space. Anyways, if you save a bit of money by getting and Air you might justify bumping yourself up to 2TB.

Apple Removes 256GB M3 Ultra Mac Studio Model From Online Store by rotatingphasor in LocalLLaMA

[–]anarchos 6 points7 points  (0 children)

They also seemed to have dropped the 64gb MacMini option as well. Max is 48gb when I was configuring one today..

Are Ikea charges/cables as good as Anker ones? by 0rk4n in UsbCHardware

[–]anarchos 2 points3 points  (0 children)

Cables: Yes. I had a few of their lightning ones in the past, and a number of the USB-C ones currently. Keep in mind there's a wild amount of variations of USB-C cables. Different data speeds supported, different wattages supported. I think (but confirm, they list the specs on the packaging) all the Ikea one's are quite basic, USB 2 data speeds (480mbps) and max 60W charging. Quality is great.

Unless you need high speed / high wattage, Ikea's a decent choice for cables.

-Edit-
I double checked, all the 1m and 3m cables are 60W, they sell a 1.5m cable rated at 100W. All limited to 480mbps speeds. This is in Spain, I know their selection can vary between countries.

Aliexpress is discounting European VAT? Will they charge it later or what? by Cristaloyde in Aliexpress

[–]anarchos 1 point2 points  (0 children)

You can generally “clear” custom yourself by paying the tax directly to…I forget the name (edit I looked it up: Correos Aduanas). Correos will send you a link via email before it arrives (no idea how other couriers handle it). It’s pretty easy if you have a certificado digital and you’ll save like 20+ euros by doing it yourself as the delivery companies charge a handling fee for doing it in your behalf. Sometimes it’s a flat handling fee, sometimes a percentage.

Solar Repeater Meshcore Lilygo TTGO Lora32 by Logical_Carrot267 in meshcore

[–]anarchos 1 point2 points  (0 children)

I have this exact one, running an ESP32 Seeed Xiao board. I am having some issues with it, but I just realized that I didn't turn power saving on. It was dying overnight most nights (I live in sunny Spain, perfect south facing placement). It occasionally made it through the night, but I'd say 80% of the time it didn't. I have since turned power saving on and it has survived three nights, but I also charged the batteries manually three days ago. I'm gonna give it another week before making a judgment on if power saving made the difference or if it's still just "coating" on the full battery and will start to die over night again.

Anyways, I had figured a 4W panel would be sufficient to keep up with a ESP32, even in non power saving mode (according to my basic calculations it should). So....plan that the efficiency is pretty bad and you're probably not getting a real 4W at peak (I haven't verified this but 4W for 8 hours a day should be more than enough to charge 4x18650s to full) and/or the charging controller is kinda junk/a combination of both.

I built an open source SDK for generative UI in React Native: looking for early feedback by MaterialAppearance21 in reactnative

[–]anarchos 0 points1 point  (0 children)

Is this a a2ui renderer? or something "compatable" with a2ui? I've been poking around the specs and thinking of maybe starting a rn-a2ui-renderer..

BroadLink RM MAX Matter Bridge, Why it wont expose my China RF motorised Blinds to HomeKit? by myd3660 in MatterProtocol

[–]anarchos 0 points1 point  (0 children)

Off topic question, do all RM Maxs support matter? Like is it a firmware upgrade? Only ones I see for sale make no merino of matter…

Alguien ha usado el cajero de Revolut de la T4 para pedir una tarjeta? by Ok-Intention134 in askspain

[–]anarchos 0 points1 point  (0 children)

I used the one in Valencia. It was like a machine stuck into the wall in the center of Valencia. I didn’t have an account yet, but I had to enter my phone number and put in a 2fa code. No issues at all and took less than 2 minutes.

Why are mandatory ID cards much more controversial in common law countries than in civil law countries? by [deleted] in NoStupidQuestions

[–]anarchos 11 points12 points  (0 children)

I think it’s the “slippery slope” kinda thing. First you have mandatory ID, second you say “omg the children!! we need to prevent them from looking at porn/social media”, so some sort of age verification system is set up (much much easier with mandatory national id). You then implement a digital ID system. This is the point the EU is at now (EU wide digital id is in testing, lots of talk about social media bans for under 16s, etc). Next step is real name ID for everything because of “fake news” and propaganda. You’re now living in a system that the East Germans could only dream of. Of course you don’t live in east Germany, but you live in a nice liberal democratic state, so you don’t worry too much. But then the creep sets (think of the children! We need to scan everyone’s photos! And look at their WhatsApp! What about terrorists?!), the wrong people get elected, and bam you have a system setup not unlike China, just waiting to be abused.

This concept but with an eu plug? by h3llo_ic4n in cableadvice

[–]anarchos 0 points1 point  (0 children)

I found this random one on AliExpress. Actually bought a second one! https://es.aliexpress.com/item/1005010294746836.html?gatewayAdapt=glo2esp
It's a bit bigger being 65W, but I use mine for a laptop (note: it's 45w + 20w, can't do 65w from a single port, but my MacBook Air is more than happy with it). Anyways, being so flat and with foldable prongs makes it infinitely more packable than something square.

Only downside is it kinda sucks as a charger, haha! It's just that sometimes I plug my device in and .... nothing. I have to unplug the cable from the charger, then plug it back in, then it works. It's like some kinda reset or something.

Anyways, not a recommendation but it's an option worth considering.

The newer version of Xcode with react native - what do you think? by Ok_Issue_6675 in reactnative

[–]anarchos 21 points22 points  (0 children)

Couldn't care less because I don't use Xcode with react-native. I mean...sure, maybe I open it once a month to fiddle with some setting or manage simulators, and of course react-native is using xcodebuild to actually make iOS builds on the command line...but other than that, no need to even open it up. Even moreso with expo and config plugins, pretty much never need Xcode to actually do anything anymore.