Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dnautics
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
661.
▲
by
dnautics
1y ago
> The idea that Phoenix is also mostly macros does not hold in practice no, but the Framework does push you into using them. A good example is the `use MyAppWeb` pattern. That's a macro that nests other macros. the good news is t
662.
▲
by
dnautics
1y ago
you can use zigler for a c nif, using easy_c (or c_src) options. the big advantage is that it will automatically box/unbox to/from c values for you and generate sane error messages (which rustler does not, last i checked) when you
663.
▲
by
dnautics
1y ago
> you can't just add it after the fact. why do you say that? https://www.youtube.com/watch?v=ZY_Z-aGbYm8
664.
▲
by
dnautics
1y ago
catching at compile time is much better, though. there are plenty of strange situations that can happen that you'll not reach in runtime (for example, odds of running into a tripwire increase over time, things that can only happen af
665.
▲
by
dnautics
1y ago
would you be satisfied if there was a static safety checker? (or if it were a compiler plugin that you trigger by running a slightly different command?). Note that zig compiles as a single object, so if you import a library and the librar
666.
▲
by
dnautics
1y ago
there was a proposal to rid of #3, but I guess that's not going to happen.
667.
▲
by
dnautics
1y ago
I presume sometime in the not-immediate-but-not-too-distant-future there is going to be a push to "unify" std with a bunch of the "best practices" and call them out in the documentation.
668.
▲
by
dnautics
1y ago
should be ?*ErrorInfo in the header there =D
669.
▲
by
dnautics
1y ago
I wrote an article about one possible pattern which is a concrete realization of your question -- though with more ceremony and complexity since the pathway is fully compiled out if you don't use it (vs a nullable pointer strategy): &g
670.
▲
by
dnautics
1y ago
if you can't afford Tafamidis, you could probably get away with taking - Flufenamic acid - Valtoren (Diclofenac) - Diflunisal off-label. https://www.benthamdirect.com/content/journals/cdtcnsnd/10.2... IA
671.
▲
by
dnautics
1y ago
of course. There will absolutely need to be a way to specify intent in certain cases or override the judgement of the checker. That may come in the form of external annotation, or possibly internal annotation, which in principle is achiev
672.
▲
by
dnautics
1y ago
no need for memory safety to be in the language. It can still be checked at compile-time: https://www.youtube.com/watch?v=ZY_Z-aGbYm8
673.
▲
by
dnautics
1y ago
RE: Elixir I have a feeling that the zig's i/o strategy will enable me to bring back the zig-async-dependent yielding nifs in zigler. I'm really hopeful io interface will have a yield() function, that would be even better!
674.
▲
by
dnautics
1y ago
It should be possible in zig! Here's a proof of concept, I would guess that if V failed it was because they tried to do it at the language level. If you analyse intermediate representations the work is much, much easier. https:/
675.
▲
by
dnautics
1y ago
I maintain a library to interface zig with elixir and the breaking changes have not been a big deal. As a part of the library I have maintain a zig parser (the official parser in the langref is not up to date) and I scan the entire zig cod
676.
▲
by
dnautics
1y ago
> Good luck Thanks! I think this could be implemented as a (3rd party?) compiler backend. And yeah, if it gets done quickly enough (before 1.0?) it could get enough momentum that it gets accepted as "considered to be best practice&
677.
▲
by
dnautics
1y ago
thanks! I would have asked on stream but I'm in a bit of a different timezone than usual so my ability to track livestream times competently has regressed. As an aside, do you think in the near future there will be a "guide to bu
678.
▲
by
dnautics
1y ago
something that I don't understand about the actual API: I maintain the zigler library, and one thing that was useful about the old async "colored-but-not-really" functions was that they implicitly tolerate having internal sus
679.
▲
by
dnautics
1y ago
yeah I don't think the GPA is really a great strategy for detecting UAF, but it was a good try. It basically creates a new virtual page for each allocation, so the kernel gets involved and ?I think? there is more indirection for any g
680.
▲
by
dnautics
1y ago
what percentage of CVEs are null pointer problems or buffer overflows? That's what percentage of the owl has been drawn. If someone (or me) builds out a proper zig-clr, then we get to, what? 90%. Great. Probably good enough, that&#
681.
▲
by
dnautics
1y ago
safety-wise, zig is better than C because if you don't do "easily flaggable things"[0] it doesn't have buffer overruns (including protection in the case of sentinel strings), or null pointer exceptions. Where this lies
682.
▲
by
dnautics
1y ago
(self-promotion) in principle one should be able to implement a fairly mature pointer provenance checker for zig, without changing the language. A basic proof of concept (don't use this, branches and loops have not been implemented ye
683.
▲
by
dnautics
1y ago
Jeffhwang is correct, and dekhn is thinking way too hard. If you have any asymmetric planar structure that stacks into a helix into the third dimension there will be a minor groove and a major groove.
684.
▲
by
dnautics
1y ago
It's a mode you can turn on that substitutes inf for NaR.
685.
▲
by
dnautics
1y ago
I (US) have had a fairphone for a year. you can puchase one from murena and it works just fine.
686.
▲
by
dnautics
1y ago
inf
687.
▲
by
dnautics
1y ago
the twos complement thing is really elegant (-p == (posit -(int p))) in c notation
688.
▲
by
dnautics
1y ago
practically speaking we did put this to the test by having someone run a fluid dynamics simulation on fp64 vs posit64 vs posit32 with no algorithm changes (using fp128 as a "ground truth"). unsurprisingly posit64 results were clos
689.
▲
by
dnautics
1y ago
> trick Normally fp numbers have an "invisible leading one bit", so an ieee fp is (1+0.nnnn) x 2^E where nnn is the mantissa and E is the exponent. as posits are always two's complement, you can model negative posits as ha
690.
▲
by
dnautics
1y ago
turns out only the slides are linked in op. here is the live recording: https://youtu.be/aP0Y1uAA-2Y?feature=shared
More ›