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

I am still sad that shading windows stopped working with Wayland.

Even supposedly prosumer gear sucks at ipv6. The ubiquiti situation was awful about a year ago. I got a dynamic prefix and wanted to setup ULA. Maybe I was dumb, but I couldn't find any way to do it.

Heck, I couldnt even see which prefix I was handled, nor could I see any ipv6 address anywhere in the gui. This was with a self hosted up to date controller though. YMMV.


Ubiquiti software was uniquely awful at IPv6 for a very, very long time. It's one of the reasons I abandoned it for OpenWRT and Mikrotik.

Cool! I just implemented RBB trees for c#. Not on this level, mostly just for fun. I am not a programmer at all, but I do like myself a neat data structure.

I am currently fighting the JIT to understand why a simple flags check (ANDing two bytes and comparing to 0) makes the code 2.5x slower. This is my first c# project so right now I am just throwing things at the compilrr to see what sticks. If anyone knows where I can get help, that would be much appreciated. Dont look too closely on the benchmarks. I managed to make two of them an absolutely best case for ImmutableList (especially SetItem which should degrage linearly with size but now is O(1))

https://github.com/bjoli/RrbList/tree/main/src/Collections

Another thing I havent figured out is how to setup docfx to just pull my XML comments and generate API documentation.


Ruby is a lot less awful than Python in my opinion. That is of course a very subjective opinion. The only reason I write more Python than Ruby is that ruby lacks the libraries I need.

Somewhere along the line Python got all the momentum, and ruby got none and now python is better if you just want to get shit done.

But man. I wish it was the other way around. I have one code snippet that summarises what I dislike about python:

    if input() == "dynamic scope?":
        defined = "happyhappy"
    print(defined)
    
Seeing that I understand why I see yuck in just about every corner of python.

Edit: in ruby it also works, but the variable is at least always defined.


I’m sure I’ll get downvoted for it, but strict technical merits aside, Python to me seems built by engineers who lacked any sense of taste. Ruby is beautiful.

> in ruby it also works, but the variable is at least always defined.

How is this even a pro? I agree that Python scoping rules are frustrating, but tbh not sure if I would prefer Ruby's behavior in this case


Well. If python is a dynamically scoped language, what they do is correct. If they are lexically scoped (which python is described as) the variable defined in the if should never have different visibility in the same scope.

In a lexically scoped language you don't define variables conditionally. What ruby does is also icky, but obviously the developers of both python and ruby wanted to save the developer an extra declaration. The ruby version is at least more correct from a lexical standpoint (it is set to nil if left "nondefined").


I will prempt the comment that always shows up in discussions of this kind:

No. Typeclasses do not replace proper macros. Go home, you are drunk.


Another argument I've often heard is that laziness largely obviates macros. Personally, I agree that this is often true—but not always, and that last bit is where Lisp-style macros would be really nice.

(^^ edited based on one of the responses below.)


do you know of a post or something you could point to that elaborates that argument? interested because I'm having trouble coming up with the line of reasoning on my own


I'm having trouble finding anything concrete online (other than people simply repeating the folk wisdom) other than control flow operators, which are implemented as normal functions in Haskell (i.e. including custom control flow operators).[0] Although, one Reddit comment[1] did also mention typeclasses as obviating other types of macros, so I've edited my earlier comment accordingly.

[0] https://www.reddit.com/r/haskell/comments/5xge0v/comment/deh...

[1] https://www.reddit.com/r/haskell/comments/1929xn/comment/c8k...


This is not a direct response to the question of how laziness obviates the need for macros, but it mentions some specific relevant cases:

https://augustss.blogspot.com/2011/05/more-points-for-lazy-e...


The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."

Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress.

On his next walk with Qc Na, Anton attempted to impress his master by saying Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object."

At that moment, Anton became enlightened.



I'll get in trouble if I show up this drunk at this hour, can't I just bolt on a templating system?


Funny this shows up on HN now! Jean Niklas wrote his thesis about RRB trees, which is an evolution of the persistent vectors of clojure fame. I have spent many hours reading his thesis lately, because I just spent two months porting his c-rrb (https://github.com/hypirion/c-rrb) to c#, which was a fun endeavour. I wish I would have read hus thesis better since I spent two weeks debugging issues that arise from me not enforcing the leftwise dense invariant with regards to the tail.


I recently ported c-rrb to c#, and when the first port was done Unused ai to help me refine the code. It was a pleasant experience, apart from the AI every three or four prompts introduced subtle bugs. In the end, Claude and I managed to speed up the code by almost 2x.

The worst was pushing the tail into the tree. My original code was pretty slow, but every time AI changed more than 4 lines it introduced subtle bugs.

I did not actually think ai would be that useful.


I just wrote (with some AI help) a recently fast rrb tree implementation for c# [0]. I am waiting for the phone calls, but so far I have gotten nothing in 24h. Maybe if I figure out how to use docfx...

[0]: https://github.com/bjoli/RrbList/tree/main/src/Collections


What does it bring over jpegxl?


Way wider browser adoption, potential to evolve together with AV#, since it's using a container format, so it shouldn't be limited to AV1 base. I.e. sites just need to adopt AVIF, and I expect then seamless ability to start using AV2 (and on) there without sites needing another wave of adding a new mime type and etc. which seems to be a huge hurdle.

Same as let's say Webm can contain AV1, AV2 etc.


It doesn't matter that AVIF uses the same container for AV1 or AV2 based encoding, if the browsers don't have the right decoder for it then they can't decode it.

An example of this is MP4: Browsers can decode videos encoded with H264 in MP4 containers, but not H265 even if it uses the same container, because one thing is the container and another thing is the codec, they're related but they aren't the same.


Browser adoption happens way faster than sites adoption (as current AVIF itself clearly demonstrates), so same container does matter to reduce contention on sites adoption side.

I.e. once browser adoption happens you'll be able to use AV2 for AVIF without the likes of Wikipedia taking another decade after that to add an additional mime type to their supported images.


Notably, AVIF uses the HEIF container like HEIC. HEIF is an extension of ISOBMFF, mp4 files are another example of an ISOBMFF format. I'm surprised how ubiquitous that container format is becoming; webm uses the matroska / mkv format but I bet if it was created today they would have likely used something ISOBMFF derived


The standard/spec is not paywalled. So... yeah.


People like this makes me want to use Times New Roman more. Maybe not Butterick specifically (the website is fine), but all those people that make a blog and pick a font before even knowing what they even want to write. Most of the time people change the default my web browser has, they make things worse. For a font choice to be any kind of personal expression in my eyes, you first need everything else in place: content, layout, design.

To spite these people I force the use of Arial on the worst offenders. The list is now a couple of thousand websites long.


But you're not spiting anyone, they don't even know about this, just wasting your time compiling a list of a thousand websites


Oh, I could have picked a other font. I just get a smug feeling when forcing these websites to use Arial. The main reason for using another font on these web pages is that their own choices are worse than not changing it. So that list of thousands of web pages is to make their web pages legible and more usable, not just to be a prick.

I picked Arial so that I could tell the web pages apart from those who had the good taste to leave my web browsers standard font alone. I don't mind arial.


Perhaps your smug feeling can cancel out the smug feeling the author/publisher had when picking a font before even knowing what they even want to write.

It's important to keep the smugness balanced, thanks for doing your part.


> Most of the time people change the default my web browser has, they make things worse.

In Firefox: Settings → Fonts → Advanced… → untick Allow pages to choose their own fonts, instead of your selections above. I’ve been running this way for almost six years now; it makes the web so much better.


When there's an HN link to some philosophy website that intentionally only uses lower-case letters, an obscure font, and yellow on green color scheme, with a page explaining those choices


You can’t separate layout and design from typeface selection.

But yes I agree content must come first. Typeface probably comes second!


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

Search: