7
retoor
42d

I discovered a language I didn't know AND i like.

It's not under active development anymore, but I decide it has a nice syntax. It's made by the writer of craftinginterpreters. There are still people writing some extensions for it.

I decided to implement socket support in it.

That went very well and the result is just BEAUTIFUL. But now, i have a collection of socket functions that require a file descriptor (sock) for every function like write, read and close. We're not living in the 90's. I want to do sock.send(), sock.write() and sock.close(). So socket as an object.

I wrote a wrapper and it is freaking TWO times slower! Hows that even possible.

I've made wrapping to object optional now. Bit disappointing.

The language shows off with benchmarks on their page. Their fibers can even be faster than Elixr. Yeah, if you only use the fiber and nothing else from language. I benchmarked string concat for example against python: 1000 times slower or so.

The source code of wren is so freaking beautiful. Before Lua was my favorite language regarding source. The extensibility is so great that I prefer to work on this one instead of my own language. They kinda made exactly what I wanted. I can't beat that.

For if you're interested: https://wren.io/

The slot way of communicating between host language (C) and child language (wren) seems odd at beginning but i became fan of it.

Thanks for listening to my ted talk.

What's your opinion about wren (syntax)?

Comments
  • 9
    When pure python is faster than you, you gone fucked up
  • 1
    Wren IS a beautiful language. Slots seemed entirely intuitive when I first encountered them, and Bob is a bit of a mad scientist that did it just right.

    It's an absolute travesty that wren is so obscure. I'm surprised to see it mentioned at all.

    If only they had mixins support, it'd be perfect. (of course he could have added it since last I checked it out, so ¯\_(ツ)_/¯)

    That statement probably pisses off a few people, but composition is still second class in so many languages.
  • 1
    @atheist Nah, not since the changes a few months ago. Python isn't that slow anymore and it's async beat's JS IIRC. But again, as example with the fibers i describe above, if the rest of language is slower, there's no benefit in that.

    But really, python slow is an old opinion
  • 1
    @retoor I've only ever used it for testing if various ideas work at all to begin with, so performance was never relevant, but I guess it is to a lot of people.

    But the more I've programmed, the more I've found what I thought intuitively wasn't true but turns out is: algorithmic complexity is vastly more important than the underlying language performance (generally).

    Over and over again I've encountered situations that confirm this. Not telling you anything you don't already know of course.

    But for example you have the GIL removed now, Pypy, and a dozen other projects to boot.

    And if not, theres always Nim, or Julia (which was lovely btw).
  • 1
    @Wisecrack the performance thingy already flew out of the window when choosing for a scripting language so how much does it matter indeed. Python these days is rapid fast.

    But i don't understand why people care about the GIL that much. I think I understand it, but why should removing it from Python makes it faster? It's not like the interpreter needs threads or anything for source code interpretation. That stays single threaded. The GIL is introduced because not all C source was thread safe. Fine, it's gone now. Thread safe. But that doesn't change any execution time I guess. GIL sounds scary, but because of the fake threads we currently have in python we can return values easily. For real threading, concurrent.futures till i die.

    Am I wrong? Is there's a reason that it should improve python's performance? How?
  • 1
    @retoor Nothing technical. I just had to work around the GIL like ten years ago one single time, but it took a whole day to solve it, and I've had a death-oath level of grudge against it since then.

    You know that old saying "what is good in life? To see your enemies driven before you."

    yeah that.
  • 1
    @Wisecrack also smth you do one single time is using asyncio to actually speed up things. It's a freaking myth. My seRVeR iS RewrItteN iN asYncIo And IS so mUCh FasTEr NoW. That's because of the select syscall they use under the hood in SPECIFIC cases. You can do that yourself too.

    Sorry, unrelated personal rage. Should have made a rant maybe :P
  • 1
    @retoor I store up good rants like that, so I can post them like tiny little bombs to Devrant.

    Also seen jeeper recently. It's been over a month, and last he posted he said he was sick lately.
  • 2
    @wisecrack I miss @fast-nop lately. When he doesn't call my dad a loser, he's actually a nice guy with a lot of knowledge. Sad if he doesn't come here anymore
  • 1
    @retoor yeah him too. Feels like we're losing the original gang.

    Even I came on relatively late to devrant, but still.
  • 0
    @Wisecrack reddit is kinda dead too in comparison to before. Did people just unplug the internet regarding communities? They all made friends or smth? Stopped caring about opinions of kinda strangers? I mean, where did they replace the online community time with. Not mainstream stuff like tiktok i hope
  • 1
    Nice syntax
  • 2
    @MammaNeedHummus yeah, it's exactly like the language i was writing myself. I'm not even disappointed that it already exists. The source is so clear and good that i just extend this one. My own language works well but it has a few caveats and they keep comming. I was at the point that i have to do tradeoffs very change regarding performance. As long your own language can't do a lot and don't think about the rest,, the development goes speedy. Coding coding coding. But later it becomes a kinda large sudoku
  • 2
    @Wisecrack It's like they say on the streets: real men write Wren. Sperm quality is degrading for years like the amount of Wren users. I don't think that's a coincidence. The moment you start doing Rust, you'll shoot blanks
  • 3
    its just js
  • 0
    @kiki no, many differences
  • 2
    @retoor "the moment you start doing rust you'll be shooting blanks."

    Thats a weapons-grade phrase right there.

    Nuked from orbit.

    If it ever spread, rust would be dead.
  • 1
    @Wisecrack If it ever spread, rust would be dead is also a killer line. I outcode a rustcean with brainfuck on a Tuesday using a magnetic needle on a freaking CD while consuming Ferris the crab as snack If I have to :)
  • 1
    @retoor Ferris, little crabby crab, doing little crabby crab things..your sacrifice will not be in vain!
  • 1
    @Wisecrack that crab has been seen at epstein Island. Rust has the same benefits as being a crab
  • 1
    @retoor what benefits? seeing horrors beyond comprehension?
  • 1
    @Wisecrack being unable to escape when getting cooked. Getting cooked alive because humans think you won't feel it like a lobster. There's more where that came from
  • 1
    @retoor The delicious depravity of lobster knows no depths, but the depths of the cold cold sea.

    I think half the reason people eat it is as an excuse to eat butter.

    I'd love to try it, it smells delicious. Unfortunately allergic.
  • 0
    @Wisecrack never had lobster, not very interested. it just doesn't look like food to me
  • 2
    @retoor giant armored sea spiders are not for everyone.
Add Comment