ChubakPDP11

@ChubakPDP11@programming.dev

This profile is from a federated server and may be incomplete. View on remote instance

ChubakPDP11 OP ,

Man this is nice! Thanks.

Edit: Takes a bit slower than Kitty to zoom though. Slower than Alacritty too. But it looks 'slicker' in general.

ChubakPDP11 OP ,

This is EXPANSIVE! Wow.

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...

ChubakPDP11 OP ,

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!)

https://pastebin.com/biThVQME

So if you guys really think there's something fishy here, please do something!

ChubakPDP11 OP , (edited )

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!).

Sorry for the rant.

ChubakPDP11 OP ,

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.

Thanks.

ChubakPDP11 OP ,

1- Not sure, I can't read; 2- Yes, Fish; 3- Yes, it fixed it.

ChubakPDP11 OP ,

I was mainly asking if this was even the case. If i go to the maintainers and say shit like this they b& me.

ChubakPDP11 OP ,

I'm not American though :D

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....

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...

ChubakPDP11 OP ,

I will download it all and mirror it on my server and Github pages. Hate to see it go. What happened to this dude? Was he old or young?

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!)....

ChubakPDP11 OP ,

That's what they are doing with Fandom (formerly Wikia). Right?

ChubakPDP11 OP ,

@LiveLM
@lemmyreader
@Max_P
@Shareni
@CameronDev
@maorofl

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

Thanks.

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!...

ChubakPDP11 OP ,

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.

THANKS.

ChubakPDP11 OP ,

I don't understand. Am I doing something against the rules of this instance? I have posted stuff like this before?

ChubakPDP11 OP ,

Uh apologies. I did not realize that.

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...

ChubakPDP11 OP ,

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?

ChubakPDP11 OP ,

No problem my good man. Have fun.

ChubakPDP11 OP ,

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 )

ChubakPDP11 OP ,

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.

ChubakPDP11 OP ,

Alright sorry. I'm just trolling people. If you go to my profile I have a lot of Rust projects. @hascat @FizzyOrange

ChubakPDP11 OP ,

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?

I am implementing my own shell too.

I dunno man. I'm just rambling.

Thanks.

ChubakPDP11 OP ,

Thanks a lot my good man. Is this Monte? https://github.com/monte-language/monte I can't find the source code?

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.

I found lcc, by Fraiser et al:

https://github.com/drh/lcc

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.

So any help is appreciated. Thanks.

ChubakPDP11 OP ,

(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!

ChubakPDP11 OP ,

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.

ChubakPDP11 OP ,

Thanks my good human.

'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!'...

ChubakPDP11 OP ,

Thanks! You know last night I fed a model several books and asked it a lot of stuff. This did not come up.

What i do is I glance at the book, then ask the model to explain it to me. I call the model 'Urkel the Wiz Kid'.

I fed both CS books and CE books. Like Sipsers, A Quantative Approach, Automata of Aho, Harris and Harris, etc.

ChubakPDP11 OP ,

Thanks. I actually have a parse-related question which I will post somewhere soon (as in 2-3 minute).

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • All magazines