[ home ] [ q ] [ soy / qa / g / int / a / incel / pol / r ] [ overboard ] [ rules ] [ KNN ] [ telegram ] [ wiki ] [ dailyjak ] [ booru ] [ archive ]

/g/ - Generals


Name
Email
Comment
File
Embed
Password (For file deletion.)

Read: Kolyma Public House Policy.

File: 1661345565857.png (22.67 KB, 663x668, soot-computer.png) ImgOps

 5214 [View All]

>/g/ is up for 2 days and still no monthly programming thread
yikserino. ITT talk about what you're working on.
302 posts and 86 image replies omitted. Click reply to view.

 5517

>>5214
Programming is for boomers and trannies

 5518

>"hell" is catholic hocus pocus and not scriptural. If you're referring to the lake of fire/second death, that's exclusively reserved for all non-Aryan bastards. If I turn out to be non-Aryan, then yes, I would be going there. But no Aryan will be sent there. If you're referring to hades/the grave, yes, everyone who dies goes there to await judgement day.

Rightism is a mental illness. It's no wonder you all worship people like Terry Davis. Psychosis is divine insight in the eye of the chud.

 5519


jew

 5520

File: 1666437495412.jpg (154.03 KB, 1024x975, 1621875898163.jpg) ImgOps

>>5518
>Rightism is a mental illness. It's no wonder you all worship people like Terry Davis. Psychosis is divine insight in the eye of the chud.

 5521

taking a break from programming for a while, I have to rethink some design decisions and solve some problems that make my language a bit ugly currently: mainly how to do operations such as comparisons on containers that depend on their values and hashing in a beautiful way. Currently, I started injecting comparison functions into containers such as maps and sets via templates, but it quickly gets annoying, and I'd end up injecting comparison functions into everything from vectors to smart pointers via templates, which would lead to extreme levels of bloat. I'll have to find another way.
Until I find that, I'll try writing a novel or something. I feel like it could help me calm down a bit, since I find mulling over how to precisely express my intent very liberating.

 5522

File: 1666782647505.png (52.92 KB, 250x309, ClipboardImage.png) ImgOps

>>5424
I wish to apologise for what I wrote here, I realised I was in error. I had a slightly wrong mindset, and it completely paralysed me. Although shit will hit the fan, and society will collapse, we know we will win, and just because we can't kill all the niggers yet, it's not wrong to prepare for our victory already. I misenterpreted my own endeavours as "trying to heal Babylon", which I never intended to do in the first place.

 5523

>>5522
Guys, be careful trying to make a decision based on prophecy, even getting some nuance wrong may be the difference between defeatism and conviction. I did learn a lot from this, though, so it's fine.

 5524

File: 1667037634874.png (72.69 KB, 684x666, ClipboardImage.png) ImgOps

I realised that current programming languages have insufficient abstractions. They usually just give you classes and functions, but they usually don't give a primitive to describe free-standing execution threads (services), and neither do they allow you to define a single service interface that then generates both a sender and receiver end which would allow strong decoupling and easy connecting. Currently, you would need to write an abstract sender and an abstract receiver class to achieve such decoupling, which is needed for simulating parts of your program for tests (e.g. simulating user inputs, or simulating backend behaviour).
I came up with three new features I want to add to my language: protocols, a glue operator, and a MASK(Type) operator. A protocol is a collection of functions/commands, and multiple protocols can be combined into a composite protocol. They aren't instantiable, but if you have a protocol P, then P SERVER is an abstract type that implements the receiving end of the commands, P CLIENT is an abstract type that covers the client-side functionality.
The glue operator can be used to instantiate a concrete type from two or more abstract types, under the condition that all abstract functions in every type also exist as non-abstract functions on one of the other types. For example, if you have a decoupled abstract type pair as in pic related, then gluing them together via ControlPanel | VendingMachine can form a new type that automatically links the calls to handle_input() and display(). This kind of very easy type construction will allow you to write mocked control panels or mocked vending machines and simply gluing them together to a single type, and there is no runtime penalty for the abstractions (no virtual calls required).
Then, using MASK(ControlPanel | VendingMachine), you get an abstract (not instiantiable) type that can hold any type implementing the same functions as ControlPanel | VendingMachine. This allows switching out parts of the code without any effort. Note that this is a compile time substitution, it has to be injected statically. For that, I added a rough concept that allows setting context variables and types for instantiated types or called functions. They work similar to setting environment variables in a shell invocation:

ENV_VAR=VALUE my_program --args...

Now you can do something like this:

[]{MASK(ControlPanel | VendingMachine) = MyVendingMachine | MyControlPanel} shop: Shop;

This injects a type binding specified inside the {...} into the variable shop, replacing any matching instance of the left-hand type with the associated right-hand type at compile time. You now can not only have abstractions and split interfaces that are no hassle to connect, you can also simply reuse your production code and swap out global variables, certain types, or even override any function you want upon instantiation to inject the desired behaviour. You can turn log calls into no-ops statically, you can mock network communications, override syscalls, etc. You can also simply create a wrapped version of a function that measures its execution duration, and then replace the original with the wrapped one for profiling.

All of this will take quite a while to implement though.

 5525

>>5524
currently reworking my standard library, I added a non-NULL unique pointer type, so that nullable and non-NULL variables can be distinguished at the type system level. Found a few bugs already that way. I'm slowly getting a feel for the way my language should be used to model things.

 5526

came across a youtube video about new kinds of programming languages that use both text and graphical circuit notation at once. I think that while circuits are stupid for formulas and procedures etc., they're really valuable for networked components where there's significant dataflow.

 5527

File: 1668118417838.png (277.78 KB, 1024x819, ClipboardImage.png) ImgOps

>>5522
>>5523
The old thing is over and the new thing is just getting started. "Blackpilled" to me doesn't mean giving up and slitting your wrists, it basically means following the serenity prayer. The American Empire is beyond repair but we can build something new from its ashes.

 5528

File: 1668163599133.png (515.85 KB, 750x750, 1655881192424.png) ImgOps

>>5527
based king.

 9284

Still working on the compiler rewrite… the work never seems to get less, I feel like I'm on a bicycle trainer at hardest resistance. And the compile errors inside the auto-generated C++ are starting to get on my nerves. I guess slower progress is the cost of a cleanly abstracted type architecture. But I think it's worth it since type-level guarantees help me guard against compiler bugs.

 9733

https://objective.observer/rl/RVM.html
came up with a new concept for representing ASM instructions in my virtual machine and object code, and I think it would lend itself well to precompiling templated code. It also has many other benefits that would make it easy to do other features I have planned, such as injecting/overriding behaviour in functions you call. Basically, it treats all code as templated, but there's a mechanism for injecting opcodes' values during a call.

 9799

File: 1668385042831.png (15.06 KB, 414x178, ClipboardImage.png) ImgOps

made some great progress in my compiler — added a new feature: symbolic values can now also be annotated to reference a type. Here it is applied in action and used to implement a custom "new" operator/constructor for my Dyn type. My language actually doesn't have a "new" keyword, so as long as multiple container/smartpointer types support the same constructor syntax, I can freely exchange them without having to touch the code that calls them. In C++, this is not possible, as you have to switch between std::make_unique<T>(...) and std::make_shared<T>(...) whenever you change the pointer's type.

 9800

File: 1668385589064.png (1.39 MB, 1014x844, 1628723480114.png) ImgOps

technolo/g/y get

 10499

File: 1668554912457.png (26.38 KB, 1375x261, ClipboardImage.png) ImgOps

>>9799
managed to implement rudimentary error locations in the autogenerated C++. Wasn't even much work, I just didn't know there was a standardised #line macro in C and C++ that allowed me to do that. It doesn't get columns right, but at least the lines match up. Now I no longer have to look through the autogenerated C++ code to find the corresponding error location in my source.

 10500

File: 1668557100117.gif (5.67 MB, 600x600, calm seethe.gif) ImgOps

>>10499
C++'s error chains are still a pain in the ass, though.

 10624

File: 1668807209713-0.png (10.92 KB, 312x184, ClipboardImage.png) ImgOps

File: 1668807209713-1.png (19.76 KB, 482x155, ClipboardImage.png) ImgOps

Added a new language feature: >>expression will automatically dynamic_cast expression to whatever type the expression is received as. This removes a lot of redundant casts. See picture 2, the first and second case. Much cleaner.

 11363

File: 1670383799934.png (8.12 KB, 331x109, ClipboardImage.png) ImgOps

Finally got my compiler to fully parse itself again, progressed nicely with my more semantically structured AST.

 11382

do my homework

 11394

File: 1670491140124.png (98.65 KB, 329x318, 1655496227606.png) ImgOps

>>11382
>do my homework

 11413

Reworked my name resolution / scope lookup code, it's now much cleaner and also more powerful, as now, scopes track their entries in semantic groupings, such as constructors, fields, static named entries, etc.
>tfw stayed up until sunrise for this again

 11750

File: 1671284452358.png (305.06 KB, 1195x1067, ClipboardImage.png) ImgOps

New feature

 11751

>>11750
Improved the example for the OR expression.

 11752

File: 1671285330613.png (313.43 KB, 1195x1067, ClipboardImage.png) ImgOps

>>11751 (forgot pic)

 11773

>>11755
wew lad. I bet the AI can't write a bootloader.

 11785

File: 1671415152951.webm (5.34 MB, 640x360, 1671405265154.webm) ImgOps


 11797

>>11785
>IndianGPT

 11798

File: 1671459543217.png (30.3 KB, 693x207, ClipboardImage.png) ImgOps


 11825

banned on 4cuck /g/ for racism again… I wish kuz hadn't killed soy/g/.

 11826


 11840

>>11825
just make threads on /soy/

 11857

File: 1671613228985.png (46.97 KB, 839x270, ClipboardImage.png) ImgOps

>>11752
Just added some basic linting for misaligned IF/ELSE branches and for missing closing braces.

 11859

File: 1671614252532.png (65.65 KB, 759x347, ClipboardImage.png) ImgOps


 11872

>>11857
>>11859
how are you handling that? looks like vscode so I assume it's something to do with the LSP

 11888

>>>/raid/13075
redpill me on all these progrooming tools, i'm a newteen i just want to ban evade

 11889

>>11872
>how are you handling that?
From a tech stack standpoint: I use Sublime Text and a custom color scheme (I got tired of the fruit salad & disco flashing colours). I implemented my own sublime text syntax highlighter here: https://github.com/RmbRT-lang/RL.sublime-syntax
I think I should also publish the light and dark minimal colour schemes I came up with.
For the error reporting, I did the line tracking in these two commits (tracking each line's first token's column): https://github.com/RmbRT-lang/rmbrtc/commit/9697ebf8f3bd38639cc72dbdefe9c80515b38da2 and https://github.com/RmbRT-lang/rmbrtc/commit/a50db9211068ed26420b084848136c1e45c04389
In sublime text, it simply tracks all lines in the build output matching (file):(line):(col): (msg) and then displays these in the associated code location.
>looks like vscode so I assume it's something to do with the LSP
I hate VS Code and I will never install a LSP on my computer. All Sublime Text does is follow a push-down automaton-style grammar which annotates parts of the code, and the annotations are then picked up by the color scheme. It doesn't actually do stuff like symbol resolution etc. It's very lightweight and dumb, but robust and efficient. To get errors, I simply call my compiler on all source files in my project folder at once, it takes like 100ms to parse 110 files, merge scopes/includes, and name resolutions. That's roughly 20k lines of code.
>>11888
Those aren't programming tools. I also don't care about existing things in the computers/hardware and software space. I only program my stuff.

 11890

>>11872
A proper language doesn't need an LSP because the syntax is non-ambiguous and can be parsed using a simple grammar. That takes care of highlighting. The next thing you need is "jump to definition" which is not that hard when your syntax definition format supports annotating definitions. It can't do proper type inference to disambiguate occurrences of names, but I have a strongly typed language anyway so I always know from context which candidate to look for.

 14040

up

 14121

>>14040
thought this thread was dead already, so I stopped posting.

 14171

> >>5515
> So I decided to remake this project using Peerbit (https://github.com/dao-xyz/peerbit) for the p2p database instead of OrbitDB. It's more robust and technically advanced and solves a lot of the issues faced by OrbitDB. Plus it's being actively developed while OrbitDB development has mostly been abandoned. The data structures are little different so I've been learning how to use them. Also its written in TypeScript which this is my first time encountering so I have to figure out how to integrate it into jschan. But overall I'm more optimistic than I was before because Peerbit is quite nice and has things like built-in encryption and database sharding.
> >>14121
> same lol

 14172

>>14171
ignore the formatting of me inadvertently soyquoting myself

 14227

>>11889
Nice. I don't want to install VSCode either as it seems very bloated and bulky. SublimeText is just so chill and fun.

 14255

>>14227
Yeah it's quite nice, although I think one day I'll write my own code editor, with stuff like elastic tabstops, TUI support, native support for my language, and whatever else will come to mind by that time. But in the long term, I'll have to write my own OS anyway.

 14403

File: 1674569087564.png (186.61 KB, 815x750, ClipboardImage.png) ImgOps

just added more nice semantics to my language specification. There are now ''strict'' classes, which are basically C++-style classes, where the destructor is called at the end of the scope, and in reverse order of declaration. Additionally, I added ''value'' classes, whose destructor is called as soon as possible (directly after their last use), and instances of those types can be completely inlined or optimised away. So if I do a tail call that returns a dynamic array, then the compiler can completely remove the temporary instance and directly construct it at its destination, even if the constructor or destructor of the temporary instance would have had side-effects. The compiler may even entirely remove parts of a ''value'' object that aren't accessed. For example, creating a list with 5 elements, but only reading the element count of the list, and not accessing the elements, can completely optimise away the whole dynamic storage of the list, making the insertions into no-ops. I think that'll be pretty cool although also dangerous if used wrongly as certain side-effects may disappear unintentionally if you don't take proper care.
>>14171
wow, somehow I completely missed your greentext and didn't read it. Typescript integration is pretty straightforward from a language perspective, but a pain in the ass toolin-wise, IIRC.

 14460

>>14171
do you have an estimate of when the image board is ready for operation?

 14485

File: 1674742488054.png (61.57 KB, 525x900, peerbit_posts.png) ImgOps

>>14460
The fact that I have to figure out the new database system, is somewhat counterbalanced by the fact that I've done a lot of this already with v1 (orbitchan).
I don't have the code up yet but I think I can port most of the database over from mongodb within two months or so, possibly less. There may be a few complications with regards to figuring out the built-in encryption features of Peerbit.

However that's just for porting the database backend so that it's essentially functional identical to jschan. The next step is to implement the peer viewer again to actually make the posts usefully accessible over p2p, (along the same lines as the orbitchan peer prototype) which may take a bit beyond that.

Here's some posts using Peerbit as the database. Right now I'm encountering an error modifying existing posts, so for now bumping doesn't work. I'll probably put something of this online once I get a decent chunk of the post-related functionality working.

Something interesting is that Peerbit doesn't even use IPFS, so until I get to re-porting the file storage to IPFS, IPFS isn't even required, which is nice as IPFS is rather resource heavy.

I think once I get the posts, boards, and possibly admin accounts databases ported over, the rest should be pretty simple.

Here's the new repo: (it's just a vanilla clone of jschan for now until I update it)
https://gitgud.io/threshold862543/peerchan

So to answer your question, maybe about 2 months I'd say, moderately optimistically.

 14524

>>14485
Godspeed

 14543

>>14524
Thanks. Once I can figure out editing (rewriting existing documents) and deleting, it should be relatively smooth sailing until we get to the encryption/access control stuff again, which will probably be very different from how I was implementing it with OrbitDB.

A lot of stuff is simpler this time around too. As Peerbit has automatic sharding build in, it mitigates the need for fragmenting the database which was a significant focus for orbitchan.



[Return][Go to top] [Catalog] [Post a Reply]
Delete Post [ ]
[ home ] [ q ] [ soy / qa / g / int / a / incel / pol / r ] [ overboard ] [ rules ] [ KNN ] [ telegram ] [ wiki ] [ dailyjak ] [ booru ] [ archive ]