@nycki ohh - that definitely makes sense! you almost need like a database schema or something. that sounds like an interesting problem to solve. maybe you could even include type information in the schema, so that the nifty could be type-checked at the same time that it’s being converted
@OctaviaConAmore that is amazing tbh - my Linux friends seem to still have trouble with certain games that are in beta or just heavily modded or otherwise very tech-heavy - but otherwise it’s amazing how well they’re able to play pretty much any Window game through stuff like Proton
@nycki I haven’t unfortunately, but I love this! when I was younger I experimented with a ton of different languages that transpiled into HTML, but they often had weird implicit rules or syntax that I had a hard time getting an intuition for. this feels dead simple, easy to learn, and much easier to read too
quote are optional around one-word strings
hmm, another possibility would be to steal from Lisps (especially Fennel) and have one-word strings be quotable using a prefixed : like this:
(div
((p class :foo "Hello, world!")
(p class :bar "some text")))
I think that would probably be how I would do it (edit: actually, I guess in this case class doesn’t need to be quoted but foo does, but what makes class special here? maybe it would be :class :foo instead)
also I’m curious what JSON would look like in nift! JSON is already fairly terse, but has some annoying syntax rules (like no leading commas, and no comments allowed)
come to think of it, you could fix the noisiness by having two sets of syntax: the usual long-form { } syntax and a short-form [ ] syntax for when you want to make a simple, quick literal:
let someNums = [1, 2, 3, 4]
let aDict = [
"foo" = "bar",
"baz" = "qux",
1337 = 7331,
]
both would create the same type of value (a Lua-style table) but one would be a shortened form of the other
imagine a language like Lua except every table literal is actually a block of code that is run like a module. for example:
let someTable = {
export someValue = "foo"
let privateValue = "bar"
}
print(someTable.someValue)
# prints "foo"
print(someTable.privateValue)
# error
that would mean that when you require("someModule") you’re essentially wrapping the entire someModule file inside of { } and getting the result
it would make table literals more noisy but it would also let a Lua-like language have even fewer concepts that need to be learned in order to understand it
plus, you could define a whole class inside of one set of { } which would make the syntax mirror how most other languages do classes - and create a visual divide between the class and any unrelated stuff that might exist in the same file:
let SomeClass = {
export new = (value) -> {
let newInstance = {
let privateValue = value
}
setmetatable(newInstance, this)
return newInstance
}
export getValue = (this) -> {
return this.privateValue
}
export setValue = (this, value) -> {
this.privateValue = value
}
}
let instance = SomeClass.new("foo")
you could even make it so that if you return inside of { } then the whole { } block evaluates to whatever you returned, so you can have multiple statements inside of your expressions (and not just table expressions) just like in Lisp:
let fibonacciNums = {
let a, b = 0, 1
let nums = {}
for _ in range(100) do
a, b = b, a+b
list.push(nums, a)
end
return nums
}
print(fibonacciNums)
# {1, 1, 2, 3, 5, ...}
@harmonycorrupted @trinityblair I’m curious why not - do they have bad associations with the platform, or just see it as too niche?
Random violin teaching moment
One my favorite questions to ask is: “What did we do in here together that you wouldn’t have thought to do on your own?”
A primary goal for me as a teacher is to teach students how to teach themselves. I want them to be as independent as possible and have the tools to learn and play music on their own
the problem with Windows is that it can take a lot of tinkering to get Linux software to run
the problem with Linux is that it can take a lot of tinkering to get Linux software to run
It is depressing if someone experiences hate on here, especially if it puts them off using this place.
I follow people that regularly raise these issues, to hear how bad it is and what the causes are.
Five things seem to come up most often:
- Lack of representation in software design
- Users not being able to control who can reply to their posts
- Moderation being reactive rather than proactive
- Allowlists vs blocklists
- Cultural problems
Let's look closer...
🧵 Thread - Part 1 of 7
People say you shouldn't compare apples and oranges but it seems to work fine for me in Python 3.14, I don't see what the issue is...
The Japanese Bee Fly mimics a bee, is super cute and was the inspiration for the Pokemon Cutiefly
Hey Fedi,
How are you doing today?
Everything okay? Do you need a hug?
I bet you could use a hug.
🫂
a thing about Lisps that I find very beautiful is that you can learn their basic rules (syntax, macros, and execution) very quickly and easily*, and after that point you’ll understand all you need in order to make sense of anyone else’s code (as long as you can look up the forms that they’re using). you’ll never run into a situation where you don’t know what you’re looking at, syntactically speaking - which can happen a lot in non-Lisp languages
but a big complaint that I have about Racket is:
I get the feeling that Racket is overall a very complex and densely-packed language - designed to give users as many options as possible. and I have mixed feelings about that approach. it makes the language less beautiful to me, and harder to learn, but there might be a lot of practical value in doing things that way
* nothing involving programming is quick and easy, but it’s “very quick and easy” compared to learning the equivalent information in almost any other language
first impressions of #Racket seem pretty good! it has some stuff that I don’t like from other Lisps like:
it’s also a very very complex language compared to Janet or Fennel. but the things that I really like about it are:
my overall first impression of Racket is that it’s the Python of Lisps: it’s very complex and full-featured, but it also cares deeply about being as easy and friendly for beginners as possible, and I think that’s one of the most important traits for a language to have