ChubakPDP11

joined 8 months ago
 
 
 
 

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.

I really despise how Java was 'twisted' into this corporate shit of the language that we got today. Sad, really. At least Scheme is still one's best bet to knock his teeth on a compiler.

I recently came across an awesome Scheme compiler known as Cyclone. It's really nice. Scheme is truly the best LISP.

Cyclone is better than Racket even. Except, I wished they would put their shit up on package managers. Because you need a bootstrap to install the damn thing. I don't wanna release a project where people have to go through hell to install it. At least, Cyclone translates to C, not Assembly, so you can just translate it yourself and put it on a tarball. Bonus if you put a backdoor there.

 

I wrote a short tutorial on using my implementation of ASDL. You can find link to it in the document.

I don't have a blog or things like that so I just used a Github Gist.

For some reason I got locked out of my Github account and if it was not for a miracle I would have been locked out forever. I barely use Github anyways. I don't understand why Tarvolds uses this shit corporate hellhole of a website as the primary platform for his projects, which sadly includes Git.

I made a model in ChatGPT to walk me through libgit2 so I can make my own remote host. I don't like any of the other bloated Git on Web platforms that are out there. I know about Git Tea, but that damn thing is bloated. I want some thing like this guy has: http://c9x.me/

This is what I mean when I say 'OWN YOUR DATA'. Don't trust Github, or any of these corporations, with shit.

I get this is really hypocritical to use Gist, then turn around and call Github a soulless corporation. But sadly, I use it BECAUSE it's a soulless corporation, not in spite of it.

I don't have money to buy a server. Yes, I am that poor. That is why I have to trust this PaaS and SaaS assholes.

Anyways fuck Github.

 

You see, most of us here probably know why using terms like 'algorithm' and verbs like 'program' to attribute PAC models is wrong. Right? Mathematical optimization models are not 'programs', they are not 'algorithms'. They are results of algorithms, like the result of Discrete Cosine Transom is a JPEG file. I used to cringe every time someone on Youtube referred to its recommender system as 'the Algorithm'


and I used to think 'Buddy, if this was an "algorithm" people would have figured it out ages ago!'


however, I soon realized that, and this is specially true ever since "AI LE BAD AMIRITE", the people who do that probably don't even know that the 'AI LE BAD' is the same technology that is giving them precious views.

It's ENTIRELY ok for Joe Q. LikeAndSubscribe to not know that. There are millions, if not gazillions of things, that Joe knows, that I don't know. Everyone has their own specialty. Elitism is bad, and not even most programmers know about these stuff.

However, I do expect someone who shouts 'woke is not meritocratic' to know better. This is a genuine statement, I am giving logic here, and facts never care about logic, as many genocidal maniacs have pointed out in the past decade.

This guy owns an AI platform, and he still uses wrong terminology. This terminology is correct only, and only if by 'AI' we mean an oblique technology like Expert Systems, which are not considered AI anymore. Expert Systems are widely used today. For example, I heard that the dude who made F.E.A.R.'s enemy AI used his own version of CLIPS. In fact, an ES generator is what I recommend anyone seeking adventure to make.

But let's face it, Elongated to the Max here does not mean 'Expert Systems'. He is the face of meritocracy


and from what I have learned, you have to be super stupid to care about money so much that you would try and make beyond your means, and therefore he is just the right man for being such stupid moron.

Funny thing is, there were probably Zangi blacks (Zangi is what we in Persian call Sub-Saharan Africans


there are different words in Persian for Sub-Saharan blacks, Iranian blacks and North African blacks) in his father's diamond mine whose sons now are fully aware of this!

I realize that this post is preachy. I know I may not have been fully factual. I don't care.

1
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 

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.

Bonus: ebnf.vim.

Thanks.

 

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

So this is stupid, because most people know that HTML and Markdown are not the type of languages that require a push-down parser, or even a simple LL(1) recursive-descent parser! Unless by 'parser generator' they mean 'lexer generator' or 'PEG generator', they are wrong, or at least, partly incorrect.

Like my diabetes, they are not grammatically Type 2 (Chomsky-wise, Context-Free); rather, they are Type 3 (Chomsky-wise, Regular).

It's preferred if you don't do a syntax-directed lexical translation of Markdown or HTML, and it's best if you build a tree. I learned that making Mukette and I am currently using my implementation of ASDL to build a tree. But truth is, unlike Context-Free languages, like any non-markup language, it is ENTIRELY possible to do a syntax-directed translation of HTML and Markdown, using pre-compiled, or runtime-compiled regex.

You will have to introduce states to make it a proper Automata, but even that is not required. I once did a syntax-directed translation of Markdown to HTML in AWK! With just one extra state.

I don't remember the copypasta that was talk of the town 10 years ago, I was a kid back then (17) and I could not dig it up. But it's a troll that has stuck with me ever since.

Maybe, just maybe, a PEG paser generator could have been what they meant. But even then, PEG generators generate a recursive-descent parser most of the times.

In fact, I dare you to use Byacc, Btacc, Bison, Racc, PYLR, ANTLR, peg(1), leg(1), PackCC or any of these LALR or LL parser generators to parse a markup language. You'll have a very bad time, it is not impossible, it's just an overkill.

TL;DR: Most markup languages, like HTML or Markdown, are best lexed, not parsed! Even if you wish to make a tree out of it. But for syntax-directed translations, REs would do.

Thanks.

PS: If you translate a markup language into a tree, you can translate that tree into other markup languages. That's what Pandoc does. Pandoc is hands-down the best piece of tool I have laid my hands on.

 

[If this is not the right board for this, please tell me to submit it in the right place]

Basically for the past 2-3 weeks or so, I have been messing with the 'PostScript toolchain' as I know many of you have. But for those who are still in the dark about the powers of PostScript, this will be a short intro.

Thanks.

 
 

My original intention in reading this book was to see if it's straightforward to build a shcal(1) UNIX utility, which would be the Solar Hijri version of cal(1) (link to specs) POSIX-standardized utility. It is 10 days past Nowruz so I can still make it seasonal.

However I found this book itself is very entertaining. It is not aimed at just programmers, it can be used by people of all trades. It has a nice 'aesthetic'. Like a 13 year old American girl addicted to TikTok would give it a 'Scholar Core' label. It is still a reference book, but their reference sections is clean and thorough.

I highly recommend giving it a read. It explains calendars from like a billion years ago. These are truly men of letters writing these, so let's call it 'Letters Core'!

1
CPython's VM is broken... (programming.dev)
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 

This paper: https://cs.brown.edu/~sk/Publications/Papers/Published/pmmwplck-python-full-monty/paper.pdf

... has been out for several years now, and the CPython authors don't seem to be taking any heed from it. The question one's faced when viewing the inner-workings of CPython's VM is:

Is Python a lazy language, or is it not? Should types and symbols be resolved through VM, or semantic analysis? Should there be explicit tree-building and DAG number-value optimization, or just shit out the bytecode?

Because the VM seems to build classes on-the-go [list of opcodes]. I am not pretending, and I don't pretend, that I know enough about this, but would it be not better if they did a full semantic analysis, then emitted the bytecodes? So this way, the execution would be faster, albeit whilst introducing small lags for a more loaded semantic analysis?

Of course, the answer is clear: Python may not officially be a lazy language, but it virtually is one. class syntax, as the paper says, is a syntactic sugar around type with tree arguments. type with three arguments is invoked during runtime, it would be rather stupid, and slow to do semantics on a runtime function right!? So classes are not 'really' classes!

For further clearity, this:

cls = type("Cls", (), { "foo": "baar" })

is equal to this:

class Cls:
   foo = "bar"

They might have looked at this paper, and said 'nah, don't fix what's broken' and this exact attitude that Python community has, from top to bottom, is why I have not used it in about 2 years, and unless paid handsomely, won't use it in any projects.

I believe Python needs to decide if it's an scripting language, a cross-platform juggernaut like Java is, or is it what it exactly is, a piece of crap hyped out to high heavens!

These are my opinions, I don't think I am educated enough for these to be facts. But look through your heart, compare CPython's VM opcodes with JVM's opcodes. JVM is a full register machine (whereas Python is a stack machine), with low-level opcodes designed to get things done fast and portable. It has an infrasturcture, and an echosystem. Several languages run on it, hell even Python itself runs on it!

Sadly, because that dang C FFI is so sweet, CPython seems to be de facto the Python implementation. And Python is not even badly specified like Perl is. I prefer a highly non-orthogonal language like Perl for scripting any day of the week. I use Perl a lot for preprocessing C source files, or just using it as AWK replacement. Is Python supposed to be that? Or Java? Decide goddamit.

So what we get from this is, Python is a simple AWK-ascended UNIX scripting language that lazy people have made into de facto Java! lol

Again, I am not very educated on this matter, please don't take my opinion as facts. I just made this thread to share this nice paper and a bit of trivia.

Thanks.

[–] [email protected] 1 points 8 months ago

I do believe other people have pointed out what went on that caused this to happen. This thread was a joke, but I did learn a lot from it.

[–] [email protected] 1 points 8 months ago

This makes so much sense! The other guy said they were planning an S-Expression language like Scheme... I think, had Netscape supported Scheme, the trajectory of the craft would change. At least we would not get so many 'durr parenthesis' memes. Just how hard is it to use [Neo]Vim when you're writing S-Expressions? it keeps highlighting the paranthesis and brackets balance as I write. What text editor do people who hate S-Expression LISP-like languages use, Emacs? Lol.

[–] [email protected] 0 points 8 months ago (2 children)

Frankly one can learn any imperative language once one learns one. It's the standard library of a language and the quirks of the library that is the real challenge .The syntx of the language doesn't boggle anyone.

[–] [email protected] 0 points 8 months ago

I used to use IE when I was like 12~13


I think I switched to FF when I was 13.5 and never looked back. Just the tabs man. I use Pop_OS! these days and a few months ago I accedentally enabled tiling, then it I realized it has tabs. I am as happy as I were back then. Tabs are a concept that were thought of too late.

btw this document mentions JScript. I don't know WTF is that but when I google normal JS comes up.

[–] [email protected] -3 points 8 months ago

Why is there a community about a videogame on a programming website? Also can anyone buy me Robux? I will bring all my friends from school to this fora if you give em Robux.

[–] [email protected] 0 points 8 months ago (2 children)

Good info dump. Can't image S-Expressions in web dev today really. Also, I did not mean it maliciously, this is a stupid thing after all.

[–] [email protected] 2 points 8 months ago

I give it half-baked code and ask it to complete it. Like say a few days ago, I wanted to implement NFA and Thompson Consturction. So I wrote this:

struct Transition {
   // implement this
  Transition *next;
};

struct NFA {
  // implement this
};

// and so on and so forth

This is how you get good results from it. Do half the work.

[–] [email protected] 3 points 8 months ago

Wow are you from the future? Because I just had this exact same thought, that JS is just that 'process', so I read the ECMA-262 standard and I posted the new thread about something funny I found in it. In fact I said something that closely resembles what you said. It's just freaky!

[–] [email protected] 2 points 8 months ago (2 children)

It's a term that generally refers to the more 'mathematical' side of programming, as opposed to the more 'practical' side of things. I believe it means 'Data Structures and Algorithm' so its a generalization of 'meaty' programming. Think, someone who writes shell scripts does not need 'DSA' to oil his grind, but someone needing to write a compiler does.

Now we live at an age where you can generate a shell script with a simple prompt, and hell, you could piece-meal a compiler, but it's not as straightforward. If one wishes to make moola in the post-LLM world, one needs to have strong theoretical and constitutional foundation.

At this point, any employer who hires more than 1 person for the 'simple tasks' is doing charity. And charity ain't what employers known for!

That is not to say, don't use AI in your work. I believe AI is the BEST way to learn DSA. In fact I straightened a lot of my misconceptions using ChatGPT. Like, I have written 2 compilers and abandoned them because I never meant to finish them, it was an excuse to prompt ChatGPT with more complex requests and do some reckon on my knowledge. I managed to do 'basic' SSA with ChatGPT, and anyone who has read a compiler book or taken a class knows SSA is not easy. I generated the SSA, and confirmed with the SSA book that I had. IT was very decent. But ther SSA book was very 'crude' and ChatGPT's example was really, well, 'uncrude'? So it was a GIANT help in me understanding SSA.

So if you need to learn DSA, I can recommend these three steps:

1- Learn a functional language or LISP-like language, Scheme, Racket, OCaml, SML, Haskell, etc. These langauges are extremely fluid and scientific.

2- Read books. Just go on Libgen or Zlibrary and read books. I recommended SIpser's above (or was it in another post?) but there's dozens. I remember a book called "Grokking Algorithms" which was really good. I read this book when I was sick with Covid, Steven Skiena's "The Algoritmh Design Manual" and it seems like everyone just LOVES this book. I mean it, try it, it's the best. If you can, buy it, because it's very precious. Also, keep a copy of CSLR/CLSR or whatever as a reference on your desk, PC everywhere.

3- Piece-meal ChatGPT into designing you a complex application. It really helps if you got an aim. One thing I recommend is Genealogy software. Make a Genealogy DSL perhaps. Or a simple compiler.

My advice may not be sound, but some aspects of these were helpful for me.

[–] [email protected] 8 points 8 months ago

I think you are irresponsible towards your future if you are a gainfully employed self-taught programmer, and don't invest in formal education. If you say 'I don't have time!' well, consider this, even night classes in junior colleges teach you stuff you don't know. Go to them, get your associates. I am in the process of getting into a contract where I do some thankless jobs for someone I know, he in exchange pays me to go to college. I am 31 -- as I said in the other thread, THERE IS NOTHING WRONG WITH BEING A LATE-COLLEGER!

I have been to college, I have studied 3 subjects for a total of 9 semesters, I have no degree to show for any of them :( I quit English lit, French lit and "Programming" all after 3 semesters. But when I was studying French lit, there was a guy in our class who was SIXTY-FIVE YEARS OLD! He wanted to learn French to open up some a commerce consulting office, focusing on import/export from France.

What I wanted to do was to 'write', keep in mind, 'write', not 'draw' bande dessine! But now that I am older and hopefully wiser, I have a set goal in mind. I am going to go this 'boutic' college near our home to study Electronics Engineering and when push comes to shove and China makes its move, start a chipset engineering firm with a production wing.

Just like how electronics is math with physics, programming is the virtual aspect of it. it's 'applied math'. I understand enough discmath because I studied enough of it both in college, and high school (since I was math/physics elective) so I have managed to understand some very rough and old papers.

You can always self-study if you haven't got the time. Here's a book which is kind of a meme, but it's still very good: https://fuuu.be/polytech/INFOF408/Introduction-To-The-Theory-Of-Computation-Michael-Sipser.pdf

This is the 2nd edition though, 3rd is out


I think 4th is coming. The best goddamn book, regardless of its meme status.

[–] [email protected] 1 points 8 months ago (4 children)

I remember that from ages ago. It was very, very cringe-worthy. I think it's the fault of whatever shit bootcamp he attended to learn his 'craft' for using imperative languages to teach DSA, if they taught him DSA at all? That is why in real universities they mostly teach DSA with functional languages. I studied 'programming' (not CS, 'programming') in a college which by American standards would be considered 'junior', for 3 semesters, and they, too, did not touch on functional languages. It was not until I had dropped out that I learned how to do FP using SML, Ocaml, Haskell, Scheme etc. That was when I 'understood' DSA for real.

Truly, this person is an embarrassment. I am currently working on an implementation of Appel et al's ASDL (github.com/Chubek/ZephyrASDL, check the new_version branch!) and it now emits decent C code, so it is time to write the man page (it currently has a sucky one) and the TextInfo. I COULD potentially have ChatGPT make both, it is very decent at doing so. But see, I am not a moron. So I use write them in Markdown and have Pandoc make the final markups.

Truth is, if you know your tools, if you know how to use a DSL-driven approach to programming, you won't need to use AI to generate your code. You don't need to go to Harvard to know DSA, neither a junior college like mine. Just grab CSLR and read it on your spare time!

I think this person is the guy behind Homebrew. I don't know why he thought Homebrew is an accomplishment that would give him immunity from knowing basic DSA


which in real world, is what programming is about. Package managers have existed since the dawn of time. Linux has like dozens of package managers. His package manager being 'unique' on MacOS does not mean it's an accomplishment, it means MacOS sucks cocks!

Basically, when you start a project, think: can I turn this project into a paper? If you can't, then it's worthless. He could have just strapped Pacman to be built on MacOS and called it a day!

These days, employers are looking for people with theoretical, constitutional knowledge. Any monkey can code. I let ChatGPT aid me with a lot of my C code, it's very decent at generating C. Like I need a Makefile, it makes it for me. I need a print help function, it makes it for me. There's nothing wrong with using AI to 'help' you, but don't use it in vital shit!

But, if the code that AI generates is as good as the vital backbones of your software, maybe save up some money and go to college if you haven't, a 2-year degree at a junior college will be good. I am going back to college next year and I am 31! There's nothing wrong with being an old student.

Just don't expect people to suck your dick when you don't know how recursion works!

[–] [email protected] 3 points 8 months ago (2 children)

Good point me lad. The plain-text based approach indeed makes scraping much easier. And plus, if we send a 'process', the process can be easily malicious, even if we don't elavate its access.

Like imagine today. I tell you to wget a shell script and pipe it to shell to install my software from my remote (FPT, Git etc). This almost always needs sudo. I can't imagine how many 12 year olds would be fooled to sudo rm -rf *?

That is provided that a 12 year old would even know how to do that. I know several people who began their UNIX journey when they were as young as 7~8, but there's a reason these people earn 500k a year when they are 30! I can't imagine if your normie aunt would really feel like using a UNIX pipeline to check her emails.

HTTP 'just werks'. Derpcat told me this in 2010 when I told her I hate HTTP in 2010. IT JUST WERKS. Kay's solution, although extreemly unbaked, would not allow my mom to read her Intagram feed.

Besides money, the computation cost is also high. Kay used to use mini-computers, us poor people used micros (if i were a poor person when mini/micro distinction existed, today it's just clusters vs Jimmy's gaming rig, oh, where art thou, DEC?)

But again, nobody has given a it a thought. THAT IS THE ISSUE. Academic text on alternatives to web, AFAIK, is rare. Part of it is the 'just werks' thing, but also, academia just does not care about web.

I think if people who are smarter than me would give this a 'thorough' thought, they will come up with a good solution. Web won because it was 'open', it was easy to navigiate, as opposed to pesky newsgroups and the such. You can still go to the first website to see this: http://info.cern.ch/ (browse this with Lynx or W3M, it's the best way to do it! Don't use FF or Chrome).

I dunno!

view more: next ›