HN user

candl

212 karma
Posts0
Comments93
View on HN
No posts found.

Are there any coding plans for this? (aka no token limit, just api call limit). Recently my account failed to be billed for GLM on z.ai and my subscription expired because of this... the pricing for GLM went through the roof in recent months, though...

Vibecoding #2 6 months ago

I bought a glm-4.7 subscription and paired it with with claude code. According to usage, I have already used millions of tokens, yet I have barely reached the prompt limits for the tier I have per the 5 hour window. I haven't done anything crazy with my prompts as well. Now if this were something else billed per 1 million tokens it would have cost me a lot more. Yet apparently the majority of LLM providers are billing for 1 million tokens. What's the catch? What I am not understanding? What other providers have similar usage/pricing pattern? I can't see any of the providers billing per 1 million tokens to be useful/cost effective at all for coding. Granted, I am new to all of this, I want to see what the fuss is about so perhaps I am blind to something obvious.

What features have you used for shaping with pf/FreeBSD? I remember (around 8ish years ago) using dummynet with pf, but it wasn't supported out of the box and I used some patches from the mailing lists for this purpose. It wasn't perfect, at times buggy. Back then ipfw had better support for such features, but I didn't like the syntax just as much as iptables. I eventually settled on Linux as I have grown to understand iptables (I hate that nftables is the brand new thing with entirely different syntax to learn again... and even requires more work upfront because basic chains are not preconfigured...) but traffic shaping sucked big time on linux, I never understood the tc tool to be effective, it's just too arcane. I always admired pf, especially on OpenBSD since it had more features but the single threaded nature killed it for any serious usage for me.

I learned some Gleam a while ago, my familarity with F# helped, but I didn't find a use case for it. Some while ago I wanted to play with raw sockets so I figured, why not Gleam, its binary parsing syntax will be handy so I looked into the erlang sockets module and attempted to write some ffi wrappers for the necessary functions. Turns out it is not as straight forward, especially that the definitions on erlang side are often complex, with many variants and the dynamic nature doesn't often map very well to Gleam. The documentation was also quite sparse for interop. Interop also involves a lot of Dynamic types so encoding/decoding back which is cumbersome. Sooner or later I hit a wall. By virtue of reading Erlang docs to write the ffi wrappers I eventually got familiar with Erlang syntax which at first was quite alien, but turns out it is rather simple with just some rules to remember. I settled on writing Erlang directly. I am not sure how Elixir compares, never tried it, but I was initially put off by the syntax resembling Ruby, which I have fond memories of, but was always very implicit which I didn't like. Writing pure gleam is pretty fun, but a lot of interesting things require either ffi interop or decoders/encoders even for simple things like json which takes away some of that fun.

What's New in F# 9 2 years ago

Should one use the result type for handling errors or exceptions or both? What's the rule in F#?

When should you prefer immutability over mutability since both are possible in F# and it probably has a measurable impact on performance?

When should you use objects instead of records or unions in F#?

Since mutability is possible, any reason to not allow an explicit return or continue? It makes certain code patterns much less nested and easier to read.

PyPy v7.3.16 2 years ago

I recently had to script reading a large Excel XLSB file. Using pyxlsb it took about two minutes. I found an alternative library with significally better performance - python-calamine, but this one reads all the data to memory consuming GBs of RAM, so was a no starter. Then I tried PyPy and miraculously the same script with pyxlsb takes 15 seconds.

Lazarus IDE 3.0 3 years ago

Years ago I was discouraged that there is a lack of a grid component like WPF's Grid or Delphi's TGridPanel. Something that I can specify the number of rows/cols and their sizing. Has this changed since? Or perhaps this is achievable nowadays with (nested?) TFlowPanels?

pdo is a common interface layer for databases for php, like jdbc in java or ado.net in C# so I can use the same api for any supported database. In python technically dbapi standard exists for the same task, but the driver apis annoyingly vary so much between themselves that if i have to i go with sqlalchemy, but it's no longer a lightweight solution

For scripts I use Python, but I like to use PHP for short quick scripts when a database is involved since all it takes is to install php and php-pdo to have a consistent api for db access to get started with, which for python is not the case. But from time to time I am reminded how bad PHP and outright dangerous can be. Just the other day I had an array like this: ["123"=>"foo", "321" => "bar"] on which I used array_keys expecting to get ["123", "321"] as a result. Surprised why my script was not working the way it was supposed to I found out that the result was actually [123, 321] instead. Yep, PHP casts strings to numbers in this case when it can. I will hit a "gem" like this every now and then, there are plenty of such dumb things scattered in PHP that will bite you the least expected way that makes me stop and think to use something else.

Haven't touched Blazor in 2 years. In the context of blazor server, what's the recommended pattern for state management? Does it make sense to use MVVM (e.g. via MVVM Community Toolkit for source generated observable properties etc) or plain C# objects would suffice with manually calling StateHasChanged() whenever necessary? (I guess that since rerenders are driven by DOM events the situations where manually calling StateHasChanged() is quite low)

PHP in 2023 4 years ago

The only gripe I have with PHP is that the standard library while extensive is a total inconsistent mess. Would rather see that addressed first.

Thank you. Just to make things clear, customer from section 7 also equals end user? That is, if I were given for example a /48 from a sponsor LIR then I am forbidden to divide that and delegate resulting prefixes via DHCP/PPPOE to end user CPEs to whom I want to simply provide dual stack internet access?

Question to those familiar with IPv6. My company has /24 IPv4 PI blocks. We are not a LIR. Can I request a /48 or larger IPv6 prefix from my sponsor LIR (what is the largest IPv6 prefix that can be obtained this way?) Can such IPv6 prefix (not being a LIR) be further distributed to customers? (e.g. we offer some internet access) - afaik there were some restrictions when not being a LIR. I am not sure what the current state of IPv6 policy is.

Is OpenBSD still largely single-threaded or have there been SMP improvements in the network stack over the years? The feature set OpenBSD has is impressive, but is there a large gap in networking perf compared to Linux/FreeBSD?

What's the SMP state of OpenBSD's networking stack these days? Can it benefit from multiple cores (if I were to run it on a beefy x86 machine?)

I have been debating whether to learn Scala or F# in my spare time. F# seems to be the more pragmatic choice. Doesn't go the insane way of FP that Scala does with complicated libraries or convoluted inheritance hierarchies. The Scala community seems more divided than the F# one with multiple competing ecosystems/libraries for achieving the same thing. My interest lies in webdev/backend and F# seems to be an obvious choice with asp.net and it's supplanting libraries. Not sure how Scala fares, but i guess it's not the primary use case for it. On the surface I kind of like the syntax of Scala, it's very familiar but I fear that I would get more frustrated the deeper I would dig because eventually you have to integrate other people's code and the way most of it is written looks to be like haskell in disguise. Not really sure about the pros/cons.

Why would you do that? If you are concerned for the security of your coins, you should have moved them to a wallet you own that is not hosted on an exchange. The bank you transfer your dollars to is just as likely to get hit by the exact same vurnerability. In addition you have to pay a fee to move your coins, then to wire the dollars to your bank account. Moving from crypto to fiat is also liable to taxation. If the sole goal is to secure your coins then I don't think that the whole process is worth the hassle. Moving them to a private wallet would suffice.

This is very disappointing to hear. I have actually migrated two nodes from proxmox to xenserver + xenorchestra not that long ago. I have no need for a full blown HA environment with dedicated NAS. I didn't have hardware capable of running proxmox on zfs + zfs-sync for a two node setup. Xenserver + xenorchestra (with its continious replication feature for backups) fit the bill much better than proxmox for this use case.

Yes, because of the potential pitfalls of undiscovered vurnerabilities like the one in this post, where an attacker could have generated an unlimited supply of coins and remain undetectable. This is in contrast to Bitcoin and other coins whose transactions are public on the blockchain and can be openly analyzed. The other aspect is ethical. Did the people involved in discovery of this vurnerability took advantage of it and made themselves rich by exploiting other cryptonote based coins? Little risk, high reward which is tempting.

This is why absolute anonymous crypto-currencies will never catch on. Too much trust must be put into the hands of the developers. How do we know this vurnerability (and maybe others yet to be discovered) were not exploited for months? They didn't even share the methodology and tools they used to check the blockchain for this particular exploit. I can understand their assurance that everything is fine, because otherwise any coin on this list gets basically useless overnight, but that's not how it should be handled.