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

Could you mind to tell me what is your plan on proc-macros ? You said you have an idea to “will not require actual code execution”. On the other hand, RA current method of handling in Proc-Macros are very fragile.


The exact shape is TBD (I target proc macros support for 0.3.0, whereas 0.2.0 will be about completeness/editors support), but in short -- I'm thinking about "plugin"/DSL architecture where proc macro _effects_ can be described beforehand and applied by the LSP without actual code execution. Executing proc macros is a lot of effort, but LSP mostly cares about the externally observable effects, which is a much smaller subset.


If it’s possible, that would be awesome. Do you mean that the author of the proc macro provides that information through attributes?

(Disclosure: I originally implemented the proc-macro part of RA.)


Should it be named Shanghai solitaire Or Mahjong Solitaire ?


Maybe Mahjunk, am I right?

slowly lowers right hand in awkward silence


Why firefox in andriod is "more vulnerable to exploitation" ?



Does Vanadium include the necessary APIs for uBlock Origin? Otherwise this seems like having a long explanation of how secure the windows are with titanium frames and bulletproof glass while the front door is wide open.


Vanadium implements per-site content filtering as a usability feature via Chromium's in-built filtering engine [0]. They currently use EasyList & EasyPrivacy filters which are quite popular and also a prominent default in uBlock Origin [1].

[0] https://grapheneos.org/features#vanadium

[1] https://github.com/gorhill/uBlock?tab=readme-ov-file#ublock-...


uBlock origin won't save you from exploits in Firefox. The only way it would've might save you is if you disabled first-party JS, which you might as well just disable in the browser itself.

Chromium still is the superior browser in terms of security and Firefox is way behind. Adding an extension so you _might_ have less security exploits in the foundation is a wrong tactic and should be avoided.


Real world threats generally aren't exploiting process memory errors or whatever. Unless they're in the shadier parts of the web, users are unlikely to encounter such things even when they might exist. Spyware and adware threats on the other hand are ubiquitous and highly likely to be encountered by nearly everyone. A web browser that doesn't mitigate that is simply not fit for purpose. It's a table stakes security requirement.


Currently all the browsers are with ads by default. Not ideal but certainly most don't encounter spyware through ads, unless they're in some spam sites.


From that paper:

    There exists a class of questions in life that appear remarkably simple in structure and yet contain infinite complexity in their resolution space. Consider the familiar or even archetypal inquiry: "Darling, please be honest: have I gained weight?"


"Darling, honestly, it's a hat, you look great."


If anyone needs a more powerful constrain outputs, llama.cpp support gbnf:

https://github.com/ggerganov/llama.cpp/blob/master/grammars/...


Thats is exactly what they are using


Have you found the output for arbitrary grammars to be satisfactory? My naive assumption has been that these models will produce better JSON than other formats simply by virtue of having seen so much of it.


If you want to get a good result, the grammar should be following the expect output from the prompt, especially if you use a small model. Normally I would manually fine-tune the prompt to output the grammar format first, and then apply the grammar in production.


Who would downvote this perfectly reasonable question?

edit: Nm


This is amazing, thank you for the link


How is it more powerful?


Grammars don't have to just be JSON, which means you could have it format responses as anything with a formal grammar. XML, HTTP responses, SQL, algebraic notation of math, etc.


I apologize for going off topic, but may I kindly ask how one might go about learning these things?


> Another reason I love Rust. It’s very statically analyzable.

Proc-macro in Rust is very tricky to analyze statically, some are even impossible (due to non-deterministic behavior)


That's moving the goal posts. The important thing is that macro invocations can be found "statically" (with out knowing the implementations of macros at all let alone evaluating).

One way to look at this is that partial evaluation of Rust or Scheme macros is very tractable, because there are very few side effects / side channels. But if you have a lack of hygiene or the C preprocessor, it's very difficult and almost everything becomes a "stuck term" whose evaluation is contingent on earlier evaluation.


That's true about the pure act of parsing and generating an AST. Bit once we want to do semantic analysis, this is no longer true.

Because of procedural macro, it becomes practically impossible to find all occurrences or rename a particular symbol regardless of the #ifdef or #[cfg] or whatever.


So with true hygienic macros, this is not the case. Even with procedural macros, quoted identifiers are resolved where they are quoted not where they are expanded. Identifiers that are not in scope at the macro definition site would have to be parameters, and those are caught at the invocation site just like any other identifier (the quote and splice cancel out).

I am not sure whether Rust procedural macros are always that hygienic, so fair point if they aren't.


> To keep this in context, the current Hong Kong SAR government is democratically elected[6] according to the provisions of an international treaty signed by the PRC and the UK which took effect in 1997[7].

Democratically elected ? Note that hong kong functional constituency system is fully controlled by CCP.

[1] https://en.wikipedia.org/wiki/Functional_constituency_(Hong_...


So what?

A lot of government bodies are appointed by US president, and are "elected" only through some behind-curtain political exchanges.


Functional constituencies are part of the Hong Kong legislature. Imagine that half of the US Congress is appointed by the President of the United States.


The head of the HK government and half of the legislators are also appointed by the CCP.


Does anyone know how Fall Guy's net code was implemented? It's very smooth with 100 participants.


I don't know anything about their net code, but I suspect this is more about the fact that the game is less dependent on precise timing then something like a shooter or Smash.


Based on Fall Guy's hiring page, which asked for experience with Photon, it's probably this: https://www.photonengine.com/en/pun


Could be using Photon but I don't think Photon solves this particular problem as far as I know. Did you see something in particular that mentions that as a feature?


Fall Guys doesnt heavily use server authority, hence why various hacks exist for it.


60*


unsafe { comp.lang.c }


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

Search: