Details
-
AboutEnthusiast of strict, safe, elegant and beautiful programming languages. Allergic against boilerplate. Certified hater of clown languages like JavaScript. 📱 Developer of JoyRant, the unofficial devRant iOS app that doesn’t crash.
-
SkillsSwift, SwiftUI. I have a truly large list of other skills which this margin is too narrow to contain.
-
LocationGermany
-
Github
Joined devRant on 6/30/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Skype?
-
Love that Seinfeld reference! 😂
-
That’s great! Thanks for telling!
-
@kiki That‘s not true at all. A type is more than its properties.
A very basic example is a person with the property name and a a planet with the property name.
A person is very different from a planet, even if both have the same properties.
Also, a type can have functions/methods and other stuff like nested types, generics and interface conformances. -
@retoor wait, is @shovethisrant the former @chonkyquiche?
-
@kiki no, I care about types, not properties.
It‘s not about entity names but types. It‘s called duck typing, not duck naming.
If you go by properties, you poison yourself.
This was a joke anyways. There is no point in seriously comparing duck typing with the real world. -
@CoreFusionX well, runtime garbage collection is not the only automatic memory management system.
Swift has automatic reference counting that is performed at compile time. It has zero cost because it‘s literally what you manually would do, but done by the compiler.
I think Rust does the same. -
@CoreFusionX for me on Win11 the ads show up when I open the start menu and then click into the search text field.
-
@retoor ah, I read your comment again.
No, I‘m not supporting both, lower and uppercase. They are all uppercase. -
@retoor
About uppercasing http methods: never heard that uppercasing isn‘t correct.
A googled it quicky and apparently uppercase is correct.
But the consumer of the lib doesn‘t need to care because the methods are abstracted as enums.
The devrant sdk uses this request lib and the sdk itself is mostly done.
Now I need to integrate it into JoyRant as a dependency. -
@retoor
The + thing that you saw was probably the one exception that needs to be done when using the system functions to percent encode url parameters.
The system accepts + as the space character but it should be percent encoded/escaped if it‘s part of the value of a url parameter.
It‘s a well known quirk of the std lib.
If a json value is supposed to be a date/datetime, then it should resolve in an error if it can‘t be parsed. Due to the strict type system, it can not be a Date OR a String.
And that‘s a good thing. I don‘t want to be forced to check the type and do some fallback logic in case it turns out to be a string and not a date 😄
If it doesn‘t parse, then it‘s considered invalid.
If it‘s valid but still doesn‘t parse, then I should fix the parser. -
Ok, I‘m triggered 😂
Wtf is that supposed to mean? That zero cost abstractions don’t exist?
Is this a word that is too scary for JS devs? 😄 -
This is a good example why duck typing is fucking idiotic!
-
What? Windows users actually like the ads?
-
Yeah let‘s do this.
I already agreed that you can be the next Hitler! -
@retoor
https://github.com/WilhelmOks/...
This is a fun little project that came out of the development of the Swift devRant SDK :)
It makes it super nice and easy to write request code for json rest apis in Swift. -
@retoor thanks. Three reasons then ;)
Report api - the one that should be called when you want to report a rant. The report button is right in your screenshot :) -
One more thing to consider:
Tuples have either value or reference semantics, it depends on the language.
So for example if the tuples in your language have reference semantics and you want value semantics, you probably want to use struct (which has value semantics in most languages). -
I‘m still not sure how I want to add the downvote reason into JoyRant.
I don‘t want to show a popup with 2 options like in the official app.
Maybe a second button next to the -- one which says "spam".
Or next to the report button if I find out what the report api is. -
@retoor about 80% done. Working on this in this moment.
Btw, what were the values for the downvote reason again?
1=not for me
2=spam
Something like that? -
Depends on the language but normally structs are named. Tuples are anonymous.
If you want to refer to the same type in multiple places, you probably want to use a struct and refer to its name instead of repeating the tuple definition.
Also, structs can have more stuff like methods/functions, nested types, static properties, etc. Tuples can not have this. -
Nice work!
-
@kiki is chatgpt your only source?
-
@retoor save it as svg to save some space 🤣
-
That doesn‘t sound right.
IIRC, trees are made of carbon which they mainly get from CO2. But when they die, they don‘t just evaporate back into CO2.
All that former CO2 remains in the matter of the tree.
The tree will slowly decompose and that might release some of the CO2 but probably not even half of what went in.
Unless we burn it. -
@antigermanist that‘s ok. I mainly write it for myself.
It would be nice if someone else would actually use it but thats unlikely. -
@antigermanist of course it will be abstracted away. That’s the whole point of the sdk: it provides nice and clean code to access devrant data with nice and clean model types with proper names and structure.
All the dirty mapping and decoding code is hidden.
Though the declarative mapping code can also be seen as doc for the devrant api.
And that‘s where the ugly custom mapping code gets in the way. -
@antigermanist I know union types (not operators) from typescript.
Declaring multiple possible types doesn‘t help the issue because the decoder still wouldn‘t know what type to use.
All it could do is to try and decode those types one after another until one succeeds.
And that‘s exactly what I am doing with custom decoding.
It‘s not an unsolvable problem. It‘s just shit api design and ugly decoding code. -
@retoor how do you know that the web version is limitless? I‘d assume that is uses the api too.
-
I also checked the feed and it looks like it‘s not possible to get all of the rants. At some point the rants just stop.
Personally I‘m not interested in preserving or backing up all of the rants, but I‘m curious how it would be possible.