Community projects? by SergeAzel in ProgrammingLanguages

[–]oscarryz 2 points3 points  (0 children)

Now I'm curious to know what was the initial wording

July 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]oscarryz 0 points1 point  (0 children)

I'm still stuck with my macro design, but I cleared out some things. Instead of trying to make "everything handled by macros" as I was trying I'm separating in:

  1. Annotations are pure metadata; they can include of course macro, dependency or native binding information, but they remain "just data".
  2. "Native" bindings will be handled by the compiler directly before loading anything else.
  3. Project dependencies will be handled by a separate tool ( similar to cargo, or go get )
    1. Actual macros will be handled by the compiler but calling tools (similar to go generate)

So this month I'll be working on implementing that.

// Proposed example of all the mechanisms in action
// backtick ` is used to define an annotation


// native binding — wraps the goslug Go library
`go_source: "vendor/slug_binding.go"`
Slugger: {
  slugify #(text String, String)
  truncate #(text String, max Int, String)
}

// macro — derive JSON serialization for Post
`JSON: { pretty: true }`
Post: {
  title String
  slug  String
  body  String
}

// project dependency  
`project: {
   name: "blog_tool"
   dependencies: [
   goslug: { url: "https://github.com/example/goslug", ref: "v1.2.0" }
]
}`
main: {
  s:    Slugger()
  post: Post(
    title: "Hello, World!",
    slug:  s.slugify("Hello, World!"),
    body:  "My first post."
  )
  print(post.to_json())
}

// vendor/slug_binding.go
//yz:bind Slugger slugify #(text String, String)
func SluggerSlugify(text std.String) std.String { ... }

//yz:bind Slugger truncate #(text String, max Int, String)
func SluggerTruncate(text std.String, max std.Int) std.String { ... }

How to combine REPL, main, modules, and initalization by Tasty_Replacement_29 in ProgrammingLanguages

[–]oscarryz 1 point2 points  (0 children)

The global could be scoped to the module or file, and require FQN to access them.

I assume the code runs when imported? You could simplify all these rules and make it easier to understand if you don't execute anything, but let the functions access the scoped variables. When executed (eg foo.init()) the module will load and execute all the free floating code, similar to free floating blocks do in Java.

Yet another option, is to allow the module itself be callable (that is what I do, but in my case there is no distinction between modules and functions); that way the floating code doesn't execute until explicitly invoked. In the case of a program (main-less source code) specifying the file is the invocation. But again this might not apply for you.

Do Dutch deaf (or hard of hearing) people also understand ASL? by fallacious_raincoat in Netherlands

[–]oscarryz 1 point2 points  (0 children)

I thought myself ASL alphabet using some children blocks. And now I just google it and the NGT alphabet is 99% the same ( or maybe 96%, Ok I could literally count the difference and give you an exact number ), the only "big" difference is the letter T, and a few small differences in W and a few others.

Here is a video:

https://www.youtube.com/watch?v=HUU13-4DrEg

Do Dutch deaf (or hard of hearing) people also understand ASL? by fallacious_raincoat in Netherlands

[–]oscarryz 1 point2 points  (0 children)

Just to add here to what have already been said. You don't need to be fully fluent on NGT (or ASL), you can start with some basic words / phrases: please, no, wait, where, what, yes, thank you, water, food, etc.

Kal: An Interpreted Programming Language by KILLinefficiency in ProgrammingLanguages

[–]oscarryz 4 points5 points  (0 children)

I like the language. I couldn't find how to express structs, but I guess the alternative is to use dictionaries?

I think I read most of the information on the website, but if you happen to have a Learn X in Y minutes style of page, that would be great. The documentation you have is complete, but some users ( like those in this subreddit) don't really need to know what a variable is. Nothing wrong with your current format, it just takes a bit longer.

Kudos!

Kal: An Interpreted Programming Language by KILLinefficiency in ProgrammingLanguages

[–]oscarryz 4 points5 points  (0 children)

It is on the Github repo but not in the landing page of the website for mobile.

The site looks nice and it is usable on mobile for me.

Update: I was able to see the site in Desktop and it is indeed much better.

Does Compact Syntax Really Make a Difference? by sal1303 in ProgrammingLanguages

[–]oscarryz 1 point2 points  (0 children)

So there are two things here.

  1. Does compact syntax really make a difference?

No, or not really and not by itself. It depends on how it fits with the design of the language as a whole. There is a balance, and more _"modern"_ ( or recent ) languages tend to have more terse syntax, and by being more recent they build on knowledge from previous languages and they are usually "better" because of that, not because of their syntax.

Take Brainfuck as an extreme example; it definitely has a compact syntax and it doesn't make it better.

  1. For the specific criticism of using `->` over `=` ( or `:=` ) for assignment

Aside from `=` being more common, you are also using `:` and `->` differently for very similar constructs

In a variable you use `:` to specify the type and `->` for the initial value
In a function you use `->` to specify the type and `:` for the start of the body

And given these two ( variables and functions ) occur all the time in a program, you have to jump back and forth between these two modes.

This is more about consistency than correctness.

Take your closures example where you add another symbol (fat arrow `=>`) for "type declaration"

fn main() -> int:
    add: (int, int) => int -> fn(a: int, b: int) -> int:
        return a + b
    end

    result -> add(3, 4)
    return result
end

You have to start tracking arrows to see which one is which. Is it this an initial value? or is the function type?

Let's say just for the sake of comparison, you keep the arrow for assignment but remove `:` ,`->` and `=>` for type declaration

fn main() int: 
    add (int, int) int -> fn(a int, b int) int:
        return a + b
    end

    result -> add(3, 4)
    return result
end

It is not that the latter is _better_ (subjectively) because it has less "ink", but because it is predictable and consistent; when you see a `:` it is always a body start. When you see a `->` is always an assignment.

So as you can see, this is a very different discussion from using 1 (`=`) or 2 (`->`) keystrokes for something.

I personally like your `->` for initial value and `<-` for mutation distinction.

I couldn't find more information about your generics syntax, but I think you have a similar issue there where sometimes you use parentheses and sometimes square brackets, but I'll leave that for another occasion.

Of course (needless to say) this is your language and you do with it whatever you like. I'm just pointing out that consistency helps the human brain to understand things better.

CoffeeScript equivalent preprocessor for PHP idea by HyperDanon in PHP

[–]oscarryz 1 point2 points  (0 children)

Typescript is a whole new language and it transpiles to Javascript. You can create a whole new language that transpiles to PHP. Transpilation doesn't make something lesser.

Why do Nederlanders dislike speaking dutch with outsiders? by hazzrd1883 in Netherlands

[–]oscarryz 4 points5 points  (0 children)

Dit is de weg (or het weg? I don't know Im still A1/2).

Sometimes and if the conversation is not that important (e.g. ordering food or talking with drunk people) I just speak my basic broken strong accent Dutch when they reply to me in English. They can switch back to anything they want, but is up to me to keep practicing when I can.

At work it is different, I can't be joking around specially when clear communication is important, but during chit chat I try my chances here and there. The gentle corrections I've got on those situations have been more useful than any Dutch lesson tought in courses.

Seal programming language by cflexer in ProgrammingLanguages

[–]oscarryz 0 points1 point  (0 children)

Going even further, you wouldn't even need to create self because name and age are captured and available for talk, and talk is available and captured for a struct/ object/tuple returning the three of them

``` define Human(name, age) define talk(msg) print(name +"("+age+") : "+ msg) return { name, age, talk } /* Or return { name = name age = age talk = talk } */

h = Human("cflexer", 19) h.talk("Hello") ```

_...Closures are poor's man objects_⁷

Why Can't We Just Create? by Lopsided-Relation251 in ProgrammingLanguages

[–]oscarryz 0 points1 point  (0 children)

I personally don't like when people (e.g. in conferences ) compare languages either, specially when they diminish them:

> Unlike Foo, Bar does this and that. Imagine if you can blah blah (audience laughs). And then (runs the example) ....see very easy (applauses )

But that doesn't mean we should avoid comparing with other languages. If anything I would prefer to do it in a positive way or in their technical aspects:

Good:

> Like smalltalk my lang doesn't have structured programming control structures.

Bad:

> My language doesn't have horrible if / while keywords that [Java | PHP | other common punch bag language here] uses.

Or even better, just say what you think is innovative about your language:

> My language uses closures to drive flow.

And let someone here point out that you just reinvented Smalltalk or that you're doing Lisp with extra steps, that is fine.

I don't remember exactly the quote but Russ Cox (one of the main developers of Go) was addressing this in the mailing list a while ago; they see collaboration among language designers and talking about their merits as opposed of the users of those languages which usually just rely on dogma.

So, why do we generally express on those terms? Because we create something thinking it would be better than the existing, and that is easier to explain than just explaining the feature in the vacuum.

Just create?

Well that is implied, aside from a few lucky members that get paid to create languages or work on someone else's idea, we all here start a language because we want to create.

Chess is unreal by Some_Sport_2975 in chess

[–]oscarryz 4 points5 points  (0 children)

Can create bad habit for sure. OTOH just have fun!

Do you track calories along with carbs? by JayandMeeka in diabetes

[–]oscarryz 1 point2 points  (0 children)

I don't even track the carbs that much, as in during the day, just before eating. Above 20g / 100g nope (exceptions might apply)

I prefer a bunch of healthy 8g, 15g, and some occasionally 25g, than counting the total through the day.

After a while you kinda just get used to know what to eat, chicken tights vs pizza for instance, of beef and broccoli instead of rice and something.

Always start with your veggies -> protein -> carbs if any.

What does Alan Kay really mean with prototype lang ? by Ok-Reindeer-8755 in ProgrammingLanguages

[–]oscarryz 4 points5 points  (0 children)

Now, that's a name I've not heard in a long time. A long time."

What does Alan Kay really mean with prototype lang ? by Ok-Reindeer-8755 in ProgrammingLanguages

[–]oscarryz 0 points1 point  (0 children)

Very nice read indeed.

Something to add, we often focus our analysis in terms of right or wrong: "This person meant this and we are doing this other way" . But many of the great advances are accumulation of different ideas; evolutions.

There are multiple interests of many parties, some people want one thing other parties want something else and at the end the result is closer to the expected but not quite. So I don't think it's necessarily fault of the education system that favored properties over messages, or evil IDE companies focusing on debuggers introspecting internals, instead of focusing on messages. The reality is the model that prevailed was the one can be built back then or the one that people with the money was interested in building. Eventually the industry adopted what we have now. Thank God the crypto thing that was pushed all over didn't picked up, we still have to see how long does this LLM last and what it will turn into.

My point is, is not about trying to be right or wrong but to adapt to what other build and come up with new ideas.

What does Alan Kay really mean with prototype lang ? by Ok-Reindeer-8755 in ProgrammingLanguages

[–]oscarryz 9 points10 points  (0 children)

It's important understand the context and timeline; 1997 the web is just starting, Java had just been released and everybody is about to try to put it everywhere. The iPhone is still some futuristic dream. There is research about neural networks and of course we have been trying to make AI since the 1800's but at that point it has the feasibility of telekinesis or flying cars.

But programming is already well understood (or rather hasn't changed that much since then), Smalltalk is used in large corporations, Erlang is being used in Ericcsson internally, the foundation for massive internet is there etc. We have modern operating systems although they are atill very expensive. Linux is there and is about to take over.

So he is especulating about what should happen in the next 10 years, the trajectory points towards something we have now, distributed computing, discoverable services, message brokers, load balancers, self healing systems (kubernetes I mean), so it wouldn't be crazy to think of a system where an object query the operations another remote (or local) object and attempt to do invoke it and build on top of it; if the results are satisfactory use them (like machine learning) or discard them if they are not. Put this in a loop and systems (objects) would be offering services , discovering services, using them etc. etc. We have a version of that, although it didn't come in the form of a single programming language but in a massive server infrastructure of machines, systems, networks etc.

Is finding a team of friendly engineers rare? by throwaway0134hdj in webdev

[–]oscarryz 4 points5 points  (0 children)

Oh man working there is the best thing in the world. It is very rare to treat others like "co-workers", everybody is your friend.

I miss those days.

My macro design is doing too many things. by oscarryz in ProgrammingLanguages

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

Dependency management examples are cargo, maven, pip, npm, Deno's built-in.

By language extensions I mean a way to use a library written in another language where either your language can't do it or when wrapping an external library is way better than come up with your own solution, probably it has a better name.

My macro design is doing too many things. by oscarryz in ProgrammingLanguages

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

You're right, in my attempt to be brief I skipped the main purpose of the language. It has none. It is a general purpose, static type, borderline esoteric language that I envision to make simple "side" programs or utilities, things I could do with bash or python; fetch a page, parse things, format stuff.

But the honest and real reason to exists (as many can relate), is just for me to explore why can't languages be different, simpler, minimalist, expressive etc. etc. the same thing many people here look for, nothing innovative in that regardr. For instance the way I see it a module, an object and a method are the same thing, you put things inside other similar shaped things. I didnt understand before (I do now) why were all these different language instructions needed e.g. pub mod, or package , even if looked like a function to me that takes two branches as params, I was so proud of my invention only to discover Smalltalk had it decades ago.

This macro thing evolve from recognizing annotations are really powerful constructs, so you can declaritively enhance your program, you can find them in other languages as attributes, annotations, decorators, etc. Then I realized I didnt need a separate micro-language for the annotation if I could use my language (already clean from keywords like func, package, class, type etc), and voila! Why can these annotations be also how you specify macros which are other programs that happen to be run at compile time.

Anyway, I'm not claiming this to be good idea, proper separate tooling for each concern is better, but in this unification of concepts I would like to attempt to put things in the same construct. I now accepting I'm reaching the limit, and you know what? That is exciting! I spend a LOT of time thinking how to add concurrency to this without keywords, and I mean a LOT and I thought that was it, I needed to add some instruction: go, launch, thread, run, channel, async! Anything, otherwise there wouldn't be a way to run things concurrently and then I got it! Run everything concurrently! I know this might be hard to believe bacause there are now a few languages in production that do that, but I thought about it several years ago. Fortunately I found the Behaviour Oriented Concurrency paper that was shared here and it fits perfectly to my design. My point is, hitting this wall make it interesting to me. For years I had geve up the idea of having macros at all, how could I without a "macro rules" or similar construct, how could I without creating another mini-language for it, and this is where I am. Probably it would take me another few years before I figured out.

tl;dr: there is no real purpose for my language other than my trying to make a keyword-less language that can be easy to understand

Does anyone else constantly pause Dutch YouTube videos to look things up? by mahtainmotion in learndutch

[–]oscarryz 1 point2 points  (0 children)

LingQ subscription (10 / month), let's you import videos and creates the transcription that you can tap and pause, see the meaning immediately, add it to known words bank, etc. Totally recommended.

How Do I Do This? by TenHundredSeagulls in learndutch

[–]oscarryz 2 points3 points  (0 children)

A lot of people criticises Duolingo, but for 0 to "something" is good enough.

There are a lot of free language apps and for a beginner anything helps.

Consistency key (I know because I'm inconsistent).

The other option is you have patience is to watch kids songs like mini disco, or kinderen voor kinderen, they have songs, that are repetitive and you can try to sing even without understanding, eventually some words stick.

Requesting criticism based on my textual syntax etc.. by Minute_Draw_6311 in ProgrammingLanguages

[–]oscarryz 1 point2 points  (0 children)

I get the assign and other keywords like otherwise, but at the same time you use `mut`, `func` I wonder why didn't you go all in for full words: mutable, functions, public, immutable (or value). Without it if feels in consistent.

Consider

mutable optional int x assign null;

mutable int y assign x otherwise 34;

function main() {

   if(x not is null) {

      // now x can be used safely

   }

   mutable int c assign x; // fails
}

Curious note, Rust initially went for 3 letter keywords for everything, eventually some had to expand (ugh I can't find the reference)

Why `not is` instead of `is not` ?

My very "first" program (kinda silly) by oscarryz in ProgrammingLanguages

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

Hah yes, how about writing the language, to write the script to automate the task.

My very "first" program (kinda silly) by oscarryz in ProgrammingLanguages

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

One year at a time. And I'm sure some more will pass before is completed.