Readit News logoReadit News
vasilakisfil commented on Rust 1.65.0   blog.rust-lang.org/2022/1... · Posted by u/mbrobbel
adamch · 3 years ago
Except the let-else version has one big disadvantage. The 'match' version has bound the error to `e`, so you can log that error or inspect it. The 'let-else' version can't read the error, so its log message can't be as useful. You can't check if it's a specific error, or include the error in logged messages.

It's still convenient, but in really limited circumstances, AFAICT. This week I'll be going through the various Rust projects I maintain at work, seeing if there's useful places for let-else.

vasilakisfil · 3 years ago
you are right, not so useful for Result type, but still, it comes handy for Option types (since None doesn't hold anything).
vasilakisfil commented on Fly.io makes infrastructure easy for developers   blog.chiselstrike.com/fly... · Posted by u/penberg
vasilakisfil · 3 years ago
I skimmed through their docs but couldn't find whether they:

* support for abstract apps, not only HTTP/web apps like heroku, let's say I want to deploy a SIP app

* support for HTTP/2 and potentially HTTP/3

If they do support these two I would say it's enough to be considered Heroku killer.

vasilakisfil commented on Twitter Appears to Be Down   downdetector.co.uk/status... · Posted by u/jamesmunns
vasilakisfil · 3 years ago
it's so funny how everytime services are down, their status page is like everything is normal here. I understand that there are internal politics around such things but still...
vasilakisfil commented on I love my GPD Micro PC   blog.danieljanus.pl/2022/... · Posted by u/nathell
vasilakisfil · 3 years ago
I wish I could use one of those, I had one actually some years ago but my eyes were burning (I have huge fonts compared to average people in my regular 17inch laptop).
vasilakisfil commented on Don’t call it a comeback: Java is still champ   github.com/readme/feature... · Posted by u/smartblondeva
xxs · 3 years ago
you really dont need redis if you have java. I see zero reasons to offload my datastructures via TCP, instead of have them locally. If need be, replicated them.
vasilakisfil · 3 years ago
Usually you need redis to scale up horizontally, meaning with multiple servers/processes, and still keep consistency in your data. In general redis is a very useful tool that provides various features, even pub sub.
vasilakisfil commented on I've been abusing HTTP Status Codes in my APIs for years   blog.slimjim.xyz/posts/st... · Posted by u/that_james
vasilakisfil · 3 years ago
> Returning a 2xx code immediately tells the client that the HTTP response contains a payload that they can parse to determine the outcome of the business/domain request.

There is nothing in the protocol that mandates only 2xx status codes are parsable. Instead, the Content-Type pinpoints to the client what kind of content the body has, regardless the status code. And the content-type will most probably be what the client asked (if not, then the server announces that the response content is not subject to negotiation, something that you see rarely nowadays..)

In general I think this post reflects one of the mentalities that appeared around 10 years ago regarding HTTP APIs (another was the extreme hypermedia-driven APIs). But I really think nowadays we can do much better, we can deliver a practical API that works 99% of the times.

By the way in the latest HTTP RFC (RFC9110) status code 422 is finally officially defined (previously was part of webdav extention), which means that the war 422 vs 400 for validation and other semantic errors is over and we have a clear winner. But 200 vs 404 for something that was not found? Well that was has ended long ago I think..

vasilakisfil commented on Show HN: Shale – a Ruby object mapper and serializer for JSON, YAML and XML   shalerb.org/... · Posted by u/beerkg
vasilakisfil · 4 years ago
Serialization/deserialization is such an important part of web development, I have no idea why Rails includes the ancient JBuilder (and very slow since it goes through templating) library, instead of investing in a proper library. Let alone deserializing which is equally important..

I think the API Shale provides is pretty sane. I would probably use it in my next Ruby/Rails project. I don't like the fact that Nokogiri is included by default, it would be nice to declare a core type, and then bring in what you need (JSON, XML, YAML) as a different gem. But that's not a deal breaker for me.

I have created my own serializers in the past (SimpleAMS[1]) because I really detested AMS, no offence to AMS contributors, but AMS library should just die. Rails, and way more importantly Ruby, should come up with an "official" serializers/deserializers library that is flexible enough, rock solid and fast. For instance I had done some benchmarking among common serializer libraries [2] and AMS was crazy slow, without providing much flexibility, really (meaning, slowness is not justified). Others were faster, but were supporting only one JSON spec format (like jsonapi-rb). I am wondering where shale stands.

Another thing is that most serialization libraries seem to have ActiveSupport as a main dependency (not shale though) which I think is a bit too much, and actually has a performance hit on the methods it provides.

I really think that Ruby community can do better here ?

[1] https://github.com/vasilakisfil/SimpleAMS

[2] https://vasilakisfil.social/blog/2020/01/20/modern-ruby-seri... (scroll towards the end for benchmarks)

vasilakisfil commented on Show HN: Redditle.com – For those of us who add 'Reddit' to every Google search   redditle.com... · Posted by u/greentfrapp
greentfrapp · 4 years ago
Hi HN! I built redditle.com for those of us who append "reddit" to our Google searches.

Reddit search isn't great (https://old.reddit.com/r/NoStupidQuestions/comments/lucx82/w...). But it's improving! (https://old.reddit.com/r/reddit/comments/t9nuaz/whats_up_wit...)

In the meantime, some of us still use Google to search Reddit, hence https://redditle.com

Or for some of us, because Google's results are increasingly filled with clickbait, "reddit" has been a cheatcode to navigate that. Redditle is for you too!

Is it the same as Googling "site:reddit.com"? Yes :D

Redditle also supports searching in a specific subreddit with "r/<subreddit>" e.g. "r/webdev guide to vue" would search in r/webdev.

GitHub repo - https://github.com/greentfrapp/redditle

vasilakisfil · 4 years ago
nice! I use that quite often, so it might come handy. Quick question, how did you build that ? Does Google provide any sort of API or did you build a web scraper for that ?
vasilakisfil commented on Parsing bitstreams with Nom   blog.adamchalmers.com/nom... · Posted by u/adamch
vasilakisfil · 4 years ago
Nom is a fantastic library. I have built a SIP library [1] on top of Nom, no way I would have built that without Nom's help, and even if I did, it would be a heck of a mess and under-optimized code.

[1]: https://github.com/vasilakisfil/rsip

vasilakisfil commented on Ask HN: Who wants to be hired? (February 2022)    · Posted by u/whoishiring
vasilakisfil · 4 years ago
Location: Stockholm, Sweden & Athens, Greece

Remote: Yes

Willing to relocate: Maybe

Technologies: Rust, Ruby, Javascript, PostgreSQL, ElasticSearch, Redis, AWS, Networks, APIs, Voip, SIP, SDP, WebRTC

Résumé/CV: https://vasilakisfil.social/public/FilipposVasilakis.pdf

Email: vasilakisfil@gmail.com

Among others:

* HTTP/REST APIs specialist, pure interest in networked services and optimizations

* Good knowledge of CAS/SAML/OAuth2 and related auth protocols

* Good knowledge of VOIP/SIP/SDP/RTP/WebRTC and related protocols

* Good knowledge of Distributed Systems theory, concepts & principles

Looking for a permanent role, but open to consultancy as well.

u/vasilakisfil

KarmaCake day333September 11, 2014View Original