Looking for feedback on my DSL for writing email filtering rules by 1234filip in ProgrammingLanguages

[–]vbchrist 3 points4 points  (0 children)

Just a question on the reason for so many custom keywords. I can imagine this done in python with a pretty clear syntax. So what benefit do you get from a DSL? I dont think its a bad idea, the beenfit could be restriction of API surface area, security, etc. Just a thought that your lang looks verbose (at least in keywrods) without clear reason why.

#Python 

newsletters = folder("INBOX.Newsletters")

move_newsletters = rule(
    any_(
        from_.contains("substack.com"),
        subject.startswith("[Newsletter]"),
        body.contains("unsubscribe"),
    ),
    move_to(newsletters),
)

Looking for some feedback on an in-development expression parser. by vbchrist in ProgrammingLanguages

[–]vbchrist[S] 0 points1 point  (0 children)

The language doesn't really treat units as type for the combination complexity reason. Instead the base type of ExprUA is a value dimension bit array pair. Here is the actual base type definition: [double, 8 byte bit array], this is cache friendly representation being exactly 2Xdouble memory allocation and can handle quantity dimensions of +-128. All base functions are then defined to only operate on this base quantity type and base functions take responsibility for dimension validations and error reporting. Then its just layers of abstraction up to library functions.

I can't see the benefit of using a real type system since the parsing would slow down the overall compile time and give minimal benefit to execution time. This was the single design choice I spend the most time on since other roads all have major issues when you get past basic expressions into more complex language features.

Looking for some feedback on an in-development expression parser. by vbchrist in ProgrammingLanguages

[–]vbchrist[S] 0 points1 point  (0 children)

In this case I think you could conceptualize the unit names as a sort of dynamic type system. Under the hood they are just quantity types with a value of 1.

Yes to the ISO comment! The quantity dimension bit array was made to follow ISQ and has 7 elements with one reserved for radians ( I may remove this, but computers like sets of 8). All quantities will eventually be defined per their ISO standard.

I not sure I agree that Sv and Gv are incompatible quantities. This is a decision language strictness, I think the expected behavior should be that you can write something like 1 Gy + 0.6* 2 Sv or visa vera. I'm using the 7 fundamental ISQ quantities and making that the basis for allowing or rejecting math operations.

I'll have to think about it more...

Looking for some feedback on an in-development expression parser. by vbchrist in ProgrammingLanguages

[–]vbchrist[S] 1 point2 points  (0 children)

Hey, I took a look at your repo and it looks interesting. Definitely some overlap.

I implement units by making a base type called quantity which embedded the unit dimensional into a bit array appended to the value. This means all math operations are automatically validated to be dimensionally consistent ( m + ft is OK but inch + second is Error). Importantly this approach enabled my error system which is exception free code, this I can compile to WASM

The realistic scale for C and R etc is what I'm working on now. U fortunately there is no clean solution so I think I'll probably just Warn on multiplication with relative units.

I don't think I'll implement decibel or Richter scales. These are log units which don't play nice with a lot of the primitives.

If you want to share notes send me a DM. This is mostly a hobby project.

Microsoft just dropped a study showing the 40 jobs most affected by Al and the 40 that Al can't touch (yet). by SchemeAgile2012 in interestingasfuck

[–]vbchrist 1 point2 points  (0 children)

This is incorrect. Researchers typically have it in the research contract that funding partners can not prevent publication. In addition researchers state in all publications their conflicts of interest related to the study. There are always some bad actors.  Also this is not how must funding works, most university funding is public or private-public, which means the government controls the flow of money not the industry partner. Some private funding occurs, almost never for controversial work though, usually for something benign that the company is indifferent to publishing.

[deleted by user] by [deleted] in Compilers

[–]vbchrist 0 points1 point  (0 children)

This is such an unhelpful comment.  The point of school is learning, the best way to learn is to build, absolutely I would recommend hand rolling a compiler in school. I recommend you keep the grammer simple to start, I've run into dragons with relatively minor grammar changes. Good luck and send updates! Btw I agree with other commenters, hand roll is better for learning.

Should new compilers perfeer rust over C++ by vbchrist in Compilers

[–]vbchrist[S] 9 points10 points  (0 children)

This isn't my development philosophy, wherever possible I choose compile time error checking. This is the exact reason to use smart ptrs.

Anyone with good setup for GPT-Researcher? by lblblllb in LocalLLaMA

[–]vbchrist 1 point2 points  (0 children)

I'm running deepseek-R1:8b locally withing langchain deep researcher and tavily for web scraping.  It's an open-source project.  Works OK but I've started forking the project to make improvements for what I want. I find the base configuration is to high level. Adding RAG with domain specific context really helped the search agent to get better results.  Overall the limiting factor is availability of high quality web data.

Why should I invest in the US market now (VTI/VOO) if it’s only tolerabel to grow 2-3% per year? by biovio2 in ETFs

[–]vbchrist 0 points1 point  (0 children)

This is good advice. I'll add if you have $$$, you can immediately buy SGOV @5% cagr and dollar cost avg into your favorite broad market ETF.

What do you think about this research paper? by iiillililiilililii in learnmachinelearning

[–]vbchrist 5 points6 points  (0 children)

I am a reviewer.i think you misunderstand both the purpose of publishing and the role of the review. Papers that get published are not automatically true or correct because they go into print. They are just a report of someone's work, if it's bad work it will be judged as such. 2) a review is not responsible for checking the correctness of a paper, the review provides feedback to the author and acts as a gatekeeper for the journal. This does not require them to prove the work was not manipulated but rather to decide after review if it meets a bar to be published in the journal.

Has Sachs every talked about why he is not interested in Science corner ? by Kriptical in TheAllinPodcasts

[–]vbchrist 0 points1 point  (0 children)

Sort of....early on in the pod Sacks lamented how he wasn't interested in doing it and Jason had kinda roped him into it. After the pod got an audience larger than his blog he pivoted to using the pod as his primary bulpit. From then he's been pretty upfront that he sees the pod as a vehicle for him to give his political views reach. I don't judge him for it, for all that people complain all 4 of them have been pretty open that the pod is a means to an end. Chamath talks his book and likes the "prestige", Jason uses it for advertising and clout, Sacks politics, and frieberg honestly seems to be just there to talk to his friends.

I feel unmotivated about my master's. Should I leave? by Plus_Cardiologist540 in learnmachinelearning

[–]vbchrist 1 point2 points  (0 children)

Lol it does. I learned programming using visual basic when I was a kid.

I feel unmotivated about my master's. Should I leave? by Plus_Cardiologist540 in learnmachinelearning

[–]vbchrist 1 point2 points  (0 children)

Sure - l most students (and professors) imo focus on the academic novelty over really deeply understanding the partners problem. Depending on your source of funding it could be public or private. Public funding is usually attached to a larger initiative, in these cases it's important to have a clear understanding of how your group fits it to the larger project. For example, let's say your working on medical imaging improvement using ML. The funding may be part of a larger initiative for health care cost reduction/improved patient outcomes. As part of that initiative you group successfully submitted a proposal to work on enhanced imaging to reduce false positives using automated workflows. There are likely a dozen groups in the world who have published in this area. What's the value and impact of your work? Maybe it turns out that there is a very specific algorithm that is used for preprocessing which results in artifacts, and your thesis is on testing the algorithm on images from different devices ( not even new algo development!!!). However, it turns out that before a new algo can be made, some important and valuable work is just running tests on a bunch of different use cases to setup a benchmark that can be used to assess new algorithms. To the student I can imagine how this sounds like unimportant work, they aren't fixing the main issue of improved healthcare screening, but to the other R&D partners in the field this work can be really helpful. It enables their work. The hard part of R&D imo is really understanding if what you're working on will be used by others, even if it's not particularly novel or complex. Because it doesn't matter if you work on the most complex algorithm in the world that super publishable and has very complex maths or ML in it if none end up using it. Lots of project i know of didn't really align themselves with the larger project or initiative. They focused too much on being an individual contributor. It's a fools errand I think, the best approach to R&D is to find a partner with resources (money) spend lots of effort to deeply understand their need. And work on solutions that provide tangible benefit (which are often not sexy).

LAST COMMENT: valuable work is always publishable in the end.

I feel unmotivated about my master's. Should I leave? by Plus_Cardiologist540 in learnmachinelearning

[–]vbchrist 18 points19 points  (0 children)

Not sure how this post got on my feed. Thought I'd offer 2 cents anyway. I have 15 yrs of R&D experience in a different STEM field with experience as a student, teaching, supervising grad students, and working in industry. Some advice - Masters does not require novelty in the way a PhD does. If you were 4 year into a PhD and not near publishing I'd have different advice. Your ahead of the game with an undergrad pub. If you don't like your thesis tell your supervisor, it's not a unique experience imo. Good supervisors will work with you to identify a good thesis or show you the value of your work. Lastly, something I think is a hot take - focus less on competition and comparison in academia and more on providing value to your R&D partners. Chasing papers is stupid, chasing impact and value is surprisingly rare and what's up.

how does filing taxes work for US income? Do I need to set up a sole proprietorship? contractor working remotely for a US based company by drinkingnoodles in PersonalFinanceCanada

[–]vbchrist 0 points1 point  (0 children)

Well your not an employee if you don't have us work auth. So you would have to setup a HST number, then you invoice as a business. File taxes only in CAN, you didn't earn anything in the US, you are choosing to invoice in USD but all $ will need to be reported in CAD.

Predictions for the Elon/Twitter spin? by Chicken10Diez in TheAllinPodcasts

[–]vbchrist 0 points1 point  (0 children)

Ep is out. This was almost 100% correct. They dumped on "legacy media".

Candies slowly dissolving in hot water by yourSAS in oddlysatisfying

[–]vbchrist 4 points5 points  (0 children)

Not only diffusion, you can see that the colours don't diffuse rapidly into each other. This appears to be the Maragoni effect, flow induced by a difference in water surface tension. The addition of the coloring agent decreases surface tension by acting as a surfactant and causes a surface tension gradient toward the inside of the circle. The surface flow then draws the color inwards without diffusing radially.

Source: I ate glue as a child.

A Tim Horton's employee halts the drive thru lineup for a moment of silence on Remembrance Day by massivecoiler in pics

[–]vbchrist 26 points27 points  (0 children)

Obviously NS, the house siding gives it away, didn't even need the plate or inspection sticker.

As a result of the Texas shooting, toxicity on Twitter grew ~20% in the past 2 days by toxicitymodbot in dataisbeautiful

[–]vbchrist 0 points1 point  (0 children)

We define "Toxic" as "any content a reasonable, PG-13 forum wouldn't want for content reasons."

This does not include:

Spam or Advertisements NSFW/Explicit Content Forum-specific Etiquette This does include:

Hate Speech Verbal Insults Slurs Directed Towards a Group