[ home / rules / faq / search ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM / ufo / 420 ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Options
Subject
Comment
Flag
File
Embed
Password(For file deletion.)
What is 6 - 2?

Check out our new store at shop.leftypol.org!

| Catalog | Home
|

 

Recently started a new project, it's a space-repetition system from markdown to CLI!

So far it's just a lexer and a parser, which aren't perfect, but are a little interesting, and a hash function.
The lexer yields tokens using re (which compiles to C) containing memoryviews over a mmap.
A larger regular expression is composed of smaller ones so they can be tested individually.
It should be quite fast, and use very little memory (for python).

The parser yields cards and is written as a state-machine, but in a "functional" style.
There are a number of parsers which return State, and they are dispatched to by TokenType.
They also accept a StateRepo which in this cases is implemented mutably, but could be immutable.
I was going to use pyrsistent for persistent datastructures but couldn't find any actual improvement in testability.

Anyway this thread will serve as yet another project log.

https://codeberg.org/jugaad/wikicards

>>34069
Rewrote the lexer to pull out a PDA with finite registers.
The caller provides parsers of a regular languages with state transitions, and fallbacks.
They do this by providing a large or'd sequence of named regex groups.
They then call the transition on the returned match.lastgroup, and supplied start, end pair.
Or if there is no match on the gap between the last position and the next match or EOF.
This should allow for the two phase lexing of commonmark as well as better handling of some blocks.

Next up is to generalize the parser to a LL(1) framework.
The caller will provide a REGISTRY table containing functions Mode -> Token -> MutableState -> MutableState
Where the MutableState is mostly just a Stack of pointers into the accumulator, an accumulator and a return.

The tricky part of course will be to actually write out all the lex and parse rules for commonmark with extensions.
On this note found the following interesting program which will serve as the basis of rewriting my rules:
https://github.com/mmark-md/mmark/blob/master/Text/MMark/Parser.hs

Have been learning a little by doing…
The regex engine I was using doesn't support unicode ranges over byte data.
Meaning it doesn't support unicode ranges over mmap data.
So I have to rip it out and replace it with hyperscan/chimera which will be faster.
Also realized I wanted the option to support scan and match modes.
And a stack of transition tables instead of transition functions to allow for extensions more easily.

Additionally attempts to implement the inline code already blew up the parser.
It now quite clearly has to be LL(k),

File: 1787107698068-8.gif (12.84 MB, 480x553, kerr.gif)

have you tried mistune?

Maybe it's because i just have a fundamental dislike for markdown and generating everything downstream from an mediocre markup format, but i think you may be approaching this problem the wrong way.

I recently needed a spaced repetition system and what did i do? I implemented a pseudo-VFS with Common Lisp structs and made it interface with the filesystem using "blob" and "dot" types to track regular files and files containing knowledge representation objects respectively. Dots are either read-only and loaded as a type of module or lisp objects which can be printed back and i've settled on doing everything with (potentially nested) plists and a path search struct. Finally the core program loads a lisp rc file and execs into a custom command-line with its own restarts and a cwd.

Then i wrote a couple of modules that define
  • auto-promotion of blobs with an .a extension to writable dots
  • multi-language keywords for storing information in dots
  • a field for links to other dots and a function for plotting a path (which i call a trace) based on them
  • a testing command which goes through every dot in and connected to a prefix as a topical graph ordered randomly and by the order of links and asks questions according to a plan like ('name summary :equation)
  • commands that further extend the notion of a "trace" in order to pass as a memex


Since i'm still in the process of writing the emacs integration, the interface is currently quite rudimentary, yet i'm happy with what it does regardless.

I wrote the lexer as described in >>34069 but it turns out callbacks to python every match is too slow.
Like three orders of magnitude too slow…
It's very customizable which is nice, the API would not be impossible in C without manual patching.
Mostly because of the protocols which allow for the Context and State to be extended.
It's available at: https://codeberg.org/jugaad/lexify

>>34160
No, but I was having too much fun to try something else!

>>34161
Wrote a VFS once on top of indexeddb had a comprehensive enough interface to run isomorphic-git, and a complete test suite.
Wanted a MDX-editor with git implemented as PWA, but of course it has to have an FS menu so…
Should have just bought the bullet and gone native, might have had a mini product if I had.
Funny how everything around here is so…



 

i have set myself a new rule for my internet life: DON'T USE ALGORITHMIC PLATFORMS.

you know, the highly personalized ones, which merge the user with the algorithm into a single cybernetic system.

the algorithms…. they hollow us out. they control us. they are directly hijacking system 1 of our brains. and it becomes even worse. as longer you use these plarforms, the stronger your habits will become. and the algorithms are also becoming stronger with every year. at one point, you are unable to articulate your interests, because the algorithm took it from you. it knows what you like, but yourself are unable to put it into words. run.
2 posts and 1 image reply omitted.

>>34058
She is literally anorexic.

>>34059
i don't care about your american beauty standards.

AND STOP DERAILING MY THREAD!

>>34060
stop posting ana freaks, retard. impolite sage.

>>34054
seek help, your mind is fooling you into believing this is beauty when it is just your self-destruction mechanism

>>34054
Why not just quit internet altogether? Every single thing you do on it is harvested for data to be fed into AI.



 

What are some genuinely good phones that do not shit the bed after 3 years, and without software updates shitting it's functionality? I've been stuck with Samsung, falling for propoganda that it's long-lasting when in reality they've just added some new pointless OS updates that makes it slower to use.
22 posts omitted.

>>33872
they all suck, don't bother. if you want cheap burner androids they exist for less than 50 bucks. don't even waste your time trying to get the most out of a garbage OS like android beyond installing f-droid apps and a firewall. a used iphone SE is around 100 dollars and has security updates into the 2030s, and the OS is objectively better.

Pixels are pretty much the best option for long term support now. I do lament that we no longer have a DivestOS style ROM though, which was basically GrapheneOS + LineageOS best of both worlds. Pixels can use Graphene though and just about everything else and are likely to have the baseband and other core stuff updated for awhile, without depending on some OEM's custom shit atop Android and for them to bother updating core components. Samsung, Lenovo/Motorola, any of the Chinese Oppo/Huawei types etc.. can fall into these pitfalls easier. Nothing is perfect, but Pixels are the best option. I do wish they were more like the Nexus models of old that stayed to AOSP instead of having special Pixel versions of stuff that was proprietary, but its still quite possible (and on a pixel, easier than most other modern flagships) to run a custom ROM .

As far as the hardware, if you're buying Pixels (and especially if you're buying used) I HIGHLY suggest getting something of the Pixel 10 series or newer (ie the brand new 11, which is basically very close to the 10 with some small bumps here and ther, I think) because the 10 (at least the Pro models) have "pixelsnap" compatibility which is basically a built combination of Apple's "magsafe" magnetic connection for accessories and the like, and the latest Qi2 standard for wireless charging (regular Qi has been around a long time, Qi 2 is faster and has other benefits as well ). There are other benefits of course but this was one of the things added in the recent Pixel models with the new body redesign. There are also going to be a lot of deals on Pixel 10 family stuff now that the 11s are coming. Pixel 10/11 families go like

>Pixel 10a

The cheapest variant, usually released after the mainline. This is the cut down version but still solid overall. Usually has less 'premium' materials, cameras, and other ancillary shit, lesser raw performance etc.. but a lot cheaper.
>Pixel 10
The baseline version, very capable and a step up from the A models typically.
>Pixel 10 Pro and Pro XL
The high end version that has the best of everything. The XP version is just slightly physically larger but aside from that is very close in terms of specs; its more an issue of preference for portability etc. For most technically adept users one of these are typically the way to gPost too long. Click here to view the full text.

Got a 2023 thinkphone from motorola, it's good and got lineage so

>>33885
Insane value for money. Had the same 200 american dollar (that's 260 in today's money) xiaomi for 7 years now. Adware I turned off immediately and haven't had trouble with since. For apps like gallery I just installed a replacement if they were bad, design-wise. Spyware is like, same level as samsung or other cheap shit. Would you rather have american or chinese backdoor?

>>34135
Bullshit or cope, I had a xiaomi and it had so much shit that you needed to turn off in separate places it was insane, and to this day I never figured out how to disable the xiaomj "safe installer" crap. I got lucky on that phone because it was vulnerable to mtkexploit which rescued it from the trash bin



 

So what's the status on Matrix chat stuff? I hosted it dor a short while, had some actor ts but it was way too convoluted for my taste. Apart from the metadata shit, is development still ongoing ? Is there something better with a decent userbase (IRC excluded) ?

also, what server should I sign up for now? Why doesn'y leftypol has their own server

also matrix was the worst possible name ever, almost as bad as flood detection
5 posts omitted.

>>34129

no, it's just that some people are humble and courageous enough to subvert the status quo by divorcing leftism from intellectualism, to spend their time thinking of ways for everyone in the world to be more free rather than just a minority of privileged academics.

>>812757

Excuse me, I forgot to crossboard link:
>>>/siberia/812757
<US-Israel, Amdocs, matrix.org, imageboards, leftypol

>>34133
>no, it's just that some people are humble and courageous enough to subvert the status quo by divorcing leftism from intellectualism, to spend their time thinking of ways for everyone in the world to be more free rather than just a minority of privileged academics.
https://en.wikipedia.org/wiki/Left%E2%80%93right_political_spectrum
If it's left as in the left of the assembly in front of the president then it's anything that supports human rights and safety nets. If it requires reading then it was bougie and elitist from day 1, fuck that noise.

There is also simplex now I guess



File: 1786638385439-0.jpeg (55.95 KB, 640x480, b659f5fc9936a112.jpeg)

 

Why are the Brave shills pivoting to shilling Nostr? What is Nostr's connection to Brendan Eich and/or Israel?

addendum 1 because body to short: why do they think such blatant advertizement isn't just going to make people distrust it?

addendum 2 because attached wrong file: oh nice we can delete OP threads if we mess up now.
7 posts omitted.

>>34101
you can't be a marxist and believe in this idealist illusion.

>>34094
>just works, soon to not work because Linus is senile now, (unless a hard fork can be maintained) but works for now.

expand on that? maybe im just uninformed but how does that make any sense?


>>34117
>basic security and anti-spam measures = le heckin censorship
Eh, the maintainer doesn't know how to leave trolls alone, but this seems like it could be decent enough of a protocol. If Wafrn adds support for it I might tinker with it.

File: 1786951407448-8.jpg (61.49 KB, 500x532, az0cdi.jpg)




File: 1784678577702-8.jpg (3.18 MB, 3072x4096, IMG_20260722_014155.jpg)

 

posting my bespoke poverty setup that's been my kicking for over 15 years now
it runs gentoo btw
fortunately I've also been told this body was neither too short nor empty
4 posts and 1 image reply omitted.

>>33860
By popular demand, pics from my phone…

>>33807
thats cute… i like what you got there… fiber optic o_O
>>33809
soulless bourgeoisie g*mer trash

i sucked off a man i met on craigslist for an hp laptop but its too slow for real multitasking and the battery was dead so i got a new one but it only lasts for like 1 hour… :/

>>34073
>but it only lasts for like 1 hour
They used to sell aftermarket batteries which were bigger, or you could try recelling it, but probably can't get the equipment on craigslist.

>>33807
gentoo is life… just moved from arch on my garbage pc with 15 year old hardware. haven't had this much fun in so long.
>>33863
real cool shit. ibm thinkpads had the coolest designs.

also, is there an old hardware thread on this? stuff like this would be really nice to see

>>34108
gentoo: for when you like compiling more than using a puter



File: 1726459786963.png (365.18 KB, 709x538, nuimageboard.png)

 

The neverending quest to rewrite vichan -

Archived threads:
https://archive.is/xiA7y
297 posts and 65 image replies omitted.

I'm still working on this algorithm. I'm trying my hand at formal specification.
The head of the algorithm is given as follows:

  • Pages are indexed as 1..N-1, Sentinel so that 1 is the oldest posts.
  • Page boundaries are completely stable.
  • We lazily load the item statuses, finishing if we've fetched the cached page or all the updates.
  • If there's no changes and we're fetching the end we skip to the end.


The Init and Next formula follow:

Init ==
  /\ TypeOK
  (* Insures "new" statuses are only in continuous ranges connected to the *)
  (* ends. *)
  /\ NewAtEndsOnly
  (* Set item and page to either jump to next or start at Sentinel *)
  /\ JumpToNext \/ GoToStart
  (* We do not assume a consistent pageSize for pages. *)
  (* We do not assume that pages are defragmented of a certain number *)
  /\ PageItemsMonotonicalIncreasing 
  /\ PagesLessThanPageSize
  (* statuses is a record of the state with respect to the pages cache. *)
  /\ NewItemsNotInPages
  /\ DeletedItemsInPages
  /\ UnmodifiedItemsInPages
  /\ changes = 0

Next ==
  \/ /\ statuses[item] = "new"
     (* If we've read all the changes needed we stop updating. *)
     /\ changes /= netChanges \/ ~Cached(desired)
     /\ pages' = [ pages EXCEPT ![page] = pages[page] \cup { item } ]
     /\ IF Cached(page)
        THEN changes' = changes + 1
        ELSE changes' = changes
     /\ Iterate
  \/ /\ statuses[item] = "deleted"
     /\ changes /= netChanges \/ ~Cached(desired)
     /\ pages' = [ pages EXCEPT ![page] = pages[page] \ { item } ]
     /\ IF Cached(page)
        THEN changes' = changes - 1
        ELSE changes' = changes
     /\ Iterate
  \/ /\ statuses[item] = "unmodified"
     /\ changes /= netChanges \/ ~Cached(desired)
     /\ pages' = pages
     /\ changes' = changes
     /\ Iterate

Think managed to get the math to check out.
Replaced the page variable with CHOOSE which picks the best location for the item.
And added a Init constraint that EmptyNewPages s.t. there are pages available for all the new items.
Had to replace most of the initial type declarations.
Did this to allow arbitrary subsets of Items, and because modulo for Sentinel size was no longer working.
Still not sure it's perfect.

apparently vichan has a bunch of 0days that haven't been disclosed yet but can give an attacker a shell on the host. considering this site is a fork of vichan, are there plans to move to something else? this was last month, and the vichan guy on github decided to archive the repo instead of working on finding the vulnerabilities and fixing them

and yes, this sounds important I'm too lazy to make a new thread




File: 1785439803129-4.jpeg (21.28 KB, 246x381, IMG_1468.jpeg)

 

there are two positions one can take on the issue of intellectual property, either you believe in it or you don't. either information is a material resource that can be governed and owned, or information is an immaterial resource that cannot be governed nor owned.

you can't criticize software vendors for restricting access to their source code and invoking intellectual property law to sue people who copy it, and then turn around and invent a copyleft license so you can do the exact same thing. you can't copy the source code from unix and emacs and violate their license to write unauthorized clones and then lock those clones behind your own license to stop others from doing whatever they want with "your" code.

words are not things and language is a means, not an end. the significance of a legal document is not in the text itself but in how the text is interpreted and enforced in a court of law. permissive licenses such as the bsd license can effectively be thought of public domain licenses because they contain no enforceable non-trivial restrictions that could conceivably ever warrant an actual court case, but copyleft licenses like the gpl can and have been involved in real courtroom cases and any civil litigation in any courtroom requires a specific plaintiff, and it cannot be "the people" as in a criminal case filed by the state. the plaintiffs in gpl violation cases are typically non-profit organizations like the free software foundation or the software freedom law center who act as legal representatives for one or more of the developers, and which developers get to be constituents and potential beneficiaries in the lawsuit is decided entirely at the discretion of whomever happens to be in the room when the lawsuit is first filed.

to illustrate the real-world ramifications of this, consider the busybox lawsuits filed against various companies by busybox developers erick anderson and rob landley represented by the software freedom law center. the cases were settled for undisclosed sums and these two developers got paid off, but none of the other hundreds of contributors to the busybox project, including the original authors bruce perens and dave cinege, were represented or given a share of the settlement or even contacted by the plaintiffs. so in practice, enforcement of the gpl does not really represent the open source community and all the contributors to a particular project, it only represents the tiny fraction of contributPost too long. Click here to view the full text.
6 posts omitted.

>you can't criticize software vendors for restricting access to their source code and invoking intellectual property law to sue people who copy it, and then turn around and invent a copyleft license so you can do the exact same thing
that's where you're wrong, kiddo
reminder that opposition to the GPL is software cuckoldry: https://lukesmith.xyz/articles/why-i-use-the-gpl-and-not-cuck-licenses/

>>33976
Why is that the fault of GPL specifically and not investors and the fbi seeing the start of the exodus towards linux and taking control of it in advance?
Freebsd best protection is that it is completely irrelevant in the same way linux was 10 years ago

>>33995

because copyleft is just a form of copyright and just by staking the legal claim of copyright with the GPL you've already stepped over the line from public domain into private business because that's how the legal system is structured to handle these claims. by putting linux behind the GPL you've essentially legally declared linux to be a business entity governed by private intellectual property law and the entire business world will react accordingly, treating linux not as a neutral public resource but as a little fish trying to swim with the sharks, something they cannot ignore, something they have to get their hands on before anyone else does. the business world and the courts and judges and lawyers that govern it and the huge amounts of money thrown around to manipulate it, that whole world is just a cesspool and the only way to rise above it and have any integrity is to stay the hell out of it and not play that game at all, just make your shit free for everyone to do whatever they want with and if people copy your ideas and get rich off of them then just let them do it and don't be a greedy egotistical asshole who thinks the world owes you something just because you wrote some clever code or whatever.

this guy is just reposting from another thread. sage




File: 1784102865273-6.png (28.16 KB, 128x128, Dillo-icon.png)

 

Use Dillo. It only has ~80,000 lines of code. That's smaller than some terminal browsers, even. Firefox and Chromium are like operating systems w/ 10s of millions of lines of code. That's why compiling Firefox on Gentoo is a fucking nightmare. With Dillo, it just takes a few seconds. And minus the proprietary js attack surface since it comes without it because it's a legacy browser with its own engine instead of using Google/Apple like Otter browser or Suckless Surf.
3 posts and 1 image reply omitted.

You also posted this on Kiwifarms and it wasn't funny there either

post that on texttotalk.org

Nah imma stay on Firefox. Librewolf, to be exact.

It can't access a lot of plain html sites that lynx can handle just fine.

>>33734
trvth nvke



 

Post programming lectures.
If you actually use the contents speak up!
Post any programming video that catches your attention!

Obligatory introduction to computer science:
https://ocw.mit.edu/courses/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video_galleries/video-lectures/
1 post omitted.

"When we think we stay with our dictionaries." This one is more aspirational for me. While I love etymologies I rarely put them to work like I should when programming. Rich Hickey sort of makes his own DSL dictionary so that terms are used consistently throughout his program. Not knowing your own terms is surely a way to have weak thoughts.

"Programs are meant to be read by humans and only incidentally by machines." When I was a kid every program I wrote was literate, because I almost exclusively worked through books, and made notes. Although I never had the macro system and typography of WEB, org-mode was a close second. At some point when I started writing more independent programs this was lost. I'm intending to get back into this, even if only in comments.

Been watching CHM Oral Histories: https://www.youtube.com/playlist?list=PLQsxaNhYv8daKdGi7s85ubzbWdTB36-_q specifically Knuth's and Lamport's interviews. They both mention Robert Floyd as seminal to their work, but there's a lacuna in the video record. I only found one video on him. Then of course there's his publications.

I think I'm still doing the functional programming wrong. I've got the service layer, and the repositories which I inject as dependencies, I've got the validation, and just the data without methods. But I'm still just injecting IO functions directly into my service layer. I'm considering importing https://github.com/gcanti/io-ts to give it another go. Really the bulk of my code is IO driven, but there's still room for some small pure functions here and there. I think this is going to result in a utils folder. I feel so stupid still.

>>34040
>I feel so stupid still.
Well, I'll be honest, feel more like I can't get anything done, and even that's getting better.



Delete Post [ ]
[ home / rules / faq / search ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM / ufo / 420 ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]
[ 1 /2 /3 /4 /5 /6 /7 /8 /9 /10 /11 /12 /13 /14 /15 /16 /17 /18 /19 /20 /21 /22 /23 /24 /25 /26 /27 /28 /29 /30 /31 /32 /33 /34 /35 /36 ]
| Catalog | Home