Can someone please help me understand how one could make his own frontend for the Ferdiverse? It seems like to run on a bespoke protocol, and has HTTP endpoints as well. The help says you can create your own frontend, divorced of HTTP. What I am wary of is the documentation being out-of-date....
I think ---DOCKER--- is doing this. I installed based, and userspace(7)-pilled liblxc and libvirt and then this asshole inserted a dependency when I tried to install from their Debian package with sudo dpkg -i. One of them was qemu-system, the other was docker-cli because they were forcing me to use Docker-Desktop, which I would...
I posted my uname -a, it's Pop_OS!, Debian-based but not Debian. My kernel is the latest version, I just did a fresh install and did a dist-upgrade (uname -r says 6.8.0-76060800daily20240311-generic).
Here's my entire command history since I installed this one a few days back (I got nuthing to hide!)
Podman, gotcha. I am freaking tired of these Docker-esque companies. They use their status as a FOSS application to grift people. As if it's really 'hard' to do what Docker does! It's just mixing a namespaces(7) with cgroups(7), some other stuff too, like seccomp(7). Hashicorp is one of these companies, I think you know, it went entirely closed-source a few months ago. But truly, what is so 'complex' about a secure hashtable database? GNU has one! You can use libcrypto + libtokyocabinet to make one in matter of hours. I think the issue is, most sysadmins, especially old ones, are either clueless about systems programming, or if they are, they are just too lazy to roll their own. I'm not saying 'roll your own', I'm saying, you don't necessarily need super-stable software. Companies like Hashicorp and Docker find giant customers with rich pockets, e.g. AWS, either that, or some degenerate Black-Rock-esque corporate buys them out and you know, I don't wanna prescribe anything to Americans because I don't wanna be the pot calling the kettle black, but damn, imprison those damn investment bankers! They don't understand that closed source doesn't necessarily mean 'more moola'. What it means is more obscurity, more trouble finding bugs, etc. The closed-source software died fucking ages ago. Even Micrsoft open-sourced DOS, most likely they will start open-sourcing 9x and then NT, or at least, release Windows' specs; pretty soon. Say whatever about micropeni$ but they produce more FOSS these days than closed-source software! E.g. VSCode, Terminal, TypeScript, etc (I don't use any of them, but I appreciate the gesture!).
I posted my history as a response to @Technus. I know about --no-install-recommends but that's an apt(1) switch. How can I do that with dpkg(1)? Check my history, I've been building more than I have been installing lately. Like, for a long time I have been looking for a 'useful' language to make, and then I remembered that there's a swath of programmers in my country who are addicted to Delphi, and Nkki W. has not pushed to Pascal upstream since 1974. So I decided to host a Pascal on JVM. I made ANTLR. But then, it kept complaining that some targets fail, so I had to remove them from pom.xml. I myself am new to Java toolchain tbqh. I think one language that most people build from source is NodeJS. NodejS toolchain is not as good as say, Ruby's or Guile's, but it's good enough and easy to use.
I honestly have issues browsing to even the simplest of non-static pages. I think it's like, the graphical version of lynx(1) or w3m(1). I think it's based on X's browser right? So basically, it's based on the Open Webkit Standard. It uses the GTK+ WebKit engine. This engine has a programmatic interface....
So we have all these control characters in ASCII and besides newline, horizontal tab and carriage return (on Windows) the only use for them is on terminal emulators (which I am making one!) Also as an extension, us NeoVim/Vim users have extensive use for them....
About a few days ago I posted this, asking for help to implement the parser. It seems like I boomer'd and I forgot to set the Gist to public. This is public (hopefully!). Someone did gave me a link, but I kinda could not 'parse' it (get it? get it?). I still would appreciate it if you would give me guidance in parsing with...
With some help from the LLM that shall be unnamed, I created a full dossier on PostScript. You can build it to the original Markdown, or convert it to HTML, Latex, PDF, etc....
I've been trying to learn PostScript so I made this. Took almost a day and a half. I'm still not sure all the pages are up to code. Please report any errors you see....
In the Gist, I have explained my problem, and I have provided my tokenizer as well. If you can help me with the parser, that would be great. Also if my tokenizer is not very well-structured, please tell me....
Hey guys. I'm looking for some good PostScript templates and routines. I am writing something called 'EBNF Tools' in Scheme. I wrote the tokenizer and I am now writing the parser. From there, I wish to implement tools like:...
This girl acts like Wikipedia owners don't realize this shit. It's about principles. Modern web is simply cancer that is eating out the planet from the inside, one TCP segment at a time (although with HTTP3 and QUIC we gotta call it a datagram!)....
Something tells me Fish is not a capable login shell? It was in /etc/shells, but that does not mean it's a login shell right? Would any shell with job control be a login shell? I'm really scared to logout! Any help is appreciated....
Thanks a lot. I had reverted it to Zsh, now made it Fish again.
However, there's a problem that I hope this will fix, but I don't count on it. I don't know wtf happened, but whenever I launch a terminal emulator, it just hangs? I have to SIGINT to launch into the shell sessions. I hope this fixes, but what if it won't? What is keeping it? Is there a startup program idling it?
Like, the REPL won't show, just a blank terminal, I use Kitty; but the emulator that is default (GNOME?) won't work either. My full specs are in my Github profile -> github.com/Chubek
Please tell me what you honestly think of it --- this is not a 'labor of love' exactly, I only spent a few hours on it. But I think its a strong foundation for what comes next. The implementation, I hope, will be an orgy of love!...
You showed up! So, about this, you see how 'let' binding does not allow you to add parameters right? (the val binding does) I think this is a good place to use tacitness. I will basically add Perl-like, POSX-shell-like features. To further add concatativenss, I shall add OCaml-style shell (|>). I will take a page from F#'s book and add a '<|' too. I was originally planning to have these two operators be defined orthogonal-like via the operator binders (infix, infixr etc) but I think it's necessary to bake them in.
So any other cool stuff? I plan on having intrinsics like 'add' and 'or' etc. Since it is translated down to C, I will add a two-way FFI, similar to the language I am writing it in, Cyclone Scheme.
Automatic garbage collection in C is possible with libraries like libgc, but with allocppx.pl, you can just preprocess your file into generating heaps, and these heaps can be used for memory allocation. The type of GC is used, mark and sweep + reference counting. Every memory allocation MAY have a trace, and this trace can be...
Why 'exactly' is it bad that people are still using C, a language with 4 decades of toolchain and library build-up, instead of a shitlang like Rust that is mainly used to create garbage webapps?
Cool. I can't see the implementation though? Thanks a lot man. Really means a lot. @Corbin knows a lot more though. (since I called Rust a 'shitlang' I realize you may be ironic --- Since Rust is more of a 'fandom' than a 'compiler', but I'm not going to offend you by assuming so. If you are truly giving me props, it's really appreciated! :D )
Cool, as I just said, Rust is more of a 'fandom' than a 'compiler' really, it's also not much of a 'language'. I use C because it's standardized by ISO, not some basement-dwelling incels who keep RFCi'ing their ideas instead of implementing it their own.
This talk is so good that I won't spoil the twist for you. Yeah, this talk has a twist, believe it or not. Just so if you doubted that one of the inventors of Scheme and Java was not a super genius....
The advice offered by Steele in this video no longer applies. It's still a bit more up-to-date than Kernighan's talk of a similar title. The fun of this video is in how he twists the English language. He's truly an erudite man.
The reason this advice no longer applies is, that I, as a person trying to enter the world of langdev, at least personally, see no reason on defining a new language. I think we should find new ways to describe languages we already have i.e. implement them.
I am currently making a C compiler in OCaml, besides some other languages. I just began work on the AST tags. I somehow decided to use SSA versioning here.
But descring a new compiler for C, it's blaze. I only do it because C is easy, at least non-intrinsicaly. For example, there's no automatic GC. There are no first-class functions, or function literals (aka 'lambas', although this term is massively 'disused' --- function literals are one thing, lambda literals are one thing, lambda expressions are one thing, function expressions are another thing and so on and so forth -- and I don't have classical education, I just managed to understand that imperative languages abuse the term 'lambda' to a dangerous degree. They have named their literals after the concept which it derives from ,it's like calling binary computers, not the concept, the literal thing, 'Neumann machines, right? Like, go to Best Buy and say 'Give me this Neumnan machine to play games on'! Maybe that's because I am too uneducated that I think that, anyways).
Besides that, there are:
1- Too many old languages that could use a new veneer, like a SML compiler that uses MLIR or LLVM.
2- There are too many interpreted languages that could use being jitted. Like Ruby. Not sure if there's jitted Ruby, but I just discoevered how sweet it is and I like a faster version
3- We could dig a mass grave and bury every Python user alive, after torturing them (I'm kidding! lol)
So I'm not very educated, I brute-force. I rely on ChatGPT models to spit facts at me, or give me validation on my work because I kinda need a 'college simulator'. Like, I figure, I don't have nay peers so let's make this bot my peer.
In the realm of DSLs, let's look at a successful example of 're-description': Fish.
Fish is truly a marvel. Ever since I switched to it, you can't beleive how faster I work. I don't know if there were interactive-friendly shells before Fish, but Fish is 'Friendly' you know?
Can you tell me what you think of the code my implementation emits when you got the time? Is it good, bad, medicore etc?
So when you're building a language, should you always use a builder for the AST specifications? Becuase I figure, you don't need that in a language like Haskell or OCaml right?
I currently have 3 projects I ping-pong.
1- Marsh, a POSIX shell in C;
2- Awk2X; a translator of AWK to several languages, like C, Python Rust etc. This one is in Haskell
3- Cephyr; a C compiler in OCaml
For Marsh, I am stuck in the job control section. I just can't seem to find a flow for redirecting input and output. I think I am striking a balance though. I revised the job control like 10 times, literally 10 times.
But for Awk2X and Cephyr, I am kinda stuck at defining the AST. I learned Haskell just last night and I made this AST. I am not 'stuck' really, I will move on from it soon.
data UnaryOp
= Prefix PrefixOp
| Postfix PostfixOp
deriving (Show)
data PrefixOp
= PrefixIncr
| PrefixDecr
| Plus
| Minus
| Not
deriving (Show)
data PostfixOp
= PostfixIncr
| PostfixDecr
deriving (Show)
data BinaryOp
= Add
| Sub
| Mul
| Div
| Mod
| Eq
| Ne
| Gt
| Ge
| Le
| Lt
| And
| Or
deriving (Show)
data Lvalue
= Unfixed String
| Fixed String String
deriving (Show)
data Factor
= Constant Constant
| Lvalue Lvalue
deriving (Show)
data Constant
= String String
| Integer Int
| Float Float
| Regex String
deriving (Show)
data Expr
= Unary UnaryOp Factor
| Binary Factor BinaryOp Factor
| Ternary Expr Expr Expr
| StrCat [Expr]
| Delete Expr
| Call String [Expr]
| Assign Lvalue Expr
deriving (Show)
data Stmt
= Express Expr
| For Expr Expr Expr Stmt
| ForIn Lvalue Lvalue Stmt
| DoWhile Stmt Expr
| While Expr Stmt
| If Expr Stmt [(Expr, Stmt)] (Maybe (Expr, Stmt))
| Return (Maybe Expr)
| Break
| Continue
| Compound [Stmt]
deriving (Show)
data Pattern
= Begin
| End
| Expr Expr
| ExprPair Expr Expr
data PatternAction
= WithPattern Pattern [Stmt]
| JustAction [Stmt]
data FunctionDefn = FunctionDefn
{ name :: String,
params :: [String],
body :: [Stmt]
}
data Element
= PattAct PatternAction
| FnDef FunctionDefn
newtype Program = Program [Element
Now for Cephyr, this one is a bit more complex. Before Cephyr I attempted to make a C compiler several times, and every time I got stuck at the AST.
The problem is, I wanna use OCaml's modules in the AST. But I don't know how? I just said fuck it and used top-level types. I am here currently:
type const_expr
type type_decl
type unary_op
type binary_op
type expr
type stmt
type literal =
ConstLiteral of const_lit | CompoundLiteral of compound_lit
and const_lit =
| IntConst of int * int_suffix option
| FloatCOnst of float * float_suffix option
| CharConst of char * charset_prefix option
| StrConst of string * charset_prefix option
| IdentConst of string * const_expr
and int_suffix =
Long | LongLong | Unsigned | UnsignedLong | UnsignedLongLOng
and float_suffix =
Double | LongDouble
and charset_prefix =
Local | U8 | U16 | U32
and compound_lit =
| ArrayCompound of init_type * init_item list
| StructCompound of init_type * init_item list
| UnionCompound of init_type * init_item list
and init_item =
| RegularInit of expr
| DesignatedInit of designated_init * expr
and designated_init =
| ConstExpr of const_expr
| ConstExprPair of const_expr * const_expr
| Ident of string
and init_type = type_decl
type const_expr =
| UnaryConstExpr of { factor: literal; op: unary_op; }
| BinaryConstExpr of { left_factor: literal; right_factor: literal; op: binary_op; }
type primary_factor =
Identifier of string | NestedExpr of expr | Literal of literal
and expr =
| Primary of primary_factor
| Unary of { factor: primary_factor; op: unary_op; }
| Subscript of { factor: primary_factor; op: subscript_op; }
| Binary of { left_factor: expr; right_factor: expr; op: binary_op; }
| Ternary of { cond: expr; if_true: expr; if_false: expr; }
| Assignment of { lvalue: expr; rvalue: expr; op: assign_op; }
and prefix_unary_op =
| Negate
| LogicalNegate
| BitwiseNot
| AddressOf
| Dereference
| PreIncrement
| PreDecrement
and postfix_unary_op =
| PostIncrement
| PostDecrement
and unary_op =
| PrefixOp of prefix_unary_op
| PostfixOp of postfix_unary_op
and subscript_op =
| Index of expr
| DotMember of expr
| ArrowMember of expr
| FunctionCall of expr list
and binary_op =
| Add
| Subtract
| Multiply
| Divide
| Modulo
| BitwiseAnd
| BitwiseOr
| BitwiseXor
| ShiftLeft
| ShiftRight
| LogicalAnd
| LogicalOr
| Equal
| NotEqual
| LessThan
| LessThanOrEqual
| GreaterThan
| GreaterThanOrEqual
and assign_op =
| Assignment
| AddAssign
| SubtractAssign
| MultiplyAssign
| DivideAssign
| ModuloAssign
| AndAssign
| OrAssign
| XorAssign
| ShiftLeftAssign
| ShiftRightAssign
It's still incomplete. I just found out I can use .mli files.
I think Cephyr is the 5th reincaation of my OCaml C compiler. I just spend hours at the AST and get tired of it.
And I have the book too. I like the book but it's kinda useless for me because I wanna do SSA. These kinda tree-rewriting mumbo jumbo is too 80s for my taste.
(Sorry if this is a double post) I think what you call 'decoration' I call 'augmentation;. After many iterations ,I came up with this AST: https://pastebin.com/NA1DhZF2
I like it, but I am still skeptical as of comitting to it. I really want to use Functors... But i'm nto sure how. These are new concepts to me!
I am implementing my own POSIX Shell so I wrote this not to get lost. I posted a much more inferior iteration of this weeks ago ---that one was truly subpar. This one is much better....
Apologies. I will definitely fix them. Do you notice any more errors? I myself just realize that-- path expansion could be replaced with actual rules. Thanks again.
Look 0 of my work involves HTML, well maybe 1-2 percent does; however, about 60% of my work involves regular expressions, grammar, lexical scanning and syntactic parsing, so it still irks me, and will irk me beyond my grave, when people say shit like 'Don't parse HTML/Markdown/etc with regex! Use a parser generator!'...
The stolen valor of terminal emulators! (+ Can you recommend some good ones for GNOME?)
Have you noticed there are some shameless thefts, basically clones, in the world of terminal emulators? At least the ones for GNOME?...
Making an libncurses fronted for the Fediverse? (For browing Lemmy websites on terminal [emulators])
Can someone please help me understand how one could make his own frontend for the Ferdiverse? It seems like to run on a bespoke protocol, and has HTTP endpoints as well. The help says you can create your own frontend, divorced of HTTP. What I am wary of is the documentation being out-of-date....
Predatory forcing of circular dependency?
I think ---DOCKER--- is doing this. I installed based, and userspace(7)-pilled liblxc and libvirt and then this asshole inserted a dependency when I tried to install from their Debian package with sudo dpkg -i. One of them was qemu-system, the other was docker-cli because they were forcing me to use Docker-Desktop, which I would...
Thoughts on the Epiphany Browser? (not Chrome botnet crap, or even FF-based, GTK+ WebKit-based) (+ A good framework for web automation?)
I honestly have issues browsing to even the simplest of non-static pages. I think it's like, the graphical version of lynx(1) or w3m(1). I think it's based on X's browser right? So basically, it's based on the Open Webkit Standard. It uses the GTK+ WebKit engine. This engine has a programmatic interface....
ROFF: Not Just for Manpages! (A dossier on ROFF, especially GROFF, CSV dataset of commands, examples without macro packages, etc!) ( github.com )
So I want to implement my own ROFF. I collected this to have a database for me, and everyone else, about ROFF, especially GROFF....
Why DEL is at the end of ASCII (I have a theory! -- well, maybe?)
So we have all these control characters in ASCII and besides newline, horizontal tab and carriage return (on Windows) the only use for them is on terminal emulators (which I am making one!) Also as an extension, us NeoVim/Vim users have extensive use for them....
A tokenizer for EBNF written in R7RS Scheme | A full dive into EBNF, how it works, and its relationship to Chomsky Hierarchy ( gist.github.com )
About a few days ago I posted this, asking for help to implement the parser. It seems like I boomer'd and I forgot to set the Gist to public. This is public (hopefully!). Someone did gave me a link, but I kinda could not 'parse' it (get it? get it?). I still would appreciate it if you would give me guidance in parsing with...
A dossier on the PostScript language (buildable, multi-target document!) ( github.com )
With some help from the LLM that shall be unnamed, I created a full dossier on PostScript. You can build it to the original Markdown, or convert it to HTML, Latex, PDF, etc....
Hey guys, I generated manpages for PostScript operators. Have a look. ( github.com )
I've been trying to learn PostScript so I made this. Took almost a day and a half. I'm still not sure all the pages are up to code. Please report any errors you see....
Hand-rolling a parser in Scheme for EBNF (already made the tokenizer!) ( gist.github.com )
In the Gist, I have explained my problem, and I have provided my tokenizer as well. If you can help me with the parser, that would be great. Also if my tokenizer is not very well-structured, please tell me....
PostScript templates and routines?
Hey guys. I'm looking for some good PostScript templates and routines. I am writing something called 'EBNF Tools' in Scheme. I wrote the tokenizer and I am now writing the parser. From there, I wish to implement tools like:...
Bringing the cancer of the MODERN WEB (TM) to one of the last bastions of the old web (aka the real web!). How Kafkaesque. ( www.youtube.com )
This girl acts like Wikipedia owners don't realize this shit. It's about principles. Modern web is simply cancer that is eating out the planet from the inside, one TCP segment at a time (although with HTTP3 and QUIC we gotta call it a datagram!)....
A short Gist document describing the difference between Operational Semantics and Denotational Semantics. ( gist.github.com )
If you're interested in a deeper dive, inform me. If I have made a mistake inform me. Thanks.
I have selected Fish to be my login shell, I'm afraid to log out :(
Something tells me Fish is not a capable login shell? It was in /etc/shells, but that does not mean it's a login shell right? Would any shell with job control be a login shell? I'm really scared to logout! Any help is appreciated....
First draft grammar of Xeph, a non-pure functional language, a superset of ASDL. Input is needed. (+ guide on reading EBNF) ( gist.github.com )
Please tell me what you honestly think of it --- this is not a 'labor of love' exactly, I only spent a few hours on it. But I think its a strong foundation for what comes next. The implementation, I hope, will be an orgy of love!...
AllocPPx.pl -> A Perl script that preprocesses C with garbage collection! ( gist.github.com )
Automatic garbage collection in C is possible with libraries like libgc, but with allocppx.pl, you can just preprocess your file into generating heaps, and these heaps can be used for memory allocation. The type of GC is used, mark and sweep + reference counting. Every memory allocation MAY have a trace, and this trace can be...
A talk by Guy Steele, very ancient (1998) but very entertaining (the talk has a TWIST!) ( www.youtube.com )
This talk is so good that I won't spoil the twist for you. Yeah, this talk has a twist, believe it or not. Just so if you doubted that one of the inventors of Scheme and Java was not a super genius....
A guide on using the Zephyr ASDL language (my implementation, specifically) | The Abstract Syntax Description Language ( gist.github.com )
I wrote a short tutorial on using my implementation of ASDL. You can find link to it in the document....
EBNF Grammar for POSIX Shell ( gist.github.com )
I am implementing my own POSIX Shell so I wrote this not to get lost. I posted a much more inferior iteration of this weeks ago ---that one was truly subpar. This one is much better....
'Don't parse markup languages with Regex' is an annoying trollpost and it should die... right?
Look 0 of my work involves HTML, well maybe 1-2 percent does; however, about 60% of my work involves regular expressions, grammar, lexical scanning and syntactic parsing, so it still irks me, and will irk me beyond my grave, when people say shit like 'Don't parse HTML/Markdown/etc with regex! Use a parser generator!'...