« first day (143 days earlier)      last day (433 days later) » 

02:34
@AlexisKing Rust is a nice counterexample
aliasing mutably is impossible
 
4 hours later…
06:31
So I chose Haskell as the backend of Cockatrice, and this is the first few lines:
data Type0 = None_t | Int_t | Float_t | Double_t | Char_t | Enum_t | List_t | Fn_t | Karma_t | Type_t
data Value = None
    | Int !Integer
    | Float !Float
    | Double !Double
    | Char !Char
    | Enum String
    | List [Value]
    | Fn ([(String {-ident-}, Maybe Type0 {-param type-}, Maybe Value {-def val-})] -> Value)
    | Karma (IO Value)
    | Type0 Type0
Pretty sure I need Handle also but whatever
Wait, Enum is occupied by Prelude. Dang.
06:57
You can hide it if you need to
07:13
@DannyuNDos Is _t something you have to do in Haskell because the variants of Type0 aren't qualified?
I feel a little sad that that's a thing you have to do
07:42
0
Q: Does WebAssembly have any instructions which don't have analogues in LLVM IR?

FlatAssemblerI know EMSCRIPTEN can convert between from LLVM IR to WebAssembly, but I don't know of any tool that converts from WebAssembly to LLVM IR. Such a tool would come useful to me, as the compiler for my programming language outputs WebAssembly, and I would like to be able to make native ARM executabl...

 
8 hours later…
15:27
... how are they the same question
16:08
@user That is one of the drawbacks of Haskell (I say as a Haskell fan, ha). There are some ways around it. For example, you can put the types in two different modules. Then everything can have the same name and you can use qualified imports. In my experience, that actually works decently well in many cases.
Expectation: "Whence Rust came, everyone say say no no C C."
Reality: "Whence Rust came, everyone say yes yes C C although sometimes yes yes Rust Rust. it's confusing."
Let's become rusty then.
@user Although, to be clear, that situation doesn't happen that often (it's certainly not like you need to do that with every sum type or something like that).
What is the best name for types?
First name?
For example for a number, Number, Integer, Real, or number, integer or real? Int? Standard.integer? Standard.Integer?
16:59
0
Q: Is there a way to run python based SageMath on a certain python version?

YazeedAllabadi24I currently use python 3.11.3 on Apple Silicon Mac and all my libraries are installed on that version's source directory. For some Reason SageMath runs on python3.11.1 which doesn't have any packages installed especially the Crypto and primefac libraries that I use for cryptography. Is there a wa...

17:40
@Seggan It’s absolutely possible, it’s just unsafe. A lot of necessary things are ultimately unsafe. (This does not in any way reduce the value of safe Rust.)
yeah i shoulda qualified that
@The_AH its all user preference
a lot follow C: int, float, double
(or their uppercased version)
CMP: so I;m currently implementing a language that is basically Lua with some changed syntax and a few extra features. I really don't like pcall as an error handling mechanism, and I've been trying to add something like a try-catch
where you can throw a table { "__type__" = "WhateverError", "message" = "A message" } and use catch "WhateverError". However, it feels sorta unnatural (to me). Y'all have any other ideas for an alternate error handling mechanism to fit within a Lua-esque language?
Hmm...
What about using a more beautiful errors as objects syntax?
So...
err = Error("WhateverErrorr", "A message")
And then you can inspect error to see what the error was.
There's no raising but rather you return the error.
So you can implement a custom data type for this.
 
6 hours later…
23:28
Rust does that

« first day (143 days earlier)      last day (433 days later) »